Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
5a08610c
Commit
5a08610c
authored
Aug 22, 2019
by
Haibin Lin
Committed by
Tianqi Chen
Aug 23, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update hybrid_script.rst (#3799)
parent
1e4aea81
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
docs/dev/hybrid_script.rst
+6
-6
No files found.
docs/dev/hybrid_script.rst
View file @
5a08610c
...
...
@@ -23,23 +23,23 @@ If you are a developer:
1. who is trying writing some preliminary patterns that have not been supported by TVM yet,
maybe :ref:`hybrid-langref-label` is a better place for you.
2. who wants to know the implement
ing
details of this module, you are right here!
2. who wants to know the implement
ation
details of this module, you are right here!
Features
--------
Software
e
mulation
Software
E
mulation
~~~~~~~~~~~~~~~~~~
In software emulation, the most intresting thing is the decorator ``tvm.hybrid.script``.
In software emulation, the most int
e
resting thing is the decorator ``tvm.hybrid.script``.
This decorator helps 2 things:
1. Importing runtime variables
2. Overload the function according to the arguments passed
2. Overload
ing
the function according to the arguments passed
Correct me if I am wrong: I believe that how 1. is implemented is dangerous, but I have no
choice. What I did is add those names into python dict ``func.__global__`` and after
choice. What I did is
to
add those names into python dict ``func.__global__`` and after
the call to ``func`` is done, those names will be cleaned up.
Overload is simple: the decorator checks the arguments' types and determines which function
...
...
@@ -86,7 +86,7 @@ Variables
Because there is no variables in ``HalideIR``, all the mutatable variables will be lowered to an array with size 1.
It takes the first store of a variable as its declaration.
Math
i
ntrinsics
Math
I
ntrinsics
~~~~~~~~~~~~~~~
So far, these math intrinsics, ``log``, ``exp``, ``sigmoid``, ``tanh``, ``power``, and ``popcount``, are supported.
Math intrinsics will be imported by the decorator. Most of the intrinsics are borrowed by library implementation
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment