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.

72 lines
2.2 KiB

11 months ago
  1. #pragma once
  2. #include "utils/memory_literals.h"
  3. #ifndef MODE_SET_BY_CMAKE
  4. #define MODE_DISTPREFETCH
  5. #endif
  6. constexpr size_t WL_SIZE_B = 4_GiB;
  7. constexpr uint32_t WARMUP_ITERATION_COUNT = 5;
  8. constexpr uint32_t ITERATION_COUNT = 5;
  9. constexpr int MEM_NODE_HBM = 8;
  10. constexpr int MEM_NODE_DRAM = 0;
  11. #ifdef MODE_PREFETCH
  12. constexpr uint32_t GROUP_COUNT = 32;
  13. constexpr size_t CHUNK_SIZE_B = 8_MiB;
  14. constexpr uint32_t TC_SCANA = 1;
  15. constexpr uint32_t TC_SCANB = 1;
  16. constexpr uint32_t TC_AGGRJ = 1;
  17. constexpr bool PERFORM_CACHING = true;
  18. constexpr int MEM_NODE_A = 0;
  19. constexpr int MEM_NODE_B = 0;
  20. constexpr char MODE_STRING[] = "prefetch";
  21. #endif
  22. #ifdef MODE_DISTPREFETCH
  23. constexpr uint32_t GROUP_COUNT = 32;
  24. constexpr size_t CHUNK_SIZE_B = 8_MiB;
  25. constexpr uint32_t TC_SCANA = 1;
  26. constexpr uint32_t TC_SCANB = 1;
  27. constexpr uint32_t TC_AGGRJ = 1;
  28. constexpr bool PERFORM_CACHING = true;
  29. constexpr int MEM_NODE_A = 0;
  30. constexpr int MEM_NODE_B = 1;
  31. constexpr char MODE_STRING[] = "distprefetch";
  32. #endif
  33. #ifdef MODE_DRAM
  34. constexpr size_t CHUNK_SIZE_B = 2_MiB;
  35. constexpr uint32_t GROUP_COUNT = 32;
  36. constexpr uint32_t TC_SCANA = 2;
  37. constexpr uint32_t TC_SCANB = 0;
  38. constexpr uint32_t TC_AGGRJ = 1;
  39. constexpr bool PERFORM_CACHING = false;
  40. constexpr int MEM_NODE_A = 0;
  41. constexpr int MEM_NODE_B = 0;
  42. constexpr char MODE_STRING[] = "dram";
  43. #endif
  44. #ifdef MODE_HBM
  45. constexpr size_t CHUNK_SIZE_B = 2_MiB;
  46. constexpr uint32_t GROUP_COUNT = 32;
  47. constexpr uint32_t TC_SCANA = 4;
  48. constexpr uint32_t TC_SCANB = 0;
  49. constexpr uint32_t TC_AGGRJ = 1;
  50. constexpr bool PERFORM_CACHING = false;
  51. constexpr int MEM_NODE_A = 0;
  52. constexpr int MEM_NODE_B = 8;
  53. constexpr char MODE_STRING[] = "hbm";
  54. #endif
  55. constexpr uint64_t CMP_A = 50;
  56. constexpr size_t WL_SIZE_ELEMENTS = WL_SIZE_B / sizeof(uint64_t);
  57. constexpr size_t CHUNK_COUNT = WL_SIZE_B / CHUNK_SIZE_B;
  58. constexpr size_t CHUNK_SIZE_ELEMENTS = CHUNK_SIZE_B / sizeof(uint64_t);
  59. constexpr size_t RUN_COUNT = CHUNK_COUNT / GROUP_COUNT;
  60. static_assert(RUN_COUNT > 0);
  61. static_assert(WL_SIZE_B % 16 == 0);
  62. static_assert(CHUNK_SIZE_B % 16 == 0);
  63. static_assert(PERFORM_CACHING ? TC_SCANB == TC_AGGRJ : true);
  64. constexpr size_t SCANA_CHUNK_SIZE_B = CHUNK_SIZE_B / TC_SCANA;
  65. constexpr size_t AGGRJ_CHUNK_SIZE_B = CHUNK_SIZE_B / TC_AGGRJ;