Open sirus20x6 opened 1 year ago
Same issue with ROCm 5.4.3 on RX 6800 Here's a backtrace:
(gdb) bt
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1 0x00007fffebca0953 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2 0x00007fffebc51ea8 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3 0x00007fffebc3b53d in __GI_abort () at abort.c:79
#4 0x00007fffebc3b45c in __assert_fail_base (fmt=0x7fffebdb4d68 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
assertion=assertion@entry=0x7ffec32a1c50 "UseMI->isPHI() && \"Uses should be PHI in Endif block\"",
file=file@entry=0x7ffec329f690 "/build/rocm-llvm/src/llvm-project-rocm-5.4.3/llvm/lib/Target/AMDGPU/SIOptimizeVGPRLiveRange.cpp", line=line@entry=525,
function=function@entry=0x7ffec32a1b78 "void {anonymous}::SIOptimizeVGPRLiveRange::optimizeLiveRange(llvm::Register, llvm::MachineBasicBlock*, llvm::MachineBasicBlock*, llvm::MachineBasicBlock*, llvm::SmallSetVector<llvm::MachineBasicBlock*"...) at assert.c:92
#5 0x00007fffebc4a9f6 in __assert_fail (assertion=0x7ffec32a1c50 "UseMI->isPHI() && \"Uses should be PHI in Endif block\"",
file=0x7ffec329f690 "/build/rocm-llvm/src/llvm-project-rocm-5.4.3/llvm/lib/Target/AMDGPU/SIOptimizeVGPRLiveRange.cpp", line=525,
function=0x7ffec32a1b78 "void {anonymous}::SIOptimizeVGPRLiveRange::optimizeLiveRange(llvm::Register, llvm::MachineBasicBlock*, llvm::MachineBasicBlock*, llvm::MachineBasicBlock*, llvm::SmallSetVector<llvm::MachineBasicBlock*"...) at assert.c:101
#6 0x00007ffebd5def5b in (anonymous namespace)::SIOptimizeVGPRLiveRange::runOnMachineFunction(llvm::MachineFunction&) [clone .part.0] () from /opt/rocm/lib/libamd_comgr.so.2
#7 0x00007ffebe9f0ee4 in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) [clone .part.0] () from /opt/rocm/lib/libamd_comgr.so.2
#8 0x00007ffec24bcfd0 in llvm::FPPassManager::runOnFunction(llvm::Function&) [clone .localalias] () from /opt/rocm/lib/libamd_comgr.so.2
#9 0x00007ffec1d01f3c in (anonymous namespace)::CGPassManager::runOnModule(llvm::Module&) () from /opt/rocm/lib/libamd_comgr.so.2
#10 0x00007ffec24bda8f in llvm::legacy::PassManagerImpl::run(llvm::Module&) [clone .localalias] () from /opt/rocm/lib/libamd_comgr.so.2
#11 0x00007ffebe395216 in clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) () from /opt/rocm/lib/libamd_comgr.so.2
#12 0x00007ffebe32f884 in clang::CodeGenAction::ExecuteAction() [clone .localalias] () from /opt/rocm/lib/libamd_comgr.so.2
#13 0x00007ffebffae5b1 in clang::FrontendAction::Execute() () from /opt/rocm/lib/libamd_comgr.so.2
#14 0x00007ffebff34b91 in clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) [clone .localalias] () from /opt/rocm/lib/libamd_comgr.so.2
#15 0x00007ffebdde4d44 in clang::ExecuteCompilerInvocation(clang::CompilerInstance*) () from /opt/rocm/lib/libamd_comgr.so.2
#16 0x00007ffebd18e3c7 in COMGR::AMDGPUCompiler::executeInProcessDriver (this=this@entry=0x7ffdfb5aeb50, Args=...) at /usr/src/debug/comgr/ROCm-CompilerSupport-rocm-5.4.3/lib/comgr/src/comgr-compiler.cpp:705
#17 0x00007ffebd190cb0 in COMGR::AMDGPUCompiler::processFile (OutputFilePath=<optimized out>, InputFilePath=0x7ffdfb5ae248 "/tmp/comgr-03851b/input/linked.bc", this=0x7ffdfb5aeb50)
at /opt/rocm/llvm/include/llvm/ADT/SmallVector.h:70
#18 COMGR::AMDGPUCompiler::processFiles (this=0x7ffdfb5aeb50, OutputKind=AMD_COMGR_DATA_KIND_RELOCATABLE, OutputSuffix=0x7ffec464b90e ".o")
at /usr/src/debug/comgr/ROCm-CompilerSupport-rocm-5.4.3/lib/comgr/src/comgr-compiler.cpp:925
#19 0x00007ffebd19bd40 in COMGR::AMDGPUCompiler::assembleToRelocatable (this=<optimized out>) at /usr/src/debug/comgr/ROCm-CompilerSupport-rocm-5.4.3/lib/comgr/src/comgr-compiler.cpp:1239
#20 COMGR::AMDGPUCompiler::assembleToRelocatable (this=<optimized out>) at /usr/src/debug/comgr/ROCm-CompilerSupport-rocm-5.4.3/lib/comgr/src/comgr-compiler.cpp:1222
#21 dispatchCompilerAction (LogS=..., ResultSet=0x7ffd2eeefec0, InputSet=0x7ffcbb45fe20, ActionInfo=0x7ffcfe00ffb0, ActionKind=AMD_COMGR_ACTION_CODEGEN_BC_TO_RELOCATABLE)
at /usr/src/debug/comgr/ROCm-CompilerSupport-rocm-5.4.3/lib/comgr/src/comgr.cpp:166
#22 amd_comgr_do_action (ActionKind=AMD_COMGR_ACTION_CODEGEN_BC_TO_RELOCATABLE, ActionInfo=..., InputSet=..., ResultSet=...) at /usr/src/debug/comgr/ROCm-CompilerSupport-rocm-5.4.3/lib/comgr/src/comgr.cpp:1324
#23 0x00007fffc7767c8d in amd::Comgr::do_action (result=..., input=..., info=..., kind=AMD_COMGR_ACTION_CODEGEN_BC_TO_RELOCATABLE)
at /usr/src/debug/rocm-opencl-runtime/ROCclr-rocm-5.4.3/device/comgrctx.hpp:250
#24 device::Program::compileAndLinkExecutable (executableSize=0x7ffdfb5b8db0, executable=0x7ffdfb5b8db8, amdOptions=0x7ffdfb5b9460, options=std::vector of length 15, capacity 24 = {...}, inputs=...,
this=0x7ffd3d3aef80) at /usr/src/debug/rocm-opencl-runtime/ROCclr-rocm-5.4.3/device/devprogram.cpp:575
#25 device::Program::linkImplLC (this=0x7ffd3d3aef80, options=0x7ffdfb5b9460) at /usr/src/debug/rocm-opencl-runtime/ROCclr-rocm-5.4.3/device/devprogram.cpp:1292
#26 0x00007fffc77920ab in device::Program::linkImpl (options=0x7ffdfb5b9460, this=0x7ffd3d3aef80) at /usr/src/debug/rocm-opencl-runtime/ROCclr-rocm-5.4.3/device/devprogram.cpp:1112
#27 device::Program::build (preCompiledHeaders=std::vector of length 0, capacity 0, options=0x7ffdfb5b9460,
origOptions=0x7ffd37793f20 " -w -cl-mad-enable -cl-fast-relaxed-math -Dz323df50901b485739bf3a3b9a84c73b0 -Dz6e436e44fad709e7c0aa0046bd091019 -Dz0e5796447bfd2d547303f3e691aa58b0 -Dzc229ce7b384e9cbe83e58608fba7c36d -Dze22d443f6c60"...,
sourceCode="\n#ifndef ze7090268035ff6a9cba4976db5cf25d6\n#define ze7090268035ff6a9cba4976db5cf25d6\n\n#pragma OPENCL EXTENSION cl_khr_global_int32_base_atomics : enable\n#pragma OPENCL EXTENSION cl_khr_local_int32_bas"..., this=0x7ffd3d3aef80) at /usr/src/debug/rocm-opencl-runtime/ROCclr-rocm-5.4.3/device/devprogram.cpp:1827
#28 amd::Program::build(std::vector<amd::Device*, std::allocator<amd::Device*> > const&, char const*, void (*)(_cl_program*, void*), void*, bool, bool) [clone .constprop.0] (this=0x7ffd3d3af280,
devices=std::vector of length 1, capacity 1 = {...},
options=options@entry=0x7ffd37793f20 " -w -cl-mad-enable -cl-fast-relaxed-math -Dz323df50901b485739bf3a3b9a84c73b0 -Dz6e436e44fad709e7c0aa0046bd091019 -Dz0e5796447bfd2d547303f3e691aa58b0 -Dzc229ce7b384e9cbe83e58608fba7c36d -Dze22d443f6c60"..., notifyFptr=notifyFptr@entry=0x0, data=data@entry=0x0, optionChangable=optionChangable@entry=true, newDevProg=<optimized out>)
at /usr/src/debug/rocm-opencl-runtime/ROCclr-rocm-5.4.3/platform/program.cpp:574
#29 0x00007fffc7703701 in clBuildProgram (program=0x7ffd3d3af290, num_devices=<optimized out>, device_list=<optimized out>,
options=0x7ffd37793f20 " -w -cl-mad-enable -cl-fast-relaxed-math -Dz323df50901b485739bf3a3b9a84c73b0 -Dz6e436e44fad709e7c0aa0046bd091019 -Dz0e5796447bfd2d547303f3e691aa58b0 -Dzc229ce7b384e9cbe83e58608fba7c36d -Dze22d443f6c60"..., pfn_notify=0x0, user_data=0x0) at /usr/src/debug/rocm-opencl-runtime/ROCm-OpenCL-Runtime-rocm-5.4.3/amdocl/cl_program.cpp:519
#30 0x0000000007a2dca8 in ?? ()
#31 0x0000000007a2d478 in ?? ()
#32 0x0000000007a2de81 in ?? ()
#33 0x00007fffebc9ebb5 in start_thread (arg=<optimized out>) at pthread_create.c:444
#34 0x00007fffebd20d90 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
Have you reported this issue to blackmagicdesign? To start fixing, the preproceeed OpenCL C program source is the minimum needed. Do you get anything if you set environment AMD_OCL_BUILD_OPTIONS_APPEND=-save-temps;C:\path\to\temps\prefix ?
With -save-temps
or -save-temps-all
Resolve does not load, saying "No Supporting GPUs found".
I don't think this is a BMD/Resolve issue because the program works normally on other OpenCL implementations (like on macOS with AMD graphics), so I reported it here instead.
Edit: Actually it's simply having AMD_OCL_BUILD_OPTIONS_APPEND
set that breaks GPU detection, even if it's set blank. Maybe I need to rebuild in debug mode.
I'm not sure if this is just a davinci resolve bug or if this a rocm-llvm bug but whenever I mouse over just about anything in the effects tab davinci resolve studio crashes. I have a radeon 5700xt and a threadripper 2950x.
I'm on manjaro linux