Commit Graph

13 Commits

Author SHA1 Message Date
Tristan Konolige 96a7a5811f [TVMSCRIPT] Fix printing of rank 0 buffer access (#8215)
* [TVMSCRIPT] Fix printing of rank 0 buffer access

Also improve error messages and fix min/max/Select.

* fixes

* return fix

* remove print
2021-06-16 10:26:01 -07:00
Honghua Cao 55459e74dd [TVMSCRIPT] Add tir.min node in tvm script (#8219)
Co-authored-by: honghua.cao <honghua.cao@streamcomputing.com>
2021-06-09 09:52:28 -04:00
Mehrdad Hessar a1cd6d51b8 fix py files (#8194) 2021-06-04 23:22:46 +01:00
Siyuan Feng 22c8f8cca5 [TensorIR][Pass][M1c] FlattenBuffer (#7962)
Co-authored-by: Tianqi Chen <tqchen@users.noreply.github.com>
Co-authored-by: Ruihang Lai <lairuihangdongdong@qq.com>
2021-05-03 10:28:28 -07:00
Manupa Karunaratne 1fb32b0551 [TIR] An analysis pass to calculate workspace size for primfuncs (#7859)
* Add workspace size calculation for primfuncs

This commit introduces functionality to query the workspace size
as required by a tir primfunc by looking at tir.allocates inside of it

Change-Id: I6f8ca90408b6e35d17ec818998a0f158a268a2a6

* Add workspace size calculation for primfuncs

*change int --> size_t

Change-Id: If7fafec0269937d70184e7696e44386b74116d86

* Add workspace size calculation for primfuncs

* int --> size_t change for analysis.h

Change-Id: I9e5c5e5f8458663390c50cf56f1a11910687928d

* Add workspace size calculation for primfuncs

* lambda scope fix

Change-Id: I0c9b4c529150de8e0a5e170887cc935b7d0f6af2

Co-authored-by: Chenfan <jcf94@outlook.com>
2021-04-18 20:21:32 +08:00
Siyuan Feng 7f567264ae [TensorIR] [Script] adding support for opaque block (#7829)
* change complete tag

* add parsing support for opaque block

* address and add testcase

* address

* address
2021-04-13 14:08:48 -07:00
Siyuan Feng fffed0ff91 [TensorIR] TVMScript Parser/Printer (#7630)
Co-authored-by: Bohan Hou <32121147+spectrometerHBH@users.noreply.github.com>
Co-authored-by: Junru Shao <junrushao1994@gmail.com>
Co-authored-by: Tianqi Chen <tqchen@users.noreply.github.com>
Co-authored-by: Ruihang Lai <lairuihangdongdong@qq.com>
Co-authored-by: Hongyi Jin <3231950289@qq.com>
Co-authored-by: Wuwei Lin <wuwei@apache.org>
Co-authored-by: Tristan Konolige <tristan.konolige@gmail.com>
Co-authored-by: Cody Yu <comaniac0422@gmail.com>
2021-03-20 16:22:53 -04:00
Tianqi Chen 7340c02d0e [TIR][REFACTOR] ForNode introduce thread binding and remove legacy field (#7306)
[TIR][REFACTOR] ForNode update

- Remove deprecated device_api.
- Add ThreadBinding for_type.
- Add additional annotations.

More style consistency refactor to make the ForNode
to be consistent with rest of the codebase.

- ForType => ForKind
- Add constant prefix k to enum consts per Google C style
- Introduce ForKind to the python side.
2021-01-18 23:00:11 -08:00
Tianqi Chen d777e7c612 [TIR][REFACTOR] Enforce allocate to use the correct var pointer hint. (#7216)
* [TIR][REFACTOR] Enforce allocate to only accept buffer_var with correct PtrType.

This is a refactoring step to cleanup legacy issue of opaque buffer
var without ptr type information. Now all the allocation comes with the right
pointer data type. Places touched:

- TVMScript Parser: add the right info to get the correct pointer type.
- Cross thread all reduce: set the right pointer type.
- Storage rewrite: setup the right pointer type.
- Custom dtype: remap the variables with new pointer type.

x

* Address comments

Co-authored-by: Tristan Konolige <tristan.konolige@gmail.com>

Co-authored-by: Tristan Konolige <tristan.konolige@gmail.com>
2021-01-06 16:59:12 -08:00
Tristan Konolige fdfc7eb887 [TVMSCRIPT] Attach span information to tir nodes in tvmscript (#6910) 2020-12-04 20:03:08 -05:00
Tristan Konolige d164aac058 [TVMSCRIPT] Using diagnostics for TVM Script (#6797)
* [TVMSCRIPT] Using diagnostics for TVM Script

* fix lint

* More documentation, improve some error messages

* Apply suggestions from code review

Co-authored-by: Leandro Nunes <leandron85@gmail.com>

* Add synr to ci setup and setup.py

* remove typed_ast dependency

Co-authored-by: Leandro Nunes <leandron85@gmail.com>
2020-11-05 19:24:32 -05:00
Bohan Hou 129333b717 [TVMScript] refactor (#6734)
* [TVMScript] refactor

* [TVMScript] pylint

* [TVMScript] pylint
2020-10-22 06:59:31 -07:00
Tristan Konolige c662638772 Rename tvm.hybrid.script to tvm.script. (#6522) 2020-09-26 15:32:08 -07:00