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.

gaussian_blur.cpp 827 B

12345678910111213141516171819202122232425262728293031
  1. #include "test/common/gaussian_blur.h"
  2. #include "test/common/checker.h"
  3. #include "test/cuda/fixture.h"
  4. namespace megdnn {
  5. namespace test {
  6. TEST_F(CUDA, GAUSSIAN_BLUR) {
  7. using namespace gaussian_blur;
  8. std::vector<TestArg> args = get_args();
  9. Checker<GaussianBlur> checker(handle_cuda());
  10. for (auto&& arg : args) {
  11. checker.set_param(arg.param)
  12. .set_dtype(0, dtype::Float32())
  13. .set_dtype(1, dtype::Float32())
  14. .execs({arg.src, {}});
  15. }
  16. for (auto&& arg : args) {
  17. checker.set_param(arg.param)
  18. .set_epsilon(1 + 1e-3)
  19. .set_dtype(0, dtype::Uint8())
  20. .set_dtype(1, dtype::Uint8())
  21. .execs({arg.src, {}});
  22. }
  23. }
  24. } // namespace test
  25. } // namespace megdnn
  26. // vim: syntax=cpp.doxygen