Minor cleanup: Remove unused BUILD dependencies and unnecessary code.

PiperOrigin-RevId: 157837211
This commit is contained in:
A. Unique TensorFlower 2017-06-02 09:08:54 -07:00 committed by TensorFlower Gardener
parent 4161ccc8e7
commit ac66be783b
6 changed files with 14 additions and 25 deletions

View File

@ -1683,10 +1683,8 @@ cc_library(
deps = [
":buffer_assignment",
":hlo",
":hlo_ordering",
":hlo_proto",
"//tensorflow/compiler/xla:status",
"//tensorflow/compiler/xla:util",
"//tensorflow/core:lib",
],
)

View File

@ -311,7 +311,6 @@ void ComputeComputationPostOrder(
visited->insert(computation);
post_order->push_back(computation);
return;
}
} // namespace

View File

@ -15,29 +15,30 @@ limitations under the License.
#include "tensorflow/core/common_runtime/stats_publisher_interface.h"
namespace tensorflow {
#include "tensorflow/core/framework/graph.pb.h"
namespace tensorflow {
namespace {
// NoOpStatsPublisher provides an dummy/no-op implementation of
// StatsPublisherInterface.
class NoOpStatsPublisher : public StatsPublisherInterface {
public:
NoOpStatsPublisher(){};
NoOpStatsPublisher() = default;
void PublishStatsProto(const StepStats& step_stats) override { return; }
void PublishStatsProto(const StepStats& step_stats) override {}
void PublishGraphProto(
const std::vector<const GraphDef*>& graph_defs) override {
return;
}
const std::vector<const GraphDef*>& graph_defs) override {}
std::unique_ptr<ProfileHandler> GetProfileHandler(
uint64 step, int64 execution_count, const RunOptions& ropts) override {
return nullptr;
}
~NoOpStatsPublisher() override {}
~NoOpStatsPublisher() override = default;
};
} // namespace
std::unique_ptr<StatsPublisherInterface> CreateNoOpStatsPublisher(

View File

@ -283,7 +283,6 @@ class LocalRendezvousImpl : public Rendezvous {
}
CHECK(table_.insert({key_hash, item}).second);
mu_.unlock();
return;
}
void StartAbort(const Status& status) override {

View File

@ -820,16 +820,14 @@ namespace {
// failures to allocate.
class DummyCPUAllocator : public Allocator {
public:
DummyCPUAllocator() {}
DummyCPUAllocator() = default;
string Name() override { return "cpu"; }
void* AllocateRaw(size_t alignment, size_t num_bytes) override {
return nullptr;
}
void DeallocateRaw(void* ptr) override { return; }
void DeallocateRaw(void* ptr) override {}
};
} // namespace
TEST(Tensor, FailureToAllocate) {
TensorShape shape({1});
DummyCPUAllocator allocator;
@ -1080,4 +1078,5 @@ static void BM_CreateAndMoveCtrWithBuf(int iters) {
}
BENCHMARK(BM_CreateAndMoveCtrWithBuf);
} // namespace
} // namespace tensorflow

View File

@ -15,12 +15,8 @@ exports_files(["LICENSE"])
cc_library(
name = "wav_to_spectrogram_lib",
srcs = [
"wav_to_spectrogram.cc",
],
hdrs = [
"wav_to_spectrogram.h",
],
srcs = ["wav_to_spectrogram.cc"],
hdrs = ["wav_to_spectrogram.h"],
deps = [
"//tensorflow/cc:cc_ops",
"//tensorflow/core:framework_internal",
@ -30,13 +26,10 @@ cc_library(
cc_binary(
name = "wav_to_spectrogram",
srcs = [
"main.cc",
],
srcs = ["main.cc"],
deps = [
":wav_to_spectrogram_lib",
"//tensorflow/core:framework_internal",
"//tensorflow/core:tensorflow",
],
)