[torch-master]修复profiler采集内存流ID数据没有aclrtStreamGetId接口兼容性问题
Co-authored-by: yu-liang-bin<y1416490440@163.com>
# message auto-generated for no-merge-commit merge:
!27671 merge bug_fix_memory into master
[torch-master]修复profiler采集内存流ID数据没有aclrtStreamGetId接口兼容性问题
Created-by: yu_liangbin
Commit-by: yu-liang-bin
Merged-by: ascend-robot
Description: <!-- Thanks for sending a pull request!
-->
**What type of PR is this?**
> Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:
>
> /kind bug
> /kind task
> /kind feature
**What does this PR do / why do we need it**:
profiler采集内存数据时,会通过aclrtStreamGetId接口采集流ID,如果没有这个接口,会打断训练
**Which issue(s) this PR fixes**:
在调用aclrtStreamGetId接口采集流ID数据前增加aclrtStreamGetId接口检查函数
<!--
*Automatically closes linked issue when PR is merged.
Usage: Fixes #<issue number>, or Fixes (paste link of issue).
-->
Fixes #
**Special notes for your reviewers**:
See merge request: Ascend/pytorch!27671
Added proper handling for zero-size allocations when both data_ptr and allocator are null
Co-authored-by: chenkun<chenkun82@huawei.com>
# message auto-generated for no-merge-commit merge:
!25732 merge master_storage_1014 into master
Added proper handling for zero-size allocations when both data_ptr and allocator are null
Created-by: kuhn7
Commit-by: chenkun
Merged-by: ascend-robot
Description: <!-- Thanks for sending a pull request!
-->
**What type of PR is this?**
feature
**What does this PR do / why do we need it**:
1. Added proper handling for zero-size allocations when both data_ptrand allocatorare null
2. Implemented comprehensive parameter validation with clear error checking
3. Maintained consistency with CUDA memory allocation behavior
**Which issue(s) this PR fixes**:
<!--
*Automatically closes linked issue when PR is merged.
Usage: Fixes #<issue number>, or Fixes (paste link of issue).
-->
Fixes #
**Special notes for your reviewers**:
See merge request: Ascend/pytorch!25732