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

CR-1167063 Fix hwqueue_handle::wait_command() API comment #7609

Merged
merged 2 commits into from
Jul 24, 2023
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
11 changes: 7 additions & 4 deletions src/runtime_src/core/common/api/hw_queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,11 +399,14 @@ class qds_device : public hw_queue_impl
{}

std::cv_status
wait(size_t timeout_ms) override
wait(size_t /*timeout_ms*/) override
{
return m_qhdl->wait_command(nullptr, static_cast<int>(timeout_ms))
? std::cv_status::no_timeout
: std::cv_status::timeout;
// OpenCL uses this function, but it is not implemented for
// platforms that implement hwqueue_handle. Rework this if OpenCL
// needs to support shim hw queues. Probably use a combination of
// counters or cached commands, or change command monitor to track
// order of submitted commands.
throw std::runtime_error("qds_device::wait() not implemented");
}

std::cv_status
Expand Down
3 changes: 0 additions & 3 deletions src/runtime_src/core/common/shim/hwqueue_handle.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ class hwqueue_handle
// @cmd Handle to command to wait for
// @timeout_ms Timout in ms, 0 implies infinite wait.
// @return 0 indicates timeout, anything else indicates completion
//
// If cmd buffer handle is nullptr, then this function is supposed to wait
// until any command completes execution.
virtual int
wait_command(buffer_handle* cmd, uint32_t timeout_ms) const = 0;

Expand Down