Skip to content
Merged
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
121 changes: 76 additions & 45 deletions auto_round/inference/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,21 +439,21 @@ def fp8_static_scheme_checker(
requirements=["autoawq", "transformers"],
)

BackendInfos["auto_round_kernel"] = BackendInfo(
device=["cpu"],
sym=[True, False],
packing_format=GPTQ_FORMAT_NO_ZP,
bits=[2, 4, 8],
group_size=None,
priority=6,
checkers=[ark_feature_checker],
alias=["ark"],
compute_dtype=["float32", "float16"],
data_type=["int"],
act_bits=WOQ_DEFAULT_ACT_BITS,
requirements=["torch>=2.9.0", "auto_round_kernel"],
systems=["linux"],
)
# BackendInfos["auto_round_kernel"] = BackendInfo(
# device=["cpu"],
# sym=[True, False],
# packing_format=GPTQ_FORMAT_NO_ZP,
# bits=[2, 4, 8],
# group_size=None,
# priority=6,
# checkers=[ark_feature_checker],
# alias=["ark"],
# compute_dtype=["float32", "float16"],
# data_type=["int"],
# act_bits=WOQ_DEFAULT_ACT_BITS,
# requirements=["torch>=2.9.0", "auto_round_kernel"],
# systems=["linux"],
# )

BackendInfos["auto_round_kernel_xpu"] = BackendInfo(
device=["xpu"],
Expand All @@ -471,11 +471,27 @@ def fp8_static_scheme_checker(
systems=["linux"],
)

BackendInfos["auto_round_kernel_zp"] = BackendInfo(
device=["cpu"],
sym=[True, False],
# BackendInfos["auto_round_kernel_zp"] = BackendInfo(
# device=["cpu"],
# sym=[True, False],
# packing_format=GPTQ_FORMAT,
# bits=[2, 4, 8],
# group_size=None,
# priority=6,
# checkers=[ark_feature_checker],
# alias=["ark"],
# compute_dtype=["float32", "float16"],
# data_type=["int"],
# act_bits=WOQ_DEFAULT_ACT_BITS,
# requirements=["torch>=2.9.0", "auto_round_kernel"],
# systems=["linux"],
# )

BackendInfos["auto_round_kernel_zp_xpu"] = BackendInfo(
device=["xpu"],
sym=[True],
packing_format=GPTQ_FORMAT,
bits=[2, 4, 8],
bits=[4, 8],
group_size=None,
priority=6,
checkers=[ark_feature_checker],
Expand All @@ -487,10 +503,26 @@ def fp8_static_scheme_checker(
systems=["linux"],
)

BackendInfos["auto_round_kernel_zp_xpu"] = BackendInfo(
# BackendInfos["auto_round_kernel_awq"] = BackendInfo(
# device=["cpu"],
# sym=[True, False],
# packing_format=AWQ_FORMAT,
# bits=[2, 4, 8],
# group_size=None,
# priority=6,
# checkers=[ark_feature_checker],
# alias=["ark"],
# compute_dtype=["float32", "float16"],
# data_type=["int"],
# act_bits=WOQ_DEFAULT_ACT_BITS,
# requirements=["torch>=2.9.0", "auto_round_kernel"],
# systems=["linux"],
# )

BackendInfos["auto_round_kernel_awq_xpu"] = BackendInfo(
device=["xpu"],
sym=[True],
packing_format=GPTQ_FORMAT,
packing_format=AWQ_FORMAT,
bits=[4, 8],
group_size=None,
priority=6,
Expand All @@ -503,42 +535,40 @@ def fp8_static_scheme_checker(
systems=["linux"],
)

BackendInfos["auto_round_kernel_awq"] = BackendInfo(
BackendInfos["ipex_gptq_cpu"] = BackendInfo(
device=["cpu"],
sym=[True, False],
packing_format=AWQ_FORMAT,
bits=[2, 4, 8],
packing_format=GPTQ_FORMAT,
bits=[4],
group_size=None,
priority=6,
checkers=[ark_feature_checker],
alias=["ark"],
compute_dtype=["float32", "float16"],
priority=5,
checkers=[],
compute_dtype=["float16", "bfloat16"],
data_type=["int"],
act_bits=WOQ_DEFAULT_ACT_BITS,
requirements=["torch>=2.9.0", "auto_round_kernel"],
systems=["linux"],
alias=["ipex"],
requirements=["torch<2.9", "intel-extension-for-pytorch>=2.5"],
)

BackendInfos["auto_round_kernel_awq_xpu"] = BackendInfo(
BackendInfos["ipex_gptq"] = BackendInfo(
device=["xpu"],
sym=[True],
packing_format=AWQ_FORMAT,
bits=[4, 8],
sym=[True, False],
packing_format=GPTQ_FORMAT,
bits=[4],
group_size=None,
priority=6,
checkers=[ark_feature_checker],
alias=["ark"],
compute_dtype=["float32", "float16"],
priority=5,
checkers=[],
compute_dtype=["float16", "bfloat16"],
data_type=["int"],
act_bits=WOQ_DEFAULT_ACT_BITS,
requirements=["torch>=2.9.0", "auto_round_kernel"],
systems=["linux"],
alias=["ipex"],
requirements=["intel-extension-for-pytorch>=2.5"],
)

BackendInfos["ipex_gptq"] = BackendInfo(
device=["cpu", "xpu"],
BackendInfos["ipex_awq_cpu"] = BackendInfo(
device=["cpu"],
sym=[True, False],
packing_format=GPTQ_FORMAT,
packing_format=AWQ_FORMAT,
bits=[4],
group_size=None,
priority=5,
Expand All @@ -547,11 +577,12 @@ def fp8_static_scheme_checker(
data_type=["int"],
act_bits=WOQ_DEFAULT_ACT_BITS,
alias=["ipex"],
requirements=["intel-extension-for-pytorch>=2.5"],
requirements=["torch<2.9", "intel-extension-for-pytorch>=2.5"],
)


BackendInfos["ipex_awq"] = BackendInfo(
device=["cpu", "xpu"],
device=["cpu"],
sym=[True, False],
packing_format=AWQ_FORMAT,
bits=[4],
Expand Down