SetWeight
Applicability
Product |
Supported |
|---|---|
√ |
|
√ |
|
x |
|
x |
|
x |
|
x |
Function
Sets the weight matrix Weight.
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 Weight supports the following data types: half and bfloat16_t. |
Returns
None
Restrictions
None
Example
1 2 3 | GlobalTensor<half> weightGm; weightGm.SetGlobalBuffer(reinterpret_cast<__gm__ half *>(weight)); conv3dApi.SetWeight(weightGm); |
Parent topic: Conv3D Kernel APIs