Skip to content

Add BF16 Softmax/SoftmaxGrad and fix accuracy issue by accum type #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 102 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
7f389c2
_ConstantValue can now see through tf.identity ops
ngc92 Mar 24, 2020
d9918f3
fix dynamic compare broadcast
qqsun8819 Apr 18, 2020
64be545
refactor deplicate code
qqsun8819 Apr 21, 2020
855ceb6
delete blank line
qqsun8819 Apr 21, 2020
31077ff
test fixes?
ngc92 Apr 22, 2020
4b265f2
Merge remote-tracking branch 'upstream/master' into constant_from_ide…
ngc92 Apr 22, 2020
3e2fab1
Update snappy library to 1.1.8
yongtang Apr 24, 2020
0805612
remapper test fix.
Srini511 Apr 24, 2020
463e8ad
[ROCm] Updating ROCm CI scripts to skip //tensorflow/lite/...
deven-amd Apr 21, 2020
8450875
rename function name to make them consistent
qqsun8819 Apr 25, 2020
1d69887
Add missing mlir_passthrough_op in pip wheel install
yongtang Apr 26, 2020
68ae2c3
fix format
qqsun8819 Apr 27, 2020
7218bcd
Fix incorrect usage of os.system().
buchgr Apr 27, 2020
129d790
Merge pull request #38667 from qqsun8819:dyncomp
tensorflower-gardener Apr 28, 2020
bddce29
Go: Update generated wrapper functions for TensorFlow ops.
tensorflower-gardener Apr 28, 2020
2c1585c
Enable setting shape of _Arg tensor for shape of resource args
jpienaar Apr 28, 2020
18c8e4b
Restructure TF Lite API doc
khanhlvg Apr 28, 2020
915c536
[XLA:Python] Harmonize the APIs of the pybind11-bound C++ Client abst…
hawkinsp Apr 28, 2020
2a16032
Integrate LLVM at https://github.com/llvm/llvm-project/commit/ef06016…
tensorflower-gardener Apr 28, 2020
1fd2e0e
[tfls.image] Add TensorImage.fromBitmap shortcut.
xunkai55 Apr 28, 2020
c837577
Merge pull request #38955 from buchgr:fix-os-system
tensorflower-gardener Apr 28, 2020
e442357
Add BUILD files for the java generator.
MarkDaoust Apr 28, 2020
fd49c45
Update LLVM to ef06016d73390d5b380018cc0d16003b4ed4a35a
tensorflower-gardener Apr 28, 2020
db9c68b
Document FULLY_CONNECTED support in XNNPACK delegate
Maratyszcza Apr 28, 2020
fb1b76c
Remove **kwargs from `fit`. It was never validated, which has the unf…
fchollet Apr 28, 2020
8ba3108
[Build cleanup] Split "core_cpu_impl" into fine-grained targets (4/n).
mrry Apr 28, 2020
6c1f19a
Move shape inference pass to be before inliner in CreateTFStandardPip…
andyly Apr 28, 2020
c50160b
Remove pattern to map xla_hlo.divide to tf.RealDiv.
Apr 28, 2020
17227b0
Simplify Model.run_eagerly logic for eager-only Model class.
omalleyt12 Apr 28, 2020
2704074
Fixing a function name typo, and removing TF_DeleteConcreteFunction.
bmzhao Apr 28, 2020
75a6b61
Go: Update generated wrapper functions for TensorFlow ops.
tensorflower-gardener Apr 28, 2020
fa32891
Export all symbols for TFLite C++ .dll
jdduke Apr 28, 2020
ee68970
Restrict `xla_hlo.constant` to always have same type for value attrib…
Apr 28, 2020
ca28ff4
Splitting TF_LoadSavedModel into two functions, one that takes tags, …
bmzhao Apr 28, 2020
29e2ec4
Update tf.FusedBatchNormV3 legalization to support exponential_avg_fa…
andyly Apr 28, 2020
2eb9e7c
Emit @tf.function retracing warning only in eager execution.
kkimdev Apr 28, 2020
a85cdf9
Move metadata_collector under cuda_deps to fix portability issues on …
tensorflower-gardener Apr 28, 2020
5298742
Merge pull request #38006 from ngc92:constant_from_identity
tensorflower-gardener Apr 28, 2020
76ec273
Merge pull request #38917 from yongtang:mlir-MlirPassthroughOp-wheel
tensorflower-gardener Apr 28, 2020
35347a5
Merge pull request #38880 from yongtang:snappy-1.1.8
tensorflower-gardener Apr 28, 2020
cb77658
Break diag_op_test into more shards to prevent timeout.
tensorflower-gardener Apr 28, 2020
e0606af
Small cleanups for experimental TFE attribute APIs
allenlavoie Apr 28, 2020
b091e42
[Profiler] Add tf-function stats to be part of op_stats.
tensorflower-gardener Apr 28, 2020
f9f6b4c
Create Keras Optimizer non slot variables inside strategy scope if th…
rxsang Apr 28, 2020
b238a73
Support scalar inputs in Java TFLite API
jdduke Apr 28, 2020
1202b0a
Merge pull request #38757 from ROCmSoftwarePlatform:google_upstream_r…
tensorflower-gardener Apr 28, 2020
bd1422f
More allowed mutations on trackable lists without trackable components
allenlavoie Apr 28, 2020
3512a5f
Add pass in MLIR to compress sparse tensor.
liyunlu0618 Apr 28, 2020
5fd8e05
Add tests for SyncOnReadVariable.scatter*
crccw Apr 28, 2020
ecb9759
Register int64 kernels for BroadcastTo
Apr 28, 2020
83b98e1
Go: Update generated wrapper functions for TensorFlow ops.
tensorflower-gardener Apr 28, 2020
624045e
Remove distribute test libraries from python:no_contrib
crccw Apr 28, 2020
f173d6b
Add memory warning for broadcast_to docs.
tensorflower-gardener Apr 28, 2020
bee7643
Branch TransformTensor operation to TransformTensorV2.
tensorflower-gardener Apr 28, 2020
77627e4
Allow CLion to include targets that depend on Python-generated headers.
tensorflower-gardener Apr 28, 2020
a9d9384
Update hexagon guide to link to the new hexagon libraries version v 1.17
karimnosseir Apr 28, 2020
6007324
Allow Philox to be fed with 2 elements state.
dlibenzi Apr 28, 2020
ec9e078
Fix handling of PartitionedCall in ShapeInference pass. Previously, t…
cheshire Apr 28, 2020
e9d87e3
Make the keras background graph for functional api construction threa…
Apr 28, 2020
2902cd9
Change PyLocal* names to PjRt*, where PjRt stands for "pretty much
tensorflower-gardener Apr 28, 2020
3331a78
Go: Update generated wrapper functions for TensorFlow ops.
tensorflower-gardener Apr 28, 2020
c27a6cb
Update ReplicateToIslandPass to generate sink islands with fetch oper…
andyly Apr 28, 2020
47766b3
array_ops.meshgrid should correctly handle no/empty args
Apr 28, 2020
f7f7273
Refactor SyncOnReadVariable update methods to be consistent with Mirr…
crccw Apr 28, 2020
b9f3811
Document and test explicit padding for separable_conv2d.
reedwm Apr 28, 2020
cd893cf
Update java generator.
MarkDaoust Apr 28, 2020
d89b24f
Correct typo and better doc.
protoget Apr 28, 2020
1ce189f
Refine result type of std.tensor_cast op during shape inference.
Apr 28, 2020
86a6005
Fix flaky loss_scale_optimizer_test.
reedwm Apr 28, 2020
1a40c42
Go: Update generated wrapper functions for TensorFlow ops.
tensorflower-gardener Apr 28, 2020
bb1e5c0
[RunHandler] Minor optimizations to environment variable handling.
mrry Apr 28, 2020
43f3700
Move tf.StringFormat from tf_generated_ops.td to tf_ops.td (NFC).
andyly Apr 28, 2020
32efe77
Update description of tf.BroadcastTo in TensorFlow MLIR ODS to reflec…
andyly Apr 28, 2020
ba4893c
Enable setting an op resolver for the tflite model reader.
tensorflower-gardener Apr 28, 2020
88069e1
Deprecate Layer `get_updates_for` and `get_losses_for` APIs.
pavithrasv Apr 28, 2020
8fe9e08
Attempt to fix certain testable docstrings.
reedwm Apr 28, 2020
62856c9
Internal change
tensorflower-gardener Apr 29, 2020
7028dbe
_Arg node requires _handle_dtypes and _handle_shapes attr when T is D…
doehyun Apr 29, 2020
f9f467d
Created a new class, SchedulerState, to encapsulate all of the schedu…
tensorflower-gardener Apr 29, 2020
3d0df43
Internal code change
karimnosseir Apr 29, 2020
c0d0615
Go: Update generated wrapper functions for TensorFlow ops.
tensorflower-gardener Apr 29, 2020
8c9a4d6
Upgrade hexagon_nn to v1.17
karimnosseir Apr 29, 2020
448f351
Introduce non-blocking component function execution.
haoyuz Apr 29, 2020
510f0f9
Update Eigen to: https://gitlab.com/libeigen/eigen/-/commit/ab773c7e9…
tensorflower-gardener Apr 29, 2020
9ec6997
Avoid pointer indirection in handle, context & op
jaingaurav Apr 29, 2020
d3610b1
Update Eigen commit used by TensorFlow to 1e41406c362788057b3adcd9a25…
tensorflower-gardener Apr 29, 2020
9403feb
Test TextVectorization with all distribution strategies.
tensorflower-gardener Apr 29, 2020
4bfe1dc
Small additions to DistributedStrategy's API docs
w-xinyi Apr 29, 2020
913b88b
[Build cleanup] Split "core_cpu_impl" into fine-grained targets (5/5).
mrry Apr 29, 2020
4828ecb
Fix the linking issue as reported in https://github.com/tensorflow/te…
multiverse-tf Apr 29, 2020
20be935
[dataset_test_base.h] Remove *.proto.h includes.
mrry Apr 29, 2020
8501c4d
Add a TODO to remove std.tensor_cast special case in tf-shape-inference.
Apr 29, 2020
a6013d3
[tf.data] Switch tf.data functions to default to using multi-device b…
jsimsa Apr 29, 2020
2bcda95
[tfls.util] Add Model.Options class.
xunkai55 Apr 29, 2020
97e9e00
Support MediaPipe Convolution2DTransposeBias in XNNPACK delegate
Maratyszcza Apr 29, 2020
cd033b7
Internal change
liyunlu0618 Apr 29, 2020
0ed451e
Update doc to comply with Swift API change
teijeong Apr 29, 2020
af52ea9
Merge pull request #38881 from Intel-tensorflow:sriniva2/remapper_test
tensorflower-gardener Apr 29, 2020
584fd0c
[tf.data] Switch tf.data functions to default to using multi-device b…
tensorflower-gardener Apr 29, 2020
9ca9a4f
Roll forward with fix for Windows & PPC.
tensorflower-gardener Apr 29, 2020
889b322
Add machine types people use as host for TF builds.
tensorflower-gardener Apr 29, 2020
e54ad6f
Add BF16 Softmax/SoftmaxGrad and fix accuracy issue by accum type.
Apr 29, 2020
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
11 changes: 11 additions & 0 deletions tensorflow/c/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,9 @@ tf_cuda_library(
":checkpoint_reader",
"//tensorflow/c/eager:c_api",
"//tensorflow/c/eager:c_api_internal",
"//tensorflow/c/eager:tfe_context_internal",
"//tensorflow/c/eager:tfe_op_internal",
"//tensorflow/c/eager:tfe_tensorhandle_internal",
"//tensorflow/compiler/jit:flags",
"//tensorflow/core:core_cpu",
"//tensorflow/core:framework",
Expand Down Expand Up @@ -729,3 +732,11 @@ tf_cuda_library(
],
alwayslink = 1,
)

cc_library(
name = "conversion_macros",
hdrs = [
"conversion_macros.h",
],
visibility = ["//tensorflow:__subpackages__"],
)
17 changes: 9 additions & 8 deletions tensorflow/c/c_api_experimental.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ limitations under the License.
#include "tensorflow/c/checkpoint_reader.h"
#include "tensorflow/c/eager/c_api.h"
#include "tensorflow/c/eager/c_api_internal.h"
#include "tensorflow/c/eager/tfe_context_internal.h"
#include "tensorflow/c/eager/tfe_op_internal.h"
#include "tensorflow/c/eager/tfe_tensorhandle_internal.h"
#include "tensorflow/compiler/jit/flags.h"
#include "tensorflow/core/common_runtime/eager/attr_builder.h"
#include "tensorflow/core/common_runtime/eager/context.h"
Expand Down Expand Up @@ -686,8 +689,7 @@ TFE_TensorHandle* TFE_NewTensorHandleFromScalar(TF_DataType data_type,
std::memcpy(tensorflow::TensorCApi::Buffer(tensor)->data(), data, len);

status->status = tensorflow::Status::OK();
return new TFE_TensorHandle{
tensorflow::TensorHandle::CreateLocalHandle(tensor)};
return tensorflow::wrap(tensorflow::TensorHandle::CreateLocalHandle(tensor));
}

namespace {
Expand All @@ -708,7 +710,7 @@ tensorflow::Status EnableCollectiveOps(const tensorflow::ServerDef& server_def,

// New server created for new server_def. Unused if updating server_def.
tensorflow::EagerContext* context =
tensorflow::ContextFromInterface(ctx->context);
tensorflow::ContextFromInterface(tensorflow::unwrap(ctx));
tensorflow::GrpcServer* grpc_server =
dynamic_cast<tensorflow::GrpcServer*>(context->GetServer());
if (grpc_server == nullptr) {
Expand Down Expand Up @@ -822,14 +824,13 @@ void TFE_InferShapes(TFE_Op* tfe_op, TF_ShapeAndTypeList* input_shapes,

const int num_inputs = input_shapes->num_items;
NodeDef node_def;
node_def.set_name(tfe_op->operation->Name());
node_def.set_op(tfe_op->operation->Name());
tensorflow::AbstractOperationInterface* op = tensorflow::unwrap(tfe_op);
node_def.set_name(op->Name());
node_def.set_op(op->Name());
for (int i = 0; i < num_inputs; ++i) {
node_def.add_input("dummy_input");
}
OperationFromInterface(tfe_op->operation)
->Attrs()
.FillAttrValueMap(node_def.mutable_attr());
OperationFromInterface(op)->Attrs().FillAttrValueMap(node_def.mutable_attr());

const tensorflow::OpRegistrationData* op_reg_data;
status->status =
Expand Down
30 changes: 30 additions & 0 deletions tensorflow/c/conversion_macros.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/* Copyright 2020 The TensorFlow Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#ifndef TENSORFLOW_C_CONVERSION_MACROS_H_
#define TENSORFLOW_C_CONVERSION_MACROS_H_

#define DEFINE_CONVERSION_FUNCTIONS(cpp_impl, wrapper) \
inline cpp_impl *unwrap(wrapper *w) { \
return reinterpret_cast<cpp_impl *>(w); \
} \
\
inline const cpp_impl *unwrap(const wrapper *w) { \
return reinterpret_cast<const cpp_impl *>(w); \
} \
\
inline wrapper *wrap(cpp_impl *i) { return reinterpret_cast<wrapper *>(i); }

#endif // TENSORFLOW_C_CONVERSION_MACROS_H_
18 changes: 11 additions & 7 deletions tensorflow/c/eager/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ tf_cuda_library(
":tfe_tensor_debug_info_internal",
":tfe_tensorhandle_internal",
"@com_google_absl//absl/algorithm:container",
"@com_google_absl//absl/container:fixed_array",
"@com_google_absl//absl/types:span",
"@com_google_absl//absl/types:variant",
"//tensorflow/c:c_api",
Expand Down Expand Up @@ -110,13 +109,10 @@ filegroup(
"operation_interface.h",
"tensor_handle_interface.h",
"tfe_cancellation_manager_internal.h",
"tfe_context_internal.h",
"tfe_executor_internal.h",
"tfe_monitoring_internal.h",
"tfe_op_attrs_internal.h",
"tfe_op_internal.h",
"tfe_tensor_debug_info_internal.h",
"tfe_tensorhandle_internal.h",
],
visibility = [
"//tensorflow/core:__pkg__",
Expand Down Expand Up @@ -205,6 +201,7 @@ cc_library(
],
deps = [
":context_interface",
"//tensorflow/c:conversion_macros",
],
)

Expand Down Expand Up @@ -249,8 +246,6 @@ cc_library(
"//tensorflow:internal",
],
deps = [
":tfe_context_internal",
":tfe_op_internal",
"//tensorflow/c:tf_status",
"//tensorflow/core:protos_all_cc",
"//tensorflow/core/common_runtime/eager:attr_builder",
Expand All @@ -265,6 +260,7 @@ cc_library(
],
deps = [
":operation_interface",
"//tensorflow/c:conversion_macros",
],
)

Expand All @@ -287,6 +283,7 @@ cc_library(
],
deps = [
":tensor_handle_interface",
"//tensorflow/c:conversion_macros",
],
)

Expand Down Expand Up @@ -327,6 +324,8 @@ tf_cuda_cc_test(
":c_api_experimental",
":c_api_internal",
":c_api_test_util",
":tfe_op_internal",
":tfe_tensorhandle_internal",
"//tensorflow/c:c_test_util",
"//tensorflow/core:lib",
"//tensorflow/core:lib_internal",
Expand All @@ -351,6 +350,7 @@ tf_cuda_cc_test(
":c_api_experimental",
":c_api_internal",
":c_api_test_util",
":tfe_tensorhandle_internal",
"//tensorflow/c:c_test_util",
"//tensorflow/core:lib",
"//tensorflow/core:protos_all_cc",
Expand Down Expand Up @@ -384,6 +384,9 @@ tf_cuda_library(
"//conditions:default": [
":c_api",
":c_api_internal",
":tfe_context_internal",
":tfe_op_internal",
":tfe_tensorhandle_internal",
"//tensorflow/c:c_api",
"//tensorflow/c:c_api_internal",
"//tensorflow/core:core_cpu",
Expand Down Expand Up @@ -548,8 +551,9 @@ cc_library(
deps = [
":c_api",
":c_api_experimental",
":c_api_internal",
":tfe_tensorhandle_internal",
"//tensorflow/c:tf_status_helper",
"//tensorflow/c:tf_status_internal",
"//tensorflow/core:framework",
"//tensorflow/core:framework_internal",
"//tensorflow/core:lib",
Expand Down
Loading