Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shuffle triggers vague issue on Vulkan. #8580

Open
mcourteaux opened this issue Feb 18, 2025 · 0 comments
Open

Shuffle triggers vague issue on Vulkan. #8580

mcourteaux opened this issue Feb 18, 2025 · 0 comments
Assignees

Comments

@mcourteaux
Copy link
Contributor

mcourteaux commented Feb 18, 2025

I had to disable Vulkan testing in correctness/vector_shuffle.cpp (introduced in #8567), because there is an issue on my machine with that. Last excerpt from HL_DEBUG_CODEGEN=1 output:

Skipping Hexagon offload...
Offloading GPU loops...
 CodeGen_Vulkan_Dev::SPIRV_Emitter::visit(Shuffle): type=int32x8 vectors=2 is_interleave=false is_extract_element=false
 CodeGen_Vulkan_Dev::SPIRV_Emitter::visit(Shuffle): type=int32x4 vectors=4 is_interleave=false is_extract_element=false
    vector shuffle x4 : 0 1 2 3 
 CodeGen_Vulkan_Dev::SPIRV_Emitter::visit(Shuffle): type=int32x4 vectors=4 is_interleave=false is_extract_element=false
    vector shuffle x4 : 0 1 2 3 
    vector shuffle x2 : 3 1 6 7 2 4 0 5 
 CodeGen_Vulkan_Dev::SPIRV_Emitter::visit(Shuffle): type=int32x4 vectors=1 is_interleave=false is_extract_element=false
    vector shuffle x1 : 0 1 2 3 
 CodeGen_Vulkan_Dev::SPIRV_Emitter::visit(Shuffle): type=int32x4 vectors=1 is_interleave=false is_extract_element=false
    vector shuffle x1 : 4 5 6 7 
 CodeGen_Vulkan_Dev::SPIRV_Emitter::visit(Shuffle): type=int32x2 vectors=1 is_interleave=false is_extract_element=false
    vector shuffle x1 : 0 1 
 CodeGen_Vulkan_Dev::SPIRV_Emitter::visit(Shuffle): type=int32x2 vectors=1 is_interleave=false is_extract_element=false
    vector shuffle x1 : 2 3 
 CodeGen_Vulkan_Dev::SPIRV_Emitter::visit(Shuffle): type=int32 vectors=1 is_interleave=false is_extract_element=true
 CodeGen_Vulkan_Dev::SPIRV_Emitter::visit(Shuffle): type=int32 vectors=1 is_interleave=false is_extract_element=true
Vulkan: Using static workgroup local size [8, 1, 1]...
  kernel_count = 1
  spirv_module_size[0] = 2432 bytes
Lowering Parallel Tasks...
Embedding image vulkan_buf
Embedding image vulkan_gpu_source_kernels
Target triple of initial module: x86_64--linux-gnu
Generating llvm bitcode...
Generating llvm bitcode prolog for function g...
Generating llvm bitcode for function g...
JIT compiling g for x86-64-linux-tune_znver1-avx-avx2-f16c-fma-jit-sse41-user_context-vk_v13-vulkan
[New Thread 0x7fffed4006c0 (LWP 434073)]
[New Thread 0x7fffeca006c0 (LWP 434074)]
[New Thread 0x7fffe5c006c0 (LWP 434075)]
[New Thread 0x7fffe40006c0 (LWP 434077)]
[New Thread 0x7fffe36006c0 (LWP 434079)]
NVVM compilation failed: 1
Vulkan [WARNING]: (user_context=0x7fffffffc510, id=2, name:NVIDIA) CreatePipeline: failed to compile internal representation
Vulkan [WARNING]: (user_context=0x7fffffffc510, id=2, name:NVIDIA) CreatePipeline: unexpected compilation failure
Vulkan [WARNING]: (user_context=0x7fffffffc510, id=2, name:NVIDIA) CreateComputePipeline: unexpected failure compiling SPIR-V shader: 0x9c4841a2cbb3db9d
User error triggered at /home/martijn/zec/3rd/halide/src/JITModule.cpp:1232
Error: Vulkan: Failed to create compute pipeline! vkCreateComputePipelines returned <Unknown Vulkan Result Code>
Vulkan: Failed to create compute pipeline!
Vulkan: Failed to setup compute pipeline!

The error is very non-descriptive. Something might be wrong with the SPIRV codegen for Shuffle ops.
So I think two things should happen:

  • <Unknown Vulkan Result> should probably get fixed by adding some entries in an error code to error string table?
  • Fix the codegen for Shuffle.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants