Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HIPIFY][Device][#1796][tests][fix] Fix device test failures on CUDA 11.8.0, 12.0.x, and 12.1.x #1846

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

emankov
Copy link
Collaborator

@emankov emankov commented Jan 28, 2025

  • Added a separated file with device tests for CUDA < 11.8 || CUDA > 12.1 and the following device/host APIs: __hmax2, __lows2bfloat162, __hmin2, __low2bfloat16, and few others
  • [Reason] The above device/host APIs were erroneously decorated in those CUDA versions as __device__ only, which led to clang compilation errors like: "no matching function for call to bfloat162bfloat162: cuda_bf16.hpp:1453:35: note: candidate function not viable: call to __device__ function from __host__ function"
  • The problem was fixed in CUDA 12.2.0 when those APIs started to be decorated as device/host: __CUDA_HOSTDEVICE_BF16_DECL__
  • Added the Changed CUDA version to the above APIs
  • [ToDo] Revise the rest of the supported device functions

…UDA 11.8.0, 12.0.x, and 12.1.x

+ Added a separated file with device tests for CUDA < 11.8 || CUDA > 12.1 and the following device/host APIs:
  `__hmax2`, `__lows2bfloat162`, `__hmin2`, `__low2bfloat16`, and few others
+ [Reason] The above device/host APIs were erroneously decorated in those CUDA versions as `__device__` only, which led to clang compilation errors like:
  "no matching function for call to `bfloat162bfloat162`: cuda_bf16.hpp:1453:35: note: candidate function not viable: call to `__device__` function from `__host__` function"
+ The problem was fixed in `CUDA 12.2.0` when those APIs started to be decorated as device/host: `__CUDA_HOSTDEVICE_BF16_DECL__`
+ Added the `Changed` CUDA version to the above APIs
+ [ToDo] Revise the rest of the supported device functions
@emankov emankov added test Testing is only affected fix It fixes bug device device API-related labels Jan 28, 2025
@emankov emankov self-assigned this Jan 28, 2025
@emankov emankov requested review from searlmc1 and a team as code owners January 28, 2025 22:49
@emankov emankov merged commit ac6ce7e into ROCm:amd-staging Jan 28, 2025
1 check was pending
emankov added a commit to emankov/HIPIFY that referenced this pull request Jan 29, 2025
…n to the rest device `fp16` APIs

+ Updated the regenerated `Device` `CUDA2HIP` docs accordingly
emankov added a commit that referenced this pull request Jan 29, 2025
[HIPIFY][Device][#1846][doc][fix] Added the `Changed` CUDA version to…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
device device API-related fix It fixes bug test Testing is only affected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant