API symbolscudaCopyCopy as MarkdownCopy page linkView MarkdownDownload .mdOpenAIOpen in ChatGPTClaudeOpen in ClaudePerplexityOpen in PerplexityGrokOpen in Grok tensorplay.cuda.device_count tensorplay.cuda.device_count() → int[source] Return the number of GPUs available. Note This API will NOT poison fork if NVML discovery succeeds. Help improve this pageFound an error, an unclear step, or a missing example?Was this page helpful?YesNoSuggest an editReport an issuetensorplay.cuda.DeferredCudaCallErrorPrevious Pagetensorplay.cuda.device_memory_usedReturn used global (device) memory in bytes as given by nvidia-smi .