Skip to content

Commit c1947ff

Browse files
authored
[SYCL] Don't use C++17 CTAD causing post-commit failures (#7635)
Using C++17 results in post-commit failures: https://github.com/intel/llvm/actions/runs/3617075742/jobs/6095609311
1 parent 43d5d14 commit c1947ff

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

sycl/plugins/cuda/pi_cuda.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ struct _pi_queue {
501501

502502
template <typename T> bool all_of(T &&f) {
503503
{
504-
std::lock_guard compute_guard(compute_stream_mutex_);
504+
std::lock_guard<std::mutex> compute_guard(compute_stream_mutex_);
505505
unsigned int end =
506506
std::min(static_cast<unsigned int>(compute_streams_.size()),
507507
num_compute_streams_);
@@ -510,7 +510,7 @@ struct _pi_queue {
510510
return false;
511511
}
512512
{
513-
std::lock_guard transfer_guard(transfer_stream_mutex_);
513+
std::lock_guard<std::mutex> transfer_guard(transfer_stream_mutex_);
514514
unsigned int end =
515515
std::min(static_cast<unsigned int>(transfer_streams_.size()),
516516
num_transfer_streams_);

sycl/plugins/hip/pi_hip.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ struct _pi_queue {
480480

481481
template <typename T> bool all_of(T &&f) {
482482
{
483-
std::lock_guard compute_guard(compute_stream_mutex_);
483+
std::lock_guard<std::mutex> compute_guard(compute_stream_mutex_);
484484
unsigned int end =
485485
std::min(static_cast<unsigned int>(compute_streams_.size()),
486486
num_compute_streams_);
@@ -489,7 +489,7 @@ struct _pi_queue {
489489
return false;
490490
}
491491
{
492-
std::lock_guard transfer_guard(transfer_stream_mutex_);
492+
std::lock_guard<std::mutex> transfer_guard(transfer_stream_mutex_);
493493
unsigned int end =
494494
std::min(static_cast<unsigned int>(transfer_streams_.size()),
495495
num_transfer_streams_);

sycl/source/detail/queue_impl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ bool queue_impl::ext_oneapi_empty() const {
404404
// If we have in-order queue where events are not discarded then just check
405405
// the status of the last event.
406406
if (isInOrder() && !MDiscardEvents) {
407-
std::lock_guard Lock(MLastEventMtx);
407+
std::lock_guard<std::mutex> Lock(MLastEventMtx);
408408
return MLastEvent.get_info<info::event::command_execution_status>() ==
409409
info::event_command_status::complete;
410410
}
@@ -421,7 +421,7 @@ bool queue_impl::ext_oneapi_empty() const {
421421

422422
// We may have events like host tasks which are not submitted to the backend
423423
// queue so we need to get their status separately.
424-
std::lock_guard Lock(MMutex);
424+
std::lock_guard<std::mutex> Lock(MMutex);
425425
for (event Event : MEventsShared)
426426
if (Event.get_info<info::event::command_execution_status>() !=
427427
info::event_command_status::complete)

0 commit comments

Comments
 (0)