fc2cbd6638ec1f132d0d33924d7b9d9a94b51979,torchbenchmark/util/machine_config.py,,set_pstate_frequency,#Any#Any#,227

Before Change


def set_pstate_frequency(min_freq = 2500, max_freq = 2500):
    CPU_FREQ_BASE_DIR = "/sys/devices/system/cpu"
    CPU_FREQ_FILES = ["scaling_min_freq", "scaling_max_freq", "scaling_cur_freq"]
    cpu_dirs = [f for f in os.listdir(CPU_FREQ_BASE_DIR) if re.match(r"cpu[0-9]+", f)]
    for cpu_dir in cpu_dirs:
        full_path = os.path.join(CPU_FREQ_BASE_DIR, cpu_dir, "cpufreq")
        freq_paths = [os.path.join(full_path, x) for x in CPU_FREQ_FILES]
        all_exist = True

After Change


def set_pstate_frequency(min_freq = 2500, max_freq = 2500):
    CPU_FREQ_BASE_DIR = "/sys/devices/system/cpu"
    CPU_FREQ_FILES = ["scaling_min_freq", "scaling_max_freq", "scaling_cur_freq"]
    cpu_dirs = ["cpu" + str(cpu[0]) for cpu in parse_lscpu_cpu_core_list() if cpu[2]]
    for cpu_dir in cpu_dirs:
        full_path = os.path.join(CPU_FREQ_BASE_DIR, cpu_dir, "cpufreq")
        freq_paths = [os.path.join(full_path, x) for x in CPU_FREQ_FILES]
        all_exist = True
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: pytorch/benchmark
Commit Name: fc2cbd6638ec1f132d0d33924d7b9d9a94b51979
Time: 2021-02-12
Author: xzhao9@fb.com
File Name: torchbenchmark/util/machine_config.py
Class Name:
Method Name: set_pstate_frequency


Project Name: pytorch/benchmark
Commit Name: fc2cbd6638ec1f132d0d33924d7b9d9a94b51979
Time: 2021-02-12
Author: xzhao9@fb.com
File Name: torchbenchmark/util/machine_config.py
Class Name:
Method Name: get_pstate_frequency


Project Name: p2irc/deepplantphenomics
Commit Name: 2c34a47f683dedb310f1c92be66870163cf80302
Time: 2019-10-10
Author: dbl599@mail.usask.ca
File Name: deepplantphenomics/heatmap_object_counting_model.py
Class Name: HeatmapObjectCountingModel
Method Name: load_heatmap_dataset_with_csv_from_directory