Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ pip install -e .
```bash
# 测试单算子
python test/infinicore/ops/[operator].py [--bench | --debug | --verbose] [--cpu | --nvidia | --cambricon | --ascend | --iluvatar | --metax | --moore | --kunlun | --Hygon | --ali]
# 测试全部算子
# 测试常见算子
python test/infinicore/run.py [--bench | --debug | --verbose] [--cpu | --nvidia | --cambricon | --ascend | --iluvatar | --metax | --moore | --kunlun | --ali]
```

Expand Down
16 changes: 14 additions & 2 deletions test/infinicore/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def generate_help_epilog(ops_dir=None):

# Examples section
epilog_parts.append("Examples:")
epilog_parts.append(" # Run all operator tests on CPU")
epilog_parts.append(" # Run common operator tests on CPU")
epilog_parts.append(" python run.py --cpu")
epilog_parts.append("")
epilog_parts.append(" # Run specific operators")
Expand Down Expand Up @@ -317,7 +317,7 @@ def main():
if not valid_ops:
# Case A: User input provided, but ALL were invalid.
print(f"⚠️ No valid operators remained from your list.")
print(f"🔄 Fallback: Proceeding to run ALL available tests...")
print(f"🔄 Fallback: Proceeding to run common tests...")
else:
# Case B: At least some valid operators found.
print(f"🎯 Targeted operators: {', '.join(valid_ops)}")
Expand All @@ -332,6 +332,18 @@ def main():
ops_dir=args.ops_dir, verbose=args.verbose, bench_mode=args.bench
)

# default to common operators if none specified
if target_ops is None:
target_ops = [
"add",
"causal_softmax",
"matmul",
"random_sample",
"rms_norm",
"rope",
"swiglu",
]

success, _ = test_manager.test(
target_ops=target_ops, global_exec_args=global_exec_args
)
Expand Down