secretflow / spu

SPU (Secure Processing Unit) aims to be a provable, measurable secure computation device, which provides computation ability while keeping your private data protected.
https://www.secretflow.org.cn/docs/spu/en/
Apache License 2.0
208 stars 95 forks source link

[Bug]: dear teachers, i have two questions about spu on torch #740

Closed zhangwaer closed 1 week ago

zhangwaer commented 1 week ago

Issue Type

Support

Modules Involved

Others

Have you reproduced the bug with SPU HEAD?

Yes

Have you searched existing issues?

Yes

SPU Version

spu0.5.0

OS Platform and Distribution

ubuntu18.04

Python Version

3.10.13

Compiler Version

GCC11.2.1

Current Behavior?

dear teachers, following steps of "https://github.com/secretflow/spu/tree/main/examples/python/ml/torch_lr_experiment",

i have two questions about spu on torch, hope to get your help, thanks!

①Do I need to download torch_xla if I don't need tpu? Does torch have to run in tpu on spu: ②when i use the "bazel run -c opt //examples/python/utils:nodectl -- up" ,it error as follows, I tried to put https://github.com/secretflow/yacl/archive/refs/tags/0.4.5b1.tar.gz in abc/spu/cache/bazel /_bazel_aa/36fb706c243/external/yacl /temp7573373/0.4.5b1.tar.gz but still output the same error: INFO: Repository yacl instantiated at: /abc/spu/WORKSPACE:19:9: in /abc/spu/bazel/repositories.bzl:35:10: in spu_deps /abc/spu/bazel/repositories.bzl:39:10: in _yacl /abc/spu/.cache/bazel/_bazel_aa/36fb706c2/external/bazel_tools/tools/build_defs/repo/utils.bzl:233:18: in maybe Repository rule http_archive defined at: /abc/spu/.cache/bazel/_bazel_aa/36fb706c2/external/bazel_tools/tools/build_defs/repo/http.bzl:372:31: in WARNING: Download from https://github.com/secretflow/yacl/archive/refs/tags/0.4.5b1.tar.gz failed: class java.io.IOException connect timed out ERROR: An error occurred during the fetch of repository 'yacl': Traceback (most recent call last): File " /abc/spu/.cache/bazel/_bazel_aa/36fb706c243/external/bazel_tools/tools/build_defs/repo/http.bzl", line 132, column 45, in _http_archive_impl download_info = ctx.download_and_extract( Error in download_and_extract: java.io.IOException: Error downloading [https://github.com/secretflow/yacl/archive/refs/tags/0.4.5b1.tar.gz] to /abc/spu/.cache/bazel/_bazel_aa/36fb706c243/external/yacl/temp7573373/0.4.5b1.tar.gz: connect timed out ERROR: /abc/spu/spu/WORKSPACE:19:9: fetching http_archive rule //external:yacl: Traceback (most recent call last): File "/abc/spu/.cache/bazel/_bazel_aa/36fb706c243/external/bazel_tools/tools/build_defs/repo/http.bzl", line 132, column 45, in _http_archive_impl download_info = ctx.download_and_extract( Error in download_and_extract: java.io.IOException: Error downloading [https://github.com/secretflow/yacl/archive/refs/tags/0.4.5b1.tar.gz] to /abc/spu/.cache/bazel/_bazel_aa/36fb706c243/external/yacl/temp757/0.4.5b1.tar.gz: connect timed out ERROR: Error computing the main repository mapping: no such package '@yacl//bazel': java.io.IOException: Error downloading [https://github.com/secretflow/yacl/archive/refs/tags/0.4.5b1.tar.gz] to /abc/spu/.cache/bazel/_bazel_aa/36fb706c243/external/yacl/temp7573373/0.4.5b1.tar.gz: connect timed out Loading:

Standalone code to reproduce the issue

print("A bug")

Relevant log output

No response

tpppppub commented 1 week ago
  1. torch_xla is required but TPU is not.
  2. It's a network connection problem. Build from source need access to github and other Internet links. Make sure you can connect to them.
zhangwaer commented 1 week ago
  1. torch_xla is required but TPU is not.
  2. It's a network connection problem. Build from source need access to github and other Internet links. Make sure you can connect to them.

thank you very much!!!!