Skip to content

fix(ascend): load InitHugeMemThreadLocal from libnnopbase.so, fix whe… - #59

Merged
Hchnr merged 1 commit into
mainfrom
ascend
May 27, 2026
Merged

fix(ascend): load InitHugeMemThreadLocal from libnnopbase.so, fix whe…#59
Hchnr merged 1 commit into
mainfrom
ascend

Conversation

@Hchnr

@Hchnr Hchnr commented May 27, 2026

Copy link
Copy Markdown
Owner

…re broadcast

  • op_api_common.h: add GetOpBaseLibHandle() to load from libnnopbase.so; InitHugeMemThreadLocal/UnInitHugeMemThreadLocal live in libnnopbase.so not libopapi.so ??? previous dlsym returned null so init never ran, causing segfault in OpExecCache::InitCacheData()
  • where.cc: compute output shape by broadcasting condition/self/other before calling aclnnSWhere; previously used self.sizes() directly which is [] for scalar tensors, causing ACL crash when condition is a high-dimensional mask

- op_api_common.h: store sizes/strides/storage_dims as member vectors
  to prevent aclCreateTensor from referencing freed stack memory;
  AclScalarWrapper stores value in union; all wrapper dtors are no-op
  to avoid executor cache use-after-free
- sum.cc: use correct API aclnnReduceSum (aclnnSum is for tensor-list
  element-wise sum); normalize negative dims; pass aclDataType not int8_t
@Hchnr
Hchnr merged commit bd806f2 into main May 27, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant