SWDEV-335697- Add support for dynamic partitioning
Original updates:
* Added .gitignore to help with future commits
* Updated/added copyrights on modified or added files
* Updated rocm_smi.h/.cc
- Added 3 new SMI API functions:
rsmi_dev_compute_partition_set &
rsmi_dev_compute_partition_get
- Added helpful maps/enums used in
new get/set compute_partition API calls
* Updated rocm_smi.py
- Added --showcomputepartition
- Added --setcomputepartition
- Fixed a few mistypes
* Updated rsmiBindings.py - added helpful class/dict/list
* Updated rocm_smi_example.cc
- Added helpful MACRO to detect if api is not supported.
- Added current_compute_partition set/get rocm lib calls
- Added helpful macro to discover future RSMI errors
- Commented out test_set_freq, was having permission issues
on a Navi21
* Updated rocm_smi_main.cc
- Added helpful map to debug API calls, left in for future use
- Added comment to better understand a non-class function returns
* Added computepartition_read_write.cc/.h
- Added get/set compute partition API test calls
- Confirmed on devices that do not support the API calls, tests pass
* Updated rocm_smi_test/main.cc
- Calls new compute partition gtests
Added following updates from review feedback:
* Updated rocm_smi.h/cc
- Removed C++ API calls, adding support for both C/C++
API calls could cause confusion and adds extra work for us
- rsmi_dev_compute_partition_get -> Fixed an edge case where
user gives a small buffer length size (smaller than data
received), but does not receive the partial buffer back.
google Tests are updated to reflect this find.
* Updated rocm_smi_example.cc
- Fixed test_set_freq, issue was that file was not writable.
We now indicate this warning, so prior errors make sense.
- General test code cleanup. Removed extra code,
by creating loops for tests.
* Updated rocm_smi_main.cc
- Moved and got rid of an external reference to a map used
for debugging RSMI enums, now is a const public reference.
* Updated rocm_smi.py
- Updated python code to identify NOT_SUPPORTED due to
(currently) only a few GPU support the feature
Change-Id: I4a567acbb59d6771fb64df08d19175fe3604fd1b
This commit is contained in:
1 parent
5c478e9eb9
commit
4d7f3f2bc7
14 files changed
+1111
-54
No files matched your search
@@ -582,3 +582,28 @@ class rsmi_func_id_value_t(Union):
|
||||
_fields_ = [('id', c_uint64),
|
||||
('name', c_char_p),
|
||||
('submodule', submodule_union)]
|
||||
|
||||
class rsmi_compute_partition_type_t(c_int):
|
||||
RSMI_COMPUTE_PARTITION_INVALID = 0
|
||||
RSMI_COMPUTE_PARTITION_CPX = 1
|
||||
RSMI_COMPUTE_PARTITION_SPX = 2
|
||||
RSMI_COMPUTE_PARTITION_DPX = 3
|
||||
RSMI_COMPUTE_PARTITION_TPX = 4
|
||||
RSMI_COMPUTE_PARTITION_QPX = 5
|
||||
|
||||
rsmi_compute_partition_type_dict = {
|
||||
#'RSMI_COMPUTE_PARTITION_INVALID': 0,
|
||||
'CPX': 1,
|
||||
'SPX': 2,
|
||||
'DPX': 3,
|
||||
'TPX': 4,
|
||||
'QPX': 5
|
||||
}
|
||||
|
||||
rsmi_compute_partition_type = rsmi_compute_partition_type_t
|
||||
|
||||
# compute_partition_type_l includes string names for the rsmi_compute_partition_type_t
|
||||
# Usage example to get corresponding names:
|
||||
# compute_partition_type_l[rsmi_compute_partition_type_t.RSMI_COMPUTE_PARTITION_CPX]
|
||||
# will return string 'CPX'
|
||||
compute_partition_type_l = ['CPX', 'SPX', 'DPX', 'TPX', 'QPX']
|
||||
Reference in new issue
Block a user