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][SWDEV-382258][feature] C vs C++ API distinguishing #783

Open
emankov opened this issue Feb 23, 2023 · 0 comments
Open

[HIPIFY][#782][SWDEV-382258][feature] C vs C++ API distinguishing #783

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

Comments

@emankov
Copy link
Collaborator

emankov commented Feb 23, 2023

[ToDo]

  • Add new markers CUDA_C, CUDA_CPP, HIP_C, HIP_CPP, maybe ROC_C and ROC_CPP as well to the API matching entities, where we have such information
  • If the above additional information is absent, the different number of arguments should be taken into account

[IMP]

[Example]

CUDA C API:

extern __host__ cudaError_t CUDARTAPI cudaEventCreate(cudaEvent_t *event);

HIP API:

hipError_t hipEventCreate(hipEvent_t* event);

CUDA C++ API:

static __inline__ __host__ cudaError_t cudaEventCreate(cudaEvent_t  *event, unsigned int  flags);

HIP API:

hipError_t hipEventCreateWithFlags(hipEvent_t* event, unsigned flags);
@emankov emankov added the feature Feature request or implementation label Feb 23, 2023
@emankov emankov self-assigned this Feb 23, 2023
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
Projects
None yet
Development

No branches or pull requests

1 participant