Skip to content

Include core CachingHostAllocator.h instead of the XPU one#3981

Open
cyyever wants to merge 2 commits into
intel:mainfrom
cyyever:agent/remove-xpu-caching-host-allocator-include
Open

Include core CachingHostAllocator.h instead of the XPU one#3981
cyyever wants to merge 2 commits into
intel:mainfrom
cyyever:agent/remove-xpu-caching-host-allocator-include

Conversation

@cyyever

@cyyever cyyever commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Upstream ATen/xpu/CachingHostAllocator.h is now only deprecated inline wrappers around at::getHostAllocator(at::kXPU), which is declared in ATen/core/CachingHostAllocator.h. We call only the generic API, so include the core header directly (and drop the include entirely in Shape.cpp, which uses none of it). In Copy.cpp the include also leaves the SYCL warning-suppression block since the core header is host-only.

Authored with Claude Code.

Upstream ATen/xpu/CachingHostAllocator.h is now only deprecated inline
wrappers around at::getHostAllocator(at::kXPU), which is declared in
ATen/core/CachingHostAllocator.h. We call only the generic API, so
include the core header directly (and drop the include entirely in
Shape.cpp, which uses none of it). In Copy.cpp the include also leaves
the SYCL warning-suppression block since the core header is host-only.

Test Plan:
Include-only change; verified no file references the deprecated
at::xpu wrappers:

```
grep -rn "getCachingHostAllocator\|CachingHostAllocator_\|xpu::HostAlloc" src/
```

Compile coverage relies on CI since this repo has no standalone build.
@cyyever cyyever force-pushed the agent/remove-xpu-caching-host-allocator-include branch from cce3b10 to 400d85d Compare June 12, 2026 02:49
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.

2 participants