Commit Graph

367 Commits

Author SHA1 Message Date
Samuel e2fb5039a2 [TOPI][RELAY][PYTORCH]Conv3d_transpose op support added (#5737)
* [TOPI][RELAY][PYTORCH]Conv3d_transpose op support added

* Test cases in topi/relay

* conv3d_transpose_ncdhw_python added

* Review comments fixed
2020-06-11 18:12:35 +09:00
Matthew Brookhart 9f79199822 Add Scatter to Topi/Relay/ONNX via hybrid script (#5619)
* I can construct scatter but not embed it in a Relay Graph

* working 1-4 dimesion scatter

* add scatter to ONNX

fix lint

* isolate tests to cpu backend

* Fix i386 test

* fix gpu tolerance

* use elemwise_shape_func for scatter

* fix incorrect rebase
2020-06-10 07:33:57 +09:00
Yong Wu aa808570db [TOPI][Relay][OP] support dynamic NMS(Non Maximum Suppression), symbolic begin, end, and strides for strided_slice (#4312)
* [TOPI][Relay][OP] Dynamic NMS and strided_slice

* Incorporate comments

* fix nnvm compatibility issues

* fix InferCorrectLayout

* Minor fix

* fix for fuse

* Workaround to pass batch_size into hybrid function to handle dynamic shape

* Seperate rearrange

* fix lint

* fix ci, comments

* change attr to Optional<T>

* clang format

* remove empty lines

* partial ignore for end of strided_slice

* pylint

* add out_indices for gpu get_valid_counts

* change to slice_mode

* clang-format, fix comments

* fix comment

* change slice_mode to string

* fix CI

* update docstring

Co-authored-by: Yao Wang <kevinthesunwy@gmail.com>
2020-06-09 09:48:33 -07:00
Samuel fbc2b87b5c [ONNX]MaxRoiPool, Mod & Xor op support added (#5729) 2020-06-05 14:48:44 +09:00
Dhruva Ray 34c95a89ea [Frontend][TFLite] Add parser support for shape and range (#5329)
* [Relay][Frontend][TFLite] Add parser support for shape and range

Signed-off-by: Dhruva Ray <dhruvaray@gmail.com>

* Incorporated review comments and used new functions

Signed-off-by: Dhruva Ray <dhruvaray@gmail.com>

* Few cosmetic changes

Signed-off-by: Dhruva Ray <dhruvaray@gmail.com>

* Removed an extra line added by rebase...

Signed-off-by: Dhruva Ray <dhruvaray@gmail.com>
2020-06-04 10:55:38 -07:00
Dhruva Ray c2e248f07e [TOPI,RELAY][TFLITE] Sparse to dense operator (#5447)
* [Relay][Frontend][TFLite] Add parser support for shape and range

Signed-off-by: Dhruva Ray <dhruvaray@gmail.com>

* [TOPI,RELAY][TFLITE] Sparse to dense operator

Signed-off-by: Dhruva Ray <dhruvaray@gmail.com>

* use param name in documentation

Signed-off-by: Dhruva Ray <dhruvaray@gmail.com>

* sphinx doc errors fixed

Signed-off-by: Dhruva Ray <dhruvaray@gmail.com>

* incorporated review comments

Signed-off-by: Dhruva Ray <dhruvaray@gmail.com>

* Missing a blank line...

Signed-off-by: Dhruva Ray <dhruvaray@gmail.com>

* use get_tensor_expr

Signed-off-by: Dhruva Ray <dhruvaray@gmail.com>

* Accidently removed this function in the rebase...

Signed-off-by: Dhruva Ray <dhruvaray@gmail.com>

* support default value for default_value

Signed-off-by: Dhruva Ray <dhruvaray@gmail.com>

* clang format fixes

Signed-off-by: Dhruva Ray <dhruvaray@gmail.com>

* topi pylint fixes

Signed-off-by: Dhruva Ray <dhruvaray@gmail.com>
2020-06-04 10:54:56 -07:00
Deepak 43dcbc6bd4 [TENSORFLOW]StatefulPartitionedCall/PartitionedCall Ops support added (#5617)
* Implemented functionInvocation Unit Test for StatefulPartitionedCall operator(working) and initial changes for placeholder(not working as of now)

* Placeholder exercises with tvm

* placeholder interim

* SPOP Test cases structure

* New test cases for spop

* miscellaneous test cases for spop

* Placeholder samples..working with shapes explicitly passed

* Variables test case. Works with the same fix of shape_dict

* SPOP Positive test cases first iteration

* support output tensors as function args, multiple functions

* Corrected Indentation

* filewritter is only for debug purpose

* support variables in function args

* First working iteration of positive spop test cases

* Removed commented code, simplified code

* Code Reorganization- First working iteration of positive spop test cases

* corrected variable name after refactor

* Code Reorganization- First working iteration of positive spop test cases

* move code inside mapped operator function

* Removed extra line

* support variables in function args

* Removed commented code, simplified code

* move code inside mapped operator function

* Code Reorganization- First working iteration of positive spop test cases

# Conflicts:
#	tests/python/frontend/tensorflow/test_forward.py

* Code Reorganization- First working iteration of positive spop test cases

* Function invocation more test cases

* Simplified & Merged different Function Invocation Test cases

* support invocation of nested callables

no need to explicitly handle paratitioned and
statefulPartitioned condition in convert_operator function

* Simplified and Uniform testcases

* support invocation of nested callables

no need to explicitly handle paratitioned and
statefulPartitioned condition in convert_operator function

* Simplified and Uniform testcases

* removed duplicate and renamed testcase

* Negative scenario added for testing operator statefulness. Only Exception to stateful operators are Partitioned & StatefulPartitionedOp which have capability to execute even stateless operators within them

* Miscellaneous reorganization changes for spop scenarios

* Miscellaneous reorganization changes for spop scenarios

* Corrected import of tensorflow modules safely using try except and other code reorganization

* Negative scenario for resource variables handled

* Documentation update for code

* SPOP change in function handling

* handle nested subgraph

* refactor

* get op def compatible with tf 1x & 2x

* Fixed liniting issues

* added doctsring and few nits

* Merged changes for positive test cases and negative test cases

* Moved StatefulPartitionedCall test case to the end of the TC list

* Fixed some typos and semantics

* dmlc-core

* dmlc-core

* fixes

* Addressing Review comments in the PR for SPOP support

* Fixed pylint errors

* Corrected tensorflow import syntax

* Placed the op_def_registry module import outside of for loop

* Removed new stateful operators list and combined these operators with missing operators to display as single list. Also removed throwing seperate exception for stateful ops

Co-authored-by: Prashant Sail <psail4444@gmail.com>
Co-authored-by: maheshambule <mahesh_ambule@persistent.com>
2020-06-04 10:03:42 +05:30
Samuel 3d61dc892c [ONNX]ReduceL1, ReduceL2, ReduceSumSquare, ReduceLogSum ops added (#5721) 2020-06-04 11:06:21 +09:00
Samuel c1f3b2f496 [MXNET]Softmin, trunc op support added (#5715) 2020-06-03 17:29:38 +09:00
Samuel 663a5ab46a [PYTORCH]ReplicationPad support added (#5708) 2020-06-02 09:15:41 +09:00
Zhi c55ed37169 [REFACTOR][RELAY] Replace build_config with PassContext (#5698) 2020-05-29 21:59:35 -07:00
Samuel ff10e6c2fd [ONNX]LpPool Support added (#5696) 2020-05-30 06:29:43 +09:00
Samuel 2599c2cad3 [PYTORCH]Minor bug fixes (#5683)
* [PYTORCH]Minor bug fixes

* Review comment fix, testcase added

* Added testcase for bert model
2020-05-29 16:16:49 +09:00
Samuel 162a29e0b8 [TFLITE]Quantize & Dequantize op (#5394)
* [TFLITE]Quantize & Dequantize op

* Testcases added

* Review comment fixed
2020-05-28 11:10:58 +08:00
lixiaoquan 4f9d4d78a0 [TF] Support TupleWrapper as direct ancestor of control flow ops (#5639) 2020-05-26 11:29:29 -07:00
Wuwei Lin e369c5a9cb [Relay,Topi][OP] affine_grid and grid_sample (#5657)
* [Relay,Topi][OP] affine_grid and grid_sample

* lint
2020-05-23 13:57:58 +09:00
Wuwei Lin e55f9ff115 [Relay, Topi][OP] Correlation (#5628)
* [Relay,Topi] Correlation

* fix

* move

* typo

* Update test_topi_correlation.py
2020-05-22 15:00:33 +09:00
Samuel d090b8e20e [PYTORCH]Padding support (#5638) 2020-05-22 05:44:17 +09:00
Samuel e10ea86fd7 [RELAY][PYTORCH]Resize3d, Upsample3d op support (#5633) 2020-05-21 09:35:28 +09:00
Samuel 0d1a9544e2 [PYTORCH]ReflectionPad2d op (#5624) 2020-05-20 10:10:23 +09:00
Samuel 78e5aa1033 [MXNET]MaxPool3d and AvgPool3d Ops support added (#5614) 2020-05-20 10:09:44 +09:00
ANSHUMAN TRIPATHY 9a9fe973de [Frontend][Tensorflow] Gather nd bug fix for one dim support in tensorflow (#5588)
* [Frontend][Tensorflow] Gather_nd one dim support added

* Test case added

* Doc error handled

* Review comment handled: reverting new attr introduced

* Check added at mxnet frontend

* Doc error handled

* TFLite test case failure resolved
2020-05-19 12:45:02 -07:00
Samuel 2bdf73fabb [KERAS]Global MaxPool3d and AvgPool3d support (#5098) 2020-05-19 21:24:25 +09:00
Dhruva Ray 8a63b7f37c [TFLITE]GATHER_ND (#5508)
Signed-off-by: Dhruva Ray <dhruvaray@gmail.com>
2020-05-18 11:48:17 +09:00
Samuel ce3f73dbc3 [PYTORCH]Matmul fix for batch_matmul (#5604) 2020-05-16 06:43:23 +09:00
Jared Roesch 674f58aea5 [Relay][VM] Memory planner (part 1) (#5144)
* Start on memory planning

WIP

Move to test_memory_passes.py

Work on memory planning

Post-rebase and VM changes

Plumb through the offsets

Basic tests all pass, fix offset to data buffer.

Fix compile errors

Fix ws

Apply suggestions from code review

Co-Authored-By: Haichen Shen <shenhaichen@gmail.com>

Address CR

Update src/runtime/vm/vm.cc

Co-Authored-By: Haichen Shen <shenhaichen@gmail.com>

Fix another comment

Fix lint

Fix

Fix

Fix

Lint is done?

Fix

More fix

Trying to debug

No clue

Fix lint

* Fix docs

* Disable aggressive constant eval

* It works

* Fix lint

* Found issue with dynamic

* Fix the pass, but runtime segfaults

* fix scalar tensor, test_any_elemwise passes

* Fix split pass

* Fix 0-rank issues

* Fix

* debug

* apply Haichen's patch and clean up

* lintgit add .

* fix serializer and test_tyck_alloc_tensor test

* Fix the constant lift pass in presence of closures

* Restore old finder

* Fix rebase issues

* Fix

* Fix

* Fix issue coercing the shapes incorrectly from i64 to i32

* Fix linting

* Fix clang format

* Format memory.cc

* Fix 0-rank case

* Add fix for (0,) shape

* Ignore shapes for now

* Apply suggestions from code review

Co-authored-by: Zhi <5145158+zhiics@users.noreply.github.com>

* Update src/runtime/vm/executable.cc

Co-authored-by: Zhi <5145158+zhiics@users.noreply.github.com>

* Fix

* lint

Co-authored-by: Zhi Chen <chzhi@amazon.com>
Co-authored-by: Zhi <5145158+zhiics@users.noreply.github.com>
2020-05-14 21:46:21 -07:00
Samuel 10c2b7ff58 [MXNET]abs, round, reciprocal, sign, softsign, hard_sigmoid (#5587) 2020-05-14 06:01:36 +09:00
Giuseppe Rossini 301f515c7c Add a quantized conv2 unit test for the tflite front-end (#5558)
Signed-off-by: Giuseppe Rossini <giuseppe.rossini@arm.com>
2020-05-13 11:11:15 -07:00
lixiaoquan aa42f978b8 [RELAY][TF] Support symbolic newshape for Reshape (#5429)
* [RELAY][TF] Support symbolic newshape for Reshape

* Only need to pass data

* Use MakeReshape() in Reshape()

* Change newshape to Expr

* Create a template for Array<T>

* Fuse reshape when newshape is constant

* Make newshape Optional

* Use bool() of Optional

Co-authored-by: Li Xiaoquan <xiaoquan.li@denglin.ai>
2020-05-12 23:37:33 -07:00
Trevor Morris 8a9961123a [PYTORCH] Support max_pool2d_with_indices (#5549)
* Use real output name instead of node_name

* Add pytorch max_pool2d_with_indices converter.

* Add test for maxpool2d with indices

* Add explicit assert for single output

* Only consume output (not indices) from max pool 2d with indices

* undo change
2020-05-13 15:21:16 +09:00
Samuel 8eb6584898 [PYTORCH]expand bug fix (#5576) 2020-05-13 09:09:41 +09:00
Samuel 621a61df5a [FRONTEND]onnx, mxnet, pytorch mathops added (#5561) 2020-05-12 03:56:23 +09:00
Samuel 28057b8660 [TOPI][RELAY][TENSORFLOW]Math ops added (#5502)
* [TOPI][RELAY][TENSORFLOW]Math ops added

* Extra newline removed

* CI fix

* Review comments fixed

* Review comments fixed
2020-05-11 09:32:00 +09:00
Matthew Brookhart 0c43fa056b Apparently, ONNX Conv with no 'pads' defaults to zero padding (#5548) 2020-05-10 08:54:39 +09:00
Matthew Brookhart 36d7fd9ba2 Add Onnx Pad v11 (#5539) 2020-05-08 15:37:45 +09:00
Animesh Jain 786dfb6ab6 [Relay-TFLite] FP32 and Quantized Object Detection Model (#5479)
* TFlite e2e FP32 Object detection model

* Fix test

* [Relay-TFLite] Quantized activations

* Flexbuffer parsing

* Lint

* Relaxing checks.

* Github reviews

* comments

Co-authored-by: Ubuntu <ubuntu@ip-172-31-34-212.us-west-2.compute.internal>
2020-05-08 11:18:18 +08:00
Samuel e29e22247a [RELAY][ONNX]ReduceLogSumExp Operator support (#5453)
* [RELAY]LogSumExp Op Support

* [ONNX]LogSumExp Op Support
2020-05-08 05:50:12 +09:00
Mahesh Ambule 54d47cc372 [Frontend][TFLite] ADD_N operator (#5474) 2020-05-07 13:09:18 -07:00
ANSHUMAN TRIPATHY b3730e575a [FRONTEND][TFLite] Fully connected op conversion made in sync with TFLite (#5510)
* [FRONTEND][TFLite] Fully connected op conversion made in sync with TFLite

* [1] Test case added

* [2] Review comments handled

* [3] Prints removed
2020-05-07 18:36:20 +08:00
Samuel 149965a038 [TFLITE]Select op support for tflite frontend (#5486)
* [TFLITE]Select/Where op support for tflite frontend

* Review comment fixed

* Review comment fixed
2020-05-07 15:27:39 +08:00
Matthew Brookhart 900254d342 Fix an issue with Upsampling and update one test to hit the broken usecase (#5530) 2020-05-07 04:36:01 +09:00
Matthew Brookhart 7eb2451dd6 fix prelu importer and add tests: (#5521) 2020-05-06 12:53:07 +09:00
Thierry Moreau 8599f7c61c [TFLite] Model importer to be compatible with tflite 2.1.0 (#5497) 2020-05-01 17:02:24 -07:00
Samuel 967d7318a3 [MXNET]broadcast and logical op support (#5461)
* [MXNET]broadcast and logical op support

* Review comment fixed
2020-05-01 21:03:45 +08:00
Animesh Jain 9bbf58ab9c Removing older Object detection TFlite test (#5477) 2020-04-30 12:21:27 -07:00
Samuel 095f565f50 [FRONTEND][TFLITE]Logical not op support (#5475) 2020-04-30 16:07:49 +08:00
mbaret 95a816c907 [TFLITE] Match TFLite shape for SSD custom op (#5473)
This patch ensures that the output shape from TVM's
Detection_PostProcess is the same as TFLite's and
expands the unit test to confirm this.

Change-Id: If5db95741533f131241dfebbaa7708dbd528fe70
2020-04-29 09:13:16 -07:00
Mahesh Ambule 063ba63a44 [Frontend][TFLite] support for FILL and SPLIT_V operators (#5330)
* tflite spliv ops

* TFLITE fill and splitv ops

* TFLITE fill and splitv ops

* TFLITE fill and splitv ops

* remove unnecessary operator check
2020-04-29 18:51:57 +08:00
Mahesh Ambule a38f61af45 [Frontend][TFLite] L2_POOL_2D operator (#5452)
* TFLITE fill and splitv ops

* l2_pool_2d op changes in comment

* TFLite l2_pool_2d op added test case in main

* TFLite L2_POOL_2D added check for quantized input
2020-04-29 13:35:54 +08:00
Matthew Brookhart 702db6f9e4 Add RoiAlign to Onnx frontend (#5454) 2020-04-28 10:20:23 +09:00