How to allowscalar(false) in Pluto envrionment?

I’m writing a package and using it in a pluto notebook, even though I write allowscalar(false) in my package and in my pluto notebook, it seems not effecting.
It still shows

┌ Warning: Performing scalar operations on GPU arrays: This is very slow, consider disallowing these operations with `allowscalar(false)`
└ @ GPUArrays C:\Users\zhang\.julia\packages\GPUArrays\Z5nPF\src\host\indexing.jl:64

Which makes me don’t know where I used scaler indexing.

Can this warning show where scaler indexing happen? Or how can I do allowscalar(false) properly in pluto notebook?

In order to be able to do GPU computing in Pluto, you have to switch off that notebooks are started as separate Julia processes:

But I am not sure if this is still required.


should then be in the same cell as using CUDA (or whatever GPU library you are using).

Maybe I’m out of touch, but Pluto and gpu computing seem like tools for opposite goals?

I’m running pluto with workspace_use_distributed=false and put the allowscalar(false) in the same cell as using CUDA, but it doesn’t affect cell further.

If your computing is less then a few minutes with GPU, and you’re exploring some experimental thing, why not? You can display your computing result interactively and showing graphs, quite handy.

I just figured it out myself:
There is a ENV variable for that, just put it in startup.jl