mirror of
https://github.com/vosen/ZLUDA.git
synced 2025-08-25 11:48:41 +00:00
Start converting host code to HIP
This commit is contained in:
parent
9631a8d242
commit
4ae7feb93a
10 changed files with 5806 additions and 0 deletions
8
hip_runtime-sys/Cargo.toml
Normal file
8
hip_runtime-sys/Cargo.toml
Normal file
|
@ -0,0 +1,8 @@
|
|||
[package]
|
||||
name = "hip_runtime-sys"
|
||||
version = "0.0.0"
|
||||
authors = ["Andrzej Janik <vosen@vosen.pl>"]
|
||||
edition = "2018"
|
||||
links = "amdhip"
|
||||
|
||||
[lib]
|
2
hip_runtime-sys/README
Normal file
2
hip_runtime-sys/README
Normal file
|
@ -0,0 +1,2 @@
|
|||
bindgen include/hip_runtime_api.h -o src/hip_runtime_api.rs --no-layout-tests --size_t-is-usize --default-enum-style=newtype --whitelist-function "hip.*" --whitelist-type "hip.*" -- -I/opt/rocm/include
|
||||
sed -i 's/pub struct hipError_t/#[must_use]\npub struct hipError_t/g' src/hip_runtime_api.rs
|
7
hip_runtime-sys/build.rs
Normal file
7
hip_runtime-sys/build.rs
Normal file
|
@ -0,0 +1,7 @@
|
|||
use std::env::VarError;
|
||||
|
||||
fn main() -> Result<(), VarError> {
|
||||
println!("cargo:rustc-link-lib=dylib=amdhip64");
|
||||
println!("cargo:rustc-link-search=/opt/rocm/lib/");
|
||||
Ok(())
|
||||
}
|
2
hip_runtime-sys/include/hip_runtime_api.h
Normal file
2
hip_runtime-sys/include/hip_runtime_api.h
Normal file
|
@ -0,0 +1,2 @@
|
|||
#define __HIP_PLATFORM_HCC__
|
||||
#include <hip/hip_runtime_api.h>
|
5780
hip_runtime-sys/src/hip_runtime_api.rs
Normal file
5780
hip_runtime-sys/src/hip_runtime_api.rs
Normal file
File diff suppressed because it is too large
Load diff
3
hip_runtime-sys/src/lib.rs
Normal file
3
hip_runtime-sys/src/lib.rs
Normal file
|
@ -0,0 +1,3 @@
|
|||
#![allow(warnings)]
|
||||
pub mod hip_runtime_api;
|
||||
pub use hip_runtime_api::*;
|
Loading…
Add table
Add a link
Reference in a new issue