You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

rotate.cpp 1.5 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /**
  2. * \file dnn/test/fallback/rotate.cpp
  3. * MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
  4. *
  5. * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
  6. *
  7. * Unless required by applicable law or agreed to in writing,
  8. * software distributed under the License is distributed on an
  9. * "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. */
  11. #include <gtest/gtest.h>
  12. #include "megdnn.h"
  13. #include "megdnn/oprs.h"
  14. #include "test/common/checker.h"
  15. #include "test/common/rotate.h"
  16. #include "test/common/task_record_check.h"
  17. #include "test/common/tensor.h"
  18. #include "test/fallback/fixture.h"
  19. namespace megdnn {
  20. namespace test {
  21. TEST_F(FALLBACK, ROTATE) {
  22. using namespace rotate;
  23. std::vector<TestArg> args = get_args();
  24. Checker<Rotate> checker(handle());
  25. checker.set_dtype(0, dtype::Int32());
  26. checker.set_dtype(1, dtype::Int32());
  27. for (auto&& arg : args) {
  28. checker.set_dtype(0, arg.dtype).set_dtype(1, arg.dtype).execs({arg.src, {}});
  29. }
  30. }
  31. TEST_F(FALLBACK, ROTATE_RECORD) {
  32. using namespace rotate;
  33. std::vector<TestArg> args = get_args();
  34. TaskRecordChecker<Rotate> checker(1);
  35. checker.set_dtype(0, dtype::Int32());
  36. checker.set_dtype(1, dtype::Int32());
  37. for (auto&& arg : args) {
  38. checker.set_dtype(0, arg.dtype).set_dtype(1, arg.dtype).execs({arg.src, {}});
  39. }
  40. }
  41. } // namespace test
  42. } // namespace megdnn
  43. // vim: syntax=cpp.doxygen