• 刘看山

    这个是必然的,相信很多人都试过,在训练模型的时候去跑推理,会慢的不行。

    这是英伟达内部的多模型伪并行决定的,你没有办法去解决。目前来看,可能的办法分为两种,但是代价都比较高:

    1. A100 这样的带有vGPU支持的卡;
    2. 整合到一个模型中,做多任务

    发布在 社区求助区(SOS!!) 阅读更多
  • 刘看山

    记录一个macos下安装

    gem install cocopods

    遇到的错误:

     fatal error: 'ruby/config.h' file not found
    #include "ruby/config.h"
    
    

    一大穿吃的错误是这样的:

    Building native extensions. This could take a while...
    ERROR:  Error installing cocoapods:
    	ERROR: Failed to build gem native extension.
    
        current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1/ext/ffi_c
    /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20200919-99764-16pqwro.rb extconf.rb
    /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin19/rbconfig.rb:229: warning: Insecure world writable dir /usr/local/sbin in PATH, mode 040777
    *** extconf.rb failed ***
    Could not create Makefile due to some reason, probably lack of necessary
    libraries and/or headers.  Check the mkmf.log file for more details.  You may
    need configuration options.
    
    Provided configuration options:
    	--with-opt-dir
    	--without-opt-dir
    	--with-opt-include
    	--without-opt-include=${opt-dir}/include
    	--with-opt-lib
    	--without-opt-lib=${opt-dir}/lib
    	--with-make-prog
    	--without-make-prog
    	--srcdir=.
    	--curdir
    	--ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME)
    	--with-ffi_c-dir
    	--without-ffi_c-dir
    	--with-ffi_c-include
    	--without-ffi_c-include=${ffi_c-dir}/include
    	--with-ffi_c-lib
    	--without-ffi_c-lib=${ffi_c-dir}/lib
    	--enable-system-libffi
    	--disable-system-libffi
    	--with-libffi-config
    	--without-libffi-config
    	--with-pkg-config
    	--without-pkg-config
    /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
    You have to install development tools first.
    	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:546:in `block in try_link0'
    	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tmpdir.rb:93:in `mktmpdir'
    	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:543:in `try_link0'
    	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:570:in `try_link'
    	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:672:in `try_ldflags'
    	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1832:in `pkg_config'
    	from extconf.rb:9:in `system_libffi_usable?'
    	from extconf.rb:42:in `<main>'
    
    To see why this extension failed to compile, please check the mkmf.log which can be found here:
    
      /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-19/2.6.0/ffi-1.13.1/mkmf.log
    
    extconf failed, exit code 1
    
    

    这个错误引起的根本原因是,gcc的版本过低!!!!

    运行这个:

    gcc -v
    sudo xcode-select -s /Library/Developer/CommandLineTools/
    gcc -v
    

    你会发现,前后两个gcc的版本不同,换了最新的之后就可以了。。

    参考:
    https://github.com/ffi/ffi/issues/653

    发布在 社区求助区(SOS!!) 阅读更多
  • 刘看山

    链接:https://pan.baidu.com/s/1oTjGjcrHtOOvtDoPC4RBNg
    提取码:un4f
    复制这段内容后打开百度网盘手机App,操作更方便哦

    链接:https://pan.baidu.com/s/1_jQXQ3lR58uWV1t4P1_hQQ
    提取码:53ih

    发布在 原创分享专区 阅读更多
  • 刘看山

    求教:

    Traceback (most recent call last):
      File "export_onnx.py", line 61, in <module>
        output_names=['output'], enable_onnx_checker=False)  # output_names=['output']
      File "/usr/local/lib/python3.6/dist-packages/torch/onnx/__init__.py", line 208, in export
        custom_opsets, enable_onnx_checker, use_external_data_format)
      File "/usr/local/lib/python3.6/dist-packages/torch/onnx/utils.py", line 92, in export
        use_external_data_format=use_external_data_format)
      File "/usr/local/lib/python3.6/dist-packages/torch/onnx/utils.py", line 530, in _export
        fixed_batch_size=fixed_batch_size)
      File "/usr/local/lib/python3.6/dist-packages/torch/onnx/utils.py", line 409, in _model_to_graph
        _export_onnx_opset_version)
    RuntimeError: Expected object of device type cuda but got device type cpu for argument #3 'index' in call to _th_index_select
    

    发布在 社区求助区(SOS!!) 阅读更多
  • 刘看山

    你好,你这个问题是由于scipy安装包不正确导致的

    发布在 社区求助区(SOS!!) 阅读更多
  • 刘看山

    不知不觉Golang1.15都已经发布了。这个版本用起来就感觉go语言才是世界上最牛逼的语言,体现在:

    • 国内可以通过 golang.google.cn 访问官网了;
    • 真的很牛逼,安装方便
    • 可以设置七牛云的proxy,全局快速代码,妈妈再也不用担心一些golang库无法访问。
    # 启用 Go Modules 功能
    export GO111MODULE=on
    # 配置 GOPROXY 环境变量
    export GOPROXY=https://goproxy.cn,direct
    
    

    发布在 原创分享专区 阅读更多

与 ManaAI社区 的连接断开,我们正在尝试重连,请耐心等待