Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/_IXUCA.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ jobs:
mkdir -p PaddleCustomDevice/Paddle/third_party/mklml/Linux
curl -o PaddleCustomDevice/Paddle/third_party/mklml/Linux/csrmm_mklml_lnx_2019.0.5.tgz http://paddlepaddledeps.bj.bcebos.com/csrmm_mklml_lnx_2019.0.5.tgz
tar xf PaddleCustomDevice/Paddle/third_party/mklml/Linux/csrmm_mklml_lnx_2019.0.5.tgz
pip uninstall -y paddlepaddle
python3 -m pip install --pre paddlepaddle -i https://www.paddlepaddle.org.cn/packages/nightly/cpu/
pip show paddlepaddle
python3 -m pip install parameterized
Expand Down
2 changes: 1 addition & 1 deletion Paddle
Submodule Paddle updated 471 files
23 changes: 14 additions & 9 deletions backends/iluvatar_gpu/build_paddle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# Exit immediately if a command exits with a non-zero status
set -e

PYTHON_VERSION=${PYTHON_VERSION:-$(python3 -V 2>&1|awk '{print $2}')}
COREX_VERSION=${COREX_VERSION:-latest}
if [[ "${COREX_VERSION}" == "latest" ]]; then
Expand All @@ -36,7 +39,7 @@ else
WITH_FLAGCX="OFF"
fi

bash clean_paddle.sh
bash clean_paddle.sh || { echo "Error: Failed to clean paddle!"; exit 1; }

pushd "${CURRENT_DIR}/../.."
git submodule update --init --recursive --force
Expand All @@ -49,13 +52,13 @@ if ! git -C "$PADDLE_SOURCE_DIR" apply --reverse --check "$PATCH_FILE" > /dev/nu
fi
echo "Patch applied successfully!"
fi
cp -r ${CURRENT_DIR}/patches/eigen/Core ../../Paddle/third_party/eigen3/Eigen/Core
cp -r ${CURRENT_DIR}/patches/eigen/Tensor ../../Paddle/third_party/eigen3/unsupported/Eigen/CXX11/Tensor
cp -r ${CURRENT_DIR}/patches/eigen/TensorAssign.h ../../Paddle/third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorAssign.h
cp -r ${CURRENT_DIR}/patches/eigen/Core ../../Paddle/third_party/eigen3/Eigen/Core || { echo "Error: Failed to copy eigen Core!"; exit 1; }
cp -r ${CURRENT_DIR}/patches/eigen/Tensor ../../Paddle/third_party/eigen3/unsupported/Eigen/CXX11/Tensor || { echo "Error: Failed to copy eigen Tensor!"; exit 1; }
cp -r ${CURRENT_DIR}/patches/eigen/TensorAssign.h ../../Paddle/third_party/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorAssign.h || { echo "Error: Failed to copy eigen TensorAssign.h!"; exit 1; }

pushd ${PADDLE_SOURCE_DIR}/paddle/phi/core
if [[ ! -f "external_error.pb.cc" || ! -f "external_error.pb.h" ]]; then
protoc --cpp_out=. external_error.proto
protoc --cpp_out=. external_error.proto || { echo "Error: Failed to generate protobuf files!"; exit 1; }
fi
popd

Expand All @@ -78,15 +81,17 @@ popd
if [[ ! -d "build_pip" ]]; then
mkdir build_pip
fi
cp build/dist/* build_pip
cp build/dist/* build_pip || { echo "Error: Failed to copy build artifacts!"; exit 1; }

if git -C "$PADDLE_SOURCE_DIR" apply --reverse --check "$PATCH_FILE" > /dev/null 2>&1; then
git -C "$PADDLE_SOURCE_DIR" apply --reverse "$PATCH_FILE"
git -C "$PADDLE_SOURCE_DIR" apply --reverse "$PATCH_FILE" || { echo "Error: Failed to revert patch!"; exit 1; }
echo "Patch successfully reverted!"
fi

pushd ${PADDLE_SOURCE_DIR}/third_party/eigen3
git reset --hard
git reset --hard || { echo "Error: Failed to reset eigen repository!"; exit 1; }
popd

exit 0
# Script will exit with the status of the last command
# If all commands succeeded, it will exit with 0
# If any command failed, it will have already exited with 1
2 changes: 1 addition & 1 deletion backends/iluvatar_gpu/patches/paddle-corex.patch
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ index 411ee4510c..36c2f8fba7 100644
--- a/paddle/phi/kernels/gpu/elementwise_grad.h
+++ b/paddle/phi/kernels/gpu/elementwise_grad.h
@@ -352,7 +352,11 @@ void ElementwiseAddGrad(const GPUContext &dev_ctx,
phi::Copy(dev_ctx, dout, dev_ctx.GetPlace(), false, dx);
Copy(dev_ctx, dout, dev_ctx.GetPlace(), false, dx);
} else if (dx_data != dout_data && dy_data != dout_data) {
auto size = x.numel();
+#ifdef PADDLE_WITH_COREX
Expand Down
Loading