Skip to content

Commit

Permalink
Releasing buffer for XDNA hw context params (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
ypapadop-amd authored and makslevental committed Sep 10, 2024
1 parent f62629d commit ab60a07
Showing 1 changed file with 5 additions and 0 deletions.
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

0 comments on commit ab60a07

Please sign in to comment.