-
Notifications
You must be signed in to change notification settings - Fork 76
issue/228:Add infiniop-test auto script #230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| 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") |
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
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, :] |
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
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 等 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个方法有点粗糙。我的建议是,你可以抓取特定的参数,比如qkv之类的
-添加auto_gemm_test.py进行全流程自动化测试
-修改对应的infiniop-test readme
-修改xmake以正确指向InfiniOP库生成位置