Make CUTLASS compileable with Clang.
Requires a recent clang build (r359248 or newer). Enable compilation with clang with these options: cmake -DCUDA_COMPILER=clang -DCMAKE_CXX_COMPILER=/path/to/clang++
This commit is contained in:
@@ -45,6 +45,12 @@ Ctype inner_product(Atype a, Btype b, Ctype c) {
|
||||
return Ctype(a) * Ctype(b) + c;
|
||||
}
|
||||
|
||||
#if defined(__clang__) && defined(__CUDA__)
|
||||
__device__ __forceinline__ __half inner_product(__half a, __half b, __half c) {
|
||||
return a * b + c;
|
||||
}
|
||||
#endif
|
||||
|
||||
/// Specialization for matrix multiplication with binary operands
|
||||
template <>
|
||||
CUTLASS_HOST_DEVICE
|
||||
@@ -124,4 +130,3 @@ struct Cast<float, uint8_t> {
|
||||
} // namespace detail
|
||||
} // namespace reference
|
||||
} // namespace cutlass
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ struct Gemm {
|
||||
}
|
||||
|
||||
/// Performs linear scaling of matrix product and updates output tensor
|
||||
CUTLASS_HOST_DEVICE
|
||||
__device__
|
||||
Gemm & epilogue(
|
||||
gemm::GemmCoord problem_size,
|
||||
ScalarType alpha,
|
||||
|
||||
Reference in New Issue
Block a user