Skip to content

Commit 37e6160

Browse files
committed
Update on "[ET-VK][Ops] aten.convolution (Transpose)"
## Summary (cases handled) We introduce support for the convolution cases covered by ATen-VK's transpose implementation. This is achieved by - reusing the existing [`conv_transpose2d.glsl`](https://github.com/pytorch/pytorch/blob/09c72eaa3f69f90402c86a30abf4fc621298578c/aten/src/ATen/native/vulkan/glsl/conv_transpose2d.glsl), and - [moving special weights prepacking from CPU](https://github.com/pytorch/pytorch/blob/09c72eaa3f69f90402c86a30abf4fc621298578c/aten/src/ATen/native/vulkan/ops/Convolution.cpp#L134-L235) to the GPU in `conv_transpose2d_prepack_weights.glsl`. We also include resizing support for dynamic shapes. Note that only height and width of the input can vary. ## Cases not handled The implementation is on-par with ATen-VK's Transpose. This means the following cases are missing: 1. **Groups G > 1.** 2. **Batch (input) N > 1.** 3. **Dilation > 1.** Differential Revision: [D55667336](https://our.internmc.facebook.com/intern/diff/D55667336/) [ghstack-poisoned]
2 parents 5d222e8 + e54e74b commit 37e6160

File tree

144 files changed

+3750
-3414
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+3750
-3414
lines changed

.ci/docker/ci_commit_pins/pytorch.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
a52b4e22571507abc35c2d47de138497190d2e0a
1+
0a038cf0cff2d071b7359ac0491fd2ba7798a438

.ci/scripts/test_llama.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ EXPORTED_MODEL_NAME="${EXPORTED_MODEL_NAME}.pte"
118118
echo "Exporting ${EXPORTED_MODEL_NAME}"
119119
EXPORT_ARGS="-c stories110M.pt -p ${PARAMS} -d ${DTYPE} -n ${EXPORTED_MODEL_NAME}"
120120
if [[ "${MODE}" == "xnnpack" ]]; then
121-
EXPORT_ARGS="${EXPORT_ARGS} --pt2e_quantize xnnpack_dynamic"
121+
EXPORT_ARGS="${EXPORT_ARGS} -kv --use_sdpa_with_kv_cache -X -qmode 8da4w -G 128"
122122
fi
123123
$PYTHON_EXECUTABLE -m examples.models.llama2.export_llama ${EXPORT_ARGS}
124124

.github/workflows/_unittest.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
# Setup MacOS dependencies as there is no Docker support on MacOS atm
3838
PYTHON_EXECUTABLE=python \
3939
EXECUTORCH_BUILD_PYBIND=ON \
40+
EXECUTORCH_BUILD_XNNPACK=ON \
4041
.ci/scripts/setup-linux.sh "${BUILD_TOOL}"
4142
4243
# Run pytest with coverage

.github/workflows/apple.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,17 @@ jobs:
100100
zip -r "${RUNNER_TEMP}/artifacts/${FRAMEWORK}-${VERSION}.zip" "${FRAMEWORK}.xcframework"
101101
) done
102102
103+
# Build Debug iOS Frameworks
104+
PYTHON_EXECUTABLE=python ${CONDA_RUN} --no-capture-output \
105+
build/build_apple_frameworks.sh --coreml --custom --mps --optimized --portable --quantized --xnnpack --Debug
106+
107+
# Bundle Debug iOS Frameworks
108+
for FRAMEWORK in "${FRAMEWORKS[@]}"; do (
109+
cd cmake-out && \
110+
mv "${FRAMEWORK}.xcframework" "${FRAMEWORK}_debug.xcframework" && \
111+
zip -r "${RUNNER_TEMP}/artifacts/${FRAMEWORK}_debug-${VERSION}.zip" "${FRAMEWORK}_debug.xcframework"
112+
) done
113+
103114
popd
104115
105116
upload-frameworks-ios:
@@ -146,5 +157,6 @@ jobs:
146157
147158
for FILENAME in "${RUNNER_TEMP}"/frameworks-ios/*.zip; do
148159
[ -e "${FILENAME}" ] || continue
160+
shasum -a 256 "${FILENAME}"
149161
${AWS_CMD} "${FILENAME}" s3://ossci-ios/executorch/ --acl public-read
150162
done

.github/workflows/pull.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ jobs:
232232
# build module for executorch.extension.pybindings.portable_lib
233233
BUILD_TOOL=${{ matrix.build-tool }}
234234
PYTHON_EXECUTABLE=python \
235+
EXECUTORCH_BUILD_XNNPACK=ON \
235236
EXECUTORCH_BUILD_PYBIND=ON \
236237
bash .ci/scripts/setup-linux.sh "${BUILD_TOOL}"
237238

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@
3737
[submodule "third-party/flatcc"]
3838
path = third-party/flatcc
3939
url = https://github.com/dvidelabs/flatcc.git
40-
[submodule "examples/third-party/llama"]
41-
path = examples/third-party/llama
42-
url = https://github.com/facebookresearch/llama.git
4340
[submodule "examples/third-party/fbjni"]
4441
path = examples/third-party/fbjni
4542
url = https://github.com/facebookincubator/fbjni.git

.swift/coreml_backend_debug/dummy.swift

Whitespace-only changes.

.swift/custom_backend_debug/dummy.swift

Whitespace-only changes.

.swift/executorch_debug/dummy.swift

Whitespace-only changes.

.swift/mps_backend_debug/dummy.swift

Whitespace-only changes.

0 commit comments

Comments
 (0)