产品 |
是否支持 |
|---|---|
Ascend 950PR/Ascend 950DT |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
只限于CPU调试,将LocalTensor数据Dump到文件中,用于精度调试,文件保存在执行目录。
1 | int32_t ToFile(const std::string& fileName) const |
参数名 |
输入/输出 |
描述 |
|---|---|---|
fileName |
输入 |
保存的文件名称。 |
返回0表示数据Dump成功,非0值表示失败。
无
1 2 3 | // 示例 只限于CPU调试,将LocalTensor数据Dump到文件中,用于精度调试,文件保存在执行目录 AscendC::LocalTensor<float> tmpTensor = softmaxMaxBuf.template Get<float>(); tmpTensor.ToFile("tmpTensor.bin"); |