Skip to content

Conversation

@PPPoint-t
Copy link

-添加auto_gemm_test.py进行全流程自动化测试
-修改对应的infiniop-test readme
-修改xmake以正确指向InfiniOP库生成位置

@PPPoint-t PPPoint-t changed the title Add infiniop-test auto script issue/228:Add infiniop-test auto script May 22, 2025
set_default(false)

local INFINI_ROOT = os.getenv("INFINI_ROOT") or (os.getenv(is_host("windows") and "HOMEPATH" or "HOME") .. "/.infini")
local INFINI_ROOT = os.getenv("INFINI_ROOT") or path.join(os.projectdir(), "build/linux/x86_64/release")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个不能改

self.a, self.b, self.c = a, b, c
self.alpha, self.beta = alpha, beta

def write_test(self, tw):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里应该直接调用gemm测例里那个构造函数

for pname, pval in matched_params:
W = pval.detach().cpu().numpy().astype(np.float32)
out_dim, in_dim = W.shape
a = np.eye(in_dim, dtype=np.float32)[0:1, :]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我们需要实际的input,过tokenizer的那种

], check=True, cwd=str(PROJECT_ROOT))


def run_test(gguf_file: Path, warmup: int, runs: int):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

只生成测例gguf就可以,没必要在这里面跑

for pat in patterns:
if fnmatch.fnmatch(name, pat):
raw_matches.append((name, param))
# 仅保留二维矩阵,跳过 1D/3D 等
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个方法有点粗糙。我的建议是,你可以抓取特定的参数,比如qkv之类的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants