How to Properly Install and Verify Installation of NVIDIA CUDA in Windows - Compile C++ Test Files

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ต.ค. 2024
  • #nvidia #cuda #llama31 #aleksandarhaber #c++ #cpp #cppprogramming #CUDA #GPU #pytorch
    It takes a significant amount of time and energy to create these free video tutorials. You can support my efforts in this way:
    Buy me a Coffee: www.buymeacoff...
    PayPal: www.paypal.me/...
    Patreon: www.patreon.co...
    You Can also press the Thanks TH-cam Dollar button
    In this NVIDIA, CUDA, and machine learning tutorial mtutorial, we explain how to correctly install NVIDIA CUDA in Windows. Also, we explain how to verify the installation by downloading and compiling test files from the NVIDIA CUDA webpage.
    My motivation for creating this video tutorial comes from the fact that one of the machine learning libraries I am trying to install needs to use CUDA to compile some files. In your case, the motivation might be different, however, the procedure I am explaining in this video tutorial is the same. In particular I am trying to install META’s Segment Anything Model, version 2. While installing, I am getting this error:
    raise OSError('CUDA_HOME environment variable is not set. '
    OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.
    [end of output]
    The issue is that PyTorch comes with its own CUDA runtimes dependencies, and not with a full CUDA toolkit… If you search online, you will see this:
    The PyTorch binaries ship with their own CUDA runtime dependencies, not with a full CUDA toolkit including the compiler.
    Since a project requires CUDA_HOME I assume it’s asking for a full CUDA Toolkit, which you would need to install separately.
    Consequently, we need to install a complete NVIDIA CUDA framework.

ความคิดเห็น • 7

  • @aleksandarhaber
    @aleksandarhaber  2 หลายเดือนก่อน

    It takes a significant amount of time and energy to create these free video tutorials. You can support my efforts in this way:
    - Buy me a Coffee: www.buymeacoffee.com/AleksandarHaber
    - PayPal: www.paypal.me/AleksandarHaber
    - Patreon: www.patreon.com/user?u=32080176&fan_landing=true
    - You Can also press the Thanks TH-cam Dollar button

  • @imevano21
    @imevano21 2 หลายเดือนก่อน +3

    this is exactly what I'm looking for as I want to use sam2! Followed everything but my build failed. Any idea why this is? I'm using cuda 12.4 and installed the right branch of the repo as well.

    • @imevano21
      @imevano21 2 หลายเดือนก่อน +1

      I got the build to run however when I try and install the dependencies for same2 I'm still getting:
      raise OSError('CUDA_HOME environment variable is not set. '
      OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.

    • @imevano21
      @imevano21 2 หลายเดือนก่อน +1

      How come the environement var isnt being set? I added it to the user variables as well as system variables.

    • @aleksandarhaber
      @aleksandarhaber  2 หลายเดือนก่อน

      th-cam.com/video/MIUxiLjoA1g/w-d-xo.html

    • @aleksandarhaber
      @aleksandarhaber  2 หลายเดือนก่อน

      th-cam.com/video/MIUxiLjoA1g/w-d-xo.html

    • @aleksandarhaber
      @aleksandarhaber  2 หลายเดือนก่อน

      th-cam.com/video/MIUxiLjoA1g/w-d-xo.html