Skip to content

Commit

Permalink
ptx support: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
romnn committed Mar 6, 2024
1 parent 40009fd commit 7ef0d46
Show file tree
Hide file tree
Showing 13 changed files with 1,652 additions and 0 deletions.
160 changes: 160 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
members = [
"validate",
"validate/remote",
"sass",
"ptx",
"cuda/cudart",
"profile",
"playground",
"playground/sys",
Expand Down
8 changes: 8 additions & 0 deletions cuda/cudart/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "cudart"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
14 changes: 14 additions & 0 deletions cuda/cudart/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pub fn add(left: usize, right: usize) -> usize {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}
21 changes: 21 additions & 0 deletions ptx/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[package]
name = "ptx"
version = "0.1.0"
edition = "2021"

[dependencies]
# anyhow = "1"
color-eyre = "0"
thiserror = "1"
pest = "2"
pest_derive = "2"
pest-ast = "0"
from-pest = "0"
num = "0"
itertools = "0"

object = "0"
bytes = "1"

[lib]
crate-type = ["cdylib", "rlib"]
11 changes: 11 additions & 0 deletions ptx/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## gpucachesim PTX

Custom (non-LLVM) PTX frontend used by gpucachesim for functional simulation.

The PTX (Parallel Thread eXecution) assembly language is ...

The provided libraries may in the future be used for

- static analysis
- PTX synthesis
- functional simulation
Loading

0 comments on commit 7ef0d46

Please sign in to comment.