The slide at 14:30 goes against what was said on a previous slide (12:50), using `@btime` alone to time the GPU operation when we said that the GPU is running asynchronously. Should this be `@btime CUDA.@sync`? (I don't do GPU programming so I have no familiarity here)
I don't know how common it is to have a situation where you have a workflow that requires you to fallback to a loop on the GPU but it seems like that should be a hard error by default while allowing a user to opt in to inefficient usage of the GPU if wanted. I think most people would want the feedback that something is sub-optimal. Maybe instead of the error/no error, it could be error/print a warning message?
The important section from the docs says: Scalar indexing is only allowed in an interactive session, e.g. the REPL, because it is convenient when porting CPU code to the GPU. If you want to disallow scalar indexing, e.g. to verify that your application executes correctly on the GPU, call the allowscalar function…