File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -448,7 +448,7 @@ void* fbgemmAlignedAlloc(
448
448
ret = posix_memalign (&aligned_mem, align, size);
449
449
#endif
450
450
// Throw std::bad_alloc in the case of memory allocation failure.
451
- if (raiseException || ret || aligned_mem == nullptr ) {
451
+ if (raiseException && ( ret || aligned_mem == nullptr ) ) {
452
452
throw std::bad_alloc ();
453
453
}
454
454
return aligned_mem;
@@ -478,7 +478,7 @@ int fbgemmGet2DPartition(
478
478
// for large thread numbers, we would like to reduce the aspect_ratio ---
479
479
// if the matrix is short-and-fat
480
480
// this allows us to assign more parallelism to i-dimension
481
- if (nthreads > 16 && m / n < 0.2 ) {
481
+ if (nthreads > 16 && static_cast < double >(m) / n < 0.2 ) {
482
482
aspect_ratio = 0.2 ;
483
483
}
484
484
You can’t perform that action at this time.
0 commit comments