Skip to content

support tile builtins#623

Open
g4titanx wants to merge 3 commits into
rust-lang:masterfrom
g4titanx:tile-intrisics
Open

support tile builtins#623
g4titanx wants to merge 3 commits into
rust-lang:masterfrom
g4titanx:tile-intrisics

Conversation

@g4titanx

@g4titanx g4titanx commented Feb 7, 2025

Copy link
Copy Markdown
Contributor

this pr fixes #563

@antoyo antoyo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please also enable the tile tests by adressing this comment.

Comment thread src/intrinsic/llvm.rs Outdated
@g4titanx

g4titanx commented Feb 8, 2025

Copy link
Copy Markdown
Contributor Author

@antoyo i need some clarity on impl. the tile intrinsics. currently, I see a few possible approaches:

  1. Using get_target_builtin_function, but this fails with "Cannot find target builtin" errors since these don't have GCC builtin equivalents.

  2. Creating custom functions with inline assembly, something like:

"llvm.x86.ldtilecfg" => {
    let name = "__rustc_tile_ldtilecfg";
    let func = cx.context.new_function(
        None,
        FunctionType::Internal,
        cx.type_void(),
        &[/* params */],
        name,
        false,
    );
}

@antoyo

antoyo commented Feb 9, 2025

Copy link
Copy Markdown
Contributor

Yeah, get_target_builtin_function won't work.

Perhaps your solution #2 would be the simplest (if that works). You could add the attribute AlwaysInline to make sure it's efficient.

Otherwise, I see another solution involving changing the type Function to an enum that would either take a Function or inline asm, but that might be a lot of work, so I would go with #2 if that works.

@rustbot

rustbot commented Mar 15, 2026

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (possibly #863) made this pull request unmergeable. Please resolve the merge conflicts.

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.

Implement the tile intrinsics

3 participants