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][#674][hipBLAS-#366][workaround] Introduce an option-driven matcher for Data Types substitution #895

Merged
merged 1 commit into from
May 30, 2023

Conversation

emankov
Copy link
Collaborator

@emankov emankov commented May 30, 2023

[Synopsis]

  • hipSPARSE already uses the common HIP library type hipDataType, whereas hipBLAS, rocBLAS, and rocSPARSE don't
  • So, it is needed to hipify cudaDataType to hipDataType in some cases (like for SPARSE-related sources), and to hipblasDatatype_t, rocblas_datatype, or rocsparse_datatype in other cases

[Solution]

  • There is no single solid solution for sources where cudaDataType_t is used for both SPARSE and BLAS
  • [temporary][partial] Introduce the --use-hip-data-types option for use hipDataType instead of hipblasDatatype_t or rocblas_datatype; switched off by default
  • Introduced option-driven matcher DataTypeSelection for Data Types substitution
  • Check the solution on cusparseCreateSpVec to hipsparseCreateSpVec hipification, where hipDataType is used (the synthetic test cusparse2hipsparse.cu)

[ToDo]

…driven matcher for Data Types substitution

[Synopsis]
+ `hipSPARSE` already uses the common HIP library type `hipDataType`, whereas `hipBLAS`, `rocBLAS`, and `rocSPARSE` don't
+ So, it is needed to hipify `cudaDataType` to `hipDataType` in some cases (like for SPARSE-related sources), and to `hipblasDatatype_t`, `rocblas_datatype`, or `rocsparse_datatype` in other cases

[Solution]
+ There is no single solid solution for sources where `cudaDataType_t` is used for both SPARSE and BLAS
+ [temporary][partial] Introduce the `--use-hip-data-types` option for use `hipDataType` instead of `hipblasDatatype_t` or `rocblas_datatype`; switched off by default
+ Introduced option-driven matcher `DataTypeSelection` for Data Types substitution
+ Check the solution on `cusparseCreateSpVec` to `hipsparseCreateSpVec` hipification, where `hipDataType` is used (the synthetic test `cusparse2hipsparse.cu`)

[ToDo]
+ File tickets to `rocBLAS` and `rocSPARSE` similar to ROCm/hipBLAS#366
+ Take into account all of the supported `cudaDataType_t` enum members and update the tests
+ Remove the workaround after all the HIP libs start to use the single `hipDataType`
@emankov emankov added feature Feature request or implementation temporary Temporary solution workaround Not a fix, just a workaround labels May 30, 2023
@emankov emankov requested a review from searlmc1 May 30, 2023 19:40
@emankov emankov self-assigned this May 30, 2023
@emankov emankov merged commit 7ac821e into ROCm:amd-staging May 30, 2023
emankov added a commit to emankov/HIPIFY that referenced this pull request May 31, 2023
emankov added a commit that referenced this pull request May 31, 2023
[HIPIFY][#895][fix] Regenerated and updated the hipify-perl and docs missed in the previous PR
emankov added a commit to emankov/HIPIFY that referenced this pull request Nov 15, 2023
+ [Reason] `cusparseGetStream` appeared in CUDA 8.0
+ [fix] Set the missing A-version for `cusparseGetStream`
+ Updated synthetic `SPARSE` tests and the regenerated `SPARSE` documentation
+ [TODO][ROCm#899][HIPIFY][ROCm#895][ROCm#383][hipBLAS-ROCm#366][workaround][temporary] Always convert cudaDataType_t to hipDataType under the `--use-hip-data-types` option
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature request or implementation temporary Temporary solution workaround Not a fix, just a workaround
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant