endif()
target_link_libraries(nnfw_lib_srcn PRIVATE OpenMP::OpenMP_CXX)
+target_link_libraries(nnfw_lib_srcn PRIVATE nnfw_common)
target_compile_definitions(nnfw_lib_srcn PRIVATE TIZEN) # ANDROID or TIZEN
#target_compile_definitions(nnfw_lib_srcn PRIVATE NCNN) # Enable if ready
set_target_properties(nnfw_lib_srcn PROPERTIES POSITION_INDEPENDENT_CODE ON)
{
int ret = 0;
auto op_type = param.op_type;
- auto b = param.b;
+ // auto b = param.b;
// Only support add operation, none broadcasting
// Other case, need to remove internal memory allocation and check correctness
int channels = bottom_blob.c;
int size = w * h;
- int w1 = bottom_blob1.w;
- int h1 = bottom_blob1.h;
- int channels1 = bottom_blob1.c;
- int size1 = w1 * h1;
+// Unused variables
+// int w1 = bottom_blob1.w;
+// int h1 = bottom_blob1.h;
+// int channels1 = bottom_blob1.c;
+// int size1 = w1 * h1;
#if __ARM_NEON
}
void ncnn_instance_norm_colmajor(Mat &in_mat, Mat &out_mat, Mat &gamma_mat, Mat &beta_mat,
- int channels, float eps)
+ int /*channels*/, float eps)
{
// Treat CHW layout as HWC layout
int h = in_mat.c;
}
void ncnn_instance_norm_with_relu_rowmajor(Mat &in_mat, Mat &out_mat, Mat &gamma_mat, Mat &beta_mat,
- int channels, float eps, float slope)
+ int channels, float eps, float /*slope*/)
{
int w = in_mat.w;
int h = in_mat.h;
}
void ncnn_instance_norm_with_relu_colmajor(Mat &in_mat, Mat &out_mat, Mat &gamma_mat, Mat &beta_mat,
- int channels, float eps, float slope)
+ int /*channels*/, float eps, float slope)
{
// Treat CHW layout as HWC layout
int h = in_mat.c;
int num_threads_;
convType_t conv_type_;
- int n_;
- int bn_;
+ uint32_t n_;
+ uint32_t bn_;
int rn_;
int nn_;
void conv_winograd::compute_winograd()
{
- const int w = in_mat_.w;
- const int h = in_mat_.h;
+ // const int w = in_mat_.w;
+ // const int h = in_mat_.h;
const int inch = in_mat_.c;
- const int outw = out_mat_.w;
- const int outh = out_mat_.h;
+ // const int outw = out_mat_.w;
+ // const int outh = out_mat_.h;
const int outch = out_mat_.c;
const int kernel_size = in_param_.kernel_w;
void conv_winograd_batch::compute_winograd()
{
const int w = in_mat_.w;
- const int h = in_mat_.h;
+ // const int h = in_mat_.h;
const int inch = in_mat_.c;
- const int outw = out_mat_.w;
- const int outh = out_mat_.h;
+ // const int outw = out_mat_.w;
+ // const int outh = out_mat_.h;
const int outch = out_mat_.c;
const int kernel_size = in_param_.kernel_w;
const int batch = in_mat_.n;
convType_t conv_type)
: in_mat_(in_mat), weights_mat_(weights_mat), out_mat_(out_mat), in_param_(in_param),
- num_threads_(num_threads), conv_type_(conv_type)
+ conv_type_(conv_type), num_threads_(num_threads)
{
m_ = in_param_.kernel_h * in_param_.kernel_w * out_mat_.c;
#ifdef NCNN
int i;
for (i = 0; i + 1 < outh; i += 2)
{
- int nn = outw >> 2 - 1;
+ int nn = (outw >> 2) - 1;
int remain = outw & 0x03;
if (nn > 0)
}
}
}
+#else // __aarch64__
+ (void)in_mat;
+ (void)out_mat;
+ (void)kernel;
+ (void)in_param;
#endif // __aarch64__
}
sgemmTrans_t rtrans, const int m, const int n, const int k,
const float *lhs_data, const float *rhs_data,
float *res_data, int cache_div)
- : major_type_(major_type), ltrans_(ltrans), rtrans_(rtrans), m_(m), n_(n), k_(k),
- lhs_data_(lhs_data), rhs_data_(rhs_data), res_data_(res_data), cache_div_(cache_div)
+ : lhs_data_(lhs_data), rhs_data_(rhs_data), res_data_(res_data), major_type_(major_type),
+ ltrans_(ltrans), rtrans_(rtrans), m_(m), n_(n), k_(k), cache_div_(cache_div)
{
param_init();
}
if (params.num_threads > 1)
{
winograd_channel_cond = 128 * 128;
- int winograd_image_cond = 20 * 20;
+ // int winograd_image_cond = 20 * 20;
}
#endif // TIZEN
return;
}
- const int ih = (_H - 1) * in_param.stride_w + in_param.kernel_w;
- const int oh = _H;
+ // const int ih = (_H - 1) * in_param.stride_w + in_param.kernel_w;
+ // const int oh = _H;
const int nh = (outh + _H - 1) / _H;
int rh = outh % _H;
if (rh == 0)
return;
}
- const int ih = (_H - 1) * in_param.stride_w + in_param.kernel_w;
- const int oh = _H;
+ // const int ih = (_H - 1) * in_param.stride_w + in_param.kernel_w;
+ // const int oh = _H;
const int nh = (outh + _H - 1) / _H;
int rh = outh % _H;
if (rh == 0)