Skip to content

Commit

Permalink
Use __SYCL_DEVICE_ONLY__ instead of CUTLASS_ENABLE_SYCL (codeplaysoft…
Browse files Browse the repository at this point in the history
  • Loading branch information
aacostadiaz authored Aug 5, 2024
1 parent a381507 commit 9bdc5c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/cutlass/tfloat32.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ struct alignas(4) tfloat32_t {
// explicit tfloat32_t(int x) {
tfloat32_t(int x) {
float flt = static_cast<float>(x);
#if defined(__CUDA_ARCH__) || defined(CUTLASS_ENABLE_SYCL)
#if defined(__CUDA_ARCH__) || defined(__SYCL_DEVICE_ONLY__)
storage = reinterpret_cast<uint32_t const &>(flt);
#else
std::memcpy(&storage, &flt, sizeof(storage));
Expand All @@ -122,7 +122,7 @@ struct alignas(4) tfloat32_t {
// of the mantissa.
unsigned bits = (storage & ~0x1fffu);

#if defined(__CUDA_ARCH__) || defined(CUTLASS_ENABLE_SYCL)
#if defined(__CUDA_ARCH__) || defined(__SYCL_DEVICE_ONLY__)
return reinterpret_cast<float const &>(bits);
#else
float flt;
Expand Down

0 comments on commit 9bdc5c5

Please sign in to comment.