Skip to content

Commit aa7b3a6

Browse files
Added api json for each op to support acuity (#596)
Record constructor form of each operation as a json file to support acuity to call timvx op Type: Documentation Signed-off-by: Feiyue Chen <Feiyue.Chen@verisilicon.com>
1 parent ea8adc4 commit aa7b3a6

File tree

132 files changed

+2091
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+2091
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"BidirectionalSequenceLstm":{
3+
"parameters":
4+
[
5+
{"name": "cell_clip",
6+
"dtype": "float"
7+
},
8+
{"name": "proj_clip",
9+
"dtype": "float"
10+
},
11+
{"name": "act_type",
12+
"dtype": "tim::vx::ops::BidirectionalSequenceLstm::ActivationType",
13+
"range":["tim::vx::ops::BidirectionalSequenceLstm::ActivationType::kNONE",
14+
"tim::vx::ops::BidirectionalSequenceLstm::ActivationType::kRELU",
15+
"tim::vx::ops::BidirectionalSequenceLstm::ActivationType::kRELU1",
16+
"tim::vx::ops::BidirectionalSequenceLstm::ActivationType::kRELU6",
17+
"tim::vx::ops::BidirectionalSequenceLstm::ActivationType::kTANH",
18+
"tim::vx::ops::BidirectionalSequenceLstm::ActivationType::kSIGMOID",
19+
"tim::vx::ops::BidirectionalSequenceLstm::ActivationType::kHARDSIGMOID"]
20+
},
21+
{"name": "forget_bias",
22+
"dtype": "float"
23+
},
24+
{"name": "time_major",
25+
"dtype": "bool",
26+
"Optional": "true",
27+
"default": "false"
28+
},
29+
{"name": "recurrent_act_type",
30+
"dtype": "tim::vx::ops::BidirectionalSequenceLstm::ActivationType",
31+
"Optional": "true",
32+
"default": "tim::vx::ops::BidirectionalSequenceLstm::kSIGMOID",
33+
"range":["tim::vx::ops::BidirectionalSequenceLstm::ActivationType::kNONE",
34+
"tim::vx::ops::BidirectionalSequenceLstm::ActivationType::kRELU",
35+
"tim::vx::ops::BidirectionalSequenceLstm::ActivationType::kRELU1",
36+
"tim::vx::ops::BidirectionalSequenceLstm::ActivationType::kRELU6",
37+
"tim::vx::ops::BidirectionalSequenceLstm::ActivationType::kTANH",
38+
"tim::vx::ops::BidirectionalSequenceLstm::ActivationType::kSIGMOID",
39+
"tim::vx::ops::BidirectionalSequenceLstm::ActivationType::kHARDSIGMOID"]
40+
},
41+
{"name": "return_sequences",
42+
"dtype": "bool",
43+
"Optional": "true",
44+
"default": "false"
45+
}
46+
]
47+
}
48+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"BidirectionalSequenceRNN":{
3+
"parameters":
4+
[
5+
{"name": "act_type",
6+
"dtype": "tim::vx::ops::BidirectionalSequenceRnn::ActivationType",
7+
"range":["tim::vx::ops::BidirectionalSequenceRnn::ActivationType::kNONE",
8+
"tim::vx::ops::BidirectionalSequenceRnn::ActivationType::kRELU",
9+
"tim::vx::ops::BidirectionalSequenceRnn::ActivationType::kRELU1",
10+
"tim::vx::ops::BidirectionalSequenceRnn::ActivationType::kRELU6",
11+
"tim::vx::ops::BidirectionalSequenceRnn::ActivationType::kTANH",
12+
"tim::vx::ops::BidirectionalSequenceRnn::ActivationType::kSIGMOID",
13+
"tim::vx::ops::BidirectionalSequenceRnn::ActivationType::kHARDSIGMOID"]
14+
},
15+
{"name": "time_major",
16+
"dtype": "bool",
17+
"Optional": "true",
18+
"default": "false"
19+
},
20+
{"name": "merge_outputs",
21+
"dtype": "bool",
22+
"Optional": "true",
23+
"default": "false"
24+
}
25+
]
26+
}
27+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"HashtableLookup":{
3+
"parameters":
4+
[]
5+
}
6+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"L2Normalization":{
3+
"parameters":
4+
[
5+
{"name": "axis",
6+
"dtype": "int32_t"
7+
}
8+
]
9+
}
10+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"LayerNormalization":{
3+
"parameters":
4+
[
5+
{"name": "axis",
6+
"dtype": "int32_t",
7+
"Optional": "true",
8+
"default": "0"
9+
},
10+
{"name": "eps",
11+
"dtype": "float",
12+
"Optional": "true",
13+
"default": "1e-5f"
14+
}
15+
]
16+
}
17+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"MaxpoolWithArgmax":{
3+
"parameters":
4+
[
5+
{"name": "padding",
6+
"dtype": "tim::vx::PadType",
7+
"range": ["tim::vx::PadType::NONE",
8+
"tim::vx::PadType::AUTO",
9+
"tim::vx::PadType::VALID",
10+
"tim::vx::PadType::SAME"]
11+
},
12+
{"name": "ksize",
13+
"dtype": "std::array<uint32_t,2>",
14+
"Optional": "true",
15+
"default": "{0,0}"
16+
},
17+
{"name": "stride",
18+
"dtype": "std::array<uint32_t,2>"
19+
},
20+
{"name": "round_type",
21+
"dtype": "tim::vx::RoundType",
22+
"Optional": "true",
23+
"default": "tim::vx::RoundType::FLOOR",
24+
"range": ["tim::vx::RoundType::FLOOR",
25+
"tim::vx::RoundType::CEILING"]
26+
},
27+
{"name": "layout",
28+
"dtype": "tim::vx::DataLayout",
29+
"Optional": "true",
30+
"default": "tim::vx::DataLayout::WHCN",
31+
"range":["tim::vx::DataLayout::ANY",
32+
"tim::vx::DataLayout::WHCN",
33+
"tim::vx::DataLayout::CWHN"]
34+
}
35+
36+
]
37+
}
38+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"MaxpoolWithArgmax2":{
3+
"parameters":
4+
[
5+
{"name": "padding",
6+
"dtype": "tim::vx::PadType",
7+
"range": ["tim::vx::PadType::NONE",
8+
"tim::vx::PadType::AUTO",
9+
"tim::vx::PadType::VALID",
10+
"tim::vx::PadType::SAME"]
11+
},
12+
{"name": "ksize",
13+
"dtype": "std::array<uint32_t,2>",
14+
"Optional": "true",
15+
"default": "{0,0}"
16+
},
17+
{"name": "stride",
18+
"dtype": "std::array<uint32_t,2>"
19+
},
20+
{"name": "round_type",
21+
"dtype": "tim::vx::RoundType",
22+
"Optional": "true",
23+
"default": "tim::vx::RoundType::FLOOR",
24+
"range": ["tim::vx::RoundType::FLOOR",
25+
"tim::vx::RoundType::CEILING"]
26+
},
27+
{"name": "layout",
28+
"dtype": "tim::vx::DataLayout",
29+
"Optional": "true",
30+
"default": "tim::vx::DataLayout::WHCN",
31+
"range":["tim::vx::DataLayout::ANY",
32+
"tim::vx::DataLayout::WHCN",
33+
"tim::vx::DataLayout::CWHN"]
34+
}
35+
36+
]
37+
}
38+
}

include/tim/vx/ops/abs.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"Abs":{
3+
"parameters":
4+
[]
5+
}
6+
}

include/tim/vx/ops/add.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"Add":{
3+
"parameters":
4+
[]
5+
}
6+
}

include/tim/vx/ops/addn.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"AddN":{
3+
"parameters":
4+
[
5+
{"name":"num_inputs",
6+
"dtype": "uint32_t"
7+
}
8+
]
9+
}
10+
}

0 commit comments

Comments
 (0)