Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.

Fix cub/util_type.cuh to not use 16-bit float with NVC++ #233

Merged
merged 1 commit into from
Nov 6, 2020

Conversation

dkolsen-pgi
Copy link
Collaborator

A recent commit changed several occurances of __CUDACC_VER_MAJOR__ >= 9 in preprocessor expressions to (__CUDACC_VER_MAJOR__ >= 9 || CUDA_VERSION >= 9000). NVC++ defines CUDA_VERSION but not __CUDACC_VER_MAJOR__, so the commit changed the condition from false to true for NVC++. The code inside those blocks doesn't work with NVC++, causing compilation errors. Fix the regression by changing the expressions to (__CUDACC_VER_MAJOR__ >= 9 || CUDA_VERSION >= 9000) && !__NVCOMPILER_CUDA__.

A recent commit changed several occurances of "__CUDACC_VER_MAJOR__ >= 9"
in preprocessor expressions to "(__CUDACC_VER_MAJOR__ >= 9 ||
CUDA_VERSION >= 9000)".  NVC++ defines CUDA_VERSION but not
__CUDACC_VER_MAJOR__, so the commit changed the condition from false to
true for NVC++.  The code inside those blocks doesn't work with NVC++,
causing compilation errors.  Fix the regression by changing the expressions
to "(__CUDACC_VER_MAJOR__ >= 9 || CUDA_VERSION >= 9000) &&
!__NVCOMPILER_CUDA__".
@dkolsen-pgi
Copy link
Collaborator Author

I have tested the change cub/util_type.cuh with NVC++. I have not tested the change to test/test_device_radix_sort.cu, because I don't have an easy way to do that.

@alliepiper alliepiper added testing: internal ci passed Passed internal NVIDIA CI (DVS). testing: gpuCI passed Passed gpuCI testing. labels Nov 6, 2020
@alliepiper
Copy link
Collaborator

LGTM, DVS CL 29289339 is passing.

@alliepiper alliepiper merged commit e882cfd into main Nov 6, 2020
@alliepiper alliepiper deleted the nvcxx-no-fp16 branch November 6, 2020 04:00
@alliepiper alliepiper added this to the 1.11.0 milestone Nov 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
testing: gpuCI passed Passed gpuCI testing. testing: internal ci passed Passed internal NVIDIA CI (DVS).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants