@@ -117,12 +117,17 @@ urQueueCreate(ur_context_handle_t hContext, ur_device_handle_t hDevice,
117
117
try {
118
118
std::unique_ptr<ur_queue_handle_t_> QueueImpl{nullptr };
119
119
120
- unsigned int Flags = 0 ;
120
+ unsigned int Flags = hipStreamNonBlocking ;
121
121
ur_queue_flags_t URFlags = 0 ;
122
122
int Priority = 0 ; // Not guaranteed, but, in ROCm 5.0-6.0, 0 is the default
123
-
124
123
if (pProps && pProps->stype == UR_STRUCTURE_TYPE_QUEUE_PROPERTIES) {
125
124
URFlags = pProps->flags ;
125
+ if (URFlags == UR_QUEUE_FLAG_USE_DEFAULT_STREAM) {
126
+ Flags = hipStreamDefault;
127
+ } else if (URFlags == UR_QUEUE_FLAG_SYNC_WITH_DEFAULT_STREAM) {
128
+ Flags = 0 ;
129
+ }
130
+
126
131
if (URFlags & UR_QUEUE_FLAG_PRIORITY_HIGH) {
127
132
ScopedContext Active (hDevice);
128
133
UR_CHECK_ERROR (hipDeviceGetStreamPriorityRange (nullptr , &Priority));
@@ -143,7 +148,7 @@ urQueueCreate(ur_context_handle_t hContext, ur_device_handle_t hDevice,
143
148
144
149
QueueImpl = std::unique_ptr<ur_queue_handle_t_>(new ur_queue_handle_t_{
145
150
std::move (ComputeHipStreams), std::move (TransferHipStreams), hContext,
146
- hDevice, Flags, pProps ? pProps-> flags : 0 , Priority});
151
+ hDevice, Flags, URFlags , Priority});
147
152
148
153
*phQueue = QueueImpl.release ();
149
154
0 commit comments