diff --git a/SYCL/Regression/dummy_event_info.cpp b/SYCL/Regression/dummy_event_info.cpp new file mode 100644 index 0000000000..ac643ddf8c --- /dev/null +++ b/SYCL/Regression/dummy_event_info.cpp @@ -0,0 +1,24 @@ +// RUN: %clangxx -fsycl %s -o %t.out +// RUN: %CPU_RUN_PLACEHOLDER %t.out + +#include + +#include + +using namespace sycl; + +// Check that information queries for dummy non-host events (e.g. USM operations +// for 0 bytes) work correctly. +int main() { + queue q{{property::queue::enable_profiling()}}; + event e = q.memcpy(nullptr, nullptr, 0); + + assert(e.get_info() == + info::event_command_status::complete); + assert(e.get_info() == 0); + assert(e.get_profiling_info() == + 0); + assert(e.get_profiling_info() == + 0); + assert(e.get_profiling_info() == 0); +}