Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/tinygrad/tinygrad
/ cast
Method
cast
test/mockgpu/mockgpu.py:32–34 ·
view source on GitHub ↗
(self, new_type, **kwargs)
Source
from the content-addressed store, hash-verified
30
self.wcb(self.mv, index)
31
32
def
cast(self, new_type, **kwargs):
33
self.mv = self.mv.cast(
'B'
).cast(new_type, **kwargs)
34
return
self
35
36
@property
37
def
nbytes(self):
return
self.mv.nbytes
Callers
15
eval_uop
Function · 0.45
test_cast_bool
Method · 0.45
test_cast_bool_to_int_ne_const
Method · 0.45
test_where_cast
Method · 0.45
test_symbolic_range_doesnt_collapse
Method · 0.45
test_do_math_in_int32
Method · 0.45
test_range_split_on_mod
Method · 0.45
test_floordiv_bool
Method · 0.45
test_mod_bool
Method · 0.45
test_fmod_bool
Method · 0.45
test_simplify_valid_from_div
Method · 0.45
test_load_in_valid
Method · 0.45
Calls
no outgoing calls
Tested by
15
test_cast_bool
Method · 0.36
test_cast_bool_to_int_ne_const
Method · 0.36
test_where_cast
Method · 0.36
test_symbolic_range_doesnt_collapse
Method · 0.36
test_do_math_in_int32
Method · 0.36
test_range_split_on_mod
Method · 0.36
test_floordiv_bool
Method · 0.36
test_mod_bool
Method · 0.36
test_fmod_bool
Method · 0.36
test_simplify_valid_from_div
Method · 0.36
test_load_in_valid
Method · 0.36
test_range_no_shrink_when_used_in_reduce
Method · 0.36