forked from vosen/ZLUDA
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix hipBLASLt on ROCm 6. Enable hipBLASLt on Windows. * Clean up. * Add cublasXt apis. * Remove warnings. * Resolve or hide warnings. * Fix bug. * Regenerate cublas bindings. * Build improvements. * Bump versions. * Restore Linux build as usual. * Add missing call to hgemm. * or_else. * Fix. * Fix bug. * Clean up.
- Loading branch information
1 parent
2930436
commit d60bddb
Showing
29 changed files
with
2,772 additions
and
1,263 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
bindgen /opt/rocm/include/hipblaslt/hipblaslt.h -o src/hipblaslt.rs --no-layout-tests --default-enum-style=newtype --allowlist-function "^hipblasLt.*" --allowlist-type "^hipblasLt.*" --no-derive-debug --must-use-type hiprtError -- -I /opt/rocm/include -D__HIP_PLATFORM_AMD__ -D__HIP_PLATFORM_HCC__ -x c++ | ||
bindgen $Env:HIP_PATH/include/hipblaslt/hipblaslt.h -o src/hipblaslt.rs --no-layout-tests --default-enum-style=newtype --allowlist-function "^hipblasLt.*" --allowlist-type "^hipblasLt.*" --no-derive-debug --must-use-type hiprtError -- -I"$Env:HIP_PATH/include" -D__HIP_PLATFORM_AMD__ -D__HIP_PLATFORM_HCC__ -x c++ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,19 @@ | ||
use std::env::VarError; | ||
use std::{env, path::PathBuf}; | ||
|
||
fn main() -> Result<(), VarError> { | ||
println!("cargo:rustc-link-lib=dylib=hipblaslt"); | ||
println!("cargo:rustc-link-search=native=/opt/rocm/lib/"); | ||
if cfg!(windows) { | ||
let env = env::var("CARGO_CFG_TARGET_ENV")?; | ||
if env == "msvc" { | ||
let mut path = PathBuf::from(env::var("HIP_PATH")?); | ||
path.push("lib"); | ||
println!("cargo:rustc-link-search=native={}", path.display()); | ||
} else { | ||
println!("cargo:rustc-link-search=native=C:\\Windows\\System32"); | ||
}; | ||
} else { | ||
println!("cargo:rustc-link-search=native=/opt/rocm/lib/"); | ||
} | ||
Ok(()) | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,16 @@ | ||
#[allow(warnings)] | ||
mod hipblaslt; | ||
pub use hipblaslt::*; | ||
pub use hipblaslt::*; | ||
|
||
impl hipblasOperation_t { | ||
pub const HIPBLAS_OP_N: hipblasOperation_t = hipblasOperation_t(111); | ||
} | ||
impl hipblasOperation_t { | ||
pub const HIPBLAS_OP_T: hipblasOperation_t = hipblasOperation_t(112); | ||
} | ||
impl hipblasOperation_t { | ||
pub const HIPBLAS_OP_C: hipblasOperation_t = hipblasOperation_t(113); | ||
} | ||
#[repr(transparent)] | ||
#[derive(Copy, Clone, Hash, PartialEq, Eq)] | ||
pub struct hipblasOperation_t(pub ::std::os::raw::c_int); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
name = "ptx" | ||
version = "0.0.0" | ||
authors = ["Andrzej Janik <[email protected]>"] | ||
edition = "2018" | ||
edition = "2021" | ||
|
||
[lib] | ||
|
||
|
@@ -12,7 +12,6 @@ rocm5 = ["hip_common/rocm5", "hip_runtime-sys/rocm5", "comgr/rocm5"] | |
[dependencies] | ||
hip_common = { path = "../hip_common" } | ||
zluda_llvm = { path = "../zluda_llvm" } | ||
lalrpop-util = "0.20" | ||
regex = "1" | ||
thiserror = "1.0" | ||
num-traits = "0.2" | ||
|
@@ -26,6 +25,10 @@ either = "1.9" | |
version = "1.8" | ||
features = ["num-traits"] | ||
|
||
[dependencies.lalrpop-util] | ||
version = "0.22" | ||
features = ["lexer"] | ||
|
||
[dev-dependencies] | ||
cuda_base = { path = "../cuda_base" } | ||
cuda_types = { path = "../cuda_types" } | ||
|
@@ -37,5 +40,5 @@ libloading = "0.8" | |
lazy_static = "1.4.0" | ||
|
||
[build-dependencies.lalrpop] | ||
version = "0.20" | ||
version = "0.22" | ||
features = ["lexer"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
name = "zluda" | ||
version = "0.0.0" | ||
authors = ["Andrzej Janik <[email protected]>"] | ||
edition = "2018" | ||
edition = "2021" | ||
|
||
[lib] | ||
name = "zluda" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.