Skip to content

Commit

Permalink
refactor nvcc subcommands into a struct, remap nvcc temp file names s…
Browse files Browse the repository at this point in the history
…o we get cache hits in scenarios we should
  • Loading branch information
trxcllnt committed Aug 12, 2024
1 parent 03c7557 commit b74f4b0
Show file tree
Hide file tree
Showing 3 changed files with 369 additions and 359 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ rouille = { version = "3.6", optional = true, default-features = false, features
syslog = { version = "6", optional = true }
version-compare = { version = "0.1.1", optional = true }
shlex = "=1.3.0"
itertools = "0.12"

[dev-dependencies]
assert_cmd = "2.0.13"
Expand Down
8 changes: 7 additions & 1 deletion src/compiler/cicc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,13 @@ pub async fn preprocess(
parsed_args: &ParsedArguments,
) -> Result<process::Output>
{
std::fs::read(cwd.join(&parsed_args.input))
// cicc and ptxas expect input to be an absolute path
let input = if parsed_args.input.is_absolute() {
parsed_args.input.clone()
} else {
cwd.join(&parsed_args.input)
};
std::fs::read(input)
.map_err(|e| { anyhow::Error::new(e) })
.map(|s| {
process::Output {
Expand Down
Loading

0 comments on commit b74f4b0

Please sign in to comment.