mirror of
https://github.com/nod-ai/AMD-SHARK-Studio.git
synced 2026-04-03 03:00:17 -04:00
potential fix to pre-load DLL dir for torch-mlir (#848)
Doesn't regress the main.py script but system already pre-loaded the DLL so needs more testing.
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
import os
|
||||
import sysconfig
|
||||
|
||||
os.environ["AMD_ENABLE_LLPC"] = "1"
|
||||
# Preload DLL paths for torch-mlir
|
||||
os.add_dll_directory(
|
||||
os.path.join(sysconfig.get_paths()["purelib"], "torch_mlir/_mlir_libs")
|
||||
)
|
||||
|
||||
from transformers import CLIPTextModel, CLIPTokenizer
|
||||
import torch
|
||||
|
||||
Reference in New Issue
Block a user