fix benchmark_app python to support YES and NO values for -pin parameter (#15963)

* support YES and NO for -pin

* add if property_name == 'AFFINITY'
This commit is contained in:
Haiqi Pan 2023-03-01 05:31:04 -08:00 committed by GitHub
parent 6ae024f86e
commit 8307019380
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -276,6 +276,11 @@ def main():
return
def set_nthreads_pin(property_name, property_value):
if property_name == "AFFINITY":
if property_value == "YES":
property_value = "CORE"
elif property_value == "NO":
property_value = "NONE"
if property_name in supported_properties or device_name == AUTO_DEVICE_NAME:
# create nthreads/pin primary property for HW device or AUTO if -d is AUTO directly.
config[device][property_name] = property_value