cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

jpsollie
Adept II

clBuildProgram causes BRIG validation error

Hi Everyone,

So, I'll first post my system:

hardware:

2x opteron 6276, 128GB ram, combined with R9 nano

software:

-linux 4.10.17 x64

-LLVM 4.0.1 & 5.0.0 (git)

-amd 17.30 opencl framework.

problem:

(I narrow down the config to only load the amdgpu-pro icd file)

when I create a program which compiles on the CPU, it works fine,

when doing this on the GPU, it crashes with the following error:

---------------------------------------------------------------------

Error in hsa_operand section, at offset 121368:

Address is outside of memory allocated for variable

LLVM ERROR:

Brig container validation has failed in BRIGAsmPrinter.cpp

------------------------------------------------------------------------

what I tried:

- Mesa OpenCL (compiles, but does not show a correct result)

- pocl & llvm 5.0.0 (works perfectly)

- amdgpu-pro CPU driver (2348.3) (works perfectly)

-amdgpu-pro GPU driver (2442.7) same error as 2348, but does not show a CPU ...

*edit:

also tried oclGrind and CodeXL, no problem there

I suspected the error to be somewhere with LLVM, but I already switched the PATH and LD_LIBRARY_PATH to point to LLVM 4, but it does not present any change.

Where does this error come from? and how do I fix it?

thanks

0 Likes
1 Solution

First of all, thanks for sharing the repro code. After a quick test, it looks like a compiler optimization issue. The kernel seems building fine if optimization is disable i.e set to "-O0" . I'll check a further on another setup and report to the compiler team, if required. Meanwhile could you please try the same and share your observation.

Regarding the atomic query, I would suggest to open a new thread as it seems unrelated one. Also, it would help us to track these two issues separately. Please share the repro code and other setup details on that thread itself.

Regards,

View solution in original post

0 Likes
11 Replies