提交 6c7678ac 编写于 作者: Y Yuan Shuai 提交者: GitHub

[LITE][ARM] Comment armv7 cpu layout (#3196)

* [LITE][OPENCL] Change fp32 fc to fp16's. test=develop

* fix act in conv3x3opt opencl kernel. test=develop

* [LITE][ARM] comment assembly of layout armv7 cpu. test=develop
上级 6b136c39
...@@ -358,6 +358,8 @@ void NCHW2NHWC<int8_t>(int N, int C, int size, const int8_t* X, int8_t* Y) { ...@@ -358,6 +358,8 @@ void NCHW2NHWC<int8_t>(int N, int C, int size, const int8_t* X, int8_t* Y) {
"v14", "v14",
"v15"); "v15");
#else #else
#if 0 // TOOD(ysh329): caused assembly code error with register for armv7
// **clang** compile
asm volatile(TRANS_C8 asm volatile(TRANS_C8
: [din0_ptr] "+r"(din0_ptr), : [din0_ptr] "+r"(din0_ptr),
[din1_ptr] "+r"(din1_ptr), [din1_ptr] "+r"(din1_ptr),
...@@ -375,6 +377,7 @@ void NCHW2NHWC<int8_t>(int N, int C, int size, const int8_t* X, int8_t* Y) { ...@@ -375,6 +377,7 @@ void NCHW2NHWC<int8_t>(int N, int C, int size, const int8_t* X, int8_t* Y) {
[stride_w] "+r"(stride_w) [stride_w] "+r"(stride_w)
: :
: "cc", "memory", "q0", "q1", "q2", "q3"); : "cc", "memory", "q0", "q1", "q2", "q3");
#endif
#endif #endif
} }
// const int8_t* din_ptr = din + 8 * cnt * size + s; // remain channel // const int8_t* din_ptr = din + 8 * cnt * size + s; // remain channel
...@@ -478,6 +481,8 @@ void NHWC2NCHW<float>(int N, int C, int size, const float* X, float* Y) { ...@@ -478,6 +481,8 @@ void NHWC2NCHW<float>(int N, int C, int size, const float* X, float* Y) {
"v10", "v10",
"v11"); "v11");
#else #else
#if 0 // TOOD(ysh329): caused assembly code error with register for armv7
// **clang** compile
asm volatile(TRANS_C4 asm volatile(TRANS_C4
: [din0_ptr] "+r"(din0_ptr), : [din0_ptr] "+r"(din0_ptr),
[din1_ptr] "+r"(din1_ptr), [din1_ptr] "+r"(din1_ptr),
...@@ -491,6 +496,7 @@ void NHWC2NCHW<float>(int N, int C, int size, const float* X, float* Y) { ...@@ -491,6 +496,7 @@ void NHWC2NCHW<float>(int N, int C, int size, const float* X, float* Y) {
[stride] "+r"(stride) [stride] "+r"(stride)
: :
: "cc", "memory", "q0", "q1", "q2", "q3"); : "cc", "memory", "q0", "q1", "q2", "q3");
#endif
#endif #endif
} }
for (int i = 0; i < remain; i++) { for (int i = 0; i < remain; i++) {
...@@ -593,6 +599,8 @@ void NHWC2NCHW<int8_t>(int N, int C, int size, const int8_t* X, int8_t* Y) { ...@@ -593,6 +599,8 @@ void NHWC2NCHW<int8_t>(int N, int C, int size, const int8_t* X, int8_t* Y) {
"v14", "v14",
"v15"); "v15");
#else #else
#if 0 // TOOD(ysh329): caused assembly code error with register for armv7
// **clang** compile
asm volatile(TRANS_C8 asm volatile(TRANS_C8
: [din0_ptr] "+r"(din0_ptr), : [din0_ptr] "+r"(din0_ptr),
[din1_ptr] "+r"(din1_ptr), [din1_ptr] "+r"(din1_ptr),
...@@ -610,6 +618,7 @@ void NHWC2NCHW<int8_t>(int N, int C, int size, const int8_t* X, int8_t* Y) { ...@@ -610,6 +618,7 @@ void NHWC2NCHW<int8_t>(int N, int C, int size, const int8_t* X, int8_t* Y) {
[stride_w] "+r"(stride_w) [stride_w] "+r"(stride_w)
: :
: "cc", "memory", "q0", "q1", "q2", "q3"); : "cc", "memory", "q0", "q1", "q2", "q3");
#endif
#endif #endif
} }
for (int i = 0; i < remain; i++) { for (int i = 0; i < remain; i++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册