Files
llvm-project/offload/test/offloading/ctor_dtor_lazy.cpp
fineg74 2890f9883c [OFFLOAD] Improve handling of synchronization errors in L0 plugin and reenable tests (#186927)
This change improves handling of errors during synchronization in Level
Zero plugin by ensuring cleanup of queues and events in case of an
synchronization error. As a result multiple tests stopped hanging.

---------

Co-authored-by: Duran, Alex <alejandro.duran@intel.com>
2026-03-18 05:50:06 +01:00

35 lines
676 B
C++

// RUN: %libomptarget-compilexx-generic
// RUN: %libomptarget-run-generic
// RUN: %libomptarget-compilexx-generic -DCTOR_KERNEL
// RUN: %not --crash %libomptarget-run-generic
// RUN: %libomptarget-compilexx-generic -DCTOR_API
// RUN: %not --crash %libomptarget-run-generic
// XFAIL: intelgpu
#include <cstdio>
#include <omp.h>
void foo_dev() { __builtin_trap(); }
#pragma omp declare variant(foo_dev) match(device = {kind(nohost)})
void foo() {}
struct S {
S() { foo(); }
};
S s;
#pragma omp declare target(s)
int main() {
int Dev = omp_get_default_device();
#ifdef CTOR_KERNEL
#pragma omp target
{}
#endif
#ifdef CTOR_API
omp_get_mapped_ptr(&s, Dev);
#endif
}