Just for contrast its interesting to look at an example of writing a similar kernel in Julia: https://juliagpu.gitlab.io/CUDA.jl/tutorials/introduction/ I don't think it's possible to achieve something like this in python because of how it's interpreted (but it sounds a bit like what another comment mentioned where the python was compiled to C)
"First-class" is a steep claim. Does it support the nvidia perf tools? Those are very important for taking a kernel from (in my experience) ~20% theoretical perf to ~90% theoretical perf.