EnzymeAD / EnzymeAD/Enzyme-JAX
LowerExtend with `lhs > size(x, dim)`
- Dominant language
- MLIR
- Stars
- 131
- Forks
- 53
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 193
Description
```
%8 = "enzymexla.extend"(%6) <{dimension = 0 : i64, lhs = 2 : i64, rhs = 1 : i64}> : (tensor<1x64x1xf32>) -> tensor<4x64x1xf32>
```
```julia
using NeuralOperators, Reactant, Lux, Random, Test
const xdev = reactant_device(; force=true)
model = GridEmbedding([(0.0f0, 1.0f0) for _ in 1:2])
ps, st = Lux.setup(Random.default_rng(), model) |> xdev;
x = rand(Float32, 5, 5, 3, 4) |> xdev
@code_hlo optimize = false model(x, ps, st)
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by running the Julia reproduction with NeuralOperators, Reactant, Lux, Random, and Test, then inspect the generated HLO for the enzymexla.extend operation. Compare the lhs value with size(x, dim); done means the lowering handles lhs greater than the input dimension without producing an invalid extension.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100