conda-forge / warp-lang-feedstock

A conda-smithy repository for warp-lang.
BSD 3-Clause "New" or "Revised" License
0 stars 4 forks source link

Support GPU version for Windows #10

Closed flferretti closed 6 months ago

flferretti commented 8 months ago

Solution to issue cannot be found in the documentation.

Issue

With #9 we tried to add GPU support for warp, yet the Windows builds fail with:

nvcc fatal   : Could not set up the environment for Microsoft Visual Studio using 'C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64/../../../../../../../VC/Auxiliary/Build/vcvars64.bat'

This might be due to the fact vcvars64.bat appends values to PATH each time it is called, making the PATH too long to be processed by nvcc. As a result, when trying to compile main.cu, the error reported above is raised

C.C. @traversaro

Installed packages

bzip2:             1.0.8-hcfcfb64_5            conda-forge
    ca-certificates:   2024.2.2-h56e8100_0         conda-forge
    cuda-version:      11.8-h70ddcb2_3             conda-forge
    cudatoolkit:       11.8.0-h09e9e62_13          conda-forge
    gitdb:             4.0.11-pyhd8ed1ab_0         conda-forge
    gitpython:         3.1.42-pyhd8ed1ab_0         conda-forge
    intel-openmp:      2024.0.0-h57928b3_49841     conda-forge
    libblas:           3.9.0-21_win64_mkl          conda-forge
    libcblas:          3.9.0-21_win64_mkl          conda-forge
    libffi:            3.4.2-h8ffe710_5            conda-forge
    libhwloc:          2.9.3-default_haede6df_1009 conda-forge
    libiconv:          1.17-hcfcfb64_2             conda-forge
    liblapack:         3.9.0-21_win64_mkl          conda-forge
    libsqlite:         3.45.2-hcfcfb64_0           conda-forge
    libxml2:           2.12.5-hc3477c8_0           conda-forge
    libzlib:           1.2.13-hcfcfb64_5           conda-forge
    mkl:               2024.0.0-h66d3029_49657     conda-forge
    numpy:             1.22.4-py310hed7ac4c_0      conda-forge
    openssl:           3.2.1-hcfcfb64_0            conda-forge
    pip:               24.0-pyhd8ed1ab_0           conda-forge
    pthreads-win32:    2.9.1-hfa6e2cd_3            conda-forge
    python:            3.10.13-h4de0772_1_cpython  conda-forge
    python_abi:        3.10-4_cp310                conda-forge
    setuptools:        69.2.0-pyhd8ed1ab_0         conda-forge
    smmap:             5.0.0-pyhd8ed1ab_0          conda-forge
    tbb:               2021.11.0-h91493d7_1        conda-forge
    tk:                8.6.13-h5226925_1           conda-forge
    typing_extensions: 4.10.0-pyha770c72_0         conda-forge
    tzdata:            2024a-h0c530f3_0            conda-forge
    ucrt:              10.0.22621.0-h57928b3_0     conda-forge
    vc:                14.3-hcf57466_18            conda-forge
    vc14_runtime:      14.38.33130-h82b7239_18     conda-forge
    vs2015_runtime:    14.38.33130-hcb4865c_18     conda-forge
    wheel:             0.42.0-pyhd8ed1ab_0         conda-forge
    xz:                5.2.6-h8d14728_0            conda-forge

Environment info

active environment : base
    active env location : C:\Miniforge
            shell level : 1
       user config file : C:\Users\VssAdministrator\.condarc
 populated config files : C:\Miniforge\.condarc
                          C:\Users\VssAdministrator\.condarc
          conda version : 23.11.0
    conda-build version : 24.1.2
         python version : 3.10.13.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=x86_64
                          __conda=23.11.0=0
                          __cuda=11.8=0
                          __win=0=0
       base environment : C:\Miniforge  (writable)
      conda av data dir : C:\Miniforge\etc\conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : C:\Miniforge\pkgs
                          C:\Users\VssAdministrator\.conda\pkgs
                          C:\Users\VssAdministrator\AppData\Local\conda\conda\pkgs
       envs directories : C:\Miniforge\envs
                          C:\Users\VssAdministrator\.conda\envs
                          C:\Users\VssAdministrator\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/23.11.0 requests/2.31.0 CPython/3.10.13 Windows/10 Windows/10.0.20348 solver/libmamba conda-libmamba-solver/23.12.0 libmambapy/1.5.5
          administrator : True
             netrc file : None
           offline mode : False
traversaro commented 8 months ago

Adding:

set NVCC_APPEND_FLAGS="%NVCC_APPEND_FLAGS% --use-local-env"

to the build script on Windows should solve the problem, see https://github.com/conda-forge/colmap-feedstock/pull/38#issuecomment-2022414291 and https://github.com/conda-forge/nvcc-feedstock/issues/76 .