Event status "running" after wait()

Hello all,

I’m trying out SYCL for the first time after a decade-long experience in GPGPU with CUDA and OpenCL, and I’m using the CodePlay ComputeCpp SDK (CE version 2.30, x86_64-linux-gnu) to try some simple examples.

After finally getting the first complete example working, I’ve started playing around and one thing I noticed is that the the wait() method of the event class seems to return before the event is actually complete.

I’m checking for this using a simple

init_evt.wait();

std::cout << "Event status: " << event_status_name(init_evt) << std::endl;

where event_status_name is defined as:

std::string event_status_name(cl::sycl::info::event_command_status status)
{
	switch (status) {
	case cl::sycl::info::event_command_status::submitted: return "submitted";
	case cl::sycl::info::event_command_status::running: return "running";
	case cl::sycl::info::event_command_status::complete: return "complete";
	default: return "unknown (" + std::to_string(int(status)) + ")";
	}
}

std::string event_status_name(cl::sycl::event evt)
{
	return event_status_name(evt.get_info<cl::sycl::info::event::command_execution_status>());
}

and the output I get is:

Wait ...
Event status: running

whereas after a queue.wait I get complete, as expected. Is this expected? A known issue? Am I doing something wrong? I can provide the full source of a minimal example (and open a GitHub issue) if necessary.

Thanks,

FWIW, the code I’m using can be found here.

Hi,

this seems to be a bug in ComputeCpp. It looks like the event has actually completed, but the status wasn’t updated. We have created an internal tracker issue.

Thanks for looking into this!

Hi, a fix for this is available in ComputeCpp 2.4: https://developer.codeplay.com/products/computecpp/ce/guides/release-notes#community-edition-2-4-0 . Please let us know if you spot any other problems with events.

Thank you very much, I’ve done a quick test and it seems to be fixed indeed!