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.

123456789101112131415161718192021222324252627282930
  1. #pragma once
  2. #include "./checker.h"
  3. #include "megdnn/oprs.h"
  4. namespace megdnn {
  5. namespace test {
  6. class SVDTestcase {
  7. std::unique_ptr<dt_float32> m_mem;
  8. SVDTestcase(const SVDForward::Param& param, const TensorLayout& mat)
  9. : m_param{param}, m_mat{nullptr, mat} {}
  10. public:
  11. SVDForward::Param m_param;
  12. TensorND m_mat;
  13. struct Result {
  14. std::shared_ptr<TensorND> u;
  15. std::shared_ptr<TensorND> s;
  16. std::shared_ptr<TensorND> vt;
  17. std::shared_ptr<TensorND> recovered_mat;
  18. };
  19. Result run(SVDForward* opr);
  20. static std::vector<SVDTestcase> make();
  21. };
  22. } // namespace test
  23. } // namespace megdnn
  24. // vim: syntax=cpp.doxygen