Files
phpy/examples/cuda.php
tianfenghan 9336c2c025 init
2023-12-04 17:20:01 +08:00

11 lines
174 B
PHP

<?php
function main()
{
// DEVICE = 'cuda' if torch.cuda.is_available() else 'cpu'
$torch = PyCore::import("torch");
var_dump($torch->cuda->is_available());
}