Skip to content

Commit

Permalink
Add flush, dpe, and adpater_mode to hermes conf
Browse files Browse the repository at this point in the history
  • Loading branch information
lukemartinlogan committed Dec 27, 2023
1 parent fad1ace commit bfdd8da
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion builtin/builtin/hermes_run/pkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ def _configure_menu(self):
'type': float,
'default': 0
},
{
'name': 'flush_period',
'msg': 'Period of time to check for flushing (milliseconds)',
'type': int,
'default': 5000
},
{
'name': 'qdepth',
'msg': 'The depth of queues',
Expand Down Expand Up @@ -117,6 +123,19 @@ def _configure_menu(self):
'type': str,
'default': 'hrun_shm_${USER}'
},
{
'name': 'dpe',
'msg': 'The DPE to use by default',
'type': str,
'default': 'MinimizeIoTime'
},
{
'name': 'adapter_mode',
'msg': 'The adapter mode to use for Hermes',
'type': str,
'default': 'default',
'chocies': ['default', 'scratch', 'bypass']
},
{
'name': 'devices',
'msg': 'Search for a number of devices to include',
Expand Down Expand Up @@ -275,10 +294,20 @@ def _configure_server(self):
'num_threads': self.config['threads']
}
hermes_server['buffer_organizer'] = {
'recency_max': self.config['recency_max']
'recency_max': self.config['recency_max'],
'flush_period': self.config['flush_period']
}
if self.jarvis.hostfile.path is None:
hermes_server['rpc']['host_names'] = self.jarvis.hostfile.hosts
hermes_server['default_placement_policy'] = self.config['dpe']
if self.config['adapter_mode'] == 'default':
adapter_mode = 'kDefault'
elif self.config['adapter_mode'] == 'scratch':
adapter_mode = 'kScratch'
elif self.config['adapter_mode'] == 'bypass':
adapter_mode = 'kBypass'
self.env['HERMES_ADAPTER_MODE'] = adapter_mode
hermes_server['default_placement_policy'] = self.config['dpe']

# Save hermes configurations
hermes_server_yaml = f'{self.shared_dir}/hermes_server.yaml'
Expand Down

0 comments on commit bfdd8da

Please sign in to comment.