diff options
author | Nick Kreeger <kreeger@google.com> | 2018-08-20 19:39:44 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-08-20 19:46:03 -0700 |
commit | 49115abfd39d30506679d9fdc572ccd2f7c22dbe (patch) | |
tree | 62c2a07584a7f861db39b875718c910eb79bff15 /tensorflow/js/BUILD | |
parent | debd8b6b4e6b7bc16eb58b07135861702d75fb15 (diff) |
Introduce basic CC library for generating TypeScript files for TensorFlow.js from registered Ops.
This initial change provides the very basics to start generating TypeScript. Non-deprecated and visible Ops are exported as a typescript function using internal functionality that is used the @tensorflow/tfjs-node repo (https://github.com/tensorflow/tfjs-node).
Future changes will introduce more code generation + tests. This initial change will help set the foundation for those upcoming changes.
PiperOrigin-RevId: 209528126
Diffstat (limited to 'tensorflow/js/BUILD')
-rw-r--r-- | tensorflow/js/BUILD | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/tensorflow/js/BUILD b/tensorflow/js/BUILD new file mode 100644 index 0000000000..ad0dc44f54 --- /dev/null +++ b/tensorflow/js/BUILD @@ -0,0 +1,52 @@ +# Description: +# JavaScript/TypeScript code generation for TensorFlow.js + +visibility = [ + "//tensorflow:internal", +] + +package(default_visibility = visibility) + +licenses(["notice"]) # Apache 2.0 + +load( + "//tensorflow:tensorflow.bzl", + "tf_cc_test", +) + +cc_library( + name = "ts_op_gen", + srcs = [ + "ops/ts_op_gen.cc", + ], + hdrs = [ + "ops/ts_op_gen.h", + ], + visibility = ["//visibility:public"], + deps = [ + "//tensorflow/core:framework", + "//tensorflow/core:lib", + "//tensorflow/core:lib_internal", + "//tensorflow/core:op_gen_lib", + "//tensorflow/core:protos_all_cc", + ], +) + +tf_cc_test( + name = "ts_op_gen_test", + srcs = [ + "ops/ts_op_gen.cc", + "ops/ts_op_gen.h", + "ops/ts_op_gen_test.cc", + ], + deps = [ + "//tensorflow/core:framework", + "//tensorflow/core:lib", + "//tensorflow/core:lib_internal", + "//tensorflow/core:op_gen_lib", + "//tensorflow/core:proto_text", + "//tensorflow/core:protos_all_cc", + "//tensorflow/core:test", + "//tensorflow/core:test_main", + ], +) |