mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2026-09-04 02:37:27 +02:00
tests : use backend base name for fusion baseline output
The fusion test is invoked with a specific device name (e.g. MTL0), but its output - the recorded baseline and the header it writes - should be named after the backend base name (e.g. MTL, via ggml_backend_reg_name), since the counters depend on the backend, not on the specific device index. Rename the committed baseline to MTL.tsv. Assisted-by: pi:llama.cpp/DeepSeek-V4-Flash-0731
This commit is contained in:
@@ -252,7 +252,7 @@ if (NOT WIN32 OR NOT BUILD_SHARED_LIBS)
|
||||
llama_test(
|
||||
test-fusion
|
||||
LABEL main
|
||||
ARGS --models "${MODEL_DIR}" --device MTL0 --check "${PROJECT_SOURCE_DIR}/tests/fusion/MTL0.tsv"
|
||||
ARGS --models "${MODEL_DIR}" --device MTL0 --check "${PROJECT_SOURCE_DIR}/tests/fusion/MTL.tsv"
|
||||
)
|
||||
set_tests_properties(test-fusion PROPERTIES FIXTURES_REQUIRED generate-models)
|
||||
endif()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# test-fusion baseline for backend MTL0
|
||||
# test-fusion baseline for device MTL
|
||||
# arch moe mode label count
|
||||
arcee 0 prefill RMS_NORM+MUL 5
|
||||
arcee 0 decode RMS_NORM+MUL 80
|
||||
|
@@ -296,6 +296,10 @@ int main(int argc, char ** argv) {
|
||||
// mechanism; a backend that does not adopt fusion debugging exports none of them
|
||||
auto * reg = ggml_backend_dev_backend_reg(dev);
|
||||
|
||||
// output naming uses the backend base name (e.g. "MTL") rather than the specific device
|
||||
// name (e.g. "MTL0") the test was invoked with
|
||||
const std::string base_name = ggml_backend_reg_name(reg);
|
||||
|
||||
auto api_stats_init = (fusion_stats_init_t) ggml_backend_reg_get_proc_address(reg, "ggml_backend_fusion_stats_init");
|
||||
auto api_stats_reset = (fusion_stats_reset_t) ggml_backend_reg_get_proc_address(reg, "ggml_backend_fusion_stats_reset");
|
||||
auto api_stats_get = (fusion_stats_get_t) ggml_backend_reg_get_proc_address(reg, "ggml_backend_fusion_stats_get");
|
||||
@@ -342,7 +346,7 @@ int main(int argc, char ** argv) {
|
||||
|
||||
std::vector<fusion_row> rows;
|
||||
|
||||
LOG_INF("%s: running fusion test over %zu models on '%s'\n", __func__, models.size(), device_name.c_str());
|
||||
LOG_INF("%s: running fusion test over %zu models on '%s'\n", __func__, models.size(), base_name.c_str());
|
||||
|
||||
const size_t seed = 1;
|
||||
|
||||
@@ -454,7 +458,7 @@ int main(int argc, char ** argv) {
|
||||
std::ofstream out(record_path);
|
||||
std::ostream & os = record_path.empty() ? std::cout : out;
|
||||
if (!record_path.empty()) {
|
||||
os << "# test-fusion baseline for device " << device_name << "\n";
|
||||
os << "# test-fusion baseline for device " << base_name << "\n";
|
||||
os << "# arch\tmoe\tmode\tlabel\tcount\n";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user