Skip to content
Open
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
100 changes: 100 additions & 0 deletions .github/workflows/ci-riscv64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# Note: this runner is provided externally, so we minimize its access to
# secrets.
on:
push:
branches: [riscv]

pull_request_target:
types: [opened, synchronize, reopened]

name: CI (riscv64)

permissions:
contents: read
# No permissions to secrets.

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

# FIXME: Drop this
env:
RUSTFLAGS: -D warnings
CARGO_TERM_COLOR: always

jobs:
build:
name: Build and test
runs-on: [self-hosted, linux, amd64]
# This is in its own separate environment.
environment: riscv64
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 3000 # shadow clone?
ref: ${{ github.sha }} # including latest sha

- name: Extract PR info
run: |
echo "BASE_SHA=${{ github.event.pull_request.base.sha }}" >> $GITHUB_ENV
echo "HEAD_SHA=${{ github.event.pull_request.head.sha }}" >> GITHUB_ENV

- name: Diff base and head
run: |
if [[ "${{ github.event_name }}" = "pull_request" || "${{ github.event_name }}" == "pull_request_target" ]]; then
echo "Push PR build"
BASE_REF="${{ github.base_ref }}"
HEAD_REF="${{ github.head_ref }}"

echo "Base ref: $BASE_REF"
echo "Head ref: $HEAD_REF"

# 强约束: PR 必须基于 riscv
if [ "$BASE_REF" != "riscv" ]; then
echo "ERROR: PR must target 'riscv' branch, got '$BASE_REF'"
exit 1
fi

# need to get contents of the PR
git fetch --quiet origin pull/${{ github.event.pull_request.number }}/head:pr-head
git fetch --quiet origin main
BASE=$(git merge-base pr-head origin/main)
HEAD=$(git rev-parse pr-head)
else
echo "Push to riscv"
# 统一用 riscv 作为 baseline
git fetch --quiet origin main
#git fetch origin riscv

BASE=$(git merge-base ${{ github.sha }} origin/main) # The latest commit
HEAD=${{ github.sha }}

fi

echo "BASE_COMMIT=$BASE" >> $GITHUB_ENV
echo "HEAD_COMMIT=$HEAD" >> $GITHUB_ENV

echo "Base: $BASE"
echo "Head: $HEAD"

- name: Generate patch
run: |
echo "Generating patch..."

SHORT_HEAD=${HEAD_COMMIT:0:7}
PATCH_NAME="patch_${SHORT_HEAD}.patch"

git diff $BASE_COMMIT $HEAD_COMMIT > $PATCH_NAME

echo "Patch size:"
wc -l $PATCH_NAME

cp $PATCH_NAME /home/jenkins/patch/
cat /home/jenkins/patch/$PATCH_NAME

echo "PATCH_FILE=$PATCH_NAME" >> $GITHUB_ENV

- name: Trigger Jenkins Job
run: |
bash /home/jenkins/scripts/jenkins-run.sh $BASE_COMMIT $PATCH_FILE
12 changes: 12 additions & 0 deletions aten/src/ATen/native/quantized/cpu/conv_serialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,18 @@ c10::intrusive_ptr<ConvPackedParamsBase<kSpatialDim>> deserialize_conv(
);
}
#endif // AT_MKLDNN_ENABLED()
if (ctx.qEngine() == at::QEngine::NoQEngine) {
return PackedConvWeightNoQEngine<kSpatialDim>::prepack(
std::move(weight.value()),
std::move(bias),
stride,
padding,
output_padding,
dilation,
groups,
transpose
);
}
TORCH_CHECK(
false,
"Didn't find engine for when deserializing ConvPackedParams: ",
Expand Down
Loading