Skip to content
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

fix, potential fix, thoughts #706

Closed
wants to merge 1 commit into from
Closed

Conversation

aciddelgado
Copy link
Contributor

No description provided.

@@ -259,7 +258,7 @@ def run_benchmark(args, model, tokenizer, batch_size, prompt_length, generation_
if args.use_graph_capture:
params.try_graph_capture_with_max_batch_size(batch_size)

generator = og.Generator(model, params)
generator = og.Generator(model, params) # TODO: Generator allocates memory. Should we measure this? Should we add functionality so we can reuse this memory?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should detect when the generator goes out of scope and release the allocator memory associated with the released generator so the memory can be reused by others.

But I think we can do it as a separate feature (and not through gc.collect which might/might not work).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants