Skip to content

Commit

Permalink
Fix wrong truncation of MPSShape from int64_t to int32_t (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisVieriu97 committed Jul 14, 2022
1 parent 65e542a commit 9c48392
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aten/src/ATen/native/mps/OperationUtils.mm
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ MPSDataType getMPSScalarType(ScalarType scalar_type) {
{
NSInteger sz_i = (i < sz) ? t.size(i) : 1;

NSNumber* number = [NSNumber numberWithInt:sz_i];
NSNumber* number = [NSNumber numberWithInteger:sz_i];
numbers[i] = number;
}
return [NSArray arrayWithObjects:numbers count:sz_];
Expand All @@ -213,7 +213,7 @@ MPSDataType getMPSScalarType(ScalarType scalar_type) {
{
NSInteger sz_i = (i < sz) ? sizes[i] : 1;

NSNumber* number = [NSNumber numberWithInt:sz_i];
NSNumber* number = [NSNumber numberWithInteger:sz_i];
numbers[i] = number;
}
return [NSArray arrayWithObjects:numbers count:sz_];
Expand Down

0 comments on commit 9c48392

Please sign in to comment.