MCPcopy Create free account
hub / github.com/NVIDIA/cuda-samples / main

Function main

python/1_GettingStarted/deviceQuery/deviceQuery.py:363–385  ·  view source on GitHub ↗

Main entry point for the device query sample.

()

Source from the content-addressed store, hash-verified

361
362
363def main():
364 """
365 Main entry point for the device query sample.
366 """
367 import argparse
368
369 parser = argparse.ArgumentParser(
370 description="Query CUDA Device Properties using CUDA Core API",
371 formatter_class=argparse.RawDescriptionHelpFormatter,
372 )
373 parser.add_argument(
374 "--no-p2p", action="store_true", help="Skip peer-to-peer access information"
375 )
376
377 args = parser.parse_args()
378
379 success = query_devices(show_p2p=not args.no_p2p)
380
381 if success:
382 print("\nDone")
383 return 0
384 else:
385 return 1
386
387
388if __name__ == "__main__":

Callers 1

deviceQuery.pyFile · 0.70

Calls 1

query_devicesFunction · 0.85

Tested by

no test coverage detected