Core¶
PlaidML Core
Contents
Initialization¶
-
void
plaidml::init()¶ Initializes PlaidML’s Core API.
Note
Initialization of PlaidML’s Core Python API happens automatically
wherever the module plaidml.core is imported.
Objects¶
-
enum
core_objects::DType¶ Enumerates all of the data types in PlaidML.
Values:
-
INVALID= PLAIDML_DATA_INVALID¶
-
BOOLEAN= PLAIDML_DATA_BOOLEAN¶
-
INT8= PLAIDML_DATA_INT8¶
-
UINT8= PLAIDML_DATA_UINT8¶
-
INT16= PLAIDML_DATA_INT16¶
-
UINT16= PLAIDML_DATA_UINT16¶
-
INT32= PLAIDML_DATA_INT32¶
-
UINT32= PLAIDML_DATA_UINT32¶
-
INT64= PLAIDML_DATA_INT64¶
-
UINT64= PLAIDML_DATA_UINT64¶
-
BFLOAT16= PLAIDML_DATA_BFLOAT16¶
-
FLOAT16= PLAIDML_DATA_FLOAT16¶
-
FLOAT32= PLAIDML_DATA_FLOAT32¶
-
FLOAT64= PLAIDML_DATA_FLOAT64¶
-
-
class
TensorShape¶ This is a TensorShape.
Public Functions
-
TensorShape()¶ TensorShape constructor
-
TensorShape(DType dtype, const std::vector<int64_t> &sizes)¶ TensorShape constructor
- Parameters
dtype: DType
-
TensorShape(DType dtype, const std::vector<int64_t> &sizes, const std::vector<int64_t> &strides)¶ TensorShape constructor
- Parameters
dtype: DTypesizes: const vector<int64_t>strides: const vector<int64_t>
TensorShape constructor
- Parameters
ptr: const shared_ptr<plaidml_shape>
-
DType
dtype() const¶ dtype
- Return
DType
-
size_t
ndims() const¶ Returns the number of dimensions in the TensorShape
- Return
size_t
-
uint64_t
nbytes() const¶ nbytes
- Return
uint64_t
-
-
class
Buffer¶ This is a Buffer.
Public Functions
-
Buffer(const std::string &device, const TensorShape &shape)¶ Buffer constructor
- Parameters
device: stringshape: TensorShape
-
Buffer(plaidml_buffer *ptr, const TensorShape &shape)¶ Buffer constructor
- Parameters
ptr: plaidml_buffer*shape: TensorShape
-
-
struct
Settings¶ These are the Settings.
Public Static Functions
-
static std::string
get(const std::string &key)¶ Gets the setting specified by
key- Return
string
- Parameters
key: string
-
static void
set(const std::string &key, const std::string &value)¶ Sets the setting specified by
keyto thevaluespecified.- Parameters
key: stringvalue: string
-
static std::string