Skip to content

Commit

Permalink
Vizier updates
Browse files Browse the repository at this point in the history
  • Loading branch information
manan-garg1504 committed Oct 9, 2023
1 parent a02141e commit 0bb32ba
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions install.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
20 changes: 10 additions & 10 deletions sims/CFU-Playground/train_gridsearch_CFUPlayground.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 10 additions & 10 deletions sims/CFU-Playground/train_randomsearch_CFUPlayground.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0bb32ba

Please sign in to comment.