Skip to content

Commit aea5b0f

Browse files
committed
build: update cuda-driver
Signed-off-by: YdrMaster <[email protected]>
1 parent 972e357 commit aea5b0f

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ infini-op = { git = "https://github.com/InfiniTensor/infini-toolkit", rev = "e83
1212
infini-ccl = { git = "https://github.com/InfiniTensor/infini-toolkit", rev = "e8362c3" }
1313
search-infini-tools = { git = "https://github.com/InfiniTensor/infini-toolkit", rev = "e8362c3" }
1414

15-
cuda = { git = "https://github.com/YdrMaster/cuda-driver", rev = "1751f0a" }
16-
cublas = { git = "https://github.com/YdrMaster/cuda-driver", rev = "1751f0a" }
17-
nccl = { git = "https://github.com/YdrMaster/cuda-driver", rev = "1751f0a" }
18-
search-cuda-tools = { git = "https://github.com/YdrMaster/cuda-driver", rev = "1751f0a" }
19-
search-corex-tools = { git = "https://github.com/YdrMaster/cuda-driver", rev = "1751f0a" }
15+
cuda = { git = "https://github.com/YdrMaster/cuda-driver", rev = "a815e41" }
16+
cublas = { git = "https://github.com/YdrMaster/cuda-driver", rev = "a815e41" }
17+
nccl = { git = "https://github.com/YdrMaster/cuda-driver", rev = "a815e41" }
18+
search-cuda-tools = { git = "https://github.com/YdrMaster/cuda-driver", rev = "a815e41" }
19+
search-corex-tools = { git = "https://github.com/YdrMaster/cuda-driver", rev = "a815e41" }

operators/src/rms_norm/common_cpu/mod.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,15 @@ unsafe impl<W, A> Sync for Scheme<W, A> {}
9797
impl<W, A> Scheme<W, A> {
9898
#[inline]
9999
unsafe fn y_ptr(&self, i: isize, j: isize) -> *mut A {
100-
self.y.byte_offset(i * self.nsy + j * self.dsy)
100+
unsafe { self.y.byte_offset(i * self.nsy + j * self.dsy) }
101101
}
102102
#[inline]
103103
unsafe fn x_ptr(&self, i: isize, j: isize) -> *const A {
104-
self.x.byte_offset(i * self.nsx + j * self.dsx)
104+
unsafe { self.x.byte_offset(i * self.nsx + j * self.dsx) }
105105
}
106106
#[inline]
107107
unsafe fn w_ptr(&self, j: isize) -> *const W {
108-
self.w.byte_offset(j * self.dsw)
108+
unsafe { self.w.byte_offset(j * self.dsw) }
109109
}
110110
}
111111

@@ -125,54 +125,54 @@ impl<W> Scheme<W, f16> {
125125

126126
#[inline]
127127
unsafe fn y(&self, i: isize, j: isize, val: f32) {
128-
self.y_ptr(i, j).write(f16::from_f32(val))
128+
unsafe { self.y_ptr(i, j).write(f16::from_f32(val)) }
129129
}
130130
#[inline]
131131
unsafe fn x(&self, i: isize, j: isize) -> f32 {
132-
self.x_ptr(i, j).read().to_f32()
132+
unsafe { self.x_ptr(i, j).read().to_f32() }
133133
}
134134
}
135135
impl<W> Scheme<W, f32> {
136136
impl_k!(f32);
137137

138138
#[inline]
139139
unsafe fn y(&self, i: isize, j: isize, val: f32) {
140-
self.y_ptr(i, j).write(val)
140+
unsafe { self.y_ptr(i, j).write(val) }
141141
}
142142
#[inline]
143143
unsafe fn x(&self, i: isize, j: isize) -> f32 {
144-
self.x_ptr(i, j).read()
144+
unsafe { self.x_ptr(i, j).read() }
145145
}
146146
}
147147
impl<W> Scheme<W, f64> {
148148
impl_k!(f64);
149149

150150
#[inline]
151151
unsafe fn y(&self, i: isize, j: isize, val: f64) {
152-
self.y_ptr(i, j).write(val)
152+
unsafe { self.y_ptr(i, j).write(val) }
153153
}
154154
#[inline]
155155
unsafe fn x(&self, i: isize, j: isize) -> f64 {
156-
self.x_ptr(i, j).read()
156+
unsafe { self.x_ptr(i, j).read() }
157157
}
158158
}
159159

160160
impl<A> Scheme<f16, A> {
161161
#[inline]
162162
unsafe fn w(&self, j: isize) -> f32 {
163-
self.w_ptr(j).read().to_f32()
163+
unsafe { self.w_ptr(j).read() }.to_f32()
164164
}
165165
}
166166
impl<A> Scheme<f32, A> {
167167
#[inline]
168168
unsafe fn w(&self, j: isize) -> f32 {
169-
self.w_ptr(j).read()
169+
unsafe { self.w_ptr(j).read() }
170170
}
171171
}
172172
impl<A> Scheme<f64, A> {
173173
#[inline]
174174
unsafe fn w(&self, j: isize) -> f64 {
175-
self.w_ptr(j).read()
175+
unsafe { self.w_ptr(j).read() }
176176
}
177177
}
178178

0 commit comments

Comments
 (0)