コード例 #1
0
    def __call__(self, parser, args, values, option_string=None):
        output = '''\
        Horovod v{version}:

        Available Frameworks:
          [{tensorflow}] TensorFlow
          [{torch}] PyTorch
          [{mxnet}] MXNet

        Available Controllers:
          [{mpi}] MPI
          [{gloo}] Gloo

        Available Tensor Operations:
          [{nccl_ops}] NCCL
          [{ddl_ops}] DDL
          [{mlsl_ops}] MLSL
          [{mpi_ops}] MPI
          [{gloo_ops}] Gloo\
        '''.format(
            version=horovod.__version__,
            tensorflow=CheckBuildAction.get_check(
                extension_available('tensorflow')),
            torch=CheckBuildAction.get_check(extension_available('torch')),
            mxnet=CheckBuildAction.get_check(extension_available('mxnet')),
            mpi=CheckBuildAction.get_check(mpi_built()),
            gloo=CheckBuildAction.get_check(gloo_built()),
            nccl_ops=CheckBuildAction.get_check(nccl_built()),
            ddl_ops=CheckBuildAction.get_check(ddl_built()),
            mpi_ops=CheckBuildAction.get_check(mpi_built()),
            mlsl_ops=CheckBuildAction.get_check(mlsl_built()),
            gloo_ops=CheckBuildAction.get_check(gloo_built()))
        print(textwrap.dedent(output))
        os._exit(0)
コード例 #2
0
ファイル: run.py プロジェクト: brainhart/horovod
def check_build(verbose):
    def get_check(value):
        return 'X' if value else ' '

    output = '''{verbose_newline}\
    Horovod v{version}:

    Available Frameworks:
        [{tensorflow}] TensorFlow
        [{torch}] PyTorch
        [{mxnet}] MXNet

    Available Controllers:
        [{mpi}] MPI
        [{gloo}] Gloo

    Available Tensor Operations:
        [{nccl_ops}] NCCL
        [{ddl_ops}] DDL
        [{mlsl_ops}] MLSL
        [{mpi_ops}] MPI
        [{gloo_ops}] Gloo\
    '''.format(verbose_newline='\n' if verbose else '',
               version=horovod.__version__,
               tensorflow=get_check(
                   extension_available('tensorflow', verbose=verbose)),
               torch=get_check(extension_available('torch', verbose=verbose)),
               mxnet=get_check(extension_available('mxnet', verbose=verbose)),
               mpi=get_check(mpi_built(verbose=verbose)),
               gloo=get_check(gloo_built(verbose=verbose)),
               nccl_ops=get_check(nccl_built(verbose=verbose)),
               ddl_ops=get_check(ddl_built(verbose=verbose)),
               mpi_ops=get_check(mpi_built(verbose=verbose)),
               mlsl_ops=get_check(mlsl_built(verbose=verbose)),
               gloo_ops=get_check(gloo_built(verbose=verbose)))
    print(textwrap.dedent(output))
    os._exit(0)