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
050e7dfa
Commit
050e7dfa
authored
6 months ago
by
Praneet Rathi
Browse files
Options
Downloads
Patches
Plain Diff
sm
parent
87b27f34
No related branches found
Branches containing commit
No related tags found
1 merge request
!115
GPU backend
Pipeline
#201013
failed
6 months ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hercules_cg/src/gpu.rs
+4
-3
4 additions, 3 deletions
hercules_cg/src/gpu.rs
with
4 additions
and
3 deletions
hercules_cg/src/gpu.rs
+
4
−
3
View file @
050e7dfa
...
...
@@ -155,7 +155,7 @@ pub fn gpu_codegen<W: Write>(
(
NodeID
::
new
(
pos
),
*
data
)
};
let
return_type_id
=
&
typing
[
return
_node_id
.idx
()];
let
return_type_id
=
&
typing
[
data
_node_id
.idx
()];
let
return_type
=
&
types
[
return_type_id
.idx
()];
if
return_type
.is_array
()
||
return_type
.is_product
()
||
return_type
.is_summation
()
{
let
objects
=
&
collection_objects
.objects
(
data_node_id
);
...
...
@@ -520,12 +520,13 @@ namespace cg = cooperative_groups;
fn
codegen_launch_code
(
&
self
,
run_debug
:
bool
,
num_blocks
:
usize
,
num_threads
:
usize
,
dynamic_shared_offset
:
&
str
,
w
:
&
mut
String
)
->
Result
<
(),
Error
>
{
write!
(
w
,
"
int main() {{
"
)
?
;
int main("
)
?
;
// The following steps are for host-side C function arguments, but we also
// need to pass arguments to kernel, so we keep track of the arguments here.
let
mut
pass_args
=
String
::
new
();
if
run_debug
{
write!
(
w
,
") {{
"
)
?
;
// The first set of parameters are dynamic constants.
let
mut
first_param
=
true
;
for
idx
in
0
..
self
.function.num_dynamic_constants
{
...
...
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