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

[sharktank] Evaluation - Add Perplexity test for vmfb #306

Merged
merged 65 commits into from
Oct 29, 2024

Conversation

archana-ramalingam
Copy link
Collaborator

Add Perplexity test for vmfb

sharktank/conftest.py Outdated Show resolved Hide resolved
sharktank/conftest.py Outdated Show resolved Hide resolved
sharktank/sharktank/evaluate/perplexity_vmfb.py Outdated Show resolved Hide resolved
sharktank/conftest.py Outdated Show resolved Hide resolved
@archana-ramalingam archana-ramalingam merged commit 072be20 into main Oct 29, 2024
3 checks passed
@archana-ramalingam archana-ramalingam deleted the perplexity-vmfb branch October 29, 2024 05:16
token_batch,
self.seq_lens_batch,
seq_block_ids,
self.batch.cache_state[0].to(torch.float16),
Copy link
Contributor

Choose a reason for hiding this comment

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

@archana-ramalingam, I think this may make a copy.
First the .to(...) may make a copy.
Then before the making the actual call to the IREE module function it will make a copy to the device if we are not targeting the CPU.

Copy link
Contributor

Choose a reason for hiding this comment

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

You would need to first explicitly make a iree.runtime.DeviceArray and then copy back to the cache state after the call.

I have also added some IREE related functionality here. We should unify this aspect to reduce code duplication.

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.

3 participants