PHILO-HE commented on code in PR #10647:
URL:
https://github.com/apache/incubator-gluten/pull/10647#discussion_r2389773544
##########
ep/build-velox/src/get_velox.sh:
##########
@@ -242,8 +229,16 @@ if [[ "$RUN_SETUP_SCRIPT" == "ON" ]]; then
echo "Unsupported kernel: $OS"
exit 1
fi
+}
+
+prepare_velox_source_code
+
+if [[ "$RUN_SETUP_SCRIPT" == "ON" ]]; then
+ apply_setup_fixes
fi
-apply_compilation_fixes $CURRENT_DIR $VELOX_SOURCE_DIR
+apply_provided_velox_patch "$VELOX_SOURCE_DIR"
+
+apply_compilation_fixes "$CURRENT_DIR" "$VELOX_SOURCE_DIR"
Review Comment:
Ditto. $CURRENT_DIR is accessible inside the function.
##########
ep/build-velox/src/get_velox.sh:
##########
@@ -62,18 +62,15 @@ for arg in "$@"; do
esac
done
-function ensure_pattern_matched {
- if [ $# -ne 2 ]; then
- echo "Exactly 2 arguments are required."
- return 1
- fi
- pattern=$1
- file=$2
- matched_lines=$(grep -c "$pattern" $file)
- if [ $matched_lines -eq 0 ]; then
- return 1
- fi
-}
+CURRENT_DIR=$(
+ cd "$(dirname "$BASH_SOURCE")"
+ pwd
+)
+
+if [ "$VELOX_HOME" == "" ]; then
+ VELOX_HOME="$CURRENT_DIR/../build/velox_ep"
+fi
+VELOX_SOURCE_DIR="${VELOX_HOME}"
Review Comment:
It seems not necessary to define `VELOX_SOURCE_DIR`.
##########
ep/build-velox/src/get_velox.sh:
##########
@@ -242,8 +229,16 @@ if [[ "$RUN_SETUP_SCRIPT" == "ON" ]]; then
echo "Unsupported kernel: $OS"
exit 1
fi
+}
+
+prepare_velox_source_code
+
+if [[ "$RUN_SETUP_SCRIPT" == "ON" ]]; then
+ apply_setup_fixes
fi
-apply_compilation_fixes $CURRENT_DIR $VELOX_SOURCE_DIR
+apply_provided_velox_patch "$VELOX_SOURCE_DIR"
Review Comment:
VELOX_HOME is a basic global variable. I think we can just access it inside
the function instead of passing the arg.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]