We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a40d6b9 commit 7cae837Copy full SHA for 7cae837
test/test_tv_tensors.py
@@ -162,9 +162,10 @@ def test_force_subclass_with_metadata(return_type):
162
if return_type == "TVTensor":
163
assert bbox.format, bbox.canvas_size == (format, canvas_size)
164
165
- bbox = bbox.pin_memory()
166
- if return_type == "TVTensor":
167
- assert bbox.format, bbox.canvas_size == (format, canvas_size)
+ if torch.cuda.is_available():
+ bbox = bbox.pin_memory()
+ if return_type == "TVTensor":
168
+ assert bbox.format, bbox.canvas_size == (format, canvas_size)
169
170
assert not bbox.requires_grad
171
bbox.requires_grad_(True)
0 commit comments