Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
fd39036
Add pytest-timeout to unit test scripts for improved timeout handling
XuehaoSun Aug 6, 2026
6261dab
Add duration tracking to pytest commands and increase timeout for spe…
XuehaoSun Aug 6, 2026
84a1869
Add disable_opt_rtn parameter to quantization in TestAutoRoundFP
XuehaoSun Aug 6, 2026
aefe6af
Add COVERAGE_CORE=sysmon to pytest commands for improved coverage tra…
XuehaoSun Aug 6, 2026
32b1088
Update pytest duration settings to enforce minimum duration for test …
XuehaoSun Aug 6, 2026
0b44106
Add timeout markers to various test cases for improved stability
XuehaoSun Aug 6, 2026
272dfee
Remove session timeout and default timeout from pytest commands in un…
XuehaoSun Aug 6, 2026
3f04d7c
Add timeout markers to various test cases for improved stability
XuehaoSun Aug 6, 2026
d6c556b
Increase timeout values for various tests to enhance stability and pr…
XuehaoSun Aug 7, 2026
ef0f569
Increase timeout values for various tests to improve stability and pr…
XuehaoSun Aug 7, 2026
a90e075
Refactor CLI test execution to use in-process calls for improved cove…
XuehaoSun Aug 7, 2026
1a7ff8b
Increase timeout values for various tests to enhance stability and pr…
XuehaoSun Aug 7, 2026
f7165f9
Increase timeout values for specific tests to enhance stability and p…
XuehaoSun Aug 7, 2026
dc9115d
Skip CI for time-consuming tests and adjust timeout values for improv…
XuehaoSun Aug 7, 2026
9b5f69b
Add CI markers and timeout guidelines for long-running tests in README
XuehaoSun Aug 7, 2026
ec6179f
Add timeout marker for mixed MXFP autoround format loading test
XuehaoSun Aug 7, 2026
6f7cf66
Merge branch 'main' into xuehao/timeout
XuehaoSun Aug 7, 2026
8691098
Remove redundant 'disable_opt_rtn' parameter in quantization call
XuehaoSun Aug 7, 2026
de0bddb
Increase timeout for AWQ MoE quantized layers check and add timeout f…
XuehaoSun Aug 7, 2026
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
28 changes: 20 additions & 8 deletions .azure-pipelines/scripts/cuda_unit_test/run_cuda_ut.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function run_unit_test() {
uv pip install -r test/unit/test_cuda/requirements.txt
uv pip install -r test/unit/test_cuda/requirements_diffusion.txt
uv pip install -U transformers chardet
uv pip install -U pytest-cov
uv pip install -U pytest-cov pytest-timeout
uv pip install kernels==0.15.2 # For sm120: https://github.com/huggingface/transformers/blob/v5.13.1/setup.py#L93
uv pip uninstall torch torchvision
uv pip install torch==2.13.0 torchvision torchao --index-url https://download.pytorch.org/whl/cu130
Expand Down Expand Up @@ -100,7 +100,10 @@ function run_unit_test() {
local test_basename=$(basename ${test_file} .py)
local ut_log_name=${LOG_DIR}/unittest_cuda_${test_basename}.log

pytest -m "not skip_ci" --cov=auto_round --cov-report= --cov-append -vs --disable-warnings --junitxml="${ut_log_name%.log}.xml" ${test_file} 2>&1 | tee ${ut_log_name}
COVERAGE_CORE=sysmon pytest -m "not skip_ci" \
--cov=auto_round --cov-report= --cov-append --timeout=60 --session-timeout=720 \
-vs --disable-warnings --durations=0 --durations-min=1 --junitxml="${ut_log_name%.log}.xml" \
${test_file} 2>&1 | tee ${ut_log_name}
echo "##[endgroup]"
done
[ -f .coverage ] && cp .coverage "${LOG_DIR}/.coverage.part${test_part}"
Expand All @@ -113,7 +116,7 @@ function run_unit_test_llmc() {
cd "${BUILD_SOURCESDIRECTORY}" || exit 1
rm -rf /root/.venv
uv venv --python=3.12 /root/.venv
uv pip install -U pytest-cov
uv pip install -U pytest-cov pytest-timeout
BUILD_TYPE="nightly" uv pip install \
-r test/integration/test_cuda/requirements_llmc.txt \
--extra-index-url https://download.pytorch.org/whl/cu130 \
Expand All @@ -131,7 +134,10 @@ function run_unit_test_llmc() {
echo "##[group]Running ${test_file}..."
local test_basename=$(basename ${test_file} .py)
local ut_log_name=${LOG_DIR}/unittest_cuda_llmc_${test_basename}.log
pytest -m "not skip_ci" --cov=auto_round --cov-report= --cov-append -vs --disable-warnings --junitxml="${ut_log_name%.log}.xml" ${test_file} 2>&1 | tee ${ut_log_name}
COVERAGE_CORE=sysmon pytest -m "not skip_ci" \
--cov=auto_round --cov-report= --cov-append -vs --disable-warnings \
--durations=0 --durations-min=1 --junitxml="${ut_log_name%.log}.xml" \
${test_file} 2>&1 | tee ${ut_log_name}
echo "##[endgroup]"
done
[ -f .coverage ] && cp .coverage "${LOG_DIR}/.coverage.llmc"
Expand All @@ -144,7 +150,7 @@ function run_unit_test_sglang() {
cd "${BUILD_SOURCESDIRECTORY}" || exit 1
rm -rf /root/.venv
uv venv --python=3.12 /root/.venv
uv pip install -U pytest-cov
uv pip install -U pytest-cov pytest-timeout
uv pip install -r test/integration/test_cuda/requirements_sglang.txt \
--prerelease=allow \
--extra-index-url https://download.pytorch.org/whl/cu130 \
Expand All @@ -162,7 +168,10 @@ function run_unit_test_sglang() {
echo "##[group]Running ${test_file}..."
local test_basename=$(basename ${test_file} .py)
local ut_log_name=${LOG_DIR}/unittest_cuda_sglang_${test_basename}.log
pytest -m "not skip_ci" --cov=auto_round --cov-report= --cov-append -vs --disable-warnings --junitxml="${ut_log_name%.log}.xml" ${test_file} 2>&1 | tee ${ut_log_name}
COVERAGE_CORE=sysmon pytest -m "not skip_ci" \
--cov=auto_round --cov-report= --cov-append -vs --disable-warnings \
--durations=0 --durations-min=1 --junitxml="${ut_log_name%.log}.xml" \
${test_file} 2>&1 | tee ${ut_log_name}
echo "##[endgroup]"
done
[ -f .coverage ] && cp .coverage "${LOG_DIR}/.coverage.sglang"
Expand All @@ -175,7 +184,7 @@ function run_unit_test_vllm() {
cd "${BUILD_SOURCESDIRECTORY}" || exit 1
rm -rf /root/.venv
uv venv --python=3.12 /root/.venv
uv pip install -U pytest-cov
uv pip install -U pytest-cov pytest-timeout
uv pip install -r test/integration/test_cuda/requirements_vllm.txt \
--extra-index-url https://download.pytorch.org/whl/cu130 \
--index-strategy unsafe-best-match
Expand All @@ -193,7 +202,10 @@ function run_unit_test_vllm() {
echo "##[group]Running ${test_file}..."
local test_basename=$(basename ${test_file} .py)
local ut_log_name=${LOG_DIR}/unittest_cuda_vllm_${test_basename}.log
pytest -m "not skip_ci" --cov=auto_round --cov-report= --cov-append -vs --disable-warnings --junitxml="${ut_log_name%.log}.xml" ${test_file} 2>&1 | tee ${ut_log_name}
COVERAGE_CORE=sysmon pytest -m "not skip_ci" \
--cov=auto_round --cov-report= --cov-append -vs --disable-warnings \
--durations=0 --durations-min=1 --junitxml="${ut_log_name%.log}.xml" \
${test_file} 2>&1 | tee ${ut_log_name}
echo "##[endgroup]"
done
[ -f .coverage ] && cp .coverage "${LOG_DIR}/.coverage.vllm"
Expand Down
2 changes: 1 addition & 1 deletion .azure-pipelines/scripts/ut/run_ark_ut.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function run_unit_test() {

echo "##[group]Running ark ${test_file}..."
local ut_log_name="${LOG_DIR}/unittest_ark_${test_basename}.log"
pytest -v ${test_file} 2>&1 | tee ${ut_log_name}
COVERAGE_CORE=sysmon pytest -v ${test_file} 2>&1 | tee ${ut_log_name}
echo "##[endgroup]"
done
}
Expand Down
25 changes: 16 additions & 9 deletions .azure-pipelines/scripts/ut/run_ut.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function setup_environment() {
git clone -b master --quiet --single-branch https://github.com/ggml-org/llama.cpp.git && cd llama.cpp/gguf-py && uv pip install .

# install unit report dependencies
uv pip install pytest-cov
uv pip install pytest-cov pytest-timeout
uv pip install -U chardet
uv pip list

Expand Down Expand Up @@ -90,8 +90,9 @@ function run_unit_test() {
local test_basename=$(basename ${test_file} .py)
local ut_log_name=${LOG_DIR}/unittest_${test_basename}.log

numactl --physcpubind="${NUMA_CPUSET:-0-15}" --membind="${NUMA_NODE:-0}" \
pytest --cov=auto_round --cov-report= --cov-append \
COVERAGE_CORE=sysmon numactl --physcpubind="${NUMA_CPUSET:-0-15}" --membind="${NUMA_NODE:-0}" \
pytest -m "not skip_ci" --timeout=30 --session-timeout=600 --durations=0 --durations-min=1 \
--cov=auto_round --cov-report= --cov-append \
-vs --disable-warnings --junitxml="${ut_log_name%.log}.xml" ${test_file} 2>&1 | tee ${ut_log_name}
echo "##[endgroup]"
done
Expand All @@ -102,15 +103,16 @@ function run_inc_unit_test() {
INC_PT_ONLY=1 uv pip install -r /auto-round/test/integration/test_cpu/requirements_inc.txt --extra-index-url https://download.pytorch.org/whl/cpu
echo "##[endgroup]"

cd /auto-round/test || exit 1
cd /auto-round/test/integration || exit 1

for test_file in $(find ./test_cpu -name "test_inc*.py" | sort); do
echo "##[group]Running ${test_file}..."
local test_basename=$(basename ${test_file} .py)
local ut_log_name=${LOG_DIR}/unittest_${test_basename}.log

numactl --physcpubind="${NUMA_CPUSET:-0-15}" --membind="${NUMA_NODE:-0}" \
pytest --cov=auto_round --cov-report= --cov-append \
COVERAGE_CORE=sysmon numactl --physcpubind="${NUMA_CPUSET:-0-15}" --membind="${NUMA_NODE:-0}" \
pytest --timeout=30 --session-timeout=600 --durations=0 --durations-min=1 \
--cov=auto_round --cov-report= --cov-append \
-vs --disable-warnings --junitxml="${ut_log_name%.log}.xml" ${test_file} 2>&1 | tee ${ut_log_name}
echo "##[endgroup]"
done
Expand All @@ -123,15 +125,16 @@ function run_llmc_unit_test() {
cd /auto-round && uv pip install .
echo "##[endgroup]"

cd /auto-round/test || exit 1
cd /auto-round/test/integration || exit 1

for test_file in $(find ./test_cpu -name "test_llmc*.py" | sort); do
echo "##[group]Running ${test_file}..."
local test_basename=$(basename ${test_file} .py)
local ut_log_name=${LOG_DIR}/unittest_${test_basename}.log

numactl --physcpubind="${NUMA_CPUSET:-0-15}" --membind="${NUMA_NODE:-0}" \
pytest --cov=auto_round --cov-report= --cov-append \
COVERAGE_CORE=sysmon numactl --physcpubind="${NUMA_CPUSET:-0-15}" --membind="${NUMA_NODE:-0}" \
pytest --timeout=30 --session-timeout=600 --durations=0 --durations-min=1 \
--cov=auto_round --cov-report= --cov-append \
-vs --disable-warnings --junitxml="${ut_log_name%.log}.xml" ${test_file} 2>&1 | tee ${ut_log_name}
echo "##[endgroup]"
done
Expand All @@ -147,6 +150,10 @@ function collect_log() {
function main() {
setup_environment
run_unit_test
if [ "$test_part" -eq 5 ] && [ "$NIGHTLY_TEST" = 1 ]; then
run_inc_unit_test
run_llmc_unit_test
fi
collect_log
check_storage_usage
print_summary
Expand Down
17 changes: 11 additions & 6 deletions .azure-pipelines/scripts/ut/run_ut_cuda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function create_conda_env() {
export PATH=/usr/local/cuda/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=$(python -c "import site; print(site.getsitepackages()[0])")/nvidia/nvjitlink/lib:$LD_LIBRARY_PATH
fi
uv pip install pytest-cov cmake requests ninja psutil
uv pip install pytest-cov pytest-timeout cmake requests ninja psutil
uv cache prune
}

Expand Down Expand Up @@ -111,7 +111,8 @@ function run_unit_test() {
local ut_log_name=${LOG_DIR}/unittest_cuda_${test_basename}.log
echo "Running ${test_file}..."

pytest --cov=auto_round --cov-report= --cov-append -vs --disable-warnings ${test_file} 2>&1 | tee ${ut_log_name}
COVERAGE_CORE=sysmon pytest --cov=auto_round --cov-report= --cov-append \
--durations=0 --durations-min=1 -vs --disable-warnings ${test_file} 2>&1 | tee ${ut_log_name}
done
[ -f .coverage ] && cp .coverage ${LOG_DIR}/.coverage.unit

Expand Down Expand Up @@ -145,7 +146,8 @@ function run_unit_test_vlm() {
local ut_log_name=${LOG_DIR}/unittest_cuda_vlm_${test_basename}.log
echo "Running ${test_file}..."

pytest --cov=auto_round --cov-report= --cov-append -vs --disable-warnings ${test_file} 2>&1 | tee ${ut_log_name}
COVERAGE_CORE=sysmon pytest --cov=auto_round --cov-report= --cov-append \
--durations=0 --durations-min=1 -vs --disable-warnings ${test_file} 2>&1 | tee ${ut_log_name}
done
[ -f .coverage ] && cp .coverage ${LOG_DIR}/.coverage.vlm

Expand Down Expand Up @@ -174,7 +176,8 @@ function run_unit_test_llmc() {
local ut_log_name=${LOG_DIR}/unittest_cuda_llmc_${test_basename}.log
echo "Running ${test_file}..."

pytest --cov=auto_round --cov-report= --cov-append -vs --disable-warnings ${test_file} 2>&1 | tee ${ut_log_name}
COVERAGE_CORE=sysmon pytest --cov=auto_round --cov-report= --cov-append \
--durations=0 --durations-min=1 -vs --disable-warnings ${test_file} 2>&1 | tee ${ut_log_name}
done
[ -f .coverage ] && cp .coverage ${LOG_DIR}/.coverage.llmc

Expand Down Expand Up @@ -207,7 +210,8 @@ function run_unit_test_sglang() {
local ut_log_name=${LOG_DIR}/unittest_cuda_sglang_${test_basename}.log
echo "Running ${test_file}..."

pytest --cov=auto_round --cov-report= --cov-append -vs --disable-warnings ${test_file} 2>&1 | tee ${ut_log_name}
COVERAGE_CORE=sysmon pytest --cov=auto_round --cov-report= --cov-append \
--durations=0 --durations-min=1 -vs --disable-warnings ${test_file} 2>&1 | tee ${ut_log_name}
done
[ -f .coverage ] && cp .coverage ${LOG_DIR}/.coverage.sglang

Expand Down Expand Up @@ -241,7 +245,8 @@ function run_unit_test_vllm() {
local ut_log_name=${LOG_DIR}/unittest_cuda_vllm_${test_basename}.log
echo "Running ${test_file}..."

pytest --cov=auto_round --cov-report= --cov-append -vs --disable-warnings ${test_file} 2>&1 | tee ${ut_log_name}
COVERAGE_CORE=sysmon pytest --cov=auto_round --cov-report= --cov-append \
--durations=0 --durations-min=1 -vs --disable-warnings ${test_file} 2>&1 | tee ${ut_log_name}
done
[ -f .coverage ] && cp .coverage ${LOG_DIR}/.coverage.vllm

Expand Down
8 changes: 5 additions & 3 deletions .azure-pipelines/scripts/ut/run_ut_hpu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function setup_environment() {
export TZ='Asia/Shanghai'
export TQDM_MININTERVAL=60
export HF_HUB_DISABLE_PROGRESS_BARS=1
pip install pytest-cov
pip install pytest-cov pytest-timeout
pip list
echo "##[endgroup]"

Expand All @@ -33,14 +33,16 @@ function run_unit_test() {

echo "##[group]Running ${test_file} in HPU lazy mode..."
local ut_log_name="${LOG_DIR}/unittest_lazy_${test_basename}.log"
PT_HPU_LAZY_MODE=1 pytest --cov="${auto_round_path}" \
COVERAGE_CORE=sysmon PT_HPU_LAZY_MODE=1 pytest --cov="${auto_round_path}" \
--timeout=30 --session-timeout=600 --durations=0 --durations-min=1 \
--cov-report= --cov-append -vs --disable-warnings \
--junitxml="${ut_log_name%.log}.xml" ${test_file} 2>&1 | tee ${ut_log_name}
echo "##[endgroup]"

echo "##[group]Running ${test_file} in HPU compile mode..."
local ut_log_name="${LOG_DIR}/unittest_compile_${test_basename}.log"
PT_HPU_LAZY_MODE=0 pytest --mode compile --cov="${auto_round_path}" \
COVERAGE_CORE=sysmon PT_HPU_LAZY_MODE=0 pytest --mode compile --cov="${auto_round_path}" \
--timeout=30 --session-timeout=600 --durations=0 --durations-min=1 \
--cov-report= --cov-append -vs --disable-warnings \
--junitxml="${ut_log_name%.log}.xml" ${test_file} 2>&1 | tee ${ut_log_name}
echo "##[endgroup]"
Expand Down
23 changes: 13 additions & 10 deletions .azure-pipelines/scripts/ut/run_ut_xpu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source /auto-round/.azure-pipelines/scripts/change_color.sh

function setup_environment() {
echo "##[group]set up UT env..."
uv pip install pytest-cov
uv pip install pytest-cov pytest-timeout
uv pip list
echo "##[endgroup]"

Expand Down Expand Up @@ -38,9 +38,10 @@ function run_unit_test() {

echo "##[group]Running ark ${test_file}..."
local ut_log_name="${LOG_DIR}/unittest_ark_${test_basename}.log"
numactl --physcpubind="${NUMA_CPUSET:-0-27}" --membind="${NUMA_NODE:-0}" \
pytest --cov="${auto_round_path}" --cov-report= --cov-append -vs --disable-warnings \
--junitxml="${ut_log_name%.log}.xml" ${test_file} 2>&1 | tee ${ut_log_name}
COVERAGE_CORE=sysmon numactl --physcpubind="${NUMA_CPUSET:-0-27}" --membind="${NUMA_NODE:-0}" \
pytest --timeout=30 --session-timeout=600 --durations=0 --durations-min=1 \
--cov="${auto_round_path}" --cov-report= --cov-append -vs --disable-warnings \
--junitxml="${ut_log_name%.log}.xml" ${test_file} 2>&1 | tee ${ut_log_name}
echo "##[endgroup]"
done

Expand All @@ -49,9 +50,10 @@ function run_unit_test() {

echo "##[group]Running xpu ${test_file}..."
local ut_log_name="${LOG_DIR}/unittest_xpu_${test_basename}.log"
numactl --physcpubind="${NUMA_CPUSET:-0-27}" --membind="${NUMA_NODE:-0}" \
pytest --cov="${auto_round_path}" --cov-report= --cov-append -vs --disable-warnings \
--junitxml="${ut_log_name%.log}.xml" ${test_file} 2>&1 | tee ${ut_log_name}
COVERAGE_CORE=sysmon numactl --physcpubind="${NUMA_CPUSET:-0-27}" --membind="${NUMA_NODE:-0}" \
pytest --timeout=30 --session-timeout=600 --durations=0 --durations-min=1 \
--cov="${auto_round_path}" --cov-report= --cov-append -vs --disable-warnings \
--junitxml="${ut_log_name%.log}.xml" ${test_file} 2>&1 | tee ${ut_log_name}
echo "##[endgroup]"
done
}
Expand All @@ -69,9 +71,10 @@ function run_unit_test_llmc() {

echo "##[group]Running xpu llmc ${test_file}..."
local ut_log_name="${LOG_DIR}/unittest_xpu_${test_basename}.log"
numactl --physcpubind="${NUMA_CPUSET:-0-27}" --membind="${NUMA_NODE:-0}" \
pytest --cov="${auto_round_path}" --cov-report= --cov-append -vs --disable-warnings \
--junitxml="${ut_log_name%.log}.xml" ${test_file} 2>&1 | tee ${ut_log_name}
COVERAGE_CORE=sysmon numactl --physcpubind="${NUMA_CPUSET:-0-27}" --membind="${NUMA_NODE:-0}" \
pytest --timeout=30 --session-timeout=600 --durations=0 --durations-min=1 \
--cov="${auto_round_path}" --cov-report= --cov-append -vs --disable-warnings \
--junitxml="${ut_log_name%.log}.xml" ${test_file} 2>&1 | tee ${ut_log_name}
echo "##[endgroup]"
done
}
Expand Down
19 changes: 19 additions & 0 deletions test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,25 @@ def test_model_inference(tiny_opt_model_path):
- **CPU-specific** → `*/test_cpu/`, **CUDA-specific** → `*/test_cuda/`
- Import from parent: `from test.helpers import ...`

### CI Markers and Timeouts

- For long-running or non-critical tests under `test_cuda/`, use
`@pytest.mark.skip_ci(reason="...")` and provide a clear reason why the test should not run in CI.
- In CI, each test function has a default timeout of **30 seconds**, while each test file has a timeout of
**10 minutes**.
- Prefer simplifying a test so that it completes within the default timeout. If the test cannot be reduced further,
extend its timeout with `@pytest.mark.timeout(seconds)`. If a test file exceeds the 10-minute limit, split its tests
into smaller files whenever possible.

```python
@pytest.mark.timeout(120)
def test_long_running_case(): ...


@pytest.mark.skip_ci(reason="Time-consuming accuracy evaluation; covered by nightly tests")
def test_optional_accuracy_evaluation(): ...
```

## 5. Running Tests

```sh
Expand Down
1 change: 1 addition & 0 deletions test/integration/test_xpu/test_llmc_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@


@pytest.mark.skipif(torch.xpu.device_count() < 1, reason="test requires at least 1 XPU")
@pytest.mark.timeout(60)
@pytest.mark.parametrize(
"recipe",
[
Expand Down
3 changes: 3 additions & 0 deletions test/unit/test_ark/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,23 @@ def main_op(self, format, bits, group_size, sym, dtype, device, fast_cfg=True, t
evaluate_accuracy(model, tokenizer, threshold=tar_acc, batch_size=32, limit=limit)
torch.xpu.empty_cache()

@pytest.mark.timeout(60)
@pytest.mark.parametrize("format", ["auto_round", "auto_round:gptqmodel"])
@pytest.mark.parametrize("bits, group_size, sym", [(4, 128, True), (8, 128, True)])
@pytest.mark.parametrize("dtype", [torch.bfloat16])
@pytest.mark.parametrize("device", ["cpu", "xpu"])
def test_formats(self, format, bits, group_size, sym, dtype, device):
self.main_op(format, bits, group_size, sym, dtype, device)

@pytest.mark.timeout(60)
@pytest.mark.parametrize("format", ["auto_round:auto_awq"])
@pytest.mark.parametrize("bits, group_size, sym", [(4, 32, True)])
@pytest.mark.parametrize("dtype", [torch.float16])
@pytest.mark.parametrize("device", ["cpu", "xpu"])
def test_awq_fp16(self, format, bits, group_size, sym, dtype, device):
self.main_op(format, bits, group_size, sym, dtype, device)

@pytest.mark.timeout(300)
@pytest.mark.parametrize("format", ["auto_round"])
@pytest.mark.parametrize("bits, group_size, sym", [(2, 32, False)])
@pytest.mark.parametrize("dtype", [torch.bfloat16])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def test_w4a16(self):
model.model.layers[0].mlp.up_proj.weight.dtype == torch.bfloat16
), "CompressedLinear layer was not converted to Linear"

@pytest.mark.timeout(60)
def test_w4a16_to_mxfp4(self, tmp_path):
model = get_tiny_model(get_model_path(self.w4a16_model_path))
model.config.name_or_path = None # Clear the name_or_path to avoid MTP copying issues
Expand Down
Loading