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 829 B

1234567891011121314151617181920212223242526272829
  1. #include "test/cuda/fixture.h"
  2. #include "test/common/checker.h"
  3. namespace megdnn {
  4. namespace test {
  5. TEST_F(CUDA, SPLIT) {
  6. Checker<Split> checker(handle_cuda());
  7. using Param = Split::Param;
  8. for (auto dtype : std::vector<DType>{dtype::Float32(), dtype::Float16()})
  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. for (size_t i = 0; i < shapes.size(); ++i)
  18. checker.set_dtype(i, dtype);
  19. checker.set_param(param).exec(shapes);
  20. }
  21. }
  22. } // namespace test
  23. } // namespace megdnn
  24. // vim: syntax=cpp.doxygen