Commit d055f738 authored by Yuxin Wu's avatar Yuxin Wu

add zmq op to travis

parent 8ec145ee
...@@ -14,6 +14,7 @@ addons: ...@@ -14,6 +14,7 @@ addons:
- pandoc - pandoc
- libprotobuf-dev - libprotobuf-dev
- protobuf-compiler - protobuf-compiler
- libzmqpp-dev
matrix: matrix:
fast_finish: true fast_finish: true
......
...@@ -71,7 +71,8 @@ class ZMQRecvOp: public AsyncOpKernel { ...@@ -71,7 +71,8 @@ class ZMQRecvOp: public AsyncOpKernel {
TensorShape& shape = tensors[i].shape; TensorShape& shape = tensors[i].shape;
OP_REQUIRES_OK_ASYNC(ctx, ctx->allocate_output(i, shape, &output), done); OP_REQUIRES_OK_ASYNC(ctx, ctx->allocate_output(i, shape, &output), done);
// reinterpret cast and then memcpy // reinterpret cast and then memcpy
auto ptr = output->bit_casted_shaped<char, 1>({shape.num_elements()}).data(); auto ptr = output->bit_casted_shaped<char, 1>(
{shape.num_elements() * DataTypeSize(recv_dtype)}).data();
memcpy(ptr, tensors[i].buf, tensors[i].buf_size); memcpy(ptr, tensors[i].buf, tensors[i].buf_size);
ctx->set_output(i, *output); ctx->set_output(i, *output);
} }
......
...@@ -12,3 +12,5 @@ python -c 'from tensorpack.dataflow.imgaug import transform' ...@@ -12,3 +12,5 @@ python -c 'from tensorpack.dataflow.imgaug import transform'
python -m unittest discover -v python -m unittest discover -v
# python -m tensorpack.models._test # python -m tensorpack.models._test
# segfault for no reason (https://travis-ci.org/ppwwyyxx/tensorpack/jobs/217702985) # segfault for no reason (https://travis-ci.org/ppwwyyxx/tensorpack/jobs/217702985)
python ../tensorpack/user_ops/test-recv-op.py
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment