Install hipTensor#

You can install hipTensor on Linux from prebuilt packages either as part of the ROCm HPC SDK, as standalone packages, or from a ROCm Core SDK tarball release. Before you begin, verify that your operating system and environment are supported using the installation selector on Install ROCm HPC SDK.

For advanced workflows, source builds, or custom configurations, see Build and install hipTensor from source.

Install the ROCm HPC SDK#

hipTensor is part of the ROCm HPC SDK on Linux. It is not included in the ROCm Core SDK through the standard amdrocm metapackage; it is installed through the opt-in amdrocm-hpc-sdk metapackage. This is the recommended installation method for the most complete installation.

For instructions, see Install ROCm HPC SDK and use the selector panel to view instructions for your system environment. For ROCm core installation, see Install AMD ROCm.

Install hipTensor standalone on Linux#

Alternatively, you can use the amdrocm-hiptensor packages to install hipTensor without the full ROCm HPC SDK.

  1. Complete the ROCm installation prerequisites to install dependencies and configure GPU access permissions.

  2. Install the hipTensor packages that match your desired ROCm version, development package needs, and AMD GPU architecture. Package names use the following format:

    amdrocm-hiptensor<rocm_version><-llvm_target>
    amdrocm-hiptensor<-dev/-devel><rocm_version>
    

    Where:

    • <-dev/-devel> is the development package suffix (headers and CMake configuration files):

      • -dev is used on Debian-based distributions, including Ubuntu.

      • -devel is used on RPM-based distributions, including RHEL and SLES.

    • <rocm_version> is the ROCm version to install (for example, 10.2). Omit this suffix to install the latest available version. If you include <-llvm_target>, also include <rocm_version> (for example, amdrocm-hiptensor10.2-gfx950).

    • <-llvm_target> (starting with gfx) is used on the runtime package if you are installing for a single AMD GPU architecture. Omit this to install for all supported architectures at the cost of disk space. To find the LLVM target for an installed GPU, run rocminfo | grep gfx.

    Supported GPUs and GFX targets

    For example: amdrocm-hiptensor10.2-gfx950 and amdrocm-hiptensor-dev10.2

    Use the following commands to install the latest hipTensor runtime and development packages for supported GPU architectures:

    sudo apt install amdrocm-hiptensor amdrocm-hiptensor-dev
    
    sudo dnf install amdrocm-hiptensor amdrocm-hiptensor-devel
    
    sudo zypper install amdrocm-hiptensor amdrocm-hiptensor-devel
    

Install from a tarball#

The standard ROCm Core SDK tarball installation includes hipTensor. No additional steps are required. For details, see Install AMD ROCm and select the tarball installation method.

The standard ROCm uninstallation process removes hipTensor. No additional steps are required.

Install a nightly build#

The TheRock build system also publishes nightly builds for ROCm and its components, including hipTensor. See Nightly release status for details.

Verify your installation#

After installing the runtime and development packages (or the ROCm HPC SDK), you can verify your installation by compiling and running a minimal smoke test.

  1. Create a file named test_hiptensor.cpp:

    #include <cstdio>
    #include <hiptensor/hiptensor.h>
    
    int main() {
        hiptensorHandle_t handle;
        CHECK_HIPTENSOR_ERROR(hiptensorCreate(&handle));
        std::printf("hipTensor version: %zu (HIP runtime: %d)\n",
                    hiptensorGetVersion(), hiptensorGetHiprtVersion());
        CHECK_HIPTENSOR_ERROR(hiptensorDestroy(handle));
        return 0;
    }
    
  2. Compile and run the program:

    hipcc test_hiptensor.cpp -lhiptensor -o test_hiptensor
    ./test_hiptensor
    

    If hipTensor is installed properly, the program initializes a hipTensor handle on the active GPU and prints the installed hipTensor and HIP runtime versions.

Uninstall hipTensor#

If you installed versioned or architecture-specific packages, substitute the exact package names used during installation (for example, amdrocm-hiptensor10.2-gfx950 and amdrocm-hiptensor-dev10.2 or amdrocm-hiptensor-devel10.2).

sudo apt autoremove amdrocm-hiptensor amdrocm-hiptensor-dev
sudo dnf remove amdrocm-hiptensor amdrocm-hiptensor-devel
sudo zypper remove 'amdrocm-hiptensor*'