Browse Source

always perform copy from src and dst node, add another log output about the split

master
Constantin Fürst 12 months ago
parent
commit
f19c069b0f
  1. 4
      offloading-cacher/main.cpp
  2. 2
      offloading-cacher/offloading-cache.hpp

4
offloading-cacher/main.cpp

@ -37,12 +37,12 @@ int main(int argc, char **argv) {
};
auto copy_policy = [](const int numa_dst_node, const int numa_src_node) {
return std::vector{ numa_src_node };
return std::vector{ numa_src_node, numa_dst_node };
};
cache.Init(cache_policy,copy_policy);
static constexpr size_t data_size = 8192;
static constexpr size_t data_size = 1024 * 1024;
double* data = GetRandomArray(data_size);
std::unique_ptr<offcache::CacheData> data_cache = cache.Access(reinterpret_cast<uint8_t *>(data), data_size * sizeof(double), offcache::ExecutionPolicy::Relaxed);

2
offloading-cacher/offloading-cache.hpp

@ -246,6 +246,8 @@ inline void offcache::Cache::SubmitTask(CacheData* task) {
const size_t size = task->size_ / task_count;
const size_t last_size = size + task->size_ % task_count;
std::cout << "[-] Splitting Copy into " << task_count << " tasks of " << size << "B 0x" << std::hex << (uint64_t)task->src_ << std::dec << std::endl;
// save the current numa node mask to restore later
// as executing the copy task will place this thread
// on a different node

Loading…
Cancel
Save