Skip to content

Commit

Permalink
[SYCL][E2E] Fix UR FileCheck conditions to match new traces (intel#15439
Browse files Browse the repository at this point in the history
)

makes llvm work with this change: oneapi-src/unified-runtime#2101
fixes this bug: oneapi-src/unified-runtime#2002
  • Loading branch information
lslusarczyk committed Oct 2, 2024
1 parent ce0dc32 commit 1f9978e
Show file tree
Hide file tree
Showing 65 changed files with 390 additions and 390 deletions.
16 changes: 8 additions & 8 deletions sycl/cmake/modules/FetchUnifiedRuntime.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ if(SYCL_UR_USE_FETCH_CONTENT)
CACHE PATH "Path to external '${name}' adapter source dir" FORCE)
endfunction()

set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git")
# commit 0247d0966ca8c5d1e3245f375e48e6c997bed9af
# Merge: 675dd292 04ffc909
# Author: aarongreig <aaron.greig@codeplay.com>
# Date: Tue Oct 1 17:10:58 2024 +0100
# Merge pull request #2154 from npmiller/fix-graph-exce
# [CUDA][HIP] Fix exceptions throwing from adapter
set(UNIFIED_RUNTIME_TAG 0247d0966ca8c5d1e3245f375e48e6c997bed9af)
set(UNIFIED_RUNTIME_REPO "https://github.com/lslusarczyk/unified-runtime.git")
# commit 9ca3ec7a9c1d2f4a362d7e5add103b30271a8a55
# Merge: 7384e2d7 59e5e405
# Author: Piotr Balcer <piotr.balcer@intel.com>
# Date: Mon Sep 23 10:58:51 2024 +0200
# Merge pull request #2113 from oneapi-src/revert-1698-counter-based-2
# Revert "[L0] Phase 2 of Counter-Based Event Implementation"
set(UNIFIED_RUNTIME_TAG 5e8592bf984660c3d6806cc5c60f96a3e1ef2c4e)

set(UMF_BUILD_EXAMPLES OFF CACHE INTERNAL "EXAMPLES")
# Due to the use of dependentloadflag and no installer for UMF and hwloc we need
Expand Down
4 changes: 2 additions & 2 deletions sycl/test-e2e/Basic/alloc_pinned_host_memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ int main() {
}
}

// CHECK:---> urMemBufferCreate
// CHECK:---> urMemBufferCreate
// CHECK: <--- urMemBufferCreate
// CHECK: <--- urMemBufferCreate
// CHECK-SAME: UR_MEM_FLAG_ALLOC_HOST_POINTER
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ int main() {
Q.submit([&](handler &Cgh) {
// Now that we have a read-write host allocation, check that the native
// buffer is created with the UR_MEM_FLAG_USE_HOST_POINTER flag.
// CHECK: urMemBufferCreate
// CHECK: <--- urMemBufferCreate
// CHECK-SAME: UR_MEM_FLAG_USE_HOST_POINTER
auto BufAcc = Buf.get_access<access::mode::read>(Cgh);
Cgh.single_task<Foo>([=]() { int A = BufAcc[0]; });
Expand Down
4 changes: 2 additions & 2 deletions sycl/test-e2e/Basic/buffer/subbuffer_overlap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ int main() {
for (auto &e : sycl::host_accessor{b})
e = idx++ % size;

// CHECK: urMemBufferPartition
// CHECK: <--- urMemBufferPartition
// CHECK: .origin = 256, .size = 64
q.submit([&](sycl::handler &cgh) {
sycl::accessor acc{sub1, cgh};
cgh.parallel_for(size, [=](auto id) { acc[id] += 1; });
});
// CHECK: urMemBufferPartition
// CHECK: <--- urMemBufferPartition
// CHECK: .origin = 256, .size = 128
q.submit([&](sycl::handler &cgh) {
sycl::accessor acc{sub2, cgh};
Expand Down
8 changes: 4 additions & 4 deletions sycl/test-e2e/Basic/enqueue_barrier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ int main() {
return 0;
}

// CHECK:---> urEnqueueEventsWaitWithBarrier
// CHECK:---> urEnqueueEventsWaitWithBarrier
// CHECK:---> urEnqueueEventsWaitWithBarrier
// CHECK:---> urEnqueueEventsWaitWithBarrier
// CHECK: <--- urEnqueueEventsWaitWithBarrier
// CHECK: <--- urEnqueueEventsWaitWithBarrier
// CHECK: <--- urEnqueueEventsWaitWithBarrier
// CHECK: <--- urEnqueueEventsWaitWithBarrier
4 changes: 2 additions & 2 deletions sycl/test-e2e/Basic/event_release.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ int main() {
// Buffer destruction triggers execution graph cleanup, check that both
// events (one for launching the kernel and one for memory transfer to host)
// are released.
// CHECK: urEventRelease
// CHECK: urEventRelease
// CHECK: <--- urEventRelease
// CHECK: <--- urEventRelease
assert(Val == Gold);
// CHECK: End of main scope
std::cout << "End of main scope" << std::endl;
Expand Down
14 changes: 7 additions & 7 deletions sycl/test-e2e/Basic/fill_accessor_ur.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,19 +129,19 @@ int main() {
}

// CHECK: start testFill_Buffer1D
// CHECK: urEnqueueMemBufferFill
// CHECK: <--- urEnqueueMemBufferFill
// CHECK: start testFill_Buffer1D -- OFFSET
// CHECK: urEnqueueMemBufferFill
// CHECK: <--- urEnqueueMemBufferFill

// CHECK: start testFill_Buffer2D
// CHECK: urEnqueueMemBufferFill
// CHECK: <--- urEnqueueMemBufferFill
// CHECK: start testFill_Buffer2D -- OFFSET
// CHECK: urEnqueueKernelLaunch
// CHECK: <--- urEnqueueKernelLaunch

// CHECK: start testFill_Buffer3D
// CHECK: urEnqueueMemBufferFill
// CHECK: <--- urEnqueueMemBufferFill
// CHECK: start testFill_Buffer3D -- OFFSET
// CHECK: urEnqueueKernelLaunch
// CHECK: <--- urEnqueueKernelLaunch

// CHECK: start testFill_ZeroDim
// CHECK: urEnqueueMemBufferFill
// CHECK: <--- urEnqueueMemBufferFill
10 changes: 5 additions & 5 deletions sycl/test-e2e/Basic/host-task-dependency.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,15 @@ int main() {
}

// launch of Gen kernel
// CHECK:---> urKernelCreate
// CHECK: <--- urKernelCreate
// CHECK: NameGen
// CHECK:---> urEnqueueKernelLaunch
// CHECK: <--- urEnqueueKernelLaunch
// prepare for host task
// CHECK:---> urEnqueueMemBuffer{{Map|Read}}
// CHECK: <--- urEnqueueMemBuffer{{Map|Read}}
// launch of Copier kernel
// CHECK:---> urKernelCreate
// CHECK: <--- urKernelCreate
// CHECK: Copier
// CHECK:---> urEnqueueKernelLaunch
// CHECK: <--- urEnqueueKernelLaunch

// CHECK:Third buffer [ 0] = 0
// CHECK:Third buffer [ 1] = 1
Expand Down
30 changes: 15 additions & 15 deletions sycl/test-e2e/Basic/kernel_bundle/kernel_bundle_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,26 +150,26 @@ int main() {

sycl::kernel_bundle<sycl::bundle_state::object> KernelBundleObject1 =
sycl::compile(KernelBundleInput1, KernelBundleInput1.get_devices());
// CHECK:---> urProgramCreate
// CHECK:<--- urProgramCreate
// CHECK-SAME:, .phProgram = {{.*}} ([[PROGRAM_HANDLE1:[0-9a-fA-Fx]+]])
// CHECK-SAME: -> UR_RESULT_SUCCESS;
//
// CHECK:---> urProgramCompile
// CHECK:<--- urProgramCompile
// CHECK-SAME: .hProgram = [[PROGRAM_HANDLE1]]

sycl::kernel_bundle<sycl::bundle_state::object> KernelBundleObject2 =
sycl::compile(KernelBundleInput2, KernelBundleInput2.get_devices());
// CHECK:---> urProgramCreate
// CHECK:<--- urProgramCreate
// CHECK-SAME:, .phProgram = {{.*}} ([[PROGRAM_HANDLE2:[0-9a-fA-Fx]+]])
// CHECK-SAME: -> UR_RESULT_SUCCESS;
//
// CHECK:---> urProgramCompile(
// CHECK:<--- urProgramCompile(
// CHECK-SAME: .hProgram = [[PROGRAM_HANDLE2]]

sycl::kernel_bundle<sycl::bundle_state::executable> KernelBundleExecutable =
sycl::link({KernelBundleObject1, KernelBundleObject2},
KernelBundleObject1.get_devices());
// CHECK:---> urProgramLink{{.*}} -> UR_RESULT_SUCCESS;
// CHECK:<--- urProgramLink{{.*}} -> UR_RESULT_SUCCESS;
// UR tracing doesn't allow checking for all input programs so far.

assert(KernelBundleExecutable.has_kernel(Kernel1ID));
Expand All @@ -179,14 +179,14 @@ int main() {
KernelBundleExecutable2 =
sycl::build(KernelBundleInput1, KernelBundleInput1.get_devices());

// CHECK:---> urProgramCreate
// CHECK:<--- urProgramCreate
// CHECK-SAME:, .phProgram = {{.*}} ([[PROGRAM_HANDLE3:[0-9a-fA-Fx]+]])
// CHECK-SAME: -> UR_RESULT_SUCCESS;
//
// CHECK:---> urProgramBuild(
// CHECK:<--- urProgramBuild(
// CHECK-SAME: .hProgram = [[PROGRAM_HANDLE3]]
//
// CHECK:---> urProgramRetain(
// CHECK:<--- urProgramRetain(
// CHECK-SAME: .hProgram = [[PROGRAM_HANDLE3]]
// CHECK-SAME:-> UR_RESULT_SUCCESS;

Expand All @@ -204,31 +204,31 @@ int main() {
sycl::kernel_bundle KernelBundleExecutable =
sycl::get_kernel_bundle<sycl::bundle_state::executable>(Ctx, {Dev},
{Kernel3ID});
// CHECK:---> urProgramCreate
// CHECK:<--- urProgramCreate
// CHECK-SAME:, .phProgram = {{.*}} ([[PROGRAM_HANDLE4:[0-9a-fA-Fx]+]])
// CHECK-SAME: -> UR_RESULT_SUCCESS;
//
// CHECK:---> urProgramBuild(
// CHECK:<--- urProgramBuild(
// CHECK-SAME: .hProgram = [[PROGRAM_HANDLE4]]
//
// CHECK:---> urProgramRetain(
// CHECK:<--- urProgramRetain(
// CHECK-SAME: .hProgram = [[PROGRAM_HANDLE4]]
// CHECK-SAME:-> UR_RESULT_SUCCESS;
//
// CHECK:---> urKernelCreate(
// CHECK:<--- urKernelCreate(
// CHECK-SAME: .hProgram = [[PROGRAM_HANDLE4]]
// CHECK-SAME: .pKernelName = {{[0-9a-fA-Fx]+}} (_ZTS11Kernel3Name)
// CHECK-SAME: .phKernel = {{[0-9a-fA-Fx]+}} ([[KERNEL_HANDLE:[0-9a-fA-Fx]+]])
// CHECK-SAME: -> UR_RESULT_SUCCESS;
//
// CHECK:---> urKernelRetain(
// CHECK:<--- urKernelRetain(
// CHECK-SAME: .hKernel = [[KERNEL_HANDLE]]
// CHECK-SAME:-> UR_RESULT_SUCCESS;
//
// CHECK:---> urEnqueueKernelLaunch(
// CHECK:<--- urEnqueueKernelLaunch(
// CHECK-SAME: .hKernel = [[KERNEL_HANDLE]]
//
// CHECK:---> urKernelRelease(
// CHECK:<--- urKernelRelease(
// CHECK-SAME: .hKernel = [[KERNEL_HANDLE]]
// CHECK-SAME:-> UR_RESULT_SUCCESS;

Expand Down
14 changes: 7 additions & 7 deletions sycl/test-e2e/Basic/queue/release.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ int main() {
return 0;
}

// CHECK: ---> urEnqueueKernelLaunch(
// CHECK: <--- urEnqueueKernelLaunch(
// FIXME the order of these 2 varies between plugins due to a Level Zero
// specific queue workaround.
// CHECK-DAG: ---> urEventRelease(
// CHECK-DAG: ---> urQueueRelease(
// CHECK: ---> urContextRelease(
// CHECK: ---> urKernelRelease(
// CHECK: ---> urProgramRelease(
// CHECK: ---> urDeviceRelease(
// CHECK-DAG: <--- urEventRelease(
// CHECK-DAG: <--- urQueueRelease(
// CHECK: <--- urContextRelease(
// CHECK: <--- urKernelRelease(
// CHECK: <--- urProgramRelease(
// CHECK: <--- urDeviceRelease(
2 changes: 1 addition & 1 deletion sycl/test-e2e/Basic/stream/release_resources_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ int main() {
{
queue Queue;

// CHECK:---> urMemRelease
// CHECK: <--- urMemRelease
Queue.submit([&](handler &CGH) {
stream Out(1024, 80, CGH);
CGH.parallel_for<class test_cleanup1>(
Expand Down
Loading

0 comments on commit 1f9978e

Please sign in to comment.