Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SYCL][E2E] fixed UR FileCheck conditions to match new traces #15439

Merged
merged 3 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions sycl/cmake/modules/FetchUnifiedRuntime.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,13 @@ if(SYCL_UR_USE_FETCH_CONTENT)
endfunction()

set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git")
# commit 1f13d2ceb0494d84ce7b32f6b453dbb256fb702a
# Merge: 5276c534 bcf2244d
# Author: aarongreig <[email protected]>
# Date: Wed Oct 2 15:04:33 2024 +0100
# Merge pull request #2056 from Seanst98/sean/usm-normalized-fix
#
# [CUDA][Bindless] Address USM normalized type image creation failure and functionality
set(UNIFIED_RUNTIME_TAG 1f13d2ceb0494d84ce7b32f6b453dbb256fb702a)
# commit 7aba70bc5c6bf82a6e5f7cdd3623eb8f46fcff40
# Merge: 1f13d2ce cf5994a1
# Author: Piotr Balcer <[email protected]>
# Date: Thu Oct 3 10:47:01 2024 +0200
# Merge pull request #2101 from lslusarczyk/fix-interleaved-urtraces
# Fix mixed output of adapter and regular traces
set(UNIFIED_RUNTIME_TAG 7aba70bc5c6bf82a6e5f7cdd3623eb8f46fcff40)

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
Loading