Skip to content

Commit

Permalink
[rmake][rocPRM] Fixed rmake errors when using linux (#641)
Browse files Browse the repository at this point in the history
* made sure cmake_platform_opts is always a list

* removed ; for , in cmake_base_options

* updated changelog

* implemented cmake_base_options for windows version

* removed -1 in list splice for windows cmake_base_options
  • Loading branch information
NguyenNhuDi authored Nov 12, 2024
1 parent e3963e3 commit 7fdc748
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Full documentation for rocPRIM is available at [https://rocm.docs.amd.com/projec
* The `rtest.py` options have changed. `rtest.py` is now run with at least either `--test|-t` or `--emulation|-e`, but not both options.

### Resolved issues

* Fixed an issue where `rmake.py` would generate wrong CMAKE commands while using Linux enviorment
* Fixed an issue where `rocprim::partial_sort_copy` would yield a compile error if the input iterator is const.
* Fixed incorrect 128-bit signed and unsigned integers type traits.
* Fixed compilation issue when `rocprim::radix_key_codec<...>` is specialized with a 128-bit integer.
Expand Down
12 changes: 8 additions & 4 deletions rmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ def delete_dir(dir_path) :
run_cmd( "RMDIR" , f"/S /Q {dir_path}")
else:
linux_path = pathlib.Path(dir_path).absolute()
#print( linux_path )
run_cmd( "rm" , f"-rf {linux_path}")

def cmake_path(os_path):
Expand Down Expand Up @@ -119,7 +118,7 @@ def config_cmd():
else:
cmake_executable = "cmake"
toolchain = "toolchain-linux.cmake"
cmake_platform_opts = f"-DROCM_DIR:PATH={rocm_path} -DCPACK_PACKAGING_INSTALL_PREFIX={rocm_path}"
cmake_platform_opts = [f"-DROCM_DIR:PATH={rocm_path}", f"-DCPACK_PACKAGING_INSTALL_PREFIX={rocm_path}"]

tools = f"-DCMAKE_TOOLCHAIN_FILE={toolchain}"
cmake_options.append( tools )
Expand All @@ -143,7 +142,12 @@ def config_cmd():
deps_dir = os.path.abspath(os.path.join(build_dir, 'deps')).replace('\\','/')
else:
deps_dir = args.deps_dir
cmake_base_options = f"-DROCM_PATH={rocm_path} -DCMAKE_PREFIX_PATH:PATH={rocm_path[:-1]};{rocm_cmake_path[1:]}" # -DCMAKE_INSTALL_PREFIX=rocmath-install" #-DCMAKE_INSTALL_LIBDIR=

if (OS_info["ID"] == 'windows'):
cmake_base_options = f"-DROCM_PATH={rocm_path} -DCMAKE_PREFIX_PATH:PATH={rocm_path[:-1]};{rocm_cmake_path[1:]}" # -DCMAKE_INSTALL_PREFIX=rocmath-install" #-DCMAKE_INSTALL_LIBDIR=
else:
cmake_base_options = f"-DROCM_PATH={rocm_path} -DCMAKE_PREFIX_PATH:PATH={rocm_path[:-1]},{rocm_cmake_path[1:-1]}" # -DCMAKE_INSTALL_PREFIX=rocmath-install" #-DCMAKE_INSTALL_LIBDIR=

cmake_options.append( cmake_base_options )

print( cmake_options )
Expand Down Expand Up @@ -208,7 +212,7 @@ def make_cmd():
make_options.append( "--target package --target install" )
else:
nproc = OS_info["NUM_PROC"]
make_executable = f"make -j{nproc}"
make_executable = f"make -j {nproc}"
if args.verbose:
make_options.append( "VERBOSE=1" )
if args.install:
Expand Down

0 comments on commit 7fdc748

Please sign in to comment.