From 0b60e54acc448b2e71f0f3b7e06b3b873b476c7f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Jul 2023 05:58:06 +0000 Subject: [PATCH 1/6] Bump rocm-docs-core from 0.14.0 to 0.19.0 in /docs/.sphinx Bumps [rocm-docs-core](https://github.com/RadeonOpenCompute/rocm-docs-core) from 0.14.0 to 0.19.0. - [Release notes](https://github.com/RadeonOpenCompute/rocm-docs-core/releases) - [Changelog](https://github.com/RadeonOpenCompute/rocm-docs-core/blob/develop/CHANGELOG.md) - [Commits](https://github.com/RadeonOpenCompute/rocm-docs-core/compare/v0.14.0...v0.19.0) --- updated-dependencies: - dependency-name: rocm-docs-core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- docs/.sphinx/requirements.in | 2 +- docs/.sphinx/requirements.txt | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/docs/.sphinx/requirements.in b/docs/.sphinx/requirements.in index 4b7d96b..e53f3df 100644 --- a/docs/.sphinx/requirements.in +++ b/docs/.sphinx/requirements.in @@ -1 +1 @@ -rocm-docs-core==0.14.0 +rocm-docs-core==0.19.0 diff --git a/docs/.sphinx/requirements.txt b/docs/.sphinx/requirements.txt index b6b495e..8779b8e 100644 --- a/docs/.sphinx/requirements.txt +++ b/docs/.sphinx/requirements.txt @@ -50,8 +50,6 @@ jinja2==3.1.2 # via # myst-parser # sphinx -linkify-it-py==1.0.3 - # via myst-parser markdown-it-py==2.2.0 # via # mdit-py-plugins @@ -62,7 +60,7 @@ mdit-py-plugins==0.3.5 # via myst-parser mdurl==0.1.2 # via markdown-it-py -myst-parser[linkify]==1.0.0 +myst-parser==1.0.0 # via rocm-docs-core packaging==23.0 # via @@ -94,7 +92,7 @@ requests==2.28.2 # via # pygithub # sphinx -rocm-docs-core==0.14.0 +rocm-docs-core==0.19.0 # via -r requirements.in smmap==5.0.0 # via gitdb @@ -137,8 +135,6 @@ sphinxcontrib-serializinghtml==1.1.5 # via sphinx typing-extensions==4.5.0 # via pydata-sphinx-theme -uc-micro-py==1.0.1 - # via linkify-it-py urllib3==1.26.15 # via requests wrapt==1.15.0 From 03a93186945de6d6c120eee9fb2f82a893076b3d Mon Sep 17 00:00:00 2001 From: Ajay Date: Tue, 18 Jul 2023 09:30:12 -0700 Subject: [PATCH 2/6] SWDEV-411709 - Bumping hip version to 5.7 --- bin/hipvars.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/hipvars.pm b/bin/hipvars.pm index c4b37d5..3b62ab7 100644 --- a/bin/hipvars.pm +++ b/bin/hipvars.pm @@ -26,7 +26,7 @@ use Cwd; use File::Basename; $HIP_BASE_VERSION_MAJOR = "5"; -$HIP_BASE_VERSION_MINOR = "5"; +$HIP_BASE_VERSION_MINOR = "7"; $HIP_BASE_VERSION_PATCH = "0"; #--- From 059152050592808e2dd40261158adffaa64573cb Mon Sep 17 00:00:00 2001 From: Ajay Date: Tue, 18 Jul 2023 12:19:21 -0700 Subject: [PATCH 3/6] SWDEV-411709 - hipvars fix path/filename for .hipVersion Linux file is named as 'version' in share/hip location Windows file is named as '.hipVersion' in bin location HIP Major/Minor values in hipcc needs to be revisisted since hipcc is moved to a seperate project. --- bin/hipvars.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/hipvars.pm b/bin/hipvars.pm index 3b62ab7..bc8b53e 100644 --- a/bin/hipvars.pm +++ b/bin/hipvars.pm @@ -154,7 +154,11 @@ if ($HIP_COMPILER eq "clang") { #--- # Read .hipVersion my %hipVersion = (); -parse_config_file("$hipvars::HIP_PATH/bin/.hipVersion", \%hipVersion); +if ($isWindows) { + parse_config_file("$hipvars::HIP_PATH/bin/.hipVersion", \%hipVersion); +} else { + parse_config_file("$hipvars::HIP_PATH/share/hip/version", \%hipVersion); +} $HIP_VERSION_MAJOR = $hipVersion{'HIP_VERSION_MAJOR'} // $HIP_BASE_VERSION_MAJOR; $HIP_VERSION_MINOR = $hipVersion{'HIP_VERSION_MINOR'} // $HIP_BASE_VERSION_MINOR; $HIP_VERSION_PATCH = $hipVersion{'HIP_VERSION_PATCH'} // $HIP_BASE_VERSION_PATCH; From 1915078945129ac45434f06bb009c430896a0bbd Mon Sep 17 00:00:00 2001 From: Konstantin Zhuravlyov Date: Thu, 20 Jul 2023 15:47:45 -0400 Subject: [PATCH 4/6] Cleanup existing double quote handling --- bin/hipcc.pl | 35 ++++++++++++++++++++++------------- bin/hipvars.pm | 6 +++++- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/bin/hipcc.pl b/bin/hipcc.pl index 90e2333..a70afd3 100755 --- a/bin/hipcc.pl +++ b/bin/hipcc.pl @@ -121,6 +121,7 @@ BEGIN use hipvars; $isWindows = $hipvars::isWindows; +$doubleQuote = $hipvars::doubleQuote; $HIP_RUNTIME = $hipvars::HIP_RUNTIME; $HIP_PLATFORM = $hipvars::HIP_PLATFORM; $HIP_COMPILER = $hipvars::HIP_COMPILER; @@ -131,6 +132,14 @@ BEGIN $HIP_VERSION = $hipvars::HIP_VERSION; $HIP_ROCCLR_HOME = $hipvars::HIP_ROCCLR_HOME; +sub get_normalized_path { + if ($isWindows) { + return $doubleQuote . $_[0] . $doubleQuote; + } else { + return $_[0]; + } +} + if ($HIP_PLATFORM eq "amd") { $HIP_INCLUDE_PATH = "$HIP_ROCCLR_HOME/include"; if (!defined $HIP_LIB_PATH) { @@ -155,17 +164,17 @@ BEGIN if($isWindows) { $execExtension = ".exe"; } - $HIPCC="\"$HIP_CLANG_PATH/clang++" . $execExtension . "\""; + $HIPCC=get_normalized_path("$HIP_CLANG_PATH/clang++" . $execExtension); # If $HIPCC clang++ is not compiled, use clang instead if ( ! -e $HIPCC ) { - $HIPCC="\"$HIP_CLANG_PATH/clang" . $execExtension . "\""; + $HIPCC=get_normalized_path("$HIP_CLANG_PATH/clang" . $execExtension); $HIPLDFLAGS = "--driver-mode=g++"; } # to avoid using dk linker or MSVC linker if($isWindows) { $HIPLDFLAGS .= " -fuse-ld=lld"; - $HIPLDFLAGS .= " --ld-path=\"$HIP_CLANG_PATH/lld-link.exe\""; + $HIPLDFLAGS .= " --ld-path=" . get_normalized_path("$HIP_CLANG_PATH/lld-link.exe"); } # get Clang RT Builtin path @@ -201,12 +210,12 @@ BEGIN print ("CUDA_PATH=$CUDA_PATH\n"); } - $HIPCC="\"$CUDA_PATH/bin/nvcc\""; + $HIPCC=get_normalized_path("$CUDA_PATH/bin/nvcc"); $HIPCXXFLAGS .= " -Wno-deprecated-gpu-targets "; - $HIPCXXFLAGS .= " -isystem \"$CUDA_PATH/include\""; - $HIPCFLAGS .= " -isystem \"$CUDA_PATH/include\""; + $HIPCXXFLAGS .= " -isystem " . get_normalized_path("$CUDA_PATH/include"); + $HIPCFLAGS .= " -isystem " . get_normalized_path("$CUDA_PATH/include"); - $HIPLDFLAGS = " -Wno-deprecated-gpu-targets -lcuda -lcudart -L\"$CUDA_PATH/lib64\""; + $HIPLDFLAGS = " -Wno-deprecated-gpu-targets -lcuda -lcudart -L" . get_normalized_path("$CUDA_PATH/lib64"); } else { printf ("error: unknown HIP_PLATFORM = '$HIP_PLATFORM'"); printf (" or HIP_COMPILER = '$HIP_COMPILER'"); @@ -214,8 +223,8 @@ BEGIN } # Add paths to common HIP includes: -$HIPCXXFLAGS .= " -isystem \"$HIP_INCLUDE_PATH\"" ; -$HIPCFLAGS .= " -isystem \"$HIP_INCLUDE_PATH\"" ; +$HIPCXXFLAGS .= " -isystem " . get_normalized_path("$HIP_INCLUDE_PATH"); +$HIPCFLAGS .= " -isystem " . get_normalized_path("$HIP_INCLUDE_PATH"); my $compileOnly = 0; my $needCXXFLAGS = 0; # need to add CXX flags to compile step @@ -294,7 +303,7 @@ BEGIN if ($skipOutputFile) { # TODO: handle filename with shell metacharacters - $toolArgs .= " \"$arg\""; + $toolArgs .= " " . get_normalized_path("$arg"); $prevArg = $arg; $skipOutputFile = 0; next; @@ -466,7 +475,7 @@ BEGIN if (not $isWindows and $escapeArg) { $arg =~ s/[^-a-zA-Z0-9_=+,.\/]/\\$&/g; } - $toolArgs .= " \"$arg\"" unless $swallowArg; + $toolArgs .= " " . get_normalized_path("$arg") unless $swallowArg; $prevArg = $arg; } @@ -561,14 +570,14 @@ BEGIN # If the HIP_PATH env var is defined, pass that path to Clang if ($ENV{'HIP_PATH'}) { - my $hip_path_flag = " --hip-path=\"$HIP_PATH\""; + my $hip_path_flag = " --hip-path=" . get_normalized_path("$HIP_PATH"); $HIPCXXFLAGS .= $hip_path_flag; $HIPLDFLAGS .= $hip_path_flag; } if ($hasHIP) { if (defined $DEVICE_LIB_PATH) { - $HIPCXXFLAGS .= " --hip-device-lib-path=\"$DEVICE_LIB_PATH\""; + $HIPCXXFLAGS .= " --hip-device-lib-path=" . get_normalized_path("$DEVICE_LIB_PATH"); } } diff --git a/bin/hipvars.pm b/bin/hipvars.pm index c4b37d5..ec0918e 100644 --- a/bin/hipvars.pm +++ b/bin/hipvars.pm @@ -61,6 +61,10 @@ sub can_run { } $isWindows = ($^O eq 'MSWin32' or $^O eq 'msys'); +$doubleQuote = ""; +if ($isWindows) { + $doubleQuote = "\""; +} # # TODO: Fix rpath LDFLAGS settings @@ -124,7 +128,7 @@ if (defined $HIP_RUNTIME and $HIP_RUNTIME eq "rocclr" and !defined $HIP_ROCCLR_H } if (not defined $HIP_PLATFORM) { - if (can_run("\"$HIP_CLANG_PATH/clang++\"") or can_run("clang++")) { + if (can_run($doubleQuote . "$HIP_CLANG_PATH/clang++" . $doubleQuote) or can_run("clang++")) { $HIP_PLATFORM = "amd"; } elsif (can_run("$CUDA_PATH/bin/nvcc") or can_run("nvcc")) { $HIP_PLATFORM = "nvidia"; From 15a3b8fb1c13d7c264c5fff37b83369e85170d0f Mon Sep 17 00:00:00 2001 From: Konstantin Zhuravlyov Date: Fri, 21 Jul 2023 12:24:57 -0400 Subject: [PATCH 5/6] Return double quote on linux + fix CUDA_PATH --- bin/hipcc.pl | 6 +----- bin/hipvars.pm | 11 ++++++----- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/bin/hipcc.pl b/bin/hipcc.pl index a70afd3..546cea7 100755 --- a/bin/hipcc.pl +++ b/bin/hipcc.pl @@ -133,11 +133,7 @@ BEGIN $HIP_ROCCLR_HOME = $hipvars::HIP_ROCCLR_HOME; sub get_normalized_path { - if ($isWindows) { - return $doubleQuote . $_[0] . $doubleQuote; - } else { - return $_[0]; - } + return $doubleQuote . $_[0] . $doubleQuote; } if ($HIP_PLATFORM eq "amd") { diff --git a/bin/hipvars.pm b/bin/hipvars.pm index ec0918e..c0eae86 100644 --- a/bin/hipvars.pm +++ b/bin/hipvars.pm @@ -61,10 +61,7 @@ sub can_run { } $isWindows = ($^O eq 'MSWin32' or $^O eq 'msys'); -$doubleQuote = ""; -if ($isWindows) { - $doubleQuote = "\""; -} +$doubleQuote = "\""; # # TODO: Fix rpath LDFLAGS settings @@ -90,6 +87,10 @@ if (-e "$HIP_PATH/bin/rocm_agent_enumerator") { $ROCM_PATH=$ENV{'ROCM_PATH'} // "/opt/rocm"; } $CUDA_PATH=$ENV{'CUDA_PATH'} // '/usr/local/cuda'; +if ($isWindows and defined $ENV{'CUDA_PATH'}) { + $CUDA_PATH =~ s/^"(.*)"$/$1/; + $CUDA_PATH =~ s/\\/\//g; +} # Windows/Distro's have a different structure, all binaries are with hipcc if ($isWindows or -e "$HIP_PATH/bin/clang") { @@ -130,7 +131,7 @@ if (defined $HIP_RUNTIME and $HIP_RUNTIME eq "rocclr" and !defined $HIP_ROCCLR_H if (not defined $HIP_PLATFORM) { if (can_run($doubleQuote . "$HIP_CLANG_PATH/clang++" . $doubleQuote) or can_run("clang++")) { $HIP_PLATFORM = "amd"; - } elsif (can_run("$CUDA_PATH/bin/nvcc") or can_run("nvcc")) { + } elsif (can_run($doubleQuote . "$CUDA_PATH/bin/nvcc" . $doubleQuote) or can_run("nvcc")) { $HIP_PLATFORM = "nvidia"; $HIP_COMPILER = "nvcc"; $HIP_RUNTIME = "cuda"; From ddf54b30e10db8cd4391765817e3fe531c139fea Mon Sep 17 00:00:00 2001 From: Konstantin Zhuravlyov Date: Wed, 26 Jul 2023 14:24:00 -0400 Subject: [PATCH 6/6] Don't normalize just the $arg --- bin/hipcc.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/hipcc.pl b/bin/hipcc.pl index 546cea7..1c11dfa 100755 --- a/bin/hipcc.pl +++ b/bin/hipcc.pl @@ -471,7 +471,7 @@ sub get_normalized_path { if (not $isWindows and $escapeArg) { $arg =~ s/[^-a-zA-Z0-9_=+,.\/]/\\$&/g; } - $toolArgs .= " " . get_normalized_path("$arg") unless $swallowArg; + $toolArgs .= " $arg" unless $swallowArg; $prevArg = $arg; }