Questions tagged [julia-gpu]

Questions pertaining to using julia-lang to interface with graphics processing units (GPUs)

24 questions
1
vote
0 answers

Getting error while using flux with GPU in Julia

%%julia # Load the data println("start") x_train, y_train,x_valid, y_valid=h5open("./data.h5", "r") do file read(file, "tr_X","tr_Y","va_X","va_Y") end|> gpu println("read done") x_train = reshape(x_train, (80,80,3,:))|> gpu x_valid =…
Rijo Thomas
  • 113
  • 1
  • 1
  • 7
1
vote
2 answers

Compare 2 dataframe cell by cell using Julia

Using Julia, is there a way to compare 2 DataFrames cell by cell and output difference E.g.: expected result would produce dataframe with True/False Thanks in advance for help
1
vote
1 answer

FastChain vs GPUs in DiffEqFlux

For GPU training of model, I am using dudt = Chain(Dense(3,100,tanh), Dense(100,3)) |> gpu versus CPU training dudt = FastChain( FastDense(3,100,tanh), FastDense(100,3)) Over 1000 iterations, Fastchain is orders…
1
vote
1 answer

BoundsError: attempt to access 2n-element UnitRange{Int32} at index [2n+1]

I’m recently using Knet and working on a CNN. I have a dataset-input of 20000 x 1 x 1 x 200000 which I use for training As soon as i start training with progress!(sgd(dtrn,ncycle(n))), I get following the error: BoundsError: attempt to access…
hellothere
  • 47
  • 3
1
vote
1 answer

Julia MethodError: no method matching (::Dense{typeof(logistic),CuArray{Float32,2,Nothing},CuArray{Float32,1,Nothing}})(::Float32)

I have the following training data in CuArrays. X: 300×8544 CuArray{Float32,2,Nothing} y: 5×8544 Flux.OneHotMatrix{CuArray{Flux.OneHotVector,1,Nothing}} and I have the following model I want to train: # define activation logistic(x) = 1. / (1 .+…
D.Danier
  • 21
  • 2
1
vote
0 answers

ArrayFire.jl performance slowly degrades over time

So I'm trying to use ArrayFire in Julia, and I find that the performance bizarrely degrades over time: using ArrayFire srand(1) function f() r = AFArray(zeros(Float32, 100, 100000)) a = AFArray(rand(Float32, 100, 100000)) for d in…
Set
  • 934
  • 6
  • 25
1
vote
1 answer

How to tell if Suitesparse/CHOLMOD is using GPU?

I built Julia, which incorporates SuiteSparse, from scratch. When building the SuiteSparse dependency I ensured the instructions were followed for setting the relevant parts of the SuiteSparse_config.mk file. However, having completed the build the…
conjectures
  • 801
  • 2
  • 7
  • 24
0
votes
2 answers

How to tune the hyperparameters of a Bayesian ODE fit in Julia?

I have been trying to replicate https://diffeqflux.sciml.ai/dev/examples/BayesianNODE_NUTS/, using different ODE equation, but I have received this result without uncertainty quantification, is it because I did the initial value u0 is higher…
Minou92
  • 137
  • 7
0
votes
1 answer

How do I access an element in a CuArray of Julia and change its value?

I want to change only one element, as shown in the code below. using Flux, CuArrays a = rand(3,3) |> gpu CuArrays.allowscalar(false) a[1, 1] = 1.0f0 Because allowscalar is set to false, it is natural that it will appear as below. ERROR: scalar…
Null
  • 3
  • 1
1
2