Add an independent profile tool

This commit is contained in:
DeEMO
2025-04-18 03:27:20 +00:00
parent 168c14f4e8
commit cf4fa04980
3 changed files with 69 additions and 1 deletions
+6 -1
View File
@@ -1,5 +1,5 @@
# Define the default target now so that it is always the first target
BUILD_TARGETS = llama-cli
BUILD_TARGETS = llama-cli profile-tool
# BUILD_TARGETS = \
# libllava.a \
# llama-baby-llama \
@@ -1528,6 +1528,11 @@ llama-minicpmv-cli: examples/llava/minicpmv-cli.cpp \
$(OBJ_ALL)
$(CXX) $(CXXFLAGS) $< $(filter-out %.h $<,$^) -o $@ $(LDFLAGS) -Wno-cast-qual
profile-tool: tools/profile_tool.cpp \
$(OBJ_ALL)
$(CXX) $(CXXFLAGS) -c $< -o $(call GET_OBJ_FILE, $<)
$(CXX) $(CXXFLAGS) $(filter-out %.h $<,$^) $(call GET_OBJ_FILE, $<) -o $@ $(LDFLAGS)
ifeq ($(UNAME_S),Darwin)
swift: examples/batched.swift
(cd examples/batched.swift; make build)