Skip to content

Commit efa746d

Browse files
authored
Merge branch 'main' into add_gpu_decode
2 parents dcd1c07 + 5242d6a commit efa746d

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

torchvision/csrc/ops/autocast/nms_kernel.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,12 @@ TORCH_LIBRARY_IMPL(torchvision, AutocastCPU, m) {
3838
(nms_autocast<c10::DispatchKey::AutocastCPU, c10::DeviceType::CPU>)));
3939
}
4040

41+
TORCH_LIBRARY_IMPL(torchvision, AutocastXPU, m) {
42+
m.impl(
43+
TORCH_SELECTIVE_NAME("torchvision::nms"),
44+
TORCH_FN(
45+
(nms_autocast<c10::DispatchKey::AutocastXPU, c10::DeviceType::XPU>)));
46+
}
47+
4148
} // namespace ops
4249
} // namespace vision

torchvision/csrc/ops/autocast/roi_align_kernel.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,13 @@ TORCH_LIBRARY_IMPL(torchvision, AutocastCPU, m) {
4848
c10::DeviceType::CPU>)));
4949
}
5050

51+
TORCH_LIBRARY_IMPL(torchvision, AutocastXPU, m) {
52+
m.impl(
53+
TORCH_SELECTIVE_NAME("torchvision::roi_align"),
54+
TORCH_FN((roi_align_autocast<
55+
c10::DispatchKey::AutocastXPU,
56+
c10::DeviceType::XPU>)));
57+
}
58+
5159
} // namespace ops
5260
} // namespace vision

torchvision/datasets/eurosat.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
class EuroSAT(ImageFolder):
1010
"""RGB version of the `EuroSAT <https://github.com/phelber/eurosat>`_ Dataset.
1111
12+
For the MS version of the dataset, see
13+
`TorchGeo <https://torchgeo.readthedocs.io/en/stable/api/datasets.html#eurosat>`__.
14+
1215
Args:
1316
root (str or ``pathlib.Path``): Root directory of dataset where ``root/eurosat`` exists.
1417
transform (callable, optional): A function/transform that takes in a PIL image
@@ -53,7 +56,7 @@ def download(self) -> None:
5356

5457
os.makedirs(self._base_folder, exist_ok=True)
5558
download_and_extract_archive(
56-
"https://madm.dfki.de/files/sentinel/EuroSAT.zip",
59+
"https://huggingface.co/datasets/torchgeo/eurosat/resolve/c877bcd43f099cd0196738f714544e355477f3fd/EuroSAT.zip",
5760
download_root=self._base_folder,
5861
md5="c8fa014336c82ac7804f0398fcb19387",
5962
)

0 commit comments

Comments
 (0)