Skip to content

Conversation

@jeffdaily
Copy link
Collaborator

cherry pick of pytorch#161221

HIPAllocatorMasqueradingAsCUDA and HIPCachingAllocatorMasqueradingAsCUDA are now proper complete wrappers of HIPAllocator and HIPCachingAllocator, respectively. HIPAllocatorMasqueradingAsCUDA now subclasses HIPAllocator instead of Allocator. This fixes usability of hipify replacing c10::cuda::CUDACachingAllocator::get() where callers expect a CUDAAllocator to be returned but instead were getting a very thin Allocator shim instead.

This also fixes using cudagraph trees with torch compile. The hip:0 device was not being replaced by the cuda:0 device in all methods.

Pull Request resolved: pytorch#161221
Approved by: https://github.com/jeffdaily

Co-authored-by: Jeff Daily <[email protected]>
@rocm-repo-management-api
Copy link

rocm-repo-management-api bot commented Sep 2, 2025

Jenkins build for 1685e82955b2ad84711ee115cdbb27028c06d998 commit finished as FAILURE
Links: Blue Ocean view / Build artifacts

@pruthvistony pruthvistony merged commit e3cca5e into release/2.7 Sep 3, 2025
40 of 43 checks passed
@pruthvistony pruthvistony deleted the release/2.7_cherry_pick_161221 branch September 3, 2025 16:28
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.

3 participants