Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function Usage
Prints LocalTensor data in the debugging window for precision debugging. Each line contains one data block (32 bytes). This API is used only for CPU debugging.
Prototype
1 2 | inline void Print() inline void Print(uint32_t len) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
len |
Input |
Number of elements to be printed. |
Returns
None
Restrictions
None
Examples
1 2 3 4 5 6 7 8 | // Example: Used only for CPU debugging. Print LocalTensor data in the debugging window for precision debugging. Each line contains one data block (32 bytes). AscendC::LocalTensor<int32_t> inputLocal = softmaxMaxBuf.template Get<int32_t>(); for (int32_t i = 0; i < 16; ++i) { inputLocal.SetValue(i, i); // Assign i to the ith position in input_local. } inputLocal.Print(); // 0000: 0 1 2 3 4 5 6 7 8 // 0008: 9 10 11 12 13 14 15 |
Parent topic: LocalTensor