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

xpu: set of not implemented aten ops affecting huggingface tests #128914

Closed
12 tasks done
dvrogozh opened this issue Jun 18, 2024 · 6 comments
Closed
12 tasks done

xpu: set of not implemented aten ops affecting huggingface tests #128914

dvrogozh opened this issue Jun 18, 2024 · 6 comments
Labels
module: xpu Intel XPU related issues triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@dvrogozh
Copy link
Contributor

dvrogozh commented Jun 18, 2024

With the xpu support landed in huggingface (use huggingface/accelerate@3b5a00e and huggingface/transformers@eed9ed6 or later), there are few aten ops not implemented in xpu which affect common huggingface tests. Please, implement:

CC: @gujinghui @EikanWang @fengyuan14 @guangyey @jgong5

cc @gujinghui @EikanWang @fengyuan14 @guangyey

@fengyuan14
Copy link
Collaborator

Except for equal and isin, others are included in PT2.5 support plan. We will evaluate the efforts to see whether to add them.

@EikanWang EikanWang added module: xpu Intel XPU related issues triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module labels Jun 18, 2024
@dvrogozh
Copy link
Contributor Author

dvrogozh commented Jul 9, 2024

First group of ops landed after #129353 got merged. See updated issue description.

@fengyuan14
Copy link
Collaborator

Except for equal and isin, others are included in PT2.5 support plan. We will evaluate the efforts to see whether to add them.

@dvrogozh These two operators has been added to PT2.5 support list.

@dvrogozh
Copy link
Contributor Author

@fengyuan14 : fyi, not implemented ops which I reported before after running tests/pipelines/* also affect running models from HF model cards. For example, this happens running aten::isin.Tensor_Tensor_out, intel/torch-xpu-ops#548. I believe we already target them PT2.5, let's make sure we don't miss this. Ops are:

Ran aten::isin.Tensor_Tensor_out, intel/torch-xpu-ops#548 using this script

import torch
import transformers
from transformers import AutoTokenizer
from transformers import pipeline

name = 'mosaicml/mpt-7b'

model = transformers.AutoModelForCausalLM.from_pretrained(
  name,
  torch_dtype=torch.bfloat16, # Load model weights in bfloat16
  trust_remote_code=True)

tokenizer = AutoTokenizer.from_pretrained('EleutherAI/gpt-neox-20b')

pipe = pipeline('text-generation', model=model, tokenizer=tokenizer, device='xpu:0')

with torch.autocast('xpu', dtype=torch.bfloat16):
    print(
        pipe('Here is a recipe for vegan banana bread:\n',
            max_new_tokens=100,
            do_sample=True,
            use_cache=True))

With:

@dvrogozh
Copy link
Contributor Author

Few more ops are now available after #131015 merged. Remainder:

@dvrogozh
Copy link
Contributor Author

All tasks done after #131643 merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: xpu Intel XPU related issues triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

No branches or pull requests

3 participants