Delete temporary ATenCoreTest. (#14622)
authorEdward Yang <ezyang@fb.com>
Mon, 3 Dec 2018 22:58:36 +0000 (14:58 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Mon, 3 Dec 2018 23:07:40 +0000 (15:07 -0800)
Summary:
It was previously used to sure that ATen/core was working;
but now we have plenty of headers and C++ files in ATen/core
so this is no longer necessary.

Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/14622

Differential Revision: D13276899

Pulled By: ezyang

fbshipit-source-id: 9bef7eb1882ccdfa3ee7681a3d5b048ea94b59d3

aten/src/ATen/Context.h
aten/src/ATen/core/ATenCoreTest.cpp [deleted file]
aten/src/ATen/core/ATenCoreTest.h [deleted file]
aten/src/ATen/test/basic.cpp
caffe2/core/context.h
caffe2/core/context_test.cc

index 1004354..65105e1 100644 (file)
@@ -13,9 +13,6 @@
 #include "ATen/detail/ComplexHooksInterface.h"
 #include "c10/util/Exception.h"
 
-// This is temporary
-#include "ATen/core/ATenCoreTest.h"
-
 #include <memory>
 #include <mutex>
 #include <cstdint>
diff --git a/aten/src/ATen/core/ATenCoreTest.cpp b/aten/src/ATen/core/ATenCoreTest.cpp
deleted file mode 100644 (file)
index bb670b3..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#include <ATen/core/ATenCoreTest.h>
-#include <ATen/core/Tensor.h>
-
-namespace at {
-
-static int CoreTestGlobal = 0;
-int CoreTest() {
-  Tensor x;
-  return CoreTestGlobal++;
-}
-
-} // namespace at
diff --git a/aten/src/ATen/core/ATenCoreTest.h b/aten/src/ATen/core/ATenCoreTest.h
deleted file mode 100644 (file)
index 0a45902..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#pragma once
-
-#include <c10/macros/Macros.h>
-
-namespace at {
-
-CAFFE2_API int CoreTest();
-}
index b3f5aab..050f97e 100644 (file)
@@ -278,11 +278,6 @@ void TestDispatch() {
   ASSERT_TRUE(result.allclose(mse_loss(relu(tensor), other)));
 }
 
-void TestCore() {
-  int i = CoreTest();
-  ASSERT_EQ_RESOLVED(i + 1, CoreTest());
-}
-
 void test(Type& type) {
   TestResize(type);
   TestOnesAndDot(type);
@@ -309,7 +304,6 @@ void test(Type& type) {
   TestIndexingByZerodimTensor();
   TestIndexingMixedDevice(type);
   TestDispatch();
-  TestCore();
 }
 
 TEST(BasicTest, BasicTestCPU) {
index ca89f68..e6adc7c 100644 (file)
@@ -13,7 +13,6 @@
 #include <c10/util/typeid.h>
 #include "caffe2/proto/caffe2_pb.h"
 
-#include <ATen/core/ATenCoreTest.h>
 #include <c10/util/ArrayRef.h>
 
 C10_DECLARE_bool(caffe2_report_cpu_memory_usage);
index 987c9c4..d166a64 100644 (file)
@@ -6,11 +6,6 @@
 
 namespace caffe2 {
 
-TEST(CPUContextTest, ATenCoreTest) {
-  int i = at::CoreTest();
-  EXPECT_EQ(i + 1, at::CoreTest());
-}
-
 TEST(CPUContextTest, TestAllocAlignment) {
   for (int i = 1; i < 10; ++i) {
     auto data = CPUContext::New(i);