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

The operator 'aten::index_select' is not currently supported on the ocl backend. #44

Open
leviathanch opened this issue Nov 25, 2023 · 1 comment
Labels
LayerNorm Fails due to missing layer norm

Comments

@leviathanch
Copy link

I've been trying to run TinyBERT with OpenCL as the backend, but it fails because aten::index_select isn't implemented.

Running this code gives me the error message as shown in the attached log file

import torch
torch.ops.load_library("/usr/local/lib/libpt_ocl.so")
torch.ops.load_library("/usr/local/lib/libdlprim_core.so")
torch.utils.rename_privateuse1_backend('ocl')

from transformers import pipeline

pipe = pipeline(
    model="Intel/dynamic_tinybert",
    task="text-generation",
)
pipe.model = pipe.model.to("ocl:0")

out = pipe("Hello world")
print(out)

log.txt

@artyom-beilis
Copy link
Owner

The error is RuntimeError: Running sums are expected to be present caused by LayerNorm, the index_select is automatically substituted by CPU version.

Nowadays I work on LayerNorm support as it central thing in many implementations

@artyom-beilis artyom-beilis added the LayerNorm Fails due to missing layer norm label Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LayerNorm Fails due to missing layer norm
Projects
None yet
Development

No branches or pull requests

2 participants