blob: 222dcf7080b3f1ee3f178fdb0d4a435690065232 [file] [log] [blame]
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",
],
)