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/common_runtime/device_set.h"
#include "tensorflow/core/public/status.h"
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include "tensorflow/core/public/status.h"
namespace tensorflow { namespace tensorflow {
namespace { namespace {

View File

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

View File

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

View File

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

View File

@ -1,8 +1,8 @@
#ifndef TENSORFLOW_COMMON_RUNTIME_EIGEN_THREAD_POOL_H_ #ifndef TENSORFLOW_COMMON_RUNTIME_EIGEN_THREAD_POOL_H_
#define 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 "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
#include "tensorflow/core/lib/core/threadpool.h"
namespace tensorflow { namespace tensorflow {

View File

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

View File

@ -4,8 +4,8 @@
#include "tensorflow/core/common_runtime/device.h" #include "tensorflow/core/common_runtime/device.h"
#include "tensorflow/core/framework/rendezvous.h" #include "tensorflow/core/framework/rendezvous.h"
#include "tensorflow/core/graph/graph.h" #include "tensorflow/core/graph/graph.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/lib/core/notification.h" #include "tensorflow/core/lib/core/notification.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/public/status.h" #include "tensorflow/core/public/status.h"
#include "tensorflow/core/public/tensor.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/common_runtime/gpu/gpu_allocator_retry.h"
#include "tensorflow/core/public/env.h"
#include "tensorflow/core/platform/logging.h" #include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/port.h" #include "tensorflow/core/platform/port.h"
#include "tensorflow/core/public/env.h"
namespace tensorflow { namespace tensorflow {

View File

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

View File

@ -1,8 +1,8 @@
#include "tensorflow/core/common_runtime/gpu/gpu_debug_allocator.h" #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/multi_platform_manager.h"
#include "tensorflow/stream_executor/stream_executor.h" #include "tensorflow/stream_executor/stream_executor.h"
#include "tensorflow/core/common_runtime/gpu/gpu_init.h"
namespace gpu = ::perftools::gputools; namespace gpu = ::perftools::gputools;

View File

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

View File

@ -5,14 +5,14 @@
#include <algorithm> #include <algorithm>
#include <vector> #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/multi_platform_manager.h"
#include "tensorflow/stream_executor/stream_executor.h" #include "tensorflow/stream_executor/stream_executor.h"
#include <gtest/gtest.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; namespace gpu = ::perftools::gputools;

View File

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

View File

@ -5,7 +5,10 @@
#ifndef TENSORFLOW_COMMON_RUNTIME_GPU_GPU_DEVICE_H_ #ifndef TENSORFLOW_COMMON_RUNTIME_GPU_GPU_DEVICE_H_
#define 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/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/gpu_device_context.h"
#include "tensorflow/core/common_runtime/local_device.h" #include "tensorflow/core/common_runtime/local_device.h"
#include "tensorflow/core/framework/allocator.h" #include "tensorflow/core/framework/allocator.h"
@ -15,9 +18,6 @@
#include "tensorflow/core/public/session_options.h" #include "tensorflow/core/public/session_options.h"
#include "tensorflow/core/public/status.h" #include "tensorflow/core/public/status.h"
#include "tensorflow/core/public/tensor.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 { 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_event_mgr.h"
#include "tensorflow/core/common_runtime/gpu/gpu_init.h"
#include "tensorflow/stream_executor/multi_platform_manager.h" #include "tensorflow/stream_executor/multi_platform_manager.h"
#include "tensorflow/stream_executor/stream_executor.h" #include "tensorflow/stream_executor/stream_executor.h"
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include "tensorflow/core/common_runtime/gpu/gpu_init.h"
namespace gpu = ::perftools::gputools; namespace gpu = ::perftools::gputools;

View File

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

View File

@ -5,12 +5,12 @@
#include <algorithm> #include <algorithm>
#include <vector> #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 "tensorflow/stream_executor/stream_executor.h"
#include <gtest/gtest.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; namespace gpu = ::perftools::gputools;

View File

@ -1,7 +1,12 @@
#include "tensorflow/core/common_runtime/gpu/gpu_util.h" #include "tensorflow/core/common_runtime/gpu/gpu_util.h"
//#include "base/commandlineflags.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/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/common_runtime/gpu_device_context.h"
#include "tensorflow/core/framework/types.h" #include "tensorflow/core/framework/types.h"
#include "tensorflow/core/lib/core/errors.h" #include "tensorflow/core/lib/core/errors.h"
@ -15,12 +20,7 @@
#include "tensorflow/core/platform/tensor_coding.h" #include "tensorflow/core/platform/tensor_coding.h"
#include "tensorflow/core/platform/tracing.h" #include "tensorflow/core/platform/tracing.h"
#include "tensorflow/core/public/tensor.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/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" #include "tensorflow/core/platform/stream_executor_util.h"

View File

@ -1,11 +1,11 @@
#ifndef TENSORFLOW_COMMON_RUNTIME_GPU_GPU_UTIL_H_ #ifndef TENSORFLOW_COMMON_RUNTIME_GPU_GPU_UTIL_H_
#define 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/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" #include "tensorflow/stream_executor/stream.h"

View File

@ -1,9 +1,9 @@
#include "tensorflow/core/common_runtime/device.h" #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/common_runtime/gpu_device_context.h"
#include "tensorflow/core/framework/types.h" #include "tensorflow/core/framework/types.h"
#include "tensorflow/core/public/tensor.h" #include "tensorflow/core/public/tensor.h"
#include "tensorflow/core/common_runtime/gpu/gpu_util.h"
#include "tensorflow/stream_executor/stream.h"
namespace tensorflow { namespace tensorflow {

View File

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

View File

@ -8,11 +8,11 @@
#include <atomic> #include <atomic>
#include <map> #include <map>
#include <memory> #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/lib/core/bits.h"
#include "tensorflow/core/platform/logging.h" #include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/port.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 { namespace tensorflow {

View File

@ -1,15 +1,15 @@
#include "tensorflow/core/common_runtime/gpu/process_state.h" #include "tensorflow/core/common_runtime/gpu/process_state.h"
#include "tensorflow/core/framework/allocator.h" #include "tensorflow/stream_executor/multi_platform_manager.h"
#include "tensorflow/core/common_runtime/gpu/gpu_init.h"
#include "tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.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_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/gpu_region_allocator.h"
#include "tensorflow/core/common_runtime/gpu/pool_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/lib/strings/strcat.h"
#include "tensorflow/core/platform/logging.h" #include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/port.h" #include "tensorflow/core/platform/port.h"
#include "tensorflow/stream_executor/multi_platform_manager.h"
#if defined(PLATFORM_GOOGLE) #if defined(PLATFORM_GOOGLE)
DEFINE_bool(record_mem_types, false, DEFINE_bool(record_mem_types, false,

View File

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

View File

@ -4,10 +4,10 @@
#include <string> #include <string>
#include <vector> #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/common_runtime/executor.h"
#include "tensorflow/core/graph/testlib.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" #include "tensorflow/core/public/tensor.h"
namespace tensorflow { namespace tensorflow {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -4,11 +4,11 @@
#include <string> #include <string>
#include "tensorflow/core/framework/attr_value.pb.h" #include "tensorflow/core/framework/attr_value.pb.h"
#include "tensorflow/core/framework/types.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/core/stringpiece.h"
#include "tensorflow/core/lib/gtl/array_slice.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 { namespace tensorflow {

View File

@ -1,8 +1,8 @@
#ifndef TENSORFLOW_FRAMEWORK_BFLOAT16_H_ #ifndef TENSORFLOW_FRAMEWORK_BFLOAT16_H_
#define TENSORFLOW_FRAMEWORK_BFLOAT16_H_ #define TENSORFLOW_FRAMEWORK_BFLOAT16_H_
#include "tensorflow/core/platform/port.h"
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor" #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 // 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 // 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/framework/bfloat16.h"
#include "tensorflow/core/platform/test_benchmark.h"
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include "tensorflow/core/platform/test_benchmark.h"
namespace tensorflow { namespace tensorflow {
namespace { namespace {

View File

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

View File

@ -1,9 +1,9 @@
#ifndef TENSORFLOW_FRAMEWORK_CONTROL_FLOW_H_ #ifndef TENSORFLOW_FRAMEWORK_CONTROL_FLOW_H_
#define 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/lib/hash/hash.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/port.h"
namespace tensorflow { namespace tensorflow {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,11 +2,11 @@
#define TENSORFLOW_FRAMEWORK_NUMERIC_OP_H_ #define TENSORFLOW_FRAMEWORK_NUMERIC_OP_H_
#include "tensorflow/core/framework/op_kernel.h" #include "tensorflow/core/framework/op_kernel.h"
#include "tensorflow/core/framework/types.pb.h"
#include "tensorflow/core/framework/types.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/lib/core/errors.h"
#include "tensorflow/core/public/status.h" #include "tensorflow/core/public/status.h"
#include "tensorflow/core/public/tensor.h"
namespace tensorflow { namespace tensorflow {

View File

@ -1,12 +1,12 @@
#include "tensorflow/core/framework/op_def_builder.h" #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 <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 tensorflow {
namespace { namespace {

View File

@ -62,7 +62,7 @@ Status AllowedStringValue(const string& str, const OpDef::AttrDef& attr) {
// Requires: attr has already been validated. // Requires: attr has already been validated.
Status ValidateAttrValue(const AttrValue& attr_value, Status ValidateAttrValue(const AttrValue& attr_value,
const OpDef::AttrDef& attr) { const OpDef::AttrDef& attr) {
// Is it a valid value? // Is it a valid value?
TF_RETURN_WITH_CONTEXT_IF_ERROR(AttrValueHasType(attr_value, attr.type()), TF_RETURN_WITH_CONTEXT_IF_ERROR(AttrValueHasType(attr_value, attr.type()),
" for attr '", attr.name(), "'"); " for attr '", attr.name(), "'");
@ -149,7 +149,7 @@ OpDef::AttrDef* FindAttrMutable(StringPiece name, OpDef* op_def) {
} while (false) } while (false)
static Status ValidateArg(const OpDef::ArgDef& arg, const OpDef& op_def, 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( const string suffix = strings::StrCat(
output ? " for output '" : " for input '", arg.name(), "'"); output ? " for output '" : " for input '", arg.name(), "'");
VALIDATE(gtl::InsertIfNotPresent(names, arg.name()), "Duplicate 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. // Validates that attr_value satisfies the type and constraints from attr.
// REQUIRES: attr has already been validated. // REQUIRES: attr has already been validated.
Status ValidateAttrValue(const AttrValue& attr_value, 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. // The following search through op_def for an attr with the indicated name.
// Returns nullptr if no such attr is found. // Returns nullptr if no such attr is found.

View File

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

View File

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

View File

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

View File

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

View File

@ -3,12 +3,12 @@
#include <unordered_map> #include <unordered_map>
#include <utility> #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/errors.h"
#include "tensorflow/core/lib/core/notification.h" #include "tensorflow/core/lib/core/notification.h"
#include "tensorflow/core/lib/strings/str_util.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 { namespace tensorflow {

View File

@ -3,11 +3,11 @@
#include <string> #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/control_flow.h"
#include "tensorflow/core/framework/device_base.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" #include "tensorflow/core/util/device_name_utils.h"
namespace tensorflow { namespace tensorflow {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,6 @@
#include "tensorflow/core/graph/graph_constructor.h" #include "tensorflow/core/graph/graph_constructor.h"
#include <gtest/gtest.h>
#include "tensorflow/core/framework/graph.pb.h" #include "tensorflow/core/framework/graph.pb.h"
#include "tensorflow/core/graph/graph.h" #include "tensorflow/core/graph/graph.h"
#include "tensorflow/core/kernels/ops_util.h" #include "tensorflow/core/kernels/ops_util.h"
@ -8,7 +9,6 @@
#include "tensorflow/core/platform/protobuf.h" #include "tensorflow/core/platform/protobuf.h"
#include "tensorflow/core/platform/regexp.h" #include "tensorflow/core/platform/regexp.h"
#include "tensorflow/core/public/status.h" #include "tensorflow/core/public/status.h"
#include <gtest/gtest.h>
// TODO(josh11b): Test InitCostModel(). // TODO(josh11b): Test InitCostModel().
// TODO(josh11b): Test setting the "device" field of a NodeDef. // 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/framework/op.h"
#include "tensorflow/core/graph/graph.h" #include "tensorflow/core/graph/graph.h"
#include "tensorflow/core/graph/node_builder.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/core/stringpiece.h"
#include "tensorflow/core/lib/gtl/array_slice.h" #include "tensorflow/core/lib/gtl/array_slice.h"
#include "tensorflow/core/public/status.h"
namespace tensorflow { namespace tensorflow {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,8 +1,8 @@
#ifndef TENSORFLOW_GRAPH_TYPES_H_ #ifndef TENSORFLOW_GRAPH_TYPES_H_
#define 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/lib/gtl/int_type.h"
#include "tensorflow/core/platform/port.h"
namespace tensorflow { namespace tensorflow {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,12 +1,12 @@
#include "tensorflow/core/framework/fake_input.h" #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/node_def_builder.h"
#include "tensorflow/core/framework/types.pb.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_testutil.h"
#include "tensorflow/core/kernels/ops_util.h"
#include "tensorflow/core/platform/test_benchmark.h" #include "tensorflow/core/platform/test_benchmark.h"
#include "tensorflow/core/public/tensor.h" #include "tensorflow/core/public/tensor.h"
#include <gtest/gtest.h>
namespace tensorflow { namespace tensorflow {

View File

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

View File

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

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