Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b7f9e46

Browse files
committedMay 23, 2025·
Merge branch 'sycl' into cacheassertuse
2 parents e915a33 + d76b71a commit b7f9e46

File tree

3 files changed

+26
-7
lines changed

3 files changed

+26
-7
lines changed
 

‎libclc/libspirv/include/libspirv/atomic/atomic_xchg.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#define __SPIRV_FUNCTION __spirv_AtomicExchange
910
#define __SPIRV_FUNCTION_S __spirv_AtomicExchange
1011
#define __SPIRV_FUNCTION_U __spirv_AtomicExchange
1112
#define __SPIRV_INT64_BASE

‎unified-runtime/source/adapters/native_cpu/queue.cpp

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,26 @@
1414
#include "ur/ur.hpp"
1515
#include "ur_api.h"
1616

17-
UR_APIEXPORT ur_result_t UR_APICALL urQueueGetInfo(ur_queue_handle_t /*hQueue*/,
18-
ur_queue_info_t /*propName*/,
19-
size_t /*propSize*/,
20-
void * /*pPropValue*/,
21-
size_t * /*pPropSizeRet*/) {
22-
23-
DIE_NO_IMPLEMENTATION;
17+
UR_APIEXPORT ur_result_t UR_APICALL urQueueGetInfo(ur_queue_handle_t hQueue,
18+
ur_queue_info_t propName,
19+
size_t propSize,
20+
void *pPropValue,
21+
size_t *pPropSizeRet) {
22+
23+
UrReturnHelper ReturnValue(propSize, pPropValue, pPropSizeRet);
24+
25+
switch (propName) {
26+
case UR_QUEUE_INFO_CONTEXT:
27+
return ReturnValue(hQueue->getContext());
28+
case UR_QUEUE_INFO_DEVICE:
29+
return ReturnValue(hQueue->getDevice());
30+
case UR_QUEUE_INFO_REFERENCE_COUNT:
31+
return ReturnValue(hQueue->getReferenceCount());
32+
case UR_QUEUE_INFO_EMPTY:
33+
return ReturnValue(hQueue->isEmpty());
34+
default:
35+
return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION;
36+
}
2437
}
2538

2639
UR_APIEXPORT ur_result_t UR_APICALL urQueueCreate(

‎unified-runtime/source/adapters/native_cpu/queue.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ struct ur_queue_handle_t_ : RefCounted {
4747

4848
bool isProfiling() const { return profilingEnabled; }
4949

50+
bool isEmpty() const {
51+
// TODO: check that events are done if there were any
52+
return events.size() == 0;
53+
}
54+
5055
private:
5156
ur_device_handle_t device;
5257
ur_context_handle_t context;

0 commit comments

Comments
 (0)
Please sign in to comment.