The errors in the log are:
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-pytorch/py310-pytorch/work/pytorch-2.0.0/third_party/fbgemm/src/FbgemmFP16UKernelsAvx2.cc:16:8: error: unknown token in expression
".intel_syntax noprefix\t\n"
^
<inline asm>:2:18: note: instantiated into assembly here
mov [rbp - 48], %r14
^
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-pytorch/py310-pytorch/work/pytorch-2.0.0/third_party/fbgemm/src/FbgemmFP16UKernelsAvx2.cc:188:8: error: unknown token in expression
".intel_syntax noprefix\t\n"
^
<inline asm>:2:18: note: instantiated into assembly here
mov [rbp - 48], %r14
^
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-pytorch/py310-pytorch/work/pytorch-2.0.0/third_party/fbgemm/src/FbgemmFP16UKernelsAvx2.cc:386:8: error: unknown token in expression
".intel_syntax noprefix\t\n"
^
<inline asm>:2:18: note: instantiated into assembly here
mov [rbp - 48], %r14
^
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-pytorch/py310-pytorch/work/pytorch-2.0.0/third_party/fbgemm/src/FbgemmFP16UKernelsAvx2.cc:548:8: error: unknown token in expression
".intel_syntax noprefix\t\n"
^
<inline asm>:2:18: note: instantiated into assembly here
mov [rbp - 48], %r14
^
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-pytorch/py310-pytorch/work/pytorch-2.0.0/third_party/fbgemm/src/FbgemmFP16UKernelsAvx2.cc:729:8: error: unknown token in expression
".intel_syntax noprefix\t\n"
^
<inline asm>:2:18: note: instantiated into assembly here
mov [rbp - 48], %r14
^
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-pytorch/py310-pytorch/work/pytorch-2.0.0/third_party/fbgemm/src/FbgemmFP16UKernelsAvx2.cc:929:8: error: unknown token in expression
".intel_syntax noprefix\t\n"
^
<inline asm>:2:18: note: instantiated into assembly here
mov [rbp - 48], %r14
^
6 errors generated.