Skip to content

Commit

Permalink
ZLUDA 3.8.5 (#56)
Browse files Browse the repository at this point in the history
* Enable runtime compiler for PyTorch support on Windows.

* Bump version.
  • Loading branch information
lshqqytiger authored Jan 3, 2025
1 parent 1b6e012 commit 2930436
Show file tree
Hide file tree
Showing 13 changed files with 482 additions and 491 deletions.
10 changes: 3 additions & 7 deletions Cargo.lock

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

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ members = [
"hipblaslt-sys",
"hipfft-sys",
"hiprt-sys",
"hiprtc-sys",
"miopen-sys",
"offline_compiler",
"optix_base",
Expand Down
11 changes: 1 addition & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,16 +239,7 @@ Performance is currently much lower than the native HIP backend, see the discuss
torch.backends.cuda.enable_mem_efficient_sdp(False)
```

If you are getting an error about nvrtc/hiprtc, insert

```py
def jit_script(f, *_, **__):
f.graph = torch._C.Graph() # pylint: disable=protected-access
return f
torch.jit.script = jit_script
```

You may have an issue while running `torch.topk`. If so, insert
If you have an issue while running `torch.topk`, insert the codes below

```py
_topk = torch.topk
Expand Down
8 changes: 0 additions & 8 deletions hiprtc-sys/Cargo.toml

This file was deleted.

1 change: 0 additions & 1 deletion hiprtc-sys/README

This file was deleted.

14 changes: 0 additions & 14 deletions hiprtc-sys/build.rs

This file was deleted.

360 changes: 0 additions & 360 deletions hiprtc-sys/src/hiprtc.rs

This file was deleted.

3 changes: 0 additions & 3 deletions hiprtc-sys/src/lib.rs

This file was deleted.

2 changes: 1 addition & 1 deletion zluda_inject/src/bin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ pub fn main_impl() -> Result<(), Box<dyn Error>> {
match argument.to_str() {
Some(argument) => match argument {
"--version" => {
println!("ZLUDA 3.8.4");
println!("ZLUDA 3.8.5");
process::exit(0);
}
"--" => break,
Expand Down
7 changes: 2 additions & 5 deletions zluda_rtc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@ edition = "2018"
name = "nvrtc"
crate-type = ["cdylib"]

[features]
rocm5 = ["hip_common/rocm5"]

[dependencies]
hip_common = { path = "../hip_common" }
hiprtc-sys = { path = "../hiprtc-sys" }
libloading = "0.8"
lazy_static = "1.4"

[package.metadata.zluda]
linux_names = ["libnvrtc.so.10", "libnvrtc.so.11"]
Expand Down
2 changes: 1 addition & 1 deletion zluda_rtc/README
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
bindgen include/nvrtc.h -o src/nvrtc.rs --allowlist-function="^nvrtc.*" --default-enum-style=newtype --no-layout-tests --no-derive-debug -- -Iinclude
bindgen include/nvrtc.h -o src/nvrtc.rs --allowlist-function="^nvrtc.*" --default-enum-style=newtype --no-layout-tests --no-derive-debug --dynamic-loading LibNvrtc --dynamic-link-require-all -- -Iinclude
sed -i -e 's/extern "C" {//g' -e 's/-> nvrtcResult;/-> nvrtcResult { crate::unsupported()/g' -e 's/pub fn /#[no_mangle] pub extern "system" fn /g' src/nvrtc.rs
rustfmt src/nvrtc.rs
Loading

0 comments on commit 2930436

Please sign in to comment.