Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

torch.nn.Conv3D on MPS backend #77818

Closed
tfmoraes opened this issue May 19, 2022 · 16 comments · May be fixed by #116580
Closed

torch.nn.Conv3D on MPS backend #77818

tfmoraes opened this issue May 19, 2022 · 16 comments · May be fixed by #116580
Labels
module: mps Related to Apple Metal Performance Shaders framework topic: new features topic category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@tfmoraes
Copy link

tfmoraes commented May 19, 2022

🐛 Describe the bug

Using Conv3D on MPS backend, like in this sample code:

import torch

x = torch.randn(1, 10, 10, 10, device="mps")
c = torch.nn.Conv3d(1, 1, 3, device="mps")
c(x)

Python process are being aborted with this error:

❯ python test_mps.py
/AppleInternal/Library/BuildRoots/560148d7-a559-11ec-8c96-4add460b61a6/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Core/Files/Operations/MPSGraphConvolutionOps.mm:346: failed assertion `sourceTensor rank must be 4'
fish: Job 1, 'python test_mps.py' terminated by signal SIGABRT (Abort)

This is the full report:

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               Python [48029]
Path:                  /opt/homebrew/*/Python.framework/Versions/3.9/Resources/Python.app/Contents/MacOS/Python
Identifier:            org.python.python
Version:               3.9.12 (3.9.12)
Code Type:             ARM-64 (Native)
Parent Process:        fish [22773]
Responsible:           iTerm2 [74184]
User ID:               501

Date/Time:             2022-05-18 22:44:20.6603 -0300
OS Version:            macOS 12.3.1 (21E258)
Report Version:        12
Anonymous UUID:        37559CD1-BBA5-46C4-92C9-52CBDEDD1C5E

Sleep/Wake UUID:       0D6A0AE4-267E-4E25-8625-6F3AD3D4E3F6

Time Awake Since Boot: 74000 seconds
Time Since Wake:       4829 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: cache queue

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Application Specific Information:
/AppleInternal/Library/BuildRoots/560148d7-a559-11ec-8c96-4add460b61a6/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Core/Files/Operations/MPSGraphConvolutionOps.mm:346: failed assertion `sourceTensor rank must be 4'


Thread 0 Crashed::  Dispatch queue: cache queue
0   libsystem_kernel.dylib        	       0x1af814db8 __pthread_kill + 8
1   libsystem_pthread.dylib       	       0x1af849ee0 pthread_kill + 288
2   libsystem_c.dylib             	       0x1af784340 abort + 168
3   libsystem_c.dylib             	       0x1af783754 __assert_rtn + 272
4   Metal                         	       0x1b82207a8 MTLReportFailure.cold.1 + 56
5   Metal                         	       0x1b820a2c4 MTLReportFailure + 480
6   MetalPerformanceShadersGraph  	       0x212fd1f88 0x212e7f000 + 1388424
7   libtorch_cpu.dylib            	       0x10e9a9b3c invocation function for block in at::native::_mps_convolution(at::Tensor const&, at::Tensor const&, c10::optional<at::Tensor> const&, c10::ArrayRef<long long>, c10::ArrayRef<long long>, c10::ArrayRef<long long>, long long) + 540
8   libtorch_cpu.dylib            	       0x10e99f4e0 invocation function for block in at::native::mps::MPSGraphCache::CreateCachedGraph(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, at::native::mps::MPSCachedGraph* () block_pointer) + 216
9   libdispatch.dylib             	       0x1af6861c8 _dispatch_client_callout + 20
10  libdispatch.dylib             	       0x1af695414 _dispatch_lane_barrier_sync_invoke_and_complete + 56
11  libtorch_cpu.dylib            	       0x10e997634 at::native::mps::MPSGraphCache::CreateCachedGraph(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, at::native::mps::MPSCachedGraph* () block_pointer) + 160
12  libtorch_cpu.dylib            	       0x10e9a8a9c at::native::_mps_convolution(at::Tensor const&, at::Tensor const&, c10::optional<at::Tensor> const&, c10::ArrayRef<long long>, c10::ArrayRef<long long>, c10::ArrayRef<long long>, long long) + 3040
13  libtorch_cpu.dylib            	       0x10bd064c0 at::_ops::_mps_convolution::call(at::Tensor const&, at::Tensor const&, c10::optional<at::Tensor> const&, c10::ArrayRef<long long>, c10::ArrayRef<long long>, c10::ArrayRef<long long>, long long) + 360
14  libtorch_cpu.dylib            	       0x10b528d94 at::native::_convolution(at::Tensor const&, at::Tensor const&, c10::optional<at::Tensor> const&, c10::ArrayRef<long long>, c10::ArrayRef<long long>, c10::ArrayRef<long long>, bool, c10::ArrayRef<long long>, long long, bool, bool, bool, bool) + 12668
15  libtorch_cpu.dylib            	       0x10bb62074 at::_ops::_convolution::call(at::Tensor const&, at::Tensor const&, c10::optional<at::Tensor> const&, c10::ArrayRef<long long>, c10::ArrayRef<long long>, c10::ArrayRef<long long>, bool, c10::ArrayRef<long long>, long long, bool, bool, bool, bool) + 436
16  libtorch_cpu.dylib            	       0x10b51e390 at::native::convolution(at::Tensor const&, at::Tensor const&, c10::optional<at::Tensor> const&, c10::ArrayRef<long long>, c10::ArrayRef<long long>, c10::ArrayRef<long long>, bool, c10::ArrayRef<long long>, long long) + 288
17  libtorch_cpu.dylib            	       0x10bb617a4 at::_ops::convolution::redispatch(c10::DispatchKeySet, at::Tensor const&, at::Tensor const&, c10::optional<at::Tensor> const&, c10::ArrayRef<long long>, c10::ArrayRef<long long>, c10::ArrayRef<long long>, bool, c10::ArrayRef<long long>, long long) + 188
18  libtorch_cpu.dylib            	       0x10d1a83ec c10::impl::wrap_kernel_functor_unboxed_<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (c10::DispatchKeySet, at::Tensor const&, at::Tensor const&, c10::optional<at::Tensor> const&, c10::ArrayRef<long long>, c10::ArrayRef<long long>, c10::ArrayRef<long long>, bool, c10::ArrayRef<long long>, long long), &(torch::autograd::VariableType::(anonymous namespace)::convolution(c10::DispatchKeySet, at::Tensor const&, at::Tensor const&, c10::optional<at::Tensor> const&, c10::ArrayRef<long long>, c10::ArrayRef<long long>, c10::ArrayRef<long long>, bool, c10::ArrayRef<long long>, long long))>, at::Tensor, c10::guts::typelist::typelist<c10::DispatchKeySet, at::Tensor const&, at::Tensor const&, c10::optional<at::Tensor> const&, c10::ArrayRef<long long>, c10::ArrayRef<long long>, c10::ArrayRef<long long>, bool, c10::ArrayRef<long long>, long long> >, at::Tensor (c10::DispatchKeySet, at::Tensor const&, at::Tensor const&, c10::optional<at::Tensor> const&, c10::ArrayRef<long long>, c10::ArrayRef<long long>, c10::ArrayRef<long long>, bool, c10::ArrayRef<long long>, long long)>::call(c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor const&, at::Tensor const&, c10::optional<at::Tensor> const&, c10::ArrayRef<long long>, c10::ArrayRef<long long>, c10::ArrayRef<long long>, bool, c10::ArrayRef<long long>, long long) + 1984
19  libtorch_cpu.dylib            	       0x10bb61400 at::_ops::convolution::call(at::Tensor const&, at::Tensor const&, c10::optional<at::Tensor> const&, c10::ArrayRef<long long>, c10::ArrayRef<long long>, c10::ArrayRef<long long>, bool, c10::ArrayRef<long long>, long long) + 376
20  libtorch_cpu.dylib            	       0x10b51cd14 at::native::conv3d(at::Tensor const&, at::Tensor const&, c10::optional<at::Tensor> const&, c10::ArrayRef<long long>, c10::ArrayRef<long long>, c10::ArrayRef<long long>, long long) + 620
21  libtorch_cpu.dylib            	       0x10bf68288 at::_ops::conv3d::call(at::Tensor const&, at::Tensor const&, c10::optional<at::Tensor> const&, c10::ArrayRef<long long>, c10::ArrayRef<long long>, c10::ArrayRef<long long>, long long) + 360
22  libtorch_python.dylib         	       0x102350da8 torch::autograd::THPVariable_conv3d(_object*, _object*, _object*) + 1092
23  Python                        	       0x10085e8ec cfunction_call + 60
24  Python                        	       0x10080f758 _PyObject_MakeTpCall + 132
25  Python                        	       0x100901294 _PyEval_EvalFrameDefault + 28164
26  Python                        	       0x10081029c _PyFunction_Vectorcall + 184
27  Python                        	       0x100812cf0 method_vectorcall + 124
28  Python                        	       0x1009000d4 _PyEval_EvalFrameDefault + 23620
29  Python                        	       0x10081029c _PyFunction_Vectorcall + 184
30  Python                        	       0x100812d94 method_vectorcall + 288
31  Python                        	       0x1008faf50 _PyEval_EvalFrameDefault + 2752
32  Python                        	       0x1008f9490 _PyEval_EvalCode + 452
33  Python                        	       0x100810340 _PyFunction_Vectorcall + 348
34  Python                        	       0x10080f9d8 _PyObject_FastCallDictTstate + 96
35  Python                        	       0x1008821b8 slot_tp_call + 188
36  Python                        	       0x10080f758 _PyObject_MakeTpCall + 132
37  Python                        	       0x100900280 _PyEval_EvalFrameDefault + 24048
38  Python                        	       0x1008f9490 _PyEval_EvalCode + 452
39  Python                        	       0x100950f20 run_eval_code_obj + 136
40  Python                        	       0x100950e50 run_mod + 112
41  Python                        	       0x10094e464 pyrun_file + 168
42  Python                        	       0x10094dd84 pyrun_simple_file + 252
43  Python                        	       0x10094dc48 PyRun_SimpleFileExFlags + 80
44  Python                        	       0x10096e7ec pymain_run_file + 320
45  Python                        	       0x10096df2c Py_RunMain + 876
46  Python                        	       0x10096f404 Py_BytesMain + 40
47  dyld                          	       0x100295088 start + 516

Thread 1::  Dispatch queue: com.apple.root.utility-qos
0   libsystem_kernel.dylib        	       0x1af80c8d0 mach_msg_trap + 8
1   libsystem_kernel.dylib        	       0x1af80cd40 mach_msg + 76
2   libsystem_notify.dylib        	       0x1b23d2d18 notify_register_check + 1112
3   libsystem_asl.dylib           	       0x1b49ba944 _asl_notify_open + 140
4   libsystem_asl.dylib           	       0x1b49b9398 asl_open + 44
5   libDiagnosticMessagesClient.dylib	       0x1b62f4f90 msgtracer_client + 52
6   libDiagnosticMessagesClient.dylib	       0x1b62f5224 msgtracer_vlog_with_keys_skip_nulls + 428
7   libDiagnosticMessagesClient.dylib	       0x1b62f506c msgtracer_log_with_keys + 36
8   Metal                         	       0x1b8148824 __createContextTelemetryDataWithQueueLabelAndCallstack_block_invoke + 920
9   libdispatch.dylib             	       0x1af684604 _dispatch_call_block_and_release + 32
10  libdispatch.dylib             	       0x1af6861c8 _dispatch_client_callout + 20
11  libdispatch.dylib             	       0x1af697a04 _dispatch_root_queue_drain + 680
12  libdispatch.dylib             	       0x1af698104 _dispatch_worker_thread2 + 164
13  libsystem_pthread.dylib       	       0x1af846324 _pthread_wqthread + 228
14  libsystem_pthread.dylib       	       0x1af845080 start_wqthread + 8

Thread 2::  Dispatch queue: com.Metal.CommandQueueDispatch
0   libsystem_kernel.dylib        	       0x1af80c8d0 mach_msg_trap + 8
1   libsystem_kernel.dylib        	       0x1af80cd40 mach_msg + 76
2   IOKit                         	       0x1b22fd8a8 io_connect_method + 512
3   IOKit                         	       0x1b22fd640 IOConnectCallMethod + 176
4   IOGPU                         	       0x1ca2d03dc IOGPUCommandQueueSubmitCommandBuffers + 144
5   IOGPU                         	       0x1ca2c2ff8 -[IOGPUMetalCommandQueue _submitCommandBuffers:count:] + 820
6   IOGPU                         	       0x1ca2c2c98 -[IOGPUMetalCommandQueue submitCommandBuffers:count:] + 88
7   Metal                         	       0x1b815de0c -[_MTLCommandQueue _submitAvailableCommandBuffers] + 684
8   libdispatch.dylib             	       0x1af6861c8 _dispatch_client_callout + 20
9   libdispatch.dylib             	       0x1af689670 _dispatch_continuation_pop + 500
10  libdispatch.dylib             	       0x1af69c8e0 _dispatch_source_invoke + 1596
11  libdispatch.dylib             	       0x1af68d784 _dispatch_lane_serial_drain + 376
12  libdispatch.dylib             	       0x1af68e404 _dispatch_lane_invoke + 392
13  libdispatch.dylib             	       0x1af698c98 _dispatch_workloop_worker_thread + 648
14  libsystem_pthread.dylib       	       0x1af846360 _pthread_wqthread + 288
15  libsystem_pthread.dylib       	       0x1af845080 start_wqthread + 8

Thread 3:
0   libsystem_kernel.dylib        	       0x1af810a2c __gettimeofday + 12
1   libsystem_c.dylib             	       0x1af712768 gettimeofday + 72
2   libopenblas64_.0.dylib        	       0x1067a0ea4 blas_thread_server + 276
3   libsystem_pthread.dylib       	       0x1af84a26c _pthread_start + 148
4   libsystem_pthread.dylib       	       0x1af84508c thread_start + 8

Thread 4:
0   libsystem_kernel.dylib        	       0x1af80cf2c mach_absolute_time + 108
1   libsystem_kernel.dylib        	       0x1af80e980 __commpage_gettimeofday_internal + 44
2   libsystem_c.dylib             	       0x1af712758 gettimeofday + 56
3   libopenblas64_.0.dylib        	       0x1067a0ea4 blas_thread_server + 276
4   libsystem_pthread.dylib       	       0x1af84a26c _pthread_start + 148
5   libsystem_pthread.dylib       	       0x1af84508c thread_start + 8

Thread 5:
0   libsystem_kernel.dylib        	       0x1af80cf2c mach_absolute_time + 108
1   libsystem_kernel.dylib        	       0x1af80e980 __commpage_gettimeofday_internal + 44
2   libsystem_c.dylib             	       0x1af712758 gettimeofday + 56
3   libopenblas64_.0.dylib        	       0x1067a0ea4 blas_thread_server + 276
4   libsystem_pthread.dylib       	       0x1af84a26c _pthread_start + 148
5   libsystem_pthread.dylib       	       0x1af84508c thread_start + 8

Thread 6:
0   libopenblas64_.0.dylib        	       0x1067a0e8c blas_thread_server + 252
1   libopenblas64_.0.dylib        	       0x1067a0ea4 blas_thread_server + 276
2   libsystem_pthread.dylib       	       0x1af84a26c _pthread_start + 148
3   libsystem_pthread.dylib       	       0x1af84508c thread_start + 8

Thread 7:
0   libsystem_kernel.dylib        	       0x1af80e9b0 __commpage_gettimeofday_internal + 92
1   libsystem_kernel.dylib        	       0x1af80e980 __commpage_gettimeofday_internal + 44
2   libsystem_c.dylib             	       0x1af712758 gettimeofday + 56
3   libopenblas64_.0.dylib        	       0x1067a0ea4 blas_thread_server + 276
4   libsystem_pthread.dylib       	       0x1af84a26c _pthread_start + 148
5   libsystem_pthread.dylib       	       0x1af84508c thread_start + 8

Thread 8:
0   libsystem_kernel.dylib        	       0x1af80e9b0 __commpage_gettimeofday_internal + 92
1   libsystem_kernel.dylib        	       0x1af80e980 __commpage_gettimeofday_internal + 44
2   libsystem_c.dylib             	       0x1af712758 gettimeofday + 56
3   libopenblas64_.0.dylib        	       0x1067a0ea4 blas_thread_server + 276
4   libsystem_pthread.dylib       	       0x1af84a26c _pthread_start + 148
5   libsystem_pthread.dylib       	       0x1af84508c thread_start + 8

Thread 9:
0   libsystem_kernel.dylib        	       0x1af80cf2c mach_absolute_time + 108
1   libsystem_kernel.dylib        	       0x1af80e980 __commpage_gettimeofday_internal + 44
2   libsystem_c.dylib             	       0x1af712758 gettimeofday + 56
3   libopenblas64_.0.dylib        	       0x1067a0ea4 blas_thread_server + 276
4   libsystem_pthread.dylib       	       0x1af84a26c _pthread_start + 148
5   libsystem_pthread.dylib       	       0x1af84508c thread_start + 8

Thread 10:
0   libsystem_pthread.dylib       	       0x1af845078 start_wqthread + 0

Thread 11:
0   libsystem_pthread.dylib       	       0x1af845078 start_wqthread + 0

Thread 12:
0   libsystem_pthread.dylib       	       0x1af845078 start_wqthread + 0


Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x0000000000000000
    x4: 0x0000000000000000   x5: 0x000000000000001a   x6: 0x0000000000000000   x7: 0x0000000000000001
    x8: 0xefad173ca1fc99d9   x9: 0xefad173da1cc1c59  x10: 0xcccccccccccccccd  x11: 0x000000000000000a
   x12: 0x0000000000000000  x13: 0x0000000000000033  x14: 0x0000020000011000  x15: 0x0000000207ff5430
   x16: 0x0000000000000148  x17: 0x00000002096b7640  x18: 0x0000000000000000  x19: 0x0000000000000006
   x20: 0x0000000100308580  x21: 0x0000000000000103  x22: 0x0000000100308660  x23: 0xffffffffffffffff
   x24: 0x00000002057ae000  x25: 0x000000020598e000  x26: 0x00000001b823b482  x27: 0x0000600003ba4cf0
   x28: 0x0000000000000005   fp: 0x000000016fbc4e30   lr: 0x00000001af849ee0
    sp: 0x000000016fbc4e10   pc: 0x00000001af814db8 cpsr: 0x40001000
   far: 0x0000000109ad8000  esr: 0x56000080  Address size fault

Binary Images:
       0x1af80b000 -        0x1af842fff libsystem_kernel.dylib (*) <1d7b3b8e-75a1-34ea-aa52-9f7c23155c55> /usr/lib/system/libsystem_kernel.dylib
       0x1af843000 -        0x1af84ffff libsystem_pthread.dylib (*) <cee8bc77-6923-34d9-89a3-6f8f7279605e> /usr/lib/system/libsystem_pthread.dylib
       0x1af70a000 -        0x1af78bfff libsystem_c.dylib (*) <fd566a15-42d8-314a-a99a-b59237ddf5bc> /usr/lib/system/libsystem_c.dylib
       0x1b813e000 -        0x1b827ffff com.apple.Metal (261.13) <da3fd743-76d9-351c-9bb0-17027a76b6df> /System/Library/Frameworks/Metal.framework/Versions/A/Metal
       0x212e7f000 -        0x21383dfff com.apple.MetalPerformanceShadersGraph (1.0) <92c3cdaa-7900-3e11-b107-3c1fb787fa04> /System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Versions/A/MetalPerformanceShadersGraph
       0x10b294000 -        0x10ff6bfff libtorch_cpu.dylib (*) <7d4fb975-9f75-386e-80ff-70f320c9ef36> /Users/USER/*/libtorch_cpu.dylib
       0x1af682000 -        0x1af6c8fff libdispatch.dylib (*) <dc048e3b-e023-3d17-afe5-4ff3dc625608> /usr/lib/system/libdispatch.dylib
       0x101f9c000 -        0x102bb3fff libtorch_python.dylib (*) <ef946875-fb71-3128-b8ba-2a9b843a02af> /Users/USER/*/libtorch_python.dylib
       0x1007b0000 -        0x100a73fff org.python.python (3.9.12, (c) 2001-2021 Python Software Foundation.) <07c6f0c1-bf5f-3eb1-87a3-9ea5c96126e5> /opt/homebrew/*/Python.framework/Versions/3.9/Python
       0x100290000 -        0x1002effff dyld (*) <fbb89662-e6f2-3434-b542-f75185ac5e74> /usr/lib/dyld
       0x1b23d1000 -        0x1b23e0fff libsystem_notify.dylib (*) <5ff2da89-8a88-34bb-aa68-ba9c5d24e639> /usr/lib/system/libsystem_notify.dylib
       0x1b49b8000 -        0x1b49cffff libsystem_asl.dylib (*) <6b2f4a2f-2c36-3d5d-87f0-9b6bbae5560c> /usr/lib/system/libsystem_asl.dylib
       0x1b62f3000 -        0x1b62f5fff libDiagnosticMessagesClient.dylib (*) <28ab09cf-5f67-3012-bc5b-1387122c2c81> /usr/lib/libDiagnosticMessagesClient.dylib
       0x1b22fa000 -        0x1b23d0fff com.apple.framework.IOKit (2.0.2) <1d3a63f1-1f43-3ead-9815-fa086cbeda27> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
       0x1ca2bc000 -        0x1ca2e9fff com.apple.IOGPU (35.29) <51396341-67fd-333d-a043-99baada3f29d> /System/Library/PrivateFrameworks/IOGPU.framework/Versions/A/IOGPU
       0x106638000 -        0x10787ffff libopenblas64_.0.dylib (*) <0672674f-0fbf-3245-8fec-358e42c77be2> /Users/USER/*/libopenblas64_.0.dylib

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=925.4M resident=0K(0%) swapped_out_or_unallocated=925.4M(100%)
Writable regions: Total=1.9G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.9G(100%)

                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Activity Tracing                   256K        1 
Kernel Alloc Once                   32K        1 
MALLOC                           280.2M       42 
MALLOC guard page                   96K        5 
MALLOC_MEDIUM (reserved)         960.0M        8         reserved VM address space (unallocated)
MALLOC_NANO (reserved)           384.0M        1         reserved VM address space (unallocated)
STACK GUARD                        208K       13 
Stack                             22.4M       13 
VM_ALLOCATE                      118.0M       93 
VM_ALLOCATE (reserved)           160.0M        1         reserved VM address space (unallocated)
__AUTH                            1482K       92 
__AUTH_CONST                      6219K      212 
__DATA                            9296K      254 
__DATA_CONST                      8913K      265 
__DATA_DIRTY                       342K       83 
__FONT_DATA                          4K        1 
__LINKEDIT                       644.7M       57 
__OBJC_CONST                       607K       72 
__OBJC_RO                         82.9M        1 
__OBJC_RW                         3152K        1 
__TEXT                           280.7M      275 
__UNICODE                          592K        1 
dyld private memory               1024K        1 
mapped file                       40.8M        7 
shared memory                      624K        7 
===========                     =======  ======= 
TOTAL                              2.9G     1507 
TOTAL, minus reserved VM space     1.5G     1507 



-----------
Full Report
-----------

{"app_name":"Python","timestamp":"2022-05-18 22:44:20.00 -0300","app_version":"3.9.12","slice_uuid":"f237681b-772a-3109-bcee-605ef4cfa3b2","build_version":"3.9.12","platform":1,"bundleID":"org.python.python","share_with_app_devs":0,"is_first_party":0,"bug_type":"309","os_version":"macOS 12.3.1 (21E258)","incident_id":"9DE0A56B-93FA-438A-9D5F-20655743C1A4","name":"Python"}
{
  "uptime" : 74000,
  "procLaunch" : "2022-05-18 22:44:20.3202 -0300",
  "procRole" : "Unspecified",
  "version" : 2,
  "userID" : 501,
  "deployVersion" : 210,
  "modelCode" : "MacBookAir10,1",
  "procStartAbsTime" : 1778018614835,
  "coalitionID" : 881,
  "osVersion" : {
    "train" : "macOS 12.3.1",
    "build" : "21E258",
    "releaseType" : "User"
  },
  "captureTime" : "2022-05-18 22:44:20.6603 -0300",
  "incident" : "9DE0A56B-93FA-438A-9D5F-20655743C1A4",
  "bug_type" : "309",
  "pid" : 48029,
  "procExitAbsTime" : 1778026745864,
  "translated" : false,
  "cpuType" : "ARM-64",
  "procName" : "Python",
  "procPath" : "\/opt\/homebrew\/*\/Python.framework\/Versions\/3.9\/Resources\/Python.app\/Contents\/MacOS\/Python",
  "bundleInfo" : {"CFBundleShortVersionString":"3.9.12","CFBundleVersion":"3.9.12","CFBundleIdentifier":"org.python.python"},
  "storeInfo" : {"deviceIdentifierForVendor":"8609997B-9AB4-5133-A7E8-6B9CC49395B0","thirdParty":true},
  "parentProc" : "fish",
  "parentPid" : 22773,
  "coalitionName" : "com.googlecode.iterm2",
  "crashReporterKey" : "37559CD1-BBA5-46C4-92C9-52CBDEDD1C5E",
  "responsiblePid" : 74184,
  "responsibleProc" : "iTerm2",
  "wakeTime" : 4829,
  "sleepWakeUUID" : "0D6A0AE4-267E-4E25-8625-6F3AD3D4E3F6",
  "sip" : "enabled",
  "isCorpse" : 1,
  "exception" : {"codes":"0x0000000000000000, 0x0000000000000000","rawCodes":[0,0],"type":"EXC_CRASH","signal":"SIGABRT"},
  "asi" : {"libsystem_c.dylib":["\/AppleInternal\/Library\/BuildRoots\/560148d7-a559-11ec-8c96-4add460b61a6\/Library\/Caches\/com.apple.xbs\/Sources\/MetalPerformanceShadersGraph\/mpsgraph\/MetalPerformanceShadersGraph\/Core\/Files\/Operations\/MPSGraphConvolutionOps.mm:346: failed assertion `sourceTensor rank must be 4'"]},
  "extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
  "faultingThread" : 0,
  "threads" : [{"triggered":true,"id":1594697,"threadState":{"x":[{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":26},{"value":0},{"value":1},{"value":17270485695218883033},{"value":17270485699510672473},{"value":14757395258967641293},{"value":10},{"value":0},{"value":51},{"value":2199023325184},{"value":8724108336,"symbolLocation":0,"symbol":"OBJC_CLASS_$___NSCFString"},{"value":328},{"value":8747972160},{"value":0},{"value":6},{"value":4298147200,"symbolLocation":0,"symbol":"_main_thread"},{"value":259},{"value":4298147424,"symbolLocation":224,"symbol":"_main_thread"},{"value":18446744073709551615},{"value":8681873408,"symbolLocation":3968,"symbol":"StructLocks"},{"value":8683839488},{"value":7384315010,"symbolLocation":8023,"symbol":"_MTLRequestHashToString(MTLUINT256_t)::hexChars"},{"value":105553178807536},{"value":5}],"flavor":"ARM_THREAD_STATE64","lr":{"value":7239671520},"cpsr":{"value":1073745920},"fp":{"value":6169579056},"sp":{"value":6169579024},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":7239454136,"matchesCrashFrame":1},"far":{"value":4457332736}},"queue":"cache queue","frames":[{"imageOffset":40376,"symbol":"__pthread_kill","symbolLocation":8,"imageIndex":0},{"imageOffset":28384,"symbol":"pthread_kill","symbolLocation":288,"imageIndex":1},{"imageOffset":500544,"symbol":"abort","symbolLocation":168,"imageIndex":2},{"imageOffset":497492,"symbol":"__assert_rtn","symbolLocation":272,"imageIndex":2},{"imageOffset":927656,"symbol":"MTLReportFailure.cold.1","symbolLocation":56,"imageIndex":3},{"imageOffset":836292,"symbol":"MTLReportFailure","symbolLocation":480,"imageIndex":3},{"imageOffset":1388424,"imageIndex":4},{"imageOffset":57760572,"symbol":"invocation function for block in at::native::_mps_convolution(at::Tensor const&, at::Tensor const&, c10::optional<at::Tensor> const&, c10::ArrayRef<long long>, c10::ArrayRef<long long>, c10::ArrayRef<long long>, long long)","symbolLocation":540,"imageIndex":5},{"imageOffset":57717984,"symbol":"invocation function for block in at::native::mps::MPSGraphCache::CreateCachedGraph(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, at::native::mps::MPSCachedGraph* () block_pointer)","symbolLocation":216,"imageIndex":5},{"imageOffset":16840,"symbol":"_dispatch_client_callout","symbolLocation":20,"imageIndex":6},{"imageOffset":78868,"symbol":"_dispatch_lane_barrier_sync_invoke_and_complete","symbolLocation":56,"imageIndex":6},{"imageOffset":57685556,"symbol":"at::native::mps::MPSGraphCache::CreateCachedGraph(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, at::native::mps::MPSCachedGraph* () block_pointer)","symbolLocation":160,"imageIndex":5},{"imageOffset":57756316,"symbol":"at::native::_mps_convolution(at::Tensor const&, at::Tensor const&, c10::optional<at::Tensor> const&, c10::ArrayRef<long long>, c10::ArrayRef<long long>, c10::ArrayRef<long long>, long long)","symbolLocation":3040,"imageIndex":5},{"imageOffset":10953920,"symbol":"at::_ops::_mps_convolution::call(at::Tensor const&, at::Tensor const&, c10::optional<at::Tensor> const&, c10::ArrayRef<long long>, c10::ArrayRef<long long>, c10::ArrayRef<long long>, long long)","symbolLocation":360,"imageIndex":5},{"imageOffset":2706836,"symbol":"at::native::_convolution(at::Tensor const&, at::Tensor const&, c10::optional<at::Tensor> const&, c10::ArrayRef<long long>, c10::ArrayRef<long long>, c10::ArrayRef<long long>, bool, c10::ArrayRef<long long>, long long, bool, bool, bool, bool)","symbolLocation":12668,"imageIndex":5},{"imageOffset":9232500,"symbol":"at::_ops::_convolution::call(at::Tensor const&, at::Tensor const&, c10::optional<at::Tensor> const&, c10::ArrayRef<long long>, c10::ArrayRef<long long>, c10::ArrayRef<long long>, bool, c10::ArrayRef<long long>, long long, bool, bool, bool, bool)","symbolLocation":436,"imageIndex":5},{"imageOffset":2663312,"symbol":"at::native::convolution(at::Tensor const&, at::Tensor const&, c10::optional<at::Tensor> const&, c10::ArrayRef<long long>, c10::ArrayRef<long long>, c10::ArrayRef<long long>, bool, c10::ArrayRef<long long>, long long)","symbolLocation":288,"imageIndex":5},{"imageOffset":9230244,"symbol":"at::_ops::convolution::redispatch(c10::DispatchKeySet, at::Tensor const&, at::Tensor const&, c10::optional<at::Tensor> const&, c10::ArrayRef<long long>, c10::ArrayRef<long long>, c10::ArrayRef<long long>, bool, c10::ArrayRef<long long>, long long)","symbolLocation":188,"imageIndex":5},{"imageOffset":32588780,"symbol":"c10::impl::wrap_kernel_functor_unboxed_<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (c10::DispatchKeySet, at::Tensor const&, at::Tensor const&, c10::optional<at::Tensor> const&, c10::ArrayRef<long long>, c10::ArrayRef<long long>, c10::ArrayRef<long long>, bool, c10::ArrayRef<long long>, long long), &(torch::autograd::VariableType::(anonymous namespace)::convolution(c10::DispatchKeySet, at::Tensor const&, at::Tensor const&, c10::optional<at::Tensor> const&, c10::ArrayRef<long long>, c10::ArrayRef<long long>, c10::ArrayRef<long long>, bool, c10::ArrayRef<long long>, long long))>, at::Tensor, c10::guts::typelist::typelist<c10::DispatchKeySet, at::Tensor const&, at::Tensor const&, c10::optional<at::Tensor> const&, c10::ArrayRef<long long>, c10::ArrayRef<long long>, c10::ArrayRef<long long>, bool, c10::ArrayRef<long long>, long long> >, at::Tensor (c10::DispatchKeySet, at::Tensor const&, at::Tensor const&, c10::optional<at::Tensor> const&, c10::ArrayRef<long long>, c10::ArrayRef<long long>, c10::ArrayRef<long long>, bool, c10::ArrayRef<long long>, long long)>::call(c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor const&, at::Tensor const&, c10::optional<at::Tensor> const&, c10::ArrayRef<long long>, c10::ArrayRef<long long>, c10::ArrayRef<long long>, bool, c10::ArrayRef<long long>, long long)","symbolLocation":1984,"imageIndex":5},{"imageOffset":9229312,"symbol":"at::_ops::convolution::call(at::Tensor const&, at::Tensor const&, c10::optional<at::Tensor> const&, c10::ArrayRef<long long>, c10::ArrayRef<long long>, c10::ArrayRef<long long>, bool, c10::ArrayRef<long long>, long long)","symbolLocation":376,"imageIndex":5},{"imageOffset":2657556,"symbol":"at::native::conv3d(at::Tensor const&, at::Tensor const&, c10::optional<at::Tensor> const&, c10::ArrayRef<long long>, c10::ArrayRef<long long>, c10::ArrayRef<long long>, long long)","symbolLocation":620,"imageIndex":5},{"imageOffset":13451912,"symbol":"at::_ops::conv3d::call(at::Tensor const&, at::Tensor const&, c10::optional<at::Tensor> const&, c10::ArrayRef<long long>, c10::ArrayRef<long long>, c10::ArrayRef<long long>, long long)","symbolLocation":360,"imageIndex":5},{"imageOffset":3886504,"symbol":"torch::autograd::THPVariable_conv3d(_object*, _object*, _object*)","symbolLocation":1092,"imageIndex":7},{"imageOffset":714988,"symbol":"cfunction_call","symbolLocation":60,"imageIndex":8},{"imageOffset":391000,"symbol":"_PyObject_MakeTpCall","symbolLocation":132,"imageIndex":8},{"imageOffset":1381012,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":28164,"imageIndex":8},{"imageOffset":393884,"symbol":"_PyFunction_Vectorcall","symbolLocation":184,"imageIndex":8},{"imageOffset":404720,"symbol":"method_vectorcall","symbolLocation":124,"imageIndex":8},{"imageOffset":1376468,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":23620,"imageIndex":8},{"imageOffset":393884,"symbol":"_PyFunction_Vectorcall","symbolLocation":184,"imageIndex":8},{"imageOffset":404884,"symbol":"method_vectorcall","symbolLocation":288,"imageIndex":8},{"imageOffset":1355600,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":2752,"imageIndex":8},{"imageOffset":1348752,"symbol":"_PyEval_EvalCode","symbolLocation":452,"imageIndex":8},{"imageOffset":394048,"symbol":"_PyFunction_Vectorcall","symbolLocation":348,"imageIndex":8},{"imageOffset":391640,"symbol":"_PyObject_FastCallDictTstate","symbolLocation":96,"imageIndex":8},{"imageOffset":860600,"symbol":"slot_tp_call","symbolLocation":188,"imageIndex":8},{"imageOffset":391000,"symbol":"_PyObject_MakeTpCall","symbolLocation":132,"imageIndex":8},{"imageOffset":1376896,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":24048,"imageIndex":8},{"imageOffset":1348752,"symbol":"_PyEval_EvalCode","symbolLocation":452,"imageIndex":8},{"imageOffset":1707808,"symbol":"run_eval_code_obj","symbolLocation":136,"imageIndex":8},{"imageOffset":1707600,"symbol":"run_mod","symbolLocation":112,"imageIndex":8},{"imageOffset":1696868,"symbol":"pyrun_file","symbolLocation":168,"imageIndex":8},{"imageOffset":1695108,"symbol":"pyrun_simple_file","symbolLocation":252,"imageIndex":8},{"imageOffset":1694792,"symbol":"PyRun_SimpleFileExFlags","symbolLocation":80,"imageIndex":8},{"imageOffset":1828844,"symbol":"pymain_run_file","symbolLocation":320,"imageIndex":8},{"imageOffset":1826604,"symbol":"Py_RunMain","symbolLocation":876,"imageIndex":8},{"imageOffset":1831940,"symbol":"Py_BytesMain","symbolLocation":40,"imageIndex":8},{"imageOffset":20616,"symbol":"start","symbolLocation":516,"imageIndex":9}]},{"id":1594698,"queue":"com.apple.root.utility-qos","frames":[{"imageOffset":6352,"symbol":"mach_msg_trap","symbolLocation":8,"imageIndex":0},{"imageOffset":7488,"symbol":"mach_msg","symbolLocation":76,"imageIndex":0},{"imageOffset":7448,"symbol":"notify_register_check","symbolLocation":1112,"imageIndex":10},{"imageOffset":10564,"symbol":"_asl_notify_open","symbolLocation":140,"imageIndex":11},{"imageOffset":5016,"symbol":"asl_open","symbolLocation":44,"imageIndex":11},{"imageOffset":8080,"symbol":"msgtracer_client","symbolLocation":52,"imageIndex":12},{"imageOffset":8740,"symbol":"msgtracer_vlog_with_keys_skip_nulls","symbolLocation":428,"imageIndex":12},{"imageOffset":8300,"symbol":"msgtracer_log_with_keys","symbolLocation":36,"imageIndex":12},{"imageOffset":43044,"symbol":"__createContextTelemetryDataWithQueueLabelAndCallstack_block_invoke","symbolLocation":920,"imageIndex":3},{"imageOffset":9732,"symbol":"_dispatch_call_block_and_release","symbolLocation":32,"imageIndex":6},{"imageOffset":16840,"symbol":"_dispatch_client_callout","symbolLocation":20,"imageIndex":6},{"imageOffset":88580,"symbol":"_dispatch_root_queue_drain","symbolLocation":680,"imageIndex":6},{"imageOffset":90372,"symbol":"_dispatch_worker_thread2","symbolLocation":164,"imageIndex":6},{"imageOffset":13092,"symbol":"_pthread_wqthread","symbolLocation":228,"imageIndex":1},{"imageOffset":8320,"symbol":"start_wqthread","symbolLocation":8,"imageIndex":1}]},{"id":1594699,"queue":"com.Metal.CommandQueueDispatch","frames":[{"imageOffset":6352,"symbol":"mach_msg_trap","symbolLocation":8,"imageIndex":0},{"imageOffset":7488,"symbol":"mach_msg","symbolLocation":76,"imageIndex":0},{"imageOffset":14504,"symbol":"io_connect_method","symbolLocation":512,"imageIndex":13},{"imageOffset":13888,"symbol":"IOConnectCallMethod","symbolLocation":176,"imageIndex":13},{"imageOffset":82908,"symbol":"IOGPUCommandQueueSubmitCommandBuffers","symbolLocation":144,"imageIndex":14},{"imageOffset":28664,"symbol":"-[IOGPUMetalCommandQueue _submitCommandBuffers:count:]","symbolLocation":820,"imageIndex":14},{"imageOffset":27800,"symbol":"-[IOGPUMetalCommandQueue submitCommandBuffers:count:]","symbolLocation":88,"imageIndex":14},{"imageOffset":130572,"symbol":"-[_MTLCommandQueue _submitAvailableCommandBuffers]","symbolLocation":684,"imageIndex":3},{"imageOffset":16840,"symbol":"_dispatch_client_callout","symbolLocation":20,"imageIndex":6},{"imageOffset":30320,"symbol":"_dispatch_continuation_pop","symbolLocation":500,"imageIndex":6},{"imageOffset":108768,"symbol":"_dispatch_source_invoke","symbolLocation":1596,"imageIndex":6},{"imageOffset":46980,"symbol":"_dispatch_lane_serial_drain","symbolLocation":376,"imageIndex":6},{"imageOffset":50180,"symbol":"_dispatch_lane_invoke","symbolLocation":392,"imageIndex":6},{"imageOffset":93336,"symbol":"_dispatch_workloop_worker_thread","symbolLocation":648,"imageIndex":6},{"imageOffset":13152,"symbol":"_pthread_wqthread","symbolLocation":288,"imageIndex":1},{"imageOffset":8320,"symbol":"start_wqthread","symbolLocation":8,"imageIndex":1}]},{"id":1594700,"frames":[{"imageOffset":23084,"symbol":"__gettimeofday","symbolLocation":12,"imageIndex":0},{"imageOffset":34664,"symbol":"gettimeofday","symbolLocation":72,"imageIndex":2},{"imageOffset":1478308,"symbol":"blas_thread_server","symbolLocation":276,"imageIndex":15},{"imageOffset":29292,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":1},{"imageOffset":8332,"symbol":"thread_start","symbolLocation":8,"imageIndex":1}]},{"id":1594701,"frames":[{"imageOffset":7980,"symbol":"mach_absolute_time","symbolLocation":108,"imageIndex":0},{"imageOffset":14720,"symbol":"__commpage_gettimeofday_internal","symbolLocation":44,"imageIndex":0},{"imageOffset":34648,"symbol":"gettimeofday","symbolLocation":56,"imageIndex":2},{"imageOffset":1478308,"symbol":"blas_thread_server","symbolLocation":276,"imageIndex":15},{"imageOffset":29292,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":1},{"imageOffset":8332,"symbol":"thread_start","symbolLocation":8,"imageIndex":1}]},{"id":1594702,"frames":[{"imageOffset":7980,"symbol":"mach_absolute_time","symbolLocation":108,"imageIndex":0},{"imageOffset":14720,"symbol":"__commpage_gettimeofday_internal","symbolLocation":44,"imageIndex":0},{"imageOffset":34648,"symbol":"gettimeofday","symbolLocation":56,"imageIndex":2},{"imageOffset":1478308,"symbol":"blas_thread_server","symbolLocation":276,"imageIndex":15},{"imageOffset":29292,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":1},{"imageOffset":8332,"symbol":"thread_start","symbolLocation":8,"imageIndex":1}]},{"id":1594703,"frames":[{"imageOffset":1478284,"symbol":"blas_thread_server","symbolLocation":252,"imageIndex":15},{"imageOffset":1478308,"symbol":"blas_thread_server","symbolLocation":276,"imageIndex":15},{"imageOffset":29292,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":1},{"imageOffset":8332,"symbol":"thread_start","symbolLocation":8,"imageIndex":1}]},{"id":1594704,"frames":[{"imageOffset":14768,"symbol":"__commpage_gettimeofday_internal","symbolLocation":92,"imageIndex":0},{"imageOffset":14720,"symbol":"__commpage_gettimeofday_internal","symbolLocation":44,"imageIndex":0},{"imageOffset":34648,"symbol":"gettimeofday","symbolLocation":56,"imageIndex":2},{"imageOffset":1478308,"symbol":"blas_thread_server","symbolLocation":276,"imageIndex":15},{"imageOffset":29292,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":1},{"imageOffset":8332,"symbol":"thread_start","symbolLocation":8,"imageIndex":1}]},{"id":1594705,"frames":[{"imageOffset":14768,"symbol":"__commpage_gettimeofday_internal","symbolLocation":92,"imageIndex":0},{"imageOffset":14720,"symbol":"__commpage_gettimeofday_internal","symbolLocation":44,"imageIndex":0},{"imageOffset":34648,"symbol":"gettimeofday","symbolLocation":56,"imageIndex":2},{"imageOffset":1478308,"symbol":"blas_thread_server","symbolLocation":276,"imageIndex":15},{"imageOffset":29292,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":1},{"imageOffset":8332,"symbol":"thread_start","symbolLocation":8,"imageIndex":1}]},{"id":1594706,"frames":[{"imageOffset":7980,"symbol":"mach_absolute_time","symbolLocation":108,"imageIndex":0},{"imageOffset":14720,"symbol":"__commpage_gettimeofday_internal","symbolLocation":44,"imageIndex":0},{"imageOffset":34648,"symbol":"gettimeofday","symbolLocation":56,"imageIndex":2},{"imageOffset":1478308,"symbol":"blas_thread_server","symbolLocation":276,"imageIndex":15},{"imageOffset":29292,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":1},{"imageOffset":8332,"symbol":"thread_start","symbolLocation":8,"imageIndex":1}]},{"id":1594707,"frames":[{"imageOffset":8312,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":1}]},{"id":1594708,"frames":[{"imageOffset":8312,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":1}]},{"id":1594709,"frames":[{"imageOffset":8312,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":1}]}],
  "usedImages" : [
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7239413760,
    "size" : 229376,
    "uuid" : "1d7b3b8e-75a1-34ea-aa52-9f7c23155c55",
    "path" : "\/usr\/lib\/system\/libsystem_kernel.dylib",
    "name" : "libsystem_kernel.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7239643136,
    "size" : 53248,
    "uuid" : "cee8bc77-6923-34d9-89a3-6f8f7279605e",
    "path" : "\/usr\/lib\/system\/libsystem_pthread.dylib",
    "name" : "libsystem_pthread.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7238361088,
    "size" : 532480,
    "uuid" : "fd566a15-42d8-314a-a99a-b59237ddf5bc",
    "path" : "\/usr\/lib\/system\/libsystem_c.dylib",
    "name" : "libsystem_c.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7383277568,
    "CFBundleShortVersionString" : "261.13",
    "CFBundleIdentifier" : "com.apple.Metal",
    "size" : 1318912,
    "uuid" : "da3fd743-76d9-351c-9bb0-17027a76b6df",
    "path" : "\/System\/Library\/Frameworks\/Metal.framework\/Versions\/A\/Metal",
    "name" : "Metal",
    "CFBundleVersion" : "261.13"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 8907124736,
    "CFBundleShortVersionString" : "1.0",
    "CFBundleIdentifier" : "com.apple.MetalPerformanceShadersGraph",
    "size" : 10219520,
    "uuid" : "92c3cdaa-7900-3e11-b107-3c1fb787fa04",
    "path" : "\/System\/Library\/Frameworks\/MetalPerformanceShadersGraph.framework\/Versions\/A\/MetalPerformanceShadersGraph",
    "name" : "MetalPerformanceShadersGraph",
    "CFBundleVersion" : "1"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4482220032,
    "size" : 80576512,
    "uuid" : "7d4fb975-9f75-386e-80ff-70f320c9ef36",
    "path" : "\/Users\/USER\/*\/libtorch_cpu.dylib",
    "name" : "libtorch_cpu.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7237804032,
    "size" : 290816,
    "uuid" : "dc048e3b-e023-3d17-afe5-4ff3dc625608",
    "path" : "\/usr\/lib\/system\/libdispatch.dylib",
    "name" : "libdispatch.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4328112128,
    "size" : 12681216,
    "uuid" : "ef946875-fb71-3128-b8ba-2a9b843a02af",
    "path" : "\/Users\/USER\/*\/libtorch_python.dylib",
    "name" : "libtorch_python.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4303028224,
    "CFBundleShortVersionString" : "3.9.12, (c) 2001-2021 Python Software Foundation.",
    "CFBundleIdentifier" : "org.python.python",
    "size" : 2899968,
    "uuid" : "07c6f0c1-bf5f-3eb1-87a3-9ea5c96126e5",
    "path" : "\/opt\/homebrew\/*\/Python.framework\/Versions\/3.9\/Python",
    "name" : "Python",
    "CFBundleVersion" : "3.9.12"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 4297654272,
    "size" : 393216,
    "uuid" : "fbb89662-e6f2-3434-b542-f75185ac5e74",
    "path" : "\/usr\/lib\/dyld",
    "name" : "dyld"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7285313536,
    "size" : 65536,
    "uuid" : "5ff2da89-8a88-34bb-aa68-ba9c5d24e639",
    "path" : "\/usr\/lib\/system\/libsystem_notify.dylib",
    "name" : "libsystem_notify.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7325057024,
    "size" : 98304,
    "uuid" : "6b2f4a2f-2c36-3d5d-87f0-9b6bbae5560c",
    "path" : "\/usr\/lib\/system\/libsystem_asl.dylib",
    "name" : "libsystem_asl.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7351513088,
    "size" : 12288,
    "uuid" : "28ab09cf-5f67-3012-bc5b-1387122c2c81",
    "path" : "\/usr\/lib\/libDiagnosticMessagesClient.dylib",
    "name" : "libDiagnosticMessagesClient.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7284432896,
    "CFBundleShortVersionString" : "2.0.2",
    "CFBundleIdentifier" : "com.apple.framework.IOKit",
    "size" : 880640,
    "uuid" : "1d3a63f1-1f43-3ead-9815-fa086cbeda27",
    "path" : "\/System\/Library\/Frameworks\/IOKit.framework\/Versions\/A\/IOKit",
    "name" : "IOKit"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7686832128,
    "CFBundleShortVersionString" : "35.29",
    "CFBundleIdentifier" : "com.apple.IOGPU",
    "size" : 188416,
    "uuid" : "51396341-67fd-333d-a043-99baada3f29d",
    "path" : "\/System\/Library\/PrivateFrameworks\/IOGPU.framework\/Versions\/A\/IOGPU",
    "name" : "IOGPU",
    "CFBundleVersion" : "35.29"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4402151424,
    "size" : 19169280,
    "uuid" : "0672674f-0fbf-3245-8fec-358e42c77be2",
    "path" : "\/Users\/USER\/*\/libopenblas64_.0.dylib",
    "name" : "libopenblas64_.0.dylib"
  }
],
  "sharedCache" : {
  "base" : 7236354048,
  "size" : 3136438272,
  "uuid" : "1df3dfc1-141a-35d0-a4e5-f1e113894c6e"
},
  "vmSummary" : "ReadOnly portion of Libraries: Total=925.4M resident=0K(0%) swapped_out_or_unallocated=925.4M(100%)\nWritable regions: Total=1.9G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.9G(100%)\n\n                                VIRTUAL   REGION \nREGION TYPE                        SIZE    COUNT (non-coalesced) \n===========                     =======  ======= \nActivity Tracing                   256K        1 \nKernel Alloc Once                   32K        1 \nMALLOC                           280.2M       42 \nMALLOC guard page                   96K        5 \nMALLOC_MEDIUM (reserved)         960.0M        8         reserved VM address space (unallocated)\nMALLOC_NANO (reserved)           384.0M        1         reserved VM address space (unallocated)\nSTACK GUARD                        208K       13 \nStack                             22.4M       13 \nVM_ALLOCATE                      118.0M       93 \nVM_ALLOCATE (reserved)           160.0M        1         reserved VM address space (unallocated)\n__AUTH                            1482K       92 \n__AUTH_CONST                      6219K      212 \n__DATA                            9296K      254 \n__DATA_CONST                      8913K      265 \n__DATA_DIRTY                       342K       83 \n__FONT_DATA                          4K        1 \n__LINKEDIT                       644.7M       57 \n__OBJC_CONST                       607K       72 \n__OBJC_RO                         82.9M        1 \n__OBJC_RW                         3152K        1 \n__TEXT                           280.7M      275 \n__UNICODE                          592K        1 \ndyld private memory               1024K        1 \nmapped file                       40.8M        7 \nshared memory                      624K        7 \n===========                     =======  ======= \nTOTAL                              2.9G     1507 \nTOTAL, minus reserved VM space     1.5G     1507 \n",
  "legacyInfo" : {
  "threadTriggered" : {
    "queue" : "cache queue"
  }
},
  "trialInfo" : {
  "rollouts" : [
    {
      "rolloutId" : "607844aa04477260f58a8077",
      "factorPackIds" : {
        "SIRI_MORPHUN_ASSETS" : "6103050cbfe6dc472e1c982a"
      },
      "deploymentId" : 240000066
    },
    {
      "rolloutId" : "61301e3a61217b3110231469",
      "factorPackIds" : {
        "SIRI_FIND_MY_CONFIGURATION_FILES" : "6216ae152a40e71046e16225"
      },
      "deploymentId" : 240000016
    }
  ],
  "experiments" : [

  ]
}
}

Model: MacBookAir10,1, BootROM 7459.101.3, proc 8:4:4 processors, 8 GB, SMC 
Graphics: Apple M1, Apple M1, Built-In
Display: Color LCD, 2560 x 1600 Retina, Main, MirrorOff, Online
Memory Module: LPDDR4
AirPort: Wi-Fi, wl0: Feb  8 2022 01:44:45 version 18.60.21.0.7.8.126 FWID 01-1cdae627
Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
USB Device: USB31Bus
USB Device: USB31Bus
Thunderbolt Bus: MacBook Air, Apple Inc.
Thunderbolt Bus: MacBook Air, Apple Inc.

Versions

Collecting environment information...
PyTorch version: 1.12.0.dev20220518
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 12.3.1 (arm64)
GCC version: Could not collect
Clang version: 13.1.6 (clang-1316.0.21.2.3)
CMake version: version 3.23.1
Libc version: N/A

Python version: 3.9.12 (main, May  8 2022, 17:57:49)  [Clang 13.1.6 (clang-1316.0.21.2)] (64-bit runtime)
Python platform: macOS-12.3.1-arm64-arm-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] numpy==1.22.1
[pip3] torch==1.12.0.dev20220518
[pip3] torchaudio==0.11.0
[pip3] torchvision==0.12.0
[conda] Could not collect

cc @kulinseth @albanD @malfet @DenisVieriu97 @razarmehr @abhudev

@babranov
Copy link

bump

@albanD albanD added triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module module: mps Related to Apple Metal Performance Shaders framework labels May 19, 2022
@albanD
Copy link
Collaborator

albanD commented May 19, 2022

Hi,

Thanks for the report.
Added to the tracking issue to prioritize adding it #77764

@kulinseth
Copy link
Collaborator

Thanks for the issue, @tfmoraes , we indeed don't have Conv3D support, but should do a better job of reporting error.

@tfmoraes
Copy link
Author

tfmoraes commented Jun 1, 2022

@kulinseth is there an intention to support Conv3D and other 3D layers? At InVesalius we use Conv3D in our 3D implementation of Unet.

@sbrodehl
Copy link
Contributor

Hi there,

it looks like MPS is only allowing rank 4 tensors, is this something we can (want to?) work around, or do we need MPS to natively support 3D (or nd) convolutions?

@hassan11196
Copy link

any updates on this?

@kulinseth
Copy link
Collaborator

@kulinseth is there an intention to support Conv3D and other 3D layers? At InVesalius we use Conv3D in our 3D implementation of Unet.

@tfmoraes , that’s right we are planning to support Conv3D in MPS layer . Unfortunately I can’t discuss the time line but will update the Issue with PR enabling the support .

@kulinseth kulinseth added the topic: new features topic category label Oct 4, 2022
@mirceatlx
Copy link

Hey @kulinseth can I be assigned to the issue?

@kulinseth
Copy link
Collaborator

Hey @kulinseth can I be assigned to the issue?

We are still waiting on the MPS support to be available in OS and then I can assign the issue . Thanks for your interest @mirceatlx

@kevinjohncutler
Copy link

I am using Conv3d in the Cellpose/Omnipose Unet as well as BatchNorm3, MaxPool3d, and avg_pool3d. Let me know if there is anything I can do to help on this.

@kurtosis
Copy link

This would quite helpful - I'm working through Deep Learning With PyTorch which has a good in-depth case study relying on nn.Conv3D, which sadly I haven't been able to make as much progress on as I'd hoped.

@razoralm
Copy link

After torch 2.0 release the problem is still here. When can users expect conv3s will be compatible with mps on M1 Mac machines?

@mattiaspaul
Copy link

I just added a pull request that implements 3D convolutions and its backward in MPS. Seems pretty straightforward with certain limitations (no transpose 3D convolution available in MPSGraph). I have also started working on Pooling operations (Max/Avg) in 3D, which are slightly more tricky since MPS only provides 4D operators, so some reshaping is required.

@Berzeg
Copy link

Berzeg commented May 5, 2023

@mattiaspaul I've been using your implementation of the mps 3d convolutions for the last week. Thanks for that! I also have a fully working implementation of mps MaxPool3D locally that uses MPS's maxPooling4DWithSourceTensor function as a workaround. I will open an issue so it can get tagged in a future PR.

Are you far along with your implementation of MaxPool3D? Otherwise, I can create a PR.

@Berzeg
Copy link

Berzeg commented May 5, 2023

Here's the issue I created for supporting maxpool3d on mps: #100674

@charleneolive
Copy link

Hello, when will the 3D convolutions and maxpool3d be incorporated? I saw that both are under review. When can we expect them? Both would be really useful.

guilhermeleobas pushed a commit to guilhermeleobas/pytorch that referenced this issue Dec 18, 2023
Fixes pytorch#77818

I saw that PR pytorch#99246 was approved, but no one fixed the rebase conflicts, so I am bringing this up again to be merged.
I am leveraging @mattiaspaul work. Quoting the description here:

> * this pull request enables 3D convolutions (forward/backward) for MPS (Apple Silicon) within the same Convolution.mm file as conv2d.
> * does not support channel_last (since pytorch doesn't implement channel_last for 3D tensors)
> * does not support conv3d_transpose and treats depth-separable convolutions not as normal case (there are no MPS kernels available for either of those so far)
> * requires MacOS >=13.2 (Ventura)

Please, let me know if there are any other changes needed and I'll be happy to implement them.

Pull Request resolved: pytorch#114183
Approved by: https://github.com/malfet
hyperfraise pushed a commit to hyperfraise/pytorch that referenced this issue Dec 21, 2023
Fixes pytorch#77818

I saw that PR pytorch#99246 was approved, but no one fixed the rebase conflicts, so I am bringing this up again to be merged.
I am leveraging @mattiaspaul work. Quoting the description here:

> * this pull request enables 3D convolutions (forward/backward) for MPS (Apple Silicon) within the same Convolution.mm file as conv2d.
> * does not support channel_last (since pytorch doesn't implement channel_last for 3D tensors)
> * does not support conv3d_transpose and treats depth-separable convolutions not as normal case (there are no MPS kernels available for either of those so far)
> * requires MacOS >=13.2 (Ventura)

Please, let me know if there are any other changes needed and I'll be happy to implement them.

Pull Request resolved: pytorch#114183
Approved by: https://github.com/malfet
hyperfraise pushed a commit to hyperfraise/pytorch that referenced this issue Dec 21, 2023
Fixes pytorch#77818

I saw that PR pytorch#99246 was approved, but no one fixed the rebase conflicts, so I am bringing this up again to be merged.
I am leveraging @mattiaspaul work. Quoting the description here:

> * this pull request enables 3D convolutions (forward/backward) for MPS (Apple Silicon) within the same Convolution.mm file as conv2d.
> * does not support channel_last (since pytorch doesn't implement channel_last for 3D tensors)
> * does not support conv3d_transpose and treats depth-separable convolutions not as normal case (there are no MPS kernels available for either of those so far)
> * requires MacOS >=13.2 (Ventura)

Please, let me know if there are any other changes needed and I'll be happy to implement them.

Pull Request resolved: pytorch#114183
Approved by: https://github.com/malfet
ZhiweiYan-96 pushed a commit to ZhiweiYan-96/pytorch that referenced this issue Dec 22, 2023
Fixes pytorch#77818

I saw that PR pytorch#99246 was approved, but no one fixed the rebase conflicts, so I am bringing this up again to be merged.
I am leveraging @mattiaspaul work. Quoting the description here:

> * this pull request enables 3D convolutions (forward/backward) for MPS (Apple Silicon) within the same Convolution.mm file as conv2d.
> * does not support channel_last (since pytorch doesn't implement channel_last for 3D tensors)
> * does not support conv3d_transpose and treats depth-separable convolutions not as normal case (there are no MPS kernels available for either of those so far)
> * requires MacOS >=13.2 (Ventura)

Please, let me know if there are any other changes needed and I'll be happy to implement them.

Pull Request resolved: pytorch#114183
Approved by: https://github.com/malfet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: mps Related to Apple Metal Performance Shaders framework topic: new features topic category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet