MCPcopy Create free account
hub / github.com/UbiquitousLearning/mllm / Compute

Method Compute

mllm/backends/ascend/kernels/vec_add.cpp:48–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46 inQueueY.EnQue(yLocal);
47 }
48 __aicore__ inline void Compute(int32_t progress) {
49 AscendC::LocalTensor<half> xLocal = inQueueX.DeQue<half>();
50 AscendC::LocalTensor<half> yLocal = inQueueY.DeQue<half>();
51 AscendC::LocalTensor<half> zLocal = outQueueZ.AllocTensor<half>();
52 AscendC::Add(zLocal, xLocal, yLocal, TILE_LENGTH);
53 outQueueZ.EnQue<half>(zLocal);
54 inQueueX.FreeTensor(xLocal);
55 inQueueY.FreeTensor(yLocal);
56 }
57 __aicore__ inline void CopyOut(int32_t progress) {
58 AscendC::LocalTensor<half> zLocal = outQueueZ.DeQue<half>();
59 AscendC::DataCopy(zGm[progress * TILE_LENGTH], zLocal, TILE_LENGTH);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected