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.

test_options.h 1.0 kB

123456789101112131415161718192021222324252627282930313233
  1. #pragma once
  2. #include <iostream>
  3. #include <thread>
  4. #include "../load_and_run/src/strategys/strategy.h"
  5. #include "../load_and_run/src/strategys/strategy_normal.h"
  6. #include "megbrain/common.h"
  7. #include "megbrain/utils/timer.h"
  8. #include "megbrain/version.h"
  9. #include "megdnn/version.h"
  10. #include "misc.h"
  11. namespace lar {
  12. //! run load_and_run NormalStrategy to test different options
  13. void run_NormalStrategy(std::string model_path);
  14. } // namespace lar
  15. #define BOOL_OPTION_WRAP(option) \
  16. struct BoolOptionWrap_##option { \
  17. BoolOptionWrap_##option() { FLAGS_##option = true; } \
  18. ~BoolOptionWrap_##option() { FLAGS_##option = false; } \
  19. };
  20. #define DEFINE_WRAP(option) BoolOptionWrap_##option flags_##option;
  21. #define TEST_BOOL_OPTION(option) \
  22. { \
  23. DEFINE_WRAP(option); \
  24. run_NormalStrategy(model_path); \
  25. }
  26. // vim: syntax=cpp.doxygen foldmethod=marker foldmarker=f{{{,f}}}