Commit bb596f6e authored by xiaowei.zhang's avatar xiaowei.zhang
Browse files

1. Update MOE; 2. Update sglang mHC; 3. Update test scripts; 4 Add new

   ops.
parent d9ebb683
......@@ -6,7 +6,7 @@ import aiter
from aiter.test_common import checkAllclose, perftest
from aiter import dtypes
import argparse
import pandas as pd
ERROR_SUMMARY_ROWS_OUT = []
ERROR_SUMMARY_ROWS_RES = []
......@@ -97,7 +97,7 @@ def print_error_metrics(ref, pred, name, dim, dtype, ck_us=None):
def print_error_summary_table(rows):
if not rows:
return
return []
cols = [
("case", "case"),
......@@ -147,6 +147,7 @@ def print_error_summary_table(rows):
for fr in formatted_rows:
print(" | ".join(f"{fr[k]:<{widths[k]}}" for k, _ in cols))
return formatted_rows
@perftest()
def run_torch(input, weight, eps, residual=None):
......@@ -308,5 +309,8 @@ for dtype in l_dtype:
for n in l_n:
test_rmsnorm2d_fuseAdd(dtype, m, n)
print_error_summary_table(ERROR_SUMMARY_ROWS_OUT)
print_error_summary_table(ERROR_SUMMARY_ROWS_RES)
csv_rows = []
csv_rows.extend(print_error_summary_table(ERROR_SUMMARY_ROWS_OUT))
csv_rows.extend(print_error_summary_table(ERROR_SUMMARY_ROWS_RES))
if csv_rows:
pd.DataFrame(csv_rows).to_csv("rmsnorm2d.csv", index=False)
......@@ -190,5 +190,6 @@ df = pd.DataFrame(df)
df["speedup (aiter vs torch)"] = df["time_us (torch)"] / df["time_us (aiter)"]
df["speedup (aiter vs triton)"] = df["time_us (triton)"] / df["time_us (aiter)"]
df.to_csv("topk_plain.csv",index=False)
df_md = df.to_markdown(index=False)
aiter.logger.info("topk_plain summary (markdown):\n%s", df_md)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment