Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
faust
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
Service Desk
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
Admin message
GitLab upgrade completed. Current version is 17.11.4.
Show more breadcrumbs
faust group
faust
Commits
c004615b
There was an error fetching the commit references. Please try again later.
Commit
c004615b
authored
3 years ago
by
hhakim
Browse files
Options
Downloads
Patches
Plain Diff
Fix GPU gemm in case where C is not initialized.
parent
0b7e3cde
No related branches found
No related tags found
No related merge requests found
Pipeline
#834190
skipped
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/faust_linear_operator/GPU2/faust_MatDense_gpu.cpp.in
+15
-0
15 additions, 0 deletions
src/faust_linear_operator/GPU2/faust_MatDense_gpu.cpp.in
with
15 additions
and
0 deletions
src/faust_linear_operator/GPU2/faust_MatDense_gpu.cpp.in
+
15
−
0
View file @
c004615b
...
...
@@ -521,6 +521,20 @@ namespace Faust
char2gm_Op(opA, gop_A);
char2gm_Op(opB, gop_B);
auto dsm_funcs = GPUModHandler::get_singleton()->dsm_funcs(@FAUST_SCALAR_FOR_GM@(0));
if(C.gpu_mat == nullptr)
{
int C_nrows;
int C_ncols;
if(opA == 'N')
C_nrows = A.getNbRow();
else
C_nrows = A.getNbCol();
if(opB == 'N')
C_ncols = B.getNbCol();
else
C_ncols = B.getNbRow();
C.resize(C_nrows, C_ncols);
}
dsm_funcs->gemm(A.gpu_mat, B.gpu_mat, C.gpu_mat, (@GM_SCALAR@*) reinterpret_cast<const @GM_REINTERPRET_CAST_SCALAR@*>(&alpha), (@GM_SCALAR@*) reinterpret_cast<const @GM_REINTERPRET_CAST_SCALAR@*>(&beta), gop_A, gop_B);
}
...
...
@@ -532,6 +546,7 @@ namespace Faust
char2gm_Op(opA, gop_A);
char2gm_Op(opB, gop_B);
auto dsm_funcs = GPUModHandler::get_singleton()->dsm_funcs(@FAUST_SCALAR_FOR_GM@(0));
//TODO: verify if C.gpu_mat is nullptr and resize(-allocate) if it is
dsm_funcs->gemm(A.gpu_mat, B.gpu_mat, C.gpu_mat, (@GM_SCALAR@*) reinterpret_cast<const @GM_REINTERPRET_CAST_SCALAR@*>(&alpha), (@GM_SCALAR@*) reinterpret_cast<const @GM_REINTERPRET_CAST_SCALAR@*>(&beta), gop_A, gop_B);
}
...
...
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