File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1141,13 +1141,15 @@ static int check_total_size(
1141
1141
//
1142
1142
// 0.75 value supposed to be experimental and might be adjusted.
1143
1143
static constexpr float scratch_trh = 0 .75f ;
1144
- if (check_mem_size_args.scratchpad_size
1145
- > scratch_trh * total_size_cpu) {
1144
+ if (is_cpu ()
1145
+ && check_mem_size_args.scratchpad_size
1146
+ > scratch_trh * check_mem_size_args.total_size_device ) {
1146
1147
BENCHDNN_PRINT (2 ,
1147
1148
" [CHECK_MEM][%s]: CPU scratchpad size `%zu` exceeded a "
1148
1149
" given threshold `%zu`.\n " ,
1149
1150
dir_c_str (), check_mem_size_args.scratchpad_size ,
1150
- (size_t )(scratch_trh * total_size_cpu));
1151
+ (size_t )(scratch_trh
1152
+ * check_mem_size_args.total_size_device ));
1151
1153
res->state = FAILED;
1152
1154
} else {
1153
1155
res->state = SKIPPED;
You can’t perform that action at this time.
0 commit comments