Skip to content

Commit 7facebf

Browse files
committed
samples/cuda_core: waive greenContext on CUDA 13.1+ (issue NVIDIA#2765)
SMResource.split(dry_run=True) fails with cuDevSmResourceSplit when result=NULL and smCount is non-zero. This causes the auto SM-split probe in greenContext to fail on CUDA 13.1+. Waive the sample on affected drivers until the cuda.core bug is fixed.
1 parent d114fcb commit 7facebf

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎samples/cuda_core/greenContext/greenContext.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
"""
5454

5555
import argparse
56+
import os
5657
import sys
5758
import time
5859
from dataclasses import dataclass
@@ -586,6 +587,11 @@ def report_speedup(
586587

587588

588589
def main():
590+
# Waived on CUDA 13.1+ until https://github.com/NVIDIA/cuda-python/issues/2765 is fixed.
591+
from cuda.bindings import driver as _d
592+
if _d.cuDriverGetVersion()[1] >= 13010:
593+
sys.exit(int(os.environ.get("CUDA_PYTHON_SAMPLE_WAIVER_EXIT_CODE", "2")))
594+
589595
parser = argparse.ArgumentParser(
590596
description="Green Context sample using CUDA Core API",
591597
formatter_class=argparse.RawDescriptionHelpFormatter,

0 commit comments

Comments
 (0)