Skip to content

[Benchmark Script] Refactor benchmark script for bench_datatype_gemm #19364

Closed
@yewentao256

Description

@yewentao256

I know this is a bnechmark script but I think this could still be refactored. Perhaps a few functions/objects and a dictionary?

Originally posted by @ProExpertProg in #19233 (comment)

I think this is a great idea, example config designed:

PROVIDER_CFGS = {
    "int8-tensor-w-token-a": dict(w="tensor", a="token", no_a_quant=False),
    "int8-tensor-w-tensor-a": dict(w="tensor", a="tensor", no_a_quant=False),
    "int8-channel-w-token-a": dict(w="channel", a="token", no_a_quant=False),
    "int8-channel-w-tensor-a": dict(w="channel", a="tensor", no_a_quant=False),
    "int8-tensor-w-token-a-noquant": dict(w="tensor", a="token", no_a_quant=True),
    "int8-tensor-w-tensor-a-noquant": dict(w="tensor", a="tensor", no_a_quant=True),
    "int8-channel-w-token-a-noquant": dict(w="channel", a="token", no_a_quant=True),
    "int8-channel-w-tensor-a-noquant": dict(w="channel", a="tensor", no_a_quant=True),
}

After #19233 merged, I can have another PR optimizing this, and update benchmarks/kernels/bench_fp8_gemm.py as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions