Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11,194 changes: 11,194 additions & 0 deletions lite/backends/arm/math/sparse_semi_conv_impl.cc

Large diffs are not rendered by default.

73 changes: 73 additions & 0 deletions lite/backends/arm/math/sparse_semi_conv_impl.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
// Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#pragma once

#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include "lite/backends/arm/math/sparse_conv_impl.h"
#include "lite/core/context.h"
#include "lite/core/target_wrapper.h"
#include "lite/operators/op_params.h"

namespace paddle {
namespace lite {
namespace arm {
namespace math {

void sparse_semi_conv_fp32_pipelined(const float* A,
const float* B,
const int32_t* widx_dmap,
const uint32_t* nidx_nnzmap,
const float* bias,
float* output,
const int M,
const int K,
const int N,
const operators::SparseConvParam& param,
ARMContext* ctx);

void sparse_semi_conv_int8_fp32_pipelined(
const int8_t* A,
const int8_t* B,
const int32_t* widx_dmap,
const uint32_t* nidx_nnzmap,
const float* bias,
const float* scale,
float* output,
int M,
int K,
int N,
const operators::SparseConvParam& param,
ARMContext* ctx);

void sparse_semi_conv_int8_int8_pipelined(
const int8_t* A,
const int8_t* B,
const int32_t* widx_dmap,
const uint32_t* nidx_nnzmap,
const float* bias,
const float* scale,
int8_t* output,
int M,
int K,
int N,
const operators::SparseConvParam& param,
ARMContext* ctx);

} // namespace math
} // namespace arm
} // namespace lite
} // namespace paddle
Loading