Skip to content

Commit d3c656d

Browse files
committed
Add UR_DEVICE_LOCAL_MEM_TYPE_NONE
Fixes #316 by adding `UR_DEVICE_LOCAL_MEM_TYPE_NONE` to the `ur_device_local_mem_type_t` enum, this brings UR in line with the SYCL and OpenCL specifications for the describing the local memory support a device is capable of.
1 parent a0e4b7b commit d3c656d

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

include/ur.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,8 +491,9 @@ def __str__(self):
491491
###############################################################################
492492
## @brief Device local memory type
493493
class ur_device_local_mem_type_v(IntEnum):
494-
LOCAL = 0 ## Dedicated local memory
495-
GLOBAL = 1 ## Global memory
494+
NONE = 0 ## No local memory support
495+
LOCAL = 1 ## Dedicated local memory
496+
GLOBAL = 2 ## Global memory
496497

497498
class ur_device_local_mem_type_t(c_int):
498499
def __str__(self):

include/ur_api.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -942,8 +942,9 @@ typedef enum ur_device_mem_cache_type_t {
942942
///////////////////////////////////////////////////////////////////////////////
943943
/// @brief Device local memory type
944944
typedef enum ur_device_local_mem_type_t {
945-
UR_DEVICE_LOCAL_MEM_TYPE_LOCAL = 0, ///< Dedicated local memory
946-
UR_DEVICE_LOCAL_MEM_TYPE_GLOBAL = 1, ///< Global memory
945+
UR_DEVICE_LOCAL_MEM_TYPE_NONE = 0, ///< No local memory support
946+
UR_DEVICE_LOCAL_MEM_TYPE_LOCAL = 1, ///< Dedicated local memory
947+
UR_DEVICE_LOCAL_MEM_TYPE_GLOBAL = 2, ///< Global memory
947948
/// @cond
948949
UR_DEVICE_LOCAL_MEM_TYPE_FORCE_UINT32 = 0x7fffffff
949950
/// @endcond

scripts/core/device.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,8 @@ desc: "Device local memory type"
499499
class: $xDevice
500500
name: $x_device_local_mem_type_t
501501
etors:
502+
- name: NONE
503+
desc: "No local memory support"
502504
- name: LOCAL
503505
desc: "Dedicated local memory"
504506
- name: GLOBAL

0 commit comments

Comments
 (0)