• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2022 Google LLC
2 //
3 // This source code is licensed under the BSD-style license found in the
4 // LICENSE file in the root directory of this source tree.
5 
6 #pragma once
7 
8 #include <xnnpack.h>
9 #include <xnnpack/subgraph.h>
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 enum xnn_status xnn_subgraph_check_xnnpack_initialized(enum xnn_node_type node_type);
16 enum xnn_status xnn_subgraph_check_input_node_id(enum xnn_node_type node_type, uint32_t input_id, size_t num_values);
17 enum xnn_status xnn_subgraph_check_nth_input_node_id(
18   enum xnn_node_type node_type,
19   uint32_t input_id,
20   size_t num_values,
21   size_t nth);
22 enum xnn_status xnn_subgraph_check_input_type_dense(
23   enum xnn_node_type node_type,
24   uint32_t input_id,
25   const struct xnn_value* input_value);
26 enum xnn_status xnn_subgraph_check_nth_input_type_dense(
27   enum xnn_node_type node_type,
28   uint32_t input_id,
29   const struct xnn_value* input_value,
30   size_t nth);
31 enum xnn_status xnn_subgraph_check_output_node_id(enum xnn_node_type node_type, uint32_t output_id, size_t num_values);
32 enum xnn_status xnn_subgraph_check_output_type_dense(
33   enum xnn_node_type node_type,
34   uint32_t output_id,
35   const struct xnn_value* output_value);
36 enum xnn_status xnn_subgraph_check_datatype_matches(
37   enum xnn_node_type node_type,
38   uint32_t input_id,
39   const struct xnn_value* input_value,
40   uint32_t output_id,
41   const struct xnn_value* output_value);
42 enum xnn_status xnn_subgraph_check_datatype_matches_two_inputs(
43   enum xnn_node_type node_type,
44   uint32_t input1_id,
45   const struct xnn_value* input1_value,
46   uint32_t input2_id,
47   const struct xnn_value* input2_value,
48   uint32_t output_id,
49   const struct xnn_value* output_value);
50 enum xnn_status xnn_subgraph_check_output_min_max(enum xnn_node_type node_type, float output_min, float output_max);
51 
52 #ifdef __cplusplus
53 }  // extern "C"
54 #endif
55