# Error when running Code on GPU

**URL:** <https://discourse.julialang.org/t/error-when-running-code-on-gpu/128711>\
**Category:** Machine Learning\
**Created:** [May 5, 2025, 8:47am UTC](https://discourse.julialang.org/t/error-when-running-code-on-gpu/128711 "2025-05-05T08:47:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Efstein](https://avatars.discourse-cdn.com/v4/letter/e/c67d28/32.png) [@Efstein](https://discourse.julialang.org/u/Efstein)\
**Post date:** [May 5, 2025, 8:47am UTC](https://discourse.julialang.org/t/error-when-running-code-on-gpu/128711/1 "2025-05-05T08:47:17Z")

</div>

Hi everybody!

I am still quite new to Julia, so I hope I’m not missing something obvious. My goal is to solve a system of chemical equations with NeuralPDE. This runs fine, although very slow, on the CPU, but when I try to run it on the GPU to speed up the training, I am running into problems. The working example of my code is in this file:  
[solution\_Lux\_working\_example.jl](https://discourse.julialang.org/uploads/short-url/8LJWpCeKYpmcyeUodA4rNtBYkQ8.jl) (8.4 KB)  
the error I get is in this file:  
[Error.jl](https://discourse.julialang.org/uploads/short-url/kFeozfvT3bjUvh5elvdV36SGFnE.jl) (70.2 KB)  
(it’s not the complete stacktrace, I had to shorten it a little bit, otherwise I couldn’t upload it…)

Can somebody explain to me what that means?  
Thanks in advance!
