suppress warning
This commit is contained in:
parent
0eb595cc6e
commit
e3aa43adbd
1 changed files with 21 additions and 16 deletions
|
@ -9,25 +9,9 @@
|
||||||
#include "utils.hpp"
|
#include "utils.hpp"
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
#define CHECK_PARAMS(ctx, src0, src1, dst) \
|
|
||||||
do { \
|
|
||||||
if (!qnn_is_valid_params((ctx), (src0), (src1), (dst))) { \
|
|
||||||
return; \
|
|
||||||
} \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#else
|
|
||||||
#define CHECK_PARAMS(ctx, src0, src1, dst)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
void print_ggml_tensor(const ggml_tensor *tensor) {
|
|
||||||
QNN_LOG_DEBUG("%15s: type = %i (%5s) ne = %5" PRIi64 " x %5" PRIi64 " x %5" PRIi64 ", nb = (%5zi, %5zi, %5zi)\n",
|
|
||||||
tensor->name, tensor->type, ggml_type_name(tensor->type), tensor->ne[0], tensor->ne[1], tensor->ne[2],
|
|
||||||
tensor->nb[0], tensor->nb[1], tensor->nb[2]);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool qnn_is_valid_params(ggml_backend_qnn_context *ctx, const ggml_tensor *src0, const ggml_tensor *src1,
|
bool qnn_is_valid_params(ggml_backend_qnn_context *ctx, const ggml_tensor *src0, const ggml_tensor *src1,
|
||||||
ggml_tensor *dst) {
|
ggml_tensor *dst) {
|
||||||
if (!ctx || !src0 || !src1 || !dst) {
|
if (!ctx || !src0 || !src1 || !dst) {
|
||||||
|
@ -47,6 +31,27 @@ bool qnn_is_valid_params(ggml_backend_qnn_context *ctx, const ggml_tensor *src0,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // namespace
|
||||||
|
|
||||||
|
#define CHECK_PARAMS(ctx, src0, src1, dst) \
|
||||||
|
do { \
|
||||||
|
if (!qnn_is_valid_params((ctx), (src0), (src1), (dst))) { \
|
||||||
|
return; \
|
||||||
|
} \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
#else
|
||||||
|
#define CHECK_PARAMS(ctx, src0, src1, dst)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
void print_ggml_tensor(const ggml_tensor *tensor) {
|
||||||
|
QNN_LOG_DEBUG("%15s: type = %i (%5s) ne = %5" PRIi64 " x %5" PRIi64 " x %5" PRIi64 ", nb = (%5zi, %5zi, %5zi)\n",
|
||||||
|
tensor->name, tensor->type, ggml_type_name(tensor->type), tensor->ne[0], tensor->ne[1], tensor->ne[2],
|
||||||
|
tensor->nb[0], tensor->nb[1], tensor->nb[2]);
|
||||||
|
}
|
||||||
|
|
||||||
template <size_t _InputSize, size_t _OutputSize>
|
template <size_t _InputSize, size_t _OutputSize>
|
||||||
bool qnn_bind_tensors_to_graph(qnn::ggml_qnn_graph<_InputSize, _OutputSize> *graph, const std::string &op_name,
|
bool qnn_bind_tensors_to_graph(qnn::ggml_qnn_graph<_InputSize, _OutputSize> *graph, const std::string &op_name,
|
||||||
const std::array<const ggml_tensor *, _InputSize> &inputs,
|
const std::array<const ggml_tensor *, _InputSize> &inputs,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue