向DebugOp对象中增加tensor类型的标杆数据的输出描述。
def tensor_output(self, output_name: str, output_tensor: Any, options=None):
参数名 |
输入/输出 |
说明 |
---|---|---|
output_name |
输入 |
字符串,输出描述的name。 |
output_tensor |
输入 |
待输出的Tensor对象(由torch或者numpy生成)。 |
options |
输入 |
其他可选参数配置,list格式,可选填"optional"、"ignore"。
|
返回DebugOp类型的自身实例对象。
import numpy as np import ascendebug x = np.random.uniform(1, 100, (16384)).astype(np.float16) ascendebug.create_debug_op('OpCustom', 'VectorCore', '${chip_version}').tensor_output('x', x)