Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

__version__ = '0.1.0'
REQUIRED_PACKAGES = [
'tf-nightly >= 2.1.0.dev20191206'
'tensorflow == 2.4.1'
]
project_name = 'tensorflow-networking'

Expand Down
18 changes: 12 additions & 6 deletions tensorflow_networking/seastar/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,27 @@ RUN apt-get update && \
rm -rf '/var/lib/apt/lists/*'

# Install bazel
ARG BAZEL_VERSION=1.2.1
ARG BAZEL_VERSION=3.1.0
ARG BAZEL_INSTALLER="bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh"
RUN curl -L -O "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/${BAZEL_INSTALLER}" && \
chmod +x ${BAZEL_INSTALLER} && \
./${BAZEL_INSTALLER} && \
rm ${BAZEL_INSTALLER}

ADD . /tf_networking
RUN cd /tf_networking && \
RUN apt-get update
RUN apt-get install git -y
RUN ln -sf /usr/bin/python3.6 /usr/bin/python3
RUN ln -sf /usr/local/bin/pip3.6 /usr/local/bin/pip3

RUN git clone https://github.com/tensorflow/networking.git

RUN cd /networking && \
python3 third_party/tensorflow/configure.py && \
bazel build \
-c opt \
--cxxopt=-std=gnu++14 \
--crosstool_top=@//third_party/toolchains/preconfig/ubuntu16.04/gcc7_manylinux2010:toolchain \
--crosstool_top=@//third_party/toolchains/preconfig/ubuntu16.04/gcc7_manylinux2014:toolchain \
//tensorflow_networking:libtensorflow_networking.so && \
cp bazel-bin/tensorflow_networking/libtensorflow_networking.so tensorflow_networking && \
python3.6 setup.py bdist_wheel && \
pip3.6 install dist/*.whl
python3 setup.py bdist_wheel && \
pip3 install dist/*.whl
2 changes: 1 addition & 1 deletion tensorflow_networking/seastar/README
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Dockerfile: tensorflow_networking/seastar/Dockerfile

## Build Network whl with seastar:
1. python3 third_party/tensorflow/configure.py
2. bazel build -c opt --cxxopt=-std=gnu++14 --crosstool_top=@//third_party/toolchains/preconfig/ubuntu16.04/gcc7_manylinux2010:toolchain //tensorflow_networking:libtensorflow_networking.so
2. bazel build -c opt --cxxopt=-std=gnu++14 --crosstool_top=@//third_party/toolchains/preconfig/ubuntu16.04/gcc7_manylinux2014:toolchain //tensorflow_networking:libtensorflow_networking.so
3. cp bazel-bin/tensorflow_networking/libtensorflow_networking.so tensorflow_networking
4. python3.6 setup.py bdist_wheel
5. pip3.6 install --upgrade dist/tensorflow_networking-0.1.0-cp36-cp36m-linux_x86_64.whl
Expand Down
9 changes: 2 additions & 7 deletions tensorflow_networking/seastar/seastar_remote_worker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,10 @@ class SeastarRemoteWorker : public WorkerInterface,

~SeastarRemoteWorker() override {}

void GetStatusAsync(const GetStatusRequest* request,
void GetStatusAsync(CallOptions* call_opts,
const GetStatusRequest* request,
GetStatusResponse* response, bool fail_fast,
StatusCallback done) override {
GetStatusAsyncWithOptions(request, response, done, nullptr);
}

void GetStatusAsyncWithOptions(const GetStatusRequest* request,
GetStatusResponse* response,
StatusCallback done, CallOptions* call_opts) {
env_->compute_pool->Schedule([this, request, response, call_opts, done]() {
IssueRequest(request, response, SeastarWorkerServiceMethod::kGetStatus,
std::move(done), call_opts);
Expand Down
2 changes: 1 addition & 1 deletion tensorflow_networking/seastar/seastar_server_lib.cc
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ class SeastarServerFactory : public ServerFactory {
return server_def.protocol() == "grpc+seastar";
}

Status NewServer(const ServerDef& server_def,
Status NewServer(const ServerDef& server_def, const Options& options,
std::unique_ptr<ServerInterface>* out_server) override {
return SeastarServer::Create(server_def, Env::Default(), out_server);
}
Expand Down
1 change: 0 additions & 1 deletion third_party/seastar.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ cc_library(
"@systemtap-sdt",
"@xfs",
"@yaml-cpp",
"@readerwriterqueue",
],
)

Expand Down