Skip to content

Commit a78a8aa

Browse files
authored
Merge branch 'main' into fix_segfault_char_ptr_to_bytes
2 parents ab6db22 + 6897c26 commit a78a8aa

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

cuda_core/cuda/core/_version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED.
1+
# Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED.
22
#
33
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
44

5-
__version__ = "0.1.1"
5+
__version__ = "0.2.0"

cuda_core/tests/test_event.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ def test_timing(init_cuda, enable_timing):
3333
if enable_timing:
3434
elapsed_time_ms = e2 - e1
3535
assert isinstance(elapsed_time_ms, float)
36-
assert delay_seconds * 1000 <= elapsed_time_ms < delay_seconds * 1000 + 2 # tolerance 2 ms
36+
# Using a generous tolerance, to avoid flaky tests:
37+
# We only want to exercise the __sub__ method, this test is not meant
38+
# to stress-test the CUDA driver or time.sleep().
39+
delay_ms = delay_seconds * 1000
40+
generous_tolerance = 20
41+
assert delay_ms <= elapsed_time_ms < delay_ms + generous_tolerance
3742
else:
3843
with pytest.raises(RuntimeError) as e:
3944
elapsed_time_ms = e2 - e1

0 commit comments

Comments
 (0)