Skip to content
This repository has been archived by the owner on Dec 24, 2024. It is now read-only.

Releasing buffer of XDNA hw context params #18

Merged
merged 2 commits into from
Sep 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions runtime/hsa-runtime/core/driver/xdna/amd_xdna_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,11 @@ hsa_status_t XdnaDriver::ConfigHwCtxCU(
amdxdna_hwctx_param_config_cu *xdna_config_cu_param =
reinterpret_cast<amdxdna_hwctx_param_config_cu *>(
malloc(config_cu_param_size));
if (xdna_config_cu_param == nullptr) {
return HSA_STATUS_ERROR_OUT_OF_RESOURCES;
}
MAKE_SCOPE_GUARD([xdna_config_cu_param] { free(xdna_config_cu_param); });

xdna_config_cu_param->num_cus = config_cu_param.num_cus;

for (int i = 0; i < xdna_config_cu_param->num_cus; ++i) {
Expand Down
Loading