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.

split.cpp 1.1 kB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #include "test/fallback/fixture.h"
  2. #include "test/common/checker.h"
  3. #include "test/common/task_record_check.h"
  4. namespace megdnn {
  5. namespace test {
  6. TEST_F(FALLBACK, SPLIT) {
  7. Checker<Split> checker(handle());
  8. using Param = Split::Param;
  9. for (size_t axis = 0; axis < 4; ++axis) {
  10. Param param;
  11. param.axis = axis;
  12. TensorShapeArray shapes(5, TensorShape({2, 3, 4, 5}));
  13. shapes[0].shape[axis] = 10;
  14. for (size_t i = 1; i < 5; ++i) {
  15. shapes[i].shape[axis] = i;
  16. }
  17. checker.set_param(param).exec(shapes);
  18. }
  19. }
  20. TEST_F(FALLBACK, SPLIT_RECORD) {
  21. TaskRecordChecker<Split> checker(1);
  22. using Param = Split::Param;
  23. for (size_t axis = 0; axis < 4; ++axis) {
  24. Param param;
  25. param.axis = axis;
  26. TensorShapeArray shapes(5, TensorShape({2, 3, 4, 5}));
  27. shapes[0].shape[axis] = 10;
  28. for (size_t i = 1; i < 5; ++i) {
  29. shapes[i].shape[axis] = i;
  30. }
  31. checker.set_param(param).exec(shapes);
  32. }
  33. }
  34. } // namespace test
  35. } // namespace megdnn
  36. // vim: syntax=cpp.doxygen