×

签到

分享到微信

打开微信,使用扫一扫进入页面后,点击右上角菜单,

点击“发送给朋友”或“分享到朋友圈”完成分享

__bang_reshape_nchw2nhwc BUG? guozhenjiang2020-06-15 21:17:31 回复 2 查看 实验支持 思元270 BANG语言
__bang_reshape_nchw2nhwc BUG?
分享到:

下面是__bang_reshape_nchw2nhwc的文档描述:

__bang_reshape_nchw2nhwc

void __bang_reshape_nchw2nhwc (half* dst, half* src, int n, int h, int w, int c)

void __bang_reshape_nchw2nhwc (short* dst, short* src, int n, int h, int w, int c)

void __bang_reshape_nchw2nhwc (unsigned short* dst, unsigned short* src, int n, int h, int w,

int c)

void __bang_reshape_nchw2nhwc (int8* dst, int8* src, int n, int h, int w, int c)

void __bang_reshape_nchw2nhwc (char* dst, char* src, int n, int h, int w, int c)

void __bang_reshape_nchw2nhwc (unsigned char* dst, unsigned char* src, int n, int h, int w, int

c)

void __bang_reshape_nchw2nhwc (float* dst, float* src, int n, int h, int w, int c)

void __bang_reshape_nchw2nhwc (int* dst, int* src, int n, int h, int w, int c)

void __bang_reshape_nchw2nhwc (unsigned int* dst, unsigned int* src, int n, int h, int w, int c)

Reshape the kernel from NCHW to NHWC.

• Parameters:

<dst> The address of destination vector

<src> The address of source vector

<n> Batch number of kernel

<h> Height of kernel

<w> Width of kernel

<c> Channel input of kernel

• Remarks

1. The interface is supported on MLU270;

2. The operand <src> must point to __nram__ space;

3. The operand <dst> must point to __nram__ space;

4. <h> * <w> * sizeof(src) must be dividable by 64;

5. <c> * sizeof(src) must be dividable by 64.


但在实际中发现,4,5两条并没有被实际检查,取而代之的是会检查c是否能被32整除。例如(n,h,w,c) = (1,1,1,32)可以通过编译,而(1,1,32,2)不能

版权所有 © 2024 寒武纪 Cambricon.com 备案/许可证号:京ICP备17003415号-1
关闭