SetWeight
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
x |
√ |
|
√ |
|
x |
|
x |
|
x |
|
x |
Function Usage
Sets the Weight matrix.
Prototype
1 | __aicore__ inline void SetWeight(const AscendC::GlobalTensor<WeightT>& weight) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
weight |
Input |
Address of Weight in the Global Memory. The type is GlobalTensor. The Weight matrix supports the following data types: half and bfloat16_t. |
Returns
None
Restrictions
None
Examples
1 2 3 | GlobalTensor<half> weightGm; weightGm.SetGlobalBuffer(reinterpret_cast<__gm__ half *>(weight)); conv3dApi.SetWeight(weightGm); |
Parent topic: Conv3D Kernel APIs