Skip to content

Fix queue casts which cause spirv to die with assert #143

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

Closed
wants to merge 1 commit into from

Conversation

dvrogozh
Copy link
Contributor

Fixes: intel/opencl-clang#46

That's RFC (request for comments) PR since I just followed suggestion from @AlexeySotkin here: intel/opencl-clang#46 (comment)

This fixes ocloc build of scheduler.cl which dies with assert from spirv:
SPIRV-LLVM-Translator/lib/SPIRV/SPIRVWriter.cpp:685
Thrown assert is:
SPIRV::SPIRVInstruction* SPIRV::LLVMToSPIRV::transUnaryInst(llvm::UnaryInstruction*, SPIRV::SPIRVBasicBlock*):
Assertion `Cast->getSrcTy()->getPointerAddressSpace() == SPIRAS_Generic' failed.

Mind that once I passed thru this failure, I see this issue in IGC: intel/intel-graphics-compiler#77. Fix is here: intel/intel-graphics-compiler#78

@dvrogozh
Copy link
Contributor Author

Build fails for clang <=5. @AlexeySotkin: do you have suggestions how to handle/fix that?

@AlexeySotkin
Copy link

Build fails for clang <=5. @AlexeySotkin: do you have suggestions how to handle/fix that?

Should be fixed by #142

@dvrogozh
Copy link
Contributor Author

@AlexeySotkin : thank you for #142. I rebased this one and CI passed.

Folks, could you, please, review/feedback/merge?

Fixes: intel/opencl-clang#46

This fixes ocloc build of scheduler.cl which dies with assert from spirv:
  SPIRV-LLVM-Translator/lib/SPIRV/SPIRVWriter.cpp:685

Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
@MichalMrozek
Copy link
Contributor

Please update date in header.
Please limit commit message to 80 characters.

@MichalMrozek
Copy link
Contributor

Code looks good.

@MichalMrozek
Copy link
Contributor

Please take a look at
https://github.com/intel/compute-runtime/blob/master/documentation/CONTRIB.md

Section 3 covers commit message requirements.

@dvrogozh dvrogozh changed the title [RFC] Fix queue casts which cause spirv to die with assert Fix queue casts which cause spirv to die with assert Mar 15, 2019
VPG-SWE-Github pushed a commit that referenced this pull request Mar 18, 2019
Fixes: intel/opencl-clang#46

This fixes ocloc build of scheduler.cl which dies with assert from spirv:
  SPIRV-LLVM-Translator/lib/SPIRV/SPIRVWriter.cpp:685

Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>

#143

Change-Id: I5c9d4a75321008802b9d77ef4a6bad3812e1b8b4
@dvrogozh
Copy link
Contributor Author

Landed in master as 7a7bb50.

@dvrogozh dvrogozh closed this Mar 18, 2019
@ArturHarasimiuk ArturHarasimiuk added the merged change was merged label Apr 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged change was merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

spirv translator assert failure building opencl-neo targets via ocloc
4 participants