Skip to content

Commit 87e68ae

Browse files
committed
cleanup + another way
Signed-off-by: Anatoly Myachev <[email protected]>
1 parent 9f4bacf commit 87e68ae

File tree

6 files changed

+14
-18
lines changed

6 files changed

+14
-18
lines changed

.github/pins/pytorch.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3560b8ebe9277e8c25335e35d8c9e0872052b2dc
1+
29e6033ff38f0deb8dde1146a1612e64ed00e3b7

.github/workflows/e2e-reusable.yml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -203,22 +203,9 @@ jobs:
203203
if: ${{ inputs.suite == 'torchbench' }}
204204
run: |
205205
cd benchmark
206-
if [[ "${{ inputs.only_one_model }}" ]]; then
207-
python install.py "${{ inputs.only_one_model }}"
208-
else
209-
# install all models
210-
python install.py
211-
fi
206+
python install.py
212207
pip install -e .
213208
214-
- name: Install torchvision package from PyTorch wheel
215-
if: ${{ inputs.suite == 'timm_models' || inputs.suite == 'torchbench' }}
216-
shell: bash
217-
run: |
218-
source /opt/intel/oneapi/setvars.sh
219-
pip install --no-deps torchvision==0.22.0.dev20250525+xpu --pre --index-url https://download.pytorch.org/whl/nightly/xpu
220-
python -c "import torchvision; print(torchvision.__version__)"
221-
222209
- name: Run e2e ${{ inputs.test_mode }} tests
223210
env:
224211
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }}

scripts/inductor_xpu_test.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,11 @@ if (( $EUID == 0 )); then
5151
ulimit -n 1048576
5252
fi
5353

54-
python benchmarks/dynamo/torchbench.py --accuracy --float32 -d xpu -n10 --inference --only detectron2_fasterrcnn_r_50_fpn --backend=inductor --cold-start-latency --disable-cudagraphs
54+
if [[ $DT == "amp_bf16" ]]; then
55+
ZE_AFFINITY_MASK=${CARD} python benchmarks/dynamo/${SUITE}.py --${SCENARIO} --amp -d${DEVICE} -n10 --no-skip --dashboard ${Mode_extra} ${Shape_extra} ${partition_flags} ${Model_only_extra} --backend=inductor --timeout=4800 --output=${LOG_DIR}/${LOG_NAME}.csv 2>&1 | tee ${LOG_DIR}/${LOG_NAME}.log
56+
elif [[ $DT == "amp_fp16" ]]; then
57+
export INDUCTOR_AMP_DT=float16
58+
ZE_AFFINITY_MASK=${CARD} python benchmarks/dynamo/${SUITE}.py --${SCENARIO} --amp -d${DEVICE} -n10 --no-skip --dashboard ${Mode_extra} ${Shape_extra} ${partition_flags} ${Model_only_extra} --backend=inductor --timeout=4800 --output=${LOG_DIR}/${LOG_NAME}.csv 2>&1 | tee ${LOG_DIR}/${LOG_NAME}.log
59+
else
60+
ZE_AFFINITY_MASK=${CARD} python benchmarks/dynamo/${SUITE}.py --${SCENARIO} --${DT} -d${DEVICE} -n10 --no-skip --dashboard ${Mode_extra} ${Shape_extra} ${partition_flags} ${Model_only_extra} --backend=inductor --timeout=4800 --output=${LOG_DIR}/${LOG_NAME}.csv 2>&1 | tee ${LOG_DIR}/${LOG_NAME}.log
61+
fi

scripts/patch-pytorch.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@ apply_patch() {
3535
echo "Applying PyTorch patches in $REPO_ROOT"
3636

3737
# put your patch applies here
38+
apply_patch https://github.com/pytorch/pytorch/pull/143553.diff

third_party/intel/lib/Target/SPIRV/SPIRVTranslation.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,14 @@ class SmallVectorBuffer : public std::streambuf {
107107

108108
static SPIRV::TranslatorOpts getSPIRVOpts() {
109109
SPIRV::TranslatorOpts SPIRVOpts{SPIRV::VersionNumber::SPIRV_1_4};
110-
static constexpr std::array<SPIRV::ExtensionID, 17> AllowedExtensions{
110+
static constexpr std::array<SPIRV::ExtensionID, 18> AllowedExtensions{
111111
SPIRV::ExtensionID::SPV_EXT_shader_atomic_float_add,
112112
SPIRV::ExtensionID::SPV_INTEL_2d_block_io,
113113
SPIRV::ExtensionID::SPV_INTEL_arbitrary_precision_integers,
114114
SPIRV::ExtensionID::SPV_INTEL_arithmetic_fence,
115115
SPIRV::ExtensionID::SPV_INTEL_bfloat16_conversion,
116116
SPIRV::ExtensionID::SPV_INTEL_cache_controls,
117+
SPIRV::ExtensionID::SPV_INTEL_fp_fast_math_mode,
117118
SPIRV::ExtensionID::SPV_INTEL_inline_assembly,
118119
SPIRV::ExtensionID::SPV_INTEL_kernel_attributes,
119120
SPIRV::ExtensionID::SPV_INTEL_memory_access_aliasing,

third_party/intel/triton_xpu.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ void init_triton_intel(py::module &&m) {
293293
if (auto *op = dyn_cast<FPMathOperator>(&inst)) {
294294
FastMathFlags FMF;
295295
// Default to allow contract when default fp fusion is not disabled.
296-
if ((!enableFpFusion.has_value() || enableFpFusion.value()) &&
296+
if ((enableFpFusion.has_value() && enableFpFusion.value()) &&
297297
!fastMath.has_value()) {
298298
if (op->getOpcode() == Instruction::FAdd ||
299299
op->getOpcode() == Instruction::FMul)

0 commit comments

Comments
 (0)