Hi,

Is your cpp program working when it’s not compiled with ASAN?
Are you sure someone else is not using the GPU and already allocates almost all the memory there? The cuda runtime for pytorch will need a few hundreds of MB to initialize on the first cuda call.
I’m not sure pytorch can work with ASAN cc @ezyang ?