unify profiling, planning and inference - #5
Open
SiddhanthRaja-Nvidia wants to merge 8 commits into
Open
Conversation
# Conflicts: # common/arg.cpp # common/common.cpp # common/common.h # common/fit.cpp # common/fit.h # ggml/include/ggml-backend.h # ggml/src/ggml-backend.cpp # src/CMakeLists.txt # src/llama-context-pshard.cpp # src/llama-context.cpp # src/llama-context.h # src/llama-ext.h # src/llama-kv-cache.cpp # src/llama-memory-pshard.cpp # src/llama-memory-pshard.h # src/llama-memory-recurrent.cpp # src/llama-model.cpp # src/llama-model.h # src/llama-pipe-shard.h # src/llama-pshard-plan.h
The planning and inference stages diverged in llama_memory_pshard::assign_tensors:
planning dispatches on the plan's backend_id map, inference dispatches on
l.is_pinned and requires GPU addresses that only pshard_pack_cache_region()
assigns. Taking only the inference variant broke the planner, which never calls
pack_cache_region.
Keep both verbatim as assign_tensors_{planning,inference} and dispatch on
external_buf, which is already the runtime-vs-probe discriminator in init().
Also pass no external buffer during planner probes (no_alloc).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Merge branches - profiling, planning and inference. Retain 3-staged usage.
Additional information
02-unify-notes.md
03-unify-master-plan.md
Requirements