[XPU][NPU][ROCM] enable cpu_offloading flag for non_cuda (#1488)
Signed-off-by: gcanlin <canlinguosdu@gmail.com> Signed-off-by: Chendi Xue <chendi.xue@intel.com> Co-authored-by: gcanlin <canlinguosdu@gmail.com>
This commit is contained in:
1 parent
ba9594724e
commit
482f9b89a1
6 files changed
+16
-11
No files matched your search
@@ -55,8 +55,11 @@ def get_offload_backend(
|
||||
return None
|
||||
|
||||
# Validate platform (CUDA required for now)
|
||||
if not current_omni_platform.is_cuda() or current_omni_platform.get_device_count() < 1:
|
||||
logger.warning("CPU offloading requires CUDA devices. Skipping offloading.")
|
||||
if not current_omni_platform.supports_cpu_offload() or current_omni_platform.get_device_count() < 1:
|
||||
logger.warning(
|
||||
"Current device: %s does not support CPU offloading. Skipping offloading.",
|
||||
current_omni_platform.get_device_name(),
|
||||
)
|
||||
return None
|
||||
|
||||
# Detect device if not provided
|
||||
|
||||
Reference in new issue
Block a user