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
820589d2
Commit
820589d2
authored
1 year ago
by
Cyril Moineau
Committed by
Cyril Moineau
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Add cuda compiler version in showCudaVersion.
parent
7f92f2f6
No related branches found
No related tags found
2 merge requests
!32
version 0.2.1
,
!17
Show cuda version during compilation.
Pipeline
#45489
passed
1 year ago
Stage: build
Stage: test
Stage: coverage
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+16
-1
16 additions, 1 deletion
CMakeLists.txt
include/aidge/utils/sys_info/CudaVersionInfo.hpp
+11
-0
11 additions, 0 deletions
include/aidge/utils/sys_info/CudaVersionInfo.hpp
with
27 additions
and
1 deletion
CMakeLists.txt
+
16
−
1
View file @
820589d2
...
...
@@ -2,11 +2,24 @@
cmake_minimum_required
(
VERSION 3.18
)
file
(
READ
"
${
CMAKE_SOURCE_DIR
}
/version.txt"
version
)
add_definitions
(
-DPROJECT_VERSION=
"
${
version
}
"
)
file
(
READ
"
${
CMAKE_SOURCE_DIR
}
/project_name.txt"
project
)
message
(
STATUS
"Project name:
${
project
}
"
)
message
(
STATUS
"Project version:
${
version
}
"
)
execute_process
(
COMMAND git rev-parse --short HEAD
WORKING_DIRECTORY
${
CMAKE_SOURCE_DIR
}
OUTPUT_VARIABLE GIT_COMMIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
message
(
STATUS
"Latest git commit:
${
GIT_COMMIT_HASH
}
"
)
# Define a preprocessor macro with the Git commit version
add_definitions
(
-DGIT_COMMIT_HASH=
"
${
GIT_COMMIT_HASH
}
"
)
# Note : project name is {project} and python module name is also {project}
set
(
module_name _
${
project
}
)
# target name
...
...
@@ -33,7 +46,9 @@ endif()
enable_language
(
CUDA
)
message
(
STATUS
"CMAKE_CUDA_COMPILER_VERSION =
${
CMAKE_CUDA_COMPILER_VERSION
}
"
)
message
(
STATUS
"Cuda compiler version =
${
CMAKE_CUDA_COMPILER_VERSION
}
"
)
# Define a preprocessor macro with the Cuda compiler version
add_definitions
(
-DCUDA_COMPILER_VERSION=
"
${
CMAKE_CUDA_COMPILER_VERSION
}
"
)
##############################################
...
...
This diff is collapsed.
Click to expand it.
include/aidge/utils/sys_info/CudaVersionInfo.hpp
+
11
−
0
View file @
820589d2
...
...
@@ -6,7 +6,18 @@
namespace
Aidge
{
#ifndef PROJECT_VERSION // Normally defined in CMakeLists.txt
#define PROJECT_VERSION "Unknown version"
#endif
#ifndef GIT_COMMIT_HASH
#define GIT_COMMIT_HASH ""
#endif
#ifndef CUDA_COMPILER_VERSION
#define CUDA_COMPILER_VERSION "Unknown version"
#endif
void
showCudaVersion
()
{
Log
::
info
(
"Aidge backend CUDA: {} ({}), {} {}"
,
PROJECT_VERSION
,
GIT_COMMIT_HASH
,
__DATE__
,
__TIME__
);
Log
::
info
(
"CUDA compiler version: {}"
,
CUDA_COMPILER_VERSION
);
Log
::
info
(
"CuDNN version: {}.{}.{}
\n
"
,
CUDNN_MAJOR
,
CUDNN_MINOR
,
CUDNN_PATCHLEVEL
);
...
...
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