mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 00:20:18 +01:00
(1) nccl submodule, cnmem submodule (2) mpi ops fallback test (3) a bit more blob interface (4) fixed tests (5) caffe2.python.io -> caffe2.python.dataio to avoid name conflicts (6) In the build system autogen __init__.py instead of having manual rules just to copy over an empty __init__.py.
60 lines
1.0 KiB
Plaintext
60 lines
1.0 KiB
Plaintext
python_cc_extension(
|
|
name="caffe2_python_cpu",
|
|
srcs=["caffe2_python.cc"],
|
|
hdrs=["caffe2_python.h"],
|
|
deps = [
|
|
"//caffe2:all_available_ops",
|
|
"//caffe2:core",
|
|
"//caffe2/db:db",
|
|
],
|
|
)
|
|
|
|
python_cc_extension(
|
|
name="caffe2_python_gpu",
|
|
srcs=[
|
|
"caffe2_python.cc",
|
|
"caffe2_python_gpu.cc",
|
|
],
|
|
hdrs=["caffe2_python.h"],
|
|
deps = [
|
|
"//caffe2:all_available_ops",
|
|
"//caffe2:core",
|
|
"//caffe2/db:db",
|
|
],
|
|
)
|
|
|
|
python_cc_extension(
|
|
name="caffe2_pybind11",
|
|
srcs=[
|
|
"db.cc",
|
|
],
|
|
deps=[
|
|
"//caffe2:core",
|
|
"//third_party:pybind11",
|
|
]
|
|
)
|
|
|
|
py_library(
|
|
name="pycaffe2",
|
|
srcs=Glob(["*.py"], excludes=["*_test.py"]),
|
|
deps=[
|
|
":caffe2_python_cpu",
|
|
"//caffe/proto:caffe_proto",
|
|
"//caffe2/proto:caffe2_proto",
|
|
"//caffe2/python/mint:mint",
|
|
],
|
|
optional_deps=[
|
|
":caffe2_python_gpu",
|
|
],
|
|
)
|
|
|
|
for src in Glob(["*_test.py", "*/*_test.py"]):
|
|
py_test(
|
|
name=src[:-3],
|
|
srcs=[src],
|
|
deps=[
|
|
":pycaffe2",
|
|
],
|
|
)
|
|
|