-
Notifications
You must be signed in to change notification settings - Fork 4
issue/142:添加rms_norm算子测例 #146
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
JYMiracle305
commented
Apr 3, 2025
return normalized * weight | ||
|
||
class RMSNormTestCase(InfiniopTestCase): | ||
def __init__( |
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.
第一维不连续的情况怎么测?
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.
新增生成第一维不连续张量的参数
atype: np.dtype, | ||
wtype: np.dtype, | ||
epsilon: float = 1e-5, | ||
input_non_contiguous: bool = False, |
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 stride吧
self.weight = random_tensor(weight_shape, wtype) | ||
self.epsilon = epsilon | ||
self.result = np.zeros_like(self.input) | ||
self.ans = rms_norm(self.input, self.weight, self.epsilon).astype(atype) |
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.
答案用f64计算