Module Import alias Import alias Import alias ImportFrom alias ImportFrom alias ClassDef bases AttributeLoad NameLoad attr body Assign NameStore Num FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr AugAssignAdd AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Num Pass decorator_list decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad Num decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad Num Assign NameStore BinOpAdd NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Num Call NameLoad NameLoad Assign NameStore BinOpAdd Num NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Num Call NameLoad NameLoad AugAssignAdd NameStore Num Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Num Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad NameLoad attr Assign NameStore BinOpAdd Call NameLoad Num Num Assign NameStore BinOpSub NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad AugAssignSub NameStore Num Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Num Num Assign NameStore Call AttributeLoad NameLoad attr For NameStore Call NameLoad Num body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num AugAssignAdd NameStore Num decorator_list decorator_list AttributeLoad NameLoad attr ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Assign NameStore AttributeLoad NameLoad attr Delete NameDel Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Assign NameStore AttributeLoad NameLoad attr Delete NameDel Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Assign NameStore AttributeLoad NameLoad attr Delete NameDel Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list decorator_list AttributeLoad NameLoad attr ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad AttributeLoad NameLoad attr attr Num body Assign NameStore AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Num attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad AttributeLoad NameLoad attr attr Num body Assign NameStore AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Num attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad AttributeLoad NameLoad attr attr Num body Assign NameStore AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Num attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Num decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad AttributeLoad NameLoad attr attr Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Num decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad AttributeLoad NameLoad attr attr Num body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Num decorator_list decorator_list AttributeLoad NameLoad attr
N/A N/A ctypes N/A unittest N/A cupy.cuda cupy.cuda memory cupy testing MockMemory N/A N/A memory Memory N/A N/A cur_ptr 1 __init__ N/A N/A self size N/A N/A N/A N/A self ptr N/A MockMemory cur_ptr N/A N/A MockMemory cur_ptr size N/A N/A self size size N/A N/A self device None N/A __del__ N/A N/A self N/A N/A N/A N/A self ptr 0 N/A N/A N/A mock_alloc N/A N/A size N/A N/A N/A mem N/A MockMemory size N/A N/A N/A memory MemoryPointer mem 0 N/A TestMemoryPointer N/A N/A unittest TestCase N/A test_int N/A N/A self N/A N/A N/A pval N/A MockMemory cur_ptr N/A memptr N/A mock_alloc 1 N/A N/A N/A self assertEqual pval N/A int memptr N/A test_add N/A N/A self N/A N/A N/A pval N/A MockMemory cur_ptr N/A memptr N/A mock_alloc 8 N/A memptr2 N/A memptr 4 N/A N/A N/A self assertIsInstance memptr2 N/A memory MemoryPointer N/A N/A N/A self assertEqual N/A pval 4 N/A int memptr2 N/A memptr3 N/A 4 memptr N/A N/A N/A self assertIsInstance memptr3 N/A memory MemoryPointer N/A N/A N/A self assertEqual N/A pval 4 N/A int memptr3 N/A memptr 4 N/A N/A N/A self assertIsInstance memptr N/A memory MemoryPointer N/A N/A N/A self assertEqual N/A pval 4 N/A int memptr N/A test_sub N/A N/A self N/A N/A N/A pval N/A MockMemory cur_ptr N/A memptr N/A N/A mock_alloc 8 4 N/A memptr2 N/A memptr 4 N/A N/A N/A self assertIsInstance memptr2 N/A memory MemoryPointer N/A N/A N/A self assertEqual pval N/A int memptr2 N/A memptr 4 N/A N/A N/A self assertIsInstance memptr N/A memory MemoryPointer N/A N/A N/A self assertEqual pval N/A int memptr N/A test_copy_to_and_from_host N/A N/A self N/A N/A N/A a_gpu N/A N/A memory alloc 4 N/A a_cpu N/A N/A ctypes c_int 100 N/A N/A N/A a_gpu copy_from N/A N/A ctypes cast N/A N/A ctypes byref a_cpu N/A ctypes c_void_p 4 N/A b_cpu N/A N/A ctypes c_int N/A N/A N/A a_gpu copy_to_host N/A N/A ctypes cast N/A N/A ctypes byref b_cpu N/A ctypes c_void_p 4 N/A N/A N/A self assertEqual N/A b_cpu value N/A a_cpu value N/A test_copy_from_device N/A N/A self N/A N/A N/A a_gpu N/A N/A memory alloc 4 N/A a_cpu N/A N/A ctypes c_int 100 N/A N/A N/A a_gpu copy_from N/A N/A ctypes cast N/A N/A ctypes byref a_cpu N/A ctypes c_void_p 4 N/A b_gpu N/A N/A memory alloc 4 N/A N/A N/A b_gpu copy_from a_gpu 4 N/A b_cpu N/A N/A ctypes c_int N/A N/A N/A b_gpu copy_to_host N/A N/A ctypes cast N/A N/A ctypes byref b_cpu N/A ctypes c_void_p 4 N/A N/A N/A self assertEqual N/A b_cpu value N/A a_cpu value N/A test_memset N/A N/A self N/A N/A N/A a_gpu N/A N/A memory alloc 4 N/A N/A N/A a_gpu memset 1 4 N/A a_cpu N/A N/A ctypes c_ubyte N/A i N/A range 4 N/A N/A N/A N/A a_gpu copy_to_host N/A N/A ctypes cast N/A N/A ctypes byref a_cpu N/A ctypes c_void_p 1 N/A N/A N/A self assertEqual N/A a_cpu value 1 N/A a_gpu 1 N/A N/A N/A testing gpu TestSingleDeviceMemoryPool N/A N/A unittest TestCase N/A setUp N/A N/A self N/A N/A N/A N/A self pool N/A N/A memory SingleDeviceMemoryPool allocator mock_alloc N/A test_alloc N/A N/A self N/A N/A N/A p1 N/A N/A N/A self pool malloc 1000 N/A p2 N/A N/A N/A self pool malloc 1000 N/A p3 N/A N/A N/A self pool malloc 2000 N/A N/A N/A self assertNotEqual N/A p1 ptr N/A p2 ptr N/A N/A N/A self assertNotEqual N/A p1 ptr N/A p3 ptr N/A N/A N/A self assertNotEqual N/A p2 ptr N/A p3 ptr N/A test_free N/A N/A self N/A N/A N/A p1 N/A N/A N/A self pool malloc 1000 N/A ptr1 N/A p1 ptr N/A p1 N/A p2 N/A N/A N/A self pool malloc 1000 N/A N/A N/A self assertEqual ptr1 N/A p2 ptr N/A test_free_different_size N/A N/A self N/A N/A N/A p1 N/A N/A N/A self pool malloc 1000 N/A ptr1 N/A p1 ptr N/A p1 N/A p2 N/A N/A N/A self pool malloc 2000 N/A N/A N/A self assertNotEqual ptr1 N/A p2 ptr N/A test_free_all_free N/A N/A self N/A N/A N/A p1 N/A N/A N/A self pool malloc 1000 N/A ptr1 N/A p1 ptr N/A p1 N/A N/A N/A N/A self pool free_all_free N/A p2 N/A N/A N/A self pool malloc 1000 N/A N/A N/A self assertNotEqual ptr1 N/A p2 ptr N/A N/A N/A testing gpu TestMemoryPool N/A N/A unittest TestCase N/A setUp N/A N/A self N/A N/A N/A N/A self pool N/A N/A memory MemoryPool N/A test_zero_size_alloc N/A N/A self N/A N/A N/A N/A N/A N/A cupy cuda Device 0 N/A N/A mem N/A N/A N/A N/A self pool malloc 0 mem N/A N/A N/A self assertIsInstance mem N/A memory Memory N/A N/A N/A self assertNotIsInstance mem N/A memory PooledMemory N/A test_double_free N/A N/A self N/A N/A N/A N/A N/A N/A cupy cuda Device 0 N/A N/A mem N/A N/A N/A N/A self pool malloc 1 mem N/A N/A N/A mem free N/A N/A N/A mem free N/A test_free_all_free N/A N/A self N/A N/A N/A N/A N/A N/A cupy cuda Device 0 N/A N/A mem N/A N/A N/A N/A self pool malloc 1 mem N/A N/A N/A self assertIsInstance mem N/A memory Memory N/A N/A N/A self assertIsInstance mem N/A memory PooledMemory N/A N/A N/A self assertEqual N/A N/A N/A self pool n_free_blocks 0 N/A N/A N/A mem free N/A N/A N/A self assertEqual N/A N/A N/A self pool n_free_blocks 1 N/A N/A N/A N/A self pool free_all_free N/A N/A N/A self assertEqual N/A N/A N/A self pool n_free_blocks 0 N/A test_free_all_free_without_malloc N/A N/A self N/A N/A N/A N/A N/A N/A cupy cuda Device 0 N/A N/A N/A N/A N/A self pool free_all_free N/A N/A N/A self assertEqual N/A N/A N/A self pool n_free_blocks 0 N/A test_n_free_blocks_without_malloc N/A N/A self N/A N/A N/A N/A N/A N/A cupy cuda Device 0 N/A N/A N/A N/A self assertEqual N/A N/A N/A self pool n_free_blocks 0 N/A N/A N/A testing gpu