Skip to content

Commit

Permalink
Add support for MsNpu
Browse files Browse the repository at this point in the history
  • Loading branch information
kyule7 committed Mar 2, 2023
1 parent ca4d00a commit 59e5218
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/numpy_dlpack/dlpack/dlpack.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class DLDeviceType(ctypes.c_int):
kDLROCMHost = 11
kDLCUDAManaged = 13
kDLOneAPI = 14
kDLMsNpu = 17

def __str__(self):
return {
Expand All @@ -32,6 +33,7 @@ def __str__(self):
self.kDLROCMHost: "ROMCHost",
self.kDLCUDAManaged: "CUDAManaged",
self.kDLOneAPI: "oneAPI",
self.kDLMsNpu: "MsNpu",
}[self.value]


Expand Down
2 changes: 2 additions & 0 deletions include/dlpack/dlpack.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ typedef enum {
kDLWebGPU = 15,
/*! \brief Qualcomm Hexagon DSP */
kDLHexagon = 16,
/*! \brief Microsoft NPU */
kDLMsNpu = 17,
} DLDeviceType;

/*!
Expand Down

0 comments on commit 59e5218

Please sign in to comment.