Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSError: [WinError 127] While trying to test Transformer sample #647

Open
fabroGAMING opened this issue Sep 22, 2024 · 2 comments
Open

OSError: [WinError 127] While trying to test Transformer sample #647

fabroGAMING opened this issue Sep 22, 2024 · 2 comments

Comments

@fabroGAMING
Copy link

fabroGAMING commented Sep 22, 2024

I wanted to check out how does DirectML work with transformers but when i tried following steps in attention_is_all_you_need the error occured.

Traceback (most recent call last):
File "E:\Python_Projects\directml-test\DirectML\PyTorch\transformer\attention_is_all_you_need\train.py", line 40, in
from util.torchtext_legacy.field import Field
File "E:\Python_Projects\directml-test\DirectML\PyTorch\transformer\attention_is_all_you_need\util\torchtext_legacy\field.py", line 6, in
from .data import Dataset
File "E:\Python_Projects\directml-test\DirectML\PyTorch\transformer\attention_is_all_you_need\util\torchtext_legacy\data.py", line 13, in
from torchtext.data.utils import RandomShuffler
from torchtext import _extension # noqa: F401
File "E:\Python_Projects\directml-test\venv\lib\site-packages\torchtext_extension.py", line 64, in
_init_extension()
File "E:\Python_Projects\directml-test\venv\lib\site-packages\torchtext_extension.py", line 58, in _init_extension
_load_lib("libtorchtext")
File "E:\Python_Projects\directml-test\venv\lib\site-packages\torchtext_extension.py", line 50, in load_lib
torch.ops.load_library(path)
File "E:\Python_Projects\directml-test\venv\lib\site-packages\torch_ops.py", line 1295, in load_library
ctypes.CDLL(path)
File "E:\Python\lib\ctypes_init
.py", line 374, in init
self._handle = _dlopen(self._name, mode)
OSError: [WinError 127] Nie można odnaleźć określonej procedury

I tried reinstalling torch, directml and tried installing Windows SDK and Visual C++ packages but nothing worked.

@fabroGAMING
Copy link
Author

fabroGAMING commented Sep 22, 2024

Also i found that in requrements.txt there is a version of torchtext that downgrades torch that issnt supported by current DirectML

Edit: Whole example might be broken as now i think about it

@liyuhang1997
Copy link

same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants