-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[Relay][Docs] Relay Language Reference #2232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
50f626a
Add back draft langref from before
slyubomirsky fd4ae4d
Move relay docs to top-level langref dir
slyubomirsky 65fbaaa
Pass over expression documentation
slyubomirsky 37ef0d7
Corrections to examples, etc., in expr docs
slyubomirsky e7c5a04
Incorporate jroesch's specific suggestions
slyubomirsky 3d30695
Deduplicate text in function description
slyubomirsky 1451e6d
Remove note about polymorphism not being implemented; it is!
slyubomirsky ad9c30c
Mistake in example code
slyubomirsky 1aabbc5
Shape should precede dt in all examples
slyubomirsky 8e97f2a
Bring if-else, tuple type, and tensor type syntax in line with text f…
slyubomirsky b7f25ef
Typo
slyubomirsky 1a2e89d
Typo pass in relay_expr
slyubomirsky 5344b79
Correct typos and rephrasing some descriptions in relay_type
slyubomirsky 7509d01
If blocks should have braces
slyubomirsky 8faa741
Include Relay intro in the section index
slyubomirsky 853fb70
Add subsection on Relay graph bindings
slyubomirsky 2c8efbf
Add internal hyperlinks to Relay dev guide and operator tutorial
slyubomirsky 2a59e6d
Incorporate @joshpoll's suggestions in relay_expr
slyubomirsky 1c535ad
Incorporate @joshpoll's suggestions in the langref index
slyubomirsky c6b6b46
Further edit in introduction to relay_expr
slyubomirsky cf7919c
A couple of further edits to the langref index suggested by @joshpoll
slyubomirsky 3233192
Apply numerous corrections by @joshpoll
joshpoll a61ebca
Further clarification in langref index
slyubomirsky 36fe812
More small corrections to relay_expr
slyubomirsky 7f6a13f
Further tweaks and more examples in relay_expr
slyubomirsky c0c351f
More tweaks and incorporated suggestions in relay_type
slyubomirsky 4b45cd8
Typo in example
slyubomirsky f26eeac
Further clarification on calls and control flow
slyubomirsky ffef4c8
Make dataflow vs control a section, reorganize relay_expr
slyubomirsky 90bed3a
Subsection on TempExpr
slyubomirsky a1c8a3a
Move Relay in index to before Hybrid Script
slyubomirsky d73a0bc
Reorganize function discussion, add module section
slyubomirsky 12ad89a
Numerous corrections and clarifications by @joshpoll
joshpoll 342e7db
Add references to module, kinds, and type relations
slyubomirsky e2e4df8
Note on reordering let bindings from @joshpoll
joshpoll fadf3b5
Clarify semantics of if-then-else
slyubomirsky File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,41 @@ | ||
| Language Reference | ||
| ================== | ||
| This document provide references to | ||
| embedded languages in TVM stack. | ||
| This document provides references to | ||
| embedded languages and IRs in the TVM stack. | ||
|
|
||
| Introduction to Relay | ||
| --------------------- | ||
|
|
||
| Relay is a functional, differentiable programming language | ||
| designed to be an expressive intermediate representation for machine | ||
| learning systems. Relay supports closures, control flow, and | ||
| recursion, allowing it to directly represent more complex models | ||
| than can computation graph-based IRs. | ||
| Relay also includes a form of dependent typing using *type relations* | ||
| in order to handle shape analysis for operators with complex | ||
| requirements on argument shapes. | ||
|
|
||
| Relay is extensible by design and makes it easy for machine learning | ||
| researchers and practitioners to develop new large-scale program | ||
| transformations and optimizations. | ||
|
|
||
| The below pages describe the grammar, type system, and operators in Relay, respectively. | ||
|
|
||
| .. toctree:: | ||
| :maxdepth: 2 | ||
|
|
||
| relay_expr | ||
| relay_type | ||
| relay_op | ||
|
|
||
| Hybrid Script | ||
| ------------- | ||
|
|
||
| The below page describes the TVM hybrid script front-end, | ||
| which uses software emulation to support some constructs not | ||
| officially supported in TVM. | ||
|
|
||
| .. toctree:: | ||
| :maxdepth: 2 | ||
|
|
||
| hybrid_script | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.