Skip to content

spirv translator assert failure building opencl-neo targets via ocloc #46

Closed
@dvrogozh

Description

@dvrogozh

Assuming that IGC and common_clang were built against LLVM-8 per this instruction: https://github.com/dvrogozh/intel-graphics-compiler/blob/rfc_readme/README.md#building

Then building https://github.com/intel/compute-runtime the following build failure could be observed:

cd /home/neo/compute-runtime/runtime/scheduler && LD_LIBRARY_PATH=/home/neo/compute-runtime/build/bin /home/neo/compute-runtime/build/bin/ocloc -q -file scheduler.cl -device skl -cl-intel-greater-than-4GB-buffer-required -64 -out_dir /home/neo/compute-runtime/build/bin/scheduler/x64/gen9 -cpp_file -options -I/home/install.llvm8.igc/include/igc\ -I/home/install.llvm8.igc/include/igc/cif\ -I/home/install.llvm8.igc/include/igc/ocl_igc_shared/executable_format\ -I/home/install.llvm8.igc/include/igc/ocl_igc_shared/device_enqueue\ -I\ ../gen9\ -cl-kernel-arg-info\ -cl-std=CL2.0

ocloc: /home/SPIRV-LLVM-Translator/lib/SPIRV/SPIRVWriter.cpp:685: SPIRV::SPIRVInstruction* SPIRV::LLVMToSPIRV::transUnaryInst(llvm::UnaryInstruction*, SPIRV::SPIRVBasicBlock*): Assertion `Cast->getSrcTy()->getPointerAddressSpace() == SPIRAS_Generic' failed.

That's an assert coming from here: https://github.com/KhronosGroup/SPIRV-LLVM-Translator/blob/0650ff887b5ef00066e6a0527bab592dafd59c83/lib/SPIRV/SPIRVWriter.cpp#L685

Also, I have tried to apply patches mentioned by common_clang here: https://github.com/intel/opencl-clang/tree/ocl-open-80/patches. These patches did not fix the above issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions