ROCm/llvm-project

[Issue]: The OpenCL kernel compiled with clang-ocl in ROCm 6.1 produces incorrect results.

hyunjik-song opened this issue · 2 comments

Problem Description

Incorrect results occur when loading and executing OpenCL kernels compiled with clang-ocl with hip api on ROCm 6.1 in Ubuntu 22.04.

Operating System

Ubuntu 22.04.3 LTS (Jammy Jellyfish)

CPU

AMD EPYC 7413

GPU

AMD Instinct MI250X

ROCm Version

ROCm 6.1.0

ROCm Component

clang-ocl

Steps to Reproduce

Initially, compile the OpenCL kernel with clang-ocl.
Then, utilize HIP APIs like hipModuleLoad(), hipModuleGetFunction(), and hipExtModuleLaunchKernel() to load and execute the compiled binary within the host code.
Ultimately, incorrect results should be encountered.

Attached below is the source code and Makefile used for reproduction.
The first value is found to be incorrect upon running the attached source code.

src.tar.gz

(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support

No response

Additional Information

No response

@hyunjik-song Internal ticket has been created to investigate this issue. Thanks!

clang-ocl has been removed from ROCm, so this will not be addressed, but thanks for pointing this out!