Skip to content

Commit

Permalink
Temporary fix for --rocblas-path/--rocsolver-path in rmake.py. (#719)
Browse files Browse the repository at this point in the history
  • Loading branch information
daineAMD committed Nov 22, 2023
1 parent 4910a47 commit c8e0b26
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions rmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ def parse_args():
parser.add_argument( '-r', '--relocatable', required=False, default=False, action='store_true',
help='Linux only: Add RUNPATH (based on ROCM_RPATH) and remove ldconf entry.')

parser.add_argument('--rocblas-path', dest='rocblas_path', type=str, required=False, default="C:/hipSDK",
parser.add_argument('--rocblas-path', dest='rocblas_path', type=str, required=False, default=None,
help='Specify path to an existing rocBLAS install directory(optional, e.g. /src/rocBLAS/build/release/rocblas-install).')

parser.add_argument('--rocsolver-path', dest='rocsolver_path', type=str, required=False, default="C:/hipSDK",
parser.add_argument('--rocsolver-path', dest='rocsolver_path', type=str, required=False, default=None,
help='Specify path to an existing rocSOLVER install directory (optional, e.g. /src/rocSOLVER/build/release/rocsolver-install).')

parser.add_argument( '--rocm_dev', type=str, required=False, default = "",
Expand Down Expand Up @@ -246,10 +246,25 @@ def config_cmd():
else:
cmake_options.append(f"-DBUILD_WITH_SOLVER=OFF")

raw_rocblas_path = cmake_path(args.rocblas_path)
raw_rocsolver_path = cmake_path(args.rocsolver_path)
rocblas_path_cmake = f'"{raw_rocblas_path}"'
rocsolver_path_cmake = f'"{raw_rocsolver_path}"'
if args.rocblas_path is not None:
# "Custom" rocblas
raw_rocblas_path = cmake_path(args.rocblas_path)
rocblas_path_cmake = f'"{raw_rocblas_path}"'
cmake_options.append( f"-DCUSTOM_ROCBLAS={rocblas_path_cmake}")
else:
args.rocblas_path = "C:/hipSDK"
raw_rocblas_path = cmake_path(args.rocblas_path)
rocblas_path_cmake = f'"{raw_rocblas_path}"'

if args.rocsolver_path is not None:
# "Custom" rocsolver
raw_rocsolver_path = cmake_path(args.rocsolver_path)
rocsolver_path_cmake = f'"{raw_rocsolver_path}"'
cmake_options.append( f"-DCUSTOM_ROCSOLVER={rocsolver_path_cmake}")
else:
args.rocsolver_path = "C:/hipSDK"
raw_rocsolver_path = cmake_path(args.rocsolver_path)
rocsolver_path_cmake = f'"{raw_rocsolver_path}"'

cmake_options.append( f"-DROCBLAS_PATH={rocblas_path_cmake}")
cmake_options.append( f"-DROCSOLVER_PATH={rocsolver_path_cmake}")
Expand Down

0 comments on commit c8e0b26

Please sign in to comment.