未验证 提交 28a76556 编写于 作者: Z Zheng-Bicheng 提交者: GitHub

[Move Test] move contrib (#52168)

* update

* update
上级 3957007c
...@@ -151,7 +151,6 @@ set(PADDLE_PYTHON_PACKAGE_DIR ${CMAKE_CURRENT_BINARY_DIR}/dist/) ...@@ -151,7 +151,6 @@ set(PADDLE_PYTHON_PACKAGE_DIR ${CMAKE_CURRENT_BINARY_DIR}/dist/)
if(WITH_TESTING) if(WITH_TESTING)
add_subdirectory(paddle/dataset/tests) add_subdirectory(paddle/dataset/tests)
add_subdirectory(paddle/fluid/tests) add_subdirectory(paddle/fluid/tests)
add_subdirectory(paddle/fluid/contrib/tests)
add_subdirectory(paddle/static/quantization/tests) add_subdirectory(paddle/static/quantization/tests)
endif() endif()
......
...@@ -12,7 +12,7 @@ if(WITH_TESTING) ...@@ -12,7 +12,7 @@ if(WITH_TESTING)
add_subdirectory(book) add_subdirectory(book)
# add_subdirectory(collective) # add_subdirectory(collective)
# add_subdirectory(composite_ops) # add_subdirectory(composite_ops)
# add_subdirectory(contrib) add_subdirectory(contrib)
add_subdirectory(cpp) add_subdirectory(cpp)
add_subdirectory(custom_kernel) add_subdirectory(custom_kernel)
add_subdirectory(custom_op) add_subdirectory(custom_op)
......
...@@ -12,11 +12,9 @@ ...@@ -12,11 +12,9 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import paddle
import unittest import unittest
from paddle.static.amp.fp16_lists import (
AutoMixedPrecisionLists, from paddle.static.amp.fp16_lists import AutoMixedPrecisionLists
)
class TestAMPList(unittest.TestCase): class TestAMPList(unittest.TestCase):
......
...@@ -13,10 +13,11 @@ ...@@ -13,10 +13,11 @@
# limitations under the License. # limitations under the License.
import copy import copy
import unittest import unittest
import paddle.fluid as fluid
import paddle.static.amp as amp
from paddle.fluid import core
import paddle import paddle
from paddle import fluid
from paddle.fluid import core
from paddle.static import amp
paddle.enable_static() paddle.enable_static()
......
...@@ -13,10 +13,12 @@ ...@@ -13,10 +13,12 @@
# limitations under the License. # limitations under the License.
import unittest import unittest
import numpy as np import numpy as np
import paddle.fluid as fluid
from paddle.fluid.dygraph.base import to_variable
import paddle import paddle
from paddle import fluid
from paddle.fluid.dygraph.base import to_variable
paddle.enable_static() paddle.enable_static()
......
...@@ -12,10 +12,10 @@ ...@@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import paddle
import unittest import unittest
import numpy as np
import paddle.nn as nn import paddle
from paddle import nn
class Net_Cond(nn.Layer): class Net_Cond(nn.Layer):
......
...@@ -13,10 +13,11 @@ ...@@ -13,10 +13,11 @@
# limitations under the License. # limitations under the License.
import unittest import unittest
import paddle.fluid as fluid
import paddle
from paddle import fluid
from paddle.fluid import core from paddle.fluid import core
from paddle.static.amp import fp16_utils from paddle.static.amp import fp16_utils
import paddle
paddle.enable_static() paddle.enable_static()
......
...@@ -12,17 +12,18 @@ ...@@ -12,17 +12,18 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import paddle
import paddle.fluid as fluid
import contextlib import contextlib
import copy
import math import math
import sys
import numpy
import unittest
import os import os
import copy import sys
import numpy as np
import tempfile import tempfile
import unittest
import numpy
import paddle
from paddle import fluid
from paddle.static.amp import decorate from paddle.static.amp import decorate
paddle.enable_static() paddle.enable_static()
......
...@@ -12,15 +12,16 @@ ...@@ -12,15 +12,16 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import paddle
import paddle.fluid as fluid
import contextlib import contextlib
import struct
import unittest import unittest
import numpy as np import numpy as np
import struct
import paddle.fluid.layers as layers import paddle
import paddle.static.amp as amp from paddle import fluid
from paddle.fluid import core from paddle.fluid import core
from paddle.static import amp
paddle.enable_static() paddle.enable_static()
......
...@@ -12,11 +12,13 @@ ...@@ -12,11 +12,13 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import paddle
import paddle.fluid as fluid
import contextlib import contextlib
import unittest import unittest
import numpy as np import numpy as np
import paddle
from paddle import fluid
from paddle.io import Dataset from paddle.io import Dataset
from paddle.static.amp.fp16_utils import cast_model_to_fp16 from paddle.static.amp.fp16_utils import cast_model_to_fp16
......
...@@ -12,12 +12,14 @@ ...@@ -12,12 +12,14 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import contextlib
import unittest import unittest
from functools import partial from functools import partial
import numpy as np import numpy as np
import paddle import paddle
import paddle.fluid as fluid from paddle import fluid
import contextlib
paddle.enable_static() paddle.enable_static()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册