- Clone this project with all submodules
git clone https://github.com/nihui/intel-anv-bug.git
cd intel-anv-bug
git submodule update --init --recursive
- Build with CMake
mkdir build
cd build
cmake ..
cmake --build . -j 4
- Build the latest mesa intel vulkan driver
git clone https://gitlab.freedesktop.org/mesa/mesa.git
cd mesa
meson setup build-release -Dbuildtype=release -Dvideo-codecs= -Dgallium-drivers= -Dglx=disabled -Degl=disabled -Dvulkan-drivers=intel -Db_lto=true -Dstrip=true
ninja -C build-release
- Test against the latest mesa intel vulkan driver
export NCNN_VULKAN_DRIVER=/home/nihui/osd/mesa/build-release/src/intel/vulkan/libvulkan_intel.so
./bug
sample output on i7-7700 igpu
[0 Intel(R) HD Graphics 630 (KBL GT2)] queueC=0[1] queueT=0[1]
[0 Intel(R) HD Graphics 630 (KBL GT2)] fp16-p/s/u/a=1/1/1/1 int8-p/s/u/a=1/1/1/1
[0 Intel(R) HD Graphics 630 (KBL GT2)] subgroup=32(8~32) ops=1/1/1/1/1/1/1/1/1/1
[0 Intel(R) HD Graphics 630 (KBL GT2)] fp16-cm=0 int8-cm=0 bf16-cm=0 fp8-cm=0
vkWaitForFences failed -4
ret = -1
sample dmesg output
[23212.348973] i915 0000:00:02.0: [drm] Resetting rcs0 for preemption time out
[23212.349046] i915 0000:00:02.0: [drm] bug[45447] context reset due to GPU hang
[23212.384038] i915 0000:00:02.0: [drm] GPU HANG: ecode 9:1:85ddfffa, in bug [45447]
- The
dont_unroll
trick
uncomment this line // [[ dont_unroll ]]
in bug.cpp
and rebuild and run. It will terminate properly.