mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-15 21:00:47 +00:00
43 lines
847 B
Text
43 lines
847 B
Text
python_cc_extension(
|
|
name="caffe2_pybind11_state",
|
|
srcs=["pybind_state.cc"],
|
|
hdrs=Glob(["*.h"]),
|
|
deps = [
|
|
"//caffe2:all_available_cpu_ops",
|
|
"//caffe2:core",
|
|
],
|
|
)
|
|
|
|
python_cc_extension(
|
|
name="caffe2_pybind11_state_gpu",
|
|
srcs=["pybind_state.cc", "pybind_state_gpu.cc"],
|
|
hdrs=Glob(["*.h"]),
|
|
deps = [
|
|
"//caffe2:all_available_ops",
|
|
"//caffe2:core",
|
|
],
|
|
)
|
|
|
|
py_library(
|
|
name="pycaffe2",
|
|
srcs=Glob(["*.py"], excludes=["*_test.py"]),
|
|
deps=[
|
|
":caffe2_pybind11_state",
|
|
"//caffe/proto:caffe_proto",
|
|
"//caffe2/proto:caffe2_proto",
|
|
"//caffe2/python/mint:mint",
|
|
],
|
|
optional_deps=[
|
|
":caffe2_pybind11_state_gpu",
|
|
],
|
|
)
|
|
|
|
for src in Glob(["*_test.py", "*/*_test.py"]):
|
|
py_test(
|
|
name=src[:-3],
|
|
srcs=[src],
|
|
deps=[
|
|
":pycaffe2",
|
|
],
|
|
)
|
|
|