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] nested macro is not hipified, when it isAnyIdentifier #12

Closed
emankov opened this issue Dec 15, 2016 · 1 comment
Closed

[HIPIFY] nested macro is not hipified, when it isAnyIdentifier #12

emankov opened this issue Dec 15, 2016 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@emankov
Copy link
Collaborator

emankov commented Dec 15, 2016

Similar to #7 with the only difference that nested MACRO is an identifier, not a defined numeric literal.

Example:

checkCudaErrors(cublasSgemm(handle, CUBLAS_OP_N, CUBLAS_OP_N, matrix_size.uiWB, matrix_size.uiHA, matrix_size.uiWA, &alpha, d_B, matrix_size.uiWB, d_A, matrix_size.uiWA, &beta, d_C, matrix_size.uiWB));

where both marked identifiers are MACRO:
#define checkCudaErrors(val) check ( (val), #val, _FILE_, _LINE_ )
#define cublasSgemm cublasSgemm_v2

After hipifying now:
checkCudaErrors(cublasSgemm(handle, HIPBLAS_OP_N, HIPBLAS_OP_N, matrix_size.uiWB, matrix_size.uiHA, matrix_size.uiWA, &alpha, d_B, matrix_size.uiWB, d_A, matrix_size.uiWA, &beta, d_C, matrix_size.uiWB));

Should be:
checkCudaErrors(hipblasSgemm(handle, HIPBLAS_OP_N, HIPBLAS_OP_N, matrix_size.uiWB, matrix_size.uiHA, matrix_size.uiWA, &alpha, d_B, matrix_size.uiWB, d_A, matrix_size.uiWA, &beta, d_C, matrix_size.uiWB));

@emankov emankov self-assigned this Dec 15, 2016
@emankov
Copy link
Collaborator Author

emankov commented Dec 15, 2016

Fixed.
/gerritgit/compute/ec/hip (amd-develop branch):
SHA-1: 2383d9bc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant