-
Notifications
You must be signed in to change notification settings - Fork 74
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] compile texture_driver #1029
Comments
Are you asking about compiling the CUDA source file or the hipified HIP source file? |
Hello, file HIPIFY/tests/unit_tests/samples/2_Cookbook/11_texture_driver |
I changed "extern texture<float, 2, cudaReadModeElementType> tex; "in tex2dKernel.cpp to "#if CUDA_VERSION < 12000 texture<float, 2, cudaReadModeElementType> tex;#endif" which is in texture2dDrv.cpp, then delete the definition of the variable tex in texture2dDrv.cpp, and then convert it into a HIP program. Using the hipcc --genco tex2dKernel.cpp -o tex2dKernel .code command to compile successfully, but if using extern variables in tex2dKernel.cpp, I don’t know how to generate tex2dKernel .code. How can I achieve this? Thanks. |
The tex variable is not used in texture2dDrv.cpp. texture2dDrv.cpp only obtains tex in the form of a string through cuModuleGetTexRef(&texref, Module, "tex"); therefore, should the declaration and definition of tex be placed in tex2dKernel. cpp file? Thanks. |
It is unclear, why you want to compile this particular hipify-clang unit test, which is dedicated to internal hipification testing only, and doesn't even have an entry point. Anyway, you may do it by the following additional steps:
int main(int argc, char** argv) {
float out = 0.f;
tex2dKernel<<<512, 512>>>(&out, 128, 128);
return 0;
}
or:
|
+ Added an entry point to the test source + [Reason] hipify-clang outer users are trying to compile hipify-clang unit tests + [ToDo][long-term] - Segregate compilable tests - Start to compile the segregated tests (after hipification) on a regular basis - Mark explicitly the rest of the non-compilable tests as synthetic (dedicated for hipification testing only) [very-long-term] - Run the successfully hipified and compiled tests on: -- AMD GPU -- NVIDIA GPU
[HIPIFY][#1029][tests] Updated the `tex2dKernel` test
Excuse me, how to compile HIPIFY/tests/unit_tests/samples/2_Cookbook
/11_texture_driver/ this test. Mainly how to compile and generate tex2dKernel.code. Thanks
The text was updated successfully, but these errors were encountered: