Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tnl-dev
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor 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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
TNL
tnl-dev
Commits
3b73e43e
There was an error fetching the commit references. Please try again later.
Commit
3b73e43e
authored
6 years ago
by
Jakub Klinkovský
Browse files
Options
Downloads
Patches
Plain Diff
Disabled more useless nvcc warnings
parent
27a355c6
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
CMakeLists.txt
+3
-3
3 additions, 3 deletions
CMakeLists.txt
src/UnitTests/AssertCudaTest.cu
+6
-0
6 additions, 0 deletions
src/UnitTests/AssertCudaTest.cu
with
9 additions
and
3 deletions
CMakeLists.txt
+
3
−
3
View file @
3b73e43e
...
...
@@ -183,9 +183,9 @@ if( ${WITH_CUDA} )
endif
()
set
(
CUDA_NVCC_FLAGS
${
CUDA_NVCC_FLAGS
}
;-DHAVE_CUDA
)
# disable false compiler warnings
# reference for the -Xcudafe flag: http://stackoverflow.com/
questions/14831051/how-to-disable-compiler-warnings-with-nvcc/17095910#17095910
#
list of possible
tokens: http://www.ssl.berkeley.edu/~jimm/grizzly_docs/SSL/opt/intel/cc/9.0/lib/locale/en_US/mcpcom.msg
set
(
CUDA_NVCC_FLAGS
${
CUDA_NVCC_FLAGS
}
; -Wno-deprecated-gpu-targets --expt-relaxed-constexpr --expt-extended-lambda -Xcudafe
"
\"
--diag_suppress=code_is_unreachable --diag_suppress=implicit_return_from_non_void_function
\"
"
)
# reference for the -Xcudafe
--diag_suppress and --display_error_number
flag
s
: http
s
://stackoverflow.com/
a/54142937
#
incomplete list of
tokens: http://www.ssl.berkeley.edu/~jimm/grizzly_docs/SSL/opt/intel/cc/9.0/lib/locale/en_US/mcpcom.msg
set
(
CUDA_NVCC_FLAGS
${
CUDA_NVCC_FLAGS
}
; -Wno-deprecated-gpu-targets --expt-relaxed-constexpr --expt-extended-lambda -Xcudafe
"
\"
--diag_suppress=code_is_unreachable --diag_suppress=implicit_return_from_non_void_function
--diag_suppress=2906 --display_error_number
\"
"
)
set
(
ALL_CUDA_ARCHS -gencode arch=compute_20,code=sm_20
-gencode arch=compute_30,code=sm_30
-gencode arch=compute_32,code=sm_32
...
...
This diff is collapsed.
Click to expand it.
src/UnitTests/AssertCudaTest.cu
+
6
−
0
View file @
3b73e43e
...
...
@@ -23,6 +23,10 @@ using namespace TNL;
#ifdef HAVE_CUDA
// ignore useless nvcc warning: https://stackoverflow.com/a/49997636
#pragma push
#pragma diag_suppress = declared_but_not_referenced
#define WRAP_ASSERT( suffix, statement, not_failing ) \
__global__ \
void kernel_##suffix( int* output ) \
...
...
@@ -99,6 +103,8 @@ WRAP_ASSERT( test26, TNL_ASSERT_LT( ten, 2, "ten < 2" );, false );
WRAP_ASSERT
(
test27
,
TNL_ASSERT_TRUE
(
data_null
,
"nullptr is true"
);,
false
);
WRAP_ASSERT
(
test28
,
TNL_ASSERT_FALSE
(
data_full
,
"non-nullptr is false"
);,
false
);
#pragma pop
#endif
#endif
...
...
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