-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix L0_backend_python iGPU PyTorch installation #7231
Conversation
@fpetrini15 I couldn't get the Windows build to work. Do you see any concern on Windows test using one square bracket comparison instead of two? i.e. (The Jetson comparison is comparing a string, while the Windows comparison is comparing an integer) |
@kthui good catch on the incorrect logical operator! With respect to the brackets, I believe the guidance is to use the double bracket notation whenever possible. For example, if we have the following script where #!/bin/bash
TEST_JETSON=
if [[ $TEST_JETSON == "0" ]]; then
echo "FLAG equals 0"
else
echo "FLAG does not equal 0"
fi Will correctly evaluate to the With single brackets: #!/bin/bash
TEST_JETSON=
if [ $TEST_JETSON == "0" ]; then
echo "FLAG equals 0"
else
echo "FLAG does not equal 0"
fi We will get the error: I know this is assuming layers of mistakes made by a developer, but I believe the double-bracket is still best-practice. Additionally, though All that said, as it relates to your original question, I see no issue, though it would probably be more correct to use the |
@fpetrini15 thanks for checking it on Windows! I have no issue moving everything to double bracket, as long as it doesn't backfire on us. On your single bracket case, if you double quote the
The double quote variant is what is used on the test script and it is already passing on the CI. I don't thinks this will become an issue on the test on x86 in the future. Do you think it is ok to keep the single bracket for the |
@kthui you are correct. If you add quotes to the variable there is no issue. In general, I understand there is no issue now, but I believe it is an additional safeguard for the future. Just something I wanted to start a discussion about. Either way, not important enough to hold up this PR/release. You can merge when ready! 🚀 |
Thanks @kthui for the quick fix! |
* Fix TEST_JETSON double square bracket issue * Use and instead of or
Before the fix, the test was comparing
for
After the fix, the comparison is restored to
Also fix a comparison logic error in using
||
and&&
, beforeafter