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

Skip texture management example on MI300 and above #130

Closed
wants to merge 3 commits into from

Conversation

dgaliffiAMD
Copy link
Collaborator

To resolve build failure when building the entire example suite on an MI300.

Signed-off-by: David Galiffi <David.Galiffi@amd.com>
Update CMakeList to still this example on gfx94*.

Signed-off-by: David Galiffi <David.Galiffi@amd.com>
HIP-Basic/CMakeLists.txt Outdated Show resolved Hide resolved
if(GPU_RUNTIME STREQUAL "CUDA")
list(APPEND include_dirs "${ROCM_ROOT}/include")
endif()
if(NOT CMAKE_HIP_ARCHITECTURES MATCHES "gfx94*")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't add the folder on HIP-Basic/CMakeLists.txt this change does not seem necessary IINM. I would suggest either keeping this and removing the skipping code on HIP-Basic/CMakeLists.txt or vice-versa.

@Beanavil
Copy link
Collaborator

Beanavil commented Jun 27, 2024

FYI: in our internal PR for fixing the examples for ROCm 6.1 we also solved this issue by doing

+ #if !defined(__HIP_NO_IMAGE_SUPPORT) || !__HIP_NO_IMAGE_SUPPORT
+   // Read the value from the texture, if supported.
     unsigned char val = tex2D<unsigned char>(tex_obj, u, v);
+ #else
+   // Prevent compile errors on HIP architectures that do not support
+    // texture instructions.
+    (void)u;
+   (void)v;
+   (void)tex_obj;
+   unsigned char val = 0;
+ #endif

within the texture management example, so it can still be compiled for the gfx94* archs.

Co-authored-by: Beatriz Navidad Vilches <61422851+Beanavil@users.noreply.github.com>
@dgaliffiAMD
Copy link
Collaborator Author

also solved this issue by doing

FYI: in our internal PR for fixing the examples for ROCm 6.1 we also solved this issue by doing

+ #if !defined(__HIP_NO_IMAGE_SUPPORT) || !__HIP_NO_IMAGE_SUPPORT
+   // Read the value from the texture, if supported.
     unsigned char val = tex2D<unsigned char>(tex_obj, u, v);
+ #else
+   // Prevent compile errors on HIP architectures that do not support
+    // texture instructions.
+    (void)u;
+   (void)v;
+   (void)tex_obj;
+   unsigned char val = 0;
+ #endif

within the texture management example, so it can still be compiled for the gfx94* archs.

Sorry for the late reply. I'm just getting back from vacation.
Thanks for the FYI. Will your internal change eventually be pushed to ROCm/rocm-example?
If yes, I'll just wait for that to come. If not, I'll update my PR. :)

@Beanavil
Copy link
Collaborator

Beanavil commented Jul 4, 2024

Thanks for the FYI. Will your internal change eventually be pushed to ROCm/rocm-example?
If yes, I'll just wait for that to come. If not, I'll update my PR. :)

@dgaliffiAMD yes, just opened the PR now (#138 ) :)

@dgaliffiAMD dgaliffiAMD closed this Jul 5, 2024
@dgaliffiAMD
Copy link
Collaborator Author

Closing, as this will be addressed in PR#138.

@dgaliffiAMD dgaliffiAMD deleted the amd/dgaliffi/skip-texture-management branch September 5, 2024 14:42
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

Successfully merging this pull request may close these issues.

2 participants