Skip to content

dpctl pip install broken on windows for python3.11 #1745

Closed

Description

@icfaust

System info:

OS Name:                   Microsoft Windows 11 Enterprise
OS Version:                10.0.22631 N/A Build 22631
System Type:               x64-based PC
Processor(s):              1 Processor(s) Installed.
                           [01]: Intel64 Family 6 Model 140 Stepping 1 GenuineIntel ~2995 Mhz

Using python3.11

Reproducer

python -m venv env2
env2\Scripts\activate.bat
python -m pip install dpctl
python -c "import dpctl"

image

Not sure if I am doing something wrong, but I am seeing this failure locally and in github action VMs using pip

Activity

  1. icfaust commented on Jul 19, 2024

    @icfaust
    Author

    temporary fix:

    import os, site
    path_to_env = site.getsitepackages()[0]
    path_to_libs = os.path.join(path_to_env, "Library", "bin")
    os.add_dll_directory(path_to_libs)
    import dpctl
  2. icfaust commented on Jul 21, 2024

    @icfaust
    Author

    here is a rough github workflow which can show the error. also when fixed it doesnt show any devices (second error? i was able to install manually the dpcpp compiler separately using the offline installer and yield an opencl device via sycl-ls). also broken for 3.9

    name: pip dpctl validator
    on:
      workflow_dispatch:
    
    env:
      PYTHON_VERSION: 3.9
      DPCTL_VERSION: 0.17.0
    
    jobs:
      dpctl:
        name: dpctl_test
        runs-on: windows-2022
        steps:
          - name: Checkout
            uses: actions/checkout@v4
          - name: Install Python
            uses: actions/setup-python@v5
            with:
              python-version: ${{ env.PYTHON_VERSION }}
          - name: Install dpctl
            shell: cmd
            run: |
              set PATH=C:\msys64\usr\bin;%PATH%
              python -m venv env2
              call .\env2\Scripts\activate.bat
              set DPCTL_SUPPORTED=3.9 3.11
              FOR %%i IN (%DPCTL_SUPPORTED%) DO if ${{ env.PYTHON_VERSION }}==%%i pip install dpctl==${{ env.DPCTL_VERSION }}
              python -c "import os, os.path, site; path_to_env = site.getsitepackages()[0]; path_to_libs = os.path.join(path_to_env, 'Library', 'bin'); temp=os.add_dll_directory(path_to_libs) if os.path.exists(path_to_libs) else None; import dpctl; print(dpctl.get_devices())"
              python -c "import dpctl; print(dpctl.get_devices())"
              pip list
          - name: Install dpctl conda
            shell: cmd
            run: |
              set PATH=C:\msys64\usr\bin;%PATH%
              call C:\Miniconda\condabin\conda.bat config --add channels https://software.repos.intel.com/python/conda/
              call C:\Miniconda\condabin\conda.bat config --append channels conda-forge https://software.repos.intel.com/python/conda/
              call C:\Miniconda\condabin\conda.bat create --name dpctl_env dpctl
              call C:\Miniconda\condabin\conda.bat activate dpctl_env
              python -c "import dpctl; print(dpctl.lsplatform(2))"
    
  3. icfaust commented on Jul 21, 2024

    @icfaust
    Author

    it looks like conda on windows has the same behavior

    EDIT: erroneous claim, this issue is addressed in another Turns out that there is a bug in the intel channel for windows and the vc14_runtime

  4. icfaust commented on Jul 22, 2024

    @icfaust
    Author

    Second issue with missing devices discussed here: #1751

  5. oleksandr-pavlyk commented on Dec 10, 2024

    @oleksandr-pavlyk
    Contributor

    Closing as completed via gh-1922.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions