-
Notifications
You must be signed in to change notification settings - Fork 6
Dev/gpu #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jonathanplsmith
wants to merge
188
commits into
main
Choose a base branch
from
dev/gpu
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Dev/gpu #47
Changes from 134 commits
Commits
Show all changes
188 commits
Select commit
Hold shift + click to select a range
e47ff1a
Add env variable to use different mmu worker locations
tom-kuchler 986ca5a
fix typo
tom-kuchler 4053de8
Temporarily remove cold starts for testing
tom-kuchler 263f6b7
Temporarily remove cold starts for testing
tom-kuchler 0ce5f91
Fixed bug where interface would not add content for empty output sets…
tom-kuchler 66ad455
Fix overcounting of items in composition sets
tom-kuchler de6c03d
add a function name registrar to the registry
utaal f183945
wip
utaal-b f883d39
Merge remote-tracking branch 'origin/integrate-dparser' into dev/expe…
tom-kuchler 8bbe302
removed need for copy on try_send
tom-kuchler cdcd636
wip promise
tom-kuchler de49c19
Promise working, mmu and wasm pass machine tests
tom-kuchler 3475f6f
Adapt system driver tests and hyper engine to new interface
tom-kuchler 2242906
Make switch away from acutal engine struct as it has become obsolete
tom-kuchler ac3e5e1
Switched engine argument get to allow promises to be generated outsid…
tom-kuchler 55aef8c
Add new queueing to dispatcher
tom-kuchler 5c2dbb1
Remove unnecessary lock from sender in queue
tom-kuchler c384b54
Added check for debt to still be valid when picked up
tom-kuchler 6ff41da
Change transfers to also use the workqueues
tom-kuchler 406b736
Merge branch 'main' into dev/experiment_cleanup
ellerre fcb36c7
Add composition to registry, update related functions, specific types…
tom-kuchler 04985f8
Updated server http interface to allow registering functions at runtime
tom-kuchler a534887
Merge branch 'dev/experiment_cleanup' of github.com:eth-easl/dandelio…
tom-kuchler 83f0d47
Added automatic adding of system functions
tom-kuchler cb5d910
bunch of incomplete things to get going
jonathanplsmith d1e2409
basic toy kernel launching
jonathanplsmith b986d63
launch basic kernel from module
jonathanplsmith 37890de
Fix composition parsing for system functions
tom-kuchler 1eb4fc8
two kernels; allocation
jonathanplsmith 97dbc05
better Module type
jonathanplsmith 8c2cc17
major overhaul to make code more idiomatic
jonathanplsmith bffbd5f
small thing
jonathanplsmith f289116
Merge branch 'dev/experiment_cleanup' into dev/gpu
jonathanplsmith 273bb9f
MVP parse_function and improved EngineLoop.run()
jonathanplsmith ef312b8
Dev/timestamp recorder (#42)
tom-kuchler f85b8e8
Function.load() implemented
jonathanplsmith 7fa820b
argument consumption in gpu_run()
jonathanplsmith 4522be7
Clean up timestamping to be feature flag
tom-kuchler 2346f13
moving inputs onto GPU
jonathanplsmith f14d5d1
hard coded outputs
jonathanplsmith 2b168a6
Change timestamping to accomodate dynamic spans better
tom-kuchler 17eb2f3
Fix summary formatting
tom-kuchler 57b9b98
non hard-coded outputs
jonathanplsmith 9b15740
gpu inputs/outputs tests
jonathanplsmith d948a9b
Blueprint parsing (still need to improve launch config)
jonathanplsmith d747a0b
Switched to crossbeam channel for work queue
tom-kuchler f1b77ca
Moved timestamps to be cleser to enqueing
tom-kuchler 0b0fd76
Fixed clone issue with recorder
tom-kuchler 4145430
launch config sizing and size_sweep test
jonathanplsmith 6a9d35a
Detect physical cores and jump over hyper threads in resource allocation
tom-kuchler 50b9b1d
Update cheri engine for the new queueing
richardlee159 a0fbcc5
Decrease poll time
tom-kuchler 4c42c61
Merge branch 'dev/experiment_cleanup' of github.com:eth-easl/dandelio…
tom-kuchler db3096e
feature cleanup
jonathanplsmith 12a36fa
buffer pool
jonathanplsmith 841270d
refactoring I
jonathanplsmith 2e92892
refactoring II
jonathanplsmith 7a07262
Add busy polling on taking work from queue
tom-kuchler cd1d195
Fix panic on full queue to become an error
tom-kuchler 5d276ff
Add option to limit total CPUs and update recording
tom-kuchler 5895224
buffer pool using contiguous region
jonathanplsmith 2a81e33
simple benchmarks
jonathanplsmith 4332e27
Moved matrix multiplication to recieveing data
tom-kuchler fafb745
Update hyper for dandelion server
tom-kuchler 9a89010
Change core initialization to warn in case of hyperthreading, handlin…
tom-kuchler 1d85061
temporarily disable resource allocation for hyper engine
tom-kuchler c24dc87
Adding check to remove shared memory files on shutdown
tom-kuchler 30d609b
Move env parsing into separate module file
tom-kuchler 60935fd
Separated parsing to make it queueable on work queueu
tom-kuchler 012d95c
Change to send matrix in response, switch to new response layout
tom-kuchler 654ca30
process pool
jonathanplsmith 21e082d
Change hyper io to reqwest on hyper update removing client, Add hyper…
tom-kuchler dd20076
Make hyper context into bytes context. Add transfer functions bytes t…
tom-kuchler 3d6446d
GPU can be selected everywhere
jonathanplsmith 2217990
Add get_chunk_ref to context interface to make reading easier
tom-kuchler 6dd9285
Try to make serde serialize directly from contexts
tom-kuchler de89684
Loading module from Context
jonathanplsmith 35b5289
add gpu engines to server
jonathanplsmith e2a1457
submodule via ssh
jonathanplsmith 98029de
reworked function config and added new features for benchmarking
jonathanplsmith 6c221ef
inference test and updated single thread engine
jonathanplsmith 0308e92
Fix serialization
tom-kuchler 4cc3890
added loops and updated benchmark test
jonathanplsmith 9c9664b
push for benchmarks
jonathanplsmith 38c887c
adapt server for gpu
jonathanplsmith a1fc882
Prepare server for benchmarking, fix mulit-GPU bugs
jonathanplsmith 6f28d04
Merge branch 'dev/experiment_cleanup' into dev/gpu -- all machine int…
jonathanplsmith c581680
fix server for non-GPU engines
jonathanplsmith c4feeb4
Update ioscale and compute to work with new interface
tom-kuchler 2eeb043
Updates before merge
jonathanplsmith 9a54fe9
Merge branch 'dev/experiment_cleanup' into dev/gpu, fix GPU inputs fo…
jonathanplsmith 676f2b8
update composition with GPU inputs
jonathanplsmith 2cef032
split GpuDriver into process/thread variants
jonathanplsmith 1262427
Add independent scaling of frontend
tom-kuchler 49d1103
server prep for inference benchmark
jonathanplsmith 89129db
debug out of memory error
jonathanplsmith 3e3c044
manually enable debugging
jonathanplsmith 34c0d9e
Added sanity check on resource allocation
tom-kuchler 18bbe51
fix OutOfMemory bug and add extra test
jonathanplsmith 1d66820
zero buffers for safety
jonathanplsmith c38cc39
add endpoint for matmul with loading / storing matrix via io function
tom-kuchler 978bd9f
Merge branch 'dev/experiment_cleanup' into dev/gpu
jonathanplsmith cfa737f
merge
jonathanplsmith 566b1a1
typechecker
jonathanplsmith 66b9e11
remove unnecessary thread switch
jonathanplsmith e515bd8
let workers use more cores
jonathanplsmith 476c9b8
try two cores for gpu_process runtime
jonathanplsmith 363a206
Revert "try two cores for gpu_process runtime"
jonathanplsmith 26ebe03
measure serialisation impact
jonathanplsmith 2b2f186
move blueprint serialisation off hot path
jonathanplsmith 6314429
Revert last two commits
jonathanplsmith 0b04b62
Refactor, add comments, improve logic
jonathanplsmith 84ba4d2
do transfer in spawn_blocking
jonathanplsmith e53c2a0
Revert "do transfer in spawn_blocking"
jonathanplsmith 8607539
do transfers in new task
jonathanplsmith 1e50d57
yielding?
jonathanplsmith 20da500
loads of tasks and loads of cores
jonathanplsmith ae53b13
spawn_blocking transfers
jonathanplsmith b40aedd
experiment with block_in_place
jonathanplsmith 74f02dc
backpressure mitigation
jonathanplsmith 6733a81
busy looping?
jonathanplsmith 4035561
only use two workers
jonathanplsmith 014034d
inference mmu
jonathanplsmith cbe10d2
repetitions from input
jonathanplsmith a8fdd5f
different hardcode
jonathanplsmith a488e8b
4 workers
jonathanplsmith b9725f3
...with inference inputs
jonathanplsmith 4798009
16x grid
jonathanplsmith 71bcadd
2 workers 16x grid
jonathanplsmith 244858d
Undo 16x grid and add batched inference workload
jonathanplsmith 90db6d3
batching size as input
jonathanplsmith e066681
save before merge
jonathanplsmith f377f92
Merge branch 'main' of https://github.com/eth-easl/dandelion into dev…
jonathanplsmith ad832ed
fix reqwest, QOL changes: update readme, add more discriptive errors,…
jonathanplsmith f09cfe0
Merge in newest main branch, update to ROCm 6.1.2
jonathanplsmith d707447
update required feature
jonathanplsmith f2267cb
Small changes based on comments
jonathanplsmith 6b56c3a
Add import to right place
jonathanplsmith 9c66f1b
Move write_gpu_outputs out of interface
jonathanplsmith 4df5cb5
Give GPU its own mmap based context
jonathanplsmith fb79a66
Add GPU count and worker count to config
jonathanplsmith 9fc0938
fix small error in tests
jonathanplsmith 0128878
another small mistake
jonathanplsmith 95f8dbf
New JSON format for GPU jobs: multiple .hsaco files supported. double…
1196455
addition of full model tests
377a3d9
tests update
a83c41e
update of old JSON test files to new format
6478358
BatchNorm now functioning
b430d4e
ResNet18 newly compiled + LeNet5 client tests working
f5edb3c
debug env var removed
a528afc
ResNet34 and ResNet152 work as tests. ResNet18 and ResNet34 to be mea…
CallMeRush f22379e
multiple batched ResNet18 added
CallMeRush 8ef5479
ResNet34 batched added
CallMeRush ef8adbb
ResNet50 added
CallMeRush 719bc0f
ResNet50 added
CallMeRush d954bc6
ResNet18ONNX added
CallMeRush 29852db
merge main into dev/gpu
c47d501
- fixed merge: GpuMemoryDomain on par with the others.\n- basic NVidi…
CallMeRush d81b1e0
fix: reflect cuda changes to hip
CallMeRush 70c0dd8
TVM compiled models and Rust tests added for CUDA
CallMeRush 4d044d6
gpu_thread works
CallMeRush ad8f8b4
fix: like in the main
CallMeRush 5b66ba6
GPU process working
CallMeRush 43ec9d8
GpuProcess working
CallMeRush 16d22ba
Llama 3.2 1B added
CallMeRush 069a964
Llama KV compiled, not storing into keys/values
CallMeRush f1509f6
Llama KV full functional + using flexbuffers to register large functi…
CallMeRush 4088eef
resnet + vit_b_16 models added
CallMeRush 130603d
merging main
CallMeRush 845e9b2
added timestamps for GPU specific operations
CallMeRush da44964
fixes timestamps
CallMeRush 5e3bcda
added resnet models + synchronization after kernel calls
CallMeRush 9b8a383
reflect dandelionExperiment changes: single ModelInference RequestType
CallMeRush 5eb2795
partial update: all request data is contained in the GpuContext; Syst…
CallMeRush f12c888
create SubReadOnly, to store references to model weights + refactoring
CallMeRush 1d92ced
weights_from_disk feature added, used to simulate the performance ove…
CallMeRush 144feec
support other EngineQueue types, through the WorkQueue + EnqueueWork …
CallMeRush e292fa7
Support model weights reuse
CallMeRush cb1a5a7
Extend recorder to print model reuse
CallMeRush 982caf8
Implement the GPU queue
CallMeRush 9d5bf77
weights_from_disk bug fix
CallMeRush 08ebe3b
implement SubBytes for GpuContext: also inputs are referenced and not…
CallMeRush 61f69fb
feature : auto-batching implemented
CallMeRush 44347d6
recorder : add batch information
CallMeRush 2fb1331
gpu_id added to recorder
CallMeRush 96f210f
gpu_id added to recorder
CallMeRush 1fe61b2
recorder: batch size correctluy recorder by all
CallMeRush bd5f8db
auto_batching queue improvement: actually exploit cached models
CallMeRush File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| [submodule "unity/source"] | ||
| path = machine_interface/c_machine_libraries/unity/source | ||
| url = https://github.com/ThrowTheSwitch/Unity.git | ||
| url = git@github.com:ThrowTheSwitch/Unity.git | ||
| [submodule "http"] | ||
| path = net/http | ||
| url = https://github.com/cesanta/mongoose.git | ||
| url = git@github.com:cesanta/mongoose.git |
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,33 @@ | ||
| fn main() { | ||
| // check if cheri is enabled and build library if so | ||
| #[cfg(feature = "cheri")] | ||
| { | ||
| use cmake::Config; | ||
| // cmake configure and build all | ||
| let _all = Config::new("c_machine_libraries") | ||
| .define("FORCE_BUILD_CHERI", "") | ||
| .build_target("all") | ||
| .build(); | ||
| // run tests tests | ||
| let _test = Config::new("c_machine_libraries") | ||
| .build_target("test") | ||
| .build(); | ||
| // install | ||
| let install = Config::new("c_machine_libraries").build(); | ||
| // passing cmake information to c | ||
| println!("cargo:rustc-link-search=native={}", install.display()); | ||
| println!("cargo:rustc-link-lib=static=cheri_lib"); | ||
| } | ||
| } | ||
| use cmake::Config; | ||
|
|
||
| fn cmake_libraries() -> () { | ||
| // cmake configure and build all | ||
| let _all = Config::new("c_machine_libraries") | ||
| .define("FORCE_BUILD_CHERI", "") | ||
| .build_target("all") | ||
| .build(); | ||
| // run tests tests | ||
| let _test = Config::new("c_machine_libraries") | ||
| .build_target("test") | ||
| .build(); | ||
| // install | ||
| let install = Config::new("c_machine_libraries").build(); | ||
| // passing cmake information to c | ||
| println!("cargo:rustc-link-search=native={}", install.display()); | ||
| println!("cargo:rustc-link-lib=static=cheri_lib"); | ||
| } | ||
|
|
||
| fn libraries_gpu() { | ||
| // Link with HIP Runtime 5.7.1 | ||
| println!("cargo:rustc-link-search=/opt/rocm-5.7.1/lib"); | ||
| println!("cargo:rustc-link-lib=amdhip64"); | ||
| } | ||
|
|
||
| fn main() { | ||
| // check if cheri is enabled and build library if so | ||
| #[cfg(feature = "cheri")] | ||
| cmake_libraries(); | ||
|
|
||
| #[cfg(feature = "gpu")] | ||
| libraries_gpu(); | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| use std::io; | ||
|
|
||
| use core_affinity::CoreId; | ||
| use dandelion_commons::DandelionResult; | ||
| use machine_interface::{ | ||
| function_driver::{ | ||
| compute_driver::gpu::{gpu_utils::SendFunctionArgs, GpuLoop}, | ||
| thread_utils::EngineLoop, | ||
| ComputeResource, FunctionConfig, | ||
| }, | ||
| memory_domain::Context, | ||
| }; | ||
|
|
||
| fn main() { | ||
| // parse args | ||
| let args: Vec<String> = std::env::args().collect(); | ||
| assert_eq!(args.len(), 3); | ||
| let core_id: u8 = args[1].parse().expect("Invalid core ID"); | ||
| let gpu_id: u8 = args[2].parse().expect("Invalid GPU ID"); | ||
|
|
||
| // set cpu affinity | ||
| assert!(core_affinity::set_for_current(CoreId { | ||
| id: core_id as usize | ||
| })); | ||
|
|
||
| // setup worker struct | ||
| let mut worker = GpuLoop::init(ComputeResource::GPU(core_id, gpu_id)) | ||
| .expect("Should be able to create worker"); | ||
|
|
||
| // unwrap okay, as all lines are valid Strings | ||
| for inp in io::stdin().lines().map(|l| l.unwrap()) { | ||
| match execute(&mut worker, inp) { | ||
| Ok(()) => { | ||
| println!("__OK__"); | ||
| } | ||
| Err(e) => { | ||
| println!("__ERROR__ {:?}", e); | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| fn execute(worker: &mut GpuLoop, inp: String) -> DandelionResult<()> { | ||
| let SendFunctionArgs { | ||
| config, | ||
| context, | ||
| output_sets, | ||
| } = serde_json::from_str(&inp).expect("Parsing function args failed"); | ||
|
|
||
| let config = FunctionConfig::GpuConfig(config); | ||
| let context: Context = context.try_into()?; | ||
|
|
||
| worker.run(config, context, output_sets).map(|_| ()) | ||
| } |
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now, the directory to look for user libraries is controlled via this environment variable (a bit like the worker paths). Not sure if this is the best way to go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think when we implement registering kernels, this can be removed,
I opened a task on the overall project to add this, but I think this is fine for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I already implemented some bare-bones registering logic in server/src/main, but it for example doesn't involve the registry at all. Should be a good place to continue from though