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
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
Charles Villard
aidge_backend_cuda
Commits
2d392d87
Commit
2d392d87
authored
1 month ago
by
Charles Villard
Browse files
Options
Downloads
Patches
Plain Diff
edit: ILayerNorm: fixed test
parent
af3da233
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/data/TensorImpl.cu
+3
-1
3 additions, 1 deletion
src/data/TensorImpl.cu
src/operator/ILayerNormImpl_CUDA_kernels.cu
+1
-1
1 addition, 1 deletion
src/operator/ILayerNormImpl_CUDA_kernels.cu
with
4 additions
and
2 deletions
src/data/TensorImpl.cu
+
3
−
1
View file @
2d392d87
...
...
@@ -15,7 +15,9 @@
#include
<thrust/device_ptr.h>
template
<
typename
SRC_T
,
typename
DST_T
>
typename
std
::
enable_if
<!
std
::
is_same
<
half_float
::
half
,
DST_T
>::
value
&&
!
std
::
is_same
<
half_float
::
half
,
SRC_T
>::
value
>::
type
typename
std
::
enable_if
<!
std
::
is_same
<
half_float
::
half
,
DST_T
>::
value
&&
!
std
::
is_same
<
half_float
::
half
,
SRC_T
>::
value
>
::
type
Aidge
::
thrust_copy
(
const
SRC_T
*
srcData
,
DST_T
*
dstData
,
size_t
size
)
{
const
thrust
::
device_ptr
<
const
SRC_T
>
thrustSrcPtr
(
srcData
);
...
...
This diff is collapsed.
Click to expand it.
src/operator/ILayerNormImpl_CUDA_kernels.cu
+
1
−
1
View file @
2d392d87
...
...
@@ -62,7 +62,7 @@ __global__ void ILayerNormforward_(T* input, double SF, int* dims, int* quantize
k
=
floorf
((
k
+
floorf
(
sum
/
k
))
/
2
);
}
unsigned
int
factor
=
(((
1u
<<
31
)
-
1
)
/
k
);
long
factor
=
(((
1u
<<
31
)
-
1
)
/
k
);
for
(
int
i
=
0
;
i
<
dims
[
3
];
i
++
)
{
int
idx
=
maxIdx
+
i
;
square_tensor
[
idx
]
=
(
biase
[
idx
]
/
weight
[
idx
])
/
new_SF
;
...
...
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