@@ -31,6 +31,8 @@ pub struct General {
3131
3232 pub hub : Option < Hub > ,
3333
34+ pub neuron : Option < NeuronGeneral > ,
35+
3436 pub python_depends : Option < Vec < String > > ,
3537
3638 pub xpu : Option < XpuGeneral > ,
@@ -44,6 +46,12 @@ pub struct CudaGeneral {
4446 pub python_depends : Option < Vec < String > > ,
4547}
4648
49+ #[ derive( Debug , Deserialize , Serialize ) ]
50+ #[ serde( deny_unknown_fields, rename_all = "kebab-case" ) ]
51+ pub struct NeuronGeneral {
52+ pub python_depends : Option < Vec < String > > ,
53+ }
54+
4755#[ derive( Debug , Deserialize , Serialize ) ]
4856#[ serde( deny_unknown_fields, rename_all = "kebab-case" ) ]
4957pub struct XpuGeneral {
@@ -121,6 +129,7 @@ pub enum Backend {
121129 Cpu ,
122130 Cuda ,
123131 Metal ,
132+ Neuron ,
124133 Rocm ,
125134 Xpu ,
126135}
@@ -150,6 +159,7 @@ impl From<General> for super::General {
150159 backends : general. backends . into_iter ( ) . map ( Into :: into) . collect ( ) ,
151160 cuda : general. cuda . map ( Into :: into) ,
152161 hub : general. hub . map ( Into :: into) ,
162+ neuron : general. neuron . map ( Into :: into) ,
153163 python_depends : general. python_depends ,
154164 xpu : general. xpu . map ( Into :: into) ,
155165 }
@@ -166,6 +176,14 @@ impl From<CudaGeneral> for super::CudaGeneral {
166176 }
167177}
168178
179+ impl From < NeuronGeneral > for super :: NeuronGeneral {
180+ fn from ( neuron : NeuronGeneral ) -> Self {
181+ Self {
182+ python_depends : neuron. python_depends ,
183+ }
184+ }
185+ }
186+
169187impl From < XpuGeneral > for super :: XpuGeneral {
170188 fn from ( xpu : XpuGeneral ) -> Self {
171189 Self {
@@ -201,6 +219,7 @@ impl From<Backend> for super::Backend {
201219 Backend :: Cpu => super :: Backend :: Cpu ,
202220 Backend :: Cuda => super :: Backend :: Cuda ,
203221 Backend :: Metal => super :: Backend :: Metal ,
222+ Backend :: Neuron => super :: Backend :: Neuron ,
204223 Backend :: Rocm => super :: Backend :: Rocm ,
205224 Backend :: Xpu => super :: Backend :: Xpu ,
206225 }
@@ -304,6 +323,7 @@ impl From<super::General> for General {
304323 backends : general. backends . into_iter ( ) . map ( Into :: into) . collect ( ) ,
305324 cuda : general. cuda . map ( Into :: into) ,
306325 hub : general. hub . map ( Into :: into) ,
326+ neuron : general. neuron . map ( Into :: into) ,
307327 python_depends : general. python_depends ,
308328 xpu : general. xpu . map ( Into :: into) ,
309329 }
@@ -320,6 +340,14 @@ impl From<super::CudaGeneral> for CudaGeneral {
320340 }
321341}
322342
343+ impl From < super :: NeuronGeneral > for NeuronGeneral {
344+ fn from ( neuron : super :: NeuronGeneral ) -> Self {
345+ Self {
346+ python_depends : neuron. python_depends ,
347+ }
348+ }
349+ }
350+
323351impl From < super :: XpuGeneral > for XpuGeneral {
324352 fn from ( xpu : super :: XpuGeneral ) -> Self {
325353 Self {
@@ -355,6 +383,7 @@ impl From<super::Backend> for Backend {
355383 super :: Backend :: Cpu => Backend :: Cpu ,
356384 super :: Backend :: Cuda => Backend :: Cuda ,
357385 super :: Backend :: Metal => Backend :: Metal ,
386+ super :: Backend :: Neuron => Backend :: Neuron ,
358387 super :: Backend :: Rocm => Backend :: Rocm ,
359388 super :: Backend :: Xpu => Backend :: Xpu ,
360389 }
0 commit comments