rocr: Put back scratch_backing_memory_byte_size
The scratch_backing_memory_byte_size is not used by CP, but it is currently used by rocgdb. Putting the field back, but we need to find a solution for alt_scratch_backing_memory_byte_size. Also, completely disabling alternate scratch as we need some changes to support debugger.
Этот коммит содержится в:
коммит произвёл
Yat Sin, David
родитель
c879fdefcf
Коммит
02b38d0614
@@ -1993,6 +1993,15 @@ void AqlQueue::InitScratchSRD() {
|
||||
amd_queue_.alt_scratch_backing_memory_location = queue_scratch_.alt_queue_process_offset;
|
||||
|
||||
const auto& agent_props = agent_->properties();
|
||||
const uint32_t num_xcc = agent_props.NumXcc;
|
||||
|
||||
// FIXME: amd_queue_.scratch_backing_memory_byte_size is not used by CP, but it
|
||||
// is used by the debugger. Putting back the scratch_backing_memory_byte_size
|
||||
// field. But we need to find a location for alt_scratch_backing_memory_byte_size
|
||||
|
||||
// report size per XCC
|
||||
amd_queue_.scratch_backing_memory_byte_size = queue_scratch_.main_size / num_xcc;
|
||||
//amd_queue_.alt_scratch_backing_memory_byte_size = queue_scratch_.alt_size / num_xcc;
|
||||
|
||||
// For backwards compatibility this field records the per-lane scratch
|
||||
// for a 64 lane wavefront. If scratch was allocated for 32 lane waves
|
||||
|
||||
@@ -154,9 +154,11 @@ class Flag {
|
||||
enable_scratch_async_reclaim_ = (var == "0") ? false : true;
|
||||
|
||||
var = os::GetEnvVar("HSA_ENABLE_SCRATCH_ALT");
|
||||
//Temporary: Disable alternate scratch by default as it can cause occasional hangs
|
||||
//enable_scratch_alt_ = (var == "0") || !enable_scratch_async_reclaim_ ? false : true;
|
||||
enable_scratch_alt_ = (var == "1") && enable_scratch_async_reclaim_ ? true : false;
|
||||
// Temporary: Completely disable alternate scratch because we need to update
|
||||
// the debugger so that it can tell whether a dispatch is using alternate scratch
|
||||
// instead of main scratch
|
||||
// enable_scratch_alt_ = (var == "0") || !enable_scratch_async_reclaim_ ? false : true;
|
||||
enable_scratch_alt_ = false;
|
||||
|
||||
tools_lib_names_ = os::GetEnvVar("HSA_TOOLS_LIB");
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ typedef struct AMD_QUEUE_ALIGN amd_queue_v2_s {
|
||||
uint32_t compute_tmpring_size;
|
||||
uint32_t scratch_resource_descriptor[4];
|
||||
uint64_t scratch_backing_memory_location;
|
||||
uint32_t reserved3[2];
|
||||
uint64_t scratch_backing_memory_byte_size;
|
||||
uint32_t scratch_wave64_lane_byte_size;
|
||||
amd_queue_properties32_t queue_properties;
|
||||
volatile uint64_t scratch_max_use_index; /* V2 */
|
||||
|
||||
Ссылка в новой задаче
Block a user