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.

1234567891011121314151617181920212223242526272829
  1. #include "megdnn/oprs.h"
  2. #include "test/common/checker.h"
  3. #include "test/cuda/fixture.h"
  4. using namespace megdnn;
  5. using namespace test;
  6. TEST_F(CUDA, DOT) {
  7. Checker<Dot> checker(handle_cuda());
  8. checker.set_epsilon(1e-2);
  9. // basic
  10. checker.execs({{23}, {23}, {1}});
  11. // non-contiguous
  12. checker.exec(TensorLayoutArray{
  13. TensorLayout({23}, {2}, dtype::Float32()),
  14. TensorLayout({23}, {3}, dtype::Float32()),
  15. TensorLayout({1}, {1}, dtype::Float32())});
  16. // fp16
  17. checker.exec(TensorLayoutArray{
  18. TensorLayout({23}, dtype::Float16()), TensorLayout({23}, dtype::Float16()),
  19. TensorLayout({1}, dtype::Float16())});
  20. // fp16 non-contiguous
  21. checker.exec(TensorLayoutArray{
  22. TensorLayout({23}, {2}, dtype::Float16()),
  23. TensorLayout({23}, {3}, dtype::Float16()),
  24. TensorLayout({1}, {1}, dtype::Float16())});
  25. }
  26. // vim: syntax=cpp.doxygen