Skip to content

Commit c2fcf1c

Browse files
committed
Merge branch 'fno_bench' of https://github.com/chelseajohn/milabench into fno_bench
2 parents d70d1db + a0fbbd7 commit c2fcf1c

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

benchmarks/fno_benchmark/dev.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ _fno_benchmark:
1313
--benchmark: true
1414
--use_amp: 1
1515
--use_complex_amp: 0
16-
--compile_train: 1
16+
--compile_train: 0
1717
--compile_mode: default
1818

1919
pic1d:

benchmarks/fno_benchmark/voirfile.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,14 @@ def instrument_main(ov, options: Config):
4141

4242
rfstr = ptera.refstring(getDataLoaders)
4343

44+
def get_batch(x):
45+
return x[0].shape[0]
4446
#
4547
# Insert milabench tools
4648
#
4749
observer = BenchObserver(
4850
earlystop=options.stop + options.skip,
49-
batch_size_fn=lambda x: x.shape[0]
51+
batch_size_fn=get_batch
5052
)
5153

5254
probe = ov.probe(f"{rfstr}() as loader", overridable=True)

milabench/commands/__init__.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -711,6 +711,12 @@ def executors(self):
711711
if len(self.nodes) == 1 or max_num == 1:
712712
return [self.single_node()]
713713

714+
#
715+
# When using slurm, slurm will launch all those job for us
716+
#
717+
if use_slurm_if_available():
718+
return [Srun(self.single_node(), self.node_count(), self.task_per_node())]
719+
714720
for rank, node in enumerate(self.nodes):
715721
options = dict()
716722

@@ -731,13 +737,7 @@ def executors(self):
731737
executor=docker_cmd,
732738
**options
733739
)
734-
735-
#
736-
# When using slurm, slurm will launch all those job for us
737-
#
738-
if use_slurm_if_available():
739-
return [Srun(docker_cmd, self.node_count(), self.task_per_node())]
740-
740+
741741
executors.append(worker)
742742
return executors
743743

0 commit comments

Comments
 (0)