ROCm / ROCm-OpenCL-Runtime

ROCm OpenOpenCL Runtime
170 stars 60 forks source link

opencl error :CL_INVALID_WORK_GROUP_SIZE #150

Open cosigh opened 1 year ago

cosigh commented 1 year ago

Environment: Ubuntu :20.04.1 kernel:5.15.0-46-generic rocm4.2 with MI100 tests: https://github.com/abduld/Parboil.git

./parboil run histo opencl_base default

When I do parboil test, I get this error

OpenCL Error (src/opencl_base/main.cpp: 427): CL_INVALID_WORK_GROUP_SIZE PBTIMER: histo_final_kernel: 0.000024 OpenCL Error (src/opencl_base/main.cpp: 432): CL_INVALID_WORK_GROUP_SIZE PBTIMER: histo_prescan_kernel: 0.000024 OpenCL Error (src/opencl_base/main.cpp: 391): CL_INVALID_WORK_GROUP_SIZE RANGE = 0, 2147483647 ..........

I compiled rocm from source, and I found the CL_KERNEL_WORK_GROUP_SIZE value to be 1024; But the binary I installed from apt , I found the CL_KERNEL_WORK_GROUP_SIZE value to be 4096.

So are there any special options that need to be turned on during compilation?

cmake -DUSE_COMGR_LIBRARY=ON -DCMAKE_PREFIX_PATH="$ROCclr_DIR/build;/opt/rocm/" \ -DCMAKE_INSTALL_PREFIX=$ROCM_INSTALL_DIR/opencl \ -Dhsa-runtime64_DIR=$ROCM_INSTALL_DIR/lib/cmake/hsa-runtime64 \ -DCPACK_PACKAGING_INSTALL_PREFIX=$ROCM_INSTALL_DIR/opencl ../

cosigh commented 1 year ago

I'm very sorry,The value of 4096 comes from the CPU, but there are still problems with the test questions