This contains my bachelors thesis and associated tex files, code snippets and maybe more. Topic: Data Movement in Heterogeneous Memories with Intel Data Streaming Accelerator
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
984 B

  1. #include <dml/dml.hpp>
  2. #include <vector>
  3. #include <iostream>
  4. #include <fstream>
  5. #include "benchmark.hpp"
  6. int main(int argc, char **argv) {
  7. if (argc < 3) {
  8. std::cout << "Missing input and output file names." << std::endl;
  9. std::cout << "Usage: ./benchmarks [input.json] [output.json]" << std::endl;
  10. return 1;
  11. }
  12. const std::string input = argv[1];
  13. const std::string output = argv[2];
  14. std::string path;
  15. std::vector<TaskData> args;
  16. std::ifstream is(input);
  17. ReadWorkDescription(args, path, is);
  18. is.close();
  19. if (path == "hw") {
  20. execute_dml_memcpy<dml::hardware>(args);
  21. }
  22. else if (path == "sw") {
  23. execute_dml_memcpy<dml::software>(args);
  24. }
  25. else if (path == "auto") {
  26. execute_dml_memcpy<dml::automatic>(args);
  27. }
  28. else {
  29. std::cerr << "Path is neither hw/sw/auto." << std::endl;
  30. }
  31. std::ofstream os(output);
  32. WriteResultLog(args, path, os);
  33. os.close();
  34. }