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][#782][#783][feature] Initial hipification support for overloaded CUDA functions #853

Merged
merged 1 commit into from
May 2, 2023

Conversation

emankov
Copy link
Collaborator

@emankov emankov commented May 2, 2023

[IMP]

  • Introduced 1-to-N hipification for overloaded APIs with different number of arguments (see the cudaEventCreate example in [HIPIFY][#782][SWDEV-382258][feature] C vs C++ API distinguishing #783)
  • Introduced a new marker CUDA_OVERLOADED and the corresponding Matcher cudaOverloadedHostFuncCall
  • Currently, CUDA_OVERLOADED APIs are hipified twice: first, by rewriting string blindly, and second, by overload matcher (correcting)
  • Added a synthetic test for cudaEventCreate to hipEventCreateWithFlags hipification in runtime_functions.cu

[ToDo]

  • Take into account other markers, firstly HIP_UNSUPPORTED, in overloaded hipification
  • Take into account CUDA_VERSION for overloaded APIs: currently, versioning is provided only for a single instance of the overloaded API
  • Find all the existing overloaded CUDA APIs, update HIPIFY correspondingly for those APIs, and provide tests
  • [sub-task] Implement overloading with the same number of arguments and different argument types
  • [optionally] Think about implementing the same in hipify-perl

…r CUDA overloaded functions

[IMP]
+ Introduced 1-to-N hipification for overloaded APIs with different number of arguments (see the `cudaEventCreate` example in ROCm#783)
+ Introduced a new marker `CUDA_OVERLOADED` and the corresponding Matcher `cudaOverloadedHostFuncCall`
+ Currently, `CUDA_OVERLOADED` APIs are hipified twice: first, by rewriting string blindly, and second, by overload matcher (correcting)
+ Added a synthetic test for cudaEventCreate to `hipEventCreateWithFlags` hipification in `runtime_functions.cu`

[ToDo]
+ Take into account other markers, firstly `HIP_UNSUPPORTED`, in overloaded hipification
+ Take into account `CUDA_VERSION` for overloaded APIs: currently, versioning is provided only for a single instance of the overloaded API
+ Find all the existing overloaded CUDA APIs, update HIPIFY correspondingly for those APIs, and provide tests
+ [sub-task] Implement overloading with the same number of arguments and different argument types
+ [optionally] Think about implementing the same in hipify-perl
@emankov emankov added the feature Feature request or implementation label May 2, 2023
@emankov emankov requested a review from searlmc1 May 2, 2023 14:53
@emankov emankov self-assigned this May 2, 2023
@emankov emankov merged commit c0494a4 into ROCm:amd-staging May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature request or implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant