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:
Artem Belevich
2019-05-02 11:00:22 -07:00
parent fe3438a3c1
commit e18292db46
17 changed files with 102 additions and 38 deletions
+6 -1
View File
@@ -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
+1 -1
View File
@@ -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,