Skip to content

Commit

Permalink
Enable the tests.
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Zientkiewicz <michalz@nvidia.com>
  • Loading branch information
mzient committed Oct 21, 2024
1 parent 8c80a22 commit acb54b0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dali/test/python/dlpack/test_torch.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import nvidia.dali.fn as fn
import torch
import numpy as np
import time
from nose.plugins.attrib import attr


@dali.pipeline_def(batch_size=4, num_threads=1, device_id=0, prefetch_queue_depth=2)
Expand All @@ -14,6 +14,7 @@ def _test_pipe():
return ext + row + col


@attr("pytorch")
def test_dlpack():
print("Testing dlpack")
# get a DALI pipeline that produces batches of very large tensors
Expand Down
2 changes: 2 additions & 0 deletions dali/test/python/dlpack/test_torch_perf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import torch
import numpy as np
import time
from nose.plugins.attrib import attr


@dali.pipeline_def(batch_size=32, num_threads=8, device_id=0)
Expand Down Expand Up @@ -80,6 +81,7 @@ def to_torch(dali_tensor):
return (end - start) * 1e-6


@attr("pytorch")
def test_perf():
"""Test that DLPack zero-copy output is faster than copying."""
dlpack_times = []
Expand Down
1 change: 1 addition & 0 deletions qa/TL0_python-self-test-core/test_body.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ test_pytorch() {
${python_invoke_test} --attr '!slow,pytorch' test_dali_variable_batch_size.py
if [ -z "$DALI_ENABLE_SANITIZERS" ]; then
${python_new_invoke_test} -A 'pytorch' -s type_annotations
${python_new_invoke_test} -A 'pytorch' -s dlpack
${python_new_invoke_test} -A '!slow' checkpointing.test_dali_checkpointing_fw_iterators.TestPytorch
${python_new_invoke_test} -A '!slow' checkpointing.test_dali_checkpointing_fw_iterators.TestPytorchRagged
fi
Expand Down

0 comments on commit acb54b0

Please sign in to comment.