Skip to content

Local execution: CUDA_PATH #3

@ptheywood

Description

@ptheywood

One cell in the notebook sets the CUDA_PATH environment variable to the default general CUDA installation directory:

import platform
if platform.system() == 'Linux':
    %env CUDA_PATH=/usr/local/cuda

This will not necisarily be a CUDA 12 installation (as currently assumed), and also overrules any other user environment variables they may use to control this (e.g. via module files).

Additioanlly, this requires CUDA 12.x, it may be nice to

This should do some of the following:

  • Use /usr/local/cuda-12 if only supporting CUDA 12
  • Use a user-specified version if one exists
    • If CUDA_PATH is already set, use that
    • If CUDA_HOME is specified, consider using that (the value set on windows, but some usage on linux too
    • If neither set, check PATH &/or run which nvcc and compute the path from that
  • Ensure the path to be used exists

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