Skip to content

Commit 9464b50

Browse files
author
Johannes Ballé
committed
Fixes GCC compilation of unbounded index range coder and adds BUILD rules.
1 parent 3b15a46 commit 9464b50

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

BUILD

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ cc_binary(
1111
"cc/kernels/range_coding_kernels_util.cc",
1212
"cc/kernels/range_coding_kernels_util.h",
1313
"cc/kernels/range_coding_kernels.cc",
14+
"cc/kernels/unbounded_index_range_coding_kernels.cc",
1415
"cc/ops/range_coding_ops.cc",
1516
],
1617
linkshared = 1,
@@ -20,7 +21,7 @@ cc_binary(
2021
],
2122
copts = [
2223
"-pthread", "-std=c++11", "-D_GLIBCXX_USE_CXX11_ABI=0",
23-
"-Wno-sign-compare",
24+
"-Wno-sign-compare", "-Wno-maybe-uninitialized",
2425
],
2526
)
2627

@@ -44,63 +45,54 @@ py_library(
4445
data = [
4546
":_range_coding_ops.so"
4647
],
47-
srcs_version = "PY2AND3",
4848
)
4949

5050
py_test(
5151
name = "entropy_models_test",
5252
timeout = "long",
5353
srcs = ["python/layers/entropy_models_test.py"],
5454
deps = [":tensorflow_compression"],
55-
srcs_version = "PY2AND3",
5655
)
5756

5857
py_test(
5958
name = "gdn_test",
6059
srcs = ["python/layers/gdn_test.py"],
6160
deps = [":tensorflow_compression"],
62-
srcs_version = "PY2AND3",
6361
)
6462

6563
py_test(
6664
name = "parameterizers_test",
6765
srcs = ["python/layers/parameterizers_test.py"],
6866
deps = [":tensorflow_compression"],
69-
srcs_version = "PY2AND3",
7067
)
7168

7269
py_test(
7370
name = "signal_conv_test",
7471
timeout = "long",
7572
srcs = ["python/layers/signal_conv_test.py"],
7673
deps = [":tensorflow_compression"],
77-
srcs_version = "PY2AND3",
7874
)
7975

8076
py_test(
8177
name = "math_ops_test",
8278
srcs = ["python/ops/math_ops_test.py"],
8379
deps = [":tensorflow_compression"],
84-
srcs_version = "PY2AND3",
8580
)
8681

8782
py_test(
8883
name = "padding_ops_test",
8984
srcs = ["python/ops/padding_ops_test.py"],
9085
deps = [":tensorflow_compression"],
91-
srcs_version = "PY2AND3",
9286
)
9387

9488
py_test(
9589
name = "spectral_ops_test",
9690
srcs = ["python/ops/spectral_ops_test.py"],
9791
deps = [":tensorflow_compression"],
98-
srcs_version = "PY2AND3",
9992
)
10093

10194
py_test(
10295
name = "range_coding_ops_test",
10396
srcs = ["python/ops/range_coding_ops_test.py"],
10497
deps = [":tensorflow_compression"],
105-
srcs_version = "PY2AND3",
10698
)

cc/kernels/unbounded_index_range_coding_kernels.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@ using tensorflow::Tensor;
4747
using tensorflow::TensorShape;
4848
using tensorflow::TensorShapeUtils;
4949
using tensorflow::TTypes;
50+
using tensorflow::int16;
51+
using tensorflow::int32;
52+
using tensorflow::int64;
53+
using tensorflow::string;
54+
using tensorflow::uint8;
55+
using tensorflow::uint32;
56+
using tensorflow::uint64;
5057

5158
// Non-incremental encoder op -------------------------------------------------
5259
class UnboundedIndexRangeEncodeOp : public OpKernel {

cc/kernels/unbounded_index_range_coding_kernels_test.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ using tensorflow::Status;
6262
using tensorflow::Tensor;
6363
using tensorflow::TensorShape;
6464
using tensorflow::TTypes;
65+
using tensorflow::int16;
66+
using tensorflow::int32;
67+
using tensorflow::int64;
68+
using tensorflow::string;
69+
using tensorflow::uint8;
70+
using tensorflow::uint32;
71+
using tensorflow::uint64;
6572

6673
int LogUniform(random::SimplePhilox* gen, uint32 n) {
6774
CHECK_GT(n, 0);

0 commit comments

Comments
 (0)