mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-08 20:40:34 +00:00
[inference] refactor examples and fix schedule (#5077)
* [setup] refactor infer setup * [hotfix] fix infenrece behavior on 1 1 gpu * [exmaple] refactor inference examples
This commit is contained in:
@@ -69,6 +69,8 @@ class GenerateSchedule(PipelineSchedule):
|
||||
batch = tree_map(partial(to_device, device=device), batch)
|
||||
self.batch = batch
|
||||
self.batch_size = get_batch_size(batch)
|
||||
if self.stage_manager.num_stages == 1:
|
||||
self.microbatch_size = self.batch_size
|
||||
self.microbatch_offset = 0
|
||||
assert (
|
||||
self.batch_size % self.microbatch_size == 0
|
||||
|
Reference in New Issue
Block a user