Closed LXY-225 closed 6 months ago
Build/Install
Yes
如果只在libspu里的某个文件添加一些输出语句,只是进行很小的改动,并没有修改项目的构建配置、依赖项,为什么每次运行export ENABLE_GPU_BUILD=1 && python setup.py bdist_wheel,bazel run -c opt //examples/python/utils:nodectl -- --config pwd/examples/python/ml/xxx/2pc.json up都要重新编译外部库?有什么方法可以加速编译吗?
pwd
bazel info输出如下: bazel-bin: /home/zhibin/.cache/bazel/_bazel_zhibin/a37d55a3679bceeff2b9fc25ae8fbe9b/execroot/spulib/bazel-out/k8-fastbuild/bin bazel-genfiles: /home/zhibin/.cache/bazel/_bazel_zhibin/a37d55a3679bceeff2b9fc25ae8fbe9b/execroot/spulib/bazel-out/k8-fastbuild/bin bazel-testlogs: /home/zhibin/.cache/bazel/_bazel_zhibin/a37d55a3679bceeff2b9fc25ae8fbe9b/execroot/spulib/bazel-out/k8-fastbuild/testlogs character-encoding: file.encoding = ISO-8859-1, defaultCharset = ISO-8859-1 command_log: /home/zhibin/.cache/bazel/_bazel_zhibin/a37d55a3679bceeff2b9fc25ae8fbe9b/command.log committed-heap-size: 1769MB execution_root: /home/zhibin/.cache/bazel/_bazel_zhibin/a37d55a3679bceeff2b9fc25ae8fbe9b/execroot/spulib gc-count: 75 gc-time: 3247ms install_base: /home/zhibin/.cache/bazel/_bazel_zhibin/install/20da5ab742b8d3d499c34fdafcd3c8b8 java-home: /home/zhibin/.cache/bazel/_bazel_zhibin/install/20da5ab742b8d3d499c34fdafcd3c8b8/embedded_tools/jdk java-runtime: OpenJDK Runtime Environment (build 11.0.6+10-LTS) by Azul Systems, Inc. java-vm: OpenJDK 64-Bit Server VM (build 11.0.6+10-LTS, mixed mode) by Azul Systems, Inc. max-heap-size: 16840MB output_base: /home/zhibin/.cache/bazel/_bazel_zhibin/a37d55a3679bceeff2b9fc25ae8fbe9b output_path: /home/zhibin/.cache/bazel/_bazel_zhibin/a37d55a3679bceeff2b9fc25ae8fbe9b/execroot/spulib/bazel-out package_path: %workspace% release: release 6.5.0 repository_cache: /home/zhibin/.cache/bazel/_bazel_zhibin/cache/repos/v1 server_log: /home/zhibin/.cache/bazel/_bazel_zhibin/a37d55a3679bceeff2b9fc25ae8fbe9b/java.log.sanshi-z490-gaming-x.zhibin.log.java.20240514-135144.936544 server_pid: 936544 used-heap-size: 1012MB workspace: /home/zhibin/lxy/SPU
A clear and concise description of what you want to happen.
A clear and concise description of any alternative solutions or features you've considered.
为什么要先跑一次 export ENABLE_GPU_BUILD=1 && python setup.py bdist_wheel?
export ENABLE_GPU_BUILD=1 && python setup.py bdist_wheel
(因为libspu文件夹里的内容进行了修改?)
你直接 bazel run 就行,bazel 会自己 rebuild 的,setup.py 默认会删掉之前的 bazel 缓存
好的好的,谢谢您
Feature Request Type
Build/Install
Have you searched existing issues?
Yes
Is your feature request related to a problem?
如果只在libspu里的某个文件添加一些输出语句,只是进行很小的改动,并没有修改项目的构建配置、依赖项,为什么每次运行export ENABLE_GPU_BUILD=1 && python setup.py bdist_wheel,bazel run -c opt //examples/python/utils:nodectl -- --config
pwd
/examples/python/ml/xxx/2pc.json up都要重新编译外部库?有什么方法可以加速编译吗?bazel info输出如下: bazel-bin: /home/zhibin/.cache/bazel/_bazel_zhibin/a37d55a3679bceeff2b9fc25ae8fbe9b/execroot/spulib/bazel-out/k8-fastbuild/bin bazel-genfiles: /home/zhibin/.cache/bazel/_bazel_zhibin/a37d55a3679bceeff2b9fc25ae8fbe9b/execroot/spulib/bazel-out/k8-fastbuild/bin bazel-testlogs: /home/zhibin/.cache/bazel/_bazel_zhibin/a37d55a3679bceeff2b9fc25ae8fbe9b/execroot/spulib/bazel-out/k8-fastbuild/testlogs character-encoding: file.encoding = ISO-8859-1, defaultCharset = ISO-8859-1 command_log: /home/zhibin/.cache/bazel/_bazel_zhibin/a37d55a3679bceeff2b9fc25ae8fbe9b/command.log committed-heap-size: 1769MB execution_root: /home/zhibin/.cache/bazel/_bazel_zhibin/a37d55a3679bceeff2b9fc25ae8fbe9b/execroot/spulib gc-count: 75 gc-time: 3247ms install_base: /home/zhibin/.cache/bazel/_bazel_zhibin/install/20da5ab742b8d3d499c34fdafcd3c8b8 java-home: /home/zhibin/.cache/bazel/_bazel_zhibin/install/20da5ab742b8d3d499c34fdafcd3c8b8/embedded_tools/jdk java-runtime: OpenJDK Runtime Environment (build 11.0.6+10-LTS) by Azul Systems, Inc. java-vm: OpenJDK 64-Bit Server VM (build 11.0.6+10-LTS, mixed mode) by Azul Systems, Inc. max-heap-size: 16840MB output_base: /home/zhibin/.cache/bazel/_bazel_zhibin/a37d55a3679bceeff2b9fc25ae8fbe9b output_path: /home/zhibin/.cache/bazel/_bazel_zhibin/a37d55a3679bceeff2b9fc25ae8fbe9b/execroot/spulib/bazel-out package_path: %workspace% release: release 6.5.0 repository_cache: /home/zhibin/.cache/bazel/_bazel_zhibin/cache/repos/v1 server_log: /home/zhibin/.cache/bazel/_bazel_zhibin/a37d55a3679bceeff2b9fc25ae8fbe9b/java.log.sanshi-z490-gaming-x.zhibin.log.java.20240514-135144.936544 server_pid: 936544 used-heap-size: 1012MB workspace: /home/zhibin/lxy/SPU
Describe features you want to add to SPU
A clear and concise description of what you want to happen.
Describe features you want to add to SPU
A clear and concise description of any alternative solutions or features you've considered.