mirror-llvm-project/flang-rt/lib/cuda
Zhen Wang 5ca2b9313c
[flang-rt][cuda] Skip scope-exit cleanup when the context has a sticky error (#213184)
A sticky CUDA error (e.g. an illegal memory access in a kernel) leaves
the primary context active but unusable, so CUFDeviceIsActive() reports
it as fine and the compiler-generated scope-exit frees abort a program
that ran to completion: 'cudaFree(p)' failed with
'cudaErrorIllegalAddress'.

Detect this by freeing a null pointer, a no-op that still reports the
sticky error. It runs only once the primary context is known active, so
it cannot lazily create one.
2026-07-31 14:38:24 -07:00
..
allocatable.cpp Reland "[flang][cuda] Add support for derived-type initialization on device #172568" (#174107) 2025-12-31 11:26:17 -08:00
allocator.cpp [flang-rt][cuda] Skip scope-exit cleanup when the context has a sticky error (#213184) 2026-07-31 14:38:24 -07:00
CMakeLists.txt [flang][cuda][NFC] Move set/get default stream to its own file (#181927) 2026-02-17 14:43:38 -08:00
descriptor.cpp [Flang-RT] Change alignment for allocatable and pointer arrays to 64 … (#206525) 2026-07-01 10:36:38 -05:00
init.cpp
kernel.cpp [flang][cuda] Add conditional error check after kernel launch (#191270) 2026-04-09 18:44:49 +00:00
memmove-function.cpp Reland "[flang][cuda] Add support for derived-type initialization on device #172568" (#174107) 2025-12-31 11:26:17 -08:00
memory.cpp [flang][cuda] Use wider cudaMemcpy2D rows for descriptor transfers (#197563) 2026-05-13 20:40:43 -07:00
pointer.cpp [flang][cuda] Add missing pointer deallocation entry point (#192566) 2026-04-16 16:49:04 -07:00
registration.cpp [flang][cuda] Use cuf.register_variable_static instead of CUFRegisterExternalVariable (#211886) 2026-07-24 12:57:55 -07:00
stream.cpp [flang][cuda] Add support for cudaStreamDestroy (#183648) 2026-02-27 00:24:29 +00:00