NVPL TENSOR 数据类型#

nvpltensorDataType_t#

enum nvpltensorDataType_t#

此枚举指定数据精度。当数据引用本身不携带类型时使用(例如 void *)

enumerator NVPLTENSOR_R_32F#

实数,单精度浮点数

enumerator NVPLTENSOR_C_32F#

复数,一对单精度浮点数

enumerator NVPLTENSOR_R_64F#

实数,双精度浮点数

enumerator NVPLTENSOR_C_64F#

复数,一对双精度浮点数


nvpltensorComputeDescriptor_t#

typedef struct nvpltensorComputeDescriptor *nvpltensorComputeDescriptor_t#

不透明结构,表示计算描述符。

NVPLTENSOR_EXTERN const nvpltensorComputeDescriptor_t NVPLTENSOR_COMPUTE_DESC_32F

浮点数:8 位指数和 23 位尾数(即 float)

NVPLTENSOR_EXTERN const nvpltensorComputeDescriptor_t NVPLTENSOR_COMPUTE_DESC_64F

浮点数:11 位指数和 52 位尾数(即 double)


nvpltensorHandle_t#

typedef struct nvpltensorHandle *nvpltensorHandle_t#

不透明结构,持有 nvplTENSOR 的库上下文。


nvpltensorTensorDescriptor_t#

typedef struct nvpltensorTensorDescriptor *nvpltensorTensorDescriptor_t#

不透明结构,表示张量描述符。


nvpltensorOperationDescriptor_t#

typedef struct nvpltensorOperationDescriptor *nvpltensorOperationDescriptor_t#

不透明结构,表示任何类型的问题描述符(例如,contraction、reduction、elementwise)。


nvpltensorOperationDescriptorAttribute_t#

enum nvpltensorOperationDescriptorAttribute_t#

此枚举列出了可以修改的 nvpltensorOperationDescriptor_t 的所有属性(参见 nvpltensorOperationDescriptorSetAttributenvpltensorOperationDescriptorGetAttribute)。

enumerator NVPLTENSOR_OPERATION_DESCRIPTOR_TAG#

int32_t:使用户能够区分关于软件管理的计划缓存的两个相同问题。(默认值:0)

enumerator NVPLTENSOR_OPERATION_DESCRIPTOR_SCALAR_TYPE#

nvpltensorDataType_t:缩放因子数据类型

enumerator NVPLTENSOR_OPERATION_DESCRIPTOR_FLOPS#

float:执行此操作所需的浮点运算次数(假设所有标量都不等于零,除非另有说明)

enumerator NVPLTENSOR_OPERATION_DESCRIPTOR_MOVED_BYTES#

float:从/到全局内存传输的最小字节数(假设所有标量都不等于零,除非另有说明)


nvpltensorPlanPreference_t#

typedef struct nvpltensorPlanPreference *nvpltensorPlanPreference_t#

不透明结构,用于缩小适用算法/变体/内核的范围。


nvpltensorPlanPreferenceAttribute_t#

enum nvpltensorPlanPreferenceAttribute_t#

此枚举列出了可以修改的 nvpltensorPlanPreference_t 对象的所有属性。

enumerator NVPLTENSOR_PLAN_PREFERENCE_ALGO#

nvpltensorAlgo_t:指定特定的 nvpltensorAlgo_t


nvpltensorPlan_t#

typedef struct nvpltensorPlan *nvpltensorPlan_t#

不透明结构,表示计划(例如,contraction、reduction、elementwise)。


nvpltensorPlanAttribute_t#

enum nvpltensorPlanAttribute_t#

此枚举列出了可以通过 nvpltensorPlanGetAttribute 检索的 nvpltensorPlan_t 对象的所有属性。

enumerator NVPLTENSOR_PLAN_REQUIRED_WORKSPACE#

uint64_t:执行计划所需的精确工作区大小(字节)


nvpltensorJitMode_t#

enum nvpltensorJitMode_t#

此枚举确定关于 nvplTENSOR 的即时编译功能的模式。

enumerator NVPLTENSOR_JIT_MODE_NONE#

表示不会进行即时编译内核。


nvpltensorAlgo_t#

enum nvpltensorAlgo_t#

允许用户指定用于执行所需张量运算的算法。

enumerator NVPLTENSOR_ALGO_DEFAULT#

性能模型选择适当的算法和内核。


nvpltensorWorksizePreference_t#

enum nvpltensorWorksizePreference_t#

此枚举让用户可以更精细地控制建议的工作区。

此枚举让用户可以更精细地控制 nvpltensorEstimateWorkspaceSize 建议的工作区大小

enumerator NVPLTENSOR_WORKSPACE_MIN#

最低内存需求;至少会有一个算法可用。

enumerator NVPLTENSOR_WORKSPACE_DEFAULT#

旨在获得高性能,同时减少工作区需求。

enumerator NVPLTENSOR_WORKSPACE_MAX#

最高内存需求;所有算法都将可用(如果内存占用不是问题,请选择此选项)


nvpltensorOperator_t#

enum nvpltensorOperator_t#

此枚举捕获 nvplTENSOR 库支持的所有一元和二元元素级运算。

enumerator NVPLTENSOR_OP_IDENTITY#

恒等运算符(即,元素不会更改)

enumerator NVPLTENSOR_OP_SQRT#

平方根。

enumerator NVPLTENSOR_OP_RELU#

修正线性单元。

enumerator NVPLTENSOR_OP_CONJ#

复共轭。

enumerator NVPLTENSOR_OP_RCP#

倒数。

enumerator NVPLTENSOR_OP_SIGMOID#

y=1/(1+exp(-x))

enumerator NVPLTENSOR_OP_TANH#

y=tanh(x)

enumerator NVPLTENSOR_OP_EXP#

指数运算。

enumerator NVPLTENSOR_OP_LOG#

对数(底数为 e)。

enumerator NVPLTENSOR_OP_ABS#

绝对值。

enumerator NVPLTENSOR_OP_NEG#

取反。

enumerator NVPLTENSOR_OP_SIN#

正弦。

enumerator NVPLTENSOR_OP_COS#

余弦。

enumerator NVPLTENSOR_OP_TAN#

正切。

enumerator NVPLTENSOR_OP_SINH#

双曲正弦。

enumerator NVPLTENSOR_OP_COSH#

双曲余弦。

enumerator NVPLTENSOR_OP_ASIN#

反正弦。

enumerator NVPLTENSOR_OP_ACOS#

反余弦。

enumerator NVPLTENSOR_OP_ATAN#

反正切。

enumerator NVPLTENSOR_OP_ASINH#

反双曲正弦。

enumerator NVPLTENSOR_OP_ACOSH#

反双曲余弦。

enumerator NVPLTENSOR_OP_ATANH#

反双曲正切。

enumerator NVPLTENSOR_OP_CEIL#

向上取整。

enumerator NVPLTENSOR_OP_FLOOR#

向下取整。

enumerator NVPLTENSOR_OP_MISH#

Mish y=x*tanh(softplus(x)).

enumerator NVPLTENSOR_OP_SWISH#

Swish y=x*sigmoid(x).

enumerator NVPLTENSOR_OP_SOFT_PLUS#

Softplus y=log(exp(x)+1).

enumerator NVPLTENSOR_OP_SOFT_SIGN#

Softsign y=x/(abs(x)+1).

enumerator NVPLTENSOR_OP_ADD#

两个元素相加。

enumerator NVPLTENSOR_OP_MUL#

两个元素相乘。

enumerator NVPLTENSOR_OP_MAX#

两个元素的最大值。

enumerator NVPLTENSOR_OP_MIN#

两个元素的最小值。

enumerator NVPLTENSOR_OP_UNKNOWN#

保留仅供内部使用


nvpltensorStatus_t#

enum nvpltensorStatus_t#

nvplTENSOR 状态类型返回值

此类型用于函数状态返回值。所有 nvplTENSOR 库函数都返回其状态,状态可以具有以下值。

enumerator NVPLTENSOR_STATUS_SUCCESS#

操作已成功完成。

enumerator NVPLTENSOR_STATUS_NOT_INITIALIZED#

不透明数据结构未初始化。

enumerator NVPLTENSOR_STATUS_ALLOC_FAILED#

在 nvplTENSOR 库内部,资源分配失败。

enumerator NVPLTENSOR_STATUS_INVALID_VALUE#

向函数传递了不支持的值或参数(表示用户错误)。

enumerator NVPLTENSOR_STATUS_INTERNAL_ERROR#

发生了一个内部 nvplTENSOR 错误。

enumerator NVPLTENSOR_STATUS_NOT_SUPPORTED#

请求的操作不被支持。

enumerator NVPLTENSOR_STATUS_LICENSE_ERROR#

请求的功能需要某些许可证,并且在尝试检查当前许可时检测到错误。

enumerator NVPLTENSOR_STATUS_INSUFFICIENT_WORKSPACE#

提供的工作空间不足。

enumerator NVPLTENSOR_STATUS_IO_ERROR#

表示与文件 I/O 相关的错误。


nvpltensorLoggerCallback_t#

typedef void (*nvpltensorLoggerCallback_t)(int32_t logLevel, const char *functionName, const char *message)#

用于日志记录的函数指针类型。