华为计算微信公众号
昇腾AI开发者公众号
华为计算微博
华为计算今日头条
请问各位大佬,在一个算子的compute过程中,调用的具体的运算的函数有源代码么。
例如下列Add算子的compute过程中调用Add()函数。
__aicore__ inline void Compute(int32_t progress) { // deque input tensors from VECIN queue LocalTensor<half> xLocal = inQueueX.DeQue<half>(); LocalTensor<half> yLocal = inQueueY.DeQue<half>(); LocalTensor<half> zLocal = outQueueZ.AllocTensor<half>(); // call Add instr for computation Add(zLocal, xLocal, yLocal, TILE_LENGTH); // enque the output tensor to VECOUT queue outQueueZ.EnQue<half>(zLocal); // free input tensors for reuse inQueueX.FreeTensor(xLocal); inQueueY.FreeTensor(yLocal); }
如果是不开源的也希望能有大佬告诉我一句,谢谢各位好兄弟了
我要发帖子
求助
请问各位大佬,在一个算子的compute过程中,调用的具体的运算的函数有源代码么。
例如下列Add算子的compute过程中调用Add()函数。
__aicore__ inline void Compute(int32_t progress) { // deque input tensors from VECIN queue LocalTensor<half> xLocal = inQueueX.DeQue<half>(); LocalTensor<half> yLocal = inQueueY.DeQue<half>(); LocalTensor<half> zLocal = outQueueZ.AllocTensor<half>(); // call Add instr for computation Add(zLocal, xLocal, yLocal, TILE_LENGTH); // enque the output tensor to VECOUT queue outQueueZ.EnQue<half>(zLocal); // free input tensors for reuse inQueueX.FreeTensor(xLocal); inQueueY.FreeTensor(yLocal); }如果是不开源的也希望能有大佬告诉我一句,谢谢各位好兄弟了