mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Fix shadow local variables (#152429)
Summary: Fixing shadow local variables error: P1798875650 Test Plan: CI Differential Revision: D73853605 Pull Request resolved: https://github.com/pytorch/pytorch/pull/152429 Approved by: https://github.com/Skylion007, https://github.com/eqy
This commit is contained in:
committed by
PyTorch MergeBot
parent
a3123dd3ab
commit
8e2e06b7ea
@ -1268,11 +1268,10 @@ class DeviceCachingAllocator {
|
||||
for (MempoolId_t mempool_id : use_on_oom_pools) {
|
||||
auto filter = [](cudaStream_t) { return true; };
|
||||
beginAllocateToPool(mempool_id, filter);
|
||||
auto& pool = get_pool(size, stream);
|
||||
const size_t alloc_size = get_allocation_size(size);
|
||||
auto& mempool = get_pool(size, stream);
|
||||
AllocParams mempool_params(
|
||||
device, size, stream, &pool, alloc_size, stats);
|
||||
mempool_params.stat_types = get_stat_types_for_pool(pool);
|
||||
device, size, stream, &mempool, alloc_size, stats);
|
||||
mempool_params.stat_types = get_stat_types_for_pool(mempool);
|
||||
block_found = get_free_block(mempool_params);
|
||||
endAllocateToPool(mempool_id);
|
||||
releasePool(mempool_id);
|
||||
|
Reference in New Issue
Block a user