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

[HIP][OpenCL] Do not pass GPU type from the host code, use predefined macros provided by hip-clang instead #3139

Open
atamazov opened this issue Jul 23, 2024 · 0 comments

Comments

@atamazov
Copy link
Contributor

Many of our kernels need to know the target GPU type. Right now we define macros (like MIO_BN_GFX110X) at the host side and pass to the kernel during compilation, via -D options. Therefore, compilation options are changed whenever we introduce support for new GPUs (or deprecate support for the old ones).

🔴 But compilation options are used to build KDB key. Therefore, when we add support for new GPUs, the precompiled binary cache becomes obsolete (and needs to be regenerated!) for currently supported GPUs.

However passing GPU type via options is not required because hip-clang knows the target GPU type, see https://clang.llvm.org/docs/AMDGPUSupport.html. IIRC we already use this approach in the assembly kernels.

Proposal: Remove passing macros from the host code to HIP/OCL compiler. Instead, use the predefined macros provided by hip-clang.

Additional info:


[Attribution] @junliume @JehandadKhan @CAHEK7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant