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][SWDEV-382258][feature] Introduce 1-to-N conditional matcher #782

Open
emankov opened this issue Feb 23, 2023 · 0 comments
Open
Assignees
Labels
feature Feature request or implementation refactor

Comments

@emankov
Copy link
Collaborator

emankov commented Feb 23, 2023

[Synopsis]

  • Currently, only 1-to-1 unconditional matchers are presented in hipify-clang

[ToDo]

  • If the signature of a particular API function changed or there are multiple APIs with the same name and different signatures (for C and C++, for instance), we need to map and further transform correspondingly to the needed HIP analogue (if presented)
  • If the needed HIP analogue is not presented (not yet implemented), throw an error or a warning
  • [Optionally] There might be an additional condition for matching to this or that HIP analogue, for instance:
    cuStreamGetCaptureInfo should be matched and transformed to hipStreamGetCaptureInfo if CUDA_VERSION < 12000, and to hipStreamGetCaptureInfo_v2 if CUDA_VERSION >= 12000; in the first scenario, the call of cuStreamGetCaptureInfo has the signature used before CUDA 12.0, in the second scenario, the call of cuStreamGetCaptureInfo has the different signature, changed with CUDA 12.0.
@emankov emankov added feature Feature request or implementation refactor labels Feb 23, 2023
@emankov emankov self-assigned this Feb 23, 2023
@emankov emankov changed the title [HIPIFY][feature] Introduce 1-to-N conditional matcher [HIPIFY][SWDEV-382258][feature] Introduce 1-to-N conditional matcher Feb 23, 2023
emankov added a commit to emankov/HIPIFY that referenced this issue Feb 23, 2023
emankov added a commit to emankov/HIPIFY that referenced this issue Feb 23, 2023
…luding of some tests

[ToDo]
+ ROCm#782
+ Get rid of the error `CUDA device code does not support variadic functions` in CUB tests
emankov added a commit to emankov/HIPIFY that referenced this issue May 2, 2023
…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 added a commit that referenced this issue May 2, 2023
[HIPIFY][#782][#783][feature] Initial hipification support for overloaded CUDA functions
emankov added a commit to emankov/HIPIFY that referenced this issue May 2, 2023
…daGraphInstantiate`

+ Unchanged: cudaGraphInstantiate(5 args) -> hipGraphInstantiate(5 args)
+ Added: cudaGraphInstantiate(3 args) -> hipGraphInstantiateWithFlags(3 args)
emankov added a commit that referenced this issue May 2, 2023
[HIPIFY][#782][#783] Support for CUDA overloaded function `cudaGraphInstantiate`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature request or implementation refactor
Projects
None yet
Development

No branches or pull requests

1 participant