Skip to content

TUNIP - #2

Closed
junrushao wants to merge 1 commit into
yelite:mainfrom
junrushao:tunip
Closed

junrushao wants to merge 1 commit into
yelite:mainfrom
junrushao:tunip

Conversation

@junrushao

@junrushao junrushao commented Apr 23, 2022 •

Copy link
Copy Markdown

Infra challenges:

  • Concise scoping
  • Special constant: T/R
  • IRScope-based dispatch
  • Undefined variables => retrieve a frame which is either TIRFrame, or VarDefFrame
  • Sugaring operator calls => op attributes
  • Variables without name, e.g. buffer.data

@junrushao
junrushao force-pushed the tunip branch 4 times, most recently from 40b7314 to b9a4372 Compare April 24, 2022 05:49
@junrushao
junrushao changed the base branch from tvm-script-unified-printer to main April 24, 2022 05:49
class FrameNode : public Object {
public:
Array<ObjectRef> objs;
SymbolTable sym;

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
SymbolTable sym;
SymbolTableNode *sym;

Comment thread src/script/printer/doc.h
class ScopeDocNode : public StmtDocNode {
public:
ExprDoc lhs{nullptr};
ExprDoc rhs{nullptr};

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the rhs be Optional?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes for LHS

Comment thread src/script/printer/doc.h

class ExprStmtDocNode : public StmtDocNode {
public:
Optional<ExprDoc> expr{NullOpt};

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the use case for an ExprStmtDoc with empty expr?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create a new node to represent block comment, and make this required

@junrushao junrushao closed this Apr 26, 2022
yelite pushed a commit that referenced this pull request Aug 26, 2022
* Revert "[skip ci] Revert "[ci] Default to n=2 for test parallelism (apache#12376)" (apache#12413)"

This reverts commit 478b672.

* [ci] Default to n=2 for test parallelism

This is attempt #2 of apache#12376 which was reverted in apache#12413. The changes
in `plugin.py` should keep all the tests on the same node so sporadic
failures don't happen due to scheduling.

Co-authored-by: driazati <driazati@users.noreply.github.com>
@junrushao
junrushao deleted the tunip branch September 17, 2022 21:53
yelite pushed a commit that referenced this pull request Feb 17, 2023
Co-authored-by: ZihengJiang <ziheng@apache.org>
yelite pushed a commit that referenced this pull request Feb 17, 2023
* [IR] Introduce StructInfo

* StructInfoFunctor and Analysis Support

* [TVMScript] Parse type/shape annotation with StructInfo

* remove runtime type assign

* Remove type/shape during parsing (#2)

* Normalizer prep: simple checks and legacy function renaming.

* Struct info deduction in BlockBuilder.

* Two TODOs

* StructInfo Normalizer Fixes (#3)

* StructInfo AST Fix

* Fix Extern Func Deduction and shape mutator.

* Update VoidStructInfo & globalvar (#4)

* Fix passes and proper sinfo propagation.

* Refactor EraseToWellDefined to Enable Remapping

* [WIP] First stab at symbolic param tracking

* Update EraseToWellDefined to support symbolic shape return (#5)

* fix R.shape with ndim (#6)

* Remove update shape/type

* Address review comment, AnnotateTypeShape=>AnnotateStructInfo

* Update include/tvm/script/ir_builder/relax/frame.h

Co-authored-by: Ruihang Lai <ruihangl@cs.cmu.edu>

* Address comments

* Update printer to use structinfo (#7)

* Update Error mechanism to prep for obj loc based reporting

* Symbolic shape aware function call return value derivation.

The main flow works as follows:
- Match and populate shape_var_map and var_map by visit each pair of
  param and call arguments.
- Call EraseToWellDefined to map the ret parameter to new result.

* [ANALYSIS] Refactor well-form to only look at struct info.

* Update comments according to reviews.

* Update include/tvm/relax/struct_info.h

Co-authored-by: Ruihang Lai <ruihangl@cs.cmu.edu>

Co-authored-by: Siyuan Feng <Hzfengsy@sjtu.edu.cn>
Co-authored-by: Tianqi Chen <tqchen>
Co-authored-by: Ruihang Lai <ruihangl@cs.cmu.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants