Skip to content

Commit

Permalink
Merge pull request #388 from hvdijk/opencl-cts-32bit
Browse files Browse the repository at this point in the history
Round up memory_size.
  • Loading branch information
hvdijk authored Mar 4, 2024
2 parents 7cd729b + 6161ea1 commit ded1fb1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/mux/targets/host/source/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -432,10 +432,10 @@ device_info_s::device_info_s(host::arch arch, host::os os, bool native,
this->clock_frequency = native ? os_cpu_frequency() : 0;
this->compute_units = native ? os_num_cpus() : 0;
this->buffer_alignment = sizeof(uint64_t) * 16;
// TODO redmine(8386): Reported memory size is quartered in order to pass the
// TODO Reported memory size is quartered (rounded up) in order to pass the
// OpenCL CTS however this probably should be an OCL specific fix and not in
// the host target.
this->memory_size = native ? os_memory_bounded_size() / 4 : 0;
this->memory_size = native ? (os_memory_bounded_size() - 1) / 4 + 1 : 0;
// All memory could be allocated at once.
this->allocation_size = this->memory_size;
this->cache_size = native ? os_cache_size() : 0;
Expand Down

0 comments on commit ded1fb1

Please sign in to comment.