Skip to content

Commit

Permalink
Add UR_DEVICE_LOCAL_MEM_TYPE_NONE
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kbenzie committed Mar 3, 2023
1 parent a0e4b7b commit d3c656d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
5 changes: 3 additions & 2 deletions include/ur.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,8 +491,9 @@ def __str__(self):
###############################################################################
## @brief Device local memory type
class ur_device_local_mem_type_v(IntEnum):
LOCAL = 0 ## Dedicated local memory
GLOBAL = 1 ## Global memory
NONE = 0 ## No local memory support
LOCAL = 1 ## Dedicated local memory
GLOBAL = 2 ## Global memory

class ur_device_local_mem_type_t(c_int):
def __str__(self):
Expand Down
5 changes: 3 additions & 2 deletions include/ur_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -942,8 +942,9 @@ typedef enum ur_device_mem_cache_type_t {
///////////////////////////////////////////////////////////////////////////////
/// @brief Device local memory type
typedef enum ur_device_local_mem_type_t {
UR_DEVICE_LOCAL_MEM_TYPE_LOCAL = 0, ///< Dedicated local memory
UR_DEVICE_LOCAL_MEM_TYPE_GLOBAL = 1, ///< Global memory
UR_DEVICE_LOCAL_MEM_TYPE_NONE = 0, ///< No local memory support
UR_DEVICE_LOCAL_MEM_TYPE_LOCAL = 1, ///< Dedicated local memory
UR_DEVICE_LOCAL_MEM_TYPE_GLOBAL = 2, ///< Global memory
/// @cond
UR_DEVICE_LOCAL_MEM_TYPE_FORCE_UINT32 = 0x7fffffff
/// @endcond
Expand Down
2 changes: 2 additions & 0 deletions scripts/core/device.yml
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,8 @@ desc: "Device local memory type"
class: $xDevice
name: $x_device_local_mem_type_t
etors:
- name: NONE
desc: "No local memory support"
- name: LOCAL
desc: "Dedicated local memory"
- name: GLOBAL
Expand Down

0 comments on commit d3c656d

Please sign in to comment.