intel / intel-xpu-backend-for-triton

OpenAI Triton backend for Intel® GPUs
MIT License
144 stars 44 forks source link

Revert "Revert "Add back barrier after asserts (#5043)"" #2657

Closed anmyachev closed 2 weeks ago

anmyachev commented 2 weeks ago

Closes #2644

The error (more details: https://github.com/intel/intel-xpu-backend-for-triton/issues/2644#issuecomment-2464373902) seems to be that the operation is incorrectly inserted into the block. My best guess is that we need to explicitly insert a barrier at the beginning of the thenBlock. However I don't know the exact reason why this code works for nvidia (maybe because of the different number of instructions that initially replace "gpu.barrier"() : () -> () however I'm not sure).

python: /home/runner/work/triton/triton/llvm-project/llvm/include/llvm/ADT/ilist_iterator.h:168: llvm::ilist_iterator::reference llvm::ilist_iterator<llvm::ilist_detail::node_options<mlir::Operation, true, false, void, false, void>, false, false>::operator*() const [OptionsT = llvm::ilist_detail::node_options<mlir::Operation, true, false, void, false, void>, IsReverse = false, IsConst = false]: Assertion `!NodePtr->isKnownSentinel()' failed.
Aborted (core dumped)
anmyachev commented 2 weeks ago

@victor-eds thanks for review!