• Yifan Xiong's avatar
    CLI - Add command sb benchmark [list,list-parameters] (#279) · f7ffc545
    Yifan Xiong authored
    __Description__
    
    Add command `sb benchmark list` and `sb benchmark list-parameters` to support listing all optional parameters for benchmarks.
    
    <details>
    <summary>Examples</summary>
    <pre>
    $ sb benchmark list -n [a-z]+-bw -o table
    Result
    --------
    mem-bw
    nccl-bw
    rccl-bw
    </pre>
    <pre>
    $ sb benchmark list-parameters -n mem-bw
    === mem-bw ===
    optional arguments:
      --bin_dir str         Specify the directory of the benchmark binary.
      --duration int        The elapsed time of benchmark in seconds.
      --mem_type str [str ...]
                            Memory types to benchmark. E.g. htod dtoh dtod.
      --memory str          Memory argument for bandwidthtest. E.g. pinned unpinned.
      --run_count int       The run count of benchmark.
      --shmoo_mode          Enable shmoo mode for bandwidthtest.
    default values:
    {'bin_dir': None,
     'duration': 0,
     'mem_type': ['htod', 'dtoh'],
     'memory': 'pinned',
     'run_count': 1}
    </pre>
    </details>
    
    __Major Revisions__
    * Add `sb benchmark list` to list benchmarks matching given name.
    * Add `sb benchmark list-parameters` to list parameters for benchmarks which match given name.
    
    __Minor Revisions__
    * Sort format help text for argparse.
    f7ffc545
cli.md 9.96 KB