EnzymeAD / EnzymeAD/Enzyme-JAX

failure to raise - terminator with potential side effects

Open
#1,254 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
MLIR
Stars
131
Forks
53
Avg merge
1d 10h
Merged PRs (30d)
193

Description

Repro: given https://github.com/wsmoses/Enzyme-GPU-Tests/blob/1e999f921f042568b2290b5207b06749ac4b069f/LBM/lbm.cu, call

```
clang++ -mllvm -max-heap-to-stack-size=1000000 -I /usr/local/cuda-12.9/include -I . -ffast-math --cuda-path=/usr/local/cuda-12.9 -L/usr/local/cuda-12.9/lib64 --cuda-gpu-arch=sm_90 -std=c++11 -Xclang -load -Xclang /path/to/ClangEnzyme-22.so -mllvm -raising-plugin-path -mllvm /path/to/libRaise.so -mllvm -reactant-backend -mllvm cuda -DALLOCATOR -DSIZE=8 -O3 -DALLOW_AD=1 -x cuda -c lbm.cu
```

error message:

```
'llvm.invoke' op transformation does not support terminators with side effects
```

This presumably comes from upstream https://github.com/llvm/llvm-project/blob/b757bc8b13b1088e2f2b1b98aa33ebb16334b59d/mlir/lib/Transforms/Utils/CFGToSCF.cpp#L1247-L1251 and may be just a missing interface impl.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the CUDA reproducer in LBM/lbm.cu and the upstream CFGToSCF.cpp code around lines 1247-1251. Trace how the 'llvm.invoke' transformation handles terminators with side effects and determine whether the reported interface is missing. Done means the provided command no longer emits this transformation error, with the behavior covered or clarified.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.