CNugteren / CLBlast

Tuned OpenCL BLAS
Apache License 2.0
1.06k stars 202 forks source link

Tests don't run on Intel Xe/ARC GPU #534

Closed tangjinchuan closed 9 months ago

tangjinchuan commented 9 months ago

Systems: Windows 11, CLBlast-1.5.3, 1.6.1, 1.6.2 Problem with clblas(official lib) as well as cblas (latest openblas, both official lib and self compiled lib) Tunner is fine. Results: After keying the following on the cmd lines, the cursor goes a circle, then the program is finished with a ":"

clblast_test_xgemm.exe -verbose

* Options given/available:
    -platform 0 [=default]
    -device 0 [=default]
    -full_test [false]
    -verbose [true]
    -cblas 1 [=default]

* Running on OpenCL device 'Intel(R) Iris(R) Xe Graphics'.
* Starting tests for the 'SGEMM' routine. Legend:
   : -> Test produced correct results
   . -> Test returned the correct error code
   X -> Test produced incorrect results
   / -> Test returned an incorrect error code
   \ -> Test not executed: OpenCL-kernel compilation error
   o -> Test not executed: Unsupported precision
   - -> Test not completed: Reference CBLAS doesn't output error codes
* Testing with error margins of 0.5% (relative) and 0.001 (absolute)
* Testing 'regular behaviour' for '101 (row-major) 111 (regular) 111 (regular)':
   Testing: m=7 n=7 k=7 lda=7 ldb=7 ldc=7 offa=0 offb=0 offc=0 alpha=3.14 beta=3.1 

In the meantime, I just tried to run the program on another AMD machine with RX7900XTX. It gives a different bug as shown in the figures. (can't locate _ZSt28_throw_bad_array_new_lengthv in libclblast.dll) p1 p2

tangjinchuan commented 9 months ago

@CNugteren I finally figured out. Thanks to AMD platform I could see the errors and after solution 1, it works on Intel CPUs. Will report the results on A770 soon.

Solution 1: copy libstdc++-6.dll from the MingW compiler location e.g. \winlibs-x86_64-posix-seh-gcc-13.1.0-llvm-16.0.5-mingw-w64ucrt-11.0.0-r5\mingw64\bin to the test exe files directory.

Solution 2 (more complicated): set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++")