Files
Nick Sarnie 26b777444b [offload][lit] XFAIL all failing tests on the Level Zero plugin (#174804)
We finally got our buildbot added (to staging, at least) so we want to
start running L0 tests in CI.
We need `check-offload` to pass though, so XFAIL everything failing.
There's a couple `UNSUPPORTED` as well, those are for sporadic fails.

Also make set the `gpu` and `intelgpu` LIT variables when testing the
`spirv64-intel` triple.

We have no DeviceRTL yet so basically everything fails, but we manage to
get

```
Total Discovered Tests: 432
Unsupported      : 169 (39.12%)
Passed           :  67 (15.51%)
Expectedly Failed: 196 (45.37%)
```

We still don't build the level zero plugin by default and these tests
don't run unless the plugin was built, so this has no effect on most
builds.

---------

Signed-off-by: Nick Sarnie <nick.sarnie@intel.com>
2026-01-07 19:20:30 +00:00

50 lines
1.2 KiB
C

// RUN: %libomptarget-compile-run-and-check-generic
// XFAIL: !intelgpu
#include <assert.h>
#include <omp.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
typedef void *cudaStream_t;
int main() {
int device_id = omp_get_default_device();
#pragma omp parallel master
{
double D0, D2;
omp_interop_t interop;
#pragma omp interop init(targetsync : interop) device(device_id) nowait
assert(interop != NULL);
int err;
for (int i = omp_ipr_first; i < 0; i++) {
const char *n =
omp_get_interop_name(interop, (omp_interop_property_t)(i));
long int li =
omp_get_interop_int(interop, (omp_interop_property_t)(i), &err);
const void *p =
omp_get_interop_ptr(interop, (omp_interop_property_t)(i), &err);
const char *s =
omp_get_interop_str(interop, (omp_interop_property_t)(i), &err);
const char *n1 =
omp_get_interop_type_desc(interop, (omp_interop_property_t)(i));
}
#pragma omp interop use(interop) depend(in : D0, D2)
cudaStream_t stream =
(omp_get_interop_ptr(interop, omp_ipr_targetsync, NULL));
assert(stream != NULL);
#pragma omp interop destroy(interop) depend(in : D0, D2) device(device_id)
}
printf("PASS\n");
}
// CHECK: PASS