Skip to content

Commit

Permalink
Merge branch 'main' into datasets/eurosat
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasHug authored Aug 6, 2024
2 parents 2f33f46 + c8c496d commit e135137
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions torchvision/csrc/ops/autocast/nms_kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,12 @@ TORCH_LIBRARY_IMPL(torchvision, AutocastCPU, m) {
(nms_autocast<c10::DispatchKey::AutocastCPU, c10::DeviceType::CPU>)));
}

TORCH_LIBRARY_IMPL(torchvision, AutocastXPU, m) {
m.impl(
TORCH_SELECTIVE_NAME("torchvision::nms"),
TORCH_FN(
(nms_autocast<c10::DispatchKey::AutocastXPU, c10::DeviceType::XPU>)));
}

} // namespace ops
} // namespace vision
8 changes: 8 additions & 0 deletions torchvision/csrc/ops/autocast/roi_align_kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,13 @@ TORCH_LIBRARY_IMPL(torchvision, AutocastCPU, m) {
c10::DeviceType::CPU>)));
}

TORCH_LIBRARY_IMPL(torchvision, AutocastXPU, m) {
m.impl(
TORCH_SELECTIVE_NAME("torchvision::roi_align"),
TORCH_FN((roi_align_autocast<
c10::DispatchKey::AutocastXPU,
c10::DeviceType::XPU>)));
}

} // namespace ops
} // namespace vision

0 comments on commit e135137

Please sign in to comment.