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] Isn't hipify-clang preprocessor based tool? #1131

Closed
alvin546 opened this issue Nov 13, 2023 · 4 comments
Closed

[HIPIFY] Isn't hipify-clang preprocessor based tool? #1131

alvin546 opened this issue Nov 13, 2023 · 4 comments
Assignees
Labels
question Further information is requested

Comments

@alvin546
Copy link

alvin546 commented Nov 13, 2023

I have attempted to migrate below code using hipify-clang in Windows environment.
`#if 0
#include <mpi.h>
#else
#include <omp.h>
#endif

int main()
{
//CUDA code
return 0;
}`

But encountering following error:
C:\Users\APENDLIX\AppData\Local\Temp\test.cu-10f48a.hip:16:10: fatal error: 'mpi.h' file not found #include <mpi.h> ^~~~~~~ Exception Code: 0xC0000005

I'm wondering about why it is considering mpi.h though it is disabled. Isn't hipify-clang preprocessor based tool? Am I missing anything to consider for migration?

@emankov emankov self-assigned this Nov 13, 2023
@emankov emankov added the question Further information is requested label Nov 13, 2023
@emankov
Copy link
Collaborator

emankov commented Nov 13, 2023

hipify-clang is a clang frontend-based tool, which utilizes C/C++ preprocessor as well. By default, all preprocessor conditional branches are taken into account, because the main aim is to HIPIFY AMAP.

This default behaviour can be turned off by providing --default-preprocessor option.

For all available options, use --help option, please.

@emankov emankov changed the title Isn't hipify-clang preprocessor based tool? [HIPIFY] Isn't hipify-clang preprocessor based tool? Nov 13, 2023
@alvin546
Copy link
Author

alvin546 commented Nov 14, 2023

Thank you, this option addressed my issue.
May I know what is HIPIFY AMAP?

@emankov
Copy link
Collaborator

emankov commented Nov 14, 2023

I meant, to HIPIFY (CUDA sources) As Much As Possible.

@emankov
Copy link
Collaborator

emankov commented Nov 16, 2023

Closing as answered.

@emankov emankov closed this as completed Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants