intel / intel-graphics-compiler

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Assertion failure compiling code calling log10f

maleadt opened this issue · comments

Using a debug build of NEO v24.5.28454 and IGC v1.0.15985:

; ModuleID = '<llvm-reduce tmp module>'
target triple = "spir64-unknown-unknown"

declare float @_Z5log10f(float)

define spir_kernel void @kernel() {
  %v8 = load float, float addrspace(1)* null, align 4
  %v9 = call float @_Z5log10f(float %v8)
  store float %v9, float addrspace(1)* null, align 4
  ret void
}

Assembling with llvm-spirv:

119734787 65536 393230 17 0
2 Capability Addresses
2 Capability Linkage
2 Capability Kernel
5 ExtInstImport 1 "OpenCL.std"
3 MemoryModel 2 2
5 EntryPoint 6 14 "kernel"
3 ExecutionMode 14 31
3 Source 0 0
5 Name 4 "_Z5log10f"
4 Name 8 "kernel"
3 Name 12 "v8"
3 Name 13 "v9"
7 Decorate 4 LinkageAttributes "_Z5log10f" Import
6 Decorate 8 LinkageAttributes "kernel" Export
3 TypeFloat 2 32
4 TypeFunction 3 2 2
2 TypeVoid 6
3 TypeFunction 7 6
4 TypePointer 10 5 2
3 ConstantNull 10 11


5 Function 2 4 0 3
3 FunctionParameter 2 5

1 FunctionEnd

5 Function 6 8 0 7

2 Label 9
6 Load 2 12 11 2 4
5 FunctionCall 2 13 4 12
5 Store 11 13 2 4
1 Return

1 FunctionEnd

5 Function 6 14 0 7

2 Label 15
4 FunctionCall 6 16 8
1 Return

1 FunctionEnd

Loading with zeCreateModule:

/workspace/srcdir/intel-graphics-compiler/IGC/Compiler/CISACodeGen/ConstantCoalescing.cpp:1281: void IGC::ConstantCoalescing::MergeUniformLoad(llvm::Instruction*, llvm::Value*, uint, llvm::Value*, uint, uint, const IGC::ConstantCoalescing::ExtensionKind&, std::vector<IGC::BufChunk*>&): Assertion `loadNumElements == RoundChunkSize(loadNumElements)' failed.

[3458183] signal (6.-6): Aborted
in expression starting at /home/tim/Julia/pkg/oneAPI/dev/wip.jl:7
unknown function (ip: 0x7f3e31a6ce2c)
gsignal at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
abort at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x7f3e31a08394)
__assert_fail at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
MergeUniformLoad at /workspace/srcdir/intel-graphics-compiler/IGC/Compiler/CISACodeGen/ConstantCoalescing.cpp:1281
ProcessBlock at /workspace/srcdir/intel-graphics-compiler/IGC/Compiler/CISACodeGen/ConstantCoalescing.cpp:601
ProcessFunction at /workspace/srcdir/intel-graphics-compiler/IGC/Compiler/CISACodeGen/ConstantCoalescing.cpp:155
runOnFunction at /workspace/srcdir/intel-graphics-compiler/IGC/Compiler/CISACodeGen/ConstantCoalescing.cpp:64
runOnFunction at /workspace/srcdir/intel-graphics-compiler/build/IGC/llvm-deps/src/llvm/lib/IR/LegacyPassManager.cpp:1434
runOnModule at /workspace/srcdir/intel-graphics-compiler/build/IGC/llvm-deps/src/llvm/lib/IR/LegacyPassManager.cpp:1480
runOnModule at /workspace/srcdir/intel-graphics-compiler/build/IGC/llvm-deps/src/llvm/lib/IR/LegacyPassManager.cpp:1549
run at /workspace/srcdir/intel-graphics-compiler/build/IGC/llvm-deps/src/llvm/lib/IR/LegacyPassManager.cpp:539
run at /workspace/srcdir/intel-graphics-compiler/build/IGC/llvm-deps/src/llvm/lib/IR/LegacyPassManager.cpp:1676
CodeGen at /workspace/srcdir/intel-graphics-compiler/IGC/Compiler/CISACodeGen/OpenCLKernelCodeGen.cpp:3341
CodeGen at /workspace/srcdir/intel-graphics-compiler/IGC/Compiler/CISACodeGen/OpenCLKernelCodeGen.cpp:3367
TranslateBuildSPMD at /workspace/srcdir/intel-graphics-compiler/IGC/AdaptorOCL/dllInterfaceCompute.cpp:1508
TranslateBuildSPMDAndESIMD at /workspace/srcdir/intel-graphics-compiler/IGC/VISALinkerDriver/VLD.cpp:367
TranslateBuild at /workspace/srcdir/intel-graphics-compiler/IGC/AdaptorOCL/dllInterfaceCompute.cpp:1761
Translate at /workspace/srcdir/intel-graphics-compiler/IGC/AdaptorOCL/ocl_igc_interface/impl/igc_ocl_translation_ctx_impl.h:359
TranslateImpl at /workspace/srcdir/intel-graphics-compiler/IGC/AdaptorOCL/ocl_igc_interface/impl/igc_ocl_translation_ctx_impl.cpp:68
Translate<> at /workspace/destdir/include/igc/ocl_igc_interface/igc_ocl_translation_ctx.h:93
translate<IGC::IgcOclTranslationCtx<3> > at /workspace/srcdir/compute-runtime/shared/source/compiler_interface/compiler_interface.inl:75
build at /workspace/srcdir/compute-runtime/shared/source/compiler_interface/compiler_interface.cpp:153
compileGenBinary at /workspace/srcdir/compute-runtime/level_zero/core/source/module/module_imp.cpp:207
buildFromSpirV at /workspace/srcdir/compute-runtime/level_zero/core/source/module/module_imp.cpp:290
initializeTranslationUnit at /workspace/srcdir/compute-runtime/level_zero/core/source/module/module_imp.cpp:734
initialize at /workspace/srcdir/compute-runtime/level_zero/core/source/module/module_imp.cpp:536
create at /workspace/srcdir/compute-runtime/level_zero/core/source/module/module_imp.cpp:1229
createModule at /workspace/srcdir/compute-runtime/level_zero/core/source/device/device_imp.cpp:481
createModule at /workspace/srcdir/compute-runtime/level_zero/core/source/context/context_imp.cpp:935
zeModuleCreate at /workspace/srcdir/compute-runtime/

Hi @maleadt for which platform was this issue reported?

64-bit Linux with an Intel TigerLake-LP GT2 from a NUC11PAHi7 (i7-1165G7).