Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hpvm-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
llvm
hpvm-release
Commits
6326feca
Commit
6326feca
authored
3 years ago
by
gaurip2
Browse files
Options
Downloads
Patches
Plain Diff
Changed Hetero-C references to Hetero-C++
parent
91a60b70
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hpvm/docs/how_to_guides/writing-heteroc-program.rst
+10
-10
10 additions, 10 deletions
hpvm/docs/how_to_guides/writing-heteroc-program.rst
with
10 additions
and
10 deletions
hpvm/docs/how_to_guides/writing-heteroc-program.rst
+
10
−
10
View file @
6326feca
Writing a Hetero-C Program
Writing a Hetero-C
++
Program
==========================
The following document describes various programming patterns supported
by the ``Hetero-C`` api. Please refer to the `Hetero-C Language
by the ``Hetero-C
++
`` api. Please refer to the `Hetero-C
++
Language
Specification </developerdocs/specifications/hetero-c.rst>`__ for a detailed description of the
invidiual api calls.
A Hetero-C program can be divided into 2 categories. **Dataflow Code**
A Hetero-C
++
program can be divided into 2 categories. **Dataflow Code**
which describes the structure of the hierarchical dataflow graph, and
the **Host Code** which describes the actual inputs passed to the
Dataflow Graph (DFG) and the outputs requested after its execution
...
...
@@ -93,7 +93,7 @@ appropriate arguments.
Parallel Section, Tasks and Loops
---------------------------------
Hetero-C enables specifying course-grained Task level parallelism, as
Hetero-C
++
enables specifying course-grained Task level parallelism, as
well as fine-grained data-parallel parallelism via corresponding api
calls.
...
...
@@ -114,7 +114,7 @@ at the source level.
}
If we want to consider this entire loop execution as a single
computational task we can describe it in ``Hetero-C`` as:
computational task we can describe it in ``Hetero-C
++
`` as:
.. code:: cpp
...
...
@@ -259,7 +259,7 @@ below:
__hetero_section_end(Section);
}
Hetero-C infers tasks dependencies by looking at the input and output
Hetero-C
++
infers tasks dependencies by looking at the input and output
pointers for each task. For ``T1`` and ``T2``, their input pointers are
different, hence will be infered to be parallel to each other. Both
tasks respectively mutate the array content and then specify they wrote
...
...
@@ -361,7 +361,7 @@ different ways. Users can choose to break a Parallel Task into multiple
subtasks in the same source level function , which can contain complex
and nested interdependencies as described above.
As an alternative mode of expression, users can use the ``Hetero-C`` api
As an alternative mode of expression, users can use the ``Hetero-C
++
`` api
to describe Parallel Sections across numerous functions and invoke calls
to those functions, essentially connecting the end-point nodes of their
respective DFG’s and creating hierarchichy.
...
...
@@ -499,7 +499,7 @@ Across Functions
For larger programs, it’s often not feasible to nest the computation
inside a single function as it becomes difficult to read. For such
cases, ``Hetero-C`` allows appending the HPVM Dataflow graph across
cases, ``Hetero-C
++
`` allows appending the HPVM Dataflow graph across
functions. Consider the ``MAC`` program we created in the previous
code-snippet:
...
...
@@ -615,7 +615,7 @@ arguments as folllows:
/* Number of Output Buffer Pairs */ 2, P1, P1Sz, P2, P2Sz);
// Calling the HPVM Dataflow function Prod
// with the appropriate arguments. Hetero-C
// with the appropriate arguments. Hetero-C
++
// will connect the end-points of both
// Dataflow Graphs and create heirarchy.
Prod(P1, P1Sz, P2, P2Sz,
...
...
@@ -640,7 +640,7 @@ arguments as folllows:
__hetero_section_end(Section);
}
Note the call to ``Prod`` inside Task ``T1``. ``Hetero-C`` will
Note the call to ``Prod`` inside Task ``T1``. ``Hetero-C
++
`` will
recognize that ``Prod`` is also a Dataflow graph and will connect the
nodes of ``MAC`` and ``Prod``. If a non HPVM Dataflow graph function is
called inside a Task, it will be considered part of the same node.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment