Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
snippets
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
Model registry
Operate
Environments
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
Matteo Cicuttin
snippets
Commits
abcc5a8c
Commit
abcc5a8c
authored
5 years ago
by
Matteo Cicuttin
Browse files
Options
Downloads
Patches
Plain Diff
Added code to disable denormals.
parent
b0149f8f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
kokkos-testing/fd_catalog/CMakeLists.txt
+6
-1
6 additions, 1 deletion
kokkos-testing/fd_catalog/CMakeLists.txt
kokkos-testing/fd_catalog/fd_main.cpp
+11
-2
11 additions, 2 deletions
kokkos-testing/fd_catalog/fd_main.cpp
with
17 additions
and
3 deletions
kokkos-testing/fd_catalog/CMakeLists.txt
+
6
−
1
View file @
abcc5a8c
...
@@ -32,6 +32,11 @@ if (ENABLE_ITERTIME_OUTPUT)
...
@@ -32,6 +32,11 @@ if (ENABLE_ITERTIME_OUTPUT)
add_definitions
(
-DSAVE_ITERTIME
)
add_definitions
(
-DSAVE_ITERTIME
)
endif
()
endif
()
option
(
ENABLE_DAZ_FTZ
"Enable Denormals Are Zero and Flush To Zero flags"
ON
)
if
(
ENABLE_DAZ_FTZ
)
add_definitions
(
-DDISALLOW_DENORMALS
)
endif
()
option
(
ENABLE_KOKKOS
"Enable Kokkos"
OFF
)
option
(
ENABLE_KOKKOS
"Enable Kokkos"
OFF
)
if
(
ENABLE_KOKKOS
)
if
(
ENABLE_KOKKOS
)
FetchContent_Declare
(
kokkos
FetchContent_Declare
(
kokkos
...
@@ -67,7 +72,7 @@ endif()
...
@@ -67,7 +72,7 @@ endif()
option
(
ENABLE_VECTORIZER_REMARKS
"Enable Clang vectorizer remarks"
ON
)
option
(
ENABLE_VECTORIZER_REMARKS
"Enable Clang vectorizer remarks"
ON
)
if
(
ENABLE_VECTORIZER_REMARKS
)
if
(
ENABLE_VECTORIZER_REMARKS
)
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"Clang"
)
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"Clang"
OR CMAKE_CXX_COMPILER_ID STREQUAL
"AppleClang"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Rpass=loop-vectorize"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Rpass=loop-vectorize"
)
endif
()
endif
()
endif
()
endif
()
...
...
This diff is collapsed.
Click to expand it.
kokkos-testing/fd_catalog/fd_main.cpp
+
11
−
2
View file @
abcc5a8c
...
@@ -8,8 +8,17 @@
...
@@ -8,8 +8,17 @@
#include
"fd_wave_cuda.hpp"
#include
"fd_wave_cuda.hpp"
#endif
#endif
int
main
(
void
)
#include
<pmmintrin.h>
#include
<xmmintrin.h>
int
main
(
int
argc
,
char
**
argv
)
{
{
#ifdef DISALLOW_DENORMALS
_MM_SET_FLUSH_ZERO_MODE
(
_MM_FLUSH_ZERO_ON
);
_MM_SET_DENORMALS_ZERO_MODE
(
_MM_DENORMALS_ZERO_ON
);
#endif
_MM_SET_EXCEPTION_MASK
(
_MM_GET_EXCEPTION_MASK
()
&
~
_MM_MASK_INVALID
);
#ifdef SINGLE_PRECISION
#ifdef SINGLE_PRECISION
using
T
=
float
;
using
T
=
float
;
std
::
ofstream
ofs
(
"timings-float.txt"
);
std
::
ofstream
ofs
(
"timings-float.txt"
);
...
@@ -34,7 +43,7 @@ int main(void)
...
@@ -34,7 +43,7 @@ int main(void)
for
(
size_t
sz
=
128
;
sz
<=
1024
;
sz
*=
2
)
for
(
size_t
sz
=
128
;
sz
<=
1024
;
sz
*=
2
)
{
{
wave_equation_context
<
T
>
wec
(
sz
,
sz
,
1
,
0.1
,
0.001
,
5000
);
wave_equation_context
<
T
>
wec
(
sz
,
sz
,
1
,
0.1
,
0.00
0
1
,
5000
);
ofs
<<
sz
<<
" "
;
ofs
<<
sz
<<
" "
;
wec
.
init
();
wec
.
init
();
...
...
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