CUDA 9 lacks host-side conversions from float=>half. Instead, we must reinterpret_cast<> from cutlass::half_t => half.
This commit is contained in:
parent
6877595a5e
commit
cfe4b933ef
@ -144,18 +144,18 @@ cudaError_t Cutlass_FP16_SgemmNN(
|
|||||||
typename Gemm::Params params;
|
typename Gemm::Params params;
|
||||||
|
|
||||||
int result = params.initialize(
|
int result = params.initialize(
|
||||||
M, // GEMM M dimension
|
M, // GEMM M dimension
|
||||||
N, // GEMM N dimension
|
N, // GEMM N dimension
|
||||||
K, // GEMM K dimension
|
K, // GEMM K dimension
|
||||||
half(float(alpha)), // scalar alpha - This is a legal conversion from cutlass::half_t to CUDA's half.
|
reinterpret_cast<half const &>(alpha), // scalar alpha - This is a legal conversion from cutlass::half_t to CUDA's half.
|
||||||
A, // matrix A operand
|
A, // matrix A operand
|
||||||
lda,
|
lda,
|
||||||
B, // matrix B operand
|
B, // matrix B operand
|
||||||
ldb,
|
ldb,
|
||||||
half(float(beta)), // scalar beta - This is a legal conversion from cutlass::half_t to CUDA's half.
|
reinterpret_cast<half const &>(beta), // scalar beta - This is a legal conversion from cutlass::half_t to CUDA's half.
|
||||||
C, // source matrix C
|
C, // source matrix C
|
||||||
ldc,
|
ldc,
|
||||||
C, // destination matrix C (may be different memory than source C matrix)
|
C, // destination matrix C (may be different memory than source C matrix)
|
||||||
ldc
|
ldc
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user