# Using Polynomials.jl with CUDA.jl

**URL:** <https://discourse.julialang.org/t/using-polynomials-jl-with-cuda-jl/80580>\
**Category:** GPU\
**Tags:** question\
**Created:** [May 6, 2022, 12:58am UTC](https://discourse.julialang.org/t/using-polynomials-jl-with-cuda-jl/80580 "2022-05-06T00:58:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![GHRALIMA](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ghralima/32/19244_2.png) [@GHRALIMA](https://discourse.julialang.org/u/GHRALIMA)\
**Post date:** [May 6, 2022, 12:58am UTC](https://discourse.julialang.org/t/using-polynomials-jl-with-cuda-jl/80580/1 "2022-05-06T00:58:10Z")

</div>

I’m on my very first trial with CUDA.jl, and I’m trying to use it together with Polynomials.jl to calculate the roots of thousands of polynomials with my NVidia GPU. However, when I try to create a polynomial using CuArrays (or CuVector) the REPL freezes:

```julia
using CUDA, Polynomials
a = CuVector([1.0f0, 1.0f0, 1.0f0])
Polynomial(a)

```

Is there any simple way to solve this?

---

<div class="post-metadata">

**Author:** ![j\_verzani](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/j_verzani/32/8551_2.png) [@j\_verzani](https://discourse.julialang.org/u/j_verzani)\
**Post date:** [May 6, 2022, 1:36am UTC](https://discourse.julialang.org/t/using-polynomials-jl-with-cuda-jl/80580/2 "2022-05-06T01:36:43Z")

</div>

Open an issue. This should be possible.

---

<div class="post-metadata">

**Author:** ![GHRALIMA](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ghralima/32/19244_2.png) [@GHRALIMA](https://discourse.julialang.org/u/GHRALIMA)\
**Post date:** [May 6, 2022, 5:08pm UTC](https://discourse.julialang.org/t/using-polynomials-jl-with-cuda-jl/80580/3 "2022-05-06T17:08:12Z")

</div>

Thanks! I opened an issue at CUDA.jl github page.

---

<div class="post-metadata">

**Author:** ![maleadt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maleadt/32/10097_2.png) [@maleadt](https://discourse.julialang.org/u/maleadt)\
**Post date:** [May 7, 2022, 10:15am UTC](https://discourse.julialang.org/t/using-polynomials-jl-with-cuda-jl/80580/4 "2022-05-07T10:15:03Z")

</div>

Doesn’t hang here. Polynomials is GPU ‘incompatible’ though, it performs scalar indexing, so it won’t just work out of the box.
