NVPTX target specification This change adds a built-in `nvptx64-nvidia-cuda` GPGPU no-std target specification and a basic PTX assembly smoke tests. The approach is taken here and the target spec is based on `ptx-linker`, a project started about 1.5 years ago. Key feature: bitcode object files being linked with LTO into the final module on the linker's side. Prior to this change, the linker used a `ld` linker-flavor, but I think, having the special CLI convention is a more reliable way. Questions about further progress on reliable CUDA workflow with Rust: 1. Is it possible to create a test suite `codegen-asm` to verify end-to-end integration with LLVM backend? 1. How would it be better to organise no-std `compile-fail` tests: add `#![no_std]` where possible and mark others as `ignore-nvptx` directive, or alternatively, introduce `compile-fail-no-std` test suite? 1. Can we have the `ptx-linker` eventually be integrated as `rls` or `clippy`? Hopefully, this should allow to statically link against LLVM used in Rust and get rid of the [current hacky solution](https://github.com/denzp/rustc-llvm-proxy). 1. Am I missing some methods from `rustc_codegen_ssa:🔙:linker::Linker` that can be useful for bitcode-only linking? Currently, there are no major public CUDA projects written in Rust I'm aware of, but I'm expecting to have a built-in target will create a solid foundation for further experiments and awesome crates. Related to #38789 Fixes #38787 Fixes #38786 |
||
|---|---|---|
| .. | ||
| bootstrap | ||
| build_helper | ||
| ci | ||
| doc | ||
| etc | ||
| grammar | ||
| liballoc | ||
| libarena | ||
| libcore | ||
| libfmt_macros | ||
| libgraphviz | ||
| libpanic_abort | ||
| libpanic_unwind | ||
| libproc_macro | ||
| libprofiler_builtins | ||
| librustc | ||
| librustc_allocator | ||
| librustc_apfloat | ||
| librustc_asan | ||
| librustc_borrowck | ||
| librustc_codegen_llvm | ||
| librustc_codegen_ssa | ||
| librustc_codegen_utils | ||
| librustc_cratesio_shim | ||
| librustc_data_structures | ||
| librustc_driver | ||
| librustc_errors | ||
| librustc_fs_util | ||
| librustc_incremental | ||
| librustc_lint | ||
| librustc_llvm | ||
| librustc_lsan | ||
| librustc_metadata | ||
| librustc_mir | ||
| librustc_msan | ||
| librustc_passes | ||
| librustc_plugin | ||
| librustc_privacy | ||
| librustc_resolve | ||
| librustc_save_analysis | ||
| librustc_target | ||
| librustc_traits | ||
| librustc_tsan | ||
| librustc_typeck | ||
| librustdoc | ||
| libserialize | ||
| libstd | ||
| libsyntax | ||
| libsyntax_ext | ||
| libsyntax_pos | ||
| libterm | ||
| libtest | ||
| libunwind | ||
| llvm-emscripten@7f23313edf | ||
| llvm-project@683d352269 | ||
| rtstartup | ||
| rustc | ||
| rustllvm | ||
| stdsimd@b23541340b | ||
| test | ||
| tools | ||
| .gitignore | ||
| README.md | ||
| stage0.txt | ||
This directory contains the source code of the rust project, including:
rustcand its testslibstd- Various submodules for tools, like rustdoc, rls, etc.
For more information on how various parts of the compiler work, see the rustc guide.
There is also useful content in the following READMEs, which are gradually being moved over to the guide:
- https://github.com/rust-lang/rust/tree/master/src/librustc/ty/query
- https://github.com/rust-lang/rust/tree/master/src/librustc/dep_graph
- https://github.com/rust-lang/rust/tree/master/src/librustc/infer/higher_ranked
- https://github.com/rust-lang/rust/tree/master/src/librustc/infer/lexical_region_resolve