improve zluda operation test

This commit is contained in:
Seunghoon Lee
2024-05-13 17:44:44 +09:00
parent 328930966e
commit 74687dbc44
2 changed files with 31 additions and 6 deletions
+22
View File
@@ -0,0 +1,22 @@
import os
import sys
if __name__ == '__main__':
sys.path.append(os.getcwd())
from modules.zluda_installer import find, load
load(find())
import torch
print(f'Python with ZLUDA {sys.version}')
print('Type "help", "copyright", "credits" or "license" for more information.')
while True:
print('>>> ', end='')
try:
exec(input(), {
'torch': torch,
})
except Exception as e:
print(f'{e.__class__.__name__}: {e}')