Skip to content

Conversation

JamieCunliffe
Copy link
Contributor

All the SVE intrinsics along with updates to the intrinsic test tool to allow for SVE to be tested.

CI will fail until the rustc changes are merged.

adamgemmell and others added 6 commits November 28, 2023 15:03
Co-authored-by: Jamie Cunliffe <[email protected]>
Co-authored-by: Jacob Bramley <[email protected]>
Co-authored-by: Luca Vizzarro <[email protected]>
Co-authored-by: Jamie Cunliffe <[email protected]>
Co-authored-by: Adam Gemmell <[email protected]>
Co-authored-by: Jacob Bramley <[email protected]>
Co-authored-by: Luca Vizzarro <[email protected]>
Co-authored-by: Adam Gemmell <[email protected]>
Co-authored-by: Jacob Bramley <[email protected]>
Co-authored-by: Jamie Cunliffe <[email protected]>
Co-authored-by: Adam Gemmell <[email protected]>
Co-authored-by: Jacob Bramley <[email protected]>
@rustbot
Copy link
Collaborator

rustbot commented Dec 13, 2023

r? @Amanieu

(rustbot has picked a reviewer for you, use r? to override)

@bjorn3
Copy link
Member

bjorn3 commented Dec 13, 2023

For reference the rustc PR seems to be rust-lang/rust#118917.

@bors
Copy link
Contributor

bors commented Jan 5, 2024

☔ The latest upstream changes (presumably 5ef6eb4) made this pull request unmergeable. Please resolve the merge conflicts.

@Ruanyx1823

This comment was marked as off-topic.

@tgross35

This comment was marked as off-topic.

@Ruanyx1823

This comment was marked as off-topic.

@tgross35
Copy link
Contributor

Please redirect this discussion to https://rust-lang.zulipchat.com/.

@ruanyuxin
Copy link

I want to automatically generate the test codes sve.rs and sve2.rs by myself, so I run "RUST_BACKTRACE=full./target/release/stdarch-gen2 crates/stdarch-gen2/spec/sve crates/core_arch/src/aarch64/sve" in the ~/stdarch/stdarch directory.The results show that the problem lies in the fact that different versions of proc-macro2 have different supports for punctuation marks. In newer versions,"{" and "}" can be used as punctuation marks, but this is not supported in older versions. But my proc-macro2=1.0.101. Later, I tried other methods to generate curly braces myself, such as ①tokens.append_all(quote!) {{});" ②tokens.extend(TokenStream::from_str("{").unwrap()); ③tokens.extend(parse_str::("{").unwrap());
The result was still an error. May I ask if there are any solutions

@adamgemmell
Copy link
Contributor

The intended arguments to stdarch-gen2 are just crates/stdarch-gen2/spec, the output directory is implicit. I don't understand what you mean by "punctuation marks" but also don't understand how a later version of proc_macro2 could have caused a breaking change. What are you trying to do, just reproduce sve{2}.rs with this branch?

What's your rust version? stdarch is intended for nightly, so you'll have to find a nightly compiler from around the time this branch was last updated. Unfortunately there doesn't seem to be a Cargo.lock in the repository at this time so there's a chance new dependencies get brought in which you may have to manually downgrade. For example, the latest version of proc-macro2 at the time of this branch was probably 1.0.70

@ruanyuxin
Copy link

stdarch-gen2 的预期参数只是crates/stdarch-gen2/spec,输出目录是隐式的。我不明白您说的“标点符号”是什么意思,也不明白 的后续版本怎么proc_macro2会导致重大更改。您是想做什么,只是sve{2}.rs用这个分支进行复现吗?

你的 Rust 版本是多少?stdarch 是为 Nightly 设计的,所以你必须找到这个分支上次更新前后的 Nightly 编译器。遗憾的是,目前仓库中似乎没有 Cargo.lock 文件,所以可能会引入新的依赖项,你可能需要手动降级。例如,proc-macro2这个分支当时的最新版本可能是1.0.70。

The meaning of "punctuation" is that when I do not change any Settings, I run RUST_BACKTRACE=full./target/release/stdarch-gen2 crates/stdarch-gen2/spec/sve. It will report an error saying that the 23 column of line 1475 of intrinsic.rs reports an error, that is, tokens.append(Punct::new('{', Spacing::Alone)); . The specific error message is "unsupported proc macro punctuation character '{'". After checking, I found that it is because the currently downloaded version of proc-macro2 is not supported. However, when I forcibly changed "proc-macro2=" 1.0 "in the Cargo.toml file to" proc-macro2= "=1.0.86", no error was reported.

@ruanyuxin
Copy link

Hello, I'm a student interested in the rust compiler. Recently, I've been testing the intrinsic of SVE. However, I encountered a problem where the types of passed Pointers do not match. As shown in the figure, base.as_signed() returns *const i8 (i.e., an immutable reference), but the svst3_s8 function expects the parameter type to be *mut i8 (i.e., a mutable reference). I'd like to ask if it's a problem with the code itself? Or how can I modify this function?
c3f0af6f-cb83-40c8-a132-e981ede70001

@adamgemmell
Copy link
Contributor

I'm not sure what you're trying to do - it looks like you're trying to update this branch to work with the more recent rustc changes. If that's the case I'd suggest rebasing this stdarch branch onto its own latest master and ensure that builds correctly. Then you can update the submodule in rust-lang/rust with it - no need to copy these intrinsics into the compiler codegen tests.

If you're doing this for your own curiosity, feel free! But I warn that this branch is quite out of date and cannot be merged until upstream rustc has an implementation of scalable vectors, so it might be quite a bit of work for something that might not work correctly yet.

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.