Skip to content

Commit

Permalink
SYCL: Default disable SIGSEGV handling on Intel GPUs
Browse files Browse the repository at this point in the history
SIGSEGV handling currently interferes with the managed memory
implementation on Intel's discrete GPUs. In theory, we could only
disable sigsegv handling for specific Intel GPU architectures (e.g.
using the experimental oneAPI SYCL Device Architecture extension
(https://github.com/intel/llvm/blob/48be219e238ca2354a1e9e9989752aa7a60b5627/sycl/doc/extensions/experimental/sycl_ext_oneapi_device_architecture.asciidoc)
but this would need to be updated every time Intel releases a new GPU
architecture which still uses SIGSEGV for managed memory. It is simpler
to disable it by default on all Intel GPUs.

This fixes #3416.
  • Loading branch information
mirenradia committed Jul 12, 2023
1 parent 75435eb commit 0bbd3b8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Src/Base/AMReX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -494,11 +494,10 @@ amrex::Initialize (int& argc, char**& argv, bool build_parm_parse,
pp.queryAdd("abort_on_unused_inputs", system::abort_on_unused_inputs);

#ifdef AMREX_USE_SYCL
// Disable SIGSEGV handling by default for certain Intel GPUs,
// because it is currently used by their managed memory
// implementation.
if (Gpu::Device::deviceName().find("[0x0bd6]") != std::string::npos || // PVC
Gpu::Device::deviceName().find("[0x020f]") != std::string::npos) { // ATS
// Disable SIGSEGV handling by default for Intel GPUs, because it is
// currently used by their managed memory implementation with discrete
// GPUs
if (Gpu::Device::deviceVendor().find("Intel") != std::string::npos) {
system::handle_sigsegv = 0;
}
#endif
Expand Down

0 comments on commit 0bbd3b8

Please sign in to comment.