Commit Graph

203 Commits

Author SHA1 Message Date
Kee c4e75674fa
Refine platform code and samples (#713)
* Refine platform code and samples

1. Support viplite v2 API
2. Unify the Lite and Native platform APIs so that the same code
   can run on different platforms through different compilation options.

Type: Code Improvement

Signed-off-by: Kee <xuke537@hotmail.com>

* Fix build error if VSI device API is not supported

Signed-off-by: Kee <xuke537@hotmail.com>

---------

Signed-off-by: Kee <xuke537@hotmail.com>
2025-10-13 13:15:31 +08:00
Chen Feiyue 8894360c74
Adding api-compatible guarding for updated ops (#695)
* Fixed typing error in gather test

Deleted the external output tensor creation in scalar_1d test

Type: Bug Fix
Signed-off-by: Feiyue Chen <Feiyue.Chen@verisilicon.com>

* Added ifdef marco for some later added ops

Type: Code Improvement
Signed-off-by: Feiyue Chen <Feiyue.Chen@verisilicon.com>

---------

Signed-off-by: Feiyue Chen <Feiyue.Chen@verisilicon.com>
2024-05-22 09:51:58 +08:00
Antkillerfarm 3ea908ca6d
Add some trigonometric ops (#689)
Add cos/tan/arctan/arctanh/arccosh

Type: New Feature

Signed-off-by: Tang Jing <jing.tang@verisilicon.com>
2024-04-01 15:56:50 +08:00
Chen Feiyue 8ca1382474
Added Asymmetric perchannel quantization support (#682)
Type: New Feature

Signed-off-by: Feiyue Chen <Feiyue.Chen@verisilicon.com>
2024-02-27 09:37:33 +08:00
Chen Feiyue b4b4f00f47
Added opjson and bug fix for scatternd_onnx_v16 (#678)
Fixed typing error of missed param in this op's clone function

Type: Code Improvement

Signed-off-by: Feiyue Chen <Feiyue.Chen@verisilicon.com>
2024-01-12 11:49:46 +08:00
Chen Feiyue 54b9c6750e
Fixed unreasonable type of parameter in broadcast (#505)
Change type of shape from int to uint & add ut for broadcast
From github issue https://github.com/VeriSilicon/TIM-VX/issues/376
Define opversion to avoid incompatibility with upper level software

Type: Code Improvement

Signed-off-by: Feiyue Chen <Feiyue.Chen@verisilicon.com>
2024-01-04 21:38:05 +08:00
Chen Feiyue e8dab60cf2
Update ops which has addings in internal (#675)
Added Tan Cos operaion
Added reduction param in scatternd_onnx_v16
Added R2X bias in bidirectional_lstm

Type: New Feature

Signed-off-by: Feiyue Chen <Feiyue.Chen@verisilicon.com>
2024-01-03 16:37:35 +08:00
Chen Feiyue 9b945633d7
Fixed typing error and added missed opheader (#673)
Correct file name of moments operation
Added groupedconv1d header in ops.h

Type: Code Improvement

Signed-off-by: Feiyue Chen <Feiyue.Chen@verisilicon.com>
2024-01-03 09:47:47 +08:00
Zhouheng Zheng 622c472edf
Add uid() api for class operation (#668)
Type: Code Improvement
2023-12-18 22:32:21 +08:00
chxin66 0dc7a3465e
fix const tensor align bug in AlignPermuteVectorForElementWise (#666)
* fix const tensor align bug in AlignPermuteVectorForElementWise

Signed-off-by: Chen <jack.chen@verisilicon.com>

* fix build issue use android ndk

Type: Bug fix

Signed-off-by: Chen <jack.chen@verisilicon.com>

* Fix inappropriate comments for reduce layoutinfer

Type: Code refine

Signed-off-by: Chen <jack.chen@verisilicon.com>

---------

Signed-off-by: Chen <jack.chen@verisilicon.com>
Co-authored-by: Chen <jack.chen@verisilicon.com>
2023-12-11 16:59:37 +08:00
Chen Feiyue 4fde0badb2
Refine UnitTest which have acc issue or unspport issue in sp (#659)
1.Skip elementwise/relational op unittest if input/output have INF which sp cannot
handle
2.Set different tolerance in Layernom/SoftMax/GRU unittest if SP supported

Type: Bug Fix
Issue: 37103

Signed-off-by: Feiyue Chen <Feiyue.Chen@verisilicon.com>
2023-11-20 14:42:41 +08:00
Chen Feiyue bb10884f98
Added scalar type support (#655)
Added SetScalar api to support scalar input
Added 2 cases for scalar index Gather

Type: New Feature

Signed-off-by: Feiyue Chen <Feiyue.Chen@verisilicon.com>
2023-11-06 09:58:03 +08:00
xie-oritek 10081790ee
Add ScatterND_Update operator (#652)
* Add ScatterND_Update operator

* Remove ScatterNDUpdate shape param

* Rename ScatterND_Update to ScatterND_ONNX_V16

* Fix ScatterND_ONNX_V16 rename problem

---------

Co-authored-by: unknown <z0026@china.oritek.com.cn>
2023-10-11 09:12:40 +08:00
Chen Feiyue 61ea0091ca
Fixed unsupported float16 bias in fc (#646)
Resolve the issue of underlying hardware not supporting float16 bias in fc
by converting bias type to float32

Type: Code Improvement

Signed-off-by: Feiyue Chen <Feiyue.Chen@verisilicon.com>
2023-09-13 09:44:21 +08:00
Antkillerfarm 98966dac9c
build fix for export Swap Handle API (#643)
PR #635 build error fix

Type: bug fix

Signed-off-by: Tang Jing <jing.tang@verisilicon.com>
2023-08-30 14:25:45 +08:00
chxin66 01235266c5
fixed tensor cache mismatch issue (#644)
Type: Bug fix

Signed-off-by: Chen <jack.chen@verisilicon.com>
Co-authored-by: Chen <jack.chen@verisilicon.com>
2023-08-30 14:23:20 +08:00
Antkillerfarm 3bbe2ef9ec
export Swap Handle API (#635)
export vsi_nn_SwapHandle & vsi_nn_SwapTensorHandle &
vsi_nn_SwapTensorHandleWithCache for TIM-VX usage.

Type: New Feature

Signed-off-by: Tang Jing <jing.tang@verisilicon.com>
2023-08-28 09:15:43 +08:00
xie-oritek 7fc264a9e6
Refine Tensor::SetShape api to avoid compile warning using const ref (#640)
* Move int4/uint4 to the end of DataType

* Refine api Tensor::SetShape, using const ref avoid compile warning
2023-08-25 00:47:24 +08:00
MercuryChen 6f34b66ae4
Split replayer code from tracer.h (#642)
* Add support for different input dtype of MaxPoolGrad.

Type: Code improvement

* Integrate api trace into tim-vx source code, as part of experimeantal.

Type: New Feature

* Refine api trace code and document
Add missing traced apis of tim::vx::Quantization

Type: Code improvement

* Split Api relayer code out of tracer.
To enable compile replayer code in machine which can't access high version boost libs.

Type: Code improvement
2023-08-25 00:41:45 +08:00
xie-oritek 265e74ff16
Add int4/uint4 definition (#638) 2023-08-22 17:37:38 +08:00
xie-oritek 54af5c2216
Add CumSum&LRN operator to trace module (#639) 2023-08-22 16:53:59 +08:00
xie-oritek bab571b569
Fix data missing when use trace::Graph::CreateTensor (#636) 2023-08-22 16:53:24 +08:00
Chen Feiyue 9bb3e7c68b
Fixed misleading test case bug in deconv1d (#633)
Correct erros of deconv1d unittest
Added hint in the header indicating that padtype is not supported yet
Added 2 cases for deconv1d

Type: Code Improvement
Issue: github issue #585

Signed-off-by: Feiyue Chen <Feiyue.Chen@verisilicon.com>
2023-08-17 21:26:54 +08:00
MercuryChen cf2efc63fd
Refine api trace code and document (#634)
* Add support for different input dtype of MaxPoolGrad.

Type: Code improvement

* Integrate api trace into tim-vx source code, as part of experimeantal.

Type: New Feature

* Refine api trace code and document
Add missing traced apis of tim::vx::Quantization

Type: Code improvement
2023-08-17 21:16:34 +08:00
Chen Feiyue af50cc5e3f
Added general Float16 support (#631)
Added Float16 type definition from third-party
Refine float16 bias handlling in conv2d
Refine float16 case in conv2d
Caution: Headers of float16 only be included when build unit_test

Type: New Feature

Signed-off-by: Feiyue Chen <Feiyue.Chen@verisilicon.com>
2023-08-12 10:04:16 +08:00
Chen Feiyue 35e50d7692
Added op fusion for mean_stddev_normalization (#629)
Added op fusion for mean_stddev_normalization ops such as layernorm and
instance norm

Type: New Feature

Signed-off-by: Feiyue Chen <Feiyue.Chen@verisilicon.com>
2023-08-09 22:10:45 +08:00
Sven 821864a582
Fixed IExecutable object not bind with DeviceID (#624)
If Executable object doesn't bind with a concrete DeviceID,
it will go first device by default.

When run multi executable with multi device, the behavior is not
expected. Fixed by attach device id with CompileOption.

Signed-off-by: xiang.zhang <xiang.zhang@verisilicon.com>
2023-07-24 22:45:54 +08:00
MercuryChen 315adcf076
Integrate api trace into tim-vx source as an experimental feature. (#623)
* Add support for different input dtype of MaxPoolGrad.

Type: Code improvement

* Integrate api trace into tim-vx source code, as part of experimeantal.

Type: New Feature
2023-07-19 18:40:48 +08:00
Chen Feiyue 0885a0d797
Remove confusing comment in depthwise conv test (#621)
Remove wrong layout comment for depthwise conv unit test
Add comment of layout condition in basic class for depthwise conv

Type: Code Improvement
Signed-off-by: Feiyue Chen <Feiyue.Chen@verisilicon.com>
2023-07-17 09:43:34 +08:00
Chen Feiyue 62c6b6560c
Added axis param for TopK (#610)
Topk support specifying dimensions with later internal ovxlib

Type: New Feature

Signed-off-by: Feiyue Chen <Feiyue.Chen@verisilicon.com>
2023-07-12 09:54:07 +08:00
chxin66 ea8046ec9c
Added roi_align layoutinfer & cases (#615)
* Added roi_align layoutinfer & cases

Type: New feature

Signed-off-by: Chen <jack.chen@verisilicon.com>

* Update instancenorm op spec .json

Type: bug fix

Signed-off-by: Chen <jack.chen@verisilicon.com>

* Added roi_pool layoutinfer & fixed case bug

Type: new feature

Signed-off-by: Chen <jack.chen@verisilicon.com>

---------

Signed-off-by: Chen <jack.chen@verisilicon.com>
Co-authored-by: Chen <jack.chen@verisilicon.com>
2023-07-08 23:39:56 +08:00
Chen Feiyue 33f3a4f176
Enable float16 bias convolution model runs on NN (#612)
Convert float16 bias tensor to float32 to meet condition of NN
convolution in driver

Caution: Clang version requires minimum 15.0

Type: Code Improvement
Issue: bugzilla id:32785 | jira id VIVD-744

Signed-off-by: Feiyue Chen <Feiyue.Chen@verisilicon.com>
2023-06-30 09:41:28 +08:00
chxin66 34812fe40e
Added case for gather (#599)
Signed-off-by: Chen <jack.chen@verisilicon.com>
Co-authored-by: Chen <jack.chen@verisilicon.com>
2023-06-26 09:15:08 +08:00
Chen Feiyue 75882d4195
Added new_axis_mask param for stridedslice (#600)
Add another constructor for stridedslice when new_axis_mask is set

The layout inference need to reconstruct the axis mapping when
new_axis_mask is set(TODO)

Type: New Feature

Signed-off-by: Feiyue Chen <Feiyue.Chen@verisilicon.com>
2023-06-25 09:24:41 +08:00
Chen Feiyue fbfbdd7c83
Added axis support for layernorm (#602)
Layernormolization can handle non zero axis now
Added case to verify layernorm with axis 2
Modify layernorm opjson

Type:  Code Improvement

Signed-off-by: Feiyue Chen <Feiyue.Chen@verisilicon.com>
2023-06-15 21:45:46 +08:00
Chen Feiyue aa7b3a6f8f
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>
2023-06-02 07:51:10 +08:00
chxin66 ea8adc456a
fixed instance norm bug & add its layoutinfer (#593)
Type: Bug fix

Signed-off-by: Chen <jack.chen@verisilicon.com>
Co-authored-by: Chen <jack.chen@verisilicon.com>
2023-05-31 12:55:42 +08:00
chxin66 4f92e58155
optimization for tiny_yolov4 (#591)
Type: code improvment

Signed-off-by: Chen <jack.chen@verisilicon.com>
Co-authored-by: Chen <jack.chen@verisilicon.com>
2023-05-23 14:28:47 +08:00
shijie001 51faf286c2
Fixed LayerNormalization eps bug (#589) 2023-05-22 14:13:44 +08:00
Chen Feiyue 3f83db534d
Added missed ops include header (#584)
Include cumsum, mod, maxpool3d, grucell, UnidirectionalSequanceGRU header file in
ops.h

Type:  Code Improvement

Signed-off-by: Feiyue Chen <Feiyue.Chen@verisilicon.com>
2023-05-16 15:59:16 +08:00
Chen Feiyue 3c372dd646
Refine UnidirectionalGRU and GRUCell (#587)
Refine unidirectional_gru and gru_cell code to avoid including ovxlib files
in header of some op
Introduce TranslateToVsibool function to support above code refinement

Type: Code Improvement

Signed-off-by: Feiyue Chen <Feiyue.Chen@verisilicon.com>
2023-05-15 16:44:51 +08:00
Chen Feiyue b81f7979fa
Reload "==" operator for quantizations of two tensor (#583)
Reload operator "==" to check two quantization same or not

Type: New Feature
Signed-off-by: Feiyue Chen <Feiyue.Chen@verisilicon.com>
2023-05-10 17:58:30 +09:00
SCUWQ 1543efe098
Add some tensor dtype convert APIs (#576)
For pre/post process.

Type: Code Refine

Co-authored-by: wangqian <wangqian@CNCDD9444.verisilicon.com>
2023-04-27 09:04:39 +08:00
liyuenan 27890719b6
Support remote platform by gRPC (#561)
* Support remote platform by gRPC

Signed-off-by: yuenan.li <yuenan.li@verisilicon.com>
2023-03-28 09:51:23 +08:00
Zhouheng Zheng e49f67b840
Remove tensor GetDataRef api (#569)
Co-authored-by: zhouheng.zheng <zhouheng.zheng@ouotlook.com>
2023-03-23 21:35:30 +08:00
Tang d778dfb82d update copyright information 2023-01-20 12:49:48 +08:00
meseraph 20f759e58a fix depth2space mode enum 2023-01-17 22:44:44 +08:00
meseraph cc34b5f0ea mapped pool1d 2022-12-30 10:52:28 +08:00
Chen Xin 7582b57edc Added pad_v2 & pad_v2 layout infer
And added 4 rank case

Type: Added new op
Signed-off-by: Chen Xin <jack.chen@verisilicon.com>
2022-12-16 15:03:58 +08:00
Feiyue Chen 8d8f4b6e68 Added EmbeddingLookup & deprecate LshProjection
Added EmbeddingLookup and unit test
Changed LshProjection op status to Deprecated

Type: New Feature
Signed-off-by: Feiyue Chen <Feiyue.Chen@verisilicon.com>
2022-12-05 09:59:56 +08:00