Causes some windows tests to fail with
``` FAILED: //tensorflow/python/kernel_tests:cwise_ops_test (Summary) C:/tmp/hgi62d3r/execroot/org_tensorflow/bazel-out/x64_windows-opt/testlogs/tensorflow/python/kernel_tests/cwise_ops_test/shard_41_of_50/test.log C:/tmp/hgi62d3r/execroot/org_tensorflow/bazel-out/x64_windows-opt/testlogs/tensorflow/python/kernel_tests/cwise_ops_test/shard_41_of_50/test_attempts/attempt_1.log C:/tmp/hgi62d3r/execroot/org_tensorflow/bazel-out/x64_windows-opt/testlogs/tensorflow/python/kernel_tests/cwise_ops_test/shard_41_of_50/test_attempts/attempt_2.log INFO: From Testing //tensorflow/python/kernel_tests:cwise_ops_test (shard 41 of 50): ==================== Test output for //tensorflow/python/kernel_tests:cwise_ops_test (shard 41 of 50): Running tests under Python 3.8.3: c:\Python38\python.exe [ RUN ] MathOpsOverloadTest.testOverload 2020-08-07 18:06:36.702914: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX AVX2 To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. 2020-08-07 18:06:36.731707: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x1f14f681f00 initialized for platform Host (this does not guarantee that XLA will be used). Devices: 2020-08-07 18:06:36.732038: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version INFO:tensorflow:time(__main__.MathOpsOverloadTest.testOverload): 0.09s I0807 18:06:36.788563 9040 test_util.py:1974] time(__main__.MathOpsOverloadTest.testOverload): 0.09s No pending test case: __main__.MathOpsOverloadTest.testOverload ====================================================================== ERROR: testOverload (__main__.MathOpsOverloadTest) (dtype=tf.bfloat16, np_func=<ufunc 'power'>, tf_func=<function <lambda> at 0x000001F152FA13A0>) testOverload (__main__.MathOpsOverloadTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "\\?\C:\Users\ContainerAdministrator\AppData\Local\Temp\Bazel.runfiles_6r__ku2y\runfiles\org_tensorflow\tensorflow\python\kernel_tests\cwise_ops_test.py", line 883, in testOverload self._compareBinary(10, 5, dtype, np_func, tf_func) File "\\?\C:\Users\ContainerAdministrator\AppData\Local\Temp\Bazel.runfiles_6r__ku2y\runfiles\org_tensorflow\tensorflow\python\kernel_tests\cwise_ops_test.py", line 843, in _compareBinary np_ans = np_func(x, y).astype(dtype.as_numpy_dtype) ValueError: No cast function available. ====================================================================== ERROR: testOverload (__main__.MathOpsOverloadTest) (dtype=tf.bfloat16, np_func=<ufunc 'floor_divide'>, tf_func=<function <lambda> at 0x000001F152FA14C0>) testOverload (__main__.MathOpsOverloadTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "\\?\C:\Users\ContainerAdministrator\AppData\Local\Temp\Bazel.runfiles_6r__ku2y\runfiles\org_tensorflow\tensorflow\python\kernel_tests\cwise_ops_test.py", line 883, in testOverload self._compareBinary(10, 5, dtype, np_func, tf_func) File "\\?\C:\Users\ContainerAdministrator\AppData\Local\Temp\Bazel.runfiles_6r__ku2y\runfiles\org_tensorflow\tensorflow\python\kernel_tests\cwise_ops_test.py", line 843, in _compareBinary np_ans = np_func(x, y).astype(dtype.as_numpy_dtype) ValueError: No cast function available. ---------------------------------------------------------------------- Ran 1 test in 0.093s FAILED (errors=2) ================================================================================ ==================== Test output for //tensorflow/python/kernel_tests:cwise_ops_test (shard 41 of 50): Running tests under Python 3.8.3: c:\Python38\python.exe [ RUN ] MathOpsOverloadTest.testOverload 2020-08-07 18:07:02.741015: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX AVX2 To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. 2020-08-07 18:07:02.768942: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x177405cd170 initialized for platform Host (this does not guarantee that XLA will be used). Devices: 2020-08-07 18:07:02.769253: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version INFO:tensorflow:time(__main__.MathOpsOverloadTest.testOverload): 0.08s I0807 18:07:02.821412 3188 test_util.py:1974] time(__main__.MathOpsOverloadTest.testOverload): 0.08s No pending test case: __main__.MathOpsOverloadTest.testOverload ====================================================================== ERROR: testOverload (__main__.MathOpsOverloadTest) (dtype=tf.bfloat16, np_func=<ufunc 'power'>, tf_func=<function <lambda> at 0x0000017741FFF3A0>) testOverload (__main__.MathOpsOverloadTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "\\?\C:\Users\ContainerAdministrator\AppData\Local\Temp\Bazel.runfiles_1vkgaz40\runfiles\org_tensorflow\tensorflow\python\kernel_tests\cwise_ops_test.py", line 883, in testOverload self._compareBinary(10, 5, dtype, np_func, tf_func) File "\\?\C:\Users\ContainerAdministrator\AppData\Local\Temp\Bazel.runfiles_1vkgaz40\runfiles\org_tensorflow\tensorflow\python\kernel_tests\cwise_ops_test.py", line 843, in _compareBinary np_ans = np_func(x, y).astype(dtype.as_numpy_dtype) ValueError: No cast function available. ====================================================================== ERROR: testOverload (__main__.MathOpsOverloadTest) (dtype=tf.bfloat16, np_func=<ufunc 'floor_divide'>, tf_func=<function <lambda> at 0x0000017741FFF4C0>) testOverload (__main__.MathOpsOverloadTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "\\?\C:\Users\ContainerAdministrator\AppData\Local\Temp\Bazel.runfiles_1vkgaz40\runfiles\org_tensorflow\tensorflow\python\kernel_tests\cwise_ops_test.py", line 883, in testOverload self._compareBinary(10, 5, dtype, np_func, tf_func) File "\\?\C:\Users\ContainerAdministrator\AppData\Local\Temp\Bazel.runfiles_1vkgaz40\runfiles\org_tensorflow\tensorflow\python\kernel_tests\cwise_ops_test.py", line 843, in _compareBinary np_ans = np_func(x, y).astype(dtype.as_numpy_dtype) ValueError: No cast function available. ---------------------------------------------------------------------- Ran 1 test in 0.087s FAILED (errors=2) ================================================================================ ==================== Test output for //tensorflow/python/kernel_tests:cwise_ops_test (shard 41 of 50): Running tests under Python 3.8.3: c:\Python38\python.exe [ RUN ] MathOpsOverloadTest.testOverload 2020-08-07 18:07:22.498277: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX AVX2 To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. 2020-08-07 18:07:22.528039: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x18eee98a7e0 initialized for platform Host (this does not guarantee that XLA will be used). Devices: 2020-08-07 18:07:22.528627: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version INFO:tensorflow:time(__main__.MathOpsOverloadTest.testOverload): 0.07s I0807 18:07:22.565276 5312 test_util.py:1974] time(__main__.MathOpsOverloadTest.testOverload): 0.07s No pending test case: __main__.MathOpsOverloadTest.testOverload ====================================================================== ERROR: testOverload (__main__.MathOpsOverloadTest) (dtype=tf.bfloat16, np_func=<ufunc 'power'>, tf_func=<function <lambda> at 0x0000018EED9D13A0>) testOverload (__main__.MathOpsOverloadTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "\\?\C:\Users\ContainerAdministrator\AppData\Local\Temp\Bazel.runfiles_ruka25hh\runfiles\org_tensorflow\tensorflow\python\kernel_tests\cwise_ops_test.py", line 883, in testOverload self._compareBinary(10, 5, dtype, np_func, tf_func) File "\\?\C:\Users\ContainerAdministrator\AppData\Local\Temp\Bazel.runfiles_ruka25hh\runfiles\org_tensorflow\tensorflow\python\kernel_tests\cwise_ops_test.py", line 843, in _compareBinary np_ans = np_func(x, y).astype(dtype.as_numpy_dtype) ValueError: No cast function available. ====================================================================== ERROR: testOverload (__main__.MathOpsOverloadTest) (dtype=tf.bfloat16, np_func=<ufunc 'floor_divide'>, tf_func=<function <lambda> at 0x0000018EED9D14C0>) testOverload (__main__.MathOpsOverloadTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "\\?\C:\Users\ContainerAdministrator\AppData\Local\Temp\Bazel.runfiles_ruka25hh\runfiles\org_tensorflow\tensorflow\python\kernel_tests\cwise_ops_test.py", line 883, in testOverload self._compareBinary(10, 5, dtype, np_func, tf_func) File "\\?\C:\Users\ContainerAdministrator\AppData\Local\Temp\Bazel.runfiles_ruka25hh\runfiles\org_tensorflow\tensorflow\python\kernel_tests\cwise_ops_test.py", line 843, in _compareBinary np_ans = np_func(x, y).astype(dtype.as_numpy_dtype) ValueError: No cast function available. ---------------------------------------------------------------------- Ran 1 test in 0.074s ``` PiperOrigin-RevId: 325819709 Change-Id: I919270e31978573c652f88224a32beb55592aa84
This commit is contained in:
parent
4ed4c14e4c
commit
04d770b603
@ -882,30 +882,6 @@ genrule(
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
# The interface library (tensorflow_framework.dll.if.lib) for linking tensorflow DLL
|
||||
# library (tensorflow_framework.dll) on Windows.
|
||||
# To learn more about import library (called interface library in Bazel):
|
||||
# https://docs.microsoft.com/en-us/cpp/build/linking-an-executable-to-a-dll?view=vs-2017#linking-implicitly
|
||||
filegroup(
|
||||
name = "get_tensorflow_framework_dll_import_lib",
|
||||
srcs = ["//tensorflow:tensorflow_framework.dll"],
|
||||
output_group = "interface_library",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
# Rename the import library for tensorflow_framework.dll from
|
||||
# tensorflow_framework.dll.if.lib to tensorflow_framework.lib
|
||||
genrule(
|
||||
name = "tensorflow_framework_dll_import_lib",
|
||||
srcs = [":get_tensorflow_framework_dll_import_lib"],
|
||||
outs = ["tensorflow_framework.lib"],
|
||||
cmd = select({
|
||||
"//tensorflow:windows": "cp -f $< $@",
|
||||
"//conditions:default": "touch $@", # Just a placeholder for Unix platforms
|
||||
}),
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
# The interface library (tensorflow_cc.dll.if.lib) for linking tensorflow DLL library (tensorflow_cc.dll) on Windows.
|
||||
# To learn more about import library (called interface library in Bazel):
|
||||
# https://docs.microsoft.com/en-us/cpp/build/linking-an-executable-to-a-dll?view=vs-2017#linking-implicitly
|
||||
|
@ -741,7 +741,7 @@ Status MergeBundles(Env* env, gtl::ArraySlice<tstring> prefixes,
|
||||
|
||||
// Interface for reading a tensor bundle.
|
||||
|
||||
TF_EXPORT BundleReader::BundleReader(Env* env, StringPiece prefix)
|
||||
BundleReader::BundleReader(Env* env, StringPiece prefix)
|
||||
: env_(env),
|
||||
prefix_(prefix),
|
||||
metadata_(nullptr),
|
||||
@ -796,7 +796,7 @@ TF_EXPORT BundleReader::BundleReader(Env* env, StringPiece prefix)
|
||||
kTensorBundleMinProducer, "Checkpoint", "checkpoint");
|
||||
}
|
||||
|
||||
TF_EXPORT BundleReader::~BundleReader() {
|
||||
BundleReader::~BundleReader() {
|
||||
delete metadata_;
|
||||
delete iter_;
|
||||
delete table_;
|
||||
@ -936,7 +936,7 @@ Status BundleReader::GetValue(const BundleEntryProto& entry, Tensor* val) {
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
TF_EXPORT Status BundleReader::Lookup(StringPiece key, Tensor* val) {
|
||||
Status BundleReader::Lookup(StringPiece key, Tensor* val) {
|
||||
CHECK(val != nullptr);
|
||||
BundleEntryProto entry;
|
||||
TF_RETURN_IF_ERROR(GetBundleEntryProto(key, &entry));
|
||||
@ -950,7 +950,7 @@ TF_EXPORT Status BundleReader::Lookup(StringPiece key, Tensor* val) {
|
||||
}
|
||||
}
|
||||
|
||||
TF_EXPORT Status BundleReader::ReadCurrent(Tensor* val) {
|
||||
Status BundleReader::ReadCurrent(Tensor* val) {
|
||||
CHECK(val != nullptr);
|
||||
BundleEntryProto entry;
|
||||
TF_RETURN_IF_ERROR(ParseEntryProto(iter_->key(), iter_->value(), &entry));
|
||||
@ -968,8 +968,8 @@ TF_EXPORT Status BundleReader::ReadCurrent(Tensor* val) {
|
||||
}
|
||||
}
|
||||
|
||||
TF_EXPORT Status BundleReader::LookupTensorSlices(
|
||||
StringPiece key, std::vector<TensorSlice>* slices) {
|
||||
Status BundleReader::LookupTensorSlices(StringPiece key,
|
||||
std::vector<TensorSlice>* slices) {
|
||||
slices->clear();
|
||||
BundleEntryProto entry;
|
||||
TF_RETURN_IF_ERROR(GetBundleEntryProto(key, &entry));
|
||||
@ -980,9 +980,8 @@ TF_EXPORT Status BundleReader::LookupTensorSlices(
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
TF_EXPORT Status BundleReader::LookupSlice(StringPiece full_tensor_key,
|
||||
const TensorSlice& slice_spec,
|
||||
Tensor* val) {
|
||||
Status BundleReader::LookupSlice(StringPiece full_tensor_key,
|
||||
const TensorSlice& slice_spec, Tensor* val) {
|
||||
CHECK(val != nullptr);
|
||||
BundleEntryProto entry;
|
||||
TF_RETURN_IF_ERROR(GetBundleEntryProto(full_tensor_key, &entry));
|
||||
@ -1104,14 +1103,13 @@ Status BundleReader::GetSliceValue(StringPiece full_tensor_key,
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
TF_EXPORT bool BundleReader::Contains(StringPiece key) {
|
||||
bool BundleReader::Contains(StringPiece key) {
|
||||
Seek(key);
|
||||
return Valid() && (this->key() == key);
|
||||
}
|
||||
|
||||
TF_EXPORT Status BundleReader::LookupDtypeAndShape(StringPiece key,
|
||||
DataType* dtype,
|
||||
TensorShape* shape) {
|
||||
Status BundleReader::LookupDtypeAndShape(StringPiece key, DataType* dtype,
|
||||
TensorShape* shape) {
|
||||
BundleEntryProto entry;
|
||||
TF_RETURN_IF_ERROR(GetBundleEntryProto(key, &entry));
|
||||
*dtype = entry.dtype();
|
||||
@ -1119,13 +1117,12 @@ TF_EXPORT Status BundleReader::LookupDtypeAndShape(StringPiece key,
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
TF_EXPORT Status BundleReader::LookupTensorShape(StringPiece key,
|
||||
TensorShape* shape) {
|
||||
Status BundleReader::LookupTensorShape(StringPiece key, TensorShape* shape) {
|
||||
DataType ignored;
|
||||
return LookupDtypeAndShape(key, &ignored, shape);
|
||||
}
|
||||
|
||||
TF_EXPORT string BundleReader::DebugString() {
|
||||
string BundleReader::DebugString() {
|
||||
// Format used below emulates that of TensorSliceReader::DebugString().
|
||||
string shape_str;
|
||||
BundleEntryProto entry;
|
||||
|
@ -182,28 +182,28 @@ Status MergeBundles(Env* env, gtl::ArraySlice<tstring> prefixes,
|
||||
// All threads accessing the same BundleReader must synchronize.
|
||||
class BundleReader {
|
||||
public:
|
||||
TF_EXPORT BundleReader(Env* const env, StringPiece prefix);
|
||||
TF_EXPORT ~BundleReader();
|
||||
BundleReader(Env* const env, StringPiece prefix);
|
||||
~BundleReader();
|
||||
|
||||
// Is ok() iff the reader construction is successful (completed the read of
|
||||
// the metadata).
|
||||
TF_EXPORT Status status() const { return status_; }
|
||||
Status status() const { return status_; }
|
||||
|
||||
// Queries whether the bundle contains an entry keyed by "key". Calls Seek()
|
||||
// internally, so this call invalidates the reader's current position.
|
||||
// REQUIRES: status().ok()
|
||||
TF_EXPORT bool Contains(StringPiece key);
|
||||
bool Contains(StringPiece key);
|
||||
|
||||
// Looks up the dtype and the shape of the tensor keyed by "key".
|
||||
// REQUIRES: status().ok()
|
||||
TF_EXPORT Status LookupDtypeAndShape(StringPiece key, DataType* dtype,
|
||||
TensorShape* shape) TF_MUST_USE_RESULT;
|
||||
Status LookupDtypeAndShape(StringPiece key, DataType* dtype,
|
||||
TensorShape* shape) TF_MUST_USE_RESULT;
|
||||
|
||||
// Looks up the shape of the tensor keyed by "key".
|
||||
// Clears "shape" if not found.
|
||||
// REQUIRES: status().ok()
|
||||
TF_EXPORT Status LookupTensorShape(StringPiece key,
|
||||
TensorShape* shape) TF_MUST_USE_RESULT;
|
||||
Status LookupTensorShape(StringPiece key,
|
||||
TensorShape* shape) TF_MUST_USE_RESULT;
|
||||
|
||||
// Looks up the tensor keyed by "key". If "key" refers to a partitioned
|
||||
// tensor, attempts to look up the full contents using all stored slices.
|
||||
@ -217,7 +217,7 @@ class BundleReader {
|
||||
//
|
||||
// Validates the stored crc32c checksum against the restored bytes.
|
||||
// REQUIRES: status().ok()
|
||||
TF_EXPORT Status Lookup(StringPiece key, Tensor* val) TF_MUST_USE_RESULT;
|
||||
Status Lookup(StringPiece key, Tensor* val) TF_MUST_USE_RESULT;
|
||||
|
||||
// Looks up the tensor pointed to by the internal iterator.
|
||||
//
|
||||
@ -225,7 +225,7 @@ class BundleReader {
|
||||
//
|
||||
// Validates the stored crc32c checksum against the restored bytes.
|
||||
// REQUIRES: status().ok() && Valid()
|
||||
TF_EXPORT Status ReadCurrent(Tensor* val) TF_MUST_USE_RESULT;
|
||||
Status ReadCurrent(Tensor* val) TF_MUST_USE_RESULT;
|
||||
|
||||
// Looks up the slices of the tensor keyed by "key". On OK, "slices"
|
||||
// is non-empty if and only if the tensor is a partitioned tensor.
|
||||
@ -234,35 +234,34 @@ class BundleReader {
|
||||
// a slice with a larger start index in some dimension could come before
|
||||
// another slice with a smaller start index in the same dimension.
|
||||
// REQUIRES: status().ok()
|
||||
TF_EXPORT Status LookupTensorSlices(
|
||||
StringPiece key, std::vector<TensorSlice>* slices) TF_MUST_USE_RESULT;
|
||||
Status LookupTensorSlices(StringPiece key, std::vector<TensorSlice>* slices)
|
||||
TF_MUST_USE_RESULT;
|
||||
|
||||
// Looks up a specific slice of a partitioned tensor.
|
||||
// It is only required that the stored slices cover the requested slice,
|
||||
// namely "slice_spec" is a subset of the union of the stored slices.
|
||||
// REQUIRES: status().ok()
|
||||
TF_EXPORT Status LookupSlice(StringPiece full_tensor_key,
|
||||
const TensorSlice& slice_spec,
|
||||
Tensor* val) TF_MUST_USE_RESULT;
|
||||
Status LookupSlice(StringPiece full_tensor_key, const TensorSlice& slice_spec,
|
||||
Tensor* val) TF_MUST_USE_RESULT;
|
||||
|
||||
// Seeks to the first position in the bundle whose key is no less than "key".
|
||||
// REQUIRES: status().ok()
|
||||
TF_EXPORT void Seek(StringPiece key) { return iter_->Seek(key); }
|
||||
void Seek(StringPiece key) { return iter_->Seek(key); }
|
||||
// Moves to the next position in the bundle.
|
||||
// REQUIRES: status().ok()
|
||||
TF_EXPORT void Next() const { iter_->Next(); }
|
||||
void Next() const { iter_->Next(); }
|
||||
// Returns true iff the reader is positioned to a key/val pair.
|
||||
// REQUIRES: status().ok()
|
||||
TF_EXPORT bool Valid() const { return iter_->Valid(); }
|
||||
bool Valid() const { return iter_->Valid(); }
|
||||
|
||||
// Returns the key at the current position.
|
||||
// REQUIRES: status().ok() && Valid()
|
||||
TF_EXPORT StringPiece key() const { return iter_->key(); }
|
||||
StringPiece key() const { return iter_->key(); }
|
||||
// Returns the raw value at the current position.
|
||||
// REQUIRES: status().ok() && Valid()
|
||||
TF_EXPORT StringPiece value() const { return iter_->value(); }
|
||||
StringPiece value() const { return iter_->value(); }
|
||||
|
||||
TF_EXPORT string DebugString();
|
||||
string DebugString();
|
||||
|
||||
private:
|
||||
// Seeks for "key" and reads the metadata proto.
|
||||
|
@ -51,11 +51,8 @@ INCLUDEPRE_RE = re.compile(r"google::protobuf::internal::ExplicitlyConstructed|"
|
||||
r"google::protobuf::internal::ArenaImpl::AddCleanup|" # for contrib/data/_prefetching_ops
|
||||
r"google::protobuf::internal::LogMessage|" # for contrib/data/_prefetching_ops
|
||||
r"google::protobuf::Arena::OnArenaAllocation|" # for contrib/data/_prefetching_ops
|
||||
r"google::protobuf::Message::InitializationErrorString|"
|
||||
r"google::protobuf::MessageLite::ParseFromArray|"
|
||||
r"absl::Mutex::ReaderLock|" # for //tensorflow/contrib/rnn:python/ops/_gru_ops.so and more ops
|
||||
r"absl::Mutex::ReaderUnlock|" # for //tensorflow/contrib/rnn:python/ops/_gru_ops.so and more ops
|
||||
r"tensorflow::TensorShape|"
|
||||
r"tensorflow::internal::LogMessage|"
|
||||
r"tensorflow::internal::LogString|"
|
||||
r"tensorflow::internal::CheckOpMessageBuilder|"
|
||||
|
Loading…
Reference in New Issue
Block a user