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

python -m torch_ort.configure fail #177

Open
kimkeithvn opened this issue Jul 25, 2023 · 2 comments
Open

python -m torch_ort.configure fail #177

kimkeithvn opened this issue Jul 25, 2023 · 2 comments

Comments

@kimkeithvn
Copy link

it seems the length of filename result in this error. Here is the log.
Any idea about solving the problem? thx

running build
running build_ext
building 'aten_op_executor' extension
Emitting ninja build file D:\python\Anaconda\envs\dl\lib\site-packages\onnxruntime\training\ortmodule\torch_cpp_extensions\build\temp.win-amd64-cpython-310\Release\build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
ninja: error: Stat(D:/python/Anaconda/envs/dl/lib/site-packages/onnxruntime/training/ortmodule/torch_cpp_extensions/build/temp.win-amd64-cpython-310/Release/python/Anaconda/envs/dl/lib/site-packages/onnxruntime/training/ortmodule/torch_cpp_extensions/cpu/aten_op_executor/aten_op_executor.obj): Filename longer than 260 characters
Traceback (most recent call last):
  File "D:\python\Anaconda\envs\dl\lib\site-packages\torch\utils\cpp_extension.py", line 1894, in _run_ninja_build
    subprocess.run(
  File "D:\python\Anaconda\envs\dl\lib\subprocess.py", line 526, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.
@pengwa
Copy link

pengwa commented Apr 29, 2024

Not sure why the path is so long, the error reported is "ninja: error: Stat(D:/python/Anaconda/envs/dl/lib/site-packages/onnxruntime/training/ortmodule/torch_cpp_extensions/build/temp.win-amd64-cpython-310/Release/python/Anaconda/envs/dl/lib/site-packages/onnxruntime/training/ortmodule/torch_cpp_extensions/cpu/aten_op_executor/aten_op_executor.obj): Filename longer than 260 characters" Is that possible to shorten the python installation path?

@AdamLouly
Copy link
Contributor

You can bypass this error by enabling long path name:
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name LongPathsEnabled -Type DWord -Value 1

However, you'll still bump into other issues since ORTModule does not support Windows for now.

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

3 participants