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
Merge requests
!20
0.2.1
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
0.2.1
dev
into
main
Overview
0
Commits
6
Pipelines
4
Changes
13
Merged
Cyril Moineau
requested to merge
dev
into
main
1 year ago
Overview
0
Commits
6
Pipelines
4
Changes
13
Expand
Release 0.2.1
0
0
Merge request reports
Compare
main
version 1
0e36e66d
1 year ago
main (base)
and
latest version
latest version
d8427a1b
6 commits,
1 year ago
version 1
0e36e66d
12 commits,
1 year ago
13 files
+
112
−
61
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
13
Search (e.g. *.vue) (Ctrl+P)
include/aidge/utils/sys_info/CudaVersionInfo.hpp
0 → 100644
+
53
−
0
Options
#ifndef AIDGE_UTILS_SYS_INFO_CUDA_VERSION_INFO_H
#define AIDGE_UTILS_SYS_INFO_CUDA_VERSION_INFO_H
#include
"aidge/backend/cuda/utils/CudaUtils.hpp"
// CHECK_CUDA_STATUS
#include
"aidge/utils/Log.hpp"
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
);
int
deviceCount
=
0
;
CHECK_CUDA_STATUS
(
cudaGetDeviceCount
(
&
deviceCount
));
if
(
deviceCount
==
0
)
{
Log
::
warn
(
"There are no available device(s) that support CUDA"
);
}
else
{
Log
::
info
(
"Detected {} CUDA Capable device(s)"
,
deviceCount
);
}
for
(
int
dev
=
0
;
dev
<
deviceCount
;
++
dev
)
{
cudaSetDevice
(
dev
);
cudaDeviceProp
deviceProp
;
cudaGetDeviceProperties
(
&
deviceProp
,
dev
);
Log
::
info
(
"
\n
Device #{}:
\"
{}
\"
"
,
dev
,
deviceProp
.
name
);
int
driverVersion
=
0
;
int
runtimeVersion
=
0
;
cudaDriverGetVersion
(
&
driverVersion
);
cudaRuntimeGetVersion
(
&
runtimeVersion
);
Log
::
info
(
"
\t
CUDA Driver Version / Runtime Version: {}.{} / {}.{}"
,
(
driverVersion
/
1000
),
((
driverVersion
%
100
)
/
10
),
(
runtimeVersion
/
1000
),
((
runtimeVersion
%
100
)
/
10
));
Log
::
info
(
"
\t
CUDA Capability Major/Minor version number: {}.{}"
,
deviceProp
.
major
,
deviceProp
.
minor
);
}
}
}
// namespace Aidge
#endif // AIDGE_UTILS_SYS_INFO_CUDA_VERSION_INFO_H
Loading