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

Canonicalize platform name for compile-only backends #25033

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jaro-sevcik
Copy link
Contributor

Currently, platform name canonicalization triggers only for platforms that have runtime backends.
As a result, deviceless ahead-of-time compilation fails because there is no runtime backend without a device (and platform name canonicalization is required by MLIR lowering).

This patch registers compile-only backends (with their canonical names) in xla_bridge when the backends are created and then uses the canonical name when we try to extract the platform name from a backend. With this patch, topology-based AOT works even when there is no device for the platform.

Fixes #23971.

Copy link
Collaborator

@yashk2810 yashk2810 left a comment

Choose a reason for hiding this comment

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

Please add a test

@jaro-sevcik
Copy link
Contributor Author

@yashk2810 This is just a draft PR to ask around if this approach makes sense before I go into writing a test.

Does the approach make sense to you?

@jaro-sevcik jaro-sevcik force-pushed the compile-only-platform-canonicalization branch from 9893da3 to d275c58 Compare November 22, 2024 13:40
@jaro-sevcik jaro-sevcik marked this pull request as ready for review November 22, 2024 13:40
@jaro-sevcik jaro-sevcik force-pushed the compile-only-platform-canonicalization branch from 683f9da to fe6d5e2 Compare November 25, 2024 12:03
@jaro-sevcik jaro-sevcik force-pushed the compile-only-platform-canonicalization branch from fe6d5e2 to ea681c3 Compare November 25, 2024 12:14
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.

Ahead-of-time compilation on GPU fails without a GPU device
2 participants