diff --git a/sims/CFU-Playground/train_EMUKIT_GP_CFUPlayground.py b/sims/CFU-Playground/train_EMUKIT_GP_CFUPlayground.py index ec6918b5..c91c0074 100644 --- a/sims/CFU-Playground/train_EMUKIT_GP_CFUPlayground.py +++ b/sims/CFU-Playground/train_EMUKIT_GP_CFUPlayground.py @@ -149,16 +149,16 @@ def main(_): for suggestion in suggestions: count += 1 - action = {"Bypass": int(str(suggestion.parameters['Bypass'])), - "CFU_enable": int(str(suggestion.parameters['CFU_enable'])), - "Data_cache_size": int(str(suggestion.parameters['Data_cache_size'])), - "Hardware_Divider": int(str(suggestion.parameters['Hardware_Divider'])), - "Instruction_cache_size": int(str(suggestion.parameters['Instruction_cache_size'])), - "Hardware_Multiplier": int(str(suggestion.parameters['Hardware_Multiplier'])), - "Branch_predictor_type": int(str(suggestion.parameters['Branch_predictor_type'])), - "Safe_mode_enable": int(str(suggestion.parameters['Safe_mode_enable'])), - "Single_Cycle_Shifter": int(str(suggestion.parameters['Single_Cycle_Shifter'])), - "Single_Cycle_Multiplier": int(str(suggestion.parameters['Single_Cycle_Multiplier']))} + action = {"Bypass": int(float(str(suggestion.parameters['Bypass']))), + "CFU_enable": int(float(str(suggestion.parameters['CFU_enable']))), + "Data_cache_size": int(float(str(suggestion.parameters['Data_cache_size']))), + "Hardware_Divider": int(float(str(suggestion.parameters['Hardware_Divider']))), + "Instruction_cache_size": int(float(str(suggestion.parameters['Instruction_cache_size']))), + "Hardware_Multiplier": int(float(str(suggestion.parameters['Hardware_Multiplier']))), + "Branch_predictor_type": int(float(str(suggestion.parameters['Branch_predictor_type']))), + "Safe_mode_enable": int(float(str(suggestion.parameters['Safe_mode_enable']))), + "Single_Cycle_Shifter": int(float(str(suggestion.parameters['Single_Cycle_Shifter']))), + "Single_Cycle_Multiplier": int(float(str(suggestion.parameters['Single_Cycle_Multiplier'])))} done, reward, info, obs = (env.step(action)) fitness_hist['reward'] = reward diff --git a/sims/CFU-Playground/train_NSGA2_CFUPlayground.py b/sims/CFU-Playground/train_NSGA2_CFUPlayground.py index 17ebe4c0..995cdec0 100644 --- a/sims/CFU-Playground/train_NSGA2_CFUPlayground.py +++ b/sims/CFU-Playground/train_NSGA2_CFUPlayground.py @@ -145,16 +145,16 @@ def main(_): for suggestion in suggestions: count += 1 - action = {"Bypass": int(str(suggestion.parameters['Bypass'])), - "CFU_enable": int(str(suggestion.parameters['CFU_enable'])), - "Data_cache_size": int(str(suggestion.parameters['Data_cache_size'])), - "Hardware_Divider": int(str(suggestion.parameters['Hardware_Divider'])), - "Instruction_cache_size": int(str(suggestion.parameters['Instruction_cache_size'])), - "Hardware_Multiplier": int(str(suggestion.parameters['Hardware_Multiplier'])), - "Branch_predictor_type": int(str(suggestion.parameters['Branch_predictor_type'])), - "Safe_mode_enable": int(str(suggestion.parameters['Safe_mode_enable'])), - "Single_Cycle_Shifter": int(str(suggestion.parameters['Single_Cycle_Shifter'])), - "Single_Cycle_Multiplier": int(str(suggestion.parameters['Single_Cycle_Multiplier']))} + action = {"Bypass": int(float(str(suggestion.parameters['Bypass']))), + "CFU_enable": int(float(str(suggestion.parameters['CFU_enable']))), + "Data_cache_size": int(float(str(suggestion.parameters['Data_cache_size']))), + "Hardware_Divider": int(float(str(suggestion.parameters['Hardware_Divider']))), + "Instruction_cache_size": int(float(str(suggestion.parameters['Instruction_cache_size']))), + "Hardware_Multiplier": int(float(str(suggestion.parameters['Hardware_Multiplier']))), + "Branch_predictor_type": int(float(str(suggestion.parameters['Branch_predictor_type']))), + "Safe_mode_enable": int(float(str(suggestion.parameters['Safe_mode_enable']))), + "Single_Cycle_Shifter": int(float(str(suggestion.parameters['Single_Cycle_Shifter']))), + "Single_Cycle_Multiplier": int(float(str(suggestion.parameters['Single_Cycle_Multiplier'])))} done, reward, info, obs = (env.step(action)) fitness_hist['reward'] = reward diff --git a/sims/CFU-Playground/train_quasirandom_CFUPlayground.py b/sims/CFU-Playground/train_quasirandom_CFUPlayground.py index bd8dbb4e..84ae4685 100644 --- a/sims/CFU-Playground/train_quasirandom_CFUPlayground.py +++ b/sims/CFU-Playground/train_quasirandom_CFUPlayground.py @@ -145,19 +145,18 @@ def main(_): count = 0 for suggestion in suggestions: count += 1 - action = {"Bypass": float(str(suggestion.parameters['Bypass'])), - "CFU_enable": float(str(suggestion.parameters['CFU_enable'])), - "Data_cache_size": float(str(suggestion.parameters['Data_cache_size'])), - "Hardware_Divider": float(str(suggestion.parameters['Hardware_Divider'])), - "Instruction_cache_size": float(str(suggestion.parameters['Instruction_cache_size'])), - "Hardware_Multiplier": float(str(suggestion.parameters['Hardware_Multiplier'])), - "Branch_predictor_type": float(str(suggestion.parameters['Branch_predictor_type'])), - "Safe_mode_enable": float(str(suggestion.parameters['Safe_mode_enable'])), - "Single_Cycle_Shifter": float(str(suggestion.parameters['Single_Cycle_Shifter'])), - "Single_Cycle_Multiplier": float(str(suggestion.parameters['Single_Cycle_Multiplier']))} - - print('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA') - + + action = {"Bypass": int(float(str(suggestion.parameters['Bypass']))), + "CFU_enable": int(float(str(suggestion.parameters['CFU_enable']))), + "Data_cache_size": int(float(str(suggestion.parameters['Data_cache_size']))), + "Hardware_Divider": int(float(str(suggestion.parameters['Hardware_Divider']))), + "Instruction_cache_size": int(float(str(suggestion.parameters['Instruction_cache_size']))), + "Hardware_Multiplier": int(float(str(suggestion.parameters['Hardware_Multiplier']))), + "Branch_predictor_type": int(float(str(suggestion.parameters['Branch_predictor_type']))), + "Safe_mode_enable": int(float(str(suggestion.parameters['Safe_mode_enable']))), + "Single_Cycle_Shifter": int(float(str(suggestion.parameters['Single_Cycle_Shifter']))), + "Single_Cycle_Multiplier": int(float(str(suggestion.parameters['Single_Cycle_Multiplier'])))} + print(action)