EnzymeAD / EnzymeAD/Enzyme-JAX

Support for `sinpi` in kernels

Open
#2,541 4 comments 1 reaction 2 assignees Claimed by @wsmoses View on GitHub
Dominant language
MLIR
Stars
131
Forks
53
Avg merge
1d 10h
Merged PRs (30d)
193

Description

```julia
using Reactant
using CUDA
using KernelAbstractions

const KA = KernelAbstractions

@kernel function sinpi_kernel!(y, x)
i = @index(Global, Linear)
@inbounds y[i] = sinpi(x[i])
end

function loss(x)
y = similar(x)
backend = KA.get_backend(y)
kernel! = sinpi_kernel!(backend)
kernel!(y, x; ndrange = length(x))
KA.synchronize(backend)
return y
end

x = Reactant.to_rarray(Array([1.0, 2.0]))
closs = Reactant.@compile loss(x)
```
```
JIT session error: Symbols not found: [ ___nv_sinpi ]
lookupError Failed to materialize symbols: { (enzymejitdl_0, { _entry }) }
```
on compile

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.