Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Karsa Zoltán István
/
politopok
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1c755e5b
authored
Jan 31, 2023
by
Zoltan Karsa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cores
parent
8e3a2100
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
cores.py
+32
-0
No files found.
cores.py
0 → 100644
View file @
1c755e5b
from
numba
import
cuda
cc_cores_per_SM_dict
=
{
(
2
,
0
)
:
32
,
(
2
,
1
)
:
48
,
(
3
,
0
)
:
192
,
(
3
,
5
)
:
192
,
(
3
,
7
)
:
192
,
(
5
,
0
)
:
128
,
(
5
,
2
)
:
128
,
(
6
,
0
)
:
64
,
(
6
,
1
)
:
128
,
(
7
,
0
)
:
64
,
(
7
,
5
)
:
64
,
(
8
,
0
)
:
64
,
(
8
,
6
)
:
128
,
(
8
,
9
)
:
128
,
(
9
,
0
)
:
128
}
# the above dictionary should result in a value of "None" if a cc match
# is not found. The dictionary needs to be extended as new devices become
# available, and currently does not account for all Jetson devices
device
=
cuda
.
get_current_device
()
my_sms
=
getattr
(
device
,
'MULTIPROCESSOR_COUNT'
)
my_cc
=
device
.
compute_capability
cores_per_sm
=
cc_cores_per_SM_dict
.
get
(
my_cc
)
total_cores
=
cores_per_sm
*
my_sms
print
(
"GPU compute capability: "
,
my_cc
)
print
(
"GPU total number of SMs: "
,
my_sms
)
print
(
"total cores: "
,
total_cores
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment