TensorFlow: Doc and linter fixes, some additional tests and

error handling, updates to website.

Changes:
- Removes redundant reshape from image models by @mrry
- Default TensorBoard to localhost by @danmane
- Reformatting of tensorflow/core by @josh11b
- Make tutorials backwards compatible to 0.5.0 by @girving
- Improve print documentation (md files not updated).
- Add proper scrolling to sitemap by @martinwicke

Base CL: 107956254
This commit is contained in:
Vijay Vasudevan 2015-11-16 11:11:36 -08:00
parent cb9fa5fc9d
commit 56313def00
291 changed files with 734 additions and 773 deletions

View File

@ -1,7 +1,7 @@
#include "tensorflow/core/common_runtime/device_set.h"
#include "tensorflow/core/public/status.h"
#include <gtest/gtest.h>
#include "tensorflow/core/public/status.h"
namespace tensorflow {
namespace {

View File

@ -93,7 +93,7 @@ void SchedClosure(std::function<void()> c) {
} // namespace
DirectSession::DirectSession(const SessionOptions& options,
const DeviceMgr* device_mgr)
const DeviceMgr* device_mgr)
: options_(options),
device_mgr_(device_mgr),
cancellation_manager_(new CancellationManager()) {
@ -155,9 +155,9 @@ Status DirectSession::ExtendLocked(const GraphDef& graph) {
}
Status DirectSession::Run(const std::vector<std::pair<string, Tensor>>& inputs,
const std::vector<string>& output_names,
const std::vector<string>& target_nodes,
std::vector<Tensor>* outputs) {
const std::vector<string>& output_names,
const std::vector<string>& target_nodes,
std::vector<Tensor>* outputs) {
{
mutex_lock l(graph_def_lock_);
if (!graph_created_) {
@ -379,10 +379,10 @@ void DirectSession::RestoreStatefulNodes(Graph* graph) {
}
}
Status DirectSession::CreateGraphs(gtl::ArraySlice<string> feeds,
gtl::ArraySlice<string> fetches,
gtl::ArraySlice<string> target_nodes,
std::unordered_map<string, Graph*>* outputs) {
Status DirectSession::CreateGraphs(
gtl::ArraySlice<string> feeds, gtl::ArraySlice<string> fetches,
gtl::ArraySlice<string> target_nodes,
std::unordered_map<string, Graph*>* outputs) {
Graph graph(OpRegistry::Global());
GraphConstructorOptions opts;
@ -462,8 +462,7 @@ Status DirectSession::CreateGraphs(gtl::ArraySlice<string> feeds,
// allow.
device_opts.allow_internal_ops = true;
device_opts.expect_device_spec = true;
Status s =
ConvertGraphDefToGraph(device_opts, graph_def, device_graph);
Status s = ConvertGraphDefToGraph(device_opts, graph_def, device_graph);
if (!s.ok()) {
delete device_graph;
// Also delete other graphs created during the loop.

View File

@ -6,17 +6,17 @@
#include <unordered_map>
#include <vector>
#include "tensorflow/core/platform/thread_annotations.h"
#include "tensorflow/core/common_runtime/device_mgr.h"
#include "tensorflow/core/common_runtime/device_set.h"
#include "tensorflow/core/common_runtime/executor.h"
#include "tensorflow/core/framework/cancellation.h"
#include "tensorflow/core/framework/graph.pb.h"
#include "tensorflow/core/platform/port.h"
#include "tensorflow/core/public/session.h"
#include "tensorflow/core/public/tensor.h"
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/platform/port.h"
#include "tensorflow/core/platform/thread_annotations.h"
#include "tensorflow/core/public/session.h"
#include "tensorflow/core/public/status.h"
#include "tensorflow/core/public/tensor.h"
namespace tensorflow {
@ -70,7 +70,7 @@ class DirectSession : public Session {
// Device structures.
const std::unique_ptr<const DeviceMgr> device_mgr_;
std::vector<Device*> devices_; // not owned
std::vector<Device*> devices_; // not owned
DeviceSet device_set_;
string session_handle_;

View File

@ -5,6 +5,7 @@
#include <unordered_map>
#include <vector>
#include <gtest/gtest.h>
#include "tensorflow/core/framework/allocator.h"
#include "tensorflow/core/framework/graph.pb.h"
#include "tensorflow/core/framework/tensor_testutil.h"
@ -18,7 +19,6 @@
#include "tensorflow/core/public/status.h"
#include "tensorflow/core/public/tensor.h"
#include "tensorflow/core/util/device_name_utils.h"
#include <gtest/gtest.h>
namespace tensorflow {
namespace {

View File

@ -1,8 +1,8 @@
#ifndef TENSORFLOW_COMMON_RUNTIME_EIGEN_THREAD_POOL_H_
#define TENSORFLOW_COMMON_RUNTIME_EIGEN_THREAD_POOL_H_
#include "tensorflow/core/lib/core/threadpool.h"
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
#include "tensorflow/core/lib/core/threadpool.h"
namespace tensorflow {

View File

@ -1,12 +1,12 @@
#include "tensorflow/core/common_runtime/executor.h"
#include <atomic>
#include <deque>
#include <memory>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <deque>
#include "tensorflow/core/framework/allocator.h"
#include "tensorflow/core/framework/cancellation.h"

View File

@ -4,8 +4,8 @@
#include "tensorflow/core/common_runtime/device.h"
#include "tensorflow/core/framework/rendezvous.h"
#include "tensorflow/core/graph/graph.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/lib/core/notification.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/public/status.h"
#include "tensorflow/core/public/tensor.h"

View File

@ -1,7 +1,7 @@
#include "tensorflow/core/common_runtime/gpu/gpu_allocator_retry.h"
#include "tensorflow/core/public/env.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/port.h"
#include "tensorflow/core/public/env.h"
namespace tensorflow {

View File

@ -1,11 +1,11 @@
#include "tensorflow/core/common_runtime/gpu/gpu_allocator_retry.h"
#include <gtest/gtest.h>
#include "tensorflow/core/lib/core/notification.h"
#include "tensorflow/core/platform/port.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/port.h"
#include "tensorflow/core/platform/thread_annotations.h"
#include "tensorflow/core/public/env.h"
#include <gtest/gtest.h>
namespace tensorflow {
namespace {

View File

@ -1,8 +1,8 @@
#include "tensorflow/core/common_runtime/gpu/gpu_debug_allocator.h"
#include "tensorflow/core/common_runtime/gpu/gpu_init.h"
#include "tensorflow/stream_executor/multi_platform_manager.h"
#include "tensorflow/stream_executor/stream_executor.h"
#include "tensorflow/core/common_runtime/gpu/gpu_init.h"
namespace gpu = ::perftools::gputools;

View File

@ -6,9 +6,9 @@
#include <unordered_map>
#include <vector>
#include "tensorflow/core/platform/port.h"
#include "tensorflow/core/common_runtime/gpu/visitable_allocator.h"
#include "tensorflow/stream_executor/stream_executor.h"
#include "tensorflow/core/common_runtime/gpu/visitable_allocator.h"
#include "tensorflow/core/platform/port.h"
namespace tensorflow {

View File

@ -5,14 +5,14 @@
#include <algorithm>
#include <vector>
#include "tensorflow/core/platform/port.h"
#include "tensorflow/core/lib/gtl/inlined_vector.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/common_runtime/gpu/gpu_init.h"
#include "tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.h"
#include "tensorflow/stream_executor/multi_platform_manager.h"
#include "tensorflow/stream_executor/stream_executor.h"
#include <gtest/gtest.h>
#include "tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.h"
#include "tensorflow/core/common_runtime/gpu/gpu_init.h"
#include "tensorflow/core/lib/gtl/inlined_vector.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/port.h"
namespace gpu = ::perftools::gputools;

View File

@ -92,7 +92,7 @@ class EigenAllocator : public ::Eigen::Allocator {
}
private:
gpu::Stream* stream_; // Not owned.
gpu::Stream* stream_; // Not owned.
::tensorflow::Allocator* allocator_; // Not owned.
::tensorflow::EventMgr* em_; // Not owned.
@ -144,8 +144,8 @@ class EigenCudaStreamDevice : public ::Eigen::StreamInterface {
delete data;
}
const cudaStream_t* stream_; // Not owned.
const cudaDeviceProp* device_prop_; // Not owned.
const cudaStream_t* stream_; // Not owned.
const cudaDeviceProp* device_prop_; // Not owned.
::tensorflow::Allocator* allocator_; // Not owned.
TF_DISALLOW_COPY_AND_ASSIGN(EigenCudaStreamDevice);

View File

@ -5,7 +5,10 @@
#ifndef TENSORFLOW_COMMON_RUNTIME_GPU_GPU_DEVICE_H_
#define TENSORFLOW_COMMON_RUNTIME_GPU_GPU_DEVICE_H_
#include "tensorflow/stream_executor/stream.h"
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
#include "tensorflow/core/common_runtime/device_factory.h"
#include "tensorflow/core/common_runtime/gpu/gpu_event_mgr.h"
#include "tensorflow/core/common_runtime/gpu_device_context.h"
#include "tensorflow/core/common_runtime/local_device.h"
#include "tensorflow/core/framework/allocator.h"
@ -15,9 +18,6 @@
#include "tensorflow/core/public/session_options.h"
#include "tensorflow/core/public/status.h"
#include "tensorflow/core/public/tensor.h"
#include "tensorflow/core/common_runtime/gpu/gpu_event_mgr.h"
#include "tensorflow/stream_executor/stream.h"
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
namespace tensorflow {

View File

@ -2,10 +2,10 @@
#include "tensorflow/core/common_runtime/gpu/gpu_event_mgr.h"
#include "tensorflow/core/common_runtime/gpu/gpu_init.h"
#include "tensorflow/stream_executor/multi_platform_manager.h"
#include "tensorflow/stream_executor/stream_executor.h"
#include <gtest/gtest.h>
#include "tensorflow/core/common_runtime/gpu/gpu_init.h"
namespace gpu = ::perftools::gputools;

View File

@ -2,13 +2,13 @@
#include <string>
#include "tensorflow/core/platform/port.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/stream_executor/multi_platform_manager.h"
#include "tensorflow/stream_executor/stream_executor.h"
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/lib/strings/numbers.h"
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/port.h"
namespace gpu = ::perftools::gputools;

View File

@ -5,12 +5,12 @@
#include <algorithm>
#include <vector>
#include "tensorflow/core/platform/port.h"
#include "tensorflow/core/lib/gtl/inlined_vector.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/common_runtime/gpu/gpu_init.h"
#include "tensorflow/stream_executor/stream_executor.h"
#include <gtest/gtest.h>
#include "tensorflow/core/common_runtime/gpu/gpu_init.h"
#include "tensorflow/core/lib/gtl/inlined_vector.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/port.h"
namespace gpu = ::perftools::gputools;

View File

@ -1,7 +1,12 @@
#include "tensorflow/core/common_runtime/gpu/gpu_util.h"
//#include "base/commandlineflags.h"
#include "tensorflow/stream_executor/stream.h"
#include "tensorflow/stream_executor/stream_executor.h"
#include "tensorflow/core/common_runtime/device.h"
#include "tensorflow/core/common_runtime/gpu/dma_helper.h"
#include "tensorflow/core/common_runtime/gpu/gpu_event_mgr.h"
#include "tensorflow/core/common_runtime/gpu/process_state.h"
#include "tensorflow/core/common_runtime/gpu_device_context.h"
#include "tensorflow/core/framework/types.h"
#include "tensorflow/core/lib/core/errors.h"
@ -15,12 +20,7 @@
#include "tensorflow/core/platform/tensor_coding.h"
#include "tensorflow/core/platform/tracing.h"
#include "tensorflow/core/public/tensor.h"
#include "tensorflow/core/common_runtime/gpu/dma_helper.h"
#include "tensorflow/core/common_runtime/gpu/gpu_event_mgr.h"
#include "tensorflow/core/common_runtime/gpu/process_state.h"
#include "tensorflow/core/util/util.h"
#include "tensorflow/stream_executor/stream.h"
#include "tensorflow/stream_executor/stream_executor.h"
#include "tensorflow/core/platform/stream_executor_util.h"

View File

@ -1,11 +1,11 @@
#ifndef TENSORFLOW_COMMON_RUNTIME_GPU_GPU_UTIL_H_
#define TENSORFLOW_COMMON_RUNTIME_GPU_GPU_UTIL_H_
#include "tensorflow/core/common_runtime/device.h"
#include "tensorflow/core/public/tensor.h"
#include "tensorflow/core/public/status.h"
#include "tensorflow/core/common_runtime/gpu/dma_helper.h"
#include "tensorflow/stream_executor/device_memory.h"
#include "tensorflow/core/common_runtime/device.h"
#include "tensorflow/core/common_runtime/gpu/dma_helper.h"
#include "tensorflow/core/public/status.h"
#include "tensorflow/core/public/tensor.h"
#include "tensorflow/stream_executor/stream.h"

View File

@ -1,9 +1,9 @@
#include "tensorflow/core/common_runtime/device.h"
#include "tensorflow/stream_executor/stream.h"
#include "tensorflow/core/common_runtime/gpu/gpu_util.h"
#include "tensorflow/core/common_runtime/gpu_device_context.h"
#include "tensorflow/core/framework/types.h"
#include "tensorflow/core/public/tensor.h"
#include "tensorflow/core/common_runtime/gpu/gpu_util.h"
#include "tensorflow/stream_executor/stream.h"
namespace tensorflow {

View File

@ -6,10 +6,10 @@
#include <map>
//#include "prodkernel/api/base/numa.h"
#include "tensorflow/core/lib/strings/numbers.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/port.h"
//#include "prodkernel/api/base/numa.h"
namespace tensorflow {

View File

@ -8,11 +8,11 @@
#include <atomic>
#include <map>
#include <memory>
#include "tensorflow/stream_executor/stream_executor.h"
#include "tensorflow/core/common_runtime/gpu/visitable_allocator.h"
#include "tensorflow/core/lib/core/bits.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/port.h"
#include "tensorflow/core/common_runtime/gpu/visitable_allocator.h"
#include "tensorflow/stream_executor/stream_executor.h"
namespace tensorflow {

View File

@ -1,15 +1,15 @@
#include "tensorflow/core/common_runtime/gpu/process_state.h"
#include "tensorflow/core/framework/allocator.h"
#include "tensorflow/core/common_runtime/gpu/gpu_init.h"
#include "tensorflow/stream_executor/multi_platform_manager.h"
#include "tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.h"
#include "tensorflow/core/common_runtime/gpu/gpu_debug_allocator.h"
#include "tensorflow/core/common_runtime/gpu/gpu_init.h"
#include "tensorflow/core/common_runtime/gpu/gpu_region_allocator.h"
#include "tensorflow/core/common_runtime/gpu/pool_allocator.h"
#include "tensorflow/core/framework/allocator.h"
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/port.h"
#include "tensorflow/stream_executor/multi_platform_manager.h"
#if defined(PLATFORM_GOOGLE)
DEFINE_bool(record_mem_types, false,

View File

@ -4,17 +4,17 @@
#include "tensorflow/core/common_runtime/device_factory.h"
#include "tensorflow/core/framework/op.h"
#include "tensorflow/core/framework/op_kernel.h"
#include "tensorflow/core/graph/graph.h"
#include "tensorflow/core/framework/op_segment.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/graph/graph.h"
#include "tensorflow/core/kernels/ops_util.h"
#include "tensorflow/core/lib/core/notification.h"
#include "tensorflow/core/lib/core/threadpool.h"
#include "tensorflow/core/lib/strings/str_util.h"
#include "tensorflow/core/util/device_name_utils.h"
#include "tensorflow/core/lib/core/notification.h"
#include "tensorflow/core/kernels/ops_util.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/port.h"
#include "tensorflow/core/platform/test_benchmark.h"
#include "tensorflow/core/public/session_options.h"
#include "tensorflow/core/util/device_name_utils.h"
#if defined(PLATFORM_GOOGLE)
DECLARE_bool(brain_gpu_use_bfc_allocator);
@ -71,9 +71,7 @@ Benchmark::Benchmark(const string& device, Graph* g,
TF_CHECK_OK(NewLocalExecutor(
{
device_,
nullptr,
false,
device_, nullptr, false,
[this](const NodeDef& ndef, OpKernel** kernel) {
return CreateNonCachedKernel(device_, nullptr, ndef, kernel);
},

View File

@ -4,10 +4,10 @@
#include <string>
#include <vector>
#include "tensorflow/core/platform/port.h"
#include "tensorflow/core/lib/core/threadpool.h"
#include "tensorflow/core/common_runtime/executor.h"
#include "tensorflow/core/graph/testlib.h"
#include "tensorflow/core/lib/core/threadpool.h"
#include "tensorflow/core/platform/port.h"
#include "tensorflow/core/public/tensor.h"
namespace tensorflow {

View File

@ -1,12 +1,12 @@
#define EIGEN_USE_THREADS
#include "tensorflow/core/common_runtime/eigen_thread_pool.h"
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
#include "tensorflow/core/common_runtime/local_device.h"
#include "tensorflow/core/lib/core/threadpool.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/port.h"
#include "tensorflow/core/public/session_options.h"
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
namespace tensorflow {

View File

@ -1,7 +1,7 @@
#include "tensorflow/core/public/session.h"
#include "tensorflow/core/public/session_options.h"
#include <gtest/gtest.h>
#include "tensorflow/core/public/session_options.h"
namespace tensorflow {
namespace {

View File

@ -7,9 +7,9 @@
#include "tensorflow/core/common_runtime/device_set.h"
#include "tensorflow/core/graph/graph.h"
#include "tensorflow/core/platform/port.h"
#include "tensorflow/core/public/session_options.h"
#include "tensorflow/core/public/status.h"
#include "tensorflow/core/util/device_name_utils.h"
#include "tensorflow/core/public/session_options.h"
namespace tensorflow {

View File

@ -5,6 +5,7 @@
#include <utility>
#include <vector>
#include <gtest/gtest.h>
#include "tensorflow/core/common_runtime/device.h"
#include "tensorflow/core/common_runtime/device_set.h"
#include "tensorflow/core/framework/device_attributes.pb.h"
@ -20,7 +21,6 @@
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/lib/core/status_test_util.h"
#include "tensorflow/core/lib/strings/strcat.h"
#include <gtest/gtest.h>
namespace tensorflow {

View File

@ -75,8 +75,8 @@ message BytesList {
repeated bytes value = 1;
}
message FloatList {
repeated float value = 1 [packed=true];
repeated float value = 1 [packed = true];
}
message Int64List {
repeated int64 value = 1 [packed=true];
repeated int64 value = 1 [packed = true];
}

View File

@ -6,8 +6,8 @@
#include <limits>
#include "tensorflow/core/platform/port.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/port.h"
namespace tensorflow {

View File

@ -1,7 +1,7 @@
#include "tensorflow/core/framework/allocator.h"
#include <algorithm>
#include "tensorflow/core/platform/logging.h"
#include <gtest/gtest.h>
#include "tensorflow/core/platform/logging.h"
namespace tensorflow {
TEST(CPUAllocatorTest, Simple) {

View File

@ -4,11 +4,11 @@
#include <string>
#include "tensorflow/core/framework/attr_value.pb.h"
#include "tensorflow/core/framework/types.h"
#include "tensorflow/core/public/tensor.h"
#include "tensorflow/core/public/tensor_shape.h"
#include "tensorflow/core/public/status.h"
#include "tensorflow/core/lib/core/stringpiece.h"
#include "tensorflow/core/lib/gtl/array_slice.h"
#include "tensorflow/core/public/status.h"
#include "tensorflow/core/public/tensor.h"
#include "tensorflow/core/public/tensor_shape.h"
namespace tensorflow {

View File

@ -1,8 +1,8 @@
#ifndef TENSORFLOW_FRAMEWORK_BFLOAT16_H_
#define TENSORFLOW_FRAMEWORK_BFLOAT16_H_
#include "tensorflow/core/platform/port.h"
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
#include "tensorflow/core/platform/port.h"
// Compact 16-bit encoding of floating point numbers. This representation uses
// 1 bit for the sign, 8 bits for the exponent and 7 bits for the mantissa. It

View File

@ -1,7 +1,7 @@
#include "tensorflow/core/framework/bfloat16.h"
#include "tensorflow/core/platform/test_benchmark.h"
#include <gtest/gtest.h>
#include "tensorflow/core/platform/test_benchmark.h"
namespace tensorflow {
namespace {

View File

@ -1,8 +1,8 @@
#include "tensorflow/core/framework/cancellation.h"
#include <gtest/gtest.h>
#include "tensorflow/core/lib/core/notification.h"
#include "tensorflow/core/lib/core/threadpool.h"
#include <gtest/gtest.h>
namespace tensorflow {

View File

@ -1,9 +1,9 @@
#ifndef TENSORFLOW_FRAMEWORK_CONTROL_FLOW_H_
#define TENSORFLOW_FRAMEWORK_CONTROL_FLOW_H_
#include "tensorflow/core/platform/port.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/lib/hash/hash.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/port.h"
namespace tensorflow {

View File

@ -6,11 +6,11 @@
#include "tensorflow/core/framework/device_attributes.pb.h"
#include "tensorflow/core/framework/tensor.pb.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/public/tensor.h"
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/lib/core/refcount.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/public/status.h"
#include "tensorflow/core/public/tensor.h"
namespace Eigen {
class ThreadPoolDevice;

View File

@ -84,8 +84,7 @@ Status FakeInputImpl::AddInputToBuilder() {
} else {
if (!dt_specified_ && !arg_->type_list_attr().empty()) {
DataTypeVector dts;
Status status =
GetNodeAttr(*node_def_, arg_->type_list_attr(), &dts);
Status status = GetNodeAttr(*node_def_, arg_->type_list_attr(), &dts);
if (!status.ok()) {
return errors::InvalidArgument(
"Could not infer list of types for input '", arg_->name(), "': ",

View File

@ -1,4 +1,5 @@
#include "tensorflow/core/framework/function.h"
#include <gtest/gtest.h>
#include "tensorflow/core/framework/function.pb.h"
#include "tensorflow/core/framework/function_testlib.h"
#include "tensorflow/core/framework/graph.pb.h"
@ -10,7 +11,6 @@
#include "tensorflow/core/lib/strings/str_util.h"
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/platform/port.h"
#include <gtest/gtest.h>
namespace tensorflow {

View File

@ -1,8 +1,8 @@
#include "tensorflow/core/framework/kernel_def_builder.h"
#include <gtest/gtest.h>
#include "tensorflow/core/framework/kernel_def.pb.h"
#include "tensorflow/core/platform/protobuf.h"
#include <gtest/gtest.h>
namespace tensorflow {
namespace {

View File

@ -49,8 +49,7 @@ bool NodeDefBuilder::NextArgAvailable() {
NodeDefBuilder& NodeDefBuilder::Input(FakeInputFunctor fake_input) {
if (NextArgAvailable()) {
Status status =
fake_input(*op_def_, inputs_specified_, node_def_, this);
Status status = fake_input(*op_def_, inputs_specified_, node_def_, this);
if (!status.ok()) errors_.push_back(status.error_message());
}
return *this;

View File

@ -8,15 +8,15 @@
#include "tensorflow/core/framework/op.h"
#include "tensorflow/core/framework/op_def.pb.h"
#include "tensorflow/core/framework/types.h"
#include "tensorflow/core/public/status.h"
#include "tensorflow/core/lib/gtl/array_slice.h"
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/public/status.h"
namespace tensorflow {
class NodeDefBuilder;
typedef std::function<Status(const OpDef&, int, const NodeDef&,
NodeDefBuilder*)> FakeInputFunctor;
NodeDefBuilder*)> FakeInputFunctor;
// This is a helper for creating a NodeDef. Automatically sets attrs
// that can be inferred from the inputs, and uses default values

View File

@ -1,13 +1,13 @@
#include "tensorflow/core/framework/node_def_builder.h"
#include <memory>
#include <gtest/gtest.h>
#include "tensorflow/core/framework/fake_input.h"
#include "tensorflow/core/framework/node_def_util.h"
#include "tensorflow/core/framework/op_def_builder.h"
#include "tensorflow/core/framework/op_def_util.h"
#include "tensorflow/core/platform/protobuf.h"
#include "tensorflow/core/lib/core/status_test_util.h"
#include <gtest/gtest.h>
#include "tensorflow/core/platform/protobuf.h"
namespace tensorflow {
namespace {

View File

@ -1,13 +1,13 @@
#include "tensorflow/core/framework/node_def_util.h"
#include <gtest/gtest.h>
#include "tensorflow/core/framework/fake_input.h"
#include "tensorflow/core/framework/node_def_builder.h"
#include "tensorflow/core/framework/op_def_builder.h"
#include "tensorflow/core/framework/op_def_util.h"
#include "tensorflow/core/platform/protobuf.h"
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/lib/core/status_test_util.h"
#include <gtest/gtest.h>
#include "tensorflow/core/platform/protobuf.h"
namespace tensorflow {
namespace {

View File

@ -2,11 +2,11 @@
#define TENSORFLOW_FRAMEWORK_NUMERIC_OP_H_
#include "tensorflow/core/framework/op_kernel.h"
#include "tensorflow/core/framework/types.pb.h"
#include "tensorflow/core/framework/types.h"
#include "tensorflow/core/public/tensor.h"
#include "tensorflow/core/framework/types.pb.h"
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/public/status.h"
#include "tensorflow/core/public/tensor.h"
namespace tensorflow {

View File

@ -1,12 +1,12 @@
#include "tensorflow/core/framework/op_def_builder.h"
#include "tensorflow/core/framework/op_def.pb.h"
#include "tensorflow/core/platform/protobuf.h"
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/lib/strings/str_util.h"
#include "tensorflow/core/lib/core/stringpiece.h"
#include "tensorflow/core/lib/core/status_test_util.h"
#include <gtest/gtest.h>
#include "tensorflow/core/framework/op_def.pb.h"
#include "tensorflow/core/lib/core/status_test_util.h"
#include "tensorflow/core/lib/core/stringpiece.h"
#include "tensorflow/core/lib/strings/str_util.h"
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/platform/protobuf.h"
namespace tensorflow {
namespace {

View File

@ -62,7 +62,7 @@ Status AllowedStringValue(const string& str, const OpDef::AttrDef& attr) {
// Requires: attr has already been validated.
Status ValidateAttrValue(const AttrValue& attr_value,
const OpDef::AttrDef& attr) {
const OpDef::AttrDef& attr) {
// Is it a valid value?
TF_RETURN_WITH_CONTEXT_IF_ERROR(AttrValueHasType(attr_value, attr.type()),
" for attr '", attr.name(), "'");
@ -149,7 +149,7 @@ OpDef::AttrDef* FindAttrMutable(StringPiece name, OpDef* op_def) {
} while (false)
static Status ValidateArg(const OpDef::ArgDef& arg, const OpDef& op_def,
bool output, std::set<string>* names) {
bool output, std::set<string>* names) {
const string suffix = strings::StrCat(
output ? " for output '" : " for input '", arg.name(), "'");
VALIDATE(gtl::InsertIfNotPresent(names, arg.name()), "Duplicate name: ",

View File

@ -16,7 +16,7 @@ Status ValidateOpDef(const OpDef& op_def);
// Validates that attr_value satisfies the type and constraints from attr.
// REQUIRES: attr has already been validated.
Status ValidateAttrValue(const AttrValue& attr_value,
const OpDef::AttrDef& attr);
const OpDef::AttrDef& attr);
// The following search through op_def for an attr with the indicated name.
// Returns nullptr if no such attr is found.

View File

@ -1,12 +1,12 @@
#include "tensorflow/core/framework/op_def_util.h"
#include <gtest/gtest.h>
#include "tensorflow/core/framework/op_def.pb.h"
#include "tensorflow/core/framework/op_def_builder.h"
#include "tensorflow/core/platform/protobuf.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/lib/core/status_test_util.h"
#include "tensorflow/core/lib/strings/str_util.h"
#include <gtest/gtest.h>
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/protobuf.h"
namespace tensorflow {
namespace {
@ -19,9 +19,7 @@ OpDef FromText(const string& text) {
class ValidateOpDefTest : public ::testing::Test {
protected:
Status TestProto(const string& text) {
return ValidateOpDef(FromText(text));
}
Status TestProto(const string& text) { return ValidateOpDef(FromText(text)); }
Status TestBuilder(const OpDefBuilder& builder) {
OpDef op_def;

View File

@ -841,7 +841,7 @@ class OpKernelContext {
void NotifyUseOfPersistentTensor(const Tensor& tensor);
Status status_;
Params params_; // immutable after construction.
Params params_; // immutable after construction.
const PerOpGpuDevice* eigen_gpu_device_; // owned, with a per-op
// wrapped allocator
mutable mutex mu_; // mutable so const accessors can acquire the lock

View File

@ -2,6 +2,7 @@
#include <memory>
#include <vector>
#include <gtest/gtest.h>
#include "tensorflow/core/framework/allocator.h"
#include "tensorflow/core/framework/attr_value_util.h"
#include "tensorflow/core/framework/fake_input.h"
@ -14,7 +15,6 @@
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/protobuf.h"
#include <gtest/gtest.h>
class DummyKernel : public tensorflow::OpKernel {
public:

View File

@ -1,15 +1,15 @@
#include "tensorflow/core/framework/op_segment.h"
#include <gtest/gtest.h>
#include "tensorflow/core/framework/allocator.h"
#include "tensorflow/core/framework/graph.pb.h"
#include "tensorflow/core/framework/node_def_builder.h"
#include "tensorflow/core/framework/op_kernel.h"
#include "tensorflow/core/kernels/ops_util.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/lib/strings/strcat.h"
#include <gtest/gtest.h>
#include "tensorflow/core/lib/core/status_test_util.h"
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/platform/logging.h"
namespace tensorflow {

View File

@ -3,12 +3,12 @@
#include <unordered_map>
#include <utility>
#include "tensorflow/core/platform/thread_annotations.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/port.h"
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/lib/core/notification.h"
#include "tensorflow/core/lib/strings/str_util.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/port.h"
#include "tensorflow/core/platform/thread_annotations.h"
namespace tensorflow {

View File

@ -3,11 +3,11 @@
#include <string>
#include "tensorflow/core/public/tensor.h"
#include "tensorflow/core/lib/core/refcount.h"
#include "tensorflow/core/public/status.h"
#include "tensorflow/core/framework/control_flow.h"
#include "tensorflow/core/framework/device_base.h"
#include "tensorflow/core/lib/core/refcount.h"
#include "tensorflow/core/public/status.h"
#include "tensorflow/core/public/tensor.h"
#include "tensorflow/core/util/device_name_utils.h"
namespace tensorflow {

View File

@ -1,8 +1,8 @@
#include "tensorflow/core/framework/tensor_slice.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/lib/strings/str_util.h"
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/platform/logging.h"
namespace tensorflow {
@ -191,7 +191,7 @@ int64 TensorSlice::GetExtentLength(const TensorSliceProto::Extent& extent) {
}
Status TensorSlice::SliceTensorShape(const TensorShape& shape,
TensorShape* result_shape) const {
TensorShape* result_shape) const {
result_shape->Clear();
// Mismatching ranks: we can't apply the slice at all.
if (shape.dims() != dims()) {

View File

@ -2,13 +2,13 @@
#define TENSORFLOW_FRAMEWORK_TENSOR_SLICE_H_
#include <string>
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
#include "tensorflow/core/framework/tensor_slice.pb.h"
#include "tensorflow/core/lib/core/stringpiece.h"
#include "tensorflow/core/lib/gtl/inlined_vector.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/public/tensor_shape.h"
#include "tensorflow/core/lib/core/stringpiece.h"
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
#include "tensorflow/core/public/status.h"
#include "tensorflow/core/public/tensor_shape.h"
namespace tensorflow {
@ -121,7 +121,7 @@ class TensorSlice {
// For example, given a tensor shape of {3, 4, 5}, and a slice of
// 1,2:-:0,2, the result shape is {2, 4, 2}.
Status SliceTensorShape(const TensorShape& shape,
TensorShape* result_shape) const;
TensorShape* result_shape) const;
// Given slice "sub" where "sub" is fully contained in *this,
// (meaning that the intersection of "sub" and *this equals "sub"), computes

View File

@ -1,9 +1,9 @@
#include "tensorflow/core/framework/tensor_slice.h"
#include "tensorflow/core/platform/protobuf.h"
#include "tensorflow/core/platform/logging.h"
#include <gtest/gtest.h>
#include "tensorflow/core/lib/core/status_test_util.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/protobuf.h"
namespace tensorflow {
namespace {

View File

@ -1,11 +1,11 @@
#include "tensorflow/core/public/tensor.h"
#include <gtest/gtest.h>
#include "tensorflow/core/framework/tensor_testutil.h"
#include "tensorflow/core/framework/types.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/test_benchmark.h"
#include <gtest/gtest.h>
namespace tensorflow {

View File

@ -1,10 +1,10 @@
#ifndef TENSORFLOW_FRAMEWORK_TENSOR_TESTUTIL_H_
#define TENSORFLOW_FRAMEWORK_TENSOR_TESTUTIL_H_
#include <gtest/gtest.h>
#include "tensorflow/core/lib/gtl/array_slice.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/public/tensor.h"
#include <gtest/gtest.h>
namespace tensorflow {
namespace test {

View File

@ -1,8 +1,8 @@
#include "tensorflow/core/framework/tensor_util.h"
#include <gtest/gtest.h>
#include "tensorflow/core/framework/types.h"
#include "tensorflow/core/public/tensor.h"
#include <gtest/gtest.h>
namespace tensorflow {
namespace {

View File

@ -2,9 +2,9 @@
#include <unordered_map>
#include <gtest/gtest.h>
#include "tensorflow/core/framework/allocator.h"
#include "tensorflow/core/platform/logging.h"
#include <gtest/gtest.h>
namespace tensorflow {

View File

@ -5,6 +5,7 @@
#include <set>
#include <string>
#include "third_party/eigen3/unsupported/Eigen/CXX11/FixedPoint"
#include "tensorflow/core/framework/bfloat16.h"
#include "tensorflow/core/framework/numeric_types.h"
#include "tensorflow/core/framework/types.pb.h"
@ -13,7 +14,6 @@
#include "tensorflow/core/lib/gtl/inlined_vector.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/port.h"
#include "third_party/eigen3/unsupported/Eigen/CXX11/FixedPoint"
namespace tensorflow {

View File

@ -3,14 +3,14 @@
#include <string>
#include <vector>
#include <gtest/gtest.h>
#include "tensorflow/core/framework/graph.pb.h"
#include "tensorflow/core/graph/graph.h"
#include "tensorflow/core/graph/graph_def_builder.h"
#include "tensorflow/core/graph/subgraph.h"
#include "tensorflow/core/kernels/ops_util.h"
#include <gtest/gtest.h>
#include "tensorflow/core/public/status.h"
#include "tensorflow/core/lib/core/status_test_util.h"
#include "tensorflow/core/public/status.h"
// TODO(josh11b): Test setting the "device" field of a NodeDef.
// TODO(josh11b): Test that feeding won't prune targets.

View File

@ -7,15 +7,15 @@ namespace tensorflow {
// Color palette
// http://www.mulinblog.com/a-color-palette-optimized-for-data-visualization/
static const char* kColors[] = {
"#F15854", // red
"#5DA5DA", // blue
"#FAA43A", // orange
"#60BD68", // green
"#F17CB0", // pink
"#B2912F", // brown
"#B276B2", // purple
"#DECF3F", // yellow
"#4D4D4D", // gray
"#F15854", // red
"#5DA5DA", // blue
"#FAA43A", // orange
"#60BD68", // green
"#F17CB0", // pink
"#B2912F", // brown
"#B276B2", // purple
"#DECF3F", // yellow
"#4D4D4D", // gray
};
const char* ColorFor(int dindex) {

View File

@ -1,8 +1,8 @@
#include "tensorflow/core/graph/costutil.h"
#include "tensorflow/core/graph/algorithm.h"
#include "tensorflow/core/graph/graph.h"
#include "tensorflow/core/graph/costmodel.h"
#include "tensorflow/core/graph/graph.h"
namespace tensorflow {

View File

@ -6,8 +6,8 @@
#include "tensorflow/core/graph/colors.h"
#include "tensorflow/core/graph/graph.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/regexp.h"
#include "tensorflow/core/util/util.h"

View File

@ -1,7 +1,7 @@
#include "tensorflow/core/graph/edgeset.h"
#include "tensorflow/core/graph/graph.h"
#include <gtest/gtest.h>
#include "tensorflow/core/graph/graph.h"
namespace tensorflow {
class EdgeSetTest : public ::testing::Test {

View File

@ -1,10 +1,10 @@
#include "tensorflow/core/graph/equal_graph_def.h"
#include "tensorflow/core/framework/op.h"
#include <gtest/gtest.h>
#include "tensorflow/core/framework/node_def_util.h"
#include "tensorflow/core/framework/op.h"
#include "tensorflow/core/graph/graph_def_builder.h"
#include "tensorflow/core/kernels/ops_util.h"
#include <gtest/gtest.h>
namespace tensorflow {
namespace {

View File

@ -349,7 +349,7 @@ bool GraphConstructor::TypeValidateEdge(const Edge* edge) {
// ----------------------------------------------------------------------------
Status ConvertGraphDefToGraph(const GraphConstructorOptions& opts,
const GraphDef& gdef, Graph* g) {
const GraphDef& gdef, Graph* g) {
Status status;
GraphConstructor constructor(opts, &gdef, g, &status);
return status;

View File

@ -30,7 +30,7 @@ struct GraphConstructorOptions {
std::function<bool(const Node*)> cse_consider_function = nullptr;
};
extern Status ConvertGraphDefToGraph(const GraphConstructorOptions& opts,
const GraphDef& gdef, Graph* g);
const GraphDef& gdef, Graph* g);
// Make a copy of "src" into "*dest".
//

View File

@ -1,5 +1,6 @@
#include "tensorflow/core/graph/graph_constructor.h"
#include <gtest/gtest.h>
#include "tensorflow/core/framework/graph.pb.h"
#include "tensorflow/core/graph/graph.h"
#include "tensorflow/core/kernels/ops_util.h"
@ -8,7 +9,6 @@
#include "tensorflow/core/platform/protobuf.h"
#include "tensorflow/core/platform/regexp.h"
#include "tensorflow/core/public/status.h"
#include <gtest/gtest.h>
// TODO(josh11b): Test InitCostModel().
// TODO(josh11b): Test setting the "device" field of a NodeDef.

View File

@ -6,9 +6,9 @@
#include "tensorflow/core/framework/op.h"
#include "tensorflow/core/graph/graph.h"
#include "tensorflow/core/graph/node_builder.h"
#include "tensorflow/core/public/status.h"
#include "tensorflow/core/lib/core/stringpiece.h"
#include "tensorflow/core/lib/gtl/array_slice.h"
#include "tensorflow/core/public/status.h"
namespace tensorflow {

View File

@ -6,8 +6,8 @@
#include <unordered_map>
#include "tensorflow/core/framework/graph.pb.h"
#include "tensorflow/core/graph/graph.h"
#include "tensorflow/core/graph/costmodel.h"
#include "tensorflow/core/graph/graph.h"
namespace tensorflow {

View File

@ -6,8 +6,8 @@
#include "tensorflow/core/framework/op.h"
#include "tensorflow/core/framework/op_def.pb.h"
#include "tensorflow/core/graph/graph.h"
#include "tensorflow/core/public/status.h"
#include "tensorflow/core/lib/gtl/array_slice.h"
#include "tensorflow/core/public/status.h"
namespace tensorflow {

View File

@ -1,10 +1,10 @@
#include "tensorflow/core/graph/node_builder.h"
#include <gtest/gtest.h>
#include "tensorflow/core/framework/op.h"
#include "tensorflow/core/graph/graph.h"
#include "tensorflow/core/kernels/ops_util.h"
#include "tensorflow/core/lib/core/status_test_util.h"
#include <gtest/gtest.h>
namespace tensorflow {
namespace {

View File

@ -15,8 +15,8 @@
#include "tensorflow/core/graph/graph_constructor.h"
#include "tensorflow/core/graph/node_builder.h"
#include "tensorflow/core/graph/tensor_id.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/public/status.h"
namespace tensorflow {
@ -41,8 +41,8 @@ typedef std::unordered_map<StringPiece, Node*, StringPiece::Hasher> NameIndex;
// an appropriate error message (and *g is left in an indeterminate
// state).
static Status FeedInputs(Graph* g, const DeviceAttributes& device_info,
const gtl::ArraySlice<string>& fed_outputs,
NameIndex* name_index) {
const gtl::ArraySlice<string>& fed_outputs,
NameIndex* name_index) {
for (const string& t : fed_outputs) {
TensorId id(ParseTensorName(t));

View File

@ -3,6 +3,7 @@
#include <string>
#include <vector>
#include <gtest/gtest.h>
#include "tensorflow/core/framework/graph.pb.h"
#include "tensorflow/core/graph/graph.h"
#include "tensorflow/core/graph/graph_constructor.h"
@ -15,7 +16,6 @@
#include "tensorflow/core/platform/regexp.h"
#include "tensorflow/core/platform/test_benchmark.h"
#include "tensorflow/core/public/status.h"
#include <gtest/gtest.h>
// TODO(josh11b): Test setting the "device" field of a NodeDef.
// TODO(josh11b): Test that feeding won't prune targets.
@ -100,8 +100,8 @@ class SubgraphTest : public ::testing::Test {
std::vector<string> targets =
str_util::Split(targets_str, ',', str_util::SkipEmpty());
Status s = subgraph::RewriteGraphForExecution(subgraph, fed, fetch,
targets, device_info_);
Status s = subgraph::RewriteGraphForExecution(subgraph, fed, fetch, targets,
device_info_);
if (!s.ok()) {
delete subgraph;
return s.ToString();

View File

@ -3,8 +3,8 @@
#include <string>
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/lib/core/stringpiece.h"
#include "tensorflow/core/lib/strings/strcat.h"
namespace tensorflow {

View File

@ -6,9 +6,9 @@
#include <string>
#include <vector>
#include "tensorflow/core/platform/port.h"
#include "tensorflow/core/graph/graph.h"
#include "tensorflow/core/graph/types.h"
#include "tensorflow/core/platform/port.h"
#include "tensorflow/core/public/tensor.h"
#include "tensorflow/core/public/tensor_shape.h"

View File

@ -1,8 +1,8 @@
#ifndef TENSORFLOW_GRAPH_TYPES_H_
#define TENSORFLOW_GRAPH_TYPES_H_
#include "tensorflow/core/platform/port.h"
#include "tensorflow/core/lib/gtl/int_type.h"
#include "tensorflow/core/platform/port.h"
namespace tensorflow {

View File

@ -2,6 +2,7 @@
#define EIGEN_USE_THREADS
#include <memory>
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
#include "tensorflow/core/framework/op_kernel.h"
#include "tensorflow/core/framework/register_types.h"
#include "tensorflow/core/framework/types.h"
@ -10,7 +11,6 @@
#include "tensorflow/core/public/status.h"
#include "tensorflow/core/public/tensor.h"
#include "tensorflow/core/public/tensor_shape.h"
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
namespace tensorflow {
@ -20,8 +20,8 @@ typedef Eigen::GpuDevice GPUDevice;
template <typename Device, typename T>
class AdjustContrastOp : public OpKernel {
public:
explicit AdjustContrastOp(OpKernelConstruction* context) : OpKernel(context) {
}
explicit AdjustContrastOp(OpKernelConstruction* context)
: OpKernel(context) {}
void Compute(OpKernelContext* context) override {
const Tensor& input = context->input(0);

View File

@ -1,7 +1,7 @@
#ifndef TENSORFLOW_KERNELS_ADJUST_CONTRAST_OP_H_
#define TENSORFLOW_KERNELS_ADJUST_CONTRAST_OP_H_
#include "tensorflow/core/framework/tensor_types.h"
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
#include "tensorflow/core/framework/tensor_types.h"
namespace tensorflow {
namespace functor {

View File

@ -3,8 +3,8 @@
// Functor definitions for Aggregate ops, must be compilable by nvcc.
#include "tensorflow/core/framework/tensor_types.h"
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
#include "tensorflow/core/framework/tensor_types.h"
namespace tensorflow {
namespace functor {

View File

@ -4,8 +4,8 @@
#include "tensorflow/core/kernels/aggregate_ops.h"
#include "tensorflow/core/platform/port.h"
#include "tensorflow/core/framework/tensor_types.h"
#include "tensorflow/core/platform/port.h"
namespace tensorflow {

View File

@ -9,14 +9,14 @@
#include "tensorflow/core/kernels/argmax_op.h"
#include <memory>
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
#include "tensorflow/core/framework/op_kernel.h"
#include "tensorflow/core/framework/register_types.h"
#include "tensorflow/core/framework/tensor_types.h"
#include "tensorflow/core/framework/types.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/public/tensor_shape.h"
#include "tensorflow/core/public/tensor.h"
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
#include "tensorflow/core/public/tensor_shape.h"
namespace tensorflow {

View File

@ -2,9 +2,9 @@
#define TENSORFLOW_KERNELS_ARGMAX_OP_H_
// Generator definition for ArgMaxOp, must be compilable by nvcc.
#include "tensorflow/core/platform/port.h"
#include "tensorflow/core/framework/tensor_types.h"
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
#include "tensorflow/core/framework/tensor_types.h"
#include "tensorflow/core/platform/port.h"
namespace tensorflow {

View File

@ -3,9 +3,9 @@
#define EIGEN_USE_THREADS
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
#include "tensorflow/core/framework/op_kernel.h"
#include "tensorflow/core/framework/tensor_types.h"
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
namespace tensorflow {

View File

@ -3,13 +3,13 @@
#define EIGEN_USE_THREADS
#include "tensorflow/core/platform/port.h"
#include "third_party/eigen3/unsupported/Eigen/CXX11/NeuralNetworks"
#include "tensorflow/core/framework/op.h"
#include "tensorflow/core/framework/op_kernel.h"
#include "tensorflow/core/framework/types.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/public/tensor.h"
#include "tensorflow/core/public/tensor_shape.h"
#include "third_party/eigen3/unsupported/Eigen/CXX11/NeuralNetworks"
namespace tensorflow {

View File

@ -4,19 +4,19 @@
#include "tensorflow/core/kernels/avgpooling_op.h"
#include "third_party/eigen3/unsupported/Eigen/CXX11/NeuralNetworks"
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
#include "tensorflow/core/framework/numeric_op.h"
#include "tensorflow/core/framework/op_kernel.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/public/tensor_shape.h"
#include "tensorflow/core/framework/tensor_slice.h"
#include "tensorflow/core/kernels/ops_util.h"
#include "tensorflow/core/kernels/pooling_ops_common.h"
#include "tensorflow/core/lib/gtl/array_slice.h"
#include "tensorflow/core/util/padding.h"
#include "tensorflow/core/public/tensor.h"
#include "tensorflow/core/lib/core/errors.h"
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
#include "third_party/eigen3/unsupported/Eigen/CXX11/NeuralNetworks"
#include "tensorflow/core/lib/gtl/array_slice.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/public/tensor.h"
#include "tensorflow/core/public/tensor_shape.h"
#include "tensorflow/core/util/padding.h"
#if GOOGLE_CUDA
#include "tensorflow/core/kernels/maxpooling_op_gpu.h"
@ -34,14 +34,12 @@ class AvgPoolingOp : public UnaryOp<T> {
explicit AvgPoolingOp(OpKernelConstruction* context) : UnaryOp<T>(context) {
OP_REQUIRES_OK(context, context->GetAttr("ksize", &ksize_));
OP_REQUIRES(context, ksize_.size() == 4,
errors::InvalidArgument(
"Sliding window ksize field must "
"specify 4 dimensions"));
errors::InvalidArgument("Sliding window ksize field must "
"specify 4 dimensions"));
OP_REQUIRES_OK(context, context->GetAttr("strides", &stride_));
OP_REQUIRES(context, stride_.size() == 4,
errors::InvalidArgument(
"Sliding window stride field must "
"specify 4 dimensions"));
errors::InvalidArgument("Sliding window stride field must "
"specify 4 dimensions"));
OP_REQUIRES_OK(context, context->GetAttr("padding", &padding_));
OP_REQUIRES(context, ksize_[0] == 1 && stride_[0] == 1,
errors::Unimplemented(
@ -56,9 +54,8 @@ class AvgPoolingOp : public UnaryOp<T> {
return;
}
OP_REQUIRES(context, params.depth_window == 1,
errors::Unimplemented(
"Non-spatial pooling is not "
"yet supported. Volunteers? :)"));
errors::Unimplemented("Non-spatial pooling is not "
"yet supported. Volunteers? :)"));
// For avgpooling, tensor_in should have 4 dimensions.
OP_REQUIRES(context, tensor_in.dims() == 4,
@ -123,14 +120,12 @@ class AvgPoolingGradOp : public OpKernel {
explicit AvgPoolingGradOp(OpKernelConstruction* context) : OpKernel(context) {
OP_REQUIRES_OK(context, context->GetAttr("ksize", &ksize_));
OP_REQUIRES(context, ksize_.size() == 4,
errors::InvalidArgument(
"Sliding window ksize field must "
"specify 4 dimensions"));
errors::InvalidArgument("Sliding window ksize field must "
"specify 4 dimensions"));
OP_REQUIRES_OK(context, context->GetAttr("strides", &stride_));
OP_REQUIRES(context, stride_.size() == 4,
errors::InvalidArgument(
"Sliding window strides field must "
"specify 4 dimensions"));
errors::InvalidArgument("Sliding window strides field must "
"specify 4 dimensions"));
OP_REQUIRES_OK(context, context->GetAttr("padding", &padding_));
OP_REQUIRES(context, ksize_[0] == 1 && stride_[0] == 1,
errors::Unimplemented(
@ -141,11 +136,11 @@ class AvgPoolingGradOp : public OpKernel {
const Tensor& tensor_in_shape = context->input(0);
const Tensor& out_backprop = context->input(1);
// For avgpooling, tensor_in_shape should have 1 dimension, and 4 elements.
OP_REQUIRES(context, tensor_in_shape.dims() == 1 &&
tensor_in_shape.NumElements() == 4,
errors::InvalidArgument(
"out_backprop must be 1-dimensional and 4 "
"elements"));
OP_REQUIRES(
context,
tensor_in_shape.dims() == 1 && tensor_in_shape.NumElements() == 4,
errors::InvalidArgument("out_backprop must be 1-dimensional and 4 "
"elements"));
// For avgpooling, out_backprop should have 4 dimensions.
OP_REQUIRES(context, out_backprop.dims() == 4,
errors::InvalidArgument("out_backprop must be 4-dimensional"));
@ -178,9 +173,8 @@ class AvgPoolingGradOp : public OpKernel {
//
// Spatial pooling is when depth_window = 1
OP_REQUIRES(context, depth_window == 1,
errors::Unimplemented(
"Non-spatial pooling is not "
"yet supported. Volunteers? :)"));
errors::Unimplemented("Non-spatial pooling is not "
"yet supported. Volunteers? :)"));
int out_height, out_width, pad_rows, pad_cols;
OP_REQUIRES_OK(

View File

@ -2,9 +2,9 @@
#define TENSORFLOW_KERNELS_AVGPOOLING_OP_H_
// Functor definition for AvgPoolingOp, must be compilable by nvcc.
#include "tensorflow/core/platform/port.h"
#include "tensorflow/core/framework/tensor_types.h"
#include "third_party/eigen3/unsupported/Eigen/CXX11/NeuralNetworks"
#include "tensorflow/core/framework/tensor_types.h"
#include "tensorflow/core/platform/port.h"
namespace tensorflow {
namespace functor {

View File

@ -14,8 +14,8 @@
#include "tensorflow/core/util/work_sharder.h"
#if GOOGLE_CUDA
#include "tensorflow/core/common_runtime/gpu_device_context.h"
#include "tensorflow/stream_executor/stream.h"
#include "tensorflow/core/common_runtime/gpu_device_context.h"
#endif // GOOGLE_CUDA
namespace tensorflow {

View File

@ -3,11 +3,11 @@
#define EIGEN_USE_THREADS
#include "tensorflow/core/framework/numeric_op.h"
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
#include "tensorflow/core/framework/op_kernel.h"
#include "tensorflow/core/framework/register_types.h"
#include "tensorflow/core/kernels/batch_norm_op.h"
#include "tensorflow/core/public/tensor.h"
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
namespace tensorflow {

View File

@ -1,8 +1,8 @@
#ifndef TENSORFLOW_KERNELS_BATCH_NORM_OP_H_
#define TENSORFLOW_KERNELS_BATCH_NORM_OP_H_
// Functor definition for BatchNormOp, must be compilable by nvcc.
#include "tensorflow/core/framework/tensor_types.h"
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
#include "tensorflow/core/framework/tensor_types.h"
namespace tensorflow {
namespace functor {

View File

@ -3,11 +3,11 @@
#define EIGEN_USE_THREADS
#include "tensorflow/core/framework/numeric_op.h"
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
#include "tensorflow/core/framework/op_kernel.h"
#include "tensorflow/core/framework/register_types.h"
#include "tensorflow/core/kernels/bias_op.h"
#include "tensorflow/core/public/tensor.h"
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
namespace tensorflow {

View File

@ -2,8 +2,8 @@
#define TENSORFLOW_KERNELS_BIAS_OP_H_
// Functor definition for BiasOp, must be compilable by nvcc.
#include "tensorflow/core/framework/tensor_types.h"
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
#include "tensorflow/core/framework/tensor_types.h"
namespace tensorflow {
namespace functor {

View File

@ -1,10 +1,10 @@
#ifndef TENSORFLOW_KERNELS_CAST_OP_H_
#define TENSORFLOW_KERNELS_CAST_OP_H_
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
#include "tensorflow/core/framework/bfloat16.h"
#include "tensorflow/core/framework/tensor_types.h"
#include "tensorflow/core/platform/port.h"
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
namespace tensorflow {
namespace functor {

View File

@ -1,12 +1,12 @@
#include "tensorflow/core/framework/fake_input.h"
#include <gtest/gtest.h>
#include "tensorflow/core/common_runtime/kernel_benchmark_testlib.h"
#include "tensorflow/core/framework/node_def_builder.h"
#include "tensorflow/core/framework/types.pb.h"
#include "tensorflow/core/common_runtime/kernel_benchmark_testlib.h"
#include "tensorflow/core/kernels/ops_util.h"
#include "tensorflow/core/kernels/ops_testutil.h"
#include "tensorflow/core/kernels/ops_util.h"
#include "tensorflow/core/platform/test_benchmark.h"
#include "tensorflow/core/public/tensor.h"
#include <gtest/gtest.h>
namespace tensorflow {

View File

@ -8,8 +8,8 @@
#include "tensorflow/core/public/tensor.h"
#if GOOGLE_CUDA
#include "tensorflow/core/common_runtime/gpu_device_context.h"
#include "tensorflow/stream_executor/stream.h"
#include "tensorflow/core/common_runtime/gpu_device_context.h"
#endif // GOOGLE_CUDA
namespace tensorflow {

View File

@ -1,14 +1,14 @@
#if GOOGLE_CUDA
#define EIGEN_USE_GPU
#include <stdio.h>
#include <assert.h>
#include <stdio.h>
#include <math.h>
#include <algorithm>
#include "tensorflow/core/platform/port.h"
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
#include "tensorflow/core/platform/port.h"
namespace tensorflow {

Some files were not shown because too many files have changed in this diff Show More