nswamy closed pull request #12826: Fixed regex for matching platform type in 
Scala Benchmark scripts
URL: https://github.com/apache/incubator-mxnet/pull/12826
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/scala-package/examples/scripts/benchmark/run_image_inference_bm.sh 
b/scala-package/examples/scripts/benchmark/run_image_inference_bm.sh
index 82aa9f62234..b647bdf8c6b 100755
--- a/scala-package/examples/scripts/benchmark/run_image_inference_bm.sh
+++ b/scala-package/examples/scripts/benchmark/run_image_inference_bm.sh
@@ -22,14 +22,14 @@ set -e
 echo $OSTYPE
 
 hw_type=cpu
-if [ "$1" = "gpu" ]
+if [[ $1 = gpu ]]
 then
     hw_type=gpu
 fi
 
 platform=linux-x86_64
 
-if [ "$OSTYPE" == "darwin"* ]
+if [[ $OSTYPE = [darwin]* ]]
 then
     platform=osx-x86_64
 fi
diff --git a/scala-package/examples/scripts/benchmark/run_text_charrnn_bm.sh 
b/scala-package/examples/scripts/benchmark/run_text_charrnn_bm.sh
index d2c1ee60d41..bf6b7b314e7 100755
--- a/scala-package/examples/scripts/benchmark/run_text_charrnn_bm.sh
+++ b/scala-package/examples/scripts/benchmark/run_text_charrnn_bm.sh
@@ -19,19 +19,22 @@
 
 set -e
 
+echo $OSTYPE
+
 hw_type=cpu
-if [ "$1" = "gpu" ]
+if [[ $1 = gpu ]]
 then
     hw_type=gpu
 fi
 
 platform=linux-x86_64
 
-if [ "$OSTYPE" == "darwin"* ]
+if [[ $OSTYPE = [darwin]* ]]
 then
     platform=osx-x86_64
 fi
 
+
 MXNET_ROOT=$(cd "$(dirname $0)/../../../.."; pwd)
 
CLASS_PATH=$MXNET_ROOT/scala-package/assembly/$platform-$hw_type/target/*:$MXNET_ROOT/scala-package/examples/target/*:$MXNET_ROOT/scala-package/examples/target/classes/lib/*:$MXNET_ROOT/scala-package/infer/target/*
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to