请问Ascend C算子在compute中调用的具体的运算的函数有源代码么?
收藏回复举报
请问Ascend C算子在compute中调用的具体的运算的函数有源代码么?
t('forum.solved') 已解决
发表于2023-11-27 14:17:48
0 查看

求助

请问各位大佬,在一个算子的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);
    }

如果是不开源的也希望能有大佬告诉我一句,谢谢各位好兄弟了

我要发帖子