# Flux, CUDA, Zygote : InvalidIRError: compiling kernel getindex\_kernel(CUDA.CuKernelContext, CuDeviceArray

**URL:** <https://discourse.julialang.org/t/flux-cuda-zygote-invalidirerror-compiling-kernel-getindex-kernel-cuda-cukernelcontext-cudevicearray/52557>\
**Category:** New to Julia\
**Tags:** cuda, flux, zygote\
**Created:** [December 29, 2020, 6:13am UTC](https://discourse.julialang.org/t/flux-cuda-zygote-invalidirerror-compiling-kernel-getindex-kernel-cuda-cukernelcontext-cudevicearray/52557 "2020-12-29T06:13:59Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![kadir-gunel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kadir-gunel/32/35790_2.png) [@kadir-gunel](https://discourse.julialang.org/u/kadir-gunel)\
**Post date:** [December 30, 2020, 7:58am UTC](https://discourse.julialang.org/t/flux-cuda-zygote-invalidirerror-compiling-kernel-getindex-kernel-cuda-cukernelcontext-cudevicearray/52557/5 "2020-12-30T07:58:18Z")

</div>

> I think it doesn’t work with FFT : [ForwardDiff and Zygote cannot automatically differentiate (AD) function from C^n to R that uses FFT](https://discourse.julialang.org/t/forwarddiff-and-zygote-cannot-automatically-differentiate-ad-function-from-c-n-to-r-that-uses-fft/52440)

Thank you for the post. Since I am new to Zygote and other related packages I really don’t know what should I try first? For my case, do I need to define gradient rules manually ? If so, this will be out of my knowledge and I crash into a serious issue.

B.R.

---

_[View the full topic](https://discourse.julialang.org/t/flux-cuda-zygote-invalidirerror-compiling-kernel-getindex-kernel-cuda-cukernelcontext-cudevicearray/52557)._
