diff --git a/CMakeLists.txt b/CMakeLists.txt index f56c5d382af8cdfb5a941ee272a0f8d22ec04d67..920c20d6f813c14df8e02593b1c4a5a13cc11ef0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -204,12 +204,11 @@ include(external/snappy) # download snappy include(external/snappystream) include(external/threadpool) +set(WITH_ANAKIN OFF CACHE STRING "Disable Anakin first, will add it later." FORCE) if(WITH_GPU) include(cuda) include(tensorrt) include(external/anakin) -else() - set(WITH_ANAKIN OFF CACHE STRING "Anakin is valid only when GPU is set." FORCE) endif() include(cudnn) # set cudnn libraries, must before configure diff --git a/python/paddle/fluid/tests/unittests/op_test.py b/python/paddle/fluid/tests/unittests/op_test.py index ada4ad70f0c07dfc25df2ecde82f9c83e5987db8..75373ae2e15fa5b4153ea3072bb2079fed9295ef 100644 --- a/python/paddle/fluid/tests/unittests/op_test.py +++ b/python/paddle/fluid/tests/unittests/op_test.py @@ -362,14 +362,10 @@ class OpTest(unittest.TestCase): def check_output_customized(self, checker): places = self._get_places() - import sys - print('places', places) for place in places: outs = self.calc_output(place) outs = [np.array(out) for out in outs] - import sys - print('outs', outs) - sys.stdout.flush() + outs.sort(key=len) checker(outs) def __assert_is_close(self, numeric_grads, analytic_grads, names, diff --git a/python/paddle/fluid/tests/unittests/test_random_crop_op.py b/python/paddle/fluid/tests/unittests/test_random_crop_op.py index 1acd377b1f92debd8e919b8bea4d67df88ba7a15..27e5db4991b8dfbc7bbad609004f9b72126245d6 100644 --- a/python/paddle/fluid/tests/unittests/test_random_crop_op.py +++ b/python/paddle/fluid/tests/unittests/test_random_crop_op.py @@ -23,9 +23,10 @@ class TestRandomCropOp(OpTest): to_crop = np.array([[[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]] * 5).astype(np.int32) self.possible_res = [ - np.array([[1, 2, 3], [5, 6, 7]]), np.array([[2, 3, 4], [6, 7, 8]]), - np.array([[5, 6, 7], [9, 10, 11]]), - np.array([[6, 7, 8], [10, 11, 12]]) + np.array([[1, 2, 3], [5, 6, 7]]).astype(np.int32), + np.array([[2, 3, 4], [6, 7, 8]]).astype(np.int32), + np.array([[5, 6, 7], [9, 10, 11]]).astype(np.int32), + np.array([[6, 7, 8], [10, 11, 12]]).astype(np.int32) ] self.op_type = "random_crop" self.inputs = {'X': to_crop, 'Seed': np.array([10])}