diff --git a/install.sh b/install.sh old mode 100644 new mode 100755 index 18eaaebf..cff2c1bf --- a/install.sh +++ b/install.sh @@ -6,9 +6,9 @@ if [ $1 == 'cfu' ]; then cd sims/CFU-Playground/CFU-Playground + ./scripts/setup_vexriscv_build.sh ./scripts/setup make install-sf - ./scripts/setup_vexriscv_build.sh fi #install vizier in arch-gym conda environment @@ -22,7 +22,7 @@ if [ $1 == 'viz' ]; then sudo apt-get install -y libprotobuf-dev pip install -r requirements.txt --use-deprecated=legacy-resolver - pip install -e + pip install -e . ./build_protos.sh diff --git a/sims/CFU-Playground/train_gridsearch_CFUPlayground.py b/sims/CFU-Playground/train_gridsearch_CFUPlayground.py index 555a5048..0d93e72b 100644 --- a/sims/CFU-Playground/train_gridsearch_CFUPlayground.py +++ b/sims/CFU-Playground/train_gridsearch_CFUPlayground.py @@ -139,16 +139,16 @@ def main(_): 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']))} + 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_randomsearch_CFUPlayground.py b/sims/CFU-Playground/train_randomsearch_CFUPlayground.py index 555a5048..0d93e72b 100644 --- a/sims/CFU-Playground/train_randomsearch_CFUPlayground.py +++ b/sims/CFU-Playground/train_randomsearch_CFUPlayground.py @@ -139,16 +139,16 @@ def main(_): 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']))} + 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