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.

flip.cpp 950 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #include <gtest/gtest.h>
  2. #include "megdnn.h"
  3. #include "megdnn/oprs.h"
  4. #include "test/common/checker.h"
  5. #include "test/common/flip.h"
  6. #include "test/common/task_record_check.h"
  7. #include "test/common/tensor.h"
  8. #include "test/fallback/fixture.h"
  9. namespace megdnn {
  10. namespace test {
  11. TEST_F(FALLBACK, FLIP) {
  12. using namespace flip;
  13. std::vector<TestArg> args = get_args();
  14. Checker<Flip> checker(handle());
  15. checker.set_dtype(0, dtype::Int32());
  16. checker.set_dtype(1, dtype::Int32());
  17. for (auto&& arg : args) {
  18. checker.execs({arg.src, {}});
  19. }
  20. }
  21. TEST_F(FALLBACK, FLIP_RECORD) {
  22. using namespace flip;
  23. std::vector<TestArg> args = get_args();
  24. TaskRecordChecker<Flip> checker(0);
  25. checker.set_dtype(0, dtype::Int32());
  26. checker.set_dtype(1, dtype::Int32());
  27. for (auto&& arg : args) {
  28. checker.execs({arg.src, {}});
  29. }
  30. }
  31. } // namespace test
  32. } // namespace megdnn
  33. // vim: syntax=cpp.doxygen