How to apply Cuda.jl on DataFrames in julia

272 views Asked by At

I am using dataframes.jl package in the below mentioned code to perform certain operations.

  1. I would like to know, how may I apply CUDA.jl on this code, if possible while keeping the dataframe aspect?
  2. Secondly, is it possible to allow the code to automatically choose between CPU and GPU based on the availability?

Code

using DataFrame
df = DataFrame(i = Int64[], a = Float64[], b =Float64[])

for i in 1:10
    push!(df.i, i)

    a = i + sin(i)*cos(i)/sec(i)^100
    push!(df.a, a)

    b = i + tan(i)*cosec(i)/sin(i)
    push!(df.b, b)
end
transform!(df, [:a, :b] .=> (x -> [missing; diff(x)]) .=> [:da, :db])

Please suggest a solution to make this code compatible with CUDA.jl.

Thanks in advance!!

0

There are 0 answers