[UR] Don't allow the loader to catch exceptions
Call std::abort if an exception is thrown to the loader. Since UR is a C interface, no exceptions should be thrown between different UR layers.
Layers (validation, tracing, sanitizer etc) are compiled into the loader. So while it's true that the DDI interface between the adapters and the loader is C, there's potentially other code that can throw where must catch exceptions before returning.
Is there anything the existing implementation breaks?
Also, I believe here is already some code (at least in L0 adapter) that relies on loader catching and translating exceptions to errors.
urGet*ProcAddrTable are indeed defined as 'extern "C"' but the actual function pointers in the ddi tables point to regular C++ functions which should work fine.
Is there anything the existing implementation breaks?
We've more been discussion how to prevent adapters from letting exceptions escape as this has caused issues with the CUDA/HIP adapters letting exceptions escape a C interface, this was one idea how to do that.
Instead of changing the default behaviour as this PR does, I am going to add a UR layer that ensures that no exceptions are being passed from the UR adapter across the lib boundary. This layer will only be enabled when running CTS tests, and can be disabled for level zero if necessary.