Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
Hercules
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
Package registry
Model registry
Operate
Environments
Terraform modules
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
Hercules
Commits
db8930e3
Commit
db8930e3
authored
1 year ago
by
Russel Arbore
Browse files
Options
Downloads
Patches
Plain Diff
Some useful comments
parent
ae01ccb8
No related branches found
No related tags found
1 merge request
!24
Handle arrays properly in the runtime (part 1)
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
hercules_ir/src/ir.rs
+3
-0
3 additions, 0 deletions
hercules_ir/src/ir.rs
hercules_samples/matmul/src/main.rs
+4
-0
4 additions, 0 deletions
hercules_samples/matmul/src/main.rs
with
7 additions
and
0 deletions
hercules_ir/src/ir.rs
+
3
−
0
View file @
db8930e3
...
@@ -115,7 +115,10 @@ pub enum Constant {
...
@@ -115,7 +115,10 @@ pub enum Constant {
*/
*/
#[derive(Debug,
Clone,
PartialEq,
Eq,
Hash,
Serialize,
Deserialize)]
#[derive(Debug,
Clone,
PartialEq,
Eq,
Hash,
Serialize,
Deserialize)]
pub
enum
DynamicConstant
{
pub
enum
DynamicConstant
{
// The usize here is a constant value.
Constant
(
usize
),
Constant
(
usize
),
// The usize here is an index (which dynamic constant parameter of a
// function is this).
Parameter
(
usize
),
Parameter
(
usize
),
}
}
...
...
This diff is collapsed.
Click to expand it.
hercules_samples/matmul/src/main.rs
+
4
−
0
View file @
db8930e3
...
@@ -2,6 +2,10 @@ extern crate async_std;
...
@@ -2,6 +2,10 @@ extern crate async_std;
extern
crate
clap
;
extern
crate
clap
;
extern
crate
hercules_rt
;
extern
crate
hercules_rt
;
// To compile currently, run from the Hercules project root directory:
// cargo run --bin hercules_driver hercules_samples/matmul/matmul.hir "Codegen(\"matmul.hbin\")"
// Then, you can execute this example with:
// cargo run --bin hercules_matmul
hercules_rt
::
use_hbin!
(
"matmul.hbin"
);
hercules_rt
::
use_hbin!
(
"matmul.hbin"
);
fn
main
()
{
fn
main
()
{
...
...
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