Workaround for SWDEV-559598. Enabling more thread trace tests. (#1336)
* Workaround for SWDEV-559598 * gfx11 fix
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
259010f2d5
Коммит
0e04fdd571
@@ -94,16 +94,28 @@ rocprofiler_add_integration_execute_test(
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "${ROCPROFILER_MEMCHECK_PRELOAD_ENV_VALUE}")
|
||||
|
||||
# Feature introduced in ROCm 7.1, however some pre-release CI builds for 7.1 dont have
|
||||
# this feature in aqlprofile. Disable the next tests for ROCm < 7.2.
|
||||
set(IS_DISABLED True)
|
||||
find_package(hip CONFIG REQUIRED)
|
||||
if(hip_FOUND)
|
||||
if(${hip_VERSION_MAJOR} EQUAL 7 AND ${hip_VERSION_MINOR} GREATER 1)
|
||||
set(IS_DISABLED False)
|
||||
elseif(${hip_VERSION_MAJOR} GREATER 7)
|
||||
set(IS_DISABLED False)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Test large buffer sizes. 5120 == 5GB
|
||||
rocprofiler_add_integration_execute_test(
|
||||
thread-trace-api-large-buffer-test
|
||||
COMMAND $<TARGET_FILE:thread-trace-api-agent-test>
|
||||
DEPENDS thread-trace-api-agent-test
|
||||
TIMEOUT 10
|
||||
TIMEOUT 30
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
ENVIRONMENT "ATT_BUFFER_SIZE_MB=5120"
|
||||
DISABLED ${ROCPROFILER_DISABLE_UNSTABLE_CTESTS})
|
||||
ENVIRONMENT "ATT_LARGE_BUFFER_TEST=1"
|
||||
DISABLED ${IS_DISABLED})
|
||||
|
||||
# Test occupancy mode
|
||||
rocprofiler_add_integration_execute_test(
|
||||
|
||||
@@ -102,15 +102,33 @@ query_available_agents(rocprofiler_agent_version_t /* version */,
|
||||
const auto* agent = static_cast<const rocprofiler_agent_v0_t*>(agents[idx]);
|
||||
if(agent->type != ROCPROFILER_AGENT_TYPE_GPU) continue;
|
||||
|
||||
// Check if we are testing for large buffers
|
||||
static const char* var = std::getenv("ATT_BUFFER_SIZE_MB");
|
||||
static uint64_t buffer_size_mb = (var ? atoi(var) : 96) * 1024ul * 1024ul;
|
||||
uint64_t buffer_size_gb = 1;
|
||||
|
||||
std::vector<rocprofiler_thread_trace_parameter_t> parameters;
|
||||
// Are we testing for larger buffers?
|
||||
if(const char* var = std::getenv("ATT_LARGE_BUFFER_TEST"); var && atoi(var))
|
||||
{
|
||||
// To fully test this feature, we need >4GB per shader engine (>8GB total).
|
||||
// Some RDNA GPUs only have 8GB of VRAM, so we have to use 5GB total = 2.5GB per SE.
|
||||
uint64_t total_memory = 0;
|
||||
for(uint32_t i = 0; i < agent->mem_banks_count; i++)
|
||||
total_memory += agent->mem_banks[i].size_in_bytes;
|
||||
|
||||
// Check we have >11GB VRAM. If so, allocate 10GB.
|
||||
if(total_memory > (11ul << 30))
|
||||
buffer_size_gb = 10;
|
||||
else
|
||||
buffer_size_gb = 5;
|
||||
}
|
||||
|
||||
uint64_t buffer_size_bytes = buffer_size_gb << 30;
|
||||
if(agent->gfx_target_version / 10000 == 11u)
|
||||
buffer_size_bytes = 255ul << 20; // gfx11 limititation
|
||||
|
||||
auto parameters = std::vector<rocprofiler_thread_trace_parameter_t>{};
|
||||
parameters.push_back({ROCPROFILER_THREAD_TRACE_PARAMETER_TARGET_CU, {1}});
|
||||
parameters.push_back({ROCPROFILER_THREAD_TRACE_PARAMETER_SIMD_SELECT, {0xF}});
|
||||
parameters.push_back({ROCPROFILER_THREAD_TRACE_PARAMETER_BUFFER_SIZE, {buffer_size_mb}});
|
||||
parameters.push_back({ROCPROFILER_THREAD_TRACE_PARAMETER_SHADER_ENGINE_MASK, {0x1}});
|
||||
parameters.push_back({ROCPROFILER_THREAD_TRACE_PARAMETER_BUFFER_SIZE, {buffer_size_bytes}});
|
||||
parameters.push_back({ROCPROFILER_THREAD_TRACE_PARAMETER_SHADER_ENGINE_MASK, {0x3}});
|
||||
|
||||
static const bool extra_args =
|
||||
std::getenv("ATT_NODETAIL") ? std::stoi(std::getenv("ATT_NODETAIL")) != 0 : false;
|
||||
|
||||
@@ -71,8 +71,9 @@ tool_init(rocprofiler_client_finalize_t /* fini_func */, void* /* tool_data */)
|
||||
nullptr),
|
||||
"code object tracing service configure");
|
||||
|
||||
std::vector<rocprofiler_thread_trace_parameter_t> params{};
|
||||
params.push_back({ROCPROFILER_THREAD_TRACE_PARAMETER_SERIALIZE_ALL, {1}});
|
||||
auto parameters = std::vector<rocprofiler_thread_trace_parameter_t>{};
|
||||
parameters.push_back({ROCPROFILER_THREAD_TRACE_PARAMETER_SERIALIZE_ALL, {1}});
|
||||
parameters.push_back({ROCPROFILER_THREAD_TRACE_PARAMETER_SHADER_ENGINE_MASK, {0x3}});
|
||||
|
||||
std::vector<rocprofiler_agent_id_t> agents{};
|
||||
|
||||
@@ -97,8 +98,8 @@ tool_init(rocprofiler_client_finalize_t /* fini_func */, void* /* tool_data */)
|
||||
ROCPROFILER_CALL(
|
||||
rocprofiler_configure_dispatch_thread_trace_service(client_ctx,
|
||||
id,
|
||||
params.data(),
|
||||
params.size(),
|
||||
parameters.data(),
|
||||
parameters.size(),
|
||||
dispatch_callback,
|
||||
Callbacks::shader_data_callback,
|
||||
nullptr),
|
||||
|
||||
@@ -84,13 +84,16 @@ tool_init(rocprofiler_client_finalize_t /* fini_func */, void* /* tool_data */)
|
||||
&agents),
|
||||
"Failed to iterate agents");
|
||||
|
||||
auto parameters = std::vector<rocprofiler_thread_trace_parameter_t>{};
|
||||
parameters.push_back({ROCPROFILER_THREAD_TRACE_PARAMETER_SHADER_ENGINE_MASK, 0x3});
|
||||
|
||||
for(auto id : agents)
|
||||
{
|
||||
ROCPROFILER_CALL(
|
||||
rocprofiler_configure_dispatch_thread_trace_service(client_ctx,
|
||||
id,
|
||||
nullptr,
|
||||
0,
|
||||
parameters.data(),
|
||||
parameters.size(),
|
||||
dispatch_callback,
|
||||
Callbacks::shader_data_callback,
|
||||
nullptr),
|
||||
|
||||
Ссылка в новой задаче
Block a user