Skip to content

Commit

Permalink
Define rocm_toolkit_path before use
Browse files Browse the repository at this point in the history
  • Loading branch information
hsharsha committed Aug 15, 2024
1 parent a91e4cb commit 75ee501
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions third_party/gpus/rocm_configure.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -210,15 +210,13 @@ def _rocm_include_path(repository_ctx, rocm_config, bash_bin):
inc_dirs.append(rocm_config.llvm_path + "/lib/clang/17/include")
inc_dirs.append(rocm_config.llvm_path + "/lib/clang/18/include")
inc_dirs.append(rocm_config.llvm_path + "/lib/clang/19/include")
rocm_toolkit_path = realpath(repository_ctx, rocm_config.rocm_toolkit_path, bash_bin)
if int(rocm_config.rocm_version_number) >= 60200:
inc_dirs.append(rocm_toolkit_path + "/lib/llvm/lib/clang/17/include")
inc_dirs.append(rocm_toolkit_path + "/lib/llvm/lib/clang/18/include")
inc_dirs.append(rocm_toolkit_path + "/lib/llvm/lib/clang/19/include")

# Support hcc based off clang 10.0.0 (for ROCm 3.3)
rocm_toolkit_path = realpath(repository_ctx, rocm_config.rocm_toolkit_path, bash_bin)
if int(rocm_config.rocm_version_number) >= 60200:
inc_dirs.append(rocm_toolkit_path + "/lib/llvm/lib/clang/18/include")
inc_dirs.append(rocm_toolkit_path + "/hcc/compiler/lib/clang/10.0.0/include/")
inc_dirs.append(rocm_toolkit_path + "/hcc/lib/clang/10.0.0/include")

Expand Down

0 comments on commit 75ee501

Please sign in to comment.