华为计算微信公众号
昇腾AI开发者公众号
华为计算微博
华为计算今日头条
https://gitee.com/ascend/samples/tree/master/operator/AddCustomSample/KernelLaunch/AddKernelInvocationTilingNeo
//add_custom.cpp extern "C" __global__ __aicore__ void add_custom(GM_ADDR x, GM_ADDR y, GM_ADDR z, GM_ADDR workspace, AddCustomTilingData tiling) { KernelAdd op; op.Init(x, y, z, tiling.totalLength, tiling.tileNum); op.Process(); } //main.cpp AddCustomTilingData* tiling; ACLRT_LAUNCH_KERNEL(add_custom)(blockDim, stream, xDevice, yDevice, zDevice, workSpaceDevice, tiling);
这个AddKernelInvocationTilingNeo例子中,核函数中tiling是AddCustomTilingData类型,为什么调用时可以传AddCustomTilingData指针?
求教大家,谢谢!
我要发帖子
https://gitee.com/ascend/samples/tree/master/operator/AddCustomSample/KernelLaunch/AddKernelInvocationTilingNeo
//add_custom.cpp extern "C" __global__ __aicore__ void add_custom(GM_ADDR x, GM_ADDR y, GM_ADDR z, GM_ADDR workspace, AddCustomTilingData tiling) { KernelAdd op; op.Init(x, y, z, tiling.totalLength, tiling.tileNum); op.Process(); } //main.cpp AddCustomTilingData* tiling; ACLRT_LAUNCH_KERNEL(add_custom)(blockDim, stream, xDevice, yDevice, zDevice, workSpaceDevice, tiling);这个AddKernelInvocationTilingNeo例子中,核函数中tiling是AddCustomTilingData类型,为什么调用时可以传AddCustomTilingData指针?
求教大家,谢谢!