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.

fill.h 626 B

123456789101112131415161718192021222324252627
  1. #pragma once
  2. #include "megdnn/handle.h"
  3. #include "megdnn/oprs/general.h"
  4. #include "src/common/opr_trait.h"
  5. #include "test/common/checker.h"
  6. namespace megdnn {
  7. namespace test {
  8. namespace fill {
  9. inline void run_fill_test(Handle* handle, DType dtype) {
  10. Checker<Fill> checker(handle);
  11. for (float value : {-1.23, 0.0, 0.001, 234.0, 2021.072}) {
  12. checker.set_param({value});
  13. checker.set_dtype(0, dtype);
  14. checker.exec(TensorShapeArray{{1, 1}});
  15. checker.exec(TensorShapeArray{{2, 3, 4}});
  16. }
  17. }
  18. } // namespace fill
  19. } // namespace test
  20. } // namespace megdnn
  21. // vim: syntax=cpp.doxygen