Skip to content

Commit

Permalink
Only test half/bfloat16 when libcu++ supports them
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardmgruber committed Jan 31, 2025
1 parent 28501e0 commit b28f4ee
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions c2h/include/c2h/extended_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@
#include <cuda/__cccl_config>

#ifndef TEST_HALF_T
# if defined(_CCCL_HAS_NVFP16)
# if defined(_CCCL_HAS_NVFP16) && defined(_LIBCUDACXX_HAS_NVFP16)
# define TEST_HALF_T() 1
# else // defined(_CCCL_HAS_NVFP16)
# else // defined(_CCCL_HAS_NVFP16) && defined(_LIBCUDACXX_HAS_NVFP16)
# define TEST_HALF_T() 0
# endif // defined(_CCCL_HAS_NVFP16)
# endif // defined(_CCCL_HAS_NVFP16) && defined(_LIBCUDACXX_HAS_NVFP16)
#endif // TEST_HALF_T

#ifndef TEST_BF_T
# if defined(_CCCL_HAS_NVBF16)
# if defined(_CCCL_HAS_NVBF16) && defined(_LIBCUDACXX_HAS_NVBF16)
# define TEST_BF_T() 1
# else // defined(_CCCL_HAS_NVBF16)
# else // defined(_CCCL_HAS_NVBF16) && defined(_LIBCUDACXX_HAS_NVBF16)
# define TEST_BF_T() 0
# endif // defined(_CCCL_HAS_NVBF16)
# endif // defined(_CCCL_HAS_NVBF16) && defined(_LIBCUDACXX_HAS_NVBF16)
#endif // TEST_BF_T

#if TEST_HALF_T()
Expand Down

0 comments on commit b28f4ee

Please sign in to comment.