Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
aidge_backend_cuda
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eclipse Projects
aidge
aidge_backend_cuda
Commits
48657c04
Commit
48657c04
authored
10 months ago
by
Cyril Moineau
Browse files
Options
Downloads
Patches
Plain Diff
Fix multiple typo.
parent
3e5e6b24
Branches
OptimizeSub
No related tags found
No related merge requests found
Pipeline
#49060
passed
10 months ago
Stage: build
Stage: test
Stage: coverage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/operator/SubImpl.cpp
+4
-4
4 additions, 4 deletions
src/operator/SubImpl.cpp
with
4 additions
and
4 deletions
src/operator/SubImpl.cpp
+
4
−
4
View file @
48657c04
...
...
@@ -42,13 +42,13 @@ void Aidge::SubImpl_cuda::computeStrides(const Sub_Op& op){
CHECK_CUDNN_STATUS
(
cudnnCreateTensorDescriptor
(
&
mTensorDescs
[
i
]));
switch
(
std
::
static_pointer_cast
<
Tensor
>
(
mOp
.
getRawOutput
(
0
))
->
dataType
())
{
case
DataType
::
Float64
:
CHECK_CUDNN_STATUS
(
cudnnSetTensorNdDescriptor
(
mTensorDescs
[
i
],
aContext
::
data_type
<
double
>::
value
,
mDims
[
i
].
size
(),
mDims
[
i
].
data
(),
mStrides
[
0
].
data
()));
CHECK_CUDNN_STATUS
(
cudnnSetTensorNdDescriptor
(
mTensorDescs
[
i
],
Cud
aContext
::
data_type
<
double
>::
value
,
mDims
[
i
].
size
(),
mDims
[
i
].
data
(),
mStrides
[
0
].
data
()));
break
;
case
DataType
::
Float32
:
CHECK_CUDNN_STATUS
(
cudnnSetTensorNdDescriptor
(
mTensorDescs
[
i
],
aContext
::
data_type
<
float
>::
value
,
mDims
[
i
].
size
(),
mDims
[
i
].
data
(),
mStrides
[
0
].
data
()));
CHECK_CUDNN_STATUS
(
cudnnSetTensorNdDescriptor
(
mTensorDescs
[
i
],
Cud
aContext
::
data_type
<
float
>::
value
,
mDims
[
i
].
size
(),
mDims
[
i
].
data
(),
mStrides
[
0
].
data
()));
break
;
case
DataType
::
Float16
:
CHECK_CUDNN_STATUS
(
cudnnSetTensorNdDescriptor
(
mTensorDescs
[
i
],
aContext
::
data_type
<
half
>::
value
,
mDims
[
i
].
size
(),
mDims
[
i
].
data
(),
mStrides
[
0
].
data
()));
CHECK_CUDNN_STATUS
(
cudnnSetTensorNdDescriptor
(
mTensorDescs
[
i
],
Cud
aContext
::
data_type
<
half
>::
value
,
mDims
[
i
].
size
(),
mDims
[
i
].
data
(),
mStrides
[
0
].
data
()));
break
;
default:
AIDGE_THROW_OR_ABORT
(
std
::
runtime_error
,
"Data type is not supported by Backend Cuda"
);
...
...
@@ -100,7 +100,7 @@ void Aidge::SubImpl_cuda::forward_(const std::vector<Tensor>& inputs, const std:
const
typename
Cuda
::
cudnn_scaling_type
<
T
>::
type
alpha
=
1.0
f
;
const
typename
Cuda
::
cudnn_scaling_type
<
T
>::
type
beta
=
0.0
f
;
const
typename
Cuda
::
cudnn_scaling_type
<
T
>::
type
gamma
=
-
1.0
f
;
cudnnTensorDescriptor_t
outputTensorDesc
=
std
::
dynamic_pointer_cast
<
TensorImpl_cuda_
>
(
op
.
getOutput
(
0
)
etImpl
())
->
getCudnnTensorDesc
(
*
op
.
getOutput
(
0
));
cudnnTensorDescriptor_t
outputTensorDesc
=
std
::
dynamic_pointer_cast
<
TensorImpl_cuda_
>
(
op
.
getOutput
(
0
)
->
g
etImpl
())
->
getCudnnTensorDesc
(
*
op
.
getOutput
(
0
));
void
*
outputRawPtr
=
std
::
static_pointer_cast
<
Tensor
>
(
op
.
getRawOutput
(
0
))
->
getImpl
()
->
rawPtr
();
// Add first input to the output
CHECK_CUDNN_STATUS
(
...
...
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