Skip to content

Commit

Permalink
[Relay][Doc] Docs for new op code (apache#3522)
Browse files Browse the repository at this point in the history
  • Loading branch information
wweic authored and Wei Chen committed Jul 11, 2019
1 parent 674db60 commit d07bb85
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions docs/dev/virtual_machine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,28 @@ If
^^
**Arguments**:
::
RegName if_cond
RegName test
RegName target
size_t true_offset
size_t false_offset

Check if the object at register `if_cond` is `true` or `false`.
If `true`, relative jump by `true_offset`, else relative
Check if the object at register `test` is equal to `target`.
If equal, relative jump by `true_offset`, else relative
jump by `false_offset`.

GetTagi
^^^^^^^
**Arguments**:
::
RegName object
RegName dst

Get the object tag for Datatype object in register `object`. And saves the reult to register `dst`.

Fatal
^^^^^
Fail the virtual machine execution.

Goto
^^^^
**Arguments**:
Expand Down Expand Up @@ -204,6 +218,15 @@ LoadConst

Load the constant at `const_index` from the constant pool. The result is saved to register `dst`.

LoadConsti
^^^^^^^^^^
**Arguments**:
::
size_t val
RegName dst

Load the constant integer `val` to register `dst`. The result is a 0-rank tensor.

Object Representation
~~~~~~~~~~~~~~~~~~~~~
We use a simple object representation that uses shared pointers and tagging.
Expand Down

0 comments on commit d07bb85

Please sign in to comment.