@@ -264,73 +264,61 @@ def forward(self, x):
264
264
"mv2" : {
265
265
"model_class" : MV2 ,
266
266
"input_shapes" : [(1 , 3 , 224 , 224 )],
267
- "device" : "cuda" ,
268
267
"description" : "MobileNetV2 model" ,
269
268
},
270
269
"resnet18" : {
271
270
"model_class" : ResNet18 ,
272
271
"input_shapes" : [(1 , 3 , 224 , 224 )],
273
- "device" : "cuda" ,
274
272
"description" : "ResNet18 model" ,
275
273
},
276
274
"linear" : {
277
275
"model_class" : Linear ,
278
276
"input_shapes" : [(127 , 7 )],
279
- "device" : "cuda" ,
280
277
"description" : "Simple linear layer model" ,
281
278
},
282
279
"conv2d" : {
283
280
"model_class" : SingleConv2d ,
284
281
"input_shapes" : [(4 , 3 , 8 , 8 )],
285
- "device" : "cuda" ,
286
282
"description" : "Single Conv2d layer model" ,
287
283
},
288
284
"depthwise_conv" : {
289
285
"model_class" : DepthwiseConv ,
290
286
"input_shapes" : [(1 , 32 , 112 , 112 )],
291
- "device" : "cuda" ,
292
287
"description" : "Single Depthwise Conv2d layer model" ,
293
288
},
294
289
"add" : {
295
290
"model_class" : Add ,
296
291
"input_shapes" : [(10 ,), (10 ,)],
297
- "device" : "cuda" ,
298
292
"description" : "Simple tensor addition model" ,
299
293
},
300
294
"batchnorm" : {
301
295
"model_class" : BatchNorm ,
302
296
"input_shapes" : [(1 , 16 , 32 , 32 )],
303
- "device" : "cuda" ,
304
297
"description" : "Single BatchNorm2d layer model" ,
305
298
},
306
299
"single_resnet_block" : {
307
300
"model_class" : SingleResNetBlock ,
308
301
"input_shapes" : [(1 , 64 , 8 , 8 )],
309
- "device" : "cuda" ,
310
302
"description" : "Single ResNet block with skip connection" ,
311
303
},
312
304
"llama31" : {
313
305
"model_class" : Llama31 ,
314
306
"input_shapes" : [(1 , 32 )], # batch_size=1, sequence_length=128
315
- "device" : "cuda" ,
316
307
"description" : "Llama 3.1 model with KV cache disabled" ,
317
308
},
318
309
"whisper" : {
319
310
"model_class" : Whisper ,
320
311
"input_shapes" : [(1 , 80 , 3000 )],
321
- "device" : "cuda" ,
322
312
"description" : "OpenAI Whisper ASR model. now is encoder only" ,
323
313
},
324
314
"conv1d" : {
325
315
"model_class" : MockConv1d ,
326
316
"input_shapes" : [(1 , 80 , 3000 )],
327
- "device" : "cuda" ,
328
317
"description" : "Conv1d layer with 80 input channels, 384 output channels" ,
329
318
},
330
319
"transformer_block" : {
331
320
"model_class" : TransformerBlock ,
332
321
"input_shapes" : [(4 , 32 , 256 )], # batch_size=4, seq_len=32, embed_dim=256
333
- "device" : "cuda" ,
334
322
"description" : "Single transformer block with multi-head attention and feed-forward network" ,
335
323
},
336
324
}
@@ -350,7 +338,7 @@ def get_model_and_inputs(
350
338
model_config = MODEL_REGISTRY [model_name ]
351
339
model_class = model_config ["model_class" ]
352
340
input_shapes = model_config ["input_shapes" ]
353
- device = model_config [ "device" ]
341
+ device = "cpu"
354
342
355
343
# Create model instance
356
344
model = model_class ().to (device ).eval ()
0 commit comments