Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Méso-NH code
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RODIER Quentin
Méso-NH code
Commits
696a24e6
Commit
696a24e6
authored
2 years ago
by
ESCOBAR MUNOZ Juan
Browse files
Options
Downloads
Patches
Plain Diff
Juan 13/09/2022: add new ARCH_SRC/cray_gu/gu.c , for Automatic Gradual Underflow on CPU (like GPU)
parent
069c950b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/ARCH_SRC/cray_gu/gu.c
+45
-0
45 additions, 0 deletions
src/ARCH_SRC/cray_gu/gu.c
with
45 additions
and
0 deletions
src/ARCH_SRC/cray_gu/gu.c
0 → 100644
+
45
−
0
View file @
696a24e6
/*
* Copyright -2022 Hewlett Packard Enterprise Development LP
*/
void
__cce_floatingpt_gu
(
void
);
// Gradual Underflow.
static
void
(
*
p
)(
void
)
__attribute__
((
section
(
".init_array"
)))
=
__cce_floatingpt_gu
;
#define DENORMS_ARE_ZEROS 6
#define FLUSH_TO_ZERO_MASK 15
void
__cce_floatingpt_gu
(
void
)
{
unsigned
long
gu_src
=
(
1
<<
DENORMS_ARE_ZEROS
);
unsigned
long
gu_dst
=
(
1
<<
FLUSH_TO_ZERO_MASK
);
do
{
unsigned
long
__mxcsr
;
__asm__
volatile
(
"stmxcsr %0"
:
:
"m"
(
__mxcsr
));
__mxcsr
&=
~
(
gu_src
|
gu_dst
);
__asm__
volatile
(
"ldmxcsr %0"
:
:
"m"
(
__mxcsr
));
}
while
(
0
);
}
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