@@ -239,7 +239,7 @@ def __init__(self, name, shortname, *, bytes, is_weak):
239
239
240
240
boolean_dtypes = {bool8 , bool8_ , bool }
241
241
242
- integer_dtypes = {d for d in all_dtypes if isinstance (d , exact )} | {bool , int }
242
+ integer_dtypes = {d for d in all_dtypes if isinstance (d , exact )} | {bool , int } | { uint64 , uint64_ }
243
243
244
244
nonboolean_integer_dtypes = {d for d in integer_dtypes if (not isinstance (d , bool_ ) and d is not bool )}
245
245
@@ -264,7 +264,7 @@ def __init__(self, name, shortname, *, bytes, is_weak):
264
264
265
265
weak_dtypes = {d for d in all_dtypes if d .is_weak } | all_numbertypes
266
266
267
- strong_dtypes = {d for d in all_dtypes if not d .is_weak }
267
+ strong_dtypes = {d for d in all_dtypes if not d .is_weak } | { uint64 }
268
268
269
269
270
270
def is_weak_dtype (dtype ):
@@ -384,9 +384,11 @@ def corresponding_complex_dtype(dtype):
384
384
385
385
386
386
_name_to_dtype_map = {dtype .full_name : dtype for dtype in all_dtypes }
387
+ _name_to_dtype_map .update ({uint64 .full_name : uint64 , uint64_ .full_name : uint64_ })
387
388
_strong_dtype_to_weak_dtype_map = {
388
389
dtype : _name_to_dtype_map [f"{ dtype .full_name } _" ] for dtype in all_dtypes if not dtype .is_weak
389
390
}
391
+ _strong_dtype_to_weak_dtype_map .update ({uint64 : uint64_ })
390
392
391
393
_weak_dtype_to_strong_dtype_map = {v : k for k , v in _strong_dtype_to_weak_dtype_map .items ()}
392
394
_weak_dtype_to_strong_dtype_map .update (
@@ -395,6 +397,7 @@ def corresponding_complex_dtype(dtype):
395
397
int : int64 ,
396
398
float : float32 ,
397
399
complex : complex64 ,
400
+ uint64_ : uint64 ,
398
401
}
399
402
)
400
403
@@ -524,6 +527,12 @@ def are_same_dtypes(a, b, *, weak_and_strong_are_equivalent=True):
524
527
if hasattr (torch , dtype .full_name .rstrip ("_" ))
525
528
}
526
529
)
530
+ _thunder_to_torch_dtype_map .update (
531
+ {
532
+ uint64 : torch .uint64 ,
533
+ uint64_ : torch .uint64 ,
534
+ }
535
+ )
527
536
528
537
_torch_to_thunder_dtype_map = {
529
538
v : k
0 commit comments