Commit Graph
8 Commits
Author SHA1 Message Date
Artem Belevich fb8b3a98b7 Addressed code review comments. 2019-05-10 10:24:52 -07:00
Artem Belevich e18292db46 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++
2019-05-02 11:00:22 -07:00
Artem Belevich 1c9b54df16 Whitespace fix. 2018-01-03 16:42:51 -08:00
Artem Belevich 39616514d0 Reworked CUDA_LOG macro to print location&the message with one printf.
This replies on the fact that clang allows using device-side features
from __host__/__device__ functions from __host__ ones as long as we
don't have to generate code for that. Wrapping thread/blockIdx in
__host__ __device__ function allows using CUDA_LOG everywhere during
host and device compilation.
2018-01-03 16:36:50 -08:00
Artem Belevich df4b4e4bb6 Added _cuda_ to the name of the executable to indicate that it's not clang's version. 2017-12-11 16:34:10 -08:00
Artem Belevich 81957b3a3d Force inlining of few functions that rely on that for performance.
Clang is less agressive than nvccnvcc, so number of functions did not getn
inlined into the kernel by default. That prevented SROA from eliminating
loads/stores to temporary buffers and resulted in abysmal performance.

Replaced inline with __forceinline__ to ensure that we do inline the
functions necessary for optimal performance.
2017-12-11 14:52:30 -08:00
Artem Belevich ce2b3f695d Fixed debug macros for clang.
Unlike nvcc, clang always sees both host and device-side code during
compilation. CUDA_LOG macro is used in both host and device code, so when it
expanded to contain device-only code, that resulted in errors when it was used
from the host-side functions.

In order to make CUDA_LOG work with clang it was split into two parts -- a pair
of target-attribute-based overloaded functions that perform host or device
specific parts of logging, and a printf which works on both sides.
2017-12-11 14:52:30 -08:00
Artem Belevich e9e7cd4d44 Make cutlass compilable with clang.
E.g:
PATH=/nvcc/path/bin:/clang/path/bin:$PATH make sm=35,60 compiler=clang all
2017-12-11 14:52:30 -08:00