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

PermissionError: [WinError 5] Access is denied #4719

Open
nitinmukesh opened this issue Sep 12, 2024 · 0 comments
Open

PermissionError: [WinError 5] Access is denied #4719

nitinmukesh opened this issue Sep 12, 2024 · 0 comments

Comments

@nitinmukesh
Copy link

I have Windows 11. Installed Triton using triton-2.1.0-cp310-cp310-win_amd64.whl.

Environment details

(venv) C:\tut\test>pip list Package Version ------------------------- ------------ aiofiles 23.2.1 aiohappyeyeballs 2.4.0 aiohttp 3.10.5 aiosignal 1.3.1 altair 5.4.1 annotated-types 0.7.0 anyio 3.7.1 async-timeout 4.0.3 attrs 24.2.0 certifi 2022.12.7 charset-normalizer 2.1.1 click 8.1.7 colorama 0.4.6 contourpy 1.3.0 cycler 0.12.1 einops 0.8.0 exceptiongroup 1.2.2 fastapi 0.114.1 ffmpy 0.4.0 filelock 3.13.1 fonttools 4.53.1 frozenlist 1.4.1 fsspec 2024.2.0 gradio 4.19.1 gradio_client 0.10.0 h11 0.12.0 httpcore 0.13.7 httpx 0.20.0 huggingface-hub 0.24.7 idna 3.4 imageio 2.35.1 imageio-ffmpeg 0.2.0 importlib_resources 6.4.5 Jinja2 3.1.3 jsonschema 4.23.0 jsonschema-specifications 2023.12.1 kiwisolver 1.4.7 lazy_loader 0.4 lightning-utilities 0.11.7 markdown-it-py 3.0.0 MarkupSafe 2.1.5 matplotlib 3.9.2 mdurl 0.1.2 mpmath 1.3.0 multidict 6.1.0 narwhals 1.7.0 networkx 3.2.1 numpy 1.24.4 orjson 3.10.7 packaging 24.1 pandas 2.2.2 pillow 10.2.0 pip 22.2.1 psutil 5.9.8 pydantic 2.9.1 pydantic_core 2.23.3 pydub 0.25.1 Pygments 2.18.0 pyparsing 3.1.4 python-dateutil 2.9.0.post0 python-multipart 0.0.9 pytorch-lightning 2.4.0 pytz 2023.3 PyYAML 6.0.2 referencing 0.35.1 requests 2.28.2 rfc3986 1.5.0 rich 13.4.2 rpds-py 0.20.0 ruff 0.6.4 safetensors 0.4.5 scikit-image 0.24.0 scipy 1.14.1 semantic-version 2.10.0 setuptools 60.2.0 shellingham 1.5.4 six 1.16.0 sniffio 1.3.1 starlette 0.38.5 sympy 1.12 tifffile 2024.8.30 tomlkit 0.12.0 torch 2.2.0+cu121 torchaudio 2.2.0+cu121 torchmetrics 1.4.1 torchvision 0.17.0+cu121 tqdm 4.65.0 triton 2.1.0 typer 0.12.5 typing_extensions 4.12.2 tzdata 2024.1 urllib3 1.26.13 uvicorn 0.30.6 websockets 11.0.3 yarl 1.11.1
Python version: 3.10.0
Triton version: 2.1.0
PyTorch version: 2.2.0+cu121
(venv) C:\tut\test>python minimal_triton_test.py
x tensor([ 0.5207, -0.5088,  0.3553,  ..., -0.6845, -1.1242,  1.4335],
       device='cuda:0')
y tensor([ 0.7515, -1.2655, -0.7590,  ...,  0.3353, -0.9994, -2.0269],
       device='cuda:0')
tensor([0., 0., 0.,  ..., 0., 0., 0.], device='cuda:0')
Traceback (most recent call last):
  File "C:\tut\test\minimal_triton_test.py", line 27, in <module>
    main()
  File "C:\tut\test\minimal_triton_test.py", line 22, in main
    add_kernel[grid](x, y, output, n)
  File "C:\tut\test\venv\lib\site-packages\triton\runtime\jit.py", line 166, in <lambda>
    return lambda *args, **kwargs: self.run(grid=grid, warmup=False, *args, **kwargs)
  File "C:\tut\test\venv\lib\site-packages\triton\runtime\jit.py", line 348, in run
    device = driver.get_current_device()
  File "C:\tut\test\venv\lib\site-packages\triton\runtime\driver.py", line 230, in __getattr__
    self._initialize_obj()
  File "C:\tut\test\venv\lib\site-packages\triton\runtime\driver.py", line 227, in _initialize_obj
    self._obj = self._init_fn()
  File "C:\tut\test\venv\lib\site-packages\triton\runtime\driver.py", line 260, in initialize_driver
    return CudaDriver()
  File "C:\tut\test\venv\lib\site-packages\triton\runtime\driver.py", line 122, in __init__
    self.utils = CudaUtils()
  File "C:\tut\test\venv\lib\site-packages\triton\runtime\driver.py", line 69, in __init__
    so = _build("cuda_utils", src_path, tmpdir)
  File "C:\tut\test\venv\lib\site-packages\triton\common\build.py", line 124, in _build
    ret = subprocess.check_call(cc_cmd)
  File "C:\Program Files\Python310\lib\subprocess.py", line 364, in check_call
    retcode = call(*popenargs, **kwargs)
  File "C:\Program Files\Python310\lib\subprocess.py", line 345, in call
    with Popen(*popenargs, **kwargs) as p:
  File "C:\Program Files\Python310\lib\subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Program Files\Python310\lib\subprocess.py", line 1438, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
PermissionError: [WinError 5] Access is denied

minimal_triton_test.py

import triton
import triton.language as tl
import torch

@triton.jit
def add_kernel(x_ptr, y_ptr, output_ptr, n):
    pid = tl.program_id(0)
    x = tl.load(x_ptr + pid)
    y = tl.load(y_ptr + pid)
    output = x + y
    tl.store(output_ptr + pid, output)

def main():
    n = 1024
    x = torch.randn(n, device='cuda')
    y = torch.randn(n, device='cuda')
    output = torch.empty_like(x)
    print("x", x)
    print("y", y)
    print(output)
    grid = lambda meta: (n,)
    add_kernel[grid](x, y, output, n)

    print("Kernel executed successfully")

if __name__ == "__main__":
    main()

I tried creating env using conda and python. tried launching command prompt as Run as administrator

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

1 participant