@@ -55,6 +55,7 @@ Here is the table of currently available bindings:
55
55
| :-------------| :------------| :---------------| :----------------------|
56
56
| 6.2.2 | rocm__ 6_2_2 | cubecl-hip-sys | 6.2.2003 |
57
57
| 6.2.4 | rocm__ 6_2_4 | cubecl-hip-sys | 6.2.4001 |
58
+ | 6.3.0 | rocm__ 6_3_0 | cubecl-hip-sys | 6.3.0000 |
58
59
59
60
Here is a table of the libraries covered by each crate:
60
61
@@ -86,44 +87,56 @@ tested version.
86
87
and ` Usage ` sections.
87
88
88
89
2 ) Generate the bindings using the dedicated xtask command ` bindgen ` . For instance, to generate
89
- the bindings for the crate ` cubecl-hip-sys ` and the ROCm version ` 6.2.4 ` :
90
+ the bindings for the crate ` cubecl-hip-sys ` and the ROCm version ` 6.3.0 ` :
90
91
91
92
``` sh
92
- cargo xtask bindgen -c cubecl-hip-sys -v 6.2.4
93
+ cargo xtask bindgen -c cubecl-hip-sys -v 6.3.0
93
94
```
94
95
95
- 3 ) Declare a new feature in the ` Cargo.toml ` of the corresponding crate ` cubecl-hip-sys ` with
96
- the format ` rocm__<version> ` where ` <version> ` is the ROCm version with ` _ ` separator. For
97
- instance for the version ` 6.2.4 ` :
96
+ 3 ) If the HIP bindings patch version has changed, declare a new ` hip ` feature in the ` Cargo.toml `
97
+ of the corresponding crate ` cubecl-hip-sys ` with the format ` hip_<patch_version> ` . For instance
98
+ the version ` 6.3.0 ` has a new HIP patch version which is ` 42131 ` . Is the patch version did not
99
+ change then skip this step.
98
100
99
101
``` toml
100
102
[features ]
101
- rocm__6_2_4 = []
103
+ hip_42131 = []
102
104
```
103
105
104
- 4 ) Replace the default feature in the ` Cargo.toml ` file be the latest one, in this case ` rocm__6_2_4 ` .
106
+ 4 ) Declare a new ` rocm ` feature in the ` Cargo.toml ` of the corresponding crate ` cubecl-hip-sys `
107
+ with the format ` rocm__<version> ` where ` <version> ` is the ROCm version with ` _ ` separator and
108
+ add a dependency on its corresponding HIP bindings patch version. Note that sometimes the HIP
109
+ bindings are not changed between two version of ROCm, in this case reuse the already existing
110
+ hip feature.
105
111
106
112
``` toml
107
113
[features ]
108
- default = [" rocm__6_2_4" ]
114
+ rocm__6_3_0 = [ " hip_42131" ]
115
+ ```
116
+
117
+ 4 ) Replace the default feature in the ` Cargo.toml ` file be the latest one, in this case ` rocm__6_3_0 ` .
118
+
119
+ ``` toml
120
+ [features ]
121
+ default = [" rocm__6_3_0" ]
109
122
```
110
123
111
124
5 ) Add the generated bindings module to the file ` crates/cubecl-hip-sys/src/bindings/mod.rs `
112
125
conditionally to the new feature you just declared as well as the re-exports:
113
126
114
127
``` rs
115
- #[cfg(feature = " rocm__6_2_4 " )]
116
- mod bindings_624 ;
117
- #[cfg(feature = " rocm__6_2_4 " )]
118
- pub use bindings_624 :: * ;
128
+ #[cfg(feature = " hip_42131 " )]
129
+ mod bindings_42131 ;
130
+ #[cfg(feature = " hip_42131 " )]
131
+ pub use bindings_42131 :: * ;
119
132
```
120
133
121
- 6 ) Run the tests as explain in the previous section. Use the new feature you just created.
122
- Currently there is no test selection mechanism in place given a ROCm version. If there are
123
- errors you can use conditional attributes for now.
134
+ 6 ) Run the tests as explain in the previous section using the new feature you just created.
124
135
125
136
7 ) Open a pull request with the modifications, do not forget to add the new generated bindings
126
137
file in the ` crates/cubecl-hip-sys/src/bindings/ ` directory.
127
138
139
+ 8 ) Note that the CI runner might need to be updated by an administrator to install the new version of ROCm.
140
+
128
141
[ 1 ] : https://rocmdocs.amd.com/projects/install-on-linux/en/latest/install/detailed-install.html
129
142
[ 2 ] : https://crates.io/crates/cubecl-hip-sys
0 commit comments