Repository navigation
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces ROCm (AMD GPU) detection to the installation script, allowing for the correct PyTorch index URL to be used when CUDA is not detected. Additionally, it updates the PyTorch version range and ensures unsloth installation includes the torch index as an extra index URL. A portability issue was found in the ROCm version parsing logic, where the use of Bash-specific herestrings in a POSIX shell script could cause failures on certain Linux distributions.
I am having trouble creating individual review comments. Click here to see my feedback.
install.sh (748-749)
The herestring operator (<<<) is a Bash-specific extension and is not supported by POSIX-compliant shells like dash, which is the default /bin/sh on many Linux distributions (including Ubuntu and Debian). Using it in a script with a #!/bin/sh shebang will cause a syntax error. To maintain portability, use printf and a pipe instead.
{ command -v dpkg-query >/dev/null 2>&1 && ver="$(dpkg-query -W -f="\${Version}\n" rocm-core 2>/dev/null)" && [ -n "$ver" ] && printf '%s\n' "$ver" | awk -F'[.-]' '{print "rocm"$1"."$2; exit}'; } || \
{ command -v rpm >/dev/null 2>&1 && ver="$(rpm -q --qf '%{VERSION}\n' rocm-core 2>/dev/null)" && [ -n "$ver" ] && printf '%s\n' "$ver" | awk -F'[.-]' '{print "rocm"$1"."$2; exit}'; })
|
Hey @edamamez thanks for the contribution. |
|
Actually nvm, we can take that up separately :) |
No description provided.