Minor cleanup: Remove unused BUILD dependencies and unnecessary code.
PiperOrigin-RevId: 157837211
This commit is contained in:
parent
4161ccc8e7
commit
ac66be783b
@ -1683,10 +1683,8 @@ cc_library(
|
|||||||
deps = [
|
deps = [
|
||||||
":buffer_assignment",
|
":buffer_assignment",
|
||||||
":hlo",
|
":hlo",
|
||||||
":hlo_ordering",
|
|
||||||
":hlo_proto",
|
":hlo_proto",
|
||||||
"//tensorflow/compiler/xla:status",
|
"//tensorflow/compiler/xla:status",
|
||||||
"//tensorflow/compiler/xla:util",
|
|
||||||
"//tensorflow/core:lib",
|
"//tensorflow/core:lib",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
@ -311,7 +311,6 @@ void ComputeComputationPostOrder(
|
|||||||
|
|
||||||
visited->insert(computation);
|
visited->insert(computation);
|
||||||
post_order->push_back(computation);
|
post_order->push_back(computation);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
@ -15,29 +15,30 @@ limitations under the License.
|
|||||||
|
|
||||||
#include "tensorflow/core/common_runtime/stats_publisher_interface.h"
|
#include "tensorflow/core/common_runtime/stats_publisher_interface.h"
|
||||||
|
|
||||||
namespace tensorflow {
|
#include "tensorflow/core/framework/graph.pb.h"
|
||||||
|
|
||||||
|
namespace tensorflow {
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
// NoOpStatsPublisher provides an dummy/no-op implementation of
|
// NoOpStatsPublisher provides an dummy/no-op implementation of
|
||||||
// StatsPublisherInterface.
|
// StatsPublisherInterface.
|
||||||
class NoOpStatsPublisher : public StatsPublisherInterface {
|
class NoOpStatsPublisher : public StatsPublisherInterface {
|
||||||
public:
|
public:
|
||||||
NoOpStatsPublisher(){};
|
NoOpStatsPublisher() = default;
|
||||||
|
|
||||||
void PublishStatsProto(const StepStats& step_stats) override { return; }
|
void PublishStatsProto(const StepStats& step_stats) override {}
|
||||||
|
|
||||||
void PublishGraphProto(
|
void PublishGraphProto(
|
||||||
const std::vector<const GraphDef*>& graph_defs) override {
|
const std::vector<const GraphDef*>& graph_defs) override {}
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::unique_ptr<ProfileHandler> GetProfileHandler(
|
std::unique_ptr<ProfileHandler> GetProfileHandler(
|
||||||
uint64 step, int64 execution_count, const RunOptions& ropts) override {
|
uint64 step, int64 execution_count, const RunOptions& ropts) override {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
~NoOpStatsPublisher() override {}
|
~NoOpStatsPublisher() override = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
std::unique_ptr<StatsPublisherInterface> CreateNoOpStatsPublisher(
|
std::unique_ptr<StatsPublisherInterface> CreateNoOpStatsPublisher(
|
||||||
|
@ -283,7 +283,6 @@ class LocalRendezvousImpl : public Rendezvous {
|
|||||||
}
|
}
|
||||||
CHECK(table_.insert({key_hash, item}).second);
|
CHECK(table_.insert({key_hash, item}).second);
|
||||||
mu_.unlock();
|
mu_.unlock();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void StartAbort(const Status& status) override {
|
void StartAbort(const Status& status) override {
|
||||||
|
@ -820,16 +820,14 @@ namespace {
|
|||||||
// failures to allocate.
|
// failures to allocate.
|
||||||
class DummyCPUAllocator : public Allocator {
|
class DummyCPUAllocator : public Allocator {
|
||||||
public:
|
public:
|
||||||
DummyCPUAllocator() {}
|
DummyCPUAllocator() = default;
|
||||||
string Name() override { return "cpu"; }
|
string Name() override { return "cpu"; }
|
||||||
void* AllocateRaw(size_t alignment, size_t num_bytes) override {
|
void* AllocateRaw(size_t alignment, size_t num_bytes) override {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
void DeallocateRaw(void* ptr) override { return; }
|
void DeallocateRaw(void* ptr) override {}
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
|
||||||
|
|
||||||
TEST(Tensor, FailureToAllocate) {
|
TEST(Tensor, FailureToAllocate) {
|
||||||
TensorShape shape({1});
|
TensorShape shape({1});
|
||||||
DummyCPUAllocator allocator;
|
DummyCPUAllocator allocator;
|
||||||
@ -1080,4 +1078,5 @@ static void BM_CreateAndMoveCtrWithBuf(int iters) {
|
|||||||
}
|
}
|
||||||
BENCHMARK(BM_CreateAndMoveCtrWithBuf);
|
BENCHMARK(BM_CreateAndMoveCtrWithBuf);
|
||||||
|
|
||||||
|
} // namespace
|
||||||
} // namespace tensorflow
|
} // namespace tensorflow
|
||||||
|
@ -15,12 +15,8 @@ exports_files(["LICENSE"])
|
|||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "wav_to_spectrogram_lib",
|
name = "wav_to_spectrogram_lib",
|
||||||
srcs = [
|
srcs = ["wav_to_spectrogram.cc"],
|
||||||
"wav_to_spectrogram.cc",
|
hdrs = ["wav_to_spectrogram.h"],
|
||||||
],
|
|
||||||
hdrs = [
|
|
||||||
"wav_to_spectrogram.h",
|
|
||||||
],
|
|
||||||
deps = [
|
deps = [
|
||||||
"//tensorflow/cc:cc_ops",
|
"//tensorflow/cc:cc_ops",
|
||||||
"//tensorflow/core:framework_internal",
|
"//tensorflow/core:framework_internal",
|
||||||
@ -30,13 +26,10 @@ cc_library(
|
|||||||
|
|
||||||
cc_binary(
|
cc_binary(
|
||||||
name = "wav_to_spectrogram",
|
name = "wav_to_spectrogram",
|
||||||
srcs = [
|
srcs = ["main.cc"],
|
||||||
"main.cc",
|
|
||||||
],
|
|
||||||
deps = [
|
deps = [
|
||||||
":wav_to_spectrogram_lib",
|
":wav_to_spectrogram_lib",
|
||||||
"//tensorflow/core:framework_internal",
|
"//tensorflow/core:framework_internal",
|
||||||
"//tensorflow/core:tensorflow",
|
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user