diff --git a/.gitattributes b/.gitattributes index 8a3d8cb04bc0e47415962885551fa8fb51536ebc..cb6efdfdb4b490531964576db05e285b85701095 100644 --- a/.gitattributes +++ b/.gitattributes @@ -467,3 +467,89 @@ miniconda3/bin/python3.13 filter=lfs diff=lfs merge=lfs -text miniconda3/bin/sqlite3 filter=lfs diff=lfs merge=lfs -text miniconda3/bin/unlz4 filter=lfs diff=lfs merge=lfs -text miniconda3/bin/unlzma filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libswscale-b981e777.so.9.1.100 filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libunistring-3e2a881b.so.5.2.1 filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libvorbis-7ef30dde.so.0.4.9 filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libvorbisenc-a6f5c68d.so.2.0.12 filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libvpl-8d946bca.so.2.16 filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libvpx-6816a229.so.11.0.1 filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libwebp-b685bb5c.so.7.1.10 filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libx264-bcc841a2.so.165 filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libx265-3fd9b07c.so.215 filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libxcb-5ddf6756.so.1.1.0 filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/byted_tensorproto/lib/libbyted_tensorproto_for_matxscript.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/bytedlogger/protov3.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/clang/native/libclang.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/contourpy/_contourpy.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/cryptography/hazmat/bindings/_rust.abi3.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/cufile.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/cydriver.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/cyruntime.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/driver.cpp filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/driver.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/nvjitlink.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/nvrtc.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/runtime.cpp filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/runtime.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/_bindings/cydriver.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/_bindings/cyruntime.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/_bindings/cyruntime_ptds.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/_internal/cufile.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/_internal/utils.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/euler/transport/cython_ttheader_transport.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/fontTools/cu2qu/cu2qu.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/fontTools/feaLib/lexer.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/fontTools/misc/bezierTools.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/fontTools/pens/momentsPen.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/fontTools/qu2cu/qu2cu.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/fontTools/varLib/iup.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_c_abstract_linkable.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_c_greenlet_primitives.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_c_hub_local.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_c_hub_primitives.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_c_ident.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_c_imap.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_c_semaphore.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_c_tracer.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_c_waiter.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_cevent.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_cgreenlet.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_clocal.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_cqueue.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/libev/_corecffi.abi3.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/libev/corecext.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/libuv/_corecffi.abi3.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/resolver/cares.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/google/protobuf/pyext/_message.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/greenlet/_greenlet.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/grpc/_cython/cygrpc.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/_conv.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/_errors.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/_npystrings.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/_objects.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/_proxy.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/_selector.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/defs.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5a.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5ac.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5d.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5ds.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5f.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5fd.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5g.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5i.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5l.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5o.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5p.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5pl.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5r.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5s.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5t.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5z.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/utils.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py.libs/libaec-7e9d22b8.so.0.1.3 filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py.libs/libhdf5-8c29085d.so.310.5.1 filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py.libs/libhdf5_hl-a45b8ce6.so.310.0.6 filter=lfs diff=lfs merge=lfs -text +miniconda3/envs/active_proaction/lib/python3.10/site-packages/hf_xet/hf_xet.abi3.so filter=lfs diff=lfs merge=lfs -text diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libswscale-b981e777.so.9.1.100 b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libswscale-b981e777.so.9.1.100 new file mode 100644 index 0000000000000000000000000000000000000000..c288164880594d635d53923521393b4fd3e1911b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libswscale-b981e777.so.9.1.100 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:472a8afbd910b2088c17252ced85ffb73ab0d27f3368430637fe1b72c3ff0fa4 +size 1714009 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libunistring-3e2a881b.so.5.2.1 b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libunistring-3e2a881b.so.5.2.1 new file mode 100644 index 0000000000000000000000000000000000000000..2dceb73c4f83ef8fbdd25f78ad17c4977f09049a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libunistring-3e2a881b.so.5.2.1 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:75febf4f7c92d32d01eb6322533b548ea52b660bffbb2c217c867a5b5437d45a +size 2037073 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libvorbis-7ef30dde.so.0.4.9 b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libvorbis-7ef30dde.so.0.4.9 new file mode 100644 index 0000000000000000000000000000000000000000..cee0f242ba818970a3e611abf71a1765747cac24 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libvorbis-7ef30dde.so.0.4.9 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a51821ba07daa4a421b28932a0af98405aac687d40eb3746abcd366d44e635e9 +size 260873 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libvorbisenc-a6f5c68d.so.2.0.12 b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libvorbisenc-a6f5c68d.so.2.0.12 new file mode 100644 index 0000000000000000000000000000000000000000..87e7b66c1b36baa7afd8d6274069565103ca7921 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libvorbisenc-a6f5c68d.so.2.0.12 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8b05253c42e51bb4be95221d185fbbc0424544d49dfe7630b5ea9a13d10c001b +size 709041 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libvpl-8d946bca.so.2.16 b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libvpl-8d946bca.so.2.16 new file mode 100644 index 0000000000000000000000000000000000000000..cfccf0074c1d5712ccf3f2064f4c06171d160f56 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libvpl-8d946bca.so.2.16 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5729337e531a4b0a5191bb5f12be3e73a18359a2f9bc7300d5e55f9585cb8b7d +size 428409 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libvpx-6816a229.so.11.0.1 b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libvpx-6816a229.so.11.0.1 new file mode 100644 index 0000000000000000000000000000000000000000..99725846d3e005aa07ab809b71c321a7f89a249f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libvpx-6816a229.so.11.0.1 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac3a177506ff5ea2ae1c8bd7896cda99f275f7f1f1e9ef387e7a3a26d8271274 +size 2344985 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libwebp-b685bb5c.so.7.1.10 b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libwebp-b685bb5c.so.7.1.10 new file mode 100644 index 0000000000000000000000000000000000000000..55ebc3982a95aeda0bf6694a8818930b19468eb3 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libwebp-b685bb5c.so.7.1.10 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:442fcb692e8399949ce286ddd3b4ee583e024fba9285907466e2d506e1f39ef4 +size 735321 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libx264-bcc841a2.so.165 b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libx264-bcc841a2.so.165 new file mode 100644 index 0000000000000000000000000000000000000000..fe50a8a272349a086a67fb97c0b662b3d1fe04b8 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libx264-bcc841a2.so.165 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61f0af0a01f7683783bee3d834a843f887ddedc08b876e15797c50bf16c2c26a +size 2288385 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libx265-3fd9b07c.so.215 b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libx265-3fd9b07c.so.215 new file mode 100644 index 0000000000000000000000000000000000000000..e7c889e6ef9734dc68ec4b101ec8341b532fdb37 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libx265-3fd9b07c.so.215 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b47ada1965f6b7dfc700a6dd337dc2013cc7fdc0825238abb36c6999300b81f3 +size 20404489 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libxcb-5ddf6756.so.1.1.0 b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libxcb-5ddf6756.so.1.1.0 new file mode 100644 index 0000000000000000000000000000000000000000..4b31a4195b8b3c9c982f5503bea674e622d5c661 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/av.libs/libxcb-5ddf6756.so.1.1.0 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f34b406b3bcf9ef40df06984600c124733144ce4b7bdaa15622e58f9ef27dd8 +size 280065 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/byted_tensorproto/lib/libbyted_tensorproto_for_matxscript.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/byted_tensorproto/lib/libbyted_tensorproto_for_matxscript.so new file mode 100644 index 0000000000000000000000000000000000000000..769e216a7710317dc9dfabebf486fcc177cfd535 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/byted_tensorproto/lib/libbyted_tensorproto_for_matxscript.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:28e9b4bb8ace39034c3f68bd01eea5212b322b8149e852bc3f94adc24b00b880 +size 18856992 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/bytedlogger/protov3.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/bytedlogger/protov3.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..075d7cb0b1536c18a6afbc9b9a588f043a1a321a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/bytedlogger/protov3.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:955e88bea4e08997bc816f1e9a37a86a96c0b856a4705833ae3b974481d65e4a +size 191696 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/clang/native/libclang.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/clang/native/libclang.so new file mode 100644 index 0000000000000000000000000000000000000000..32873ed6907e72365e6e73a64e18e7da16c66e2f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/clang/native/libclang.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a8612b1c9a7125701277f63e5616f1d1eb9c91410c4bf195878067868c927f94 +size 63703544 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/contourpy/_contourpy.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/contourpy/_contourpy.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..0dfff539343c939cef072609c86e78d0f5dcf3b5 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/contourpy/_contourpy.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f22b7f307c1f94161cda346e6b9295057635e2064eeccb87e8602e4159bc57e1 +size 854312 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cryptography/hazmat/bindings/_rust.abi3.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cryptography/hazmat/bindings/_rust.abi3.so new file mode 100644 index 0000000000000000000000000000000000000000..4fe54e1dc2343eb1f220d8c46c37cdabb711c491 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cryptography/hazmat/bindings/_rust.abi3.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49d29c0490efe46095b9f73a0713e251ae45f56b1712c7b042c29a04a01ae604 +size 12797816 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/_bindings/cydriver.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/_bindings/cydriver.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..b9eec704db47ebde883d6cc582ff8f26c55f4f68 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/_bindings/cydriver.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6d35f313f9d2e5f881bdefe469efc329ee2a29ee48add16a700d34112906ac9b +size 574128 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/_bindings/cyruntime.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/_bindings/cyruntime.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..5c0b28df5e3c72c08733ad45e60ec18a35d64636 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/_bindings/cyruntime.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e541a3940fcd346fb7c17a444fb2c07b1d748566c135c5ae304993cf8eeb0b2a +size 916112 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/_bindings/cyruntime_ptds.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/_bindings/cyruntime_ptds.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..2b31bbba7f94812902abdf12b4419180399b0055 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/_bindings/cyruntime_ptds.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a1ae5364621f3a11dc17ebc7cfb8e08178c0d26b9e99e272571ddd07c86f82d0 +size 772624 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/_internal/cufile.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/_internal/cufile.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..73af8e23fd64ae86ac725afb5c9c4e9e2c535848 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/_internal/cufile.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c9f00c7fce1c7b8a6b79a953bb7591c5d4a6a7982c7e5cd603d721790d3a83d7 +size 107120 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/_internal/utils.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/_internal/utils.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..887b21a0f01e6e2a430c30786f03c5266f4b04be --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/_internal/utils.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:85d8e990f1bdf1957ce8ae157ee66e2b3c935cf4eb16633ad01fb904aeff8007 +size 122232 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/cufile.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/cufile.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..f56a3b5022a8bcbdb675a241e4d6efcb664d1ba1 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/cufile.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:34b002d4c6692962c7e30609ad3658c176b21e0b41f2b7375ba6cb9756c182ce +size 411600 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/cydriver.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/cydriver.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..df1ce109829cac7ef68e07616bf31dd8be82d15b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/cydriver.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:500baff5b51c6613110de4fdb55d179ef197d9113b128dbf67b6986de89b7fb7 +size 187232 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/cyruntime.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/cyruntime.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..04072526cc1b886f14fd79edd61da15eaa9398b1 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/cyruntime.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:222c7a9b00b3695df9ca8b68d8b2acc7e8feb83f036d2a20a496b2347e0313ff +size 146400 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/driver.cpp b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/driver.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c23418f1a7c2dd2f11760df84c0eae8247087f82 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/driver.cpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:036004362c844505a764af59f110a867840c2a07aee8819c63a0f325ef1b13e1 +size 37317473 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/driver.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/driver.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..2124ba53042342b7126a5ced1dd72d3997b8a3ed --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/driver.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5f2e4d59e5ed175419ec5980fab6119a670c96483ae05689bcd2bc66500c9092 +size 8037368 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/nvjitlink.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/nvjitlink.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..86f76704817a65521aa486f9c76c51d2fb68909e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/nvjitlink.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d069d760d55b7e7e3366130cf4b326043198e4fb3c65e2f7bbf4370b0e824ccf +size 107824 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/nvrtc.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/nvrtc.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..b31dc1f0b1313cb9cdf0d79af0af4cd0633cf60a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/nvrtc.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:93508f8c00ab84cc0c5a8c2e3e62b9dec2f67500fe685cc382e840734b630c4a +size 432824 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/runtime.cpp b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/runtime.cpp new file mode 100644 index 0000000000000000000000000000000000000000..53182bb0bed409c3fd76b8b03efa300a29832f3d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/runtime.cpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8cdf87c94b2ccdcb19ecdd127bb9a8f20af0092beb42897f6ea1ac2fdbf1b9ce +size 27202710 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/runtime.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/runtime.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..984cbe935341f96a365c741d69770530003282ca --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/cuda/bindings/runtime.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80941964f99a93c125827e3dd5b08b0d70009d11c32bdef4625e3b83cb454cbd +size 5640504 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/dateutil/zoneinfo/dateutil-zoneinfo.tar.gz b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/dateutil/zoneinfo/dateutil-zoneinfo.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..ff62a934a5009337271c60501278a7a34913a20b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/dateutil/zoneinfo/dateutil-zoneinfo.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d3ea52e7b6e968de0d884df1288193596fa95b803db4f92a18279a7398004475 +size 156400 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..b94c47ab78e701a447cf73aca313fc484b36bd60 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:205675e876ee5536d25caee967e7b52c780ba46649e69871a85eb6feba8653c6 +size 3429784 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/euler/transport/cython_ttheader_transport.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/euler/transport/cython_ttheader_transport.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..43999533602045af0b86b981166f2933462069e9 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/euler/transport/cython_ttheader_transport.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f7c6ecc804ab238c8f41d4fbce20537b3129f8383f199aeb28fbfb5fef2453e +size 130144 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/fontTools/cu2qu/cu2qu.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/fontTools/cu2qu/cu2qu.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..9f1ab2fe743cb6d06d13582844ebab7b5d72df5b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/fontTools/cu2qu/cu2qu.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:01e08dbaa400f6de0e0f55e18d134d39e1a734982f3c4e8182c997e7553589f3 +size 1036400 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/fontTools/feaLib/lexer.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/fontTools/feaLib/lexer.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..1f57753e7216fcfd6e3d86646a9795fcf709a166 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/fontTools/feaLib/lexer.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f44025c54e66b23ca04255e3c6c26c04b06128d1b1de0f7ee37019ec782fc9b2 +size 1389248 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/fontTools/misc/bezierTools.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/fontTools/misc/bezierTools.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..7ab91ddf7506db0755ef3a95bb31fc538c013d6c --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/fontTools/misc/bezierTools.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3c93eba781a7e05c9a7ef77996d32a6affe4664df69a4f54da479d7bbc512ddb +size 4749360 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/fontTools/pens/momentsPen.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/fontTools/pens/momentsPen.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..ffe6581a5e31a618621025d61cc9b86c2cd2f8f1 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/fontTools/pens/momentsPen.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6d7a7a4519b46c02188a7b86b76efad0c25416167d3b44afb2c6b295eae802d2 +size 900672 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/fontTools/qu2cu/qu2cu.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/fontTools/qu2cu/qu2cu.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..7297b3f9443b1efdf25fdefe5897cda5d8b03c99 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/fontTools/qu2cu/qu2cu.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3cf9d8d5ee692218182d942d7df69eab39fddaa8032a4bfcfc5d44e34d40dcd6 +size 1241368 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/fontTools/varLib/iup.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/fontTools/varLib/iup.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..d39ad20e4c71c121b5c6deb11c66193caefc676f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/fontTools/varLib/iup.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:413d94cae49bfffb9010206a30ad60336fbc411a1dbde7e1ca01fc7c6185f285 +size 1575008 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_c_abstract_linkable.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_c_abstract_linkable.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..a124c2ceff051137d984bc736a0ada6589a3f8d6 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_c_abstract_linkable.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6e20cce9cb1df32c6e0f58203a5fe7ebdad9ae8c4a69ac12e2acc4c443c12d6a +size 1021000 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_c_greenlet_primitives.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_c_greenlet_primitives.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..52575c07c1ee969859366faa36f950c4a864199f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_c_greenlet_primitives.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:424361227d28280e0f1e4d574c2b2c0e0cf70a98db4d8dffcbf110c1bba97ddf +size 498944 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_c_hub_local.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_c_hub_local.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..451932dce22edd2ab0d493c0ad5d4325d4dd442b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_c_hub_local.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:19fd8d57083af319b03738f4e1042c5d7089968ba4dbc27dfe29410b404f671d +size 398712 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_c_hub_primitives.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_c_hub_primitives.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..d932a3fcbd30195994f202869b114379966719a9 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_c_hub_primitives.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f0247fbbc77edcc3b461028e6424f4c58ed9b7ebb89e433abc92b6c15bf473ed +size 1086104 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_c_ident.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_c_ident.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..72cb6d2fc6b2a71b9641e938edf32e53362dc640 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_c_ident.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dcbcfec785e8ca7224a60f17c08bd4df39397423308de1c0ae574b45e8943b09 +size 346704 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_c_imap.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_c_imap.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..cbdc3ed4bc2078f0afa767fef436c6af0edc2a9a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_c_imap.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7725dccb4d24a28e400acc901dd14dcc5f9d4de14704e5f6855f91d814617926 +size 623536 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_c_semaphore.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_c_semaphore.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..9f92b73a4bd9a1752de872b1e11b23261672cb8d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_c_semaphore.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:637a3b8c7144f6be1b2704663d2b979fe4c7d65c2024eeb95e5e78265e08783e +size 1062208 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_c_tracer.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_c_tracer.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..6be48a7a86f91e00f4711477a456e52118f73489 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_c_tracer.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:827c16d004bbb384057d69425006fbc0504ca10e7f67729472801a0e0b570de8 +size 731368 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_c_waiter.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_c_waiter.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..e720243bdc6c416370663696a63488548406448f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_c_waiter.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f3fb6db8738e38471c910a5b86da943bd7840a31ecb5df0ae303a1f53f5b5c0a +size 521608 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_cevent.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_cevent.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..517e8f95c4677e8a112927b5e53bde38d7f18425 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_cevent.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b290ea432a3cf5e74beaa3e1d93324e589620b19db31288a869b0c86196875d0 +size 776328 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_cgreenlet.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_cgreenlet.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..210093e65b9e2ca1f90e0f4afbdcf31b906db19c --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_cgreenlet.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6a2e042fcd59cbc4aae3bfb3c048d84abbeb4fec1877ca850f4bd6b47ebfa671 +size 2119856 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_clocal.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_clocal.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..a83bfb6a8340e23436d49dede5ff6cd34f58ce19 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_clocal.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f738e914adb2daaf7da3e172898ee61e40df70f6f5f298bb72b6f84a6ce4a520 +size 1009128 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_cqueue.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_cqueue.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..f6b375e02b3ffe9d0f5f8becd3719d543c66c611 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/_gevent_cqueue.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:85f3d5782b16971812bf6e786c459198414351bf0e84812f7370a2a487370ee5 +size 1923064 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/libev/_corecffi.abi3.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/libev/_corecffi.abi3.so new file mode 100644 index 0000000000000000000000000000000000000000..d050bb5e6ff0a2506974ce5de92de42e0f80cc65 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/libev/_corecffi.abi3.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8a2be6da6cde71533fe75e6e6ff85bb295bb9d3d67445952e0d0bc4d45a5ba6c +size 473480 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/libev/corecext.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/libev/corecext.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..c752d3313d14be7dd370a7ad4922995dad0eca4d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/libev/corecext.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7559176d5212a212d036b294a87a27ca1875043cee7627f7d8d4abc8a9346865 +size 2563472 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/libuv/_corecffi.abi3.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/libuv/_corecffi.abi3.so new file mode 100644 index 0000000000000000000000000000000000000000..7ef7ca15046f92ba240abe34f8df929741308cc6 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/libuv/_corecffi.abi3.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ec4ab7001e3c4103e1846ce3fb53e1373ae557f53e32a78657fec9dc013beb4 +size 1307296 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/resolver/cares.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/resolver/cares.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..fb9b51bab540a149459d03c9da12b15bcb85fca5 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/gevent/resolver/cares.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:31188e8cd3cc0af766174bf078fc96f64151cf49836d4462a556f1d6f5d60ac3 +size 2882264 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/google/protobuf/pyext/_message.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/google/protobuf/pyext/_message.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..f0c6fe6758f2a1228925e3bddfd530ea5ecb347e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/google/protobuf/pyext/_message.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a18ba5590afbf92fc7c5122030921b7dc843733881a67fe42b464cd82925ea23 +size 2524904 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/greenlet/_greenlet.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/greenlet/_greenlet.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..26ff54c98cb48a39071686510431d6a2b4f2e1e5 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/greenlet/_greenlet.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:538bd1d707ee56250877e868b6dcbada657fe434d04c0f5d8eae3bcc9506689f +size 1365632 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/grpc/_cython/cygrpc.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/grpc/_cython/cygrpc.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..4abceabc03fe6f0fdd01c1bf46be624dccfe3683 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/grpc/_cython/cygrpc.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5e53aebfd453de4e65240da31ad75dde464037d93345686994c2ed26bafd84a1 +size 15827512 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py.libs/libaec-7e9d22b8.so.0.1.3 b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py.libs/libaec-7e9d22b8.so.0.1.3 new file mode 100644 index 0000000000000000000000000000000000000000..04a0fcb757c7bd84c50fd687244d9ee7ed4809c3 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py.libs/libaec-7e9d22b8.so.0.1.3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0788adca6f4440b7f72f1520c90a9bf19fb3c0a28202a6a3fbeda3fe525dd9d8 +size 135913 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py.libs/libhdf5-8c29085d.so.310.5.1 b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py.libs/libhdf5-8c29085d.so.310.5.1 new file mode 100644 index 0000000000000000000000000000000000000000..9b7eb091fdd476fc1c1541525bec7c5c47e782d8 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py.libs/libhdf5-8c29085d.so.310.5.1 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:df35a94580ab3ca1eb57ece21394f8cd7964b07df92fb0fedbd545a1dec94621 +size 4647561 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py.libs/libhdf5_hl-a45b8ce6.so.310.0.6 b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py.libs/libhdf5_hl-a45b8ce6.so.310.0.6 new file mode 100644 index 0000000000000000000000000000000000000000..68cc1d6ced5cc556e12dba5604c72dd0d32a0f41 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py.libs/libhdf5_hl-a45b8ce6.so.310.0.6 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:35495761b8dcfd6af3da64c867ae602c930c04d2a47a3b3969e83e5d6a270e0a +size 177857 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/_conv.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/_conv.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..166411233a599fec12a977b2ee65bf62bfc06b48 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/_conv.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fc59dafd667cb5a2a87976b614ddfb0ddc94f89d49d2ecf343f9fcf66ccbf8aa +size 476065 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/_errors.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/_errors.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..afdaa348e0d05033644d2bb8750bd71534c7ab47 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/_errors.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4f51d7f230fe121fab281da4686b39fcca5858ac9a38932f42d0c75bedd37311 +size 147025 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/_npystrings.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/_npystrings.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..e844b6cf4f2cff8b7fbbbf0a5127f1700241e3e4 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/_npystrings.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c4409ec1a212277a01712b1febe3b3d8e9e3557773a1b2276cc4aa7664618d80 +size 150561 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/_objects.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/_objects.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..d649fcef4868a5f2df6b9a82fcb23f8acc20fada --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/_objects.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9da59ec678625feb847cb824206f0188a4c43d6820e8c6dbbe1998c92e18aa80 +size 327849 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/_proxy.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/_proxy.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..c04df69c612fd039843d09623a19c9ba52cad47e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/_proxy.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3bb1661103fbad14c16a9cfb7166d8f9252308a39c99284c74b47a4ecbf758c6 +size 142177 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/_selector.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/_selector.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..a0dd41000257fe721a98d2c4254015985a84a818 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/_selector.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9db411b68a31ccfc69b08a157f69069713f4f620a65240e7f0794d93709d856d +size 373041 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/defs.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/defs.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..e3f78a0411fc5b8bd7292c91b6f218447b604568 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/defs.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:24e1ab53e68ef2858ad1b2dd2596fb1baa251b1587c26667084bde4df2fdc2c9 +size 614865 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..8b3e5a33ea3bcc1c9162198be25b6847e56505f3 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f9d6bdb6f91467d1959eb1c4297779fc965998d73ce7a51af321e02908b9826f +size 269905 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5a.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5a.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..24a66a9e58687ee922095d60e6f1fe0ad1a7ddf0 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5a.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:386651071fd383687ef332bedfa11e6e9479fbc227613903f5471deb71c451ec +size 327169 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5ac.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5ac.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..ad6343b2701896e855a22897478dd8e85760ef48 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5ac.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6a1f2e819b778457b5cf54936cad6d67bb7878e6bf47032426d8da77f34c857b +size 212105 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5d.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5d.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..1c1efdafb8b813072d18654da05b2bd31d293411 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5d.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d6f5a4f654ec230ae88c7364a8f143626b3904fa842a1972efa8604529f500b8 +size 623121 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5ds.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5ds.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..99662516bfeddc06247cb9ca5fb5ae735613fdb7 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5ds.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e61219a5459014dbbeeaf29e2e26661beead54f8ab458465dd839158873528b +size 224705 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5f.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5f.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..9ba904223cb377c46159205df71410940f471426 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5f.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b8aff1cefaeb870d249d2c0eec66f682f89712e7efe87df93e0374c8a3d3bf38 +size 368345 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5fd.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5fd.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..22702cb4c5450a79e795b4b09daf773cd9558090 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5fd.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9ee48ee7824a203ddba4a700fe2e74334b7f2e13e0b98b0e96ed7b1dd36aed4a +size 393649 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5g.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5g.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..510b2683e9c5446ec499d1f8e336f26e15ad0396 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5g.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6676ce80625359fe51603edc4c70602d1b01742ce9d6c19c8aba800a540a43e8 +size 405489 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5i.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5i.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..f48f8be921a73f524003979bdb68c8eb76cd3ed1 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5i.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:311e1a3bfe0deb41f5fcae28b14829b07f96f8ab5f923a5662a8d9d2a1ad9995 +size 171105 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5l.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5l.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..87c923205150c18ac6de3957a42475211a692322 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5l.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:05cc415c2ac239ea4b3c27de1407e0520d192f9897aebbeb4bfadc6b0350e53c +size 286193 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5o.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5o.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..b33753af377a3b90386e325d82fa445e924529e1 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5o.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:109b180215f8e1b68ee53ce22c119744dc486d659ab47f2d9a005d3df125bd72 +size 363993 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5p.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5p.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..d0a780223834923c733d5ad1bc70922343bf6510 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5p.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bece781904313d900d32b2661526778cfb08a8f65bb686e433c9080bd3825a12 +size 975081 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5pl.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5pl.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..2f56817672a540e0f208b012ad442a0c8eddf6df --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5pl.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2929d6f9889203da1f2998715dda7853840bdec0d89e777ddeb38c87c71e246c +size 154601 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5r.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5r.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..5448433a6328df76f1624122a0a97bb0269fd3fa --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5r.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ef865cadf8dd8208703a526da5a7df4983d42c0f797689f8fe1dac67414907bb +size 200049 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5s.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5s.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..637b359374f1af2bacd83d680c5f62d7b609786c --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5s.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:daf3cd3be26552d1af23ed74b034a34de1d41460389ef73928233c77d54efb38 +size 318833 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5t.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5t.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..42054ea4bbd2771905420dbee25ba39371dbd51b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5t.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:10fc65c4f6837a2020335ff8be8f94c1b5bb9b4ad2a6409e59d7a34957560ad6 +size 873641 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5z.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5z.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..720e07fd808b47977e1d620d49b49335ce1748a9 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/h5z.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d5ddd553f532d6e9369d103b0fa748d5588fb639786aea2f9d819b676a5c0363 +size 162065 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/tests/data_files/vlen_string_dset.h5 b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/tests/data_files/vlen_string_dset.h5 new file mode 100644 index 0000000000000000000000000000000000000000..dbf021d4c80f66b6343fead92e5d7a6ea8ab647e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/tests/data_files/vlen_string_dset.h5 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:900f8baf19d3d8c4d1193ac1ac6019ee7774005e85c030af44e6757b38d29793 +size 6304 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/tests/data_files/vlen_string_dset_utc.h5 b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/tests/data_files/vlen_string_dset_utc.h5 new file mode 100644 index 0000000000000000000000000000000000000000..ca72c33de37d93f49b7121526b855f52bd927c47 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/tests/data_files/vlen_string_dset_utc.h5 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:85b728382b833c1da61627b9a334e22822d5c1cb359fe3ba6f25262af4532f63 +size 169904 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/tests/data_files/vlen_string_s390x.h5 b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/tests/data_files/vlen_string_s390x.h5 new file mode 100644 index 0000000000000000000000000000000000000000..bca4b91ad9029e3d0f0118aff12c28094edc95af --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/tests/data_files/vlen_string_s390x.h5 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ea990c68e0371bafab4966f752fa1355b3b9f64360066f6d9daff8f1b7e74ca5 +size 9008 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/utils.cpython-310-x86_64-linux-gnu.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/utils.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..23fb31b54384f3db524647ee2ffa49761a35f834 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/h5py/utils.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:999bdc0fefeb8ba1c746b212f2b2c2b5adad67f01020ff7819e17d86edfd6e33 +size 175457 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/hf_xet/hf_xet.abi3.so b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/hf_xet/hf_xet.abi3.so new file mode 100644 index 0000000000000000000000000000000000000000..b1acbf32da0738c8eaff6a55347145c9484af25d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/hf_xet/hf_xet.abi3.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:55daed2681fa040fdcd34d6830e91531a43fc57e5e4d08d6f2d9d26d15a561f0 +size 10713040 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/hydra/test_utils/configs/conf.zip b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/hydra/test_utils/configs/conf.zip new file mode 100644 index 0000000000000000000000000000000000000000..774a4a563dcddb03a846c82152c2ffacac0287c6 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/hydra/test_utils/configs/conf.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5c471e8fa9f01a1fc65507499622da66dff2be96f1bf8d00947f14332270a4bb +size 210 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/ipykernel/resources/logo-32x32.png b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/ipykernel/resources/logo-32x32.png new file mode 100644 index 0000000000000000000000000000000000000000..62a3c160a5660d54273b6d0e2ff168bcb056c9bf --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/ipykernel/resources/logo-32x32.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e32b5c282072d717887b60da73178fdd35a65dc3caeacba7a026e5a4255cc997 +size 1084 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/ipykernel/resources/logo-64x64.png b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/ipykernel/resources/logo-64x64.png new file mode 100644 index 0000000000000000000000000000000000000000..e7feb05bb53eadd9ffefa70f9df09e15daf92433 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/ipykernel/resources/logo-64x64.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5c9063b436cedf0567480fe487ece0d1479ea9545f310cba93fa184ccbab290d +size 2180 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_compressed_pickle_py27_np16.gz b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_compressed_pickle_py27_np16.gz new file mode 100644 index 0000000000000000000000000000000000000000..fedefdd304054a85fa995801885f997ca8e1a44f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_compressed_pickle_py27_np16.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:418447e90d83486568ae3092a960b18d358230e24ac9ec38365daa99f415bd0f +size 769 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_compressed_pickle_py27_np17.gz b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_compressed_pickle_py27_np17.gz new file mode 100644 index 0000000000000000000000000000000000000000..3fd32f71887ddd0c94d06c8a77afccc322fed583 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_compressed_pickle_py27_np17.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a1f4e8cccfca94f25ae744d1f050b0734f663263ba38ed0642181404b348b17b +size 757 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_compressed_pickle_py33_np18.gz b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_compressed_pickle_py33_np18.gz new file mode 100644 index 0000000000000000000000000000000000000000..7cd1fcc9dc7a04d7ac251d3b1bbf973609b947b8 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_compressed_pickle_py33_np18.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d9e215780f978ce693e48110ead23652e1c6de1c2189172232690198f7088788 +size 792 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_compressed_pickle_py34_np19.gz b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_compressed_pickle_py34_np19.gz new file mode 100644 index 0000000000000000000000000000000000000000..7cc0ad77a184883b0268bffd1e2f3d195ae99f6b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_compressed_pickle_py34_np19.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1abdb3ff5b555831f51f7ff00951e66a49277fc2aa787293f18cf8775be65023 +size 794 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_compressed_pickle_py35_np19.gz b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_compressed_pickle_py35_np19.gz new file mode 100644 index 0000000000000000000000000000000000000000..878decdcad534f6d2cdd14a487c207f8c6133261 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_compressed_pickle_py35_np19.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a56c3fc6e0db3a4102aaed4a19fd4e154eecd956f30b6bf9179897844ed3c01e +size 790 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py27_np17.pkl b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py27_np17.pkl new file mode 100644 index 0000000000000000000000000000000000000000..38202b72d880ff53255dbb86eccd73bdb6224c74 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py27_np17.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:89c4508e3dfbe01f801e4e739f1aded13f685941e89281c8050f0ca8aa3c97e5 +size 986 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py27_np17.pkl.bz2 b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py27_np17.pkl.bz2 new file mode 100644 index 0000000000000000000000000000000000000000..77ea56324322ed8657967221aad47bc0063a12fc --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py27_np17.pkl.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a18415232322531c918164ae04148ebc258acd3a00fa4529728416755e14a15e +size 997 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py27_np17.pkl.xz b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py27_np17.pkl.xz new file mode 100644 index 0000000000000000000000000000000000000000..7812497bc95e5894c8e880736bfb06aa22bb2fae --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py27_np17.pkl.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:efb146d450c6d061d06affb56f17384e7f64cbab9b516fcc6c4d3f8869b3e707 +size 712 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py33_np18.pkl b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py33_np18.pkl new file mode 100644 index 0000000000000000000000000000000000000000..d6cf697b1c1c752d4d8a78d702a70042ad047ce9 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py33_np18.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e064c2eecfdc58d552844467da7bd56eca596098322bfd266a7e1312abdd5735 +size 1068 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py33_np18.pkl.bz2 b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py33_np18.pkl.bz2 new file mode 100644 index 0000000000000000000000000000000000000000..317981559c4a9987aa099efeb68e4359c08d71ec --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py33_np18.pkl.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e86d6f6ecfe2626cf691827ac38a81d64ec3ebb527c5432eb344b8496781b45a +size 1000 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py33_np18.pkl.xz b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py33_np18.pkl.xz new file mode 100644 index 0000000000000000000000000000000000000000..826c9ba7b9579a988f8f1718219bbc41fd1ad756 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py33_np18.pkl.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e9a63dcc7df38ab0a1137a9b44b436b13cebfa300eb19dba4ae4bce50d0fa81 +size 752 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py34_np19.pkl b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py34_np19.pkl new file mode 100644 index 0000000000000000000000000000000000000000..f22c25bdb59d15a3771104dff6dfebe564e98add --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py34_np19.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1cbe456f5b91f5a3cb8e386838f276c30335432a351426686187761d5c34168b +size 1068 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py34_np19.pkl.bz2 b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py34_np19.pkl.bz2 new file mode 100644 index 0000000000000000000000000000000000000000..80818a8baa1e2481b62bed06bb2b95f4a614cc3a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py34_np19.pkl.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3f2af67ea667c1f5315ddcab06bfa447005863c1c0fd88bb7e04a0b8acb9a54b +size 1021 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py34_np19.pkl.xz b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py34_np19.pkl.xz new file mode 100644 index 0000000000000000000000000000000000000000..1cd5660dd8d32121e8dd7b40534187add5981639 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py34_np19.pkl.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:04d7e68907e978b56975f9309492b8849e42a60974beb795c9e93273977f3cd3 +size 752 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py35_np19.pkl b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py35_np19.pkl new file mode 100644 index 0000000000000000000000000000000000000000..360af38dc3a9bde47e3b18b144dc1c5257e7daca --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py35_np19.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:97b9ef2e896104321d3c5ce73b3de504788c38f04f08c8b56d7a29d6d1520a96 +size 1068 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py35_np19.pkl.bz2 b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py35_np19.pkl.bz2 new file mode 100644 index 0000000000000000000000000000000000000000..06e8395437874c25cfdf6a6783eab12a6c178f90 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py35_np19.pkl.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a6a1a9b884be654e2e3fc9a48251ecf0c6920e255c3f2ee5dd71d8252a694606 +size 1005 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py35_np19.pkl.xz b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py35_np19.pkl.xz new file mode 100644 index 0000000000000000000000000000000000000000..cec2871b09ae347e07c81eb55e7979300748ccd1 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.10.0_pickle_py35_np19.pkl.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:02cf30d8b196c303662b2dd035d2a58caeb762ae3a82345ffd1274961e7f5aa0 +size 752 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.11.0_compressed_pickle_py36_np111.gz b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.11.0_compressed_pickle_py36_np111.gz new file mode 100644 index 0000000000000000000000000000000000000000..f2e65e202609648f0a5464ae5b78b9f9fba8dd6e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.11.0_compressed_pickle_py36_np111.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d56ae75c3a83a0d10f60e657d50e56af6e3addbf2f555e9fc385a6e52e1b32de +size 800 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.11.0_pickle_py36_np111.pkl b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.11.0_pickle_py36_np111.pkl new file mode 100644 index 0000000000000000000000000000000000000000..4dda21d9ad4ce279b8474ecce9697e3290e96bfa --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.11.0_pickle_py36_np111.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5e6b0e171782d5fd5a61d1844dc946eb27c5f6b2e8075d436b23808433142ebc +size 1068 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.11.0_pickle_py36_np111.pkl.bz2 b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.11.0_pickle_py36_np111.pkl.bz2 new file mode 100644 index 0000000000000000000000000000000000000000..895dd324d574d9b2298833317a76f3794209bbb3 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.11.0_pickle_py36_np111.pkl.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc8db259be742ca2ff36067277f5e4a03e6d78883ddee238da65a7c7d79ef804 +size 991 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.11.0_pickle_py36_np111.pkl.xz b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.11.0_pickle_py36_np111.pkl.xz new file mode 100644 index 0000000000000000000000000000000000000000..c7607dcdb2b09e7a50acc3239cc585974e7a09e6 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.11.0_pickle_py36_np111.pkl.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dd787f35b3197418d8c7bca77c9dc5ca47b6f22cd24524b3ccd074cf90f893d6 +size 752 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.8.4_compressed_pickle_py27_np17.gz b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.8.4_compressed_pickle_py27_np17.gz new file mode 100644 index 0000000000000000000000000000000000000000..fc4e28719d5acc118ac1d8bd8cdd15227eef25ba --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.8.4_compressed_pickle_py27_np17.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4a9f994fb8baa63e689f681ba6db33bbb45aaf32693a61c9ebb50a3a608f40c8 +size 659 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_compressed_pickle_py27_np16.gz b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_compressed_pickle_py27_np16.gz new file mode 100644 index 0000000000000000000000000000000000000000..1238376dd6ac2e166bf56f263862afe56b866da3 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_compressed_pickle_py27_np16.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:34bb43aefa365c81f42af51402f84ea8c7a85c48c65b422e4e4fe8b2ee57883c +size 658 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_compressed_pickle_py27_np17.gz b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_compressed_pickle_py27_np17.gz new file mode 100644 index 0000000000000000000000000000000000000000..1238376dd6ac2e166bf56f263862afe56b866da3 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_compressed_pickle_py27_np17.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:34bb43aefa365c81f42af51402f84ea8c7a85c48c65b422e4e4fe8b2ee57883c +size 658 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_compressed_pickle_py34_np19.gz b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_compressed_pickle_py34_np19.gz new file mode 100644 index 0000000000000000000000000000000000000000..0720a70aee276c37f9457817922ae60b67600d47 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_compressed_pickle_py34_np19.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9f33bd8a21a41b729b05dac5deeb0e868f218a092b0e3fe5988094cf167217f6 +size 673 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_compressed_pickle_py35_np19.gz b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_compressed_pickle_py35_np19.gz new file mode 100644 index 0000000000000000000000000000000000000000..0720a70aee276c37f9457817922ae60b67600d47 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_compressed_pickle_py35_np19.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9f33bd8a21a41b729b05dac5deeb0e868f218a092b0e3fe5988094cf167217f6 +size 673 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py27_np16.pkl b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py27_np16.pkl new file mode 100644 index 0000000000000000000000000000000000000000..f7ca0addc6d032e93d0b530a2b42a583fb0d4b81 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py27_np16.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9da8a3764db121e29d21ade67c9c3426598e76d88deae44cd7238983af8cef73 +size 670 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py27_np16.pkl_01.npy b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py27_np16.pkl_01.npy new file mode 100644 index 0000000000000000000000000000000000000000..15574a4193ad4ad724b2b8053c701a82efa78fd5 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py27_np16.pkl_01.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0efbd7d9ce7eec3a6e0a0db41e795e0396cca3d6b037dad6c61b464843d28809 +size 120 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py27_np16.pkl_02.npy b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py27_np16.pkl_02.npy new file mode 100644 index 0000000000000000000000000000000000000000..f00f08fbeeda280fa3ce00069c313c5412a33eca --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py27_np16.pkl_02.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1c1cf36cb781fbcc21b953bb0a0b45df092da0eae0e765882e5963ccd70105b1 +size 120 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py27_np16.pkl_03.npy b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py27_np16.pkl_03.npy new file mode 100644 index 0000000000000000000000000000000000000000..ccc84c361de2569ed5cb91967f9063efcd84dd14 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py27_np16.pkl_03.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a0c45ae2a289841cbeba2443b7ebaa3b31c0a9e9dcc73294aca5729da0092405 +size 236 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py27_np16.pkl_04.npy b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py27_np16.pkl_04.npy new file mode 100644 index 0000000000000000000000000000000000000000..e9b5e77c73268dfff541b576126f06fc6fed3d59 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py27_np16.pkl_04.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3ecbe244294ba93e08479b16c1b9a9411e3569ff660ed0459dca1d241381df05 +size 104 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py27_np17.pkl b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py27_np17.pkl new file mode 100644 index 0000000000000000000000000000000000000000..976cba8c28be9a3dd0075efe5a6b3ce704319161 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py27_np17.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f29d7f1d2ceca07f10df172c0e826ef08163a14b12c6ef3fa80ec53a5fcdc3c +size 670 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py27_np17.pkl_01.npy b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py27_np17.pkl_01.npy new file mode 100644 index 0000000000000000000000000000000000000000..15574a4193ad4ad724b2b8053c701a82efa78fd5 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py27_np17.pkl_01.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0efbd7d9ce7eec3a6e0a0db41e795e0396cca3d6b037dad6c61b464843d28809 +size 120 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py27_np17.pkl_02.npy b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py27_np17.pkl_02.npy new file mode 100644 index 0000000000000000000000000000000000000000..f00f08fbeeda280fa3ce00069c313c5412a33eca --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py27_np17.pkl_02.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1c1cf36cb781fbcc21b953bb0a0b45df092da0eae0e765882e5963ccd70105b1 +size 120 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py27_np17.pkl_03.npy b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py27_np17.pkl_03.npy new file mode 100644 index 0000000000000000000000000000000000000000..ccc84c361de2569ed5cb91967f9063efcd84dd14 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/joblib/test/data/joblib_0.9.2_pickle_py27_np17.pkl_03.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a0c45ae2a289841cbeba2443b7ebaa3b31c0a9e9dcc73294aca5729da0092405 +size 236 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch-2.10.0.dist-info/INSTALLER b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch-2.10.0.dist-info/INSTALLER new file mode 100644 index 0000000000000000000000000000000000000000..a1b589e38a32041e49332e5e81c2d363dc418d68 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch-2.10.0.dist-info/INSTALLER @@ -0,0 +1 @@ +pip diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch-2.10.0.dist-info/METADATA b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch-2.10.0.dist-info/METADATA new file mode 100644 index 0000000000000000000000000000000000000000..10b433f126a88355176dd73145faa80ed5c042eb --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch-2.10.0.dist-info/METADATA @@ -0,0 +1,640 @@ +Metadata-Version: 2.4 +Name: torch +Version: 2.10.0 +Summary: Tensors and Dynamic neural networks in Python with strong GPU acceleration +Author-email: PyTorch Team +License: BSD-3-Clause +Project-URL: Homepage, https://pytorch.org +Project-URL: Repository, https://github.com/pytorch/pytorch +Project-URL: Documentation, https://pytorch.org/docs +Project-URL: Issue Tracker, https://github.com/pytorch/pytorch/issues +Project-URL: Forum, https://discuss.pytorch.org +Keywords: pytorch,machine learning +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Developers +Classifier: Intended Audience :: Education +Classifier: Intended Audience :: Science/Research +Classifier: Topic :: Scientific/Engineering +Classifier: Topic :: Scientific/Engineering :: Mathematics +Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence +Classifier: Topic :: Software Development +Classifier: Topic :: Software Development :: Libraries +Classifier: Topic :: Software Development :: Libraries :: Python Modules +Classifier: Programming Language :: C++ +Classifier: Programming Language :: Python :: 3 :: Only +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 +Classifier: Programming Language :: Python :: 3.13 +Classifier: Programming Language :: Python :: 3.14 +Requires-Python: >=3.10 +Description-Content-Type: text/markdown +License-File: LICENSE +License-File: NOTICE +Requires-Dist: filelock +Requires-Dist: typing-extensions>=4.10.0 +Requires-Dist: setuptools; python_version >= "3.12" +Requires-Dist: sympy>=1.13.3 +Requires-Dist: networkx>=2.5.1 +Requires-Dist: jinja2 +Requires-Dist: fsspec>=0.8.5 +Requires-Dist: cuda-bindings==12.9.4; platform_system == "Linux" and platform_machine == "x86_64" +Requires-Dist: nvidia-cuda-nvrtc-cu12==12.8.93; platform_system == "Linux" and platform_machine == "x86_64" +Requires-Dist: nvidia-cuda-runtime-cu12==12.8.90; platform_system == "Linux" and platform_machine == "x86_64" +Requires-Dist: nvidia-cuda-cupti-cu12==12.8.90; platform_system == "Linux" and platform_machine == "x86_64" +Requires-Dist: nvidia-cudnn-cu12==9.10.2.21; platform_system == "Linux" and platform_machine == "x86_64" +Requires-Dist: nvidia-cublas-cu12==12.8.4.1; platform_system == "Linux" and platform_machine == "x86_64" +Requires-Dist: nvidia-cufft-cu12==11.3.3.83; platform_system == "Linux" and platform_machine == "x86_64" +Requires-Dist: nvidia-curand-cu12==10.3.9.90; platform_system == "Linux" and platform_machine == "x86_64" +Requires-Dist: nvidia-cusolver-cu12==11.7.3.90; platform_system == "Linux" and platform_machine == "x86_64" +Requires-Dist: nvidia-cusparse-cu12==12.5.8.93; platform_system == "Linux" and platform_machine == "x86_64" +Requires-Dist: nvidia-cusparselt-cu12==0.7.1; platform_system == "Linux" and platform_machine == "x86_64" +Requires-Dist: nvidia-nccl-cu12==2.27.5; platform_system == "Linux" and platform_machine == "x86_64" +Requires-Dist: nvidia-nvshmem-cu12==3.4.5; platform_system == "Linux" and platform_machine == "x86_64" +Requires-Dist: nvidia-nvtx-cu12==12.8.90; platform_system == "Linux" and platform_machine == "x86_64" +Requires-Dist: nvidia-nvjitlink-cu12==12.8.93; platform_system == "Linux" and platform_machine == "x86_64" +Requires-Dist: nvidia-cufile-cu12==1.13.1.3; platform_system == "Linux" and platform_machine == "x86_64" +Requires-Dist: triton==3.6.0; platform_system == "Linux" and platform_machine == "x86_64" +Provides-Extra: optree +Requires-Dist: optree>=0.13.0; extra == "optree" +Provides-Extra: opt-einsum +Requires-Dist: opt-einsum>=3.3; extra == "opt-einsum" +Provides-Extra: pyyaml +Requires-Dist: pyyaml; extra == "pyyaml" +Dynamic: license-file +Dynamic: requires-dist + +![PyTorch Logo](https://github.com/pytorch/pytorch/raw/main/docs/source/_static/img/pytorch-logo-dark.png) + +-------------------------------------------------------------------------------- + +PyTorch is a Python package that provides two high-level features: +- Tensor computation (like NumPy) with strong GPU acceleration +- Deep neural networks built on a tape-based autograd system + +You can reuse your favorite Python packages such as NumPy, SciPy, and Cython to extend PyTorch when needed. + +Our trunk health (Continuous Integration signals) can be found at [hud.pytorch.org](https://hud.pytorch.org/ci/pytorch/pytorch/main). + + + +- [More About PyTorch](#more-about-pytorch) + - [A GPU-Ready Tensor Library](#a-gpu-ready-tensor-library) + - [Dynamic Neural Networks: Tape-Based Autograd](#dynamic-neural-networks-tape-based-autograd) + - [Python First](#python-first) + - [Imperative Experiences](#imperative-experiences) + - [Fast and Lean](#fast-and-lean) + - [Extensions Without Pain](#extensions-without-pain) +- [Installation](#installation) + - [Binaries](#binaries) + - [NVIDIA Jetson Platforms](#nvidia-jetson-platforms) + - [From Source](#from-source) + - [Prerequisites](#prerequisites) + - [NVIDIA CUDA Support](#nvidia-cuda-support) + - [AMD ROCm Support](#amd-rocm-support) + - [Intel GPU Support](#intel-gpu-support) + - [Get the PyTorch Source](#get-the-pytorch-source) + - [Install Dependencies](#install-dependencies) + - [Install PyTorch](#install-pytorch) + - [Adjust Build Options (Optional)](#adjust-build-options-optional) + - [Docker Image](#docker-image) + - [Using pre-built images](#using-pre-built-images) + - [Building the image yourself](#building-the-image-yourself) + - [Building the Documentation](#building-the-documentation) + - [Building a PDF](#building-a-pdf) + - [Previous Versions](#previous-versions) +- [Getting Started](#getting-started) +- [Resources](#resources) +- [Communication](#communication) +- [Releases and Contributing](#releases-and-contributing) +- [The Team](#the-team) +- [License](#license) + + + +## More About PyTorch + +[Learn the basics of PyTorch](https://pytorch.org/tutorials/beginner/basics/intro.html) + +At a granular level, PyTorch is a library that consists of the following components: + +| Component | Description | +| ---- | --- | +| [**torch**](https://pytorch.org/docs/stable/torch.html) | A Tensor library like NumPy, with strong GPU support | +| [**torch.autograd**](https://pytorch.org/docs/stable/autograd.html) | A tape-based automatic differentiation library that supports all differentiable Tensor operations in torch | +| [**torch.jit**](https://pytorch.org/docs/stable/jit.html) | A compilation stack (TorchScript) to create serializable and optimizable models from PyTorch code | +| [**torch.nn**](https://pytorch.org/docs/stable/nn.html) | A neural networks library deeply integrated with autograd designed for maximum flexibility | +| [**torch.multiprocessing**](https://pytorch.org/docs/stable/multiprocessing.html) | Python multiprocessing, but with magical memory sharing of torch Tensors across processes. Useful for data loading and Hogwild training | +| [**torch.utils**](https://pytorch.org/docs/stable/data.html) | DataLoader and other utility functions for convenience | + +Usually, PyTorch is used either as: + +- A replacement for NumPy to use the power of GPUs. +- A deep learning research platform that provides maximum flexibility and speed. + +Elaborating Further: + +### A GPU-Ready Tensor Library + +If you use NumPy, then you have used Tensors (a.k.a. ndarray). + +![Tensor illustration](https://github.com/pytorch/pytorch/raw/main/docs/source/_static/img/tensor_illustration.png) + +PyTorch provides Tensors that can live either on the CPU or the GPU and accelerates the +computation by a huge amount. + +We provide a wide variety of tensor routines to accelerate and fit your scientific computation needs +such as slicing, indexing, mathematical operations, linear algebra, reductions. +And they are fast! + +### Dynamic Neural Networks: Tape-Based Autograd + +PyTorch has a unique way of building neural networks: using and replaying a tape recorder. + +Most frameworks such as TensorFlow, Theano, Caffe, and CNTK have a static view of the world. +One has to build a neural network and reuse the same structure again and again. +Changing the way the network behaves means that one has to start from scratch. + +With PyTorch, we use a technique called reverse-mode auto-differentiation, which allows you to +change the way your network behaves arbitrarily with zero lag or overhead. Our inspiration comes +from several research papers on this topic, as well as current and past work such as +[torch-autograd](https://github.com/twitter/torch-autograd), +[autograd](https://github.com/HIPS/autograd), +[Chainer](https://chainer.org), etc. + +While this technique is not unique to PyTorch, it's one of the fastest implementations of it to date. +You get the best of speed and flexibility for your crazy research. + +![Dynamic graph](https://github.com/pytorch/pytorch/raw/main/docs/source/_static/img/dynamic_graph.gif) + +### Python First + +PyTorch is not a Python binding into a monolithic C++ framework. +It is built to be deeply integrated into Python. +You can use it naturally like you would use [NumPy](https://www.numpy.org/) / [SciPy](https://www.scipy.org/) / [scikit-learn](https://scikit-learn.org) etc. +You can write your new neural network layers in Python itself, using your favorite libraries +and use packages such as [Cython](https://cython.org/) and [Numba](http://numba.pydata.org/). +Our goal is to not reinvent the wheel where appropriate. + +### Imperative Experiences + +PyTorch is designed to be intuitive, linear in thought, and easy to use. +When you execute a line of code, it gets executed. There isn't an asynchronous view of the world. +When you drop into a debugger or receive error messages and stack traces, understanding them is straightforward. +The stack trace points to exactly where your code was defined. +We hope you never spend hours debugging your code because of bad stack traces or asynchronous and opaque execution engines. + +### Fast and Lean + +PyTorch has minimal framework overhead. We integrate acceleration libraries +such as [Intel MKL](https://software.intel.com/mkl) and NVIDIA ([cuDNN](https://developer.nvidia.com/cudnn), [NCCL](https://developer.nvidia.com/nccl)) to maximize speed. +At the core, its CPU and GPU Tensor and neural network backends +are mature and have been tested for years. + +Hence, PyTorch is quite fast — whether you run small or large neural networks. + +The memory usage in PyTorch is extremely efficient compared to Torch or some of the alternatives. +We've written custom memory allocators for the GPU to make sure that +your deep learning models are maximally memory efficient. +This enables you to train bigger deep learning models than before. + +### Extensions Without Pain + +Writing new neural network modules, or interfacing with PyTorch's Tensor API was designed to be straightforward +and with minimal abstractions. + +You can write new neural network layers in Python using the torch API +[or your favorite NumPy-based libraries such as SciPy](https://pytorch.org/tutorials/advanced/numpy_extensions_tutorial.html). + +If you want to write your layers in C/C++, we provide a convenient extension API that is efficient and with minimal boilerplate. +No wrapper code needs to be written. You can see [a tutorial here](https://pytorch.org/tutorials/advanced/cpp_extension.html) and [an example here](https://github.com/pytorch/extension-cpp). + + +## Installation + +### Binaries +Commands to install binaries via Conda or pip wheels are on our website: [https://pytorch.org/get-started/locally/](https://pytorch.org/get-started/locally/) + + +#### NVIDIA Jetson Platforms + +Python wheels for NVIDIA's Jetson Nano, Jetson TX1/TX2, Jetson Xavier NX/AGX, and Jetson AGX Orin are provided [here](https://forums.developer.nvidia.com/t/pytorch-for-jetson-version-1-10-now-available/72048) and the L4T container is published [here](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/l4t-pytorch) + +They require JetPack 4.2 and above, and [@dusty-nv](https://github.com/dusty-nv) and [@ptrblck](https://github.com/ptrblck) are maintaining them. + + +### From Source + +#### Prerequisites +If you are installing from source, you will need: +- Python 3.10 or later +- A compiler that fully supports C++17, such as clang or gcc (gcc 9.4.0 or newer is required, on Linux) +- Visual Studio or Visual Studio Build Tool (Windows only) + +\* PyTorch CI uses Visual C++ BuildTools, which come with Visual Studio Enterprise, +Professional, or Community Editions. You can also install the build tools from +https://visualstudio.microsoft.com/visual-cpp-build-tools/. The build tools *do not* +come with Visual Studio Code by default. + +An example of environment setup is shown below: + +* Linux: + +```bash +$ source /bin/activate +$ conda create -y -n +$ conda activate +``` + +* Windows: + +```bash +$ source \Scripts\activate.bat +$ conda create -y -n +$ conda activate +$ call "C:\Program Files\Microsoft Visual Studio\\Community\VC\Auxiliary\Build\vcvarsall.bat" x64 +``` + +A conda environment is not required. You can also do a PyTorch build in a +standard virtual environment, e.g., created with tools like `uv`, provided +your system has installed all the necessary dependencies unavailable as pip +packages (e.g., CUDA, MKL.) + +##### NVIDIA CUDA Support +If you want to compile with CUDA support, [select a supported version of CUDA from our support matrix](https://pytorch.org/get-started/locally/), then install the following: +- [NVIDIA CUDA](https://developer.nvidia.com/cuda-downloads) +- [NVIDIA cuDNN](https://developer.nvidia.com/cudnn) v8.5 or above +- [Compiler](https://gist.github.com/ax3l/9489132) compatible with CUDA + +Note: You could refer to the [cuDNN Support Matrix](https://docs.nvidia.com/deeplearning/cudnn/backend/latest/reference/support-matrix.html) for cuDNN versions with the various supported CUDA, CUDA driver, and NVIDIA hardware. + +If you want to disable CUDA support, export the environment variable `USE_CUDA=0`. +Other potentially useful environment variables may be found in `setup.py`. If +CUDA is installed in a non-standard location, set PATH so that the nvcc you +want to use can be found (e.g., `export PATH=/usr/local/cuda-12.8/bin:$PATH`). + +If you are building for NVIDIA's Jetson platforms (Jetson Nano, TX1, TX2, AGX Xavier), Instructions to install PyTorch for Jetson Nano are [available here](https://devtalk.nvidia.com/default/topic/1049071/jetson-nano/pytorch-for-jetson-nano/) + +##### AMD ROCm Support +If you want to compile with ROCm support, install +- [AMD ROCm](https://rocm.docs.amd.com/en/latest/deploy/linux/quick_start.html) 4.0 and above installation +- ROCm is currently supported only for Linux systems. + +By default the build system expects ROCm to be installed in `/opt/rocm`. If ROCm is installed in a different directory, the `ROCM_PATH` environment variable must be set to the ROCm installation directory. The build system automatically detects the AMD GPU architecture. Optionally, the AMD GPU architecture can be explicitly set with the `PYTORCH_ROCM_ARCH` environment variable [AMD GPU architecture](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html#supported-gpus) + +If you want to disable ROCm support, export the environment variable `USE_ROCM=0`. +Other potentially useful environment variables may be found in `setup.py`. + +##### Intel GPU Support +If you want to compile with Intel GPU support, follow these +- [PyTorch Prerequisites for Intel GPUs](https://www.intel.com/content/www/us/en/developer/articles/tool/pytorch-prerequisites-for-intel-gpus.html) instructions. +- Intel GPU is supported for Linux and Windows. + +If you want to disable Intel GPU support, export the environment variable `USE_XPU=0`. +Other potentially useful environment variables may be found in `setup.py`. + +#### Get the PyTorch Source + +```bash +git clone https://github.com/pytorch/pytorch +cd pytorch +# if you are updating an existing checkout +git submodule sync +git submodule update --init --recursive +``` + +#### Install Dependencies + +**Common** + +```bash +# Run this command from the PyTorch directory after cloning the source code using the “Get the PyTorch Source“ section above +pip install --group dev +``` + +**On Linux** + +```bash +pip install mkl-static mkl-include +# CUDA only: Add LAPACK support for the GPU if needed +# magma installation: run with active conda environment. specify CUDA version to install +.ci/docker/common/install_magma_conda.sh 12.4 + +# (optional) If using torch.compile with inductor/triton, install the matching version of triton +# Run from the pytorch directory after cloning +# For Intel GPU support, please explicitly `export USE_XPU=1` before running command. +make triton +``` + +**On MacOS** + +```bash +# Add this package on intel x86 processor machines only +pip install mkl-static mkl-include +# Add these packages if torch.distributed is needed +conda install pkg-config libuv +``` + +**On Windows** + +```bash +pip install mkl-static mkl-include +# Add these packages if torch.distributed is needed. +# Distributed package support on Windows is a prototype feature and is subject to changes. +conda install -c conda-forge libuv=1.51 +``` + +#### Install PyTorch + +**On Linux** + +If you're compiling for AMD ROCm then first run this command: + +```bash +# Only run this if you're compiling for ROCm +python tools/amd_build/build_amd.py +``` + +Install PyTorch + +```bash +# the CMake prefix for conda environment +export CMAKE_PREFIX_PATH="${CONDA_PREFIX:-'$(dirname $(which conda))/../'}:${CMAKE_PREFIX_PATH}" +python -m pip install --no-build-isolation -v -e . + +# the CMake prefix for non-conda environment, e.g. Python venv +# call following after activating the venv +export CMAKE_PREFIX_PATH="${VIRTUAL_ENV}:${CMAKE_PREFIX_PATH}" +``` + +**On macOS** + +```bash +python -m pip install --no-build-isolation -v -e . +``` + +**On Windows** + +If you want to build legacy python code, please refer to [Building on legacy code and CUDA](https://github.com/pytorch/pytorch/blob/main/CONTRIBUTING.md#building-on-legacy-code-and-cuda) + +**CPU-only builds** + +In this mode PyTorch computations will run on your CPU, not your GPU. + +```cmd +python -m pip install --no-build-isolation -v -e . +``` + +Note on OpenMP: The desired OpenMP implementation is Intel OpenMP (iomp). In order to link against iomp, you'll need to manually download the library and set up the building environment by tweaking `CMAKE_INCLUDE_PATH` and `LIB`. The instruction [here](https://github.com/pytorch/pytorch/blob/main/docs/source/notes/windows.rst#building-from-source) is an example for setting up both MKL and Intel OpenMP. Without these configurations for CMake, Microsoft Visual C OpenMP runtime (vcomp) will be used. + +**CUDA based build** + +In this mode PyTorch computations will leverage your GPU via CUDA for faster number crunching + +[NVTX](https://docs.nvidia.com/gameworks/content/gameworkslibrary/nvtx/nvidia_tools_extension_library_nvtx.htm) is needed to build Pytorch with CUDA. +NVTX is a part of CUDA distributive, where it is called "Nsight Compute". To install it onto an already installed CUDA run CUDA installation once again and check the corresponding checkbox. +Make sure that CUDA with Nsight Compute is installed after Visual Studio. + +Currently, VS 2017 / 2019, and Ninja are supported as the generator of CMake. If `ninja.exe` is detected in `PATH`, then Ninja will be used as the default generator, otherwise, it will use VS 2017 / 2019. +
If Ninja is selected as the generator, the latest MSVC will get selected as the underlying toolchain. + +Additional libraries such as +[Magma](https://developer.nvidia.com/magma), [oneDNN, a.k.a. MKLDNN or DNNL](https://github.com/oneapi-src/oneDNN), and [Sccache](https://github.com/mozilla/sccache) are often needed. Please refer to the [installation-helper](https://github.com/pytorch/pytorch/tree/main/.ci/pytorch/win-test-helpers/installation-helpers) to install them. + +You can refer to the [build_pytorch.bat](https://github.com/pytorch/pytorch/blob/main/.ci/pytorch/win-test-helpers/build_pytorch.bat) script for some other environment variables configurations + +```cmd +cmd + +:: Set the environment variables after you have downloaded and unzipped the mkl package, +:: else CMake would throw an error as `Could NOT find OpenMP`. +set CMAKE_INCLUDE_PATH={Your directory}\mkl\include +set LIB={Your directory}\mkl\lib;%LIB% + +:: Read the content in the previous section carefully before you proceed. +:: [Optional] If you want to override the underlying toolset used by Ninja and Visual Studio with CUDA, please run the following script block. +:: "Visual Studio 2019 Developer Command Prompt" will be run automatically. +:: Make sure you have CMake >= 3.12 before you do this when you use the Visual Studio generator. +set CMAKE_GENERATOR_TOOLSET_VERSION=14.27 +set DISTUTILS_USE_SDK=1 +for /f "usebackq tokens=*" %i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -version [15^,17^) -products * -latest -property installationPath`) do call "%i\VC\Auxiliary\Build\vcvarsall.bat" x64 -vcvars_ver=%CMAKE_GENERATOR_TOOLSET_VERSION% + +:: [Optional] If you want to override the CUDA host compiler +set CUDAHOSTCXX=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\HostX64\x64\cl.exe + +python -m pip install --no-build-isolation -v -e . +``` + +**Intel GPU builds** + +In this mode PyTorch with Intel GPU support will be built. + +Please make sure [the common prerequisites](#prerequisites) as well as [the prerequisites for Intel GPU](#intel-gpu-support) are properly installed and the environment variables are configured prior to starting the build. For build tool support, `Visual Studio 2022` is required. + +Then PyTorch can be built with the command: + +```cmd +:: CMD Commands: +:: Set the CMAKE_PREFIX_PATH to help find corresponding packages +:: %CONDA_PREFIX% only works after `conda activate custom_env` + +if defined CMAKE_PREFIX_PATH ( + set "CMAKE_PREFIX_PATH=%CONDA_PREFIX%\Library;%CMAKE_PREFIX_PATH%" +) else ( + set "CMAKE_PREFIX_PATH=%CONDA_PREFIX%\Library" +) + +python -m pip install --no-build-isolation -v -e . +``` + +##### Adjust Build Options (Optional) + +You can adjust the configuration of cmake variables optionally (without building first), by doing +the following. For example, adjusting the pre-detected directories for CuDNN or BLAS can be done +with such a step. + +On Linux + +```bash +export CMAKE_PREFIX_PATH="${CONDA_PREFIX:-'$(dirname $(which conda))/../'}:${CMAKE_PREFIX_PATH}" +CMAKE_ONLY=1 python setup.py build +ccmake build # or cmake-gui build +``` + +On macOS + +```bash +export CMAKE_PREFIX_PATH="${CONDA_PREFIX:-'$(dirname $(which conda))/../'}:${CMAKE_PREFIX_PATH}" +MACOSX_DEPLOYMENT_TARGET=11.0 CMAKE_ONLY=1 python setup.py build +ccmake build # or cmake-gui build +``` + +### Docker Image + +#### Using pre-built images + +You can also pull a pre-built docker image from Docker Hub and run with docker v19.03+ + +```bash +docker run --gpus all --rm -ti --ipc=host pytorch/pytorch:latest +``` + +Please note that PyTorch uses shared memory to share data between processes, so if torch multiprocessing is used (e.g. +for multithreaded data loaders) the default shared memory segment size that container runs with is not enough, and you +should increase shared memory size either with `--ipc=host` or `--shm-size` command line options to `nvidia-docker run`. + +#### Building the image yourself + +**NOTE:** Must be built with a docker version > 18.06 + +The `Dockerfile` is supplied to build images with CUDA 11.1 support and cuDNN v8. +You can pass `PYTHON_VERSION=x.y` make variable to specify which Python version is to be used by Miniconda, or leave it +unset to use the default. + +```bash +make -f docker.Makefile +# images are tagged as docker.io/${your_docker_username}/pytorch +``` + +You can also pass the `CMAKE_VARS="..."` environment variable to specify additional CMake variables to be passed to CMake during the build. +See [setup.py](./setup.py) for the list of available variables. + +```bash +make -f docker.Makefile +``` + +### Building the Documentation + +To build documentation in various formats, you will need [Sphinx](http://www.sphinx-doc.org) +and the pytorch_sphinx_theme2. + +Before you build the documentation locally, ensure `torch` is +installed in your environment. For small fixes, you can install the +nightly version as described in [Getting Started](https://pytorch.org/get-started/locally/). + +For more complex fixes, such as adding a new module and docstrings for +the new module, you might need to install torch [from source](#from-source). +See [Docstring Guidelines](https://github.com/pytorch/pytorch/wiki/Docstring-Guidelines) +for docstring conventions. + +```bash +cd docs/ +pip install -r requirements.txt +make html +make serve +``` + +Run `make` to get a list of all available output formats. + +If you get a katex error run `npm install katex`. If it persists, try +`npm install -g katex` + +> [!NOTE] +> If you installed `nodejs` with a different package manager (e.g., +> `conda`) then `npm` will probably install a version of `katex` that is not +> compatible with your version of `nodejs` and doc builds will fail. +> A combination of versions that is known to work is `node@6.13.1` and +> `katex@0.13.18`. To install the latter with `npm` you can run +> ```npm install -g katex@0.13.18``` + +> [!NOTE] +> If you see a numpy incompatibility error, run: +> ``` +> pip install 'numpy<2' +> ``` + +When you make changes to the dependencies run by CI, edit the +`.ci/docker/requirements-docs.txt` file. + +#### Building a PDF + +To compile a PDF of all PyTorch documentation, ensure you have +`texlive` and LaTeX installed. On macOS, you can install them using: + +``` +brew install --cask mactex +``` + +To create the PDF: + +1. Run: + + ``` + make latexpdf + ``` + + This will generate the necessary files in the `build/latex` directory. + +2. Navigate to this directory and execute: + + ``` + make LATEXOPTS="-interaction=nonstopmode" + ``` + + This will produce a `pytorch.pdf` with the desired content. Run this + command one more time so that it generates the correct table + of contents and index. + +> [!NOTE] +> To view the Table of Contents, switch to the **Table of Contents** +> view in your PDF viewer. + + +### Previous Versions + +Installation instructions and binaries for previous PyTorch versions may be found +on [our website](https://pytorch.org/get-started/previous-versions). + + +## Getting Started + +Three pointers to get you started: +- [Tutorials: get you started with understanding and using PyTorch](https://pytorch.org/tutorials/) +- [Examples: easy to understand PyTorch code across all domains](https://github.com/pytorch/examples) +- [The API Reference](https://pytorch.org/docs/) +- [Glossary](https://github.com/pytorch/pytorch/blob/main/GLOSSARY.md) + +## Resources + +* [PyTorch.org](https://pytorch.org/) +* [PyTorch Tutorials](https://pytorch.org/tutorials/) +* [PyTorch Examples](https://github.com/pytorch/examples) +* [PyTorch Models](https://pytorch.org/hub/) +* [Intro to Deep Learning with PyTorch from Udacity](https://www.udacity.com/course/deep-learning-pytorch--ud188) +* [Intro to Machine Learning with PyTorch from Udacity](https://www.udacity.com/course/intro-to-machine-learning-nanodegree--nd229) +* [Deep Neural Networks with PyTorch from Coursera](https://www.coursera.org/learn/deep-neural-networks-with-pytorch) +* [PyTorch Twitter](https://twitter.com/PyTorch) +* [PyTorch Blog](https://pytorch.org/blog/) +* [PyTorch YouTube](https://www.youtube.com/channel/UCWXI5YeOsh03QvJ59PMaXFw) + +## Communication +* Forums: Discuss implementations, research, etc. https://discuss.pytorch.org +* GitHub Issues: Bug reports, feature requests, install issues, RFCs, thoughts, etc. +* Slack: The [PyTorch Slack](https://pytorch.slack.com/) hosts a primary audience of moderate to experienced PyTorch users and developers for general chat, online discussions, collaboration, etc. If you are a beginner looking for help, the primary medium is [PyTorch Forums](https://discuss.pytorch.org). If you need a slack invite, please fill this form: https://goo.gl/forms/PP1AGvNHpSaJP8to1 +* Newsletter: No-noise, a one-way email newsletter with important announcements about PyTorch. You can sign-up here: https://eepurl.com/cbG0rv +* Facebook Page: Important announcements about PyTorch. https://www.facebook.com/pytorch +* For brand guidelines, please visit our website at [pytorch.org](https://pytorch.org/) + +## Releases and Contributing + +Typically, PyTorch has three minor releases a year. Please let us know if you encounter a bug by [filing an issue](https://github.com/pytorch/pytorch/issues). + +We appreciate all contributions. If you are planning to contribute back bug-fixes, please do so without any further discussion. + +If you plan to contribute new features, utility functions, or extensions to the core, please first open an issue and discuss the feature with us. +Sending a PR without discussion might end up resulting in a rejected PR because we might be taking the core in a different direction than you might be aware of. + +To learn more about making a contribution to Pytorch, please see our [Contribution page](CONTRIBUTING.md). For more information about PyTorch releases, see [Release page](RELEASE.md). + +## The Team + +PyTorch is a community-driven project with several skillful engineers and researchers contributing to it. + +PyTorch is currently maintained by [Soumith Chintala](http://soumith.ch), [Gregory Chanan](https://github.com/gchanan), [Dmytro Dzhulgakov](https://github.com/dzhulgakov), [Edward Yang](https://github.com/ezyang), [Alban Desmaison](https://github.com/albanD), [Piotr Bialecki](https://github.com/ptrblck) and [Nikita Shulga](https://github.com/malfet) with major contributions coming from hundreds of talented individuals in various forms and means. +A non-exhaustive but growing list needs to mention: [Trevor Killeen](https://github.com/killeent), [Sasank Chilamkurthy](https://github.com/chsasank), [Sergey Zagoruyko](https://github.com/szagoruyko), [Adam Lerer](https://github.com/adamlerer), [Francisco Massa](https://github.com/fmassa), [Alykhan Tejani](https://github.com/alykhantejani), [Luca Antiga](https://github.com/lantiga), [Alban Desmaison](https://github.com/albanD), [Andreas Koepf](https://github.com/andreaskoepf), [James Bradbury](https://github.com/jekbradbury), [Zeming Lin](https://github.com/ebetica), [Yuandong Tian](https://github.com/yuandong-tian), [Guillaume Lample](https://github.com/glample), [Marat Dukhan](https://github.com/Maratyszcza), [Natalia Gimelshein](https://github.com/ngimel), [Christian Sarofeen](https://github.com/csarofeen), [Martin Raison](https://github.com/martinraison), [Edward Yang](https://github.com/ezyang), [Zachary Devito](https://github.com/zdevito). + +Note: This project is unrelated to [hughperkins/pytorch](https://github.com/hughperkins/pytorch) with the same name. Hugh is a valuable contributor to the Torch community and has helped with many things Torch and PyTorch. + +## License + +PyTorch has a BSD-style license, as found in the [LICENSE](LICENSE) file. diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch-2.10.0.dist-info/RECORD b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch-2.10.0.dist-info/RECORD new file mode 100644 index 0000000000000000000000000000000000000000..2c0345b3b8a934c80e857e6638b9994a96d29300 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch-2.10.0.dist-info/RECORD @@ -0,0 +1,13982 @@ +../../../bin/torchfrtrace,sha256=epdO3x81dRWILQtytNdRNRsl37IdpijKMcyKSjtfJVE,250 +../../../bin/torchrun,sha256=uChMOTT7H57ofgoK0ral81k-E5J1hGmxcBjNHJ51wXE,229 +functorch/__init__.py,sha256=NAwGN21zq-tccaF-ROtv-VWFoPdb7y9iuAt6Hy6QCtc,1037 +functorch/__pycache__/__init__.cpython-310.pyc,, +functorch/_src/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +functorch/_src/__pycache__/__init__.cpython-310.pyc,, +functorch/_src/aot_autograd/__init__.py,sha256=SGo7gh6XGYcOxTGf5g-R8Y9AF95ICcJbQwQD6rFyrpQ,291 +functorch/_src/aot_autograd/__pycache__/__init__.cpython-310.pyc,, +functorch/_src/eager_transforms/__init__.py,sha256=kX_52fDvSX9YX9OAwo5bjvJtrxyjEBUJ1PueW8xgsuw,291 +functorch/_src/eager_transforms/__pycache__/__init__.cpython-310.pyc,, +functorch/_src/make_functional/__init__.py,sha256=b3y8s3KhtCqFB8lM4Pi48AwuztUt7NBK-VISZNJYYjw,235 +functorch/_src/make_functional/__pycache__/__init__.cpython-310.pyc,, +functorch/_src/vmap/__init__.py,sha256=k8r2Esz6tB5D7U_UA0_BCDaWoOmn8JNVrRqK7nG7_fM,467 +functorch/_src/vmap/__pycache__/__init__.cpython-310.pyc,, +functorch/compile/__init__.py,sha256=fZnNG56VBLfKlXMqX5Rj3tORQYLyxbyoA0rEoEBt3KM,756 +functorch/compile/__pycache__/__init__.cpython-310.pyc,, +functorch/dim/__init__.py,sha256=zBby16CwMZU2pmHm6jBPUeLwhQKCYSUGi8KD6VMTwN4,53308 +functorch/dim/__pycache__/__init__.cpython-310.pyc,, +functorch/dim/__pycache__/_dim_entry.cpython-310.pyc,, +functorch/dim/__pycache__/_enable_all_layers.cpython-310.pyc,, +functorch/dim/__pycache__/_getsetitem.cpython-310.pyc,, +functorch/dim/__pycache__/_order.cpython-310.pyc,, +functorch/dim/__pycache__/_py_inst_decoder.cpython-310.pyc,, +functorch/dim/__pycache__/_tensor_info.cpython-310.pyc,, +functorch/dim/__pycache__/_wrap.cpython-310.pyc,, +functorch/dim/__pycache__/magic_trace.cpython-310.pyc,, +functorch/dim/__pycache__/op_properties.cpython-310.pyc,, +functorch/dim/__pycache__/wrap_type.cpython-310.pyc,, +functorch/dim/_dim_entry.py,sha256=tXm6rpXNalwjIWdLWETLUbbNaPKPMflHZtfhIpJpE3M,3626 +functorch/dim/_enable_all_layers.py,sha256=3zU59oJKvmtBj5vOwFDD1XRh4faRN1ZVqOZVyLc1Q_o,4932 +functorch/dim/_getsetitem.py,sha256=W_tgl7QvGwk7-zBnwuWg7xReK4WVA-VKASsHQE5Et-E,18978 +functorch/dim/_order.py,sha256=ZTe66tLeNu4zwQFS6EdzDhoVHOfdcHC3l1h3ZEfInxc,7008 +functorch/dim/_py_inst_decoder.py,sha256=LKc3WHftyDJX1fhJAwaaiEzxTUX5l6AIM79O5rCMDiA,2107 +functorch/dim/_tensor_info.py,sha256=QGRm_gK-Cx_XBqRxhEHbqGHXDFgWqNSFkUKXUZRJ4nw,2039 +functorch/dim/_wrap.py,sha256=YBgmiaaAv06iP68Umuf9SeLU0w2NjUBsiIyYbT0CiCw,8286 +functorch/dim/magic_trace.py,sha256=xZmKW-rSr8Q78j3FE9PCZF2YQhxWPpUiDIcZwEoz0d8,1491 +functorch/dim/op_properties.py,sha256=GpW8Ylgq1YlMilQh6cgNQ66tAiN84WRyEjn_VkbJYFQ,6687 +functorch/dim/wrap_type.py,sha256=haCYf-nAHCw236O1jh8GHjFgmzDNKrltdNvtVG7y7pU,2090 +functorch/einops/__init__.py,sha256=qNdomhBnsKNuNNlGsbqqipT9wYQkcxMuEQJKq4zhry8,59 +functorch/einops/__pycache__/__init__.cpython-310.pyc,, +functorch/einops/__pycache__/_parsing.cpython-310.pyc,, +functorch/einops/__pycache__/rearrange.cpython-310.pyc,, +functorch/einops/_parsing.py,sha256=dEdZ4QULNxaJmGLsI444rtlV24EWW_wrIMnmETCRpmU,12309 +functorch/einops/rearrange.py,sha256=HUOM3IIPJqUy6svQ82ZnpC6gB0lrZ_8ZHGUr2Vd33Wg,8082 +functorch/experimental/__init__.py,sha256=qgO0Y4xqrtxucMbH-Q__wtJGvzRk9ckQIqo7E94-ROA,274 +functorch/experimental/__pycache__/__init__.cpython-310.pyc,, +functorch/experimental/__pycache__/control_flow.cpython-310.pyc,, +functorch/experimental/__pycache__/ops.cpython-310.pyc,, +functorch/experimental/control_flow.py,sha256=CyLqEoRLJT5fSnwcTrmw_3LQk9SD54fJElQ4stSD_64,144 +functorch/experimental/ops.py,sha256=kDGcckdoYwOg9fS4JqvZnsIt8Ss9O6RGeasJSyi0OUY,57 +torch-2.10.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +torch-2.10.0.dist-info/METADATA,sha256=Sw8SF95pA3NVtOWCkFzbMDpWpIisb9Fy8UjYj-1jT1Q,31092 +torch-2.10.0.dist-info/RECORD,, +torch-2.10.0.dist-info/WHEEL,sha256=Bgr3NEnRTD35huYgke79gHrKWeuDjjXc-LBkC5AQICY,122 +torch-2.10.0.dist-info/entry_points.txt,sha256=crpU3BGG2VBGDFewCYdWNeeDFO5dSHLSdhN8H_Ybdi4,211 +torch-2.10.0.dist-info/licenses/LICENSE,sha256=LjEcv4x2RudkpUYhqxVmO7_P61u5Tx1jTXmt_UmuMZE,505053 +torch-2.10.0.dist-info/licenses/NOTICE,sha256=wsx78MrsdlLCtGCopHC-oWd_JB5KuOQx3zTPF_Wp_sA,23632 +torch-2.10.0.dist-info/top_level.txt,sha256=MsBcfJyMU15lW1efu5w7Tzd4MenrYHiuaixbHMfAoco,25 +torch/_C.cpython-310-x86_64-linux-gnu.so,sha256=sfx-WCBtR424tV1BtcSSW0MuGB84x7zhHWK_QN6XgJA,25521 +torch/_C/_VariableFunctions.pyi,sha256=xHiiaW4Ocv6NHFz_iYQHi66cmvLDQOe8XKPGpODSkiY,1208427 +torch/_C/__init__.pyi,sha256=txxFmtIkNIZpoCIbgjg3ZV35PKHGdkLf-xi0kPdNU-4,413306 +torch/_C/_acc/__init__.pyi,sha256=T9kWYH6Wi7CRcc45RbRH5FtogtEOZPKVsJ6laHr6y_Y,566 +torch/_C/_aoti.pyi,sha256=gP8rTuk9mN1ZLsy43cpaitglNYOPbjfGGSW3F1e0wQU,6015 +torch/_C/_autograd.pyi,sha256=M2GfEdhbWhER5j_kKFM7UbIuVsXtEDcT98zGWUJ1Jvg,4906 +torch/_C/_cpu.pyi,sha256=zueFlTWiiTs-7ToY72TJctRiGZNTmS8Yi9nhHQzLW-g,434 +torch/_C/_cudnn.pyi,sha256=m4nyLKmUJTRrcb-e94ghGbQ7D_Y1E7eqzueyH6QeANs,317 +torch/_C/_cusparselt.pyi,sha256=kD30gidilch4jKuIr7-ItTvDuEtt6L7vxL1l56sb_mw,32 +torch/_C/_distributed.pyi,sha256=qXyYUT8V9MPMXhx38eU0YD6CvaqS4CLvWMrEmuDqWj4,598 +torch/_C/_distributed_autograd.pyi,sha256=brb51Q-9UlMWCs4Aoy7ZLHH4hwhYq0acXm_hgfz_5HA,899 +torch/_C/_distributed_c10d.pyi,sha256=s_mBycaXlRfT-Yyt_soTOUOAA8kDYP87py9u1j_pcQE,26548 +torch/_C/_distributed_rpc.pyi,sha256=0mlTwOqrF608gU4oUnIPc25nQ4zeJ6LWycHcuyfB3e8,6080 +torch/_C/_distributed_rpc_testing.pyi,sha256=2cUz7bIO5y9fKUzfafx6Uh84QNO10gtP3uJXAXmE8Dk,1017 +torch/_C/_dynamo/__init__.pyi,sha256=SaWAOaJcwLykHTgoiZswDLqTWxVbWY886-GnLsmwXh0,166 +torch/_C/_dynamo/compiled_autograd.pyi,sha256=zbX2AKKVEX1yzpOsa2xIcoDBFM7YBpKSNPJjEsCOTZU,522 +torch/_C/_dynamo/eval_frame.pyi,sha256=0tWODdru534qMYyW8g9TkYrFUc3v26kurs0d_84HW8A,2762 +torch/_C/_dynamo/guards.pyi,sha256=__1QmPLJB4qMiBNWHxvkKktfJzLcZeebyo2YgXdLBlY,12987 +torch/_C/_export/__init__.pyi,sha256=CUcMBKNDN_31e66pbRuZ9O8ilVR4-RSKAeMFRfRIxS8,257 +torch/_C/_export/pt2_archive_constants.pyi,sha256=8oIuaAUlGzny2thjeDhwuFKAk3WXi1yxnRkIijnDgN8,788 +torch/_C/_functionalization.pyi,sha256=z-v6deG3dIJsP-wV8sIZ022eu18T-yefDV20qN2wAA0,566 +torch/_C/_functions.pyi,sha256=0aapmQmjpa_pFZT_BWhddVB8jZh0DVLDKzXlWqYfz0k,608 +torch/_C/_functorch.pyi,sha256=SD4gbFb9C7pRSbjrSzUCdWLtOcbaN0sm0tifQuyA-hU,3428 +torch/_C/_instruction_counter.pyi,sha256=xjwkiHBgXbvN8Iw7UNVEvE2YDJKFUU1_EoeTS4prCV8,109 +torch/_C/_itt.pyi,sha256=6fhhHGYgreXbGka-VtqX9FjjPaSznfOmDHPVC171DII,169 +torch/_C/_jit_tree_views.pyi,sha256=l4X64K4EcMqz2sAFmvFHuAdY3odH0Jbg2iMFRlFKkzA,5555 +torch/_C/_lazy.pyi,sha256=h8_ZY1JSJTiGebWekqfMvfFGZdt_g8dqFq90TG0-7hI,1015 +torch/_C/_lazy_ts_backend.pyi,sha256=YfYcEssTgLqOHQqUDYg5ZgbdB_D52mG19VETBmh7yuc,326 +torch/_C/_monitor.pyi,sha256=ND1PrgzrSUMGCBd50Hyz8M-mz2uJRNyFU_RGxSgx3kc,1447 +torch/_C/_nn.pyi,sha256=aR7MmcB8Vui4c9qxH1jfU-lNkP73wL2FL_fpKfRpXYg,9570 +torch/_C/_nvtx.pyi,sha256=MzekiGde65H1P_cJ_zER9kjXVRDW12eNtXUeItZG3WA,380 +torch/_C/_onnx.pyi,sha256=7xxwokJOBBQxnbox3lGLgMo9RkVGVgtfPBtsKcaGaTE,710 +torch/_C/_profiler.pyi,sha256=ZaNKGOceQdXUfgITkmSC1X2LocKXhxdgg8xnZju_4JM,6272 +torch/_C/_verbose.pyi,sha256=vMdQYMqABMqBFxYykp8_VD0QBaubolczBmCEv-UcA00,134 +torch/_C_flatbuffer/__init__.pyi,sha256=SdmD2nh01AdVYvwMJeo32D5BJW2Ar2pvjQTup0uBIko,544 +torch/_VF.py,sha256=XIfh8pIjzvG0ySWcOScz4E067DFoT-8TkcmAG5oYn94,664 +torch/_VF.pyi,sha256=xHiiaW4Ocv6NHFz_iYQHi66cmvLDQOe8XKPGpODSkiY,1208427 +torch/__config__.py,sha256=VCuBweOjH807O10Xrumlb_BrtWNTQMYIGjb3aw6T2po,574 +torch/__future__.py,sha256=yk9l_KWsfVIzUBx9cGr-OdtWmb-pI8ZhcROAm3a_FQw,3185 +torch/__init__.py,sha256=1jiLHjsWwfmiKoeJjl8gX6E6l71lwWP0gpoVfg2dYC8,107268 +torch/__pycache__/_VF.cpython-310.pyc,, +torch/__pycache__/__config__.cpython-310.pyc,, +torch/__pycache__/__future__.cpython-310.pyc,, +torch/__pycache__/__init__.cpython-310.pyc,, +torch/__pycache__/_appdirs.cpython-310.pyc,, +torch/__pycache__/_classes.cpython-310.pyc,, +torch/__pycache__/_compile.cpython-310.pyc,, +torch/__pycache__/_custom_ops.cpython-310.pyc,, +torch/__pycache__/_environment.cpython-310.pyc,, +torch/__pycache__/_guards.cpython-310.pyc,, +torch/__pycache__/_jit_internal.cpython-310.pyc,, +torch/__pycache__/_linalg_utils.cpython-310.pyc,, +torch/__pycache__/_lobpcg.cpython-310.pyc,, +torch/__pycache__/_lowrank.cpython-310.pyc,, +torch/__pycache__/_meta_registrations.cpython-310.pyc,, +torch/__pycache__/_namedtensor_internals.cpython-310.pyc,, +torch/__pycache__/_ops.cpython-310.pyc,, +torch/__pycache__/_python_dispatcher.cpython-310.pyc,, +torch/__pycache__/_size_docs.cpython-310.pyc,, +torch/__pycache__/_sources.cpython-310.pyc,, +torch/__pycache__/_storage_docs.cpython-310.pyc,, +torch/__pycache__/_streambase.cpython-310.pyc,, +torch/__pycache__/_tensor.cpython-310.pyc,, +torch/__pycache__/_tensor_docs.cpython-310.pyc,, +torch/__pycache__/_tensor_str.cpython-310.pyc,, +torch/__pycache__/_thread_safe_fork.cpython-310.pyc,, +torch/__pycache__/_torch_docs.cpython-310.pyc,, +torch/__pycache__/_utils.cpython-310.pyc,, +torch/__pycache__/_utils_internal.cpython-310.pyc,, +torch/__pycache__/_vmap_internals.cpython-310.pyc,, +torch/__pycache__/_weights_only_unpickler.cpython-310.pyc,, +torch/__pycache__/functional.cpython-310.pyc,, +torch/__pycache__/hub.cpython-310.pyc,, +torch/__pycache__/library.cpython-310.pyc,, +torch/__pycache__/overrides.cpython-310.pyc,, +torch/__pycache__/quasirandom.cpython-310.pyc,, +torch/__pycache__/random.cpython-310.pyc,, +torch/__pycache__/return_types.cpython-310.pyc,, +torch/__pycache__/serialization.cpython-310.pyc,, +torch/__pycache__/storage.cpython-310.pyc,, +torch/__pycache__/torch_version.cpython-310.pyc,, +torch/__pycache__/types.cpython-310.pyc,, +torch/__pycache__/version.cpython-310.pyc,, +torch/_appdirs.py,sha256=oTDrdoBwt0m-Vb27B8Bu3rfMYN6l7QBHeJepRqO_kL8,26198 +torch/_awaits/__init__.py,sha256=T0RT6TwpQbHV9RX23zQYck-XpJwWC1bH3ObNLeqq6yA,1652 +torch/_awaits/__pycache__/__init__.cpython-310.pyc,, +torch/_classes.py,sha256=DbPcMC4o_QhQZeoog84z-kr0Brn9FDnypDHwU-mnZLk,1786 +torch/_compile.py,sha256=ssdSFpLJtFRF2DcQ3gPhYgV40s7ypu6T7Ao_rj3B0nc,1994 +torch/_custom_op/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/_custom_op/__pycache__/__init__.cpython-310.pyc,, +torch/_custom_op/__pycache__/autograd.cpython-310.pyc,, +torch/_custom_op/__pycache__/impl.cpython-310.pyc,, +torch/_custom_op/autograd.py,sha256=jGVy75Z7yRXxyGPjf29Hr0uOqTlRG8BaBZloXiM8gDU,12079 +torch/_custom_op/impl.py,sha256=QlVw_urmx7hgAaqEtCq5mN2pXgKWpawfyXp1CUk3vLo,27083 +torch/_custom_ops.py,sha256=DyTzqyo_fZ582qmMiyfoLdT9-cAnor776dgqb_GhPIo,12824 +torch/_decomp/__init__.py,sha256=J1pLyNpOrH-t3o-JFXwZk6wBFCZG0rrv3rNVaSw6UrE,19286 +torch/_decomp/__pycache__/__init__.cpython-310.pyc,, +torch/_decomp/__pycache__/decompositions.cpython-310.pyc,, +torch/_decomp/__pycache__/decompositions_for_jvp.cpython-310.pyc,, +torch/_decomp/__pycache__/decompositions_for_rng.cpython-310.pyc,, +torch/_decomp/decompositions.py,sha256=qHXQ0x5b0Tr9Dz5TrI2nFxxTDcAYcdpeMDkbqrpxbMI,181968 +torch/_decomp/decompositions_for_jvp.py,sha256=W1vfFbwjyIMdrhiXFyDM0zEcTMZ2uZHlZ0Dp7-SqsC0,11718 +torch/_decomp/decompositions_for_rng.py,sha256=pbqvkvHs-0dMXixioH25JzttQ8ug_PoYFxbRnbeE8jk,9187 +torch/_dispatch/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/_dispatch/__pycache__/__init__.cpython-310.pyc,, +torch/_dispatch/__pycache__/python.cpython-310.pyc,, +torch/_dispatch/python.py,sha256=ONcksiAuiUkJ9Av9nb9ndCvfCMeMLdxAb5F4iHFGzKM,6750 +torch/_dynamo/__init__.py,sha256=Slp7_Cr3wkAnSaBSD90LG1L3kvnhNa0wbLJgw8fyRFI,6979 +torch/_dynamo/__pycache__/__init__.cpython-310.pyc,, +torch/_dynamo/__pycache__/_trace_wrapped_higher_order_op.cpython-310.pyc,, +torch/_dynamo/__pycache__/aot_compile.cpython-310.pyc,, +torch/_dynamo/__pycache__/aot_compile_types.cpython-310.pyc,, +torch/_dynamo/__pycache__/bytecode_analysis.cpython-310.pyc,, +torch/_dynamo/__pycache__/bytecode_transformation.cpython-310.pyc,, +torch/_dynamo/__pycache__/cache_size.cpython-310.pyc,, +torch/_dynamo/__pycache__/callback.cpython-310.pyc,, +torch/_dynamo/__pycache__/code_context.cpython-310.pyc,, +torch/_dynamo/__pycache__/codegen.cpython-310.pyc,, +torch/_dynamo/__pycache__/compiled_autograd.cpython-310.pyc,, +torch/_dynamo/__pycache__/comptime.cpython-310.pyc,, +torch/_dynamo/__pycache__/config.cpython-310.pyc,, +torch/_dynamo/__pycache__/convert_frame.cpython-310.pyc,, +torch/_dynamo/__pycache__/create_parameter_op.cpython-310.pyc,, +torch/_dynamo/__pycache__/current_scope_id.cpython-310.pyc,, +torch/_dynamo/__pycache__/dce_extra_outputs.cpython-310.pyc,, +torch/_dynamo/__pycache__/debug_utils.cpython-310.pyc,, +torch/_dynamo/__pycache__/decorators.cpython-310.pyc,, +torch/_dynamo/__pycache__/device_interface.cpython-310.pyc,, +torch/_dynamo/__pycache__/distributed.cpython-310.pyc,, +torch/_dynamo/__pycache__/eval_frame.cpython-310.pyc,, +torch/_dynamo/__pycache__/exc.cpython-310.pyc,, +torch/_dynamo/__pycache__/external_utils.cpython-310.pyc,, +torch/_dynamo/__pycache__/funcname_cache.cpython-310.pyc,, +torch/_dynamo/__pycache__/functional_export.cpython-310.pyc,, +torch/_dynamo/__pycache__/graph_break_hints.cpython-310.pyc,, +torch/_dynamo/__pycache__/graph_bytecode_inputs.cpython-310.pyc,, +torch/_dynamo/__pycache__/graph_deduplication.cpython-310.pyc,, +torch/_dynamo/__pycache__/graph_region_tracker.cpython-310.pyc,, +torch/_dynamo/__pycache__/graph_utils.cpython-310.pyc,, +torch/_dynamo/__pycache__/guards.cpython-310.pyc,, +torch/_dynamo/__pycache__/hooks.cpython-310.pyc,, +torch/_dynamo/__pycache__/logging.cpython-310.pyc,, +torch/_dynamo/__pycache__/metrics_context.cpython-310.pyc,, +torch/_dynamo/__pycache__/mutation_guard.cpython-310.pyc,, +torch/_dynamo/__pycache__/output_graph.cpython-310.pyc,, +torch/_dynamo/__pycache__/package.cpython-310.pyc,, +torch/_dynamo/__pycache__/pgo.cpython-310.pyc,, +torch/_dynamo/__pycache__/precompile_context.cpython-310.pyc,, +torch/_dynamo/__pycache__/profiler.cpython-310.pyc,, +torch/_dynamo/__pycache__/replay_record.cpython-310.pyc,, +torch/_dynamo/__pycache__/resume_execution.cpython-310.pyc,, +torch/_dynamo/__pycache__/side_effects.cpython-310.pyc,, +torch/_dynamo/__pycache__/source.cpython-310.pyc,, +torch/_dynamo/__pycache__/symbolic_convert.cpython-310.pyc,, +torch/_dynamo/__pycache__/tensor_version_op.cpython-310.pyc,, +torch/_dynamo/__pycache__/test_case.cpython-310.pyc,, +torch/_dynamo/__pycache__/test_dont_skip_tracing_functions.cpython-310.pyc,, +torch/_dynamo/__pycache__/test_minifier_common.cpython-310.pyc,, +torch/_dynamo/__pycache__/testing.cpython-310.pyc,, +torch/_dynamo/__pycache__/trace_rules.cpython-310.pyc,, +torch/_dynamo/__pycache__/types.cpython-310.pyc,, +torch/_dynamo/__pycache__/utils.cpython-310.pyc,, +torch/_dynamo/_trace_wrapped_higher_order_op.py,sha256=yGCWZ9s_VZ7LKQvdhXXYDBhZ4ebEPWI_55ModM9XTIU,9234 +torch/_dynamo/aot_compile.py,sha256=emglIklbh4S_2mCXLsd-hS363uXdVMqVZFoxtsm_33w,13362 +torch/_dynamo/aot_compile_types.py,sha256=k_JSnlCj-jHdCk381R8ekH2_dP54Lg0IGdeO82X7504,1978 +torch/_dynamo/backends/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/_dynamo/backends/__pycache__/__init__.cpython-310.pyc,, +torch/_dynamo/backends/__pycache__/common.cpython-310.pyc,, +torch/_dynamo/backends/__pycache__/cudagraphs.cpython-310.pyc,, +torch/_dynamo/backends/__pycache__/debugging.cpython-310.pyc,, +torch/_dynamo/backends/__pycache__/distributed.cpython-310.pyc,, +torch/_dynamo/backends/__pycache__/inductor.cpython-310.pyc,, +torch/_dynamo/backends/__pycache__/onnxrt.cpython-310.pyc,, +torch/_dynamo/backends/__pycache__/registry.cpython-310.pyc,, +torch/_dynamo/backends/__pycache__/tensorrt.cpython-310.pyc,, +torch/_dynamo/backends/__pycache__/torchxla.cpython-310.pyc,, +torch/_dynamo/backends/__pycache__/tvm.cpython-310.pyc,, +torch/_dynamo/backends/common.py,sha256=kOQNTm1pJL2K16KRJ2Qk9oiN9PqxrdYgphaNKnotQnA,6382 +torch/_dynamo/backends/cudagraphs.py,sha256=h4KtfBKA7y7ow4Xaxgwv6CaAxDxGdfdQLE20FLOU-nI,10246 +torch/_dynamo/backends/debugging.py,sha256=XzGtuM7YZuc08YQBy3kTlwp-wlN90JnnELuyroxImEQ,18715 +torch/_dynamo/backends/distributed.py,sha256=sai3MQUZWY4JCMpB5SXWeoy7GM32hclQLFP-FKziGHk,28477 +torch/_dynamo/backends/inductor.py,sha256=fSjxEorULdmCAxVxMoNcBTvTtzEpGJv-WHUTHvTE7QU,1104 +torch/_dynamo/backends/onnxrt.py,sha256=KMF_RHHh_JSV8W5pNXvtM_EiLcMdBWpfNF5iruUwyIg,1623 +torch/_dynamo/backends/registry.py,sha256=tbL36GULqp-NhjnxbMEQ84mvjhvobO8Z0Eu2RpfnzUU,5555 +torch/_dynamo/backends/tensorrt.py,sha256=dxRCaQgNbw8Ly0SgGSOK7At2OANtvCe5mSHpAjvEqYM,383 +torch/_dynamo/backends/torchxla.py,sha256=o75DfoFrS6htTH1SfFx50Nu8xLWhT0hGvzoBnXfHpcU,1551 +torch/_dynamo/backends/tvm.py,sha256=M6FzlWbFiMh8p7d0tMtzQAqfvvojjYPoxsFqLJD4jLY,7212 +torch/_dynamo/bytecode_analysis.py,sha256=ix1sHhfszZyeuIkm_fCOqFsH17PygTYVjTCX3ZPtQz0,9218 +torch/_dynamo/bytecode_transformation.py,sha256=atIfw5e6KoBXJlOCjwm8VIKBSCSfWzIpwsxygE63mPs,67371 +torch/_dynamo/cache_size.py,sha256=-5A9hgZJzdxb8_Od6ArMaPfXBBtxcuVxQwX6dLFiucA,7976 +torch/_dynamo/callback.py,sha256=h_CPUwJLNeMpqVNBnYzsX9aV5Kk9_3gBzhTNh687Kog,5622 +torch/_dynamo/code_context.py,sha256=b7bQSNWb8DBuwDT9Q8qAHh_jSVIM33M5Hf6MIWYbO1Q,1818 +torch/_dynamo/codegen.py,sha256=3Ww0NIsDZqeNXubaP2w6nhzImH113SvuWCsmRD5VeAE,29005 +torch/_dynamo/compiled_autograd.py,sha256=L5e-gpvSARvnYY4jH6w6d8AOS_At1z7g6KqbFQ0ddDE,64288 +torch/_dynamo/comptime.py,sha256=F5e8x3_3kbk4jo9Jwhk37CCJb2ZQYI_70INzqkjYnmY,15398 +torch/_dynamo/config.py,sha256=bLh6oFRYB_vz2JCPrvoeKpsM5zbkoHl6iXWSWDomwCk,32646 +torch/_dynamo/convert_frame.py,sha256=xch8t8hH988AlsZD4sV_rk8Bnc363uW6WuXPeCVYDRc,82798 +torch/_dynamo/create_parameter_op.py,sha256=E82pDRlYTm2hKvfvbnKyDE_e0xlonfDDeZ8flmrSSTo,2561 +torch/_dynamo/current_scope_id.py,sha256=CD2PnuBjVr2ns7_oNaPg6djM5wa-qNIaJYLFA4uThUo,1433 +torch/_dynamo/dce_extra_outputs.py,sha256=-VQCD5l85Nnxf_X1TA3UmyAhER461WXo5Qqv18cyc6A,7049 +torch/_dynamo/debug_utils.py,sha256=a7k-P8ZHKezGXkGosafAutS5_fiGFu6cpTMxuYo0BAE,32624 +torch/_dynamo/decorators.py,sha256=lmLrhSG6duNYKJ6vgaqtbkkw8bJB8XJzx56K1aEiDME,40544 +torch/_dynamo/device_interface.py,sha256=AQuoKTTRu66xny6sgAqRsL67XrGhHa5L6y7R-q51yDs,22332 +torch/_dynamo/distributed.py,sha256=n30oHn27d41P5Ak_qcaG_nYPMuZdmxVr8l37IVojCY0,1670 +torch/_dynamo/eval_frame.py,sha256=j0nsuEKk1QKBaV5bjQFf2a_SogKw9snz-UyRQVug1aQ,98603 +torch/_dynamo/exc.py,sha256=J3kaGrM0Cejlzv_MiTzqTXuKXm6CYrJxot_xaK8rlBo,26174 +torch/_dynamo/external_utils.py,sha256=m_-IaIVr-k8_-qah_SOYEDNk3tyBLXku7kEn8wes5xE,8774 +torch/_dynamo/funcname_cache.py,sha256=62RNKTJ6LMz3E8oYi5qLXNKZBDkkB0Md-cANs-G_4D8,2548 +torch/_dynamo/functional_export.py,sha256=astElcRY2gZhg1aiPsMppBZYrqnmv5rQgBC41hgfL60,33713 +torch/_dynamo/graph_break_hints.py,sha256=RFPZornAqL4toJtG_uBO55RBpBRG_0cjPyIkqdIRrfM,1327 +torch/_dynamo/graph_break_registry.json,sha256=c251-pqdmhuvaagFlD6N5pu1V-CUk4E-RSMvITVukaY,155507 +torch/_dynamo/graph_bytecode_inputs.py,sha256=Gyz0MUXKKmnyIk_X6S4FPrDOtPUd04O08jmF20_-PX8,3127 +torch/_dynamo/graph_deduplication.py,sha256=Vu-2utT6zQj9T2K9DLNyRtemRD8QnnFWhKhwe5HHlV0,23623 +torch/_dynamo/graph_region_tracker.py,sha256=PShr4oywWqBpa24lCaKXEciFA0VIr3hzv4DeZUavHqw,18599 +torch/_dynamo/graph_utils.py,sha256=zwJr2Q5j54VBho9BxRF8O6EmHk1glHASsP8tr8BVpZg,3558 +torch/_dynamo/guards.py,sha256=_-U9EGN73qEXDsQoOZWi2AolgAiTxJ9fzjsHGPuErmA,189376 +torch/_dynamo/hooks.py,sha256=Rj06pRjAZYyoSGVXRLvfkR43n8k7Ap97-KLt_NA19VU,894 +torch/_dynamo/logging.py,sha256=ltvH1A9WYtIDZkqFODBbBVglBybJpRFDj79gyYjyclM,2215 +torch/_dynamo/metrics_context.py,sha256=6GOxZMATe40hY-lAi_B66YNJbfSMoKYo5JZiV9d6h_k,8889 +torch/_dynamo/mutation_guard.py,sha256=RaSc3gcsnOoMMzIqFemCyt6r4WilHGk3Ox_0pPF2xKw,5166 +torch/_dynamo/output_graph.py,sha256=1zT_6vacMq5iw4VJsiKnlNOqZ82uBIguQ7y0M4amMHg,167740 +torch/_dynamo/package.py,sha256=aaThswSVEmcFLqO1uh9ozFNtfyLEk8okvxNprQ_0JlI,42179 +torch/_dynamo/pgo.py,sha256=CLgRslEX81wHS6YyZRoa43TmfbeJJCi24H8uDG_Eg3k,36391 +torch/_dynamo/polyfills/__init__.py,sha256=tAQqrB13lMQvgwpItw84TtfIb77l0I0PNFnYMilq9-o,12462 +torch/_dynamo/polyfills/__pycache__/__init__.cpython-310.pyc,, +torch/_dynamo/polyfills/__pycache__/_collections.cpython-310.pyc,, +torch/_dynamo/polyfills/__pycache__/builtins.cpython-310.pyc,, +torch/_dynamo/polyfills/__pycache__/functools.cpython-310.pyc,, +torch/_dynamo/polyfills/__pycache__/fx.cpython-310.pyc,, +torch/_dynamo/polyfills/__pycache__/heapq.cpython-310.pyc,, +torch/_dynamo/polyfills/__pycache__/itertools.cpython-310.pyc,, +torch/_dynamo/polyfills/__pycache__/loader.cpython-310.pyc,, +torch/_dynamo/polyfills/__pycache__/operator.cpython-310.pyc,, +torch/_dynamo/polyfills/__pycache__/os.cpython-310.pyc,, +torch/_dynamo/polyfills/__pycache__/pytree.cpython-310.pyc,, +torch/_dynamo/polyfills/__pycache__/struct.cpython-310.pyc,, +torch/_dynamo/polyfills/__pycache__/sys.cpython-310.pyc,, +torch/_dynamo/polyfills/__pycache__/tensor.cpython-310.pyc,, +torch/_dynamo/polyfills/_collections.py,sha256=RHkqS80la8AfbmHThq2HnoYN0BQ_HAtELrKDqWs2Bfg,662 +torch/_dynamo/polyfills/builtins.py,sha256=nesDA8kPtmQ1ru0FpdsDCTWG15WAKsqyIZoU2Px68q0,3658 +torch/_dynamo/polyfills/functools.py,sha256=FPyQBEKzvK2QkBvQYYcTM8bQq4H319NMwVtpRq2HcmM,966 +torch/_dynamo/polyfills/fx.py,sha256=nyQ9cjgpBs8c8KvPwfSXTs6ItDGE1swv2k3-rXhROrU,1350 +torch/_dynamo/polyfills/heapq.py,sha256=xwQLTlK-joqIDFRK7qEToXKn1NB04NmRD9gLWqkVS_E,3291 +torch/_dynamo/polyfills/itertools.py,sha256=yKuwMmkrhJUJyxWgVLvThn52hb7KTRs3oS-aMCLOEzA,8060 +torch/_dynamo/polyfills/loader.py,sha256=8ZtAWfKKIpd8Ij5AAL8FB6fXsQ8-Bp_aLJDKIN3glLY,1383 +torch/_dynamo/polyfills/operator.py,sha256=R9SU3Vz9riZBeCWzBjNAGJ5bkEEyl9LTNLqL858VFeA,3455 +torch/_dynamo/polyfills/os.py,sha256=sUMjUdnAseDz936ur1o2mxdXkSDUSGxK9VY9ZEefsxg,1017 +torch/_dynamo/polyfills/pytree.py,sha256=HDa4M012gmr1USwIW46jNtmXiXM0sRPDz3Zy2mxlt5M,24432 +torch/_dynamo/polyfills/struct.py,sha256=JortoCie90NJhYDWVfmWOHQbyCPPlhEQMCMoAntrrMg,618 +torch/_dynamo/polyfills/sys.py,sha256=4mlqgJKoMg7_bWwg7ociHqSpb63py-VVHq8M8mIXeGU,706 +torch/_dynamo/polyfills/tensor.py,sha256=u5La8g1ucxhI_dzLNZsLCjGeyfesGr-117D-dNzfrME,1404 +torch/_dynamo/precompile_context.py,sha256=RB291AsFONnmSc5tdSf9sl-z07GiO8rd2n69mf9cdbo,7757 +torch/_dynamo/profiler.py,sha256=1DDl_hrBuhSOv3IBQ_uOrjKuKcIiKASz3lcuFJ0I8Qo,5894 +torch/_dynamo/replay_record.py,sha256=kH40iW7EE3WSbywoZlyNLQxzsT-_T_T62B4T98L3mno,4389 +torch/_dynamo/repro/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/_dynamo/repro/__pycache__/__init__.cpython-310.pyc,, +torch/_dynamo/repro/__pycache__/after_aot.cpython-310.pyc,, +torch/_dynamo/repro/__pycache__/after_dynamo.cpython-310.pyc,, +torch/_dynamo/repro/__pycache__/aoti.cpython-310.pyc,, +torch/_dynamo/repro/after_aot.py,sha256=PHzUHgJuFKAUn_H6_zi3BweZmMwghjESnAgkcFesSyA,44994 +torch/_dynamo/repro/after_dynamo.py,sha256=S7vbL7xKUhBQBr0HuzWqIhClzoFoHLrSfoCRAWNVv8g,22227 +torch/_dynamo/repro/aoti.py,sha256=CUcEgTQ7Vb98UFFQpyxmDxEJQGaE5cA8Qp1cYrOH4Bc,22459 +torch/_dynamo/resume_execution.py,sha256=Pmmh7r5Vxg91wQrGUNbNsNo3NZzJ7xQNDd2V4Lg_GgY,30898 +torch/_dynamo/side_effects.py,sha256=E6iLrhyZ8L1Ny2L_KC7ji8BYpSPLsPJJdbjDmp8FgOg,53315 +torch/_dynamo/source.py,sha256=UO6d9JSRi5xtO5rXbe4lJkb9G745-jxiDFFhLCibGRo,43578 +torch/_dynamo/symbolic_convert.py,sha256=hXfW32zy0QnPJP5dvdN_d7nCwAm7lTnYvP-DrCJ_qGk,216618 +torch/_dynamo/tensor_version_op.py,sha256=-Jrhyh-ymNeWkx1AHblVtM81Gga5hyZ7rVQ9WjvnH8Y,2735 +torch/_dynamo/test_case.py,sha256=ypDM8oXQPz_jDdgT_Kdpqhak1KqegDWDyNzPnIXE0gI,8651 +torch/_dynamo/test_dont_skip_tracing_functions.py,sha256=v8sCtPbLM_cEgEXvKUvtwoVnclOjJkaDcVDYgBWL5Ww,817 +torch/_dynamo/test_minifier_common.py,sha256=W2L1QxD0HH3Q1c6mpJkD9e6MsUHNA2u0R-5o-0ORALY,12678 +torch/_dynamo/testing.py,sha256=dIdHB68LcFN11EjJSz1BeBDEU0NjMb25f3mKCYt8Rd0,18269 +torch/_dynamo/trace_rules.py,sha256=PhclqGCeCI5-elv8eGp5v2WW8Q7-Bq43ssktLcahmVo,157464 +torch/_dynamo/types.py,sha256=vBZ2FREV2YTZ9-ShrJGN4K---ohkmz6pH1uSCatSR40,4182 +torch/_dynamo/utils.py,sha256=yqaDwCbk56pmus-J4u7dWyHNotLIVLKKtfLTFU4cAN8,175044 +torch/_dynamo/variables/__init__.py,sha256=q6s1oiD5dqiSRAEx_uGeA1rzs0humCeQlfPx_fcgXhA,6917 +torch/_dynamo/variables/__pycache__/__init__.cpython-310.pyc,, +torch/_dynamo/variables/__pycache__/base.cpython-310.pyc,, +torch/_dynamo/variables/__pycache__/builder.cpython-310.pyc,, +torch/_dynamo/variables/__pycache__/builtin.cpython-310.pyc,, +torch/_dynamo/variables/__pycache__/constant.cpython-310.pyc,, +torch/_dynamo/variables/__pycache__/ctx_manager.cpython-310.pyc,, +torch/_dynamo/variables/__pycache__/dicts.cpython-310.pyc,, +torch/_dynamo/variables/__pycache__/distributed.cpython-310.pyc,, +torch/_dynamo/variables/__pycache__/functions.cpython-310.pyc,, +torch/_dynamo/variables/__pycache__/higher_order_ops.cpython-310.pyc,, +torch/_dynamo/variables/__pycache__/iter.cpython-310.pyc,, +torch/_dynamo/variables/__pycache__/lazy.cpython-310.pyc,, +torch/_dynamo/variables/__pycache__/lists.cpython-310.pyc,, +torch/_dynamo/variables/__pycache__/misc.cpython-310.pyc,, +torch/_dynamo/variables/__pycache__/nn_module.cpython-310.pyc,, +torch/_dynamo/variables/__pycache__/optimizer.cpython-310.pyc,, +torch/_dynamo/variables/__pycache__/script_object.cpython-310.pyc,, +torch/_dynamo/variables/__pycache__/sdpa.cpython-310.pyc,, +torch/_dynamo/variables/__pycache__/streams.cpython-310.pyc,, +torch/_dynamo/variables/__pycache__/tensor.cpython-310.pyc,, +torch/_dynamo/variables/__pycache__/torch.cpython-310.pyc,, +torch/_dynamo/variables/__pycache__/torch_function.cpython-310.pyc,, +torch/_dynamo/variables/__pycache__/user_defined.cpython-310.pyc,, +torch/_dynamo/variables/base.py,sha256=nUWMw48bf23Lefdlb69NZQHQfbykyNFK_ov4IUrG580,31399 +torch/_dynamo/variables/builder.py,sha256=NU4u1u7fFikaJa8-pGm85u1-_Zfmj_ifKE9us0FEkcE,170690 +torch/_dynamo/variables/builtin.py,sha256=YTck_1DEkS5XIIqDmq8eSIz4YcpIS6-JjcgHLw1dVGM,128780 +torch/_dynamo/variables/constant.py,sha256=iAsOj_Q-jtZQlUJjw92fS4fKc_uZjTZitlWfEUXZv54,16437 +torch/_dynamo/variables/ctx_manager.py,sha256=uXRGU9SFF8P3pHjKGkPSDBh0UqL0PRkanAZx3GjLZ5U,54138 +torch/_dynamo/variables/dicts.py,sha256=7xq1P1TvR9t6IYp0t3OfUQ7bo0b2_U-hzrGl4aAvkX8,59770 +torch/_dynamo/variables/distributed.py,sha256=WVC84u9Vclj3kIyOj9jfI51nHIUKXYRbkwHi7sVMNUU,19366 +torch/_dynamo/variables/functions.py,sha256=K616gvHCqc5iZ0-fEIn2H3LY6jKuQTXU4wnIRWIi3h4,115190 +torch/_dynamo/variables/higher_order_ops.py,sha256=n0z4PpQEXIO867_Wa0DpHCE5fKCXaT7D8w1-583Wcm0,185915 +torch/_dynamo/variables/iter.py,sha256=X1JhqL7c-XwS0z4vNKEzqGx_feitAd9PQyClgo3EbX0,22339 +torch/_dynamo/variables/lazy.py,sha256=yLLUFYlYzAjJg5dVXGLm0cx74e1sZGFGYxGVsFKrDHM,8074 +torch/_dynamo/variables/lists.py,sha256=m6CAH1wo9-upeHGR0C7tiZw__PxharuJlrVBpoC-INY,66629 +torch/_dynamo/variables/misc.py,sha256=5upPYf2TbqSG1VJTbJYXYGtXA5aV3XP1ukbg3vgBe-4,83619 +torch/_dynamo/variables/nn_module.py,sha256=GWa-B917yx9USg1GWv3VG31Z1cVHLcss0uM_aMVV7Ik,59957 +torch/_dynamo/variables/optimizer.py,sha256=E3NDVnOBy_bnXF4L_yP7Fv7cqHz602Xasf6w9Bfoabg,17737 +torch/_dynamo/variables/script_object.py,sha256=0aOeeLxjpGV0wPVVawEue7WtozeXscUnEK4JiHkUJDE,8904 +torch/_dynamo/variables/sdpa.py,sha256=kj7ysYQLokMsfiGmCv0A8CHjqSmPbuLT0udRtH8O9oU,2987 +torch/_dynamo/variables/streams.py,sha256=jLFJTQ8mMjfg7Phu_W6l_x9Yby2kOdG0r-DYAIy3I4E,17824 +torch/_dynamo/variables/tensor.py,sha256=_4Jx7JZscQVck8wdxVL7kSIgbOEixOnfmDwj9ZLi0rQ,72602 +torch/_dynamo/variables/torch.py,sha256=nl6L5fNaWQy6UrR9cny47N5b_8EtrISp_qW-K0ouVXk,93821 +torch/_dynamo/variables/torch_function.py,sha256=GOl2gxsoxS6B6sX6WYi0EgO44230_TJXs5542eIsJpw,27663 +torch/_dynamo/variables/user_defined.py,sha256=pUD19j8TtPQAQQZ3gnzq3ocRp8BijMAw6IS-Qxbkc84,96062 +torch/_environment.py,sha256=Oca0KVQVfJEZVAIXCNlBx_yCKtJyle46YLl_mL9w0dE,42 +torch/_export/__init__.py,sha256=w6Qonz3emymV7gfl1lHGDN_cGr7W_9GncBrELUl7eyM,6692 +torch/_export/__pycache__/__init__.cpython-310.pyc,, +torch/_export/__pycache__/config.cpython-310.pyc,, +torch/_export/__pycache__/converter.cpython-310.pyc,, +torch/_export/__pycache__/error.cpython-310.pyc,, +torch/_export/__pycache__/non_strict_utils.cpython-310.pyc,, +torch/_export/__pycache__/pass_base.cpython-310.pyc,, +torch/_export/__pycache__/tools.cpython-310.pyc,, +torch/_export/__pycache__/utils.cpython-310.pyc,, +torch/_export/__pycache__/verifier.cpython-310.pyc,, +torch/_export/__pycache__/wrappers.cpython-310.pyc,, +torch/_export/config.py,sha256=eqicgOdgNXZ_txD6gBpZ4bDgJ0SMlGhV2eWpv6CNvdA,1410 +torch/_export/converter.py,sha256=axuZUWvXwTfM5klEPONgpMEHCcIebS1ObL-jK2pC_yU,64566 +torch/_export/db/__init__.py,sha256=a3XxW1RcNAPwEVaI2g11hpnJvSHxGUFsGmDAWfDnLP8,206 +torch/_export/db/__pycache__/__init__.cpython-310.pyc,, +torch/_export/db/__pycache__/case.cpython-310.pyc,, +torch/_export/db/__pycache__/gen_example.cpython-310.pyc,, +torch/_export/db/__pycache__/logging.cpython-310.pyc,, +torch/_export/db/case.py,sha256=aaBLcqcLbUnAmAlsnOWfaRCNsrU1AMdvQUk_q7-KUO8,5040 +torch/_export/db/examples/__init__.py,sha256=PlziokXeStI1gWELwC7zX-T7ZViONPRitQ1uFWNAxL4,1648 +torch/_export/db/examples/__pycache__/__init__.cpython-310.pyc,, +torch/_export/db/examples/__pycache__/assume_constant_result.cpython-310.pyc,, +torch/_export/db/examples/__pycache__/autograd_function.cpython-310.pyc,, +torch/_export/db/examples/__pycache__/class_method.cpython-310.pyc,, +torch/_export/db/examples/__pycache__/cond_branch_class_method.cpython-310.pyc,, +torch/_export/db/examples/__pycache__/cond_branch_nested_function.cpython-310.pyc,, +torch/_export/db/examples/__pycache__/cond_branch_nonlocal_variables.cpython-310.pyc,, +torch/_export/db/examples/__pycache__/cond_closed_over_variable.cpython-310.pyc,, +torch/_export/db/examples/__pycache__/cond_operands.cpython-310.pyc,, +torch/_export/db/examples/__pycache__/cond_predicate.cpython-310.pyc,, +torch/_export/db/examples/__pycache__/constrain_as_size_example.cpython-310.pyc,, +torch/_export/db/examples/__pycache__/constrain_as_value_example.cpython-310.pyc,, +torch/_export/db/examples/__pycache__/decorator.cpython-310.pyc,, +torch/_export/db/examples/__pycache__/dictionary.cpython-310.pyc,, +torch/_export/db/examples/__pycache__/dynamic_shape_assert.cpython-310.pyc,, +torch/_export/db/examples/__pycache__/dynamic_shape_constructor.cpython-310.pyc,, +torch/_export/db/examples/__pycache__/dynamic_shape_if_guard.cpython-310.pyc,, +torch/_export/db/examples/__pycache__/dynamic_shape_map.cpython-310.pyc,, +torch/_export/db/examples/__pycache__/dynamic_shape_round.cpython-310.pyc,, +torch/_export/db/examples/__pycache__/dynamic_shape_slicing.cpython-310.pyc,, +torch/_export/db/examples/__pycache__/dynamic_shape_view.cpython-310.pyc,, +torch/_export/db/examples/__pycache__/fn_with_kwargs.cpython-310.pyc,, +torch/_export/db/examples/__pycache__/list_contains.cpython-310.pyc,, +torch/_export/db/examples/__pycache__/list_unpack.cpython-310.pyc,, +torch/_export/db/examples/__pycache__/model_attr_mutation.cpython-310.pyc,, +torch/_export/db/examples/__pycache__/nested_function.cpython-310.pyc,, +torch/_export/db/examples/__pycache__/null_context_manager.cpython-310.pyc,, +torch/_export/db/examples/__pycache__/optional_input.cpython-310.pyc,, +torch/_export/db/examples/__pycache__/pytree_flatten.cpython-310.pyc,, +torch/_export/db/examples/__pycache__/scalar_output.cpython-310.pyc,, +torch/_export/db/examples/__pycache__/specialized_attribute.cpython-310.pyc,, +torch/_export/db/examples/__pycache__/static_for_loop.cpython-310.pyc,, +torch/_export/db/examples/__pycache__/static_if.cpython-310.pyc,, +torch/_export/db/examples/__pycache__/tensor_setattr.cpython-310.pyc,, +torch/_export/db/examples/__pycache__/type_reflection_method.cpython-310.pyc,, +torch/_export/db/examples/__pycache__/unsupported_operator.cpython-310.pyc,, +torch/_export/db/examples/__pycache__/user_input_mutation.cpython-310.pyc,, +torch/_export/db/examples/assume_constant_result.py,sha256=MPGQemV_ymD07kXuOVQkizSxTaTlu4vr2bAP3xxE3M8,510 +torch/_export/db/examples/autograd_function.py,sha256=byZs2M2TE3nU9a_UM3LMZw4gf-iFCsAok-wnqxAGah4,652 +torch/_export/db/examples/class_method.py,sha256=KM6pkWdEc1SMybUR-O2hCN1tD9Vl0B22gPI2LgDiZZ4,499 +torch/_export/db/examples/cond_branch_class_method.py,sha256=PpspYrzN3LBl0CIuGjjZon6rGQeQ32YtaIqbpRDbFyc,1327 +torch/_export/db/examples/cond_branch_nested_function.py,sha256=HgN_wnbfzoATNkD7ksQSwdo6PVhiIP5RqneZvGSTxeQ,1302 +torch/_export/db/examples/cond_branch_nonlocal_variables.py,sha256=B_ROqnPdNhhy7zbP9cyqLUl1LgDgAYYGSr8EyNRiy-M,1841 +torch/_export/db/examples/cond_closed_over_variable.py,sha256=iSWSxhJhumU6CsRSzXUeW7YVxbgjf-C05EDc0Foi-a4,547 +torch/_export/db/examples/cond_operands.py,sha256=mBIzaZy_VYUzNWS8aqrTCPwUM1qbUPlJWXX4oWYgJGE,799 +torch/_export/db/examples/cond_predicate.py,sha256=PKpI-GKAdVMDh11EDIpQ3JXvRMXNGuJTKXbGb_uyQjY,663 +torch/_export/db/examples/constrain_as_size_example.py,sha256=13bb0R9cuRWRNYgEFfSe8AkQdgf39zvf5EDvhIVXJhw,515 +torch/_export/db/examples/constrain_as_value_example.py,sha256=XtZLDWMmL1hOZPqtNbOIUYQ6FNX24_jMvu7Uzq9sXDw,571 +torch/_export/db/examples/decorator.py,sha256=U5YTo_25VfE_Hy9uoD4eYN8wKSJGpOG0dAJ1TZjL1i4,480 +torch/_export/db/examples/dictionary.py,sha256=gSkKkS68Vw_cropGQ57i61jqTleFsLECIXP6pZMqLBE,404 +torch/_export/db/examples/dynamic_shape_assert.py,sha256=Ff1KN5JG62k6wYqR7GvQ8i8lf1jyvc-GNVFASVfOx5w,450 +torch/_export/db/examples/dynamic_shape_constructor.py,sha256=68CRA-j59c0dPBc5hOBsEBmWpWz0opzovyqGIaTfKuw,396 +torch/_export/db/examples/dynamic_shape_if_guard.py,sha256=VG6YmeK31p2jwLPG_Ci3VWmWUMQnJIp_IuijY_UY-dU,560 +torch/_export/db/examples/dynamic_shape_map.py,sha256=XN8_Et1EVYaxmdnACPkiDAVJZ3jkYRaj9U6mU44ZntM,454 +torch/_export/db/examples/dynamic_shape_round.py,sha256=sMyW43DVXFtZa6jFO08XxVjyw06LcJ9oyuJH5jAsG4Q,525 +torch/_export/db/examples/dynamic_shape_slicing.py,sha256=Rowy_RfPf1kW1l_oCp71YVflt2ivhpP1u_HzTEupxQA,388 +torch/_export/db/examples/dynamic_shape_view.py,sha256=fEuSTQRghtJY8VcBi7qwiZTQXwd9ux8d1PRBYw6Qd6E,444 +torch/_export/db/examples/fn_with_kwargs.py,sha256=fEndpGN__D456vh3NAamoK1KdmtEyvmAsW0gZB0TExo,731 +torch/_export/db/examples/list_contains.py,sha256=aQsdZDUN4Rn94Waft7X30_Lpn4RDbEnmsY3hpvrfV2w,477 +torch/_export/db/examples/list_unpack.py,sha256=u7tczh6wbR1PoYQxuRPpsSfxgMiGhu4VocA50ZrwKFw,568 +torch/_export/db/examples/model_attr_mutation.py,sha256=wIrxdizyoC1EGByE4THkYXbDPw6Vh86lphvh_OR9kug,628 +torch/_export/db/examples/nested_function.py,sha256=S-MXIlaFn4RGeA4GEFIEHG-pcM9WBznXN3E2k-sDlZo,491 +torch/_export/db/examples/null_context_manager.py,sha256=LM5a8DO8x0A0yaA0ZAhOVybcRIcpHy2fxCH0YoqH_2M,478 +torch/_export/db/examples/optional_input.py,sha256=JHVO8AbT5ihdUrr_ee5kZMuJOnyJZS2EdL9FYdS9Yns,447 +torch/_export/db/examples/pytree_flatten.py,sha256=MFIw36BZAXANZ-iajZi--lbPzf1EyDrcmWxPeQ_VCyA,376 +torch/_export/db/examples/scalar_output.py,sha256=_CMPbP3nbTMGzfiUy3ACOdxxoL8_F1lIEya_JH4HTZ4,543 +torch/_export/db/examples/specialized_attribute.py,sha256=GiKqGiSSPwPIL-QPinKinHNEiQvRsptBx319j7FpRfA,520 +torch/_export/db/examples/static_for_loop.py,sha256=wYtwzouoqqVC-Zsw_kHYe_Fzz-0mPxZ9zGwWrjdv8OQ,385 +torch/_export/db/examples/static_if.py,sha256=uzqQHEytorjGRbxJQQxam6nJZLHcPIPw1uzMfj7KU8w,397 +torch/_export/db/examples/tensor_setattr.py,sha256=LXED12gZiYOvhZXBzThejfW2meNYI8U-8_aIVwfdaqI,337 +torch/_export/db/examples/type_reflection_method.py,sha256=CoXAARKtqSNciuA5V7Tkx0MVhq-h6c4khPRSnxFDjcM,461 +torch/_export/db/examples/unsupported_operator.py,sha256=v-niL6z0og2TuXmvgFWbHFxMP_m0ldu6NefmmW3ikl8,411 +torch/_export/db/examples/user_input_mutation.py,sha256=KJY_YR4w_nEZ66YVMmPsBKv6PfQ7GnQwkV12NJcUCxs,302 +torch/_export/db/gen_example.py,sha256=YoR-ZOXBjcgEN2ypFHVINmHBETs9iYEWNytTmDhNUiA,462 +torch/_export/db/logging.py,sha256=o4Lzpt7DMs3uwn9oHP1kJfSOrJKwMNzU602F2EbF52E,1691 +torch/_export/error.py,sha256=OjvFCTGZVLlBtbTvaL4xDbBAizynfhwO_2fONObaISk,1770 +torch/_export/non_strict_utils.py,sha256=8U7piLXd-UCDORpOvqXD-c2bfHz2XtdxaUViagRQ7PE,42542 +torch/_export/pass_base.py,sha256=IZc7FN6_qyCzQDDrZ_EfHgvBldeYaKIxfUlwBItDOGw,18513 +torch/_export/pass_infra/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/_export/pass_infra/__pycache__/__init__.cpython-310.pyc,, +torch/_export/pass_infra/__pycache__/node_metadata.cpython-310.pyc,, +torch/_export/pass_infra/__pycache__/proxy_value.cpython-310.pyc,, +torch/_export/pass_infra/node_metadata.py,sha256=fF9lD71OeQ5HlSfR--IzjNMe7s67_N9T5Z1QvhGsa5s,771 +torch/_export/pass_infra/proxy_value.py,sha256=Jh3ZGEhnKhQM0qBRYjKdSB5dvEIktxM4wtMIoXqz9ts,1269 +torch/_export/passes/__init__.py,sha256=78MzFjtaVabk1z2X12WMIlmtkjYaFmgNJlDCTCepNt8,88 +torch/_export/passes/__pycache__/__init__.cpython-310.pyc,, +torch/_export/passes/__pycache__/_node_metadata_hook.cpython-310.pyc,, +torch/_export/passes/__pycache__/add_runtime_assertions_for_constraints_pass.cpython-310.pyc,, +torch/_export/passes/__pycache__/collect_tracepoints_pass.cpython-310.pyc,, +torch/_export/passes/__pycache__/constant_folding.cpython-310.pyc,, +torch/_export/passes/__pycache__/functionalize_side_effectful_ops_pass.cpython-310.pyc,, +torch/_export/passes/__pycache__/insert_custom_op_guards.cpython-310.pyc,, +torch/_export/passes/__pycache__/lift_constants_pass.cpython-310.pyc,, +torch/_export/passes/__pycache__/remove_runtime_assertions.cpython-310.pyc,, +torch/_export/passes/__pycache__/replace_autocast_with_hop_pass.cpython-310.pyc,, +torch/_export/passes/__pycache__/replace_quantized_ops_with_standard_ops_pass.cpython-310.pyc,, +torch/_export/passes/__pycache__/replace_set_grad_with_hop_pass.cpython-310.pyc,, +torch/_export/passes/__pycache__/replace_view_ops_with_view_copy_ops_pass.cpython-310.pyc,, +torch/_export/passes/__pycache__/replace_with_hop_pass_util.cpython-310.pyc,, +torch/_export/passes/_node_metadata_hook.py,sha256=W9LrlSzq5VvMgsUhZh_5c1F837gNG_BOo6LP-uIUV1A,3379 +torch/_export/passes/add_runtime_assertions_for_constraints_pass.py,sha256=jSNY0CQCEniUmPMG3LjnWaSz06ORrrc9dVwFRbA38ao,10226 +torch/_export/passes/collect_tracepoints_pass.py,sha256=xg3Kc-Y1IjvByP5QxFjgG2ObN2U9L-uhi43fqXlSMss,6522 +torch/_export/passes/constant_folding.py,sha256=DCbujI_2VTwOGMCu9KbMFgipjPiL3ZYkdxiF2aNlw0U,11303 +torch/_export/passes/functionalize_side_effectful_ops_pass.py,sha256=Omb1sfKVWkJ-TItG0B9e1i_p1Wgg2zd3maptwSdTk8Q,3279 +torch/_export/passes/insert_custom_op_guards.py,sha256=MZTqfJnsqb91H1-6CChry3zzL8_43Ld01LDGcWHXjqg,2917 +torch/_export/passes/lift_constants_pass.py,sha256=GNNzNrqP4z2qz_tJyK3d5iELkzV9ah-Jwl2AtkXiJZg,17622 +torch/_export/passes/remove_runtime_assertions.py,sha256=uyvuiO5Qy9AYVfbaOvyOYeBaZ_yUzgoPSsfJ1lDb0-g,1588 +torch/_export/passes/replace_autocast_with_hop_pass.py,sha256=WXRgCMwsKcPn5Qwfi1se_3Nj-o_vlusflP816nGGTNY,7163 +torch/_export/passes/replace_quantized_ops_with_standard_ops_pass.py,sha256=uNW77NdmQCgGCHc_WR9_YgLAlO01Z0LV_B-aMNKwFvo,26060 +torch/_export/passes/replace_set_grad_with_hop_pass.py,sha256=hatng-HUjDExR2UzR3f-AeBvMCSZbDxRqGugKggNDec,4284 +torch/_export/passes/replace_view_ops_with_view_copy_ops_pass.py,sha256=H_HVEZsZNJYAE3sIAEvHLfvks4TSncljhSeHjJE9oL8,2411 +torch/_export/passes/replace_with_hop_pass_util.py,sha256=PlcWawtt3auGDfEdqu8WivFiyReVbXRD5-zJonecZeM,7601 +torch/_export/serde/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/_export/serde/__pycache__/__init__.cpython-310.pyc,, +torch/_export/serde/__pycache__/dynamic_shapes.cpython-310.pyc,, +torch/_export/serde/__pycache__/schema.cpython-310.pyc,, +torch/_export/serde/__pycache__/schema_check.cpython-310.pyc,, +torch/_export/serde/__pycache__/serialize.cpython-310.pyc,, +torch/_export/serde/__pycache__/union.cpython-310.pyc,, +torch/_export/serde/dynamic_shapes.py,sha256=PtXHauzIV-BS0EXnzGJ-IIVTcZ9F12VQZUvYBTHr3pE,11653 +torch/_export/serde/export_schema.thrift,sha256=ShIkoFeetc3zKcrNRkJbYEYomJEIjqeX3QP7EAXuAPA,7318 +torch/_export/serde/schema.py,sha256=WYpv5jaOaAeNI2X6PJj4c6kS8ucGBh_MXh_VTcpPjtA,14890 +torch/_export/serde/schema.yaml,sha256=hgPL642MDvE4M8veSZfyUDochjLUNfKu1AM8g2Weouk,9927 +torch/_export/serde/schema_check.py,sha256=1opywKu_gVDu02WLEpiopkAorAhNvVSCS7JuxdFqiiU,24747 +torch/_export/serde/serialize.py,sha256=Yci8BOsjnJu3hYV-AvhJA1yC3lhKWMscsyoZGE-UmfI,159629 +torch/_export/serde/union.py,sha256=mzynof5VvoUviyx43jyXd7eSPW2uKaT_UXhD6XJ6ews,2941 +torch/_export/tools.py,sha256=hkAcSbjnPc0V-dfieYSnH4pmEHogm1ApR3E7cv2_EbI,4599 +torch/_export/utils.py,sha256=I9nXCaAvYqM8zKy_ITa7kt-DJyf4RLwSEgoOzxEQvgg,58835 +torch/_export/verifier.py,sha256=ude9fM2BPpaf9USxZmYevV_4DiHFJ84401Z9zX7x9L0,21179 +torch/_export/wrappers.py,sha256=b5zoDErzDH9II57iG_g2xbh0NARRe85nZSx-45jHstM,12513 +torch/_functorch/__init__.py,sha256=a3XxW1RcNAPwEVaI2g11hpnJvSHxGUFsGmDAWfDnLP8,206 +torch/_functorch/__pycache__/__init__.cpython-310.pyc,, +torch/_functorch/__pycache__/aot_autograd.cpython-310.pyc,, +torch/_functorch/__pycache__/apis.cpython-310.pyc,, +torch/_functorch/__pycache__/autograd_function.cpython-310.pyc,, +torch/_functorch/__pycache__/batch_norm_replacement.cpython-310.pyc,, +torch/_functorch/__pycache__/benchmark_utils.cpython-310.pyc,, +torch/_functorch/__pycache__/compile_utils.cpython-310.pyc,, +torch/_functorch/__pycache__/compilers.cpython-310.pyc,, +torch/_functorch/__pycache__/config.cpython-310.pyc,, +torch/_functorch/__pycache__/deprecated.cpython-310.pyc,, +torch/_functorch/__pycache__/eager_transforms.cpython-310.pyc,, +torch/_functorch/__pycache__/functional_call.cpython-310.pyc,, +torch/_functorch/__pycache__/fx_minifier.cpython-310.pyc,, +torch/_functorch/__pycache__/make_functional.cpython-310.pyc,, +torch/_functorch/__pycache__/partitioners.cpython-310.pyc,, +torch/_functorch/__pycache__/predispatch.cpython-310.pyc,, +torch/_functorch/__pycache__/pyfunctorch.cpython-310.pyc,, +torch/_functorch/__pycache__/python_key.cpython-310.pyc,, +torch/_functorch/__pycache__/pytree_hacks.cpython-310.pyc,, +torch/_functorch/__pycache__/top_operators_github_usage.cpython-310.pyc,, +torch/_functorch/__pycache__/utils.cpython-310.pyc,, +torch/_functorch/__pycache__/vmap.cpython-310.pyc,, +torch/_functorch/_activation_checkpointing/__init__.py,sha256=a3XxW1RcNAPwEVaI2g11hpnJvSHxGUFsGmDAWfDnLP8,206 +torch/_functorch/_activation_checkpointing/__pycache__/__init__.cpython-310.pyc,, +torch/_functorch/_activation_checkpointing/__pycache__/ac_logging_utils.cpython-310.pyc,, +torch/_functorch/_activation_checkpointing/__pycache__/graph_info_provider.cpython-310.pyc,, +torch/_functorch/_activation_checkpointing/__pycache__/knapsack.cpython-310.pyc,, +torch/_functorch/_activation_checkpointing/__pycache__/knapsack_evaluator.cpython-310.pyc,, +torch/_functorch/_activation_checkpointing/__pycache__/remat_using_tags_for_fwd_loss_bwd_graph_pass.cpython-310.pyc,, +torch/_functorch/_activation_checkpointing/ac_logging_utils.py,sha256=VeMs2DMWj0Eie5eteCB5C1lSYX1P3SXzIxKCdDONiWw,7943 +torch/_functorch/_activation_checkpointing/graph_info_provider.py,sha256=szM6-hVFuhoyCVdO06gdFRB5nHmMl9Y69PJ_Qf5IVPE,12718 +torch/_functorch/_activation_checkpointing/knapsack.py,sha256=eULO3neRqPtg84WsKf57jn4thXQjxZ_oQEUdQ_6_erQ,9260 +torch/_functorch/_activation_checkpointing/knapsack_evaluator.py,sha256=nbPz57UQgcpsnnkD-lk7s9V1vNkp3k9Xo-3HV6XRXI4,11832 +torch/_functorch/_activation_checkpointing/remat_using_tags_for_fwd_loss_bwd_graph_pass.py,sha256=kIVyjRrGdHdMUno01p2seJR9xLW2VfG3zQ4Savcqxyo,4979 +torch/_functorch/_activation_offloading/__init__.py,sha256=a3XxW1RcNAPwEVaI2g11hpnJvSHxGUFsGmDAWfDnLP8,206 +torch/_functorch/_activation_offloading/__pycache__/__init__.cpython-310.pyc,, +torch/_functorch/_activation_offloading/__pycache__/activation_offloading.cpython-310.pyc,, +torch/_functorch/_activation_offloading/activation_offloading.py,sha256=QuxCJK9jr5iwAS-V1aNGmxDmhaTk0mSOkhrqdPJdR-Y,31243 +torch/_functorch/_aot_autograd/__init__.py,sha256=a3XxW1RcNAPwEVaI2g11hpnJvSHxGUFsGmDAWfDnLP8,206 +torch/_functorch/_aot_autograd/__pycache__/__init__.cpython-310.pyc,, +torch/_functorch/_aot_autograd/__pycache__/aot_autograd_result.cpython-310.pyc,, +torch/_functorch/_aot_autograd/__pycache__/autograd_cache.cpython-310.pyc,, +torch/_functorch/_aot_autograd/__pycache__/collect_metadata_analysis.cpython-310.pyc,, +torch/_functorch/_aot_autograd/__pycache__/descriptors.cpython-310.pyc,, +torch/_functorch/_aot_autograd/__pycache__/frontend_utils.cpython-310.pyc,, +torch/_functorch/_aot_autograd/__pycache__/functional_utils.cpython-310.pyc,, +torch/_functorch/_aot_autograd/__pycache__/fx_utils.cpython-310.pyc,, +torch/_functorch/_aot_autograd/__pycache__/graph_capture.cpython-310.pyc,, +torch/_functorch/_aot_autograd/__pycache__/graph_capture_wrappers.cpython-310.pyc,, +torch/_functorch/_aot_autograd/__pycache__/graph_compile.cpython-310.pyc,, +torch/_functorch/_aot_autograd/__pycache__/indexed_dict.cpython-310.pyc,, +torch/_functorch/_aot_autograd/__pycache__/input_output_analysis.cpython-310.pyc,, +torch/_functorch/_aot_autograd/__pycache__/logging_utils.cpython-310.pyc,, +torch/_functorch/_aot_autograd/__pycache__/runtime_wrappers.cpython-310.pyc,, +torch/_functorch/_aot_autograd/__pycache__/schemas.cpython-310.pyc,, +torch/_functorch/_aot_autograd/__pycache__/streams.cpython-310.pyc,, +torch/_functorch/_aot_autograd/__pycache__/subclass_parametrization.cpython-310.pyc,, +torch/_functorch/_aot_autograd/__pycache__/subclass_utils.cpython-310.pyc,, +torch/_functorch/_aot_autograd/__pycache__/utils.cpython-310.pyc,, +torch/_functorch/_aot_autograd/aot_autograd_result.py,sha256=Dk8Y8QEXY9RUhKoxVz5fxJuQGtxod5Q_648A1MpZbGY,25199 +torch/_functorch/_aot_autograd/autograd_cache.py,sha256=qoDDtXSkDDT3xLEMXmeW86JeHwtAFEysENEUvSUnXzY,43408 +torch/_functorch/_aot_autograd/collect_metadata_analysis.py,sha256=vX7-7B7cHHclvKQCR1PbLcyl8SQZoNtYFIKDnm7ZZJY,45368 +torch/_functorch/_aot_autograd/descriptors.py,sha256=EQ5JNKyOAkdy8tbxuSpr1bSwySSbyaMcTX_Nd-BALHg,26535 +torch/_functorch/_aot_autograd/frontend_utils.py,sha256=WRtnCYrsMJ4Mrw0K2fDj_dkCNthFUql6N7ahvbzZyRk,13404 +torch/_functorch/_aot_autograd/functional_utils.py,sha256=cnjoXH5TpPhgMwHL2K4KErOVnXTAwtKQdR9kjwFOMSk,23645 +torch/_functorch/_aot_autograd/fx_utils.py,sha256=ELHS1PT8cZQLZWrI82lbR5iTtwYo6jUYwusX_1_DwwU,12490 +torch/_functorch/_aot_autograd/graph_capture.py,sha256=MAoTD8CGg9jJrqQCO7McpmvfTOwfTcDiydwrJ3ZVRkM,18815 +torch/_functorch/_aot_autograd/graph_capture_wrappers.py,sha256=fm999tv70OzFmex5tyL35u8Fp-AssV0bholEwbMQjLs,62558 +torch/_functorch/_aot_autograd/graph_compile.py,sha256=GMI2nHGP_v3lOi8yu51IRtrWkTdtIpOn1bQ00Nu1L0Q,91311 +torch/_functorch/_aot_autograd/indexed_dict.py,sha256=Zk4QDn0mXi1y97BojeDDD3FXa5OVHkYu5dmNkgRQt3w,1759 +torch/_functorch/_aot_autograd/input_output_analysis.py,sha256=WMa07znNObS_g6Z1Cs4pUtWkZAQ0DWGAJD7hv3smtTk,18785 +torch/_functorch/_aot_autograd/logging_utils.py,sha256=yBSC4U9xczOtFdpwaqRRBgr9driYTIPaZFd5HQYhu-c,4578 +torch/_functorch/_aot_autograd/runtime_wrappers.py,sha256=2u25YMKdBseVoS9I0gGziibAaTois9H7IqkN2YZy6lw,111529 +torch/_functorch/_aot_autograd/schemas.py,sha256=d8V_plOSViiEDHoB2DwO6unCClawf3Fv__dfcaPfZMo,54345 +torch/_functorch/_aot_autograd/streams.py,sha256=lRIAm_8aOU1AJXLg1R2nc5xTxct98eONnpq4w5huhjs,10525 +torch/_functorch/_aot_autograd/subclass_parametrization.py,sha256=FbmM7QRK2YAEeva2AK4h-2FEUcM-1qluqAGvXhwzNbE,4124 +torch/_functorch/_aot_autograd/subclass_utils.py,sha256=1gkIemZuLOHbgr6Kg8qzgP4V4doqCSD9g_dFZmtF-IM,20275 +torch/_functorch/_aot_autograd/utils.py,sha256=8zUpRsZ4ZwDlRHRO6hMhn7gV5SFKiXgvdy1lN74Pwto,29721 +torch/_functorch/aot_autograd.py,sha256=1sR3TyU1kv12zCVspQIGQo_GgkOuhcFT-YIhGaJvq2M,71960 +torch/_functorch/apis.py,sha256=VBwpvRj754-j0BkUi3RxdyVJguHeJpf71RfZVgxr4rQ,19096 +torch/_functorch/autograd_function.py,sha256=3P_uQSM7CTbvIRP1yorbTdH5vNaZ7jxVjasTeo_Kt6Y,29326 +torch/_functorch/batch_norm_replacement.py,sha256=liTJLEOFiap3ed2fBoxdRUM-9iuw-6985kJSXZnUlNs,857 +torch/_functorch/benchmark_utils.py,sha256=z8C96nQAn6Ywp5xjHTC6enRcXYBfZQnAir306vadAx0,6305 +torch/_functorch/compile_utils.py,sha256=B1Q1N0plokUAJMv6hZV6VJulN7TOw37_UdLYGo6D9tw,7691 +torch/_functorch/compilers.py,sha256=m4xrp4VO0hk1c2C0paTaZftQJjWk7OMJMshzLNa4Pao,14005 +torch/_functorch/config.py,sha256=C2po7n8qNK6Ft0nGKACKLM8HDkEzj_n250ndk5l00mc,17927 +torch/_functorch/deprecated.py,sha256=xo1NZwlZ38jzhb5U7d7xeuuhpESrMrt-S8n_sm-rjug,5235 +torch/_functorch/eager_transforms.py,sha256=fBqu29xqsuKu0Qaw2NFmwen5nhgJ3hBqreyZ9Gp12V8,71090 +torch/_functorch/functional_call.py,sha256=IAlDqDagxvncospXMTkxDmwMbMjr2q14e_GjY5zM0Ac,10625 +torch/_functorch/fx_minifier.py,sha256=jA40XYHiRK9u_xSR66hJ6S7YHZ4BMVJ6hyHcs7Ou8Wo,17372 +torch/_functorch/make_functional.py,sha256=R0PXpr8wGBytubN3t6UITrXeOHiyUIo1pUzYfOy2xTo,22945 +torch/_functorch/partitioners.py,sha256=QaRAetl5soe1L1B-hP1A9piEx8om8JrtvGui0GmCSdQ,121696 +torch/_functorch/predispatch.py,sha256=qdwkFKjBpzBrtqTp7SbJn9_mMLBJLVMcQqtYA-zaagg,5312 +torch/_functorch/pyfunctorch.py,sha256=C-ACd2SEdtXfCxXWYvb3SVhW5GpdZIcEp74hiz31Nbg,10824 +torch/_functorch/python_key.py,sha256=ZeINkQZ4B4PAdoz-zLMNU72w6cVHzE1nObMikLI0oL4,442 +torch/_functorch/pytree_hacks.py,sha256=dWzTSKcqGhK4zHgmgJbyis2kzB69OH71GP_YCDBDbp0,698 +torch/_functorch/top_operators_github_usage.py,sha256=xDWUwJxgkDB7vFZofLAlnZqrYZ00S8zX7ZUNfhC6nGk,21393 +torch/_functorch/utils.py,sha256=k_pKD9lkqHapxTE-UVa-68-NgRiZ2R8myImOhs1abaQ,1052 +torch/_functorch/vmap.py,sha256=4skZpQIOpBF-O8HXhryPCGY-6KZZVEhrUVZI_OQe8C4,16940 +torch/_guards.py,sha256=wVhXm6bXOszu2f2JxkxptRr934vQHrcCOlIyEwrSRq8,47099 +torch/_higher_order_ops/__init__.py,sha256=Tgl5mBIo-3-rG9iI9UuxN-kFOCCi0oLdsZJmDdHS0V4,2577 +torch/_higher_order_ops/__pycache__/__init__.cpython-310.pyc,, +torch/_higher_order_ops/__pycache__/_invoke_quant.cpython-310.pyc,, +torch/_higher_order_ops/__pycache__/aoti_call_delegate.cpython-310.pyc,, +torch/_higher_order_ops/__pycache__/associative_scan.cpython-310.pyc,, +torch/_higher_order_ops/__pycache__/auto_functionalize.cpython-310.pyc,, +torch/_higher_order_ops/__pycache__/base_hop.cpython-310.pyc,, +torch/_higher_order_ops/__pycache__/cond.cpython-310.pyc,, +torch/_higher_order_ops/__pycache__/effects.cpython-310.pyc,, +torch/_higher_order_ops/__pycache__/executorch_call_delegate.cpython-310.pyc,, +torch/_higher_order_ops/__pycache__/flat_apply.cpython-310.pyc,, +torch/_higher_order_ops/__pycache__/flex_attention.cpython-310.pyc,, +torch/_higher_order_ops/__pycache__/foreach_map.cpython-310.pyc,, +torch/_higher_order_ops/__pycache__/hints_wrap.cpython-310.pyc,, +torch/_higher_order_ops/__pycache__/invoke_subgraph.cpython-310.pyc,, +torch/_higher_order_ops/__pycache__/local_map.cpython-310.pyc,, +torch/_higher_order_ops/__pycache__/map.cpython-310.pyc,, +torch/_higher_order_ops/__pycache__/out_dtype.cpython-310.pyc,, +torch/_higher_order_ops/__pycache__/partitioner.cpython-310.pyc,, +torch/_higher_order_ops/__pycache__/print.cpython-310.pyc,, +torch/_higher_order_ops/__pycache__/run_const_graph.cpython-310.pyc,, +torch/_higher_order_ops/__pycache__/scan.cpython-310.pyc,, +torch/_higher_order_ops/__pycache__/schema.cpython-310.pyc,, +torch/_higher_order_ops/__pycache__/strict_mode.cpython-310.pyc,, +torch/_higher_order_ops/__pycache__/torchbind.cpython-310.pyc,, +torch/_higher_order_ops/__pycache__/triton_kernel_wrap.cpython-310.pyc,, +torch/_higher_order_ops/__pycache__/utils.cpython-310.pyc,, +torch/_higher_order_ops/__pycache__/while_loop.cpython-310.pyc,, +torch/_higher_order_ops/__pycache__/wrap.cpython-310.pyc,, +torch/_higher_order_ops/_invoke_quant.py,sha256=hOIIiLG99np1I08H-Z7bWtiszkG8IwX35zUxXQFKhTw,1770 +torch/_higher_order_ops/aoti_call_delegate.py,sha256=bNoWqf674ijF_cw6QtJ4zPuOgzQcyxsWmoAc6n_5HmE,6126 +torch/_higher_order_ops/associative_scan.py,sha256=tYM_PcpdPVRNSic4uEbQO1YEH2kjXT5yjyHKXBPmuPg,36727 +torch/_higher_order_ops/auto_functionalize.py,sha256=TbxaCQ-_cHKWs_Drrcn9_Qx1V5aGSGQii77OCyUUo04,36778 +torch/_higher_order_ops/base_hop.py,sha256=-rs8nKUClRDlmtNhamBREYmz3S8rgE4PgOQF5KJZ_uI,10686 +torch/_higher_order_ops/cond.py,sha256=E7vDU4mwNrP3oYeieEx252sTT6iDVHe-ihlBtQ1NQzI,27676 +torch/_higher_order_ops/effects.py,sha256=QKRXT6kS8YQo03n4SKSYWTUNBWFHav1XOgx1YEG5e3g,9893 +torch/_higher_order_ops/executorch_call_delegate.py,sha256=UGjIy8SLv1_0EOUFbhxTtwXYycvs2sxESNDNVKdijyE,5996 +torch/_higher_order_ops/flat_apply.py,sha256=-RN5wg_pXGA_-dSHworvALKMmNC0ldCsTiEng8J1oKA,5696 +torch/_higher_order_ops/flex_attention.py,sha256=4GfMpCXZlnputOaIyqUWuevuyusKPlHWRlwaWKv91nI,44560 +torch/_higher_order_ops/foreach_map.py,sha256=xEvWbG-fWPZaVF1AjLrPnG2bJ1Duwr6Uf0YmVvndJx8,690 +torch/_higher_order_ops/hints_wrap.py,sha256=JUcj-0id_VxU0R7l9619o17vPoLXpHvEKh_ZiyPuiTc,4775 +torch/_higher_order_ops/invoke_subgraph.py,sha256=8HqTS3JfV_4JrXh8FfeXUnDfP6JbtxGwnLSDjAiNnuY,30792 +torch/_higher_order_ops/local_map.py,sha256=pKKA6z6ownSUw6NYcM_CQZN2NK9oZqStckElQL09wIU,21199 +torch/_higher_order_ops/map.py,sha256=Rn8BXS1W63lp9vHfayD8Md5lwfJ99J1f-3f2uAJ6OMQ,10025 +torch/_higher_order_ops/out_dtype.py,sha256=ZWwQOttWLEG_3n3qJ0QcOHtznBzf8skT8T_k4H1kJFc,5566 +torch/_higher_order_ops/partitioner.py,sha256=PkVm6babjw-cpVyF4X2P4Xb-9yDUhbSjBMAs3yDrhd4,13594 +torch/_higher_order_ops/print.py,sha256=4Ny7fAvKtBEnAIibFSbTbG0dPq78ERGiIhs6onwZoWM,3062 +torch/_higher_order_ops/run_const_graph.py,sha256=l-zsXgWYTAFhh7BTrEF4AVfCfI2L1aJO4dq16sv4Og0,2462 +torch/_higher_order_ops/scan.py,sha256=w_It3RCOlV3pNHFFo_J--85ugg3ud2DAsdjjc5QDVRY,35974 +torch/_higher_order_ops/schema.py,sha256=g76BsV69ldgmHHW1wDz-1ywbR4tIEBkflczNyDUU1L8,11223 +torch/_higher_order_ops/strict_mode.py,sha256=cULsBLLSZHTpL4wSNjEpWVr-oBVxJac28s2VOTFkBGo,3831 +torch/_higher_order_ops/torchbind.py,sha256=iKz6Gx_mZbrTpADgN2b-T_77FsMZUFck_KuDoRqgdJU,6252 +torch/_higher_order_ops/triton_kernel_wrap.py,sha256=dGBGDW3LvRmzIypryhrBk4XkscaGCxf2zq5Y_pLg-BE,85802 +torch/_higher_order_ops/utils.py,sha256=Alq5caZK9mZ92R0decs8-ZkrqutCTwdH1807hQJJhGY,47079 +torch/_higher_order_ops/while_loop.py,sha256=cE90nnzdtcRea5Ux7pFnZGlfRJuqwF5y71B5kbKs5O4,36673 +torch/_higher_order_ops/wrap.py,sha256=8tOTaZnHN7lLAiScVNnJNVstlInok8I6ofkgsFk4LjY,14663 +torch/_inductor/__autotune_main__.py,sha256=teBVDb5194YrCJgy05KRE1yAkfDrAfFIA2cIwYFnyRw,913 +torch/_inductor/__init__.py,sha256=1g4Xxd369L9clzrb8MvRKxBna-VA8bxoeVrZZm76duk,14882 +torch/_inductor/__pycache__/__autotune_main__.cpython-310.pyc,, +torch/_inductor/__pycache__/__init__.cpython-310.pyc,, +torch/_inductor/__pycache__/analyze_preserves_zero_mask.cpython-310.pyc,, +torch/_inductor/__pycache__/aoti_eager.cpython-310.pyc,, +torch/_inductor/__pycache__/async_compile.cpython-310.pyc,, +torch/_inductor/__pycache__/augmented_graph_helper.cpython-310.pyc,, +torch/_inductor/__pycache__/autotune_process.cpython-310.pyc,, +torch/_inductor/__pycache__/await_utils.cpython-310.pyc,, +torch/_inductor/__pycache__/bounds.cpython-310.pyc,, +torch/_inductor/__pycache__/cache.cpython-310.pyc,, +torch/_inductor/__pycache__/choices.cpython-310.pyc,, +torch/_inductor/__pycache__/codecache.cpython-310.pyc,, +torch/_inductor/__pycache__/comm_analysis.cpython-310.pyc,, +torch/_inductor/__pycache__/comm_lowering.cpython-310.pyc,, +torch/_inductor/__pycache__/comms.cpython-310.pyc,, +torch/_inductor/__pycache__/comms_debug.cpython-310.pyc,, +torch/_inductor/__pycache__/compile_fx.cpython-310.pyc,, +torch/_inductor/__pycache__/compile_fx_async.cpython-310.pyc,, +torch/_inductor/__pycache__/compile_fx_ext.cpython-310.pyc,, +torch/_inductor/__pycache__/compile_fx_subproc.cpython-310.pyc,, +torch/_inductor/__pycache__/compiler_bisector.cpython-310.pyc,, +torch/_inductor/__pycache__/config.cpython-310.pyc,, +torch/_inductor/__pycache__/config_comms.cpython-310.pyc,, +torch/_inductor/__pycache__/constant_folding.cpython-310.pyc,, +torch/_inductor/__pycache__/cpp_builder.cpython-310.pyc,, +torch/_inductor/__pycache__/cpu_vec_isa.cpython-310.pyc,, +torch/_inductor/__pycache__/cudagraph_trees.cpython-310.pyc,, +torch/_inductor/__pycache__/cudagraph_utils.cpython-310.pyc,, +torch/_inductor/__pycache__/custom_graph_pass.cpython-310.pyc,, +torch/_inductor/__pycache__/debug.cpython-310.pyc,, +torch/_inductor/__pycache__/decomposition.cpython-310.pyc,, +torch/_inductor/__pycache__/dependencies.cpython-310.pyc,, +torch/_inductor/__pycache__/distributed_autotune.cpython-310.pyc,, +torch/_inductor/__pycache__/dtype_propagation.cpython-310.pyc,, +torch/_inductor/__pycache__/exc.cpython-310.pyc,, +torch/_inductor/__pycache__/extern_node_serializer.cpython-310.pyc,, +torch/_inductor/__pycache__/freezing.cpython-310.pyc,, +torch/_inductor/__pycache__/freezing_utils.cpython-310.pyc,, +torch/_inductor/__pycache__/fuzzer.cpython-310.pyc,, +torch/_inductor/__pycache__/fx_utils.cpython-310.pyc,, +torch/_inductor/__pycache__/graph.cpython-310.pyc,, +torch/_inductor/__pycache__/hooks.cpython-310.pyc,, +torch/_inductor/__pycache__/index_propagation.cpython-310.pyc,, +torch/_inductor/__pycache__/inductor_prims.cpython-310.pyc,, +torch/_inductor/__pycache__/invert_expr_analysis.cpython-310.pyc,, +torch/_inductor/__pycache__/ir.cpython-310.pyc,, +torch/_inductor/__pycache__/jagged_lowerings.cpython-310.pyc,, +torch/_inductor/__pycache__/kernel_inputs.cpython-310.pyc,, +torch/_inductor/__pycache__/kernel_template_choice.cpython-310.pyc,, +torch/_inductor/__pycache__/loop_body.cpython-310.pyc,, +torch/_inductor/__pycache__/lowering.cpython-310.pyc,, +torch/_inductor/__pycache__/memory.cpython-310.pyc,, +torch/_inductor/__pycache__/metrics.cpython-310.pyc,, +torch/_inductor/__pycache__/mkldnn_ir.cpython-310.pyc,, +torch/_inductor/__pycache__/mkldnn_lowerings.cpython-310.pyc,, +torch/_inductor/__pycache__/mock_cache.cpython-310.pyc,, +torch/_inductor/__pycache__/ops_handler.cpython-310.pyc,, +torch/_inductor/__pycache__/optimize_indexing.cpython-310.pyc,, +torch/_inductor/__pycache__/output_code.cpython-310.pyc,, +torch/_inductor/__pycache__/pattern_matcher.cpython-310.pyc,, +torch/_inductor/__pycache__/quantized_lowerings.cpython-310.pyc,, +torch/_inductor/__pycache__/remote_cache.cpython-310.pyc,, +torch/_inductor/__pycache__/remote_gemm_autotune_cache.cpython-310.pyc,, +torch/_inductor/__pycache__/rocm_multiarch_utils.cpython-310.pyc,, +torch/_inductor/__pycache__/scheduler.cpython-310.pyc,, +torch/_inductor/__pycache__/select_algorithm.cpython-310.pyc,, +torch/_inductor/__pycache__/shape_propagation.cpython-310.pyc,, +torch/_inductor/__pycache__/sizevars.cpython-310.pyc,, +torch/_inductor/__pycache__/standalone_compile.cpython-310.pyc,, +torch/_inductor/__pycache__/subgraph_lowering.cpython-310.pyc,, +torch/_inductor/__pycache__/test_case.cpython-310.pyc,, +torch/_inductor/__pycache__/test_operators.cpython-310.pyc,, +torch/_inductor/__pycache__/tiling_utils.cpython-310.pyc,, +torch/_inductor/__pycache__/triton_bundler.cpython-310.pyc,, +torch/_inductor/__pycache__/utils.cpython-310.pyc,, +torch/_inductor/__pycache__/virtualized.cpython-310.pyc,, +torch/_inductor/__pycache__/wrapper_benchmark.cpython-310.pyc,, +torch/_inductor/analysis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/_inductor/analysis/__pycache__/__init__.cpython-310.pyc,, +torch/_inductor/analysis/__pycache__/device_info.cpython-310.pyc,, +torch/_inductor/analysis/__pycache__/profile_analysis.cpython-310.pyc,, +torch/_inductor/analysis/device_info.py,sha256=YU4D8xA_IN7ObMKzKWJVTnuOQrt-RtmOdBHaVm0GYdc,7469 +torch/_inductor/analysis/profile_analysis.py,sha256=9aAfJ0vS3uqr76hbvGo6OlfXaDNoA2i3gZEzodX214w,27570 +torch/_inductor/analyze_preserves_zero_mask.py,sha256=KFQ-EWmMO6mSRdYEaUIWgyuZIJeAZs_FOfMjJLr8ww4,5490 +torch/_inductor/aoti_eager.py,sha256=x7lLvyienfVg7wzlXIpTVB-yZcboDcEUjBUJ7r8fYIc,11165 +torch/_inductor/async_compile.py,sha256=YCTf9dU7l1Ya_LscnitGQoDbFB_Z0BA9xKwjfrZYOJw,26260 +torch/_inductor/augmented_graph_helper.py,sha256=USkFrEo1ZaIL9RHVJk_JQiyyRpzVSqV4GUrum1bGkKM,7057 +torch/_inductor/autoheuristic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/_inductor/autoheuristic/__pycache__/__init__.cpython-310.pyc,, +torch/_inductor/autoheuristic/__pycache__/autoheuristic.cpython-310.pyc,, +torch/_inductor/autoheuristic/__pycache__/autoheuristic_utils.cpython-310.pyc,, +torch/_inductor/autoheuristic/__pycache__/learned_heuristic_controller.cpython-310.pyc,, +torch/_inductor/autoheuristic/__pycache__/learnedheuristic_interface.cpython-310.pyc,, +torch/_inductor/autoheuristic/artifacts/_MMRankingA100.py,sha256=n_tMmQomPIgKjGTRhJNK4FiZrHiQwJ2jdd7be2LXaUg,28044 +torch/_inductor/autoheuristic/artifacts/_MMRankingH100.py,sha256=zxKFmCp_vPj9RkyUX5sdcdIJSzXrJRqfAx_eOWDf6MA,30668 +torch/_inductor/autoheuristic/artifacts/_MixedMMA100.py,sha256=VHJxqZXXh-fcyi8HwRDIK2Mrgj08O0QzwFlCdW49mjA,7920 +torch/_inductor/autoheuristic/artifacts/_MixedMMH100.py,sha256=ESGahqrBExqLjCwUNNI31YuJ8HHfXq9AnKe-lxTDvuk,7869 +torch/_inductor/autoheuristic/artifacts/_PadMMA100.py,sha256=KReKRxB8tDQNfBLalXvw5H0Lludtu4eEXelYHk52xbY,4931 +torch/_inductor/autoheuristic/artifacts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/_inductor/autoheuristic/artifacts/__pycache__/_MMRankingA100.cpython-310.pyc,, +torch/_inductor/autoheuristic/artifacts/__pycache__/_MMRankingH100.cpython-310.pyc,, +torch/_inductor/autoheuristic/artifacts/__pycache__/_MixedMMA100.cpython-310.pyc,, +torch/_inductor/autoheuristic/artifacts/__pycache__/_MixedMMH100.cpython-310.pyc,, +torch/_inductor/autoheuristic/artifacts/__pycache__/_PadMMA100.cpython-310.pyc,, +torch/_inductor/autoheuristic/artifacts/__pycache__/__init__.cpython-310.pyc,, +torch/_inductor/autoheuristic/autoheuristic.py,sha256=TUtWdJFoP_AUocDiLsmA41DTOyh1ZbVfnVcB35wRYtA,11961 +torch/_inductor/autoheuristic/autoheuristic_utils.py,sha256=0RHBO-_Ni4qBnNDHpyu6zyWlPFLe1g1VI-4bShdvqUQ,11308 +torch/_inductor/autoheuristic/learned_heuristic_controller.py,sha256=B8idkoFWGcuQzyTA_u4JEtUFhOD44rkUMej9s1CxHBo,4317 +torch/_inductor/autoheuristic/learnedheuristic_interface.py,sha256=KMERZB3-U0kRaWEoUds9YX1T6IjTN0imQ08hU808S2s,2732 +torch/_inductor/autotune_process.py,sha256=cC1m3hCb0sVOH5z6SJ0xQLq3gsAIj_nrCpz0voVW-HE,35317 +torch/_inductor/await_utils.py,sha256=pcUPAT8SkPEKsgYoYjnx1HL0RoNka6bP1lQlrt7RZsE,5841 +torch/_inductor/bounds.py,sha256=tqBY8WXuJxju3YFiHe_rvdFoix25lig5jSBBMGZWLDQ,9717 +torch/_inductor/cache.py,sha256=WCVejf3ofSc2lvXuFrE9BbQrTo1RSMeomWri1yVSizM,14823 +torch/_inductor/choices.py,sha256=WCVRbuf0z6I8hBPC3LrkiQIDj4D6mGeiA5v2m3A43z4,26782 +torch/_inductor/codecache.py,sha256=I-sjt3XgZdf0UVQQim7XHY8FT327P9hEQEMh-WuKFvs,174487 +torch/_inductor/codegen/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/_inductor/codegen/__pycache__/__init__.cpython-310.pyc,, +torch/_inductor/codegen/__pycache__/aoti_hipify_utils.cpython-310.pyc,, +torch/_inductor/codegen/__pycache__/block_analysis.cpython-310.pyc,, +torch/_inductor/codegen/__pycache__/common.cpython-310.pyc,, +torch/_inductor/codegen/__pycache__/cpp.cpython-310.pyc,, +torch/_inductor/codegen/__pycache__/cpp_bmm_template.cpython-310.pyc,, +torch/_inductor/codegen/__pycache__/cpp_flex_attention_template.cpython-310.pyc,, +torch/_inductor/codegen/__pycache__/cpp_gemm_template.cpython-310.pyc,, +torch/_inductor/codegen/__pycache__/cpp_grouped_gemm_template.cpython-310.pyc,, +torch/_inductor/codegen/__pycache__/cpp_micro_gemm.cpython-310.pyc,, +torch/_inductor/codegen/__pycache__/cpp_template.cpython-310.pyc,, +torch/_inductor/codegen/__pycache__/cpp_template_kernel.cpython-310.pyc,, +torch/_inductor/codegen/__pycache__/cpp_utils.cpython-310.pyc,, +torch/_inductor/codegen/__pycache__/cpp_wrapper_cpu.cpython-310.pyc,, +torch/_inductor/codegen/__pycache__/cpp_wrapper_cpu_array_ref.cpython-310.pyc,, +torch/_inductor/codegen/__pycache__/cpp_wrapper_gpu.cpython-310.pyc,, +torch/_inductor/codegen/__pycache__/cpp_wrapper_mps.cpython-310.pyc,, +torch/_inductor/codegen/__pycache__/cpu_device_op_overrides.cpython-310.pyc,, +torch/_inductor/codegen/__pycache__/cuda_combined_scheduling.cpython-310.pyc,, +torch/_inductor/codegen/__pycache__/debug_utils.cpython-310.pyc,, +torch/_inductor/codegen/__pycache__/halide.cpython-310.pyc,, +torch/_inductor/codegen/__pycache__/memory_planning.cpython-310.pyc,, +torch/_inductor/codegen/__pycache__/mps.cpython-310.pyc,, +torch/_inductor/codegen/__pycache__/mps_device_op_overrides.cpython-310.pyc,, +torch/_inductor/codegen/__pycache__/multi_kernel.cpython-310.pyc,, +torch/_inductor/codegen/__pycache__/pallas.cpython-310.pyc,, +torch/_inductor/codegen/__pycache__/python_wrapper_mtia.cpython-310.pyc,, +torch/_inductor/codegen/__pycache__/segmented_tree.cpython-310.pyc,, +torch/_inductor/codegen/__pycache__/simd.cpython-310.pyc,, +torch/_inductor/codegen/__pycache__/simd_kernel_features.cpython-310.pyc,, +torch/_inductor/codegen/__pycache__/subgraph.cpython-310.pyc,, +torch/_inductor/codegen/__pycache__/triton.cpython-310.pyc,, +torch/_inductor/codegen/__pycache__/triton_combo_kernel.cpython-310.pyc,, +torch/_inductor/codegen/__pycache__/triton_split_scan.cpython-310.pyc,, +torch/_inductor/codegen/__pycache__/triton_utils.cpython-310.pyc,, +torch/_inductor/codegen/__pycache__/wrapper.cpython-310.pyc,, +torch/_inductor/codegen/__pycache__/wrapper_fxir.cpython-310.pyc,, +torch/_inductor/codegen/aoti_hipify_utils.py,sha256=ntqiznqR7z1Oa_GnR_IQcYOOYiM2F08jD-MaDZJ43TM,1440 +torch/_inductor/codegen/aoti_runtime/interface.cpp,sha256=VZl13TORNVPFYO5D-vYyESdD1_40k1pmjjAnjXVsYTo,17914 +torch/_inductor/codegen/block_analysis.py,sha256=LnyZnIxntXjOP4qqfaDoxGfAQGCYQzcb-GRpqr6mTBo,7259 +torch/_inductor/codegen/common.py,sha256=otxQBZhjG-x3JOrS7MidCAcJHq2sM5v7IfIAkHROmmQ,104462 +torch/_inductor/codegen/cpp.py,sha256=B4qx24gDWJCDAZIpt7aD_0Qr3AP9VYMfzxjM-Hv6ghU,234271 +torch/_inductor/codegen/cpp_bmm_template.py,sha256=r5Z-eL7qF2qqgQMXK2PITpoZojrFv4VXpAdFzp3nGyY,9386 +torch/_inductor/codegen/cpp_flex_attention_template.py,sha256=KRxhzWGdVT6nvDgB-p4HCHCcJUkpEt1gx_1bRgJ7zVA,41411 +torch/_inductor/codegen/cpp_gemm_template.py,sha256=y6XXbGwzK3gJDWdntWT6AhLulxtGNfJwjUJAQNF_py4,77962 +torch/_inductor/codegen/cpp_grouped_gemm_template.py,sha256=qQK4U8-6FHF5KRFDrt8p6gdbTo6EWbMw_hAhjb49u_c,20910 +torch/_inductor/codegen/cpp_micro_gemm.py,sha256=SDPeAk9FZV2itUuvYzTWnPNGg5Y4VkrIjJ6Kn8la39M,77597 +torch/_inductor/codegen/cpp_template.py,sha256=79mDtBS-jzWLsvqDtXSqx6dMg-zw_6aXfRcph0-zmcU,5021 +torch/_inductor/codegen/cpp_template_kernel.py,sha256=BqDfR_trEnPVu3q-gJZQt1JLXxqflYaepC01ZV4_74M,26159 +torch/_inductor/codegen/cpp_utils.py,sha256=HSda9nu_Ne4RFSOsZgI9q-j_oxuNO8cMx5g3hXwzkyw,28276 +torch/_inductor/codegen/cpp_wrapper_cpu.py,sha256=BMtkydJlGcVfGqveG0oi05_h8oMyUUtXebnUBrE7pdY,130836 +torch/_inductor/codegen/cpp_wrapper_cpu_array_ref.py,sha256=ssVOce1fISl23Lrjz2J2P-xyMfFdOXF8yX4KE1ceFE8,38995 +torch/_inductor/codegen/cpp_wrapper_gpu.py,sha256=ZkIaXrSZ43wsGiuaTdY9evC6jh1kGHJSLgQjX0RMJ9k,36719 +torch/_inductor/codegen/cpp_wrapper_mps.py,sha256=J2DTjbImniY64Tpf2oRnXX9EOCCCHVcsS2O26FEVuwk,12297 +torch/_inductor/codegen/cpu_device_op_overrides.py,sha256=LhucRsCxEnVVckP2YLQy41J7lk-vXZnDNWAVUZKyvaQ,694 +torch/_inductor/codegen/cuda/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/_inductor/codegen/cuda/__pycache__/__init__.cpython-310.pyc,, +torch/_inductor/codegen/cuda/__pycache__/cuda_cpp_scheduling.cpython-310.pyc,, +torch/_inductor/codegen/cuda/__pycache__/cuda_env.cpython-310.pyc,, +torch/_inductor/codegen/cuda/__pycache__/cuda_kernel.cpython-310.pyc,, +torch/_inductor/codegen/cuda/__pycache__/cuda_template.cpython-310.pyc,, +torch/_inductor/codegen/cuda/__pycache__/cutlass_cache.cpython-310.pyc,, +torch/_inductor/codegen/cuda/__pycache__/cutlass_python_evt.cpython-310.pyc,, +torch/_inductor/codegen/cuda/__pycache__/cutlass_utils.cpython-310.pyc,, +torch/_inductor/codegen/cuda/__pycache__/device_op_overrides.cpython-310.pyc,, +torch/_inductor/codegen/cuda/__pycache__/gemm_template.cpython-310.pyc,, +torch/_inductor/codegen/cuda/__pycache__/serialization.cpython-310.pyc,, +torch/_inductor/codegen/cuda/cuda_cpp_scheduling.py,sha256=0zkPgr5WikvRkhaHg-GyKw2pjl89lMYsEA0QN_kdFBI,11964 +torch/_inductor/codegen/cuda/cuda_env.py,sha256=9xNspUuTDFrrVb7OpW51Mgex_0anuplb03IZ4ys7jqI,1391 +torch/_inductor/codegen/cuda/cuda_kernel.py,sha256=Vshlpe8hrVEXrzr2Nj2OX-w57lgmSAfZST1tj2UhSnY,24659 +torch/_inductor/codegen/cuda/cuda_template.py,sha256=WKqnKDR1nLIJIhw3I-Z34iRgjpuxroOKCWj1etXC4ik,13961 +torch/_inductor/codegen/cuda/cutlass_cache.py,sha256=gHKizJAkNZDJC2v2PiiTSMI5v4tir5NzMqJAU6JjVJ4,3651 +torch/_inductor/codegen/cuda/cutlass_lib_extensions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/_inductor/codegen/cuda/cutlass_lib_extensions/__pycache__/__init__.cpython-310.pyc,, +torch/_inductor/codegen/cuda/cutlass_lib_extensions/__pycache__/evt_extensions.cpython-310.pyc,, +torch/_inductor/codegen/cuda/cutlass_lib_extensions/__pycache__/gemm_operation_extensions.cpython-310.pyc,, +torch/_inductor/codegen/cuda/cutlass_lib_extensions/cutlass_mock_imports/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/_inductor/codegen/cuda/cutlass_lib_extensions/cutlass_mock_imports/__pycache__/__init__.cpython-310.pyc,, +torch/_inductor/codegen/cuda/cutlass_lib_extensions/cutlass_mock_imports/cuda/__init__.py,sha256=zIVQSgcv5C12tIsovmz3xGgBqoATUltX2c4-VG2e3tU,83 +torch/_inductor/codegen/cuda/cutlass_lib_extensions/cutlass_mock_imports/cuda/__pycache__/__init__.cpython-310.pyc,, +torch/_inductor/codegen/cuda/cutlass_lib_extensions/cutlass_mock_imports/cuda/__pycache__/cuda.cpython-310.pyc,, +torch/_inductor/codegen/cuda/cutlass_lib_extensions/cutlass_mock_imports/cuda/__pycache__/cudart.cpython-310.pyc,, +torch/_inductor/codegen/cuda/cutlass_lib_extensions/cutlass_mock_imports/cuda/cuda.py,sha256=MAbpo0K0ESplc0TsHAeuOE0ty5K1SUrROdDZ8sqVvWs,314 +torch/_inductor/codegen/cuda/cutlass_lib_extensions/cutlass_mock_imports/cuda/cudart.py,sha256=pkNjquWqOMt8KAnOBkHbIxpgBmdWRZqXZbpQXS7ElK0,305 +torch/_inductor/codegen/cuda/cutlass_lib_extensions/cutlass_mock_imports/pydot/__init__.py,sha256=AkdGQWifQLxFzB5RR5EcXNCg_AQX446DLfp-64Q7D4I,54 +torch/_inductor/codegen/cuda/cutlass_lib_extensions/cutlass_mock_imports/pydot/__pycache__/__init__.cpython-310.pyc,, +torch/_inductor/codegen/cuda/cutlass_lib_extensions/cutlass_mock_imports/scipy/__init__.py,sha256=SiRBwZsGLISQfmWy5-pkpAzRopAkCy9kzx8JOjV4YX8,55 +torch/_inductor/codegen/cuda/cutlass_lib_extensions/cutlass_mock_imports/scipy/__pycache__/__init__.cpython-310.pyc,, +torch/_inductor/codegen/cuda/cutlass_lib_extensions/cutlass_mock_imports/scipy/__pycache__/special.cpython-310.pyc,, +torch/_inductor/codegen/cuda/cutlass_lib_extensions/cutlass_mock_imports/scipy/special.py,sha256=NcOk2HGGaIsTnV0LPyRYnBXcR3WumPqGw2rKDT4dedk,54 +torch/_inductor/codegen/cuda/cutlass_lib_extensions/evt_extensions.py,sha256=ZjgO9gg_0KAGo92sk85_YNSj9kjkvz6AEqVg-CR7ir0,10903 +torch/_inductor/codegen/cuda/cutlass_lib_extensions/gemm_operation_extensions.py,sha256=dZNgc4K5UG9ecsnjTzc6rMBuG43DIs2YrHa4z6nYz40,18646 +torch/_inductor/codegen/cuda/cutlass_python_evt.py,sha256=PdtbuMOGAI0BXsKxxl4YVH0wzWN0DSGtPKconqPLTOA,11792 +torch/_inductor/codegen/cuda/cutlass_utils.py,sha256=kHeeFKCW7nIhvF6H7A2i4W0seB27SsvChmpljcre20A,17111 +torch/_inductor/codegen/cuda/device_op_overrides.py,sha256=UNEzS1VLFV2TEfQDOldLNYbkBmMVFyEf9DIQ_O2x4pA,14719 +torch/_inductor/codegen/cuda/gemm_template.py,sha256=Q56yoxU7pJfiQvR_61qlOLkZ7nWjpw8DiPvLoEhsj0k,77188 +torch/_inductor/codegen/cuda/serialization.py,sha256=__yOSml7ku0cHt7UCLmvVNS_b03r5MTEgPWhd4HfED4,17799 +torch/_inductor/codegen/cuda_combined_scheduling.py,sha256=xI7leRkQiYY7XwMU-c9YTHONYe9WDb-70T6NxHH4Xg8,6256 +torch/_inductor/codegen/cutedsl/__init__.py,sha256=LCdU39rzLOP3q27650YlpGE3wo5SRH2IPdvEoybU6rg,164 +torch/_inductor/codegen/cutedsl/__pycache__/__init__.cpython-310.pyc,, +torch/_inductor/codegen/cutedsl/__pycache__/_cutedsl_utils.cpython-310.pyc,, +torch/_inductor/codegen/cutedsl/__pycache__/cutedsl_kernel.cpython-310.pyc,, +torch/_inductor/codegen/cutedsl/__pycache__/cutedsl_op_overrides.cpython-310.pyc,, +torch/_inductor/codegen/cutedsl/__pycache__/cutedsl_scheduling.cpython-310.pyc,, +torch/_inductor/codegen/cutedsl/__pycache__/cutedsl_template.cpython-310.pyc,, +torch/_inductor/codegen/cutedsl/_cutedsl_utils.py,sha256=3bxaIipq4S39lbWsmsIxJ8Eoz9dxMTh15YYOzbhKEa8,926 +torch/_inductor/codegen/cutedsl/cutedsl_kernel.py,sha256=Htif235zHBenRPOdoMl8jxzBjFzZr8jEj5VRgMf7jds,23003 +torch/_inductor/codegen/cutedsl/cutedsl_op_overrides.py,sha256=tggalgaDDLxgRkh9NZ9iyWu1zh-hLrASb6ZzIjCZ6xc,12937 +torch/_inductor/codegen/cutedsl/cutedsl_scheduling.py,sha256=jNKkpmy_Bc3u7Mw4d6D3otc1cPLyqWT3j33Mgym0r0Y,5310 +torch/_inductor/codegen/cutedsl/cutedsl_template.py,sha256=4dd4-N7poN26S9EttrXLebaHjAwuX3QaDCTFDoGvflk,7069 +torch/_inductor/codegen/debug_utils.py,sha256=jFpYDwqq9UNdg1PumaT6jdJ5RXQtchmT6LzwL2F1W0M,11399 +torch/_inductor/codegen/halide.py,sha256=FhvStfqXVlvJgPYJ0gmMk-K357wQg4XjOEBEZkpz2DM,63426 +torch/_inductor/codegen/memory_planning.py,sha256=ESCCQyF4wwRmwAkbA449QVZF59bj2sIuJg34S4qVzsg,26604 +torch/_inductor/codegen/mps.py,sha256=ne-kKMBEleq4C62Znk1bifFH6k_voRW1Odn_zG9xTyw,42027 +torch/_inductor/codegen/mps_device_op_overrides.py,sha256=AY7QsOH2mELU0HsZz6B6ygxdSGwVnvS7v4ypb8KRXlo,671 +torch/_inductor/codegen/mtia/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/_inductor/codegen/mtia/__pycache__/__init__.cpython-310.pyc,, +torch/_inductor/codegen/mtia/__pycache__/device_op_overrides.cpython-310.pyc,, +torch/_inductor/codegen/mtia/device_op_overrides.py,sha256=3pP0peusaHi8fkuf9ZHnwFE88KYjH-0YJcAT07ZCFuA,637 +torch/_inductor/codegen/multi_kernel.py,sha256=-TKOEg8fCHYOieqM_GnrR2Ii-aaTAwy8RL2HIhIhGiM,23403 +torch/_inductor/codegen/pallas.py,sha256=sTxNhzybQs19W50rTb0qZhSDdzM_MyHafU8MoewTx2U,73963 +torch/_inductor/codegen/python_wrapper_mtia.py,sha256=4qUTMuLu479TMrEYO8t7ELor3VPssxuqDGB_DYZCivM,1025 +torch/_inductor/codegen/rocm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/_inductor/codegen/rocm/__pycache__/__init__.cpython-310.pyc,, +torch/_inductor/codegen/rocm/__pycache__/ck_conv_template.cpython-310.pyc,, +torch/_inductor/codegen/rocm/__pycache__/ck_template.cpython-310.pyc,, +torch/_inductor/codegen/rocm/__pycache__/ck_tile_template.cpython-310.pyc,, +torch/_inductor/codegen/rocm/__pycache__/ck_tile_universal_gemm_template.cpython-310.pyc,, +torch/_inductor/codegen/rocm/__pycache__/ck_universal_gemm_template.cpython-310.pyc,, +torch/_inductor/codegen/rocm/__pycache__/compile_command.cpython-310.pyc,, +torch/_inductor/codegen/rocm/__pycache__/rocm_benchmark_request.cpython-310.pyc,, +torch/_inductor/codegen/rocm/__pycache__/rocm_cpp_scheduling.cpython-310.pyc,, +torch/_inductor/codegen/rocm/__pycache__/rocm_kernel.cpython-310.pyc,, +torch/_inductor/codegen/rocm/__pycache__/rocm_template.cpython-310.pyc,, +torch/_inductor/codegen/rocm/__pycache__/rocm_template_buffer.cpython-310.pyc,, +torch/_inductor/codegen/rocm/__pycache__/rocm_utils.cpython-310.pyc,, +torch/_inductor/codegen/rocm/ck_conv_template.py,sha256=j6EuqXegHn8_EKas2uQOZVlg3bJq_YVY-_dNciVuivQ,24936 +torch/_inductor/codegen/rocm/ck_template.py,sha256=eNUthfvZo-H9Ayvg-1yJUfVZFhF3eBJHxESY5oWZyts,3695 +torch/_inductor/codegen/rocm/ck_tile_template.py,sha256=Qm1oW_WPVexswfI8HwL9lgfYUxEwhd4ehmDKz3AOHik,1591 +torch/_inductor/codegen/rocm/ck_tile_universal_gemm_template.py,sha256=xj3bXtb-mEIAVQmp7TkLEGqA1yyL5oMV55y8L2_O2HI,37033 +torch/_inductor/codegen/rocm/ck_universal_gemm_template.py,sha256=qxfRUQ1dtoZAV8BBhKjUnO2d6GyxRS4c7SxbQD9xvxk,39672 +torch/_inductor/codegen/rocm/compile_command.py,sha256=SfZZ6CFB7kwob-HT0Qu0aUQPQP4RX02iXqklJCbtTXo,4662 +torch/_inductor/codegen/rocm/rocm_benchmark_request.py,sha256=8AovwS9XVet04c-y2LIGQ3HLMvXv0vN93VJQnPfp62w,5064 +torch/_inductor/codegen/rocm/rocm_cpp_scheduling.py,sha256=gnK4YyLry4Vjmlmu3RxtdcmJ3KvGHQkbLQzGDN9D0jw,3878 +torch/_inductor/codegen/rocm/rocm_kernel.py,sha256=euGT9SNW2hBf3E0Z99guPELmHxPdzvavYgnbZvZFkuE,10459 +torch/_inductor/codegen/rocm/rocm_template.py,sha256=Rcw9UUX2eEUjn633oBTBytzXIWiIogQ0oWBaiMcZnH4,6637 +torch/_inductor/codegen/rocm/rocm_template_buffer.py,sha256=UMhXlEMC2acFTLJqJwKx1btyB7uuxOe_Ftr364CzNLw,827 +torch/_inductor/codegen/rocm/rocm_utils.py,sha256=_tYJSiuN0xtpJvqM9xycWNsRRC0UzuhGxIMwp0gIHxw,336 +torch/_inductor/codegen/segmented_tree.py,sha256=Oqc9m8ibp5omyiFBEtWs0FHNgoS5wzz1U9isvzzvy64,8193 +torch/_inductor/codegen/simd.py,sha256=ynhGC0_0YBCPcmSC9XX4iagcvte6XbtY1wpRicb7BGU,122494 +torch/_inductor/codegen/simd_kernel_features.py,sha256=aeDaIGYQMeh0fR3W5Mfc8iHsroSucmeskkFPlI1zvHo,23781 +torch/_inductor/codegen/subgraph.py,sha256=6Bh6_1URyVeR8D-DiISEeLra0J_0YfafHxPHX4Jw0AA,16224 +torch/_inductor/codegen/triton.py,sha256=UaAxjI7TuqOWqr20JF8k43jlQACqKILMh-adlA0ze7k,248848 +torch/_inductor/codegen/triton_combo_kernel.py,sha256=YtrMU_wMbpr5lHugOycV5svE3ufJkcPAqwnNK0xhb-8,43899 +torch/_inductor/codegen/triton_split_scan.py,sha256=4VNbhBldTJuLCuw95Ga7Hpzm8RP4ztmSXVohBFXXWFk,7701 +torch/_inductor/codegen/triton_utils.py,sha256=4hqP5KilCpbOQWmwe-CQ9S5FdsCULiuSKu_iRVFqEQo,9280 +torch/_inductor/codegen/wrapper.py,sha256=jAWXXJS3fk8oVVsGrDM9cD-0tKLHrVkdXDSWoyC74ps,156283 +torch/_inductor/codegen/wrapper_fxir.py,sha256=fog82b2XSOTUQLMFqtOhR-dj8EY04KBDVYF2P7hERH8,44319 +torch/_inductor/codegen/xpu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/_inductor/codegen/xpu/__pycache__/__init__.cpython-310.pyc,, +torch/_inductor/codegen/xpu/__pycache__/device_op_overrides.cpython-310.pyc,, +torch/_inductor/codegen/xpu/device_op_overrides.py,sha256=4WJHzEtwBR3MKfaFgqYMb0dbNnwGjJ-f4DnqOXYk41Q,1884 +torch/_inductor/comm_analysis.py,sha256=nqIsVhmg5mARWrgMWLBAJKgb9B_EvYpDRzFMseDcoIU,16793 +torch/_inductor/comm_lowering.py,sha256=ZfYALkONkvh37OevQsgg7OqqHpWB94QNm3VRng_5Hc8,13733 +torch/_inductor/comms.py,sha256=Vcvwdp2jkZ23Y3MtKp7FYxpCZZm41N022WaS56pSgIM,102529 +torch/_inductor/comms_debug.py,sha256=r36mUlq42aBI77-3HRlck6guxy5_jLHnabTtjjJp_4U,4227 +torch/_inductor/compile_fx.py,sha256=AvyvHJ7chp-oG15Dt1Oo-ym_0WDn5hKWObJs33C5lHs,117452 +torch/_inductor/compile_fx_async.py,sha256=MHgEi5R6OzbGR4AosbtXPaJr44Vqg-NJBtiBPTVJ9l4,14512 +torch/_inductor/compile_fx_ext.py,sha256=jdsGgC4d5WobB-3zT0bL-6kEbKZQtNmu0xvSary3AhA,23189 +torch/_inductor/compile_fx_subproc.py,sha256=6KEEsjQWjxKR94wleo4-Wn8hHvSmb5gEG-L03rv9gJk,3171 +torch/_inductor/compile_worker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/_inductor/compile_worker/__main__.py,sha256=Yj1LnCvSJWe_Y8LWarFQLceqCmadcX7RhqP9uBS-zYA,2245 +torch/_inductor/compile_worker/__pycache__/__init__.cpython-310.pyc,, +torch/_inductor/compile_worker/__pycache__/__main__.cpython-310.pyc,, +torch/_inductor/compile_worker/__pycache__/subproc_pool.cpython-310.pyc,, +torch/_inductor/compile_worker/__pycache__/timer.cpython-310.pyc,, +torch/_inductor/compile_worker/__pycache__/tracked_process_pool.cpython-310.pyc,, +torch/_inductor/compile_worker/__pycache__/utils.cpython-310.pyc,, +torch/_inductor/compile_worker/subproc_pool.py,sha256=JFJzVCKy_NKcxUb5MsiuoX_JPZ0Zbr8kcbMg3M5fCoI,17481 +torch/_inductor/compile_worker/timer.py,sha256=wXKAyCIH087GQMyizGksVSWm3A6lLPXbDCMJ7_wNH8Q,1865 +torch/_inductor/compile_worker/tracked_process_pool.py,sha256=WgeaeBrw5vC1gNXH9A36mkxFGKrA9V2qUW49rUc_3-w,3693 +torch/_inductor/compile_worker/utils.py,sha256=mQMTTvW9ndheeXwjt26rLObwWnYxNUy8HE_iGn-pU-U,1629 +torch/_inductor/compiler_bisector.py,sha256=kXXEJ3-uUk8VTjGYBehfXQEcvGijIaX_BaZ9KI1_eSg,22990 +torch/_inductor/config.py,sha256=NXQmI917S1I5QKaPDszS9oKGzGJP41UobON4PYeK7pw,91405 +torch/_inductor/config_comms.py,sha256=in2G0D22T5H7qH44crJ1jfppMe3DCGLl4GzQcM4Jhqc,3078 +torch/_inductor/constant_folding.py,sha256=-Uc5ATZnugHna37o5UVgMRSHqZnn7jvKECDB91vD3Pw,15243 +torch/_inductor/cpp_builder.py,sha256=luFGL3A5_fVWLOj7nKnFwLRSBIMUG8hV42uyWgU0MAc,85757 +torch/_inductor/cpu_vec_isa.py,sha256=Ekk_TDZKHvPCGxnxiybZDIANRzvKtpwS67PxX6ZWcvI,18142 +torch/_inductor/cudagraph_trees.py,sha256=PtIXVZJfJ7WY8tFHZCWWe1myJcNdvWEjBKGXsBQU4uY,104550 +torch/_inductor/cudagraph_utils.py,sha256=Dadh_oy4lAuE9yXBbTxJZs4BcUDuCwu-LymGXlANfKg,14138 +torch/_inductor/custom_graph_pass.py,sha256=fenc2iFmDx-r7QlrOehTflwWNFcSThqG715do81izkg,5886 +torch/_inductor/debug.py,sha256=n5d_wGle1vNjV3WT0-kSQt69_tsD2fVfO2ks5MhvGUA,46830 +torch/_inductor/decomposition.py,sha256=K1sgS_oAThlFYFiDZE4R-xlWtv7-91Aws9I7l_ITwOo,40732 +torch/_inductor/dependencies.py,sha256=Ag50QLeJeH3bxoE9q6rNU3YgAYC1-6e1pbSZoEVRnd4,31918 +torch/_inductor/distributed_autotune.py,sha256=e2JuB-AWHIqP4QIc3wluukMbhOq-CmMf_KHF8kFUX0k,12368 +torch/_inductor/dtype_propagation.py,sha256=hSaruykwKPuH5abDZQZGd9H02CxJAwoYfRbyO0ZEoIg,12027 +torch/_inductor/exc.py,sha256=TeZzW7ZAQVkrYMBAHwoVNjWOhyuHA7LvLYnUVEAGUFY,4869 +torch/_inductor/extern_node_serializer.py,sha256=tvVk5NzYVvqTI0v-k2hQikc8h6EsXazK1NQ2soHZ2yc,830 +torch/_inductor/freezing.py,sha256=ITFFcHPblqlqAudRTJZjvQJ2pjg5vXwKOd-pnIxtchU,11051 +torch/_inductor/freezing_utils.py,sha256=0kQfN4H2yEI_eNXINqa0ws5Q-mm9EVT6ARcAKrz3P80,1268 +torch/_inductor/fuzzer.py,sha256=A0tQk2ML2v9mQdUKgtZUb_fkE9TXkwWwlo5WG-r0Qf4,37524 +torch/_inductor/fx_passes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/_inductor/fx_passes/__pycache__/__init__.cpython-310.pyc,, +torch/_inductor/fx_passes/__pycache__/b2b_gemm.cpython-310.pyc,, +torch/_inductor/fx_passes/__pycache__/binary_folding.cpython-310.pyc,, +torch/_inductor/fx_passes/__pycache__/bucketing.cpython-310.pyc,, +torch/_inductor/fx_passes/__pycache__/control_dependencies.cpython-310.pyc,, +torch/_inductor/fx_passes/__pycache__/ddp_fusion.cpython-310.pyc,, +torch/_inductor/fx_passes/__pycache__/decompose_mem_bound_mm.cpython-310.pyc,, +torch/_inductor/fx_passes/__pycache__/dedupe_symint_uses.cpython-310.pyc,, +torch/_inductor/fx_passes/__pycache__/efficient_conv_bn_eval.cpython-310.pyc,, +torch/_inductor/fx_passes/__pycache__/freezing_patterns.cpython-310.pyc,, +torch/_inductor/fx_passes/__pycache__/fsdp.cpython-310.pyc,, +torch/_inductor/fx_passes/__pycache__/fuse_attention.cpython-310.pyc,, +torch/_inductor/fx_passes/__pycache__/graph_view.cpython-310.pyc,, +torch/_inductor/fx_passes/__pycache__/group_batch_fusion.cpython-310.pyc,, +torch/_inductor/fx_passes/__pycache__/joint_graph.cpython-310.pyc,, +torch/_inductor/fx_passes/__pycache__/memory_estimator.cpython-310.pyc,, +torch/_inductor/fx_passes/__pycache__/micro_pipeline_tp.cpython-310.pyc,, +torch/_inductor/fx_passes/__pycache__/misc_patterns.cpython-310.pyc,, +torch/_inductor/fx_passes/__pycache__/mkldnn_fusion.cpython-310.pyc,, +torch/_inductor/fx_passes/__pycache__/node_runtime_estimation.cpython-310.pyc,, +torch/_inductor/fx_passes/__pycache__/numeric_utils.cpython-310.pyc,, +torch/_inductor/fx_passes/__pycache__/overlap_manual_scheduling.cpython-310.pyc,, +torch/_inductor/fx_passes/__pycache__/overlap_preserving_bucketer.cpython-310.pyc,, +torch/_inductor/fx_passes/__pycache__/overlap_scheduling.cpython-310.pyc,, +torch/_inductor/fx_passes/__pycache__/pad_mm.cpython-310.pyc,, +torch/_inductor/fx_passes/__pycache__/post_grad.cpython-310.pyc,, +torch/_inductor/fx_passes/__pycache__/pre_grad.cpython-310.pyc,, +torch/_inductor/fx_passes/__pycache__/quantization.cpython-310.pyc,, +torch/_inductor/fx_passes/__pycache__/reinplace.cpython-310.pyc,, +torch/_inductor/fx_passes/__pycache__/replace_random.cpython-310.pyc,, +torch/_inductor/fx_passes/__pycache__/split_cat.cpython-310.pyc,, +torch/_inductor/fx_passes/b2b_gemm.py,sha256=2QkARp-y-pEbab2a3SL7Y18fW4RYrQag-XN5lffQymw,25665 +torch/_inductor/fx_passes/binary_folding.py,sha256=GftJvNpuD8uJh7vNYnV4QXLXL4sq5S680D6Y0IYndmE,19830 +torch/_inductor/fx_passes/bucketing.py,sha256=SUJjiuhVSc7WDjdSqnond5T9sgmuZGYjVaWFvp-xoKo,39133 +torch/_inductor/fx_passes/control_dependencies.py,sha256=vfWVQlLNl1wruPC1bc4zcy9jqakBZQevsjpoY45V--U,7926 +torch/_inductor/fx_passes/ddp_fusion.py,sha256=6GbBd-wZ-QAJkDB0rnrWtE81jhJCqc-JBE4qC3c6mgA,21207 +torch/_inductor/fx_passes/decompose_mem_bound_mm.py,sha256=0THzgsrRPfs3JAmDFeHGeIQ5zKZL8diQ1RBPc-ent7E,11217 +torch/_inductor/fx_passes/dedupe_symint_uses.py,sha256=Bfuj7IhzY3DuixClyuziJM_jJ_w_zdfxsi7ULJcIxjk,2505 +torch/_inductor/fx_passes/efficient_conv_bn_eval.py,sha256=NddscsLQNq24caQxyKkpNFjHw3TeHmJ5Em91qscSF0I,14120 +torch/_inductor/fx_passes/freezing_patterns.py,sha256=RoyBpbZsKU3hn3b78rwvYaDtPIEBDUr3ejur_xYVIg4,9641 +torch/_inductor/fx_passes/fsdp.py,sha256=mJhDHKwnroXq8aur1SP0d_kkai4bvuxdRXqr7buF3eY,3775 +torch/_inductor/fx_passes/fuse_attention.py,sha256=YbNR6ghZgxhgKcYWKdc6UiEc1awYyMk6q8RvJEKolnU,37184 +torch/_inductor/fx_passes/graph_view.py,sha256=wdio2EfHz_1Ag1F583etgUGBK_4fDM_SJIYDRCBe9kA,9035 +torch/_inductor/fx_passes/group_batch_fusion.py,sha256=Mt8_cosdoY6C0kiqcseylaQjF00K5XR718FN8LVh19o,59332 +torch/_inductor/fx_passes/joint_graph.py,sha256=YpKStJhhc0RwB8iGzWyLjLCrJy151ME22b9njSh0b-s,37398 +torch/_inductor/fx_passes/memory_estimator.py,sha256=hb2XcohiWZ6R6zDNrrzpwAH07Gm4Vizvo65SojMZq5Y,17214 +torch/_inductor/fx_passes/micro_pipeline_tp.py,sha256=uRr1yn9SLAazplpvicEHB6p2iDeZIk-XLwd2dfFlVLQ,40346 +torch/_inductor/fx_passes/misc_patterns.py,sha256=IPpiu4U1Nq_OISw_qLpaYhvQQxewb8rF2WnkUguvCtc,5148 +torch/_inductor/fx_passes/mkldnn_fusion.py,sha256=wwDI9Iq3kPgD4vPVYhVyAFLrfRSDgLZZHeHFZy8DsNE,62426 +torch/_inductor/fx_passes/node_runtime_estimation.py,sha256=pvqjO7K3BvFJaGJQxXLucKA8qvakuAfCwHeAw115AbY,9834 +torch/_inductor/fx_passes/numeric_utils.py,sha256=D-tB9vsKK1V1lR-7UCXBJailxQuHPkkKmuddOYrfnPk,7285 +torch/_inductor/fx_passes/overlap_manual_scheduling.py,sha256=2AKXFGoKVqVjP3F6lwmNTjzPKFaneiPjyahDto37DF0,14563 +torch/_inductor/fx_passes/overlap_preserving_bucketer.py,sha256=iVDxr84ah77ACjc6aR544H2GhkKlIpCQxlktV4EtKnQ,34903 +torch/_inductor/fx_passes/overlap_scheduling.py,sha256=GqhEvtgs_Nm3xJVKkY21dPEq4Rrxpd6qkBnjqa1cjJQ,51128 +torch/_inductor/fx_passes/pad_mm.py,sha256=9N-6dRuVl0AsWJtd1uVOuCnYlsq_32tXypkuEqkeW4E,30328 +torch/_inductor/fx_passes/post_grad.py,sha256=8u_cLP0Dzq3Oxcc-eKqfcTzMtF63AgBziM4LxLrbEqM,68952 +torch/_inductor/fx_passes/pre_grad.py,sha256=DEZ8JtG_VafauZq3jXHmbpr9ABtd9om0z-Tto2iD0FM,31061 +torch/_inductor/fx_passes/quantization.py,sha256=9X4jVtfrL6Pk8D96d-VEDMgWRrPQ_BZ5insv-dFvVJ0,143925 +torch/_inductor/fx_passes/reinplace.py,sha256=2Wf53nMQtdW97vLaU25V3kuQIsVWEp1AinIet_-aqZA,30996 +torch/_inductor/fx_passes/replace_random.py,sha256=hRJmNd_ftsAv76OHuQx-9ZJYxdqTasGkpJLsggs8A_c,4378 +torch/_inductor/fx_passes/serialized_patterns/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/_inductor/fx_passes/serialized_patterns/__pycache__/__init__.cpython-310.pyc,, +torch/_inductor/fx_passes/serialized_patterns/__pycache__/_sfdp_pattern_1.cpython-310.pyc,, +torch/_inductor/fx_passes/serialized_patterns/__pycache__/_sfdp_pattern_10.cpython-310.pyc,, +torch/_inductor/fx_passes/serialized_patterns/__pycache__/_sfdp_pattern_11.cpython-310.pyc,, +torch/_inductor/fx_passes/serialized_patterns/__pycache__/_sfdp_pattern_12.cpython-310.pyc,, +torch/_inductor/fx_passes/serialized_patterns/__pycache__/_sfdp_pattern_13.cpython-310.pyc,, +torch/_inductor/fx_passes/serialized_patterns/__pycache__/_sfdp_pattern_14.cpython-310.pyc,, +torch/_inductor/fx_passes/serialized_patterns/__pycache__/_sfdp_pattern_15.cpython-310.pyc,, +torch/_inductor/fx_passes/serialized_patterns/__pycache__/_sfdp_pattern_16.cpython-310.pyc,, +torch/_inductor/fx_passes/serialized_patterns/__pycache__/_sfdp_pattern_17.cpython-310.pyc,, +torch/_inductor/fx_passes/serialized_patterns/__pycache__/_sfdp_pattern_18.cpython-310.pyc,, +torch/_inductor/fx_passes/serialized_patterns/__pycache__/_sfdp_pattern_19.cpython-310.pyc,, +torch/_inductor/fx_passes/serialized_patterns/__pycache__/_sfdp_pattern_2.cpython-310.pyc,, +torch/_inductor/fx_passes/serialized_patterns/__pycache__/_sfdp_pattern_20.cpython-310.pyc,, +torch/_inductor/fx_passes/serialized_patterns/__pycache__/_sfdp_pattern_21.cpython-310.pyc,, +torch/_inductor/fx_passes/serialized_patterns/__pycache__/_sfdp_pattern_22.cpython-310.pyc,, +torch/_inductor/fx_passes/serialized_patterns/__pycache__/_sfdp_pattern_23.cpython-310.pyc,, +torch/_inductor/fx_passes/serialized_patterns/__pycache__/_sfdp_pattern_24.cpython-310.pyc,, +torch/_inductor/fx_passes/serialized_patterns/__pycache__/_sfdp_pattern_3.cpython-310.pyc,, +torch/_inductor/fx_passes/serialized_patterns/__pycache__/_sfdp_pattern_4.cpython-310.pyc,, +torch/_inductor/fx_passes/serialized_patterns/__pycache__/_sfdp_pattern_5.cpython-310.pyc,, +torch/_inductor/fx_passes/serialized_patterns/__pycache__/_sfdp_pattern_6.cpython-310.pyc,, +torch/_inductor/fx_passes/serialized_patterns/__pycache__/_sfdp_pattern_7.cpython-310.pyc,, +torch/_inductor/fx_passes/serialized_patterns/__pycache__/_sfdp_pattern_8.cpython-310.pyc,, +torch/_inductor/fx_passes/serialized_patterns/__pycache__/_sfdp_pattern_9.cpython-310.pyc,, +torch/_inductor/fx_passes/serialized_patterns/__pycache__/addmm_pattern.cpython-310.pyc,, +torch/_inductor/fx_passes/serialized_patterns/__pycache__/bmm_pattern.cpython-310.pyc,, +torch/_inductor/fx_passes/serialized_patterns/__pycache__/mm_pattern.cpython-310.pyc,, +torch/_inductor/fx_passes/serialized_patterns/_sfdp_pattern_1.py,sha256=jLk3u9vyyPhzzmJCf82H-lEa_ycI9FGR2F1e14BF7JA,11177 +torch/_inductor/fx_passes/serialized_patterns/_sfdp_pattern_10.py,sha256=68W2L3OqEIyiuu6XvfwyXl0PKeoyEKRVqxKvdt3DrfI,14216 +torch/_inductor/fx_passes/serialized_patterns/_sfdp_pattern_11.py,sha256=YzKAdp1wKREpwh-ma-MPjMKRAImnfIFpWrqbpBtJBPc,13987 +torch/_inductor/fx_passes/serialized_patterns/_sfdp_pattern_12.py,sha256=6o07OMAP3P4yuOSrmsW_AsSq9gYeTVD2SkxJh8xQoZc,15257 +torch/_inductor/fx_passes/serialized_patterns/_sfdp_pattern_13.py,sha256=yQOZ4yfymHPP_gNISoxq4pOt3xPic8eJY0InMr9hsPg,7862 +torch/_inductor/fx_passes/serialized_patterns/_sfdp_pattern_14.py,sha256=p729osgik7UB0ySzKMcthIj9Pk3rqh6OdP6wKZFNqvA,14323 +torch/_inductor/fx_passes/serialized_patterns/_sfdp_pattern_15.py,sha256=MdfVHtUJn0ZzgPsDoLIsj7Sla3HnflFCIELfS1uAYy0,16213 +torch/_inductor/fx_passes/serialized_patterns/_sfdp_pattern_16.py,sha256=-1tQU2MyC9heRGD6sOibLRER_Mlzx9civVLrREdQSMo,43596 +torch/_inductor/fx_passes/serialized_patterns/_sfdp_pattern_17.py,sha256=6MsCMyU-wCAUxWOmGt6fTqmbmTmm1BPeb3QhI8SDQuc,17441 +torch/_inductor/fx_passes/serialized_patterns/_sfdp_pattern_18.py,sha256=OAXyig6GrLjMznY5caHUpEHiImtO0Fw1MbVxzyW5H2w,32736 +torch/_inductor/fx_passes/serialized_patterns/_sfdp_pattern_19.py,sha256=F2irIKcyqlFALHNcoob2Mnp5HUmnDIQbrc33MsOcITg,14046 +torch/_inductor/fx_passes/serialized_patterns/_sfdp_pattern_2.py,sha256=-QeXpOThLf9w6HsKJT5nJdCfyXRK4sgxE6Jy4v87tdw,11187 +torch/_inductor/fx_passes/serialized_patterns/_sfdp_pattern_20.py,sha256=KOQ8WwRe3nVV3gdnr_qNk523jMXtL8DtXlxhKW6dBhI,17341 +torch/_inductor/fx_passes/serialized_patterns/_sfdp_pattern_21.py,sha256=2coVs1kGEj9Q0VweevPYMhAIA6FhDNcOzVJzZoonsPA,28246 +torch/_inductor/fx_passes/serialized_patterns/_sfdp_pattern_22.py,sha256=Cy-31zi4vmiP-wfPw2c3LtwGznJP84bJxGhxrIOMix0,28922 +torch/_inductor/fx_passes/serialized_patterns/_sfdp_pattern_23.py,sha256=o-9PzUKX69cYtuTYQqPVAUoPbSxqN_DeceDUyCz1DeQ,28750 +torch/_inductor/fx_passes/serialized_patterns/_sfdp_pattern_24.py,sha256=OcmiGTYF9kFbj4ArolgqndlniS8kMwB30X74qiD9Fhs,9274 +torch/_inductor/fx_passes/serialized_patterns/_sfdp_pattern_3.py,sha256=GAyzPOGSMzkdAxXkk3qpf-8y8GrWY-Wetzpy1aJU4oI,12447 +torch/_inductor/fx_passes/serialized_patterns/_sfdp_pattern_4.py,sha256=x3mGjvSYS7hImiBFUpXbySYVw8ZNVjCyqjjTrNIiHsg,12411 +torch/_inductor/fx_passes/serialized_patterns/_sfdp_pattern_5.py,sha256=ik5GT8rgEUQ4W03aYrqVxz-o8TeldqvCLvUwgnwhD0E,11413 +torch/_inductor/fx_passes/serialized_patterns/_sfdp_pattern_6.py,sha256=yxUEqgvLGs_3Ta726GdkN-K2oi4YWYgpwqVL-_cRXdQ,12641 +torch/_inductor/fx_passes/serialized_patterns/_sfdp_pattern_7.py,sha256=VFWwCNLXaRwyJrDMbPmA3KZpeE1-r8NZi1gHcd3aTt0,15436 +torch/_inductor/fx_passes/serialized_patterns/_sfdp_pattern_8.py,sha256=sOkMfIPN06YFB2M7AQuUcgIOvZez_G9tUtK1iXWp0sc,14204 +torch/_inductor/fx_passes/serialized_patterns/_sfdp_pattern_9.py,sha256=n3KBeZyp-oa69T0ACMtj3DcAS1DnmVmDT8OGdaMZWZw,15444 +torch/_inductor/fx_passes/serialized_patterns/addmm_pattern.py,sha256=9cl9L8L2CDu--cjIWRF63Ngl7YX9F38gGXCeEz3r0bY,1858 +torch/_inductor/fx_passes/serialized_patterns/bmm_pattern.py,sha256=6PYPyMz8dOVNYEKIIR67MvfdWL6TlF0xC8VnzsbHBLo,1272 +torch/_inductor/fx_passes/serialized_patterns/mm_pattern.py,sha256=MIExrwuf-ZmoMuOiUU3SENtMW8AjnW2yL9Q-kKsiqs0,1260 +torch/_inductor/fx_passes/split_cat.py,sha256=qskE44QMp00wd5C67fcgmGEZ0cJG5-wtN1vrmbR06tI,121453 +torch/_inductor/fx_utils.py,sha256=i5yLno_uqKyupCLJOpviSMG_R5rasej3JgupfFade2c,13288 +torch/_inductor/graph.py,sha256=AD-0M5cdZZVdVQXRh6JYvVdhbr3mWvoJB0neV8bLRQE,108932 +torch/_inductor/hooks.py,sha256=kUoOn0_wibHB8Cn9iSU427vUlTypKYh2J9DhwkKosEQ,666 +torch/_inductor/index_propagation.py,sha256=XtEUSs5gHBLGGsVvlak54gWEIqim7wixpdaenRup9LQ,13345 +torch/_inductor/inductor_prims.py,sha256=CoXn7cCQgeVswCaG9646e_V4PPUzpdqrQtRo1VOR3r0,7334 +torch/_inductor/invert_expr_analysis.py,sha256=zzvpawNHr5TZd8EDI5f8PEK_VilRXsOQ3Dq-J-kTWTU,6957 +torch/_inductor/ir.py,sha256=kO4nXO4s4L6CbNoejFYaCm9gol68VBgZGiuQO_sm_KE,350806 +torch/_inductor/jagged_lowerings.py,sha256=BCE6reigDKAjifO0AhJQaj0OxguhAb_l5vxaYyh43U8,9216 +torch/_inductor/kernel/__init__.py,sha256=4dfIYq5T99Rq8ncmT682RzjtYYLOYEwUVRzIbeyGysA,46 +torch/_inductor/kernel/__pycache__/__init__.cpython-310.pyc,, +torch/_inductor/kernel/__pycache__/bmm.cpython-310.pyc,, +torch/_inductor/kernel/__pycache__/conv.cpython-310.pyc,, +torch/_inductor/kernel/__pycache__/custom_op.cpython-310.pyc,, +torch/_inductor/kernel/__pycache__/mm.cpython-310.pyc,, +torch/_inductor/kernel/__pycache__/mm_common.cpython-310.pyc,, +torch/_inductor/kernel/__pycache__/mm_grouped.cpython-310.pyc,, +torch/_inductor/kernel/__pycache__/mm_plus_mm.cpython-310.pyc,, +torch/_inductor/kernel/bmm.py,sha256=tubPvBxU5mplGuB7jx6JBRfrejwQZUtFVuvpgmvNp9A,11545 +torch/_inductor/kernel/conv.py,sha256=oxdUNhzm8u8h_iVC7s7VF5WU-9PkCTzoPBV8B2fN-ic,21285 +torch/_inductor/kernel/custom_op.py,sha256=U_Lr1ALfZr9U8FDAZ3IMH-coWtdoTA6oDOr87CvlYnI,19515 +torch/_inductor/kernel/flex/__init__.py,sha256=_ca2fmTtYz5clo4uzQy2tbaLmypoau8LwEBJe8o5Kd0,153 +torch/_inductor/kernel/flex/__pycache__/__init__.cpython-310.pyc,, +torch/_inductor/kernel/flex/__pycache__/common.cpython-310.pyc,, +torch/_inductor/kernel/flex/__pycache__/flex_attention.cpython-310.pyc,, +torch/_inductor/kernel/flex/__pycache__/flex_cpu.cpython-310.pyc,, +torch/_inductor/kernel/flex/__pycache__/flex_decoding.cpython-310.pyc,, +torch/_inductor/kernel/flex/__pycache__/flex_flash_attention.cpython-310.pyc,, +torch/_inductor/kernel/flex/common.py,sha256=i4XwgbIlq-blBRD0PLwiPt-SSU_ID4zCC8Z5VFVFlOo,11495 +torch/_inductor/kernel/flex/flex_attention.py,sha256=c0_Ua1Kevs410IX5dPODxmizWYp0vA8F3J5LudmmUqA,33390 +torch/_inductor/kernel/flex/flex_cpu.py,sha256=SSPsqjoXsV94Fo278AJJESq40uYdSZrS-MTB4zWC-sc,11919 +torch/_inductor/kernel/flex/flex_decoding.py,sha256=U9GHqZMKo2SJn0lCkL0YyH9wvUrzNlA-iRF-mOTxEWI,15010 +torch/_inductor/kernel/flex/flex_flash_attention.py,sha256=czHXbumVY0vbG01MYiY-xgP0-ZlyUERZuxr8q7aJfFw,16036 +torch/_inductor/kernel/flex/templates/common.py.jinja,sha256=VZQCQm0Cu4dxH5kyzQvvFRrR2SPhZ8gU_K1PCB4NlbU,7040 +torch/_inductor/kernel/flex/templates/flash_attention.py.jinja,sha256=HHUpkg6MfXUEBD1Nl8C9ygwTIWPv1zqNRYgllRUkJ_o,2477 +torch/_inductor/kernel/flex/templates/flash_attention_backward.py.jinja,sha256=5w14W_J3Po855Zn5yF9T6QlSuAPY1Ml0jlgKpALtkIA,806 +torch/_inductor/kernel/flex/templates/flex_attention.py.jinja,sha256=Zebyz-qQYXWceQCtgck10QUfnKVbKz3w3utIZnHbs7M,8770 +torch/_inductor/kernel/flex/templates/flex_backwards.py.jinja,sha256=POlVawcyL6cHGjjAdyZucRNv4IQZNiWpXF-34GbJlC8,25422 +torch/_inductor/kernel/flex/templates/flex_decode.py.jinja,sha256=F4GT1h8FAnlx-bAmaoHXnV4hb4SGwYduV0ud_9qjiz8,10411 +torch/_inductor/kernel/flex/templates/utilities.py.jinja,sha256=0Siotkd0DpHO797fORLKuikl4zg68KG1ZzL-7Y-mm_0,2258 +torch/_inductor/kernel/mm.py,sha256=vWBaMDP3L1rSxkmsRCqKsM3TxiqQvrCclknzOvwoH9w,37037 +torch/_inductor/kernel/mm_common.py,sha256=fH2tXltjeQsuczRW4Z-bph4kTKEK3GZxyIXYxg-Xrm0,8078 +torch/_inductor/kernel/mm_grouped.py,sha256=m8mW8WCTaAtmSoSC2phmJ79Mi_tRYca1l46bfOeUFII,27504 +torch/_inductor/kernel/mm_plus_mm.py,sha256=DIeBrUHKoAVSqNrAIw5n43Jr5xH0DnyPVCiA79N2BbA,5897 +torch/_inductor/kernel/templates/cutedsl_mm_grouped.py.jinja,sha256=Y2Iuk0W5ax7bUBh4I-VFPvU0aoJ-ynoAQ5zZYhdJtbs,11483 +torch/_inductor/kernel/templates/triton_blackwell_ws_persistent_device_tma_mm.py.jinja,sha256=1ZHLycmtumFjTjl25zZuL20eN2q_pEHiZosxTeYmQYs,3736 +torch/_inductor/kernel/templates/triton_epilogue_scaled_mm.py.jinja,sha256=JXTThl6N5HITLRmLBltLFff-8zn85_NHJPcgpdl7kiQ,6128 +torch/_inductor/kernel/templates/triton_main_loop_scaled_mm.py.jinja,sha256=0UAR4fWRh_Aq9MRYoLtZvPfo7xDbKT217gBQsS_FUYU,6471 +torch/_inductor/kernel/templates/triton_mm.py.jinja,sha256=1LkKVLlg57P7Orskvg1D_Js8TWTFPs1EGHUI4JZJgjg,2798 +torch/_inductor/kernel/templates/triton_mm_rocm.py.jinja,sha256=NSU8eZbCmqE8NqD9R_WrlJqR9rTD2fHL2QpyYJAVfLg,2735 +torch/_inductor/kernel/templates/triton_persistent_tma_mm.py.jinja,sha256=q1YzMCUX5wZmdg36WcG7HMuhxKUys6Vw2fqJDdeFeHg,4511 +torch/_inductor/kernel/vendored_templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/_inductor/kernel/vendored_templates/__pycache__/__init__.cpython-310.pyc,, +torch/_inductor/kernel/vendored_templates/__pycache__/cutedsl_grouped_gemm.cpython-310.pyc,, +torch/_inductor/kernel/vendored_templates/cutedsl_grouped_gemm.py,sha256=vtuq4QVlCOMH0EbiRPlVx6pZQWUX8LDZ7z_zhg-DSmc,94673 +torch/_inductor/kernel_inputs.py,sha256=trJZKFzU63igNg59YT26LBGHPIqxwbGkKJFmNB3vOyA,10821 +torch/_inductor/kernel_template_choice.py,sha256=gSDgoMavdGeWo_j2pWq83N2x3voKzU1Y_ELaU3Pord8,3363 +torch/_inductor/lookup_table/__init__.py,sha256=grqROhCd6DpGiI-5pQ0zDqm9wDL0-7uwQJGQXzqYoKI,877 +torch/_inductor/lookup_table/__pycache__/__init__.cpython-310.pyc,, +torch/_inductor/lookup_table/__pycache__/choices.cpython-310.pyc,, +torch/_inductor/lookup_table/choices.py,sha256=IWm5VUJfG4agWhDB0OoMczxuEAAycnBDsTNBFk5KYGM,16073 +torch/_inductor/loop_body.py,sha256=fTreiFk9iXTeT9kdhgpoHlmTIL8lbyxkWL4ViixZlJw,27012 +torch/_inductor/lowering.py,sha256=wmK9WoJh-0vuJUZwVjdU92Mh_Cu_0naUHV4lRdydxcw,252529 +torch/_inductor/memory.py,sha256=eMJFToy2jwi_Y9d2LiB9MMFgoW9BxSpZPJc_n1dBDC0,40786 +torch/_inductor/metrics.py,sha256=lqgDy2FOJf3sAmvH_7PoOr7naSg0nIWn7tSoMZcDrJ4,14602 +torch/_inductor/mkldnn_ir.py,sha256=mj9qQLVEFP0yGJUkRU7qHlhoxXBmekqwHPpFJ4iZfwc,43615 +torch/_inductor/mkldnn_lowerings.py,sha256=I5R1FNkByZ8j6rqqXOCMxMDQ1Tb0LdygukmwmQ1bLWQ,57059 +torch/_inductor/mock_cache.py,sha256=-0lzfa5fWRZAK_k3P4bYbbxyWaQCDNryul18tKr1THU,8587 +torch/_inductor/ops_handler.py,sha256=z3uiIsky0wmvTnACT79QyzjvIZdRswgDT3RUgezO6A4,36258 +torch/_inductor/optimize_indexing.py,sha256=KdIFrlHwny2NlrQoiMp5G1fm0e-EwZEzzQ0tNXA4nXM,4135 +torch/_inductor/output_code.py,sha256=9YJ6zDaOXiQS48gYdXf4H7AeGfiEGSDGcjTqQxX8KIg,39953 +torch/_inductor/package/__init__.py,sha256=s1BQDRTTu4baQTZPdR07q8CBO_b5kUpXEp5VawAeQQI,67 +torch/_inductor/package/__pycache__/__init__.cpython-310.pyc,, +torch/_inductor/package/__pycache__/build_package.cpython-310.pyc,, +torch/_inductor/package/__pycache__/package.cpython-310.pyc,, +torch/_inductor/package/build_package.py,sha256=ZS3248m9MtGnCGG0YWrne2y7FDTIoF2ZWmKdxvIRzMg,329 +torch/_inductor/package/package.py,sha256=Wy03oSuOkzWpMX6mC8AJv116hh_l4-T6_FJSAiNJvHk,4427 +torch/_inductor/pattern_matcher.py,sha256=-qwbZhVXlFMO2gHanGDcVg1tjqZv7q9O6J9uUeyrVGA,84543 +torch/_inductor/quantized_lowerings.py,sha256=wiY6nBqqia17Sd2RRxv30NNo4p98A-q8GDhCYFdkFmg,5728 +torch/_inductor/remote_cache.py,sha256=Q356V9Vmhxh205OA62dI06onOiDfGew3devA7Lc3P64,13343 +torch/_inductor/remote_gemm_autotune_cache.py,sha256=1ixVIU_KN1XNTBGZuJolUfaJWClQJUURc9nghIp-kAk,551 +torch/_inductor/rocm_multiarch_utils.py,sha256=q3Sp18Y37W75_MGec6p40w8lYq6SKwISJnnSaJd_q5Q,7509 +torch/_inductor/runtime/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/_inductor/runtime/__pycache__/__init__.cpython-310.pyc,, +torch/_inductor/runtime/__pycache__/autotune_cache.cpython-310.pyc,, +torch/_inductor/runtime/__pycache__/benchmarking.cpython-310.pyc,, +torch/_inductor/runtime/__pycache__/cache_dir_utils.cpython-310.pyc,, +torch/_inductor/runtime/__pycache__/compile_tasks.cpython-310.pyc,, +torch/_inductor/runtime/__pycache__/coordinate_descent_tuner.cpython-310.pyc,, +torch/_inductor/runtime/__pycache__/debug_utils.cpython-310.pyc,, +torch/_inductor/runtime/__pycache__/halide_helpers.cpython-310.pyc,, +torch/_inductor/runtime/__pycache__/hints.cpython-310.pyc,, +torch/_inductor/runtime/__pycache__/runtime_utils.cpython-310.pyc,, +torch/_inductor/runtime/__pycache__/static_cuda_launcher.cpython-310.pyc,, +torch/_inductor/runtime/__pycache__/triton_compat.cpython-310.pyc,, +torch/_inductor/runtime/__pycache__/triton_helpers.cpython-310.pyc,, +torch/_inductor/runtime/__pycache__/triton_heuristics.cpython-310.pyc,, +torch/_inductor/runtime/autotune_cache.py,sha256=ntnTQnsRe86I1ylvq7u24NOvDis0crUEJVKKtq5J4Kg,23066 +torch/_inductor/runtime/benchmarking.py,sha256=VyjGuWj2hPkbiCsORlmc3DpC8PitoqnwE0pZuHoBfGQ,17566 +torch/_inductor/runtime/cache_dir_utils.py,sha256=VMMt-78VVHpAE90lDR7cNBLc9pxE3mE5pFuhGnyh1V0,1444 +torch/_inductor/runtime/caching/__init__.py,sha256=CYXDliZmTHOSnjEE_-7mZiRKzDggp2z-Az_2DNBLKNw,2404 +torch/_inductor/runtime/caching/__pycache__/__init__.cpython-310.pyc,, +torch/_inductor/runtime/caching/__pycache__/config.cpython-310.pyc,, +torch/_inductor/runtime/caching/__pycache__/context.cpython-310.pyc,, +torch/_inductor/runtime/caching/__pycache__/exceptions.cpython-310.pyc,, +torch/_inductor/runtime/caching/__pycache__/implementations.cpython-310.pyc,, +torch/_inductor/runtime/caching/__pycache__/interfaces.cpython-310.pyc,, +torch/_inductor/runtime/caching/__pycache__/locks.cpython-310.pyc,, +torch/_inductor/runtime/caching/__pycache__/utils.cpython-310.pyc,, +torch/_inductor/runtime/caching/config.py,sha256=9pF1b731zbrxHNkdLE8phiKloEsHc1UaWrai9fTntr0,5455 +torch/_inductor/runtime/caching/context.py,sha256=qvnVT6UgaKembtliPzfuAdHew7F-I2LSANkgVOeIrNc,10315 +torch/_inductor/runtime/caching/exceptions.py,sha256=F7vVsFe5ADOeTuNtRc0zxRItioFw_N60QUI-QEFMrlE,5967 +torch/_inductor/runtime/caching/implementations.py,sha256=bd0Dn7Iv_XHbvUt4qzm0tqPx9e_8m8zhmXrzvNaV7o4,13691 +torch/_inductor/runtime/caching/interfaces.py,sha256=mMREFtpFoakxs0uYIFd8CTqNJeqGtiIMd9YpTwtqbp0,30832 +torch/_inductor/runtime/caching/locks.py,sha256=uQNvWVRUu79vRq8gqimhn4QsJHJMwPgoQUYckdYAoyM,7511 +torch/_inductor/runtime/caching/utils.py,sha256=O4qbydarLZWMrW53OC1TIj73rOfAiLpTrsNBTSgP3dY,3432 +torch/_inductor/runtime/compile_tasks.py,sha256=iejmUmIcnqi-O8dVqZnrCklnBWnHFzvqbGeI5ax0a-A,2300 +torch/_inductor/runtime/coordinate_descent_tuner.py,sha256=rFSqCsUNe5dQ_JZREUNZwjmHzZILkSkBiRra2TEKc0c,14237 +torch/_inductor/runtime/debug_utils.py,sha256=bzIPymkfFZyxIsso-rWAj7vtzOKGhX1Kjmq-3UwH6B4,4275 +torch/_inductor/runtime/halide_helpers.py,sha256=PFJ3PZNXkdinWPAjB6LuKOH4vd2uPKMO2G8X3iSvvr8,3542 +torch/_inductor/runtime/hints.py,sha256=LQR43mO8x20YdlhDdj4n76gYSQBS1k6QPbLL63GSEso,7167 +torch/_inductor/runtime/runtime_utils.py,sha256=S707r1DPpb_en_CM9TTMnwdGXCC25ZGSgT5QWk6EVy4,6965 +torch/_inductor/runtime/static_cuda_launcher.py,sha256=hcnHv7xLmP0hWvZE-AAfNQfjB5kAE-Yd-Uc42u9J3h8,10928 +torch/_inductor/runtime/triton_compat.py,sha256=HCZKwfcyVu2BPqW8U3m36CWcYGruv62oMD7FEq8zNAc,4375 +torch/_inductor/runtime/triton_helpers.py,sha256=QlLTb-3cr8oMao7Yx6zPAxHwrZvqCA_miFzwSscUlHc,23989 +torch/_inductor/runtime/triton_heuristics.py,sha256=1zDSXD8PDiVZbOjEfadAmS14PeowFS_vYGCT_iwoQ0E,144399 +torch/_inductor/scheduler.py,sha256=3fGzsn-tPrDo6-RUupDZDasJ9y63ig4AccUpzmAmaCU,256935 +torch/_inductor/script.ld,sha256=pYkdES4_8MJi9MkEF79gr1KFT4iPUvbMT7NlDWP7aec,430 +torch/_inductor/select_algorithm.py,sha256=2GZcM8DrlC5y68w3kEcOu8lgnB8MMyC_ghEtY1l6wXw,170385 +torch/_inductor/shape_propagation.py,sha256=Mi8gO_mJHWmvmjC-jwviE4A-47pp0kFPxcR0kCQmu_s,4565 +torch/_inductor/sizevars.py,sha256=UkduwIfRJ_8hourh3KVxGoja2Z-m-HSGDZnrvNmOXuY,47285 +torch/_inductor/standalone_compile.py,sha256=zW3OFhP13AZGk4c8vbZc86RIVYJk5xD7oKYAUBfw5rg,16664 +torch/_inductor/subgraph_lowering.py,sha256=Cs2AP0KGk54RsO4BCE2gZf3v5QI-DtKTrjlwfz8ppkA,7312 +torch/_inductor/template_heuristics/__init__.py,sha256=CMgNcjx9Jd5Z6TXflvEVB3bb1ZOTpIIUonRaaNj0TU4,319 +torch/_inductor/template_heuristics/__pycache__/__init__.cpython-310.pyc,, +torch/_inductor/template_heuristics/__pycache__/aten.cpython-310.pyc,, +torch/_inductor/template_heuristics/__pycache__/base.cpython-310.pyc,, +torch/_inductor/template_heuristics/__pycache__/contiguous_mm.cpython-310.pyc,, +torch/_inductor/template_heuristics/__pycache__/cutedsl.cpython-310.pyc,, +torch/_inductor/template_heuristics/__pycache__/decompose_k.cpython-310.pyc,, +torch/_inductor/template_heuristics/__pycache__/gemm.cpython-310.pyc,, +torch/_inductor/template_heuristics/__pycache__/params.cpython-310.pyc,, +torch/_inductor/template_heuristics/__pycache__/registry.cpython-310.pyc,, +torch/_inductor/template_heuristics/__pycache__/triton.cpython-310.pyc,, +torch/_inductor/template_heuristics/__pycache__/triton_addmm.cpython-310.pyc,, +torch/_inductor/template_heuristics/aten.py,sha256=cr-45ec1eucZbEVcF6e-tOWvay69y9A-G1DJRrqjiIs,2879 +torch/_inductor/template_heuristics/base.py,sha256=mTxhZaLAmWKVeGjIMeUfNBPOO7liEKJYw8-JRgEio-w,2497 +torch/_inductor/template_heuristics/contiguous_mm.py,sha256=jQg313JcP2DeekcygTozWG9Lkpf69qCoHPVCCTIL77I,2232 +torch/_inductor/template_heuristics/cutedsl.py,sha256=2s0YcvzfF0TMtDGjVPNma0x-tmD-ZCsB127qHVfkdmU,4455 +torch/_inductor/template_heuristics/decompose_k.py,sha256=cnQFdKkFtvtBcyJMtnN_3AZ5nFo306NLrTUs0CjBBKA,2382 +torch/_inductor/template_heuristics/gemm.py,sha256=MULIGFXVMRAncb638ftAP57myYNIoPkHXBEyW983N2A,540 +torch/_inductor/template_heuristics/params.py,sha256=shqTLFkq9Od8WGcRyXI-PSM7hwSmbKEgeArhsQWOSNk,1257 +torch/_inductor/template_heuristics/registry.py,sha256=8kz8muEh3idQI2BqP_sR8u4pxXQCzeBm2-6PWfkprEs,6041 +torch/_inductor/template_heuristics/triton.py,sha256=mLTnvnipw9iHj9usksAToGje7-75foGJvu7k0nkDdeo,98575 +torch/_inductor/template_heuristics/triton_addmm.py,sha256=tqFmxlatf62RUGUxJvARqYANedz9KyoxUtG5cPQh1Uo,1085 +torch/_inductor/test_case.py,sha256=y72efomSzQANgJQ9MIMw3UuO7DQY5uPD1ObgDq4p4zo,1475 +torch/_inductor/test_operators.py,sha256=0qiHRxRoouHirpj13eTQJyWqYgzEmvjj2aWasALEV3k,861 +torch/_inductor/tiling_utils.py,sha256=V7wVMyiZ0qd1_HIk22so7GnHqeqr5BoJ6NQsXKLve4w,27625 +torch/_inductor/triton_bundler.py,sha256=yAoEo7WPw2KkRUlqJlaO_YHYeTfswwYy2Rn3xBM_9X0,15987 +torch/_inductor/utils.py,sha256=Pxu6T1AP9IrDehycpqX2GiKRxW8S74GXAF9d2nSFlBM,138210 +torch/_inductor/virtualized.py,sha256=PSeV3B5hzMXN8vdjhBLeyhLsTbCuAcqFItHmZzGaLYA,15388 +torch/_inductor/wrapper_benchmark.py,sha256=uJd3M7sbC0dOCkHDHaqYPsmkhpAsGOBejlqydzOW0Y0,16431 +torch/_jit_internal.py,sha256=9LgxHsi8v7oHsYS-wv4s_NW3u6ChYGDtVPX3ufAHh1o,53532 +torch/_lazy/__init__.py,sha256=F0lAsONCnXzChhzI8m2QTyNg7WFrXHak0C38ZsPW2SI,1793 +torch/_lazy/__pycache__/__init__.cpython-310.pyc,, +torch/_lazy/__pycache__/closure.cpython-310.pyc,, +torch/_lazy/__pycache__/computation.cpython-310.pyc,, +torch/_lazy/__pycache__/config.cpython-310.pyc,, +torch/_lazy/__pycache__/debug.cpython-310.pyc,, +torch/_lazy/__pycache__/device_context.cpython-310.pyc,, +torch/_lazy/__pycache__/extract_compiled_graph.cpython-310.pyc,, +torch/_lazy/__pycache__/ir_cache.cpython-310.pyc,, +torch/_lazy/__pycache__/metrics.cpython-310.pyc,, +torch/_lazy/__pycache__/tensor_factory_functions.cpython-310.pyc,, +torch/_lazy/__pycache__/ts_backend.cpython-310.pyc,, +torch/_lazy/closure.py,sha256=voTi6I0ehDDCoVlRc0BZsqHKsSmc97qG1-y0suptqGE,5677 +torch/_lazy/computation.py,sha256=qGyb2-6Mk9HtK1ekYjC-RaRAFG8sUEAazCoO4BuCM1U,919 +torch/_lazy/config.py,sha256=-3YMuc6MvZef7TCPIX4J-MtrHwXVsrHPKZDvdCQ6iYM,448 +torch/_lazy/debug.py,sha256=LOZyiVd9aFg1xYiUwq-FKA1jMxuGDyU0KcTpor81r1s,738 +torch/_lazy/device_context.py,sha256=0KTBJL_7TjdNIQuY-d4OtcIpD00-1yVHHeAyeDNM9lQ,681 +torch/_lazy/extract_compiled_graph.py,sha256=NXXzMrdZAAFRhLunKgettydRT9WJfwgfm0GC2AjK5rE,8453 +torch/_lazy/ir_cache.py,sha256=HcW7N_L3ff-7_dDnpTsuh0ZQHWU-CSkawOriqQQCoL4,348 +torch/_lazy/metrics.py,sha256=emYDBgpRK4nYV8b5miNCvEB0ses4DQkq4cBTVhGjQ5E,545 +torch/_lazy/tensor_factory_functions.py,sha256=_vbfXc_XMUD6dXa3dP-BHlwmc1nWhnZ5R1SkY9sIZ98,1368 +torch/_lazy/ts_backend.py,sha256=BfAAT0WhImXNRhQp3Pfbp1tLuKuy7UBt4OziWTEYi9o,163 +torch/_library/__init__.py,sha256=nrHN83rXP5crQ0OeQiDyqXNcyoctiW-5dOFVAPArtzs,269 +torch/_library/__pycache__/__init__.cpython-310.pyc,, +torch/_library/__pycache__/autograd.cpython-310.pyc,, +torch/_library/__pycache__/custom_ops.cpython-310.pyc,, +torch/_library/__pycache__/effects.cpython-310.pyc,, +torch/_library/__pycache__/fake_class_registry.cpython-310.pyc,, +torch/_library/__pycache__/fake_impl.cpython-310.pyc,, +torch/_library/__pycache__/fake_profile.cpython-310.pyc,, +torch/_library/__pycache__/infer_schema.cpython-310.pyc,, +torch/_library/__pycache__/opaque_object.cpython-310.pyc,, +torch/_library/__pycache__/simple_registry.cpython-310.pyc,, +torch/_library/__pycache__/triton.cpython-310.pyc,, +torch/_library/__pycache__/utils.cpython-310.pyc,, +torch/_library/autograd.py,sha256=9FKXuHtCBtbOIAMthH0YFICNpEzBUNDl0ZfITaw54g0,8786 +torch/_library/custom_ops.py,sha256=PzGbt6dZPDM-XDHRKA1y_sGQCmca3p2xkmfhu92Qjg4,38452 +torch/_library/effects.py,sha256=29HWQhYrgew40cVN_hPYlBDnmlYuJ-6XEPGfwJbcsEg,2778 +torch/_library/fake_class_registry.py,sha256=pgS30HsnVienFpKko0SQgObN0hcCBAISFJR3FYR-zag,16281 +torch/_library/fake_impl.py,sha256=gDzyFKVNFFgDriJJzNUSlX4RL2wIghUUrjmsLXLR6r8,8772 +torch/_library/fake_profile.py,sha256=cdNLwF2KrAPSjVbdDg2DZR_y5g_OrPCC7eHmxRg65es,11491 +torch/_library/infer_schema.py,sha256=YaK4asaObzw-LXW6vRRiNTpBiqu4X6PiJh6khd4D8wU,13741 +torch/_library/opaque_object.py,sha256=e2vMmbs4eFquLjHRucO6XkGGems6S_nEFkNVXmurRMs,7011 +torch/_library/simple_registry.py,sha256=7YWdiX5DNKwoNoFTJKfo2ana4rCuJjQVgGfzy4PaTFY,2949 +torch/_library/triton.py,sha256=JosUJxQ_VYHaM_X8MM2-KoQM84PH-nZky2iR3qg-NgA,15337 +torch/_library/utils.py,sha256=U86Cf0_lyD4cyBRh1baHEE3EYu3ZiT_Q8p1gj6nXzns,22377 +torch/_linalg_utils.py,sha256=Q2UhuVexGLubUoqrPJZTOn5lZerPgnwkVwjSXBrMqQ0,5199 +torch/_lobpcg.py,sha256=kLFLJTe4NbkX7cPph7z8i8RgvZnvUBv4oNHuPpPV9j0,43584 +torch/_logging/__init__.py,sha256=wTE40MPYVeohdWbp_5z_a3QBDWUYOLV_CSd0MuwP9pc,818 +torch/_logging/__pycache__/__init__.cpython-310.pyc,, +torch/_logging/__pycache__/_internal.cpython-310.pyc,, +torch/_logging/__pycache__/_registrations.cpython-310.pyc,, +torch/_logging/__pycache__/scribe.cpython-310.pyc,, +torch/_logging/__pycache__/structured.cpython-310.pyc,, +torch/_logging/_internal.py,sha256=zOSGJd81ZHbwxptaeK0JHpcKJDy4746JfZUUZyZMZQA,51966 +torch/_logging/_registrations.py,sha256=rZWn7NQ083TsIvQ9VPLa7CTR-Xluwaw6jqS0hyq6_5s,8341 +torch/_logging/scribe.py,sha256=VTesctXGAzAKxZ6_-4EC-0c5DwC3HwTMoG_yaJAVbNU,2576 +torch/_logging/structured.py,sha256=UZYaUfy8ZMfT-m3-cTotemk4doVqwDcNbgXQG25sMBY,2922 +torch/_lowrank.py,sha256=eBhxRMhfi9L1h_LVjrzulAJEBHwTKzBQe_AprNFtvUg,10497 +torch/_meta_registrations.py,sha256=FjNNrkJnPgAzcohZh5aDJwO0XZNB5N3xNscPbOYYP94,270482 +torch/_namedtensor_internals.py,sha256=CMgdQl-RJDFXZz_TOsuGIrMoxdszASwnIfpYjDkB8as,5276 +torch/_numpy/__init__.py,sha256=_Jxx8XlO6rLDkI0bP7kYY_JLbYI8kVA3eFfjesMk-qg,590 +torch/_numpy/__pycache__/__init__.cpython-310.pyc,, +torch/_numpy/__pycache__/_binary_ufuncs_impl.cpython-310.pyc,, +torch/_numpy/__pycache__/_casting_dicts.cpython-310.pyc,, +torch/_numpy/__pycache__/_dtypes.cpython-310.pyc,, +torch/_numpy/__pycache__/_dtypes_impl.cpython-310.pyc,, +torch/_numpy/__pycache__/_funcs.cpython-310.pyc,, +torch/_numpy/__pycache__/_funcs_impl.cpython-310.pyc,, +torch/_numpy/__pycache__/_getlimits.cpython-310.pyc,, +torch/_numpy/__pycache__/_ndarray.cpython-310.pyc,, +torch/_numpy/__pycache__/_normalizations.cpython-310.pyc,, +torch/_numpy/__pycache__/_reductions_impl.cpython-310.pyc,, +torch/_numpy/__pycache__/_ufuncs.cpython-310.pyc,, +torch/_numpy/__pycache__/_unary_ufuncs_impl.cpython-310.pyc,, +torch/_numpy/__pycache__/_util.cpython-310.pyc,, +torch/_numpy/__pycache__/fft.cpython-310.pyc,, +torch/_numpy/__pycache__/linalg.cpython-310.pyc,, +torch/_numpy/__pycache__/random.cpython-310.pyc,, +torch/_numpy/_binary_ufuncs_impl.py,sha256=h_xCtCyRAdTEB2T_r0AZ25G7u9IM3PRPr1mVv8Cr0qY,1871 +torch/_numpy/_casting_dicts.py,sha256=EmT0GYUz7Ii1iT1prWZgsahqtZZ069I1O0T2pzhSlOE,42478 +torch/_numpy/_dtypes.py,sha256=m3UM7nb7RFXlHSbtbv1GAu0c8AD4I4Uc1Rn40s1iLQ0,10279 +torch/_numpy/_dtypes_impl.py,sha256=dYClT85cdx_gKHIzllzGjnhzWKB5BoyIETaBTICA31I,5909 +torch/_numpy/_funcs.py,sha256=vT_F_qnfL3CJoZr_R1NEHvETRCnIoEOrNGXVP5o-5aM,2097 +torch/_numpy/_funcs_impl.py,sha256=b4IwhZtjtrK4YARojFT5-Z8VAIAaboYgMcIHHzkpCf0,59330 +torch/_numpy/_getlimits.py,sha256=QRUbPnrehERJA9Wk01SdUaF1F2FhksfgpewYN6SmtgE,269 +torch/_numpy/_ndarray.py,sha256=BWePFp77ay9zYwXj9oVLhXYXLVsic6h5b-6IKeznNrw,21362 +torch/_numpy/_normalizations.py,sha256=DMgi0LFiNtGLrCYD6xlR37X6QhMbxao9f1vBMxpLfqc,8731 +torch/_numpy/_reductions_impl.py,sha256=bluuad84fP3GSfNYOB87Q5UvRbNB4_KOCjrxSumTJQ4,11800 +torch/_numpy/_ufuncs.py,sha256=CJoWG7TWKRZ2tM7JV3qsZXpAYlB2iRzfogs7721xGl0,8366 +torch/_numpy/_unary_ufuncs_impl.py,sha256=IO2kPjYhNoKCyu_9NcMFQF57le1U9VjFmqQFbsWA3Jc,1161 +torch/_numpy/_util.py,sha256=Vj_GBDdnrRWBW-k8qyv_qJWVtaS9UIw-JsPr-l4d20Q,7725 +torch/_numpy/fft.py,sha256=lqeN-889bRRT8VjzgAaXoK9aAz8wdQdoiUSVN-oIhRQ,2805 +torch/_numpy/linalg.py,sha256=0YwsdXjndqqifpznxyxzU9ki7aQi5q3vZRrMK41Nsgw,5648 +torch/_numpy/random.py,sha256=fJqQhh-mY3UIb6dcg_hm3D2_texvEY9a0Z1otGTUzPo,4651 +torch/_numpy/testing/__init__.py,sha256=t5Re9c4lijwKoegYKS74CFviLCfSDSWZMvw78ohKYss,375 +torch/_numpy/testing/__pycache__/__init__.cpython-310.pyc,, +torch/_numpy/testing/__pycache__/utils.cpython-310.pyc,, +torch/_numpy/testing/utils.py,sha256=Fh4lnsOmXj3aSoZfrLz7PjKJoWrnnMRFwKt96rPj-vw,77296 +torch/_ops.py,sha256=DkrQ60J8vcxwf4brOUm0nzrp0ZqnPiN0XTHKNOPJKKc,60733 +torch/_prims/__init__.py,sha256=jBkwc7-2QYHbPSLT_rxlQfPI1eHVVpcPm-RPeuORFy4,82620 +torch/_prims/__pycache__/__init__.cpython-310.pyc,, +torch/_prims/__pycache__/context.cpython-310.pyc,, +torch/_prims/__pycache__/debug_prims.cpython-310.pyc,, +torch/_prims/__pycache__/executor.cpython-310.pyc,, +torch/_prims/__pycache__/rng_prims.cpython-310.pyc,, +torch/_prims/context.py,sha256=wMn_9XZQqJw7JOoV6d5bCSYXSQQyEvsItLi-HOpfXTY,6248 +torch/_prims/debug_prims.py,sha256=5gumeEOOwyTygdIn4EZiuHvoOoC3rmXGVNDGlduQ6MI,2081 +torch/_prims/executor.py,sha256=6qVwYXMvV0rAsvRa4hpW3bZ7X4Pem4mzGNRWpjgtij8,1923 +torch/_prims/rng_prims.py,sha256=pBeJxLzs45qy-Zq2J0quegoaGn5MetqXmmHPF-V_rAk,14579 +torch/_prims_common/__init__.py,sha256=yBqLvHC8GOb4ntlg9LLukflMhME9d01RBzh4MSd5vrw,71953 +torch/_prims_common/__pycache__/__init__.cpython-310.pyc,, +torch/_prims_common/__pycache__/wrappers.cpython-310.pyc,, +torch/_prims_common/wrappers.py,sha256=tBWXUz2KRWF1hjb1l_i0SOOLlDYISaYxVKpoSBM9S5E,18789 +torch/_python_dispatcher.py,sha256=tuIlb49DqVSQW8fC4wYUrMYfpou5q_-AR_O47jTElgM,7137 +torch/_refs/__init__.py,sha256=qDboiUpKb85_Vm0uae6OQmkGmOcDgU1ghZFLwJINRGI,223284 +torch/_refs/__pycache__/__init__.cpython-310.pyc,, +torch/_refs/__pycache__/_conversions.cpython-310.pyc,, +torch/_refs/__pycache__/fft.cpython-310.pyc,, +torch/_refs/_conversions.py,sha256=BkNyamBLOQLlKy6mB4BSdPRjAKP1ghZ5xcyQDkUs-_s,3533 +torch/_refs/fft.py,sha256=lR2c2WBJxf2QwiD1uDj5DgWRypP4FE1dwNyqGO9A3vk,17980 +torch/_refs/linalg/__init__.py,sha256=SAeQOYBVesMajras-YGGmutq2jn5dJBxgU84HlV0wkU,14447 +torch/_refs/linalg/__pycache__/__init__.cpython-310.pyc,, +torch/_refs/nn/__init__.py,sha256=juqd9PbXs4yg45zMJ7BHAOPQjb7sgEbWE9InBtGZhfo,24 +torch/_refs/nn/__pycache__/__init__.cpython-310.pyc,, +torch/_refs/nn/functional/__init__.py,sha256=DnGkK8QUnWijRxGL0xULOGkXNN-T5bsMHftvl-W_0W0,42729 +torch/_refs/nn/functional/__pycache__/__init__.cpython-310.pyc,, +torch/_refs/special/__init__.py,sha256=3riSrYP01ZEWn4Ce3_HJ3bGN1DQGNy61xUeHTb7t_AA,6916 +torch/_refs/special/__pycache__/__init__.cpython-310.pyc,, +torch/_size_docs.py,sha256=z2Ckk4Ufq-Ek6Av1-rs1Wcrg6OoJxTCRPYjEjhzG1Xo,900 +torch/_sources.py,sha256=qnTfAX_mWhAQ5cMVJYYWDOK1o1LoepbMllA1FIxIFRY,4404 +torch/_storage_docs.py,sha256=KyxMZ6j9UPSolidRjR7WDu7gJWkYot8TFggfPA1fygI,1335 +torch/_streambase.py,sha256=NAKZfV-BhZ22Jyt_3VQDH1m4QQdIVc4G8VvUBkZ9wJ8,435 +torch/_strobelight/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/_strobelight/__pycache__/__init__.cpython-310.pyc,, +torch/_strobelight/__pycache__/cli_function_profiler.cpython-310.pyc,, +torch/_strobelight/__pycache__/compile_time_profiler.cpython-310.pyc,, +torch/_strobelight/cli_function_profiler.py,sha256=ULA7HwMoCQ3ezOrpiv9bZzSAjATnSJs-5QeTM8EKPbs,11819 +torch/_strobelight/compile_time_profiler.py,sha256=BctH1WQp-X6IahXC-PFZw-lTY8WbsELXGL2PBG8dg5s,7565 +torch/_subclasses/__init__.py,sha256=7NDSoV4xw-GxCRtHasX_MFFLe_S1-1BHRFvoDcgE4J0,375 +torch/_subclasses/__pycache__/__init__.cpython-310.pyc,, +torch/_subclasses/__pycache__/_fake_tensor_utils.cpython-310.pyc,, +torch/_subclasses/__pycache__/fake_impls.cpython-310.pyc,, +torch/_subclasses/__pycache__/fake_tensor.cpython-310.pyc,, +torch/_subclasses/__pycache__/fake_utils.cpython-310.pyc,, +torch/_subclasses/__pycache__/functional_tensor.cpython-310.pyc,, +torch/_subclasses/__pycache__/meta_utils.cpython-310.pyc,, +torch/_subclasses/__pycache__/schema_check_mode.cpython-310.pyc,, +torch/_subclasses/_fake_tensor_utils.py,sha256=Gns1nXMXIqSGRswyUxFh0meRhcr6moEvxxEmSLPk8lw,8858 +torch/_subclasses/complex_tensor/__init__.py,sha256=XR7PLtAI6NSJlcrlloNyijyfO-ExZaMyiF0-m-x-0mI,277 +torch/_subclasses/complex_tensor/__pycache__/__init__.cpython-310.pyc,, +torch/_subclasses/complex_tensor/__pycache__/_core.cpython-310.pyc,, +torch/_subclasses/complex_tensor/_core.py,sha256=pjDyuHLSc2pucjvv_TRgjYJ2QN__QLvpUIcULNVHfo4,5074 +torch/_subclasses/complex_tensor/_ops/__init__.py,sha256=DtdL96mlaWM6COV7bXMMNvXdQC3brGUtZXgni8oVhRo,155 +torch/_subclasses/complex_tensor/_ops/__pycache__/__init__.cpython-310.pyc,, +torch/_subclasses/complex_tensor/_ops/__pycache__/aten.cpython-310.pyc,, +torch/_subclasses/complex_tensor/_ops/__pycache__/common.cpython-310.pyc,, +torch/_subclasses/complex_tensor/_ops/__pycache__/prims.cpython-310.pyc,, +torch/_subclasses/complex_tensor/_ops/aten.py,sha256=SmbNyvO77dBI1rMRk_L_M6qD0p_e1KJHi-_dwP8fWTk,28481 +torch/_subclasses/complex_tensor/_ops/common.py,sha256=sBjJDGMKHAMmtF1R9zOUhAoS2vIWxUAPvEOEnjoCGQ4,9600 +torch/_subclasses/complex_tensor/_ops/prims.py,sha256=qEqDoFU20-woc8B-DE9f-iKvA7-TPBxgQtUTB1QD0h0,864 +torch/_subclasses/fake_impls.py,sha256=LLtjyj8s7Ftf1IXs1rnl0CgfxDXguA2hgUqCpUGURDw,49018 +torch/_subclasses/fake_tensor.py,sha256=WKhQi9crQ2aLW0JHfE62n-WcrrGbuKe0OnnamkJxxwU,136166 +torch/_subclasses/fake_utils.py,sha256=7bdAixuw0t0WJbcANmC52wj2sqS9tB0QpCtVR3tY-fg,10311 +torch/_subclasses/functional_tensor.py,sha256=wZSYVPu_05zPH3yUZAI9sAUSADhvrhN1ZbWPfhHLjy4,37906 +torch/_subclasses/meta_utils.py,sha256=UHOT1fsF358ZZX9hyFZGwUsFNwBzfl0A6iZf7gKbzbM,88852 +torch/_subclasses/schema_check_mode.py,sha256=NpdYMDSqLwQAFGfRG9Jb9KBSdco7wUlNlZMFXHYiytw,8639 +torch/_tensor.py,sha256=9xdAUfvCtnxTTsdOyx7DykafbC2CE5PigJxg_zWkuAw,76285 +torch/_tensor_docs.py,sha256=rKQ1w7kqFZ-yYV1dJJlyFZdUL0RlI1Y063gXs4WSXJc,145257 +torch/_tensor_str.py,sha256=wmcQaWBgGAfSLytdxKQO4MJ4volT8y8MAYpbTe849bk,28387 +torch/_thread_safe_fork.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/_torch_docs.py,sha256=V_BvC4UOicxSyOdR-F8Vf32MUUqI3n71iFvJfbCSPpE,435608 +torch/_utils.py,sha256=BToMNbHEmoJESux_LJ4TxPZbkNom81MI1zpeWYywre0,40842 +torch/_utils_internal.py,sha256=sphU1qpozMzC6JE7nY9KSUmJvRYPCbT-qm_B1HhmKJE,11554 +torch/_vendor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/_vendor/__pycache__/__init__.cpython-310.pyc,, +torch/_vendor/packaging/__init__.py,sha256=EhCMuCSz60IgQJ93b_4wJyAoHpU9J-uddG4QaMT0Pu4,496 +torch/_vendor/packaging/__pycache__/__init__.cpython-310.pyc,, +torch/_vendor/packaging/__pycache__/_structures.cpython-310.pyc,, +torch/_vendor/packaging/__pycache__/version.cpython-310.pyc,, +torch/_vendor/packaging/_structures.py,sha256=q3eVNmbWJGG_S0Dit_S3Ao8qQqz_5PYTXFAKBZe5yr4,1431 +torch/_vendor/packaging/version.py,sha256=XjRBLNK17UMDgLeP8UHnqwiY3TdSi03xFQURtec211A,16236 +torch/_vmap_internals.py,sha256=snAmSMoKFr4LrkcZqTNTwkt01RRF-06_38WE8792d4s,9425 +torch/_weights_only_unpickler.py,sha256=CQaxY6MtEi5f3qAuh0eCknujIBr9RO4aJy_3CgG6ZwA,22884 +torch/accelerator/__init__.py,sha256=AHH1fP1ThjmAslKw5vBksL_mNbR80KzLh8yweskMFIo,10776 +torch/accelerator/__pycache__/__init__.cpython-310.pyc,, +torch/accelerator/__pycache__/_utils.cpython-310.pyc,, +torch/accelerator/__pycache__/memory.cpython-310.pyc,, +torch/accelerator/_utils.py,sha256=Qw0FIL4j__H_UNaMcaQ5LJAKd4VSF09LWqBrMHxhfTk,936 +torch/accelerator/memory.py,sha256=gChxRBGBg1YHuPK0J5pT39kj8HVFJdt3VlGqHhgK9Jc,10494 +torch/amp/__init__.py,sha256=OuEdgK_zzuRWo5_vfM_VhTooVAm1BXTBkUWxLkY6zlU,181 +torch/amp/__pycache__/__init__.cpython-310.pyc,, +torch/amp/__pycache__/autocast_mode.cpython-310.pyc,, +torch/amp/__pycache__/grad_scaler.cpython-310.pyc,, +torch/amp/autocast_mode.py,sha256=6UhXf-ryUCayfk3bqIcYfTt3BjgVJmQ6Gq7fYMpQ19c,21909 +torch/amp/grad_scaler.py,sha256=v_exbghAhj8PTZfFIlgXbnRdMK44oBfTZ-GkN3x0rVQ,30643 +torch/ao/__init__.py,sha256=t-7QOhmWP9oe0Mh2RHAH119yFNo-jVdfOB6VIZyYS5M,678 +torch/ao/__pycache__/__init__.cpython-310.pyc,, +torch/ao/nn/__init__.py,sha256=4j-eekD5zpSPgRw4Z-6hVhWmeeYaDcD9bar24mvxbVo,834 +torch/ao/nn/__pycache__/__init__.cpython-310.pyc,, +torch/ao/nn/intrinsic/__init__.py,sha256=yaXY9qRdzLDsAk2wwLcm5x2PKvvwEi9DLbuDUcPYZeA,961 +torch/ao/nn/intrinsic/__pycache__/__init__.cpython-310.pyc,, +torch/ao/nn/intrinsic/modules/__init__.py,sha256=FlHZWKH0Xumwd5xBvZgyeGkbYehn1oDCUnAqZ_c4WN4,655 +torch/ao/nn/intrinsic/modules/__pycache__/__init__.cpython-310.pyc,, +torch/ao/nn/intrinsic/modules/__pycache__/fused.cpython-310.pyc,, +torch/ao/nn/intrinsic/modules/fused.py,sha256=a0HZ5xGvwVjQW3MqKwYWFXRTMbrWpOG1RLOz6VAyL0o,10468 +torch/ao/nn/intrinsic/qat/__init__.py,sha256=M0iylhjuqtPcbO2pAVdDg9n9e1ET359nQ9txOEErmMo,37 +torch/ao/nn/intrinsic/qat/__pycache__/__init__.cpython-310.pyc,, +torch/ao/nn/intrinsic/qat/modules/__init__.py,sha256=OIDHW4Q4Mjd_Y_eR1UWDLuPOVEIJOJJj5MbbaQRdI1A,547 +torch/ao/nn/intrinsic/qat/modules/__pycache__/__init__.cpython-310.pyc,, +torch/ao/nn/intrinsic/qat/modules/__pycache__/conv_fused.cpython-310.pyc,, +torch/ao/nn/intrinsic/qat/modules/__pycache__/linear_fused.cpython-310.pyc,, +torch/ao/nn/intrinsic/qat/modules/__pycache__/linear_relu.cpython-310.pyc,, +torch/ao/nn/intrinsic/qat/modules/conv_fused.py,sha256=qFc83O1gijrL8AjNG8GxE8qig2nDpfvEJ-aABJQED9Y,31278 +torch/ao/nn/intrinsic/qat/modules/linear_fused.py,sha256=iJns1v7QHyCEJcX0ey1Pbo9xI89winJO21IG1TS28-w,6569 +torch/ao/nn/intrinsic/qat/modules/linear_relu.py,sha256=bZKak53c9vQNd_7Xnh10xeXyVZ8ymO6vVhch1TOPeeM,2184 +torch/ao/nn/intrinsic/quantized/__init__.py,sha256=AyOx7RavGaehtAWX6dEUBQcrl23h2_S3Q9ZAWYimCLQ,236 +torch/ao/nn/intrinsic/quantized/__pycache__/__init__.cpython-310.pyc,, +torch/ao/nn/intrinsic/quantized/dynamic/__init__.py,sha256=M0iylhjuqtPcbO2pAVdDg9n9e1ET359nQ9txOEErmMo,37 +torch/ao/nn/intrinsic/quantized/dynamic/__pycache__/__init__.cpython-310.pyc,, +torch/ao/nn/intrinsic/quantized/dynamic/modules/__init__.py,sha256=kbhh2dL33XSuVEAZNtSHMmt1papX7az6WlVALevMgZA,70 +torch/ao/nn/intrinsic/quantized/dynamic/modules/__pycache__/__init__.cpython-310.pyc,, +torch/ao/nn/intrinsic/quantized/dynamic/modules/__pycache__/linear_relu.cpython-310.pyc,, +torch/ao/nn/intrinsic/quantized/dynamic/modules/linear_relu.py,sha256=JGHgYcHBFkcj_65pA9iuF9QrORrbKC7LdlT4sJxwGKc,2223 +torch/ao/nn/intrinsic/quantized/modules/__init__.py,sha256=8aofpYeXIA8WQaao5pvOjWtLnf4rmL9xlJO9hZ8aras,409 +torch/ao/nn/intrinsic/quantized/modules/__pycache__/__init__.cpython-310.pyc,, +torch/ao/nn/intrinsic/quantized/modules/__pycache__/bn_relu.cpython-310.pyc,, +torch/ao/nn/intrinsic/quantized/modules/__pycache__/conv_add.cpython-310.pyc,, +torch/ao/nn/intrinsic/quantized/modules/__pycache__/conv_relu.cpython-310.pyc,, +torch/ao/nn/intrinsic/quantized/modules/__pycache__/linear_relu.cpython-310.pyc,, +torch/ao/nn/intrinsic/quantized/modules/bn_relu.py,sha256=5z1wesnwC49jVjLIWagOdmRW1s-Zhm41tS9tgL19tl8,3647 +torch/ao/nn/intrinsic/quantized/modules/conv_add.py,sha256=EX4p7WEeFsAkZ_4lqAi5rHaqJpBcz0Gj7i8A8j1Kaug,4821 +torch/ao/nn/intrinsic/quantized/modules/conv_relu.py,sha256=V_cce6qmt6vnPLqCYbj5LePy1c6XCEK9_dM0Q5AxoUI,9071 +torch/ao/nn/intrinsic/quantized/modules/linear_relu.py,sha256=QM9XklHb5r_0HRzNIkRaXg-_BiAaox3JF9xSgZepjZ8,6884 +torch/ao/nn/qat/__init__.py,sha256=M0iylhjuqtPcbO2pAVdDg9n9e1ET359nQ9txOEErmMo,37 +torch/ao/nn/qat/__pycache__/__init__.cpython-310.pyc,, +torch/ao/nn/qat/dynamic/__init__.py,sha256=M0iylhjuqtPcbO2pAVdDg9n9e1ET359nQ9txOEErmMo,37 +torch/ao/nn/qat/dynamic/__pycache__/__init__.cpython-310.pyc,, +torch/ao/nn/qat/dynamic/modules/__init__.py,sha256=_5hfV0E5b71TgYVQPrPF9QZNrnw5XPuZppEwj0QItaM,50 +torch/ao/nn/qat/dynamic/modules/__pycache__/__init__.cpython-310.pyc,, +torch/ao/nn/qat/dynamic/modules/__pycache__/linear.cpython-310.pyc,, +torch/ao/nn/qat/dynamic/modules/linear.py,sha256=XJJdSaclI87qBmSywWkcxmfqxqnav5M3nBtzN1ntgm0,1215 +torch/ao/nn/qat/modules/__init__.py,sha256=RmKZ7d0ds96EIRSqAGGTrDwuXVWerE_S_NCWuEuX_20,228 +torch/ao/nn/qat/modules/__pycache__/__init__.cpython-310.pyc,, +torch/ao/nn/qat/modules/__pycache__/conv.cpython-310.pyc,, +torch/ao/nn/qat/modules/__pycache__/embedding_ops.cpython-310.pyc,, +torch/ao/nn/qat/modules/__pycache__/linear.cpython-310.pyc,, +torch/ao/nn/qat/modules/conv.py,sha256=nm6gKCKOvAfKdLJkp2LvzUsr0GRo0reFgf8ENirT6u8,9801 +torch/ao/nn/qat/modules/embedding_ops.py,sha256=anR8scM8bIhG6fiK7wnnqXmhhp58nMJ01Jgb_Y2MmVE,7867 +torch/ao/nn/qat/modules/linear.py,sha256=CIFCeilg3xlf81CNsj1pSvTcndokSjEHnPVpKhhVG1M,3051 +torch/ao/nn/quantizable/__init__.py,sha256=M0iylhjuqtPcbO2pAVdDg9n9e1ET359nQ9txOEErmMo,37 +torch/ao/nn/quantizable/__pycache__/__init__.cpython-310.pyc,, +torch/ao/nn/quantizable/modules/__init__.py,sha256=N6niR-YsfqqP_5a8ksCJ8BL-Ol1Mch_412g-I4Z8VeQ,145 +torch/ao/nn/quantizable/modules/__pycache__/__init__.cpython-310.pyc,, +torch/ao/nn/quantizable/modules/__pycache__/activation.cpython-310.pyc,, +torch/ao/nn/quantizable/modules/__pycache__/rnn.cpython-310.pyc,, +torch/ao/nn/quantizable/modules/activation.py,sha256=tLkP18K3-9YVu4ByNdkZXAXNM2HGx54Wizv7_Rm5H10,24286 +torch/ao/nn/quantizable/modules/rnn.py,sha256=10p9mhGmxoDmBh-NnNoZ53bWSdESl0r2XtkIO1RY1ds,21826 +torch/ao/nn/quantized/__init__.py,sha256=NtHecsYVtg9e1IhTCdvoXSV-oQEXRQnt54dZlScPo6I,686 +torch/ao/nn/quantized/__pycache__/__init__.cpython-310.pyc,, +torch/ao/nn/quantized/__pycache__/functional.cpython-310.pyc,, +torch/ao/nn/quantized/dynamic/__init__.py,sha256=M0iylhjuqtPcbO2pAVdDg9n9e1ET359nQ9txOEErmMo,37 +torch/ao/nn/quantized/dynamic/__pycache__/__init__.cpython-310.pyc,, +torch/ao/nn/quantized/dynamic/modules/__init__.py,sha256=VzgogVUFAj-yE8a5Vmjiq5TV3SP51t0wXslabLVPITw,413 +torch/ao/nn/quantized/dynamic/modules/__pycache__/__init__.cpython-310.pyc,, +torch/ao/nn/quantized/dynamic/modules/__pycache__/conv.cpython-310.pyc,, +torch/ao/nn/quantized/dynamic/modules/__pycache__/linear.cpython-310.pyc,, +torch/ao/nn/quantized/dynamic/modules/__pycache__/rnn.cpython-310.pyc,, +torch/ao/nn/quantized/dynamic/modules/conv.py,sha256=wWFkB3uXgZg9JUP89g8NSd9Cmgh0Q6AtwhbTsGBqNb0,18425 +torch/ao/nn/quantized/dynamic/modules/linear.py,sha256=JwR0E01QMUeJZ0FKzZBucsFc0BANNycbdQ_PD5MeiHo,6487 +torch/ao/nn/quantized/dynamic/modules/rnn.py,sha256=haiDautSEeTLTUPtA_r9PNGzZ42dhkv2bKysUdEqGPY,51453 +torch/ao/nn/quantized/functional.py,sha256=5GJvy-iArwEam70IfB_-LUFTwEs8m5TdZPY9giezVAw,29615 +torch/ao/nn/quantized/modules/__init__.py,sha256=vFYtEc5icLCdS6a_I7dJKANpFSmowEehAdgKXrYxX60,4521 +torch/ao/nn/quantized/modules/__pycache__/__init__.cpython-310.pyc,, +torch/ao/nn/quantized/modules/__pycache__/activation.cpython-310.pyc,, +torch/ao/nn/quantized/modules/__pycache__/batchnorm.cpython-310.pyc,, +torch/ao/nn/quantized/modules/__pycache__/conv.cpython-310.pyc,, +torch/ao/nn/quantized/modules/__pycache__/dropout.cpython-310.pyc,, +torch/ao/nn/quantized/modules/__pycache__/embedding_ops.cpython-310.pyc,, +torch/ao/nn/quantized/modules/__pycache__/functional_modules.cpython-310.pyc,, +torch/ao/nn/quantized/modules/__pycache__/linear.cpython-310.pyc,, +torch/ao/nn/quantized/modules/__pycache__/normalization.cpython-310.pyc,, +torch/ao/nn/quantized/modules/__pycache__/rnn.cpython-310.pyc,, +torch/ao/nn/quantized/modules/__pycache__/utils.cpython-310.pyc,, +torch/ao/nn/quantized/modules/activation.py,sha256=NbwdTMPUNC7aPn1BxmKFMGwWewRzSStnltw9-FjFwY8,11891 +torch/ao/nn/quantized/modules/batchnorm.py,sha256=6oFK1kU1_WXxvLNRU6u4ptzQ3QKyxLvOn7QwQrZG3EY,4519 +torch/ao/nn/quantized/modules/conv.py,sha256=FrFp-DfsnSt0WNnUnM4NK63ZZsMshxtx53FXbz_VhM8,43515 +torch/ao/nn/quantized/modules/dropout.py,sha256=5nPYMBmjOyEzOZj0lz_CtUmJASXrrEr63YJnVytPTQs,806 +torch/ao/nn/quantized/modules/embedding_ops.py,sha256=pnINpq6IKHrvxx80_5AfJPHO4u7XoeaL9h_uChL-Fr4,14676 +torch/ao/nn/quantized/modules/functional_modules.py,sha256=8BhuW9PVKxOxQ-6P8SpoNnl0wv0qd1MH3Zm-DQKa74g,9222 +torch/ao/nn/quantized/modules/linear.py,sha256=CpIn0Nl3iPXACM8okQfDcKN8cTPNb98cFZYNQW9790Y,13612 +torch/ao/nn/quantized/modules/normalization.py,sha256=Wsh0x_ibYbWjZ7OID2ySLxO4D5kkLtQGAbYWlaLWwr8,10049 +torch/ao/nn/quantized/modules/rnn.py,sha256=oHyMFU7ZP7Z_MOvFyhEMvparIpqb-oWTBvmwkeSzeIw,1898 +torch/ao/nn/quantized/modules/utils.py,sha256=qD-dHMUNgtgb-6WdnSA5jvR7q--wej0CCq1KLgxpVPo,4693 +torch/ao/nn/quantized/reference/__init__.py,sha256=hu3hyozMJtkc86Bu1v8tmyayuxAdeDSv0sUiOeNAr_s,284 +torch/ao/nn/quantized/reference/__pycache__/__init__.cpython-310.pyc,, +torch/ao/nn/quantized/reference/modules/__init__.py,sha256=YS8MYKlqBPoA2UEBcS-MgbOzZ8_HDp-7ET4BC7KtCBk,494 +torch/ao/nn/quantized/reference/modules/__pycache__/__init__.cpython-310.pyc,, +torch/ao/nn/quantized/reference/modules/__pycache__/conv.cpython-310.pyc,, +torch/ao/nn/quantized/reference/modules/__pycache__/linear.cpython-310.pyc,, +torch/ao/nn/quantized/reference/modules/__pycache__/rnn.cpython-310.pyc,, +torch/ao/nn/quantized/reference/modules/__pycache__/sparse.cpython-310.pyc,, +torch/ao/nn/quantized/reference/modules/__pycache__/utils.cpython-310.pyc,, +torch/ao/nn/quantized/reference/modules/conv.py,sha256=xoZMqjUaHjWpYtsUYG4uaAnHy4gvqF1fMP8pTIvlsuc,15672 +torch/ao/nn/quantized/reference/modules/linear.py,sha256=oxH2CSsE_asNpObp2CUQjDsqsgSWDHeMHK9p2EF4834,2254 +torch/ao/nn/quantized/reference/modules/rnn.py,sha256=Dwcd9mE1SUyVwJVyqyylA1Bp7q1irAzW0OsHr4VYm40,29848 +torch/ao/nn/quantized/reference/modules/sparse.py,sha256=glgaM9jAtZt9FIqrCBJel32K0KDtk8p9k1K02F4Jcos,4683 +torch/ao/nn/quantized/reference/modules/utils.py,sha256=yUN19xdBXPk2mUNjsxWEIoVusUwiIyS30TkOxEQj8SY,15668 +torch/ao/nn/sparse/__init__.py,sha256=PfB-tgPOelyV_0eb_ipJK4LzPHwB5Z-wfJXeE_O3AK4,24 +torch/ao/nn/sparse/__pycache__/__init__.cpython-310.pyc,, +torch/ao/nn/sparse/quantized/__init__.py,sha256=xO8RdXEcj7ggZh7-f2bReVBRO-F6PNBZjb5DBPwV52w,168 +torch/ao/nn/sparse/quantized/__pycache__/__init__.cpython-310.pyc,, +torch/ao/nn/sparse/quantized/__pycache__/linear.cpython-310.pyc,, +torch/ao/nn/sparse/quantized/__pycache__/utils.cpython-310.pyc,, +torch/ao/nn/sparse/quantized/dynamic/__init__.py,sha256=lYDGtZ8rNR56jJLk6s5WOJ65E7qqQ_LFICpuD76NWYI,57 +torch/ao/nn/sparse/quantized/dynamic/__pycache__/__init__.cpython-310.pyc,, +torch/ao/nn/sparse/quantized/dynamic/__pycache__/linear.cpython-310.pyc,, +torch/ao/nn/sparse/quantized/dynamic/linear.py,sha256=vcw98CQRL1nkE3DJ7_nmpxDIzKcgEERm-ryQLLDFHE8,6428 +torch/ao/nn/sparse/quantized/linear.py,sha256=D0dzVzl0ER6g5awSDARWN43Yn7FEWNdChNt1h3NzumU,8971 +torch/ao/nn/sparse/quantized/utils.py,sha256=Ehc81o0nPFBZ3Vije8v5YufuJ8u23dliOI0EFGtAv4w,2044 +torch/ao/ns/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/ao/ns/__pycache__/__init__.cpython-310.pyc,, +torch/ao/ns/__pycache__/_numeric_suite.cpython-310.pyc,, +torch/ao/ns/__pycache__/_numeric_suite_fx.cpython-310.pyc,, +torch/ao/ns/_numeric_suite.py,sha256=fPy3eN33wImLp8FFODnH3byzxukzA-GJXQjP0hRnASc,20065 +torch/ao/ns/_numeric_suite_fx.py,sha256=FB23FPdq3xeOoV-K27ow2equHsQ3WZ-cCk3QH59h2wg,41390 +torch/ao/ns/fx/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/ao/ns/fx/__pycache__/__init__.cpython-310.pyc,, +torch/ao/ns/fx/__pycache__/graph_matcher.cpython-310.pyc,, +torch/ao/ns/fx/__pycache__/graph_passes.cpython-310.pyc,, +torch/ao/ns/fx/__pycache__/mappings.cpython-310.pyc,, +torch/ao/ns/fx/__pycache__/n_shadows_utils.cpython-310.pyc,, +torch/ao/ns/fx/__pycache__/ns_types.cpython-310.pyc,, +torch/ao/ns/fx/__pycache__/pattern_utils.cpython-310.pyc,, +torch/ao/ns/fx/__pycache__/qconfig_multi_mapping.cpython-310.pyc,, +torch/ao/ns/fx/__pycache__/utils.cpython-310.pyc,, +torch/ao/ns/fx/__pycache__/weight_utils.cpython-310.pyc,, +torch/ao/ns/fx/graph_matcher.py,sha256=GSVkH9ABrwy_lSVaAjB2Vr5LdsGx6pgGPbLL9nx55q0,20001 +torch/ao/ns/fx/graph_passes.py,sha256=HoAnevrFbZIjr5YLKK_i8wdt1_seAOzEDZTyQd-gTkM,45739 +torch/ao/ns/fx/mappings.py,sha256=I3ZnL73L2BTNVhhI9cR7GL-mgjjLx18f5n76XoFBt2o,18446 +torch/ao/ns/fx/n_shadows_utils.py,sha256=QEZoKH8ZT7af_7DNBzDTRL-I2ltD18Jtq1uwc53RfXI,53357 +torch/ao/ns/fx/ns_types.py,sha256=zSL0bDK64nJ9iyZgMXbxW30cgKzJeo993bsd6Tnvt0Q,2354 +torch/ao/ns/fx/pattern_utils.py,sha256=7q9E8brp9KSnK_Uo1aDEbo7uUxmPV1o41U9sD6Yf_C0,8620 +torch/ao/ns/fx/qconfig_multi_mapping.py,sha256=q4SF9lmy89wQ-YFxHJgurdwfiKBn0hRPVk1ZWCvE0nA,10197 +torch/ao/ns/fx/utils.py,sha256=pGO1v12DWWoUEGhsMDzvN88sey6uTqyfDk17SiH3xFk,22806 +torch/ao/ns/fx/weight_utils.py,sha256=mkhs5U5qrV_MIKelp_OAOaljhb1_kabt1NF_0gdVGik,12786 +torch/ao/pruning/__init__.py,sha256=dp2CA7CO_FRHTE7E0Ft495uR5IlUi8HsnG8ujLsz6OA,640 +torch/ao/pruning/__pycache__/__init__.cpython-310.pyc,, +torch/ao/pruning/__pycache__/_mappings.cpython-310.pyc,, +torch/ao/pruning/_experimental/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/ao/pruning/_experimental/__pycache__/__init__.cpython-310.pyc,, +torch/ao/pruning/_experimental/activation_sparsifier/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/ao/pruning/_experimental/activation_sparsifier/__pycache__/__init__.cpython-310.pyc,, +torch/ao/pruning/_experimental/activation_sparsifier/__pycache__/activation_sparsifier.cpython-310.pyc,, +torch/ao/pruning/_experimental/activation_sparsifier/activation_sparsifier.py,sha256=Vb54teEd0at8qH0G0j-cBlsc1DwzlhJt4lSmD_BCXhs,19309 +torch/ao/pruning/_experimental/data_scheduler/__init__.py,sha256=q_95mAMpHldGWwLAgYS-F07ReGKDLIAZLsP7BtlmgTE,92 +torch/ao/pruning/_experimental/data_scheduler/__pycache__/__init__.cpython-310.pyc,, +torch/ao/pruning/_experimental/data_scheduler/__pycache__/base_data_scheduler.cpython-310.pyc,, +torch/ao/pruning/_experimental/data_scheduler/base_data_scheduler.py,sha256=sNQEoYKRbglXHjHbQh6Q2msIDK_fYB1py8IrExc_cbo,7733 +torch/ao/pruning/_experimental/data_sparsifier/__init__.py,sha256=9ktAif-dttGBmiw745tN2WtUTOTZch0E_HA4cE1bfTo,174 +torch/ao/pruning/_experimental/data_sparsifier/__pycache__/__init__.cpython-310.pyc,, +torch/ao/pruning/_experimental/data_sparsifier/__pycache__/base_data_sparsifier.cpython-310.pyc,, +torch/ao/pruning/_experimental/data_sparsifier/__pycache__/data_norm_sparsifier.cpython-310.pyc,, +torch/ao/pruning/_experimental/data_sparsifier/__pycache__/quantization_utils.cpython-310.pyc,, +torch/ao/pruning/_experimental/data_sparsifier/base_data_sparsifier.py,sha256=GIe1rn6fEjtcQ7XMptkDVPSqTx0LnNbc8wnAbejCeIE,13552 +torch/ao/pruning/_experimental/data_sparsifier/data_norm_sparsifier.py,sha256=e4It7UrOu1FyQif3ijmDYGU_D5HscmW9Wdu8qbbT1PE,7778 +torch/ao/pruning/_experimental/data_sparsifier/lightning/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/ao/pruning/_experimental/data_sparsifier/lightning/__pycache__/__init__.cpython-310.pyc,, +torch/ao/pruning/_experimental/data_sparsifier/lightning/callbacks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/ao/pruning/_experimental/data_sparsifier/lightning/callbacks/__pycache__/__init__.cpython-310.pyc,, +torch/ao/pruning/_experimental/data_sparsifier/lightning/callbacks/__pycache__/_data_sparstity_utils.cpython-310.pyc,, +torch/ao/pruning/_experimental/data_sparsifier/lightning/callbacks/__pycache__/data_sparsity.cpython-310.pyc,, +torch/ao/pruning/_experimental/data_sparsifier/lightning/callbacks/_data_sparstity_utils.py,sha256=Vtb__BJ_qrCy7TBisG4BM8qNXzDYrl-xNDVLbHCsYIY,1636 +torch/ao/pruning/_experimental/data_sparsifier/lightning/callbacks/data_sparsity.py,sha256=-AMNv2c1CakFrnm4F6Vs-PyvnN21CdCBi7rICTrn_e4,6595 +torch/ao/pruning/_experimental/data_sparsifier/quantization_utils.py,sha256=IKbD-JZvJ_rAxNE9Kluxkcfz27-OeZcweJKBfRxeA48,6107 +torch/ao/pruning/_experimental/pruner/FPGM_pruner.py,sha256=O7tOotiot4xdj-rk5l7AQBGtaZKymlorsLOS9t_74L0,3471 +torch/ao/pruning/_experimental/pruner/__init__.py,sha256=abfUoG48Kc6ddQZmFAkYjQH5J8Hae8xJiqxz89MTgDE,260 +torch/ao/pruning/_experimental/pruner/__pycache__/FPGM_pruner.cpython-310.pyc,, +torch/ao/pruning/_experimental/pruner/__pycache__/__init__.cpython-310.pyc,, +torch/ao/pruning/_experimental/pruner/__pycache__/base_structured_sparsifier.cpython-310.pyc,, +torch/ao/pruning/_experimental/pruner/__pycache__/lstm_saliency_pruner.cpython-310.pyc,, +torch/ao/pruning/_experimental/pruner/__pycache__/match_utils.cpython-310.pyc,, +torch/ao/pruning/_experimental/pruner/__pycache__/parametrization.cpython-310.pyc,, +torch/ao/pruning/_experimental/pruner/__pycache__/prune_functions.cpython-310.pyc,, +torch/ao/pruning/_experimental/pruner/__pycache__/saliency_pruner.cpython-310.pyc,, +torch/ao/pruning/_experimental/pruner/base_structured_sparsifier.py,sha256=2saKpB_00VkfhHHxwgpFGmAQjvuBuAaBfmQc0OzaRVc,10972 +torch/ao/pruning/_experimental/pruner/lstm_saliency_pruner.py,sha256=nBliDOjjzo42r3g6yj5q9qq4tbSLg2e_bwc1KiHA9L4,2197 +torch/ao/pruning/_experimental/pruner/match_utils.py,sha256=PLY0zuh1dWLCtLwmhAgXv0h5WDzCjXJZMM7UNRFNuO4,1949 +torch/ao/pruning/_experimental/pruner/parametrization.py,sha256=79BNtvk1z3aQL2WauM0h-PCjhJtxJCZD0UiyoJm9gh4,2047 +torch/ao/pruning/_experimental/pruner/prune_functions.py,sha256=O5lbpjsVE2rgilgB2-mVRlHmU1M5OhSJFtbp6KtJwyI,19285 +torch/ao/pruning/_experimental/pruner/saliency_pruner.py,sha256=9_q30_e_oArjSWcZ16UEx0HRcBfxCqcJTrFGrpMatrg,1536 +torch/ao/pruning/_mappings.py,sha256=O9aJePj2X0nV76KTcSU93V7GA8dxEzfr5G9QvjyWOqQ,597 +torch/ao/pruning/scheduler/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/ao/pruning/scheduler/__pycache__/__init__.cpython-310.pyc,, +torch/ao/pruning/scheduler/__pycache__/base_scheduler.cpython-310.pyc,, +torch/ao/pruning/scheduler/__pycache__/cubic_scheduler.cpython-310.pyc,, +torch/ao/pruning/scheduler/__pycache__/lambda_scheduler.cpython-310.pyc,, +torch/ao/pruning/scheduler/base_scheduler.py,sha256=IipBI2JjzC5ah4ocvY5mfNjWfJMLAyzWgjyIR6BmxNM,6625 +torch/ao/pruning/scheduler/cubic_scheduler.py,sha256=9j4ifJT9lavz1pCgulfgpHgHaasvx_KkqNwqCE1_NC8,3875 +torch/ao/pruning/scheduler/lambda_scheduler.py,sha256=ztFUy3RecZ5JhkDfOUg1JNVd9qnm59LqdUxoKumVrvQ,2416 +torch/ao/pruning/sparsifier/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/ao/pruning/sparsifier/__pycache__/__init__.cpython-310.pyc,, +torch/ao/pruning/sparsifier/__pycache__/base_sparsifier.cpython-310.pyc,, +torch/ao/pruning/sparsifier/__pycache__/nearly_diagonal_sparsifier.cpython-310.pyc,, +torch/ao/pruning/sparsifier/__pycache__/utils.cpython-310.pyc,, +torch/ao/pruning/sparsifier/__pycache__/weight_norm_sparsifier.cpython-310.pyc,, +torch/ao/pruning/sparsifier/base_sparsifier.py,sha256=eTCimZ4LTdZq6QYDwcxxSmlTXk71_M-hq4s6_yNs3xQ,14002 +torch/ao/pruning/sparsifier/nearly_diagonal_sparsifier.py,sha256=vKZbWhsxPzMDfk6ZntgIBncW81Vh19DisumzDWDhLUE,2263 +torch/ao/pruning/sparsifier/utils.py,sha256=fxTRyQBCjxVI6D-YEUDytd7hTDyVJb5MHvKM1M9J3w0,4997 +torch/ao/pruning/sparsifier/weight_norm_sparsifier.py,sha256=yIIGs4n8o2CctPcjOrgtZ1CiCJzKEtFiVmepwe_RZog,9405 +torch/ao/quantization/__init__.py,sha256=egBUFo7lxHrD2RcX1IQ85wpTtO_GT831VdCKKymZPkA,7613 +torch/ao/quantization/__pycache__/__init__.cpython-310.pyc,, +torch/ao/quantization/__pycache__/_correct_bias.cpython-310.pyc,, +torch/ao/quantization/__pycache__/_equalize.cpython-310.pyc,, +torch/ao/quantization/__pycache__/_learnable_fake_quantize.cpython-310.pyc,, +torch/ao/quantization/__pycache__/fake_quantize.cpython-310.pyc,, +torch/ao/quantization/__pycache__/fuse_modules.cpython-310.pyc,, +torch/ao/quantization/__pycache__/fuser_method_mappings.cpython-310.pyc,, +torch/ao/quantization/__pycache__/observer.cpython-310.pyc,, +torch/ao/quantization/__pycache__/qconfig.cpython-310.pyc,, +torch/ao/quantization/__pycache__/qconfig_mapping.cpython-310.pyc,, +torch/ao/quantization/__pycache__/quant_type.cpython-310.pyc,, +torch/ao/quantization/__pycache__/quantization_mappings.cpython-310.pyc,, +torch/ao/quantization/__pycache__/quantize.cpython-310.pyc,, +torch/ao/quantization/__pycache__/quantize_fx.cpython-310.pyc,, +torch/ao/quantization/__pycache__/quantize_jit.cpython-310.pyc,, +torch/ao/quantization/__pycache__/quantize_pt2e.cpython-310.pyc,, +torch/ao/quantization/__pycache__/stubs.cpython-310.pyc,, +torch/ao/quantization/__pycache__/utils.cpython-310.pyc,, +torch/ao/quantization/_correct_bias.py,sha256=tTf6RanT0gwmTkNfJrPGDCfcf8yHcpyGJ5HUm7UiB-Y,5415 +torch/ao/quantization/_equalize.py,sha256=b3HzjqrX-40SC3NXv_CevxRePFd5SQhLHyYmQ6UthwI,9493 +torch/ao/quantization/_learnable_fake_quantize.py,sha256=o0VkrbUsv7uMr0jDMfga2pr-xU5XLcszvtEQDiv6h9I,7959 +torch/ao/quantization/backend_config/__init__.py,sha256=lnyxe_DTaYkdoSLhxNlUcMPlck2SAngmI8GNcYDHI4M,915 +torch/ao/quantization/backend_config/__pycache__/__init__.cpython-310.pyc,, +torch/ao/quantization/backend_config/__pycache__/_common_operator_config_utils.cpython-310.pyc,, +torch/ao/quantization/backend_config/__pycache__/_qnnpack_pt2e.cpython-310.pyc,, +torch/ao/quantization/backend_config/__pycache__/backend_config.cpython-310.pyc,, +torch/ao/quantization/backend_config/__pycache__/executorch.cpython-310.pyc,, +torch/ao/quantization/backend_config/__pycache__/fbgemm.cpython-310.pyc,, +torch/ao/quantization/backend_config/__pycache__/native.cpython-310.pyc,, +torch/ao/quantization/backend_config/__pycache__/onednn.cpython-310.pyc,, +torch/ao/quantization/backend_config/__pycache__/qnnpack.cpython-310.pyc,, +torch/ao/quantization/backend_config/__pycache__/tensorrt.cpython-310.pyc,, +torch/ao/quantization/backend_config/__pycache__/utils.cpython-310.pyc,, +torch/ao/quantization/backend_config/__pycache__/x86.cpython-310.pyc,, +torch/ao/quantization/backend_config/_common_operator_config_utils.py,sha256=EE_d7xO_Gsh4Y__yPOaxnguZItAUSE8WNvcaCJL98J4,27501 +torch/ao/quantization/backend_config/_qnnpack_pt2e.py,sha256=Z0CgzNQw0gA1n96DRblor08FXUtWpEoVf7vYb9IEx5c,6431 +torch/ao/quantization/backend_config/backend_config.py,sha256=I65caYp3oiracD9g0HKRU9b39OxD2iTryccrjy5VeMY,31509 +torch/ao/quantization/backend_config/executorch.py,sha256=t72escVnr3ztTYDpiyHIJlOWTwHgE1m4wn6fziIxyP4,16924 +torch/ao/quantization/backend_config/fbgemm.py,sha256=dCsGDn-PbASye1CPf_9poNM6eOMN10_NUFTQat95-0Q,4208 +torch/ao/quantization/backend_config/native.py,sha256=xKBjjC-uZ8qZsbHluftqC6Tn9vo_6ivcsVYFWLFFQtQ,8242 +torch/ao/quantization/backend_config/onednn.py,sha256=dcjPf8kW0brMBJyo5X4e1iZiUflynVfxhe0Uqh2lwDY,19114 +torch/ao/quantization/backend_config/qnnpack.py,sha256=PkPTzCS-Q3p8MiUq6mytJlFt-Zox7AO2kxbTg5Qx-AU,5400 +torch/ao/quantization/backend_config/tensorrt.py,sha256=Drb7vD3gWVGnSa41C6rYVR7po0qA420Nu3hoOH483-A,3021 +torch/ao/quantization/backend_config/utils.py,sha256=KzUvmQkzzJ_AyloofmasosW_McdC4tce8eUpkwOKtF0,12535 +torch/ao/quantization/backend_config/x86.py,sha256=4geWLr6mkFhSEYiXFXpkB8NegS05EXhv2fYHTpajNyg,3869 +torch/ao/quantization/fake_quantize.py,sha256=6aW0xpwEoOqHgeRNNkK1dBYjNgOzrZF6-X_jmzmE_xA,23563 +torch/ao/quantization/fuse_modules.py,sha256=fBhqELU4N8hFcKa2SxS31xPx3rkssxjS2Yr60C_4vAM,6794 +torch/ao/quantization/fuser_method_mappings.py,sha256=OypjC0HCUEiXjqZ3SpTstCI7d1jSFtYbtQyt_UKIQkc,10971 +torch/ao/quantization/fx/__init__.py,sha256=65h6iR_5XARcYpGS8A2qRza_2y7cvqCowqkwwziYz8M,81 +torch/ao/quantization/fx/__pycache__/__init__.cpython-310.pyc,, +torch/ao/quantization/fx/__pycache__/_decomposed.cpython-310.pyc,, +torch/ao/quantization/fx/__pycache__/_equalize.cpython-310.pyc,, +torch/ao/quantization/fx/__pycache__/_lower_to_native_backend.cpython-310.pyc,, +torch/ao/quantization/fx/__pycache__/convert.cpython-310.pyc,, +torch/ao/quantization/fx/__pycache__/custom_config.cpython-310.pyc,, +torch/ao/quantization/fx/__pycache__/fuse.cpython-310.pyc,, +torch/ao/quantization/fx/__pycache__/fuse_handler.cpython-310.pyc,, +torch/ao/quantization/fx/__pycache__/graph_module.cpython-310.pyc,, +torch/ao/quantization/fx/__pycache__/lower_to_fbgemm.cpython-310.pyc,, +torch/ao/quantization/fx/__pycache__/lower_to_qnnpack.cpython-310.pyc,, +torch/ao/quantization/fx/__pycache__/lstm_utils.cpython-310.pyc,, +torch/ao/quantization/fx/__pycache__/match_utils.cpython-310.pyc,, +torch/ao/quantization/fx/__pycache__/pattern_utils.cpython-310.pyc,, +torch/ao/quantization/fx/__pycache__/prepare.cpython-310.pyc,, +torch/ao/quantization/fx/__pycache__/qconfig_mapping_utils.cpython-310.pyc,, +torch/ao/quantization/fx/__pycache__/quantize_handler.cpython-310.pyc,, +torch/ao/quantization/fx/__pycache__/tracer.cpython-310.pyc,, +torch/ao/quantization/fx/__pycache__/utils.cpython-310.pyc,, +torch/ao/quantization/fx/_decomposed.py,sha256=OCdbeG8OiFwo0cU2KEc-xJKGiSi8dWBPI3Yudmuax3A,44280 +torch/ao/quantization/fx/_equalize.py,sha256=KT8SIwAMDy8DffCjsN0AM0x2VdJWPIbbCOe9KKH-al4,40805 +torch/ao/quantization/fx/_lower_to_native_backend.py,sha256=XwyMNQ8-66lnw1m-CEID_CuVa6OcPGDojWrlWttYHZg,57157 +torch/ao/quantization/fx/_model_report/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/ao/quantization/fx/_model_report/__pycache__/__init__.cpython-310.pyc,, +torch/ao/quantization/fx/_model_report/__pycache__/detector.cpython-310.pyc,, +torch/ao/quantization/fx/_model_report/__pycache__/model_report.cpython-310.pyc,, +torch/ao/quantization/fx/_model_report/__pycache__/model_report_observer.cpython-310.pyc,, +torch/ao/quantization/fx/_model_report/__pycache__/model_report_visualizer.cpython-310.pyc,, +torch/ao/quantization/fx/_model_report/detector.py,sha256=1rVf-mlV-AD1QBke-Obabkvm4xLpD6YZnOmhwRZYuWE,76891 +torch/ao/quantization/fx/_model_report/model_report.py,sha256=LjyEonNh1kyqu_sdaqp0aP8xorb7wNQjweEyVxUp2ao,29740 +torch/ao/quantization/fx/_model_report/model_report_observer.py,sha256=BWuxgjbh5Egg1xxq9eIQt3v8gDbxM28AQmhG0N1jUG0,12084 +torch/ao/quantization/fx/_model_report/model_report_visualizer.py,sha256=qnUOY2kvQEsAlyGAQqRtGftdeUR451b2pwuMQEyMuaA,32667 +torch/ao/quantization/fx/convert.py,sha256=PXEG8v5N3PlGLH8UCJrcuKfpf3Lv-6QKjFox7AAsbGo,60174 +torch/ao/quantization/fx/custom_config.py,sha256=XXczvULZT7A6u8av5PMmgy94viHeOslT73lceU_8N1s,21815 +torch/ao/quantization/fx/fuse.py,sha256=pMxYdgQBYHgNrk5AUOiaaUXyJryX0NeoFJjRrJNtAbs,7396 +torch/ao/quantization/fx/fuse_handler.py,sha256=KlI4Gk2e5bc_8Whfkib45iWLffWnPSU2qvU0QA3-umw,4704 +torch/ao/quantization/fx/graph_module.py,sha256=QG9sVe1kfWGg5o9cyOiUaPrvplbwbWubGYTyGxCwG24,6607 +torch/ao/quantization/fx/lower_to_fbgemm.py,sha256=ERyoustxB5yjBVinb4V2_YTZF-76c7NaPxaVP2l_Pbs,602 +torch/ao/quantization/fx/lower_to_qnnpack.py,sha256=pSLRhkHuxXdbu7a1yEzQPbomFrepOvfiKWpg4HNqEYw,527 +torch/ao/quantization/fx/lstm_utils.py,sha256=dFESL358seHZX4XU46mGv57PouGbmJEh67Iid-cldBA,10544 +torch/ao/quantization/fx/match_utils.py,sha256=fKW4f3YavhquBHtPWdpp6aIp6AtZx17ubkRyeN29Bus,8963 +torch/ao/quantization/fx/pattern_utils.py,sha256=aMM87O63tKrgnLtuAIPEPNXApbzTxL4SIOvyWZTofJI,3668 +torch/ao/quantization/fx/prepare.py,sha256=jwhJvHlQTe5wWYhOOHZjhi5VKQXa0VJ6kZifD8fpYi0,90293 +torch/ao/quantization/fx/qconfig_mapping_utils.py,sha256=aGB4T8PFr5f01bciQIj-R4IDvJIcNxquOzC0btbSoCE,15449 +torch/ao/quantization/fx/quantize_handler.py,sha256=jFTXAjdLTYb1MGic0nZDngYmEfHSh_sTbjDCJGorGUU,7325 +torch/ao/quantization/fx/tracer.py,sha256=8X9Pu-GdFItrshngnE6B4j9drWYR4xpGY2RRykmJ1gA,1697 +torch/ao/quantization/fx/utils.py,sha256=PSYFpqvNsOQlLDWQ7p5_g15-TAQkoxuT-4aB9blYz1g,38784 +torch/ao/quantization/observer.py,sha256=piJEtZFdWnRR-xAeKlJ8Lwrirpduq2KbGUxLg9eRO8s,80311 +torch/ao/quantization/pt2e/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/ao/quantization/pt2e/__pycache__/__init__.cpython-310.pyc,, +torch/ao/quantization/pt2e/__pycache__/_affine_quantization.cpython-310.pyc,, +torch/ao/quantization/pt2e/__pycache__/_numeric_debugger.cpython-310.pyc,, +torch/ao/quantization/pt2e/__pycache__/duplicate_dq_pass.cpython-310.pyc,, +torch/ao/quantization/pt2e/__pycache__/export_utils.cpython-310.pyc,, +torch/ao/quantization/pt2e/__pycache__/graph_utils.cpython-310.pyc,, +torch/ao/quantization/pt2e/__pycache__/lowering.cpython-310.pyc,, +torch/ao/quantization/pt2e/__pycache__/port_metadata_pass.cpython-310.pyc,, +torch/ao/quantization/pt2e/__pycache__/prepare.cpython-310.pyc,, +torch/ao/quantization/pt2e/__pycache__/qat_utils.cpython-310.pyc,, +torch/ao/quantization/pt2e/__pycache__/utils.cpython-310.pyc,, +torch/ao/quantization/pt2e/_affine_quantization.py,sha256=MWRDps9ELe2v9NgVeRWfNykaW8ecQ0hZb96UqCnGI5c,35231 +torch/ao/quantization/pt2e/_numeric_debugger.py,sha256=yngGW7TqVCrMgCND-Rlv5XgJSFtBM4WnFl38Bfiqcis,12088 +torch/ao/quantization/pt2e/duplicate_dq_pass.py,sha256=qMYSKQz4uwtHKAodC5xA1uivk3BTa5nt-5l4RjI562I,3129 +torch/ao/quantization/pt2e/export_utils.py,sha256=nBVXF57e6m9MRcv_WDquLH9Cb8Ff4epBm8o8ApZQDBc,7990 +torch/ao/quantization/pt2e/graph_utils.py,sha256=g2Qo7RMaVJr5La4HQCYroVWJ8aFN-zrvbaLCZTg-wnk,6780 +torch/ao/quantization/pt2e/lowering.py,sha256=BQ7Lyg23n3TRPouyuPj9_vGhIT27XSJ6_JjT9ec-oBw,1892 +torch/ao/quantization/pt2e/port_metadata_pass.py,sha256=qRf-p6s_O60JDKkTZoL3XYsN2ZRzmkxVVWcGOb1YhiM,9179 +torch/ao/quantization/pt2e/prepare.py,sha256=Ft_tz3jwhM4Fwz2KrroLZRn15ub3LDWlJA0ppb4Usq8,22518 +torch/ao/quantization/pt2e/qat_utils.py,sha256=DTtZQiN44I_NKBGVqa58YNZYDaqThLbSs_5oKGnm6aw,39566 +torch/ao/quantization/pt2e/representation/__init__.py,sha256=Srf_T8fMTpFi64ZAgQom0S1A4CLFfKrtwPB_edoMu78,110 +torch/ao/quantization/pt2e/representation/__pycache__/__init__.cpython-310.pyc,, +torch/ao/quantization/pt2e/representation/__pycache__/rewrite.cpython-310.pyc,, +torch/ao/quantization/pt2e/representation/rewrite.py,sha256=BsDHTM1WYNPDaILfipFm8RTxbH9dq4o-6-7QDoAG1ig,28387 +torch/ao/quantization/pt2e/utils.py,sha256=hiuuPVVW-PiU38L-FHm1cgFMqll5BDmh7itHTb0eWMY,23746 +torch/ao/quantization/qconfig.py,sha256=UhMxxzPCoYWSv5_CAd5YWmvUGgzWZtnZKuuCwr_1QD4,24822 +torch/ao/quantization/qconfig_mapping.py,sha256=dYrgvV5RU3ub3qqCqEI2zEpU4nxbXA6dVsX8Awuxz6o,14845 +torch/ao/quantization/quant_type.py,sha256=fY7JDEr_PzBFymxy9fQmnRIFKiQoL2QoKJtxZKSJsoc,760 +torch/ao/quantization/quantization_mappings.py,sha256=oejc74aNW-Vewj2moYCa0iE6o5o7JwQXmvMCPLaS4NU,13885 +torch/ao/quantization/quantize.py,sha256=uEm9aKJ1fku7Up2W7-DH2ThUL3LF1WFdbMaucCHlHto,31396 +torch/ao/quantization/quantize_fx.py,sha256=nZk4g-86EdrlvaR2uWYl9_Z-7wANLSHKJsbFDjYfy0A,32464 +torch/ao/quantization/quantize_jit.py,sha256=nW1j383ayR-XgMZO98WuITK9CPe7B18mfuOQD6YWc6U,14699 +torch/ao/quantization/quantize_pt2e.py,sha256=EbwoL1VHh8Vtauh_VLUk2RTKMJfe7bMJ_NRUpmaIOIg,9476 +torch/ao/quantization/quantizer/__init__.py,sha256=JCNfOoUz3U_LyPipiVeO4o0LRncgqc6kiuv5lAF2i7E,455 +torch/ao/quantization/quantizer/__pycache__/__init__.cpython-310.pyc,, +torch/ao/quantization/quantizer/__pycache__/composable_quantizer.cpython-310.pyc,, +torch/ao/quantization/quantizer/__pycache__/embedding_quantizer.cpython-310.pyc,, +torch/ao/quantization/quantizer/__pycache__/quantizer.cpython-310.pyc,, +torch/ao/quantization/quantizer/__pycache__/utils.cpython-310.pyc,, +torch/ao/quantization/quantizer/__pycache__/x86_inductor_quantizer.cpython-310.pyc,, +torch/ao/quantization/quantizer/__pycache__/xnnpack_quantizer.cpython-310.pyc,, +torch/ao/quantization/quantizer/__pycache__/xnnpack_quantizer_utils.cpython-310.pyc,, +torch/ao/quantization/quantizer/__pycache__/xpu_inductor_quantizer.cpython-310.pyc,, +torch/ao/quantization/quantizer/composable_quantizer.py,sha256=CJJ-OZqCH1nlBqnGb5UpH7WzssUJxCWPkhHvRdCBRUw,3012 +torch/ao/quantization/quantizer/embedding_quantizer.py,sha256=S3nQaakWrS2zIf6oflhnJpeSldr_6r3O233wrDnVq3M,3397 +torch/ao/quantization/quantizer/quantizer.py,sha256=-CJtZct4fQJx8lfwMYzFBZCoVBh0hKJNOprcvPFPM0c,6617 +torch/ao/quantization/quantizer/utils.py,sha256=DyLkm9_e_8ljivFpVYEew0OmsCdcZu9D_z9FkuKM8oI,3422 +torch/ao/quantization/quantizer/x86_inductor_quantizer.py,sha256=5Z07tPt6uEhRoylnGZwlKOO5Gni1gNd5fK-C6_-zLp8,66519 +torch/ao/quantization/quantizer/xnnpack_quantizer.py,sha256=8fsOrQEeVWz2G8VN-TVpoWmkBIDKYR5ixxPv8riDFIc,16304 +torch/ao/quantization/quantizer/xnnpack_quantizer_utils.py,sha256=utDfHo7a47Aw5QAUGXniTGIX94tqOTeLncoY2G9OZfg,41803 +torch/ao/quantization/quantizer/xpu_inductor_quantizer.py,sha256=vfjIwpycYdtVWwxr7VZfUi-Je_PrrmpfrM_xL20MT4c,3797 +torch/ao/quantization/stubs.py,sha256=V-AJl3upvDL1qiTDdTBT7kJfdQ4rwFJT_UG1-A0oEP8,2282 +torch/ao/quantization/utils.py,sha256=s70G-LrQLndYq17Dxf7J_i8tiJFj7lEiDq16B5oDWzY,30101 +torch/autograd/__init__.py,sha256=f3iCXR40POo2c10g_G3aoGpVw5vr3MA9ioQCqin-42E,26182 +torch/autograd/__pycache__/__init__.cpython-310.pyc,, +torch/autograd/__pycache__/anomaly_mode.cpython-310.pyc,, +torch/autograd/__pycache__/forward_ad.cpython-310.pyc,, +torch/autograd/__pycache__/function.cpython-310.pyc,, +torch/autograd/__pycache__/functional.cpython-310.pyc,, +torch/autograd/__pycache__/grad_mode.cpython-310.pyc,, +torch/autograd/__pycache__/gradcheck.cpython-310.pyc,, +torch/autograd/__pycache__/graph.cpython-310.pyc,, +torch/autograd/__pycache__/profiler.cpython-310.pyc,, +torch/autograd/__pycache__/profiler_legacy.cpython-310.pyc,, +torch/autograd/__pycache__/profiler_util.cpython-310.pyc,, +torch/autograd/__pycache__/variable.cpython-310.pyc,, +torch/autograd/_functions/__init__.py,sha256=sdKJj6Dia1vNRSolyufzRKdn5qHkgCBCUI3OBm-PGW0,36 +torch/autograd/_functions/__pycache__/__init__.cpython-310.pyc,, +torch/autograd/_functions/__pycache__/tensor.cpython-310.pyc,, +torch/autograd/_functions/__pycache__/utils.cpython-310.pyc,, +torch/autograd/_functions/tensor.py,sha256=8SJkduO10ftxiPMbTlr_l8Vb9rluVnuZWQNaVBpxW0E,2496 +torch/autograd/_functions/utils.py,sha256=XSfqpnmJKm2LuoVc2FVFms4wV3hJxMhFrfbCAytX2JY,753 +torch/autograd/anomaly_mode.py,sha256=HNYmekIC9V3GRtrFVCvXm9c432KFmUlIb6fpi48EY4M,4964 +torch/autograd/forward_ad.py,sha256=y_feGwYUufUTonWXSz1rmGOHZ3AQ-CTGkJqDYT7T7lA,7639 +torch/autograd/function.py,sha256=2c6wgAdkVUtfR7Yofh4YmdxBEVQdOY_X-9ejzrSxn-A,33536 +torch/autograd/functional.py,sha256=wkwDjIJxypSwlw4sD2pIA96QW3-99bsRQ8hTb_gvfVc,53323 +torch/autograd/grad_mode.py,sha256=rFbphJ0ui5luno-5I-KNNfVktEBj6qXojEbUdVUgmAQ,14193 +torch/autograd/gradcheck.py,sha256=fqOf_X5gfz_PsmbZyAKYtX_8dXfeFWdUgHRgLXWVtLs,91997 +torch/autograd/graph.py,sha256=JBX1TKoG8yyms3qX_n7pcUwXo9pabVpHitRENbvKdUE,31793 +torch/autograd/profiler.py,sha256=tEseE_j_j7id9v9TiOVEc4vKAH9yX4ldCVphd4pt_hA,50143 +torch/autograd/profiler_legacy.py,sha256=7MLdb4wNGuoalcvk-Ohj1dGVGUauo5OweEYLGmyTgeQ,12210 +torch/autograd/profiler_util.py,sha256=tBnr6YbjHvek0AdLL2dEwTaBI_HrVhueeHAGwqms39I,55615 +torch/autograd/variable.py,sha256=N0cAiO8ZPZ6rtRtU-hJYH_6NVt-zun16CmO_KrZV7-0,391 +torch/backends/__init__.py,sha256=1BIOnSUu_NS6Gd0zjJRyYOT8AiSodTTgV-fDulyYnaA,3586 +torch/backends/__pycache__/__init__.cpython-310.pyc,, +torch/backends/_coreml/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/backends/_coreml/__pycache__/__init__.cpython-310.pyc,, +torch/backends/_coreml/__pycache__/preprocess.cpython-310.pyc,, +torch/backends/_coreml/preprocess.py,sha256=8m0YM0N1e3tLcaKQXoKXyN1VxlTtlrDI7ohke7J1Z9M,4301 +torch/backends/_nnapi/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/backends/_nnapi/__pycache__/__init__.cpython-310.pyc,, +torch/backends/_nnapi/__pycache__/prepare.cpython-310.pyc,, +torch/backends/_nnapi/__pycache__/serializer.cpython-310.pyc,, +torch/backends/_nnapi/prepare.py,sha256=PjHMOcCiTEvZyevQBsdWBKOarzAXEujzJ8YfMqO1OD8,6559 +torch/backends/_nnapi/serializer.py,sha256=X9fTMcefBzbbBjU517cDCbWB-HDaCL5hDRx_JbR9mA4,83074 +torch/backends/cpu/__init__.py,sha256=V3lRML9bHlNvfE5iOHJP9kN-P4WvEN23SeGQLLDYEnM,314 +torch/backends/cpu/__pycache__/__init__.cpython-310.pyc,, +torch/backends/cuda/__init__.py,sha256=xwvVTn1LmV3dgiy3DX2OFAuVotjmFjW_LFgLgEXYPBE,21553 +torch/backends/cuda/__pycache__/__init__.cpython-310.pyc,, +torch/backends/cudnn/__init__.py,sha256=c9BVh5fBlKt657HdALsLSGIoldI7uGomSYnvLEbyYAU,8225 +torch/backends/cudnn/__pycache__/__init__.cpython-310.pyc,, +torch/backends/cudnn/__pycache__/rnn.cpython-310.pyc,, +torch/backends/cudnn/rnn.py,sha256=CUJraHITTgckLh-nw0hpJkjfxAIrVX0zbqKlBbcck7s,2304 +torch/backends/cusparselt/__init__.py,sha256=Ani2vh3lUs7O03Ck_Cylz-89kMhIEdVd_-6NkLoLdcA,1285 +torch/backends/cusparselt/__pycache__/__init__.cpython-310.pyc,, +torch/backends/kleidiai/__init__.py,sha256=V5pt-IFG6zqGlgzrLQVDOakig9WD1QhZbl1AsfkDgTU,162 +torch/backends/kleidiai/__pycache__/__init__.cpython-310.pyc,, +torch/backends/mha/__init__.py,sha256=tUmUrm0Z3I5dnDnhSbuDgZifGDemdgPrdQdsokvVssA,718 +torch/backends/mha/__pycache__/__init__.cpython-310.pyc,, +torch/backends/miopen/__init__.py,sha256=T9aQ5QNnKy9jBHXRZZQD3E3sQ_lbPFYkYx5gX7VRGTU,1208 +torch/backends/miopen/__pycache__/__init__.cpython-310.pyc,, +torch/backends/mkl/__init__.py,sha256=-aUaL92VTn3OIwzTWKKEtlBHDVdmDhkOixHlt5pm0-w,1783 +torch/backends/mkl/__pycache__/__init__.cpython-310.pyc,, +torch/backends/mkldnn/__init__.py,sha256=OCUxHb7MQy0YFhOF_U8UiJYrtivUkZwTnp93l9Q7yn4,4324 +torch/backends/mkldnn/__pycache__/__init__.cpython-310.pyc,, +torch/backends/mps/__init__.py,sha256=xUcfJYo3-Ow3DYeIItP9SVSYlHcWKE9fariDx76S5PE,2131 +torch/backends/mps/__pycache__/__init__.cpython-310.pyc,, +torch/backends/nnpack/__init__.py,sha256=6cApdM4SVAbns4TuVAuFI9sXskhu7piYVsmP4rqpdOA,837 +torch/backends/nnpack/__pycache__/__init__.cpython-310.pyc,, +torch/backends/openmp/__init__.py,sha256=h6ebEMpGQavTuGZ3eJVK4JMUMMUgTYcrmvHxh_Fcgy8,157 +torch/backends/openmp/__pycache__/__init__.cpython-310.pyc,, +torch/backends/opt_einsum/__init__.py,sha256=xdL9w-v1UteyrJPFvVheYlxNqeTB7Z2HLpanp5mgMkw,3836 +torch/backends/opt_einsum/__pycache__/__init__.cpython-310.pyc,, +torch/backends/quantized/__init__.py,sha256=vD2Ds81mKtQGrMrAYy1FAo_OPfyzvhDObF276kT_t-U,1861 +torch/backends/quantized/__pycache__/__init__.cpython-310.pyc,, +torch/backends/xeon/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/backends/xeon/__pycache__/__init__.cpython-310.pyc,, +torch/backends/xeon/__pycache__/run_cpu.cpython-310.pyc,, +torch/backends/xeon/run_cpu.py,sha256=GRu5c6eDG2B2dHc1-h_PWhPz93MesSs3GslKa37DbJM,37716 +torch/backends/xnnpack/__init__.py,sha256=BNL7CNyTlaTNxu4JVDE8VZgiu16mRO6JpZeQ0Ns3Nr8,702 +torch/backends/xnnpack/__pycache__/__init__.cpython-310.pyc,, +torch/bin/protoc,sha256=3bp5l04TKdbFO_amHeyxygX8snD_nnVAA4m4kI78zoo,5285920 +torch/bin/protoc-3.13.0.0,sha256=3bp5l04TKdbFO_amHeyxygX8snD_nnVAA4m4kI78zoo,5285920 +torch/bin/torch_shm_manager,sha256=NsryBSC7_Nu3yw9oVSzec14pyTs5cdQVQWygff-Gb-M,44888 +torch/compiler/__init__.py,sha256=hGE7EyGy5Ba9ET--iY6NZcn7pxoFxqznVbeBLpjtn10,25023 +torch/compiler/__pycache__/__init__.cpython-310.pyc,, +torch/compiler/__pycache__/_cache.cpython-310.pyc,, +torch/compiler/__pycache__/config.cpython-310.pyc,, +torch/compiler/_cache.py,sha256=kAZi265_pOj6rJxeQIPyUQrAYhp-NzfRG1FT0hyVWLw,11005 +torch/compiler/config.py,sha256=zI_5lf5OkBWln8ZDFO7Wu7Vcu8yWIJpjDuHZomG4JDU,10764 +torch/contrib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/contrib/__pycache__/__init__.cpython-310.pyc,, +torch/contrib/__pycache__/_tensorboard_vis.cpython-310.pyc,, +torch/contrib/_tensorboard_vis.py,sha256=NHCnPKg_OGbn9EMjqkTVzALEsShQh2N2-sFsBIDGwEo,5875 +torch/cpu/__init__.py,sha256=XOGpqqeyxF24ao2ASljrqCPp58DSS2ablffWovAU3Gs,4830 +torch/cpu/__pycache__/__init__.cpython-310.pyc,, +torch/cpu/amp/__init__.py,sha256=Q_Rmzfz39fTI2sYsf0hrKJysAR3d2HHMb6KjZlKQurs,103 +torch/cpu/amp/__pycache__/__init__.cpython-310.pyc,, +torch/cpu/amp/__pycache__/autocast_mode.cpython-310.pyc,, +torch/cpu/amp/__pycache__/grad_scaler.cpython-310.pyc,, +torch/cpu/amp/autocast_mode.py,sha256=XC8Kac0XKSERFrp8Oc3W1G77_cOqrRuG_zOWKjua85I,2180 +torch/cpu/amp/grad_scaler.py,sha256=hT5iBOSV285sW4X7s00Mfg7Pi_eJ-sKCS5BT1qSrz-U,958 +torch/csrc/inductor/aoti_runtime/model.h,sha256=bY1OyO-gjO0hChRQiyIP_7lhLEBX4y30zjzC6zD8G7g,2257 +torch/cuda/__init__.py,sha256=AWEZn6A4iKh0RVByfRAmqC8UDI3TGyZaJrQRFffchX0,65752 +torch/cuda/__pycache__/__init__.cpython-310.pyc,, +torch/cuda/__pycache__/_device_limits.cpython-310.pyc,, +torch/cuda/__pycache__/_gpu_trace.cpython-310.pyc,, +torch/cuda/__pycache__/_memory_viz.cpython-310.pyc,, +torch/cuda/__pycache__/_pin_memory_utils.cpython-310.pyc,, +torch/cuda/__pycache__/_sanitizer.cpython-310.pyc,, +torch/cuda/__pycache__/_utils.cpython-310.pyc,, +torch/cuda/__pycache__/comm.cpython-310.pyc,, +torch/cuda/__pycache__/gds.cpython-310.pyc,, +torch/cuda/__pycache__/graphs.cpython-310.pyc,, +torch/cuda/__pycache__/green_contexts.cpython-310.pyc,, +torch/cuda/__pycache__/jiterator.cpython-310.pyc,, +torch/cuda/__pycache__/memory.cpython-310.pyc,, +torch/cuda/__pycache__/nccl.cpython-310.pyc,, +torch/cuda/__pycache__/nvtx.cpython-310.pyc,, +torch/cuda/__pycache__/profiler.cpython-310.pyc,, +torch/cuda/__pycache__/random.cpython-310.pyc,, +torch/cuda/__pycache__/sparse.cpython-310.pyc,, +torch/cuda/__pycache__/streams.cpython-310.pyc,, +torch/cuda/__pycache__/tunable.cpython-310.pyc,, +torch/cuda/_device_limits.py,sha256=qTOnoddNgfai8uaWYnMkU-vkol7sbl_LdJ2v8nRBkZc,5500 +torch/cuda/_gpu_trace.py,sha256=OMYsQlXjF7PvEOGCaMWw__K_iwQYbilVdRV6xoJZvDI,2386 +torch/cuda/_memory_viz.py,sha256=32q-EdkhakqUBPFPqMYgoErOK1Vh_zzDYir-7uGSCBM,28217 +torch/cuda/_pin_memory_utils.py,sha256=rXT-CCaJTAVWeArykaJwa7Mf0CarSmdhJoYsqZ8crbE,747 +torch/cuda/_sanitizer.py,sha256=XUaLXvv-rB9j_7p5reuBssc9a6tQwANn9j4QstVhA3U,24179 +torch/cuda/_utils.py,sha256=j8pgeGXfKEgwdn8oaI8XKeEIg7QIYU6IZET5kARbOD8,19123 +torch/cuda/amp/__init__.py,sha256=cyLIhZXcuKMKb54GjtdhC0GvA1r018SNByosz5S0gFg,298 +torch/cuda/amp/__pycache__/__init__.cpython-310.pyc,, +torch/cuda/amp/__pycache__/autocast_mode.cpython-310.pyc,, +torch/cuda/amp/__pycache__/common.cpython-310.pyc,, +torch/cuda/amp/__pycache__/grad_scaler.cpython-310.pyc,, +torch/cuda/amp/autocast_mode.py,sha256=sVhM2WjWcFXHOp-_6l5ycFZHOUfSsqS5ee0SsBISgYc,3477 +torch/cuda/amp/common.py,sha256=rPnt6OLsROsahVbMyX5w5Fl3R4G6VUiSl5uioKuDEFg,230 +torch/cuda/amp/grad_scaler.py,sha256=WTG3BGVvo4ifizDYTNTq18lRp_CkqVbYS7Kv5N9n6ag,1073 +torch/cuda/comm.py,sha256=DjabyiIf7WmKgD84HmP4_XYd3Cau_7X_E7dcW1UAUjg,344 +torch/cuda/gds.py,sha256=lihiPb5nn1SSfVSVnDkLEMGs-DNkJCTA_5vRDHyzt5g,5833 +torch/cuda/graphs.py,sha256=YXGcJ9pWz5rMk1sj-4nIzF4qbOs7mtjIxLcmsy4AH4c,28165 +torch/cuda/green_contexts.py,sha256=4_xHFjaS_stq-OQ202_waQvrqDQLXJk0mUCq3IEbVTc,1558 +torch/cuda/jiterator.py,sha256=tyYdZl563johqNK19E-oQm2ZAeob_EgWaqw7yzpuUYU,6861 +torch/cuda/memory.py,sha256=oTXvSfdxsbnMmgtX3vGjRuaJG59ktAuMo0nh1LoDAv8,54335 +torch/cuda/nccl.py,sha256=2d7KestFcCVWGeZj9gGbTrnMbIyWtrrgCgvrMfGqHbM,4591 +torch/cuda/nvtx.py,sha256=iAOj9LvGDv47y6bctZPrfyp6OeAyg4mqP17TtvXIrvg,3705 +torch/cuda/profiler.py,sha256=pf33aSDw7WVqCTuI6rWbV3IlU5mAuUx46-vHRkqHsCw,2401 +torch/cuda/random.py,sha256=zkgGFMIOSDmXrKs4XgWOCNpZqqqZGOhWMyypEXwjMlU,5441 +torch/cuda/sparse.py,sha256=H912FRisikGM9SSVDQQq-YX5TNIilBYBZs1AwmIv3GQ,67 +torch/cuda/streams.py,sha256=yMs13M9YaFpwJaOvHzCC0nS3sT5CzIsPRgmgJF7pDHs,10193 +torch/cuda/tunable.py,sha256=dwgn3lRT2DqK74OmcL7aUC031pSNRL2yRnRWEyssTSk,30588 +torch/distributed/__init__.py,sha256=vGi5OlTmThojCCAYFovIE1inhskpnZVOXp20QsDQV40,5516 +torch/distributed/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/__pycache__/_checkpointable.cpython-310.pyc,, +torch/distributed/__pycache__/_composable_state.cpython-310.pyc,, +torch/distributed/__pycache__/_dist2.cpython-310.pyc,, +torch/distributed/__pycache__/_functional_collectives.cpython-310.pyc,, +torch/distributed/__pycache__/_functional_collectives_impl.cpython-310.pyc,, +torch/distributed/__pycache__/_mesh_layout.cpython-310.pyc,, +torch/distributed/__pycache__/_serialization.cpython-310.pyc,, +torch/distributed/__pycache__/_state_dict_utils.cpython-310.pyc,, +torch/distributed/__pycache__/argparse_util.cpython-310.pyc,, +torch/distributed/__pycache__/c10d_logger.cpython-310.pyc,, +torch/distributed/__pycache__/collective_utils.cpython-310.pyc,, +torch/distributed/__pycache__/constants.cpython-310.pyc,, +torch/distributed/__pycache__/device_mesh.cpython-310.pyc,, +torch/distributed/__pycache__/distributed_c10d.cpython-310.pyc,, +torch/distributed/__pycache__/launch.cpython-310.pyc,, +torch/distributed/__pycache__/logging_handlers.cpython-310.pyc,, +torch/distributed/__pycache__/remote_device.cpython-310.pyc,, +torch/distributed/__pycache__/rendezvous.cpython-310.pyc,, +torch/distributed/__pycache__/run.cpython-310.pyc,, +torch/distributed/__pycache__/utils.cpython-310.pyc,, +torch/distributed/_checkpointable.py,sha256=VqtUDzJDcTeMUFOguRIo_AvLRXg4n4U73-frKynBqo8,1305 +torch/distributed/_composable/__init__.py,sha256=SUm5fu8Tg24Upb5iHCV849oZSrrtSacaG-7T7A5L2qA,125 +torch/distributed/_composable/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/_composable/__pycache__/checkpoint_activation.cpython-310.pyc,, +torch/distributed/_composable/__pycache__/contract.cpython-310.pyc,, +torch/distributed/_composable/__pycache__/replicate.cpython-310.pyc,, +torch/distributed/_composable/__pycache__/replicate_with_fsdp.cpython-310.pyc,, +torch/distributed/_composable/checkpoint_activation.py,sha256=Mu7aQd4EI12f6CEywNwoy0EGIoJbqQWfLm7wVuPjDgU,4785 +torch/distributed/_composable/contract.py,sha256=TKipC-ESdVqFZuEYyFdVMkcPbPX-wMQ_H_zCIrKT3O0,10908 +torch/distributed/_composable/fsdp/__init__.py,sha256=PAE0ViGvjHO65XbIe-CM5BgRx9KNsVL4xU7QRUyqL9M,169 +torch/distributed/_composable/fsdp/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/_composable/fsdp/__pycache__/fully_shard.cpython-310.pyc,, +torch/distributed/_composable/fsdp/fully_shard.py,sha256=LggyTExDS-LXmmZeCoSp-GvlMKOmRulWv6k4aPyYsWM,240 +torch/distributed/_composable/replicate.py,sha256=hkSpkA1jS6wEAx0b6LkjHDShZf6YKDssiL9VllwM7sE,9199 +torch/distributed/_composable/replicate_with_fsdp.py,sha256=oWrD488_18X51ZWm4-43-UqmuJWHkCSfV0yNg7w40ZI,14229 +torch/distributed/_composable_state.py,sha256=C30tKapxG8FKzxfl-ApNe5cE-oSqXVpiSzWCs7nyRME,1446 +torch/distributed/_dist2.py,sha256=us0LVkzxrelZO7rlZhV4vYf5HTNgHKenJGcAJefh_40,4835 +torch/distributed/_functional_collectives.py,sha256=NSuUewhlQFgIkpR3Fj4X1QMfzTvMrO6eLRouXqXk8Yc,46893 +torch/distributed/_functional_collectives_impl.py,sha256=9RRK_t6qpf2Fr4frcY5WF5Sn8WHX9Z5tQOyjlD3pGac,3235 +torch/distributed/_local_tensor/__init__.py,sha256=uAkZIq2P9PeOneCqurvk_jqcZW_MlzEJiy-CmE3tcQ8,75539 +torch/distributed/_local_tensor/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/_local_tensor/__pycache__/_c10d.cpython-310.pyc,, +torch/distributed/_local_tensor/_c10d.py,sha256=z0iM2F5X6rIpJMR7lV2Ayx-V1XuLHGktgGlCHo9q-Zs,40347 +torch/distributed/_mesh_layout.py,sha256=1ul-AaigK9HtH6l-D9ZhgASyfXhHLWFTAktOCR_y5FY,12506 +torch/distributed/_pycute/__init__.py,sha256=7Rjy64t4ztEB5BNIFIjFPaYxv1afzff1HcKLBtnPYx8,2456 +torch/distributed/_pycute/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/_pycute/__pycache__/int_tuple.cpython-310.pyc,, +torch/distributed/_pycute/__pycache__/layout.cpython-310.pyc,, +torch/distributed/_pycute/__pycache__/typing.cpython-310.pyc,, +torch/distributed/_pycute/int_tuple.py,sha256=AUcR3nw2Fdvg2gS0ugbuflpvDC8kPfCmDArlX4CPFBI,9780 +torch/distributed/_pycute/layout.py,sha256=3_jNjNihFWKqvUpvqTLWlpa1yCvEds8vn7OSzUcZvLg,17923 +torch/distributed/_pycute/typing.py,sha256=0kzCgBGBRRt1hfAACBnwFdC9g11Ujh8dozJ5GAd9tDw,2062 +torch/distributed/_serialization.py,sha256=nXtpB29C_HiU3WCeWcEISJCAdN0FbOFNAyx3YxjUwaw,4584 +torch/distributed/_shard/__init__.py,sha256=9mrjpti4iifWb8jnGoZypHH0ovdZg3A2KQnxg6BACKI,87 +torch/distributed/_shard/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/_shard/__pycache__/_utils.cpython-310.pyc,, +torch/distributed/_shard/__pycache__/api.cpython-310.pyc,, +torch/distributed/_shard/__pycache__/common_op_utils.cpython-310.pyc,, +torch/distributed/_shard/__pycache__/metadata.cpython-310.pyc,, +torch/distributed/_shard/__pycache__/op_registry_utils.cpython-310.pyc,, +torch/distributed/_shard/__pycache__/sharder.cpython-310.pyc,, +torch/distributed/_shard/_utils.py,sha256=ra_iuevX3gIRVWOz9tql3hLtLRm0JXzeREiL9vwVm14,1070 +torch/distributed/_shard/api.py,sha256=hsDn-zXLsKOR-_exVqTGkILCa-B3lSzU8u_FYaHQd2M,12365 +torch/distributed/_shard/checkpoint/__init__.py,sha256=kILV09-2Glss17itgmv1SbBq7hp2Y7HLUugCZRGYCFE,584 +torch/distributed/_shard/checkpoint/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/_shard/common_op_utils.py,sha256=kj53BqGnob9GRuoRgzn1MXOAmtFRvy_7nzXdJA_1Qrg,2148 +torch/distributed/_shard/metadata.py,sha256=krJyeG9SY2KiJtVxUq4th4qDFUR4WbW5j01VA9RO8bA,2168 +torch/distributed/_shard/op_registry_utils.py,sha256=aK7aBTzgR298AvchxXB1VNdeIT6UCO5emnOoOadjM-I,1031 +torch/distributed/_shard/sharded_optim/__init__.py,sha256=23n5rJ4CKIZb1TwXlI7cX6DgOURqKO5eiM7PJbyi9aY,1863 +torch/distributed/_shard/sharded_optim/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/_shard/sharded_optim/__pycache__/api.cpython-310.pyc,, +torch/distributed/_shard/sharded_optim/api.py,sha256=azG0U2MZOpi5qY2TyEy0qyFgNemadga_bSOu1ooL438,4264 +torch/distributed/_shard/sharded_tensor/__init__.py,sha256=uatjwQJIrccr9STR1IqUkrY_hcLNJAf3RPvvbOmY8P8,19247 +torch/distributed/_shard/sharded_tensor/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/_shard/sharded_tensor/__pycache__/api.cpython-310.pyc,, +torch/distributed/_shard/sharded_tensor/__pycache__/logger.cpython-310.pyc,, +torch/distributed/_shard/sharded_tensor/__pycache__/logging_handlers.cpython-310.pyc,, +torch/distributed/_shard/sharded_tensor/__pycache__/metadata.cpython-310.pyc,, +torch/distributed/_shard/sharded_tensor/__pycache__/reshard.cpython-310.pyc,, +torch/distributed/_shard/sharded_tensor/__pycache__/shard.cpython-310.pyc,, +torch/distributed/_shard/sharded_tensor/__pycache__/utils.cpython-310.pyc,, +torch/distributed/_shard/sharded_tensor/_ops/__init__.py,sha256=NW4TXyw5RGFCbWfikCuxxCOrWuVIUovX06jI8PgcqNM,498 +torch/distributed/_shard/sharded_tensor/_ops/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/_shard/sharded_tensor/_ops/__pycache__/_common.cpython-310.pyc,, +torch/distributed/_shard/sharded_tensor/_ops/__pycache__/binary_cmp.cpython-310.pyc,, +torch/distributed/_shard/sharded_tensor/_ops/__pycache__/init.cpython-310.pyc,, +torch/distributed/_shard/sharded_tensor/_ops/__pycache__/misc_ops.cpython-310.pyc,, +torch/distributed/_shard/sharded_tensor/_ops/__pycache__/tensor_ops.cpython-310.pyc,, +torch/distributed/_shard/sharded_tensor/_ops/_common.py,sha256=XBtvbcqnmIUAo_U5BrBSRG4-io8XiPqSkpDzd31qWWc,4280 +torch/distributed/_shard/sharded_tensor/_ops/binary_cmp.py,sha256=IQ9RiKLLcj4MsJQLb-PCxVCbDfDmAh06FIqLjoV4kS8,2736 +torch/distributed/_shard/sharded_tensor/_ops/init.py,sha256=FTiOzv9zabjCBZb2FVUP52kVvTDqolQZ9-jPmTd17ew,6072 +torch/distributed/_shard/sharded_tensor/_ops/misc_ops.py,sha256=lp_SXuhFUagN_5bxfmZVeqY0SCMhgnGeLGxLq38qvsg,497 +torch/distributed/_shard/sharded_tensor/_ops/tensor_ops.py,sha256=9PWmRh2uZvcCwRlo9PZrM1Mb9MKfadVy1vmjcNhekrY,7819 +torch/distributed/_shard/sharded_tensor/api.py,sha256=dedQRf2QfCM40RYZyOsBNOOo-PaSL90XdvroumYMPC0,55039 +torch/distributed/_shard/sharded_tensor/logger.py,sha256=yny64ZlZ-RzlS5DcX-SAipWqk4xcR2AQO4yl4Vf8B50,1084 +torch/distributed/_shard/sharded_tensor/logging_handlers.py,sha256=nXuxHnOEhAHqqDPhTk_-aLYIVHoZpQEYW_X4N1Qg0_Q,359 +torch/distributed/_shard/sharded_tensor/metadata.py,sha256=92isIH0O2TqPy3Li1CG00R0Ca1BZ40gGM2GHKkJraUA,2998 +torch/distributed/_shard/sharded_tensor/reshard.py,sha256=p_h7m8AxDJ1S2Ei86zcD31DQ89PhpzGOoWEcFU8_TeU,10726 +torch/distributed/_shard/sharded_tensor/shard.py,sha256=zNfIL2FIGBNwPUFcrfusf0E1R-YO04ZoOdcvY6DpXbA,2361 +torch/distributed/_shard/sharded_tensor/utils.py,sha256=eUSQoyScSsp3oVj8WOhw-OeUhlN2d-kDwnQZW8MqW5Y,11731 +torch/distributed/_shard/sharder.py,sha256=nErlvDuMU29IUB6oWB295FaXYj8H42FuDQJXdepvQ1E,901 +torch/distributed/_shard/sharding_plan/__init__.py,sha256=9w-j8bY8VJ0dGT_ueJR2yTfzuech180Xkq0XELn1tKs,47 +torch/distributed/_shard/sharding_plan/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/_shard/sharding_plan/__pycache__/api.cpython-310.pyc,, +torch/distributed/_shard/sharding_plan/api.py,sha256=k3rOiiRTSOf7SVjoScGmP6-AtSOoYpRBLaOjOAdywE4,3602 +torch/distributed/_shard/sharding_spec/__init__.py,sha256=hih75sKTSXPxdyUOS24Vl6K3Q3ht-74l33uAjM4I2Kw,291 +torch/distributed/_shard/sharding_spec/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/_shard/sharding_spec/__pycache__/_internals.cpython-310.pyc,, +torch/distributed/_shard/sharding_spec/__pycache__/api.cpython-310.pyc,, +torch/distributed/_shard/sharding_spec/__pycache__/chunk_sharding_spec.cpython-310.pyc,, +torch/distributed/_shard/sharding_spec/_internals.py,sha256=VZz-fES-f5tcJhWJ1IK4A_NAmOf06wFl8NwA6GBnk-0,8517 +torch/distributed/_shard/sharding_spec/api.py,sha256=fdg-lx3naoZ1m4d8NuMYRcpXHPeFiDn-QEAUdjxFV4U,9848 +torch/distributed/_shard/sharding_spec/chunk_sharding_spec.py,sha256=7E5cpb1Vb0RkslZSIsKyFerk_dOR4Lt-e4JJdCojTUQ,9274 +torch/distributed/_shard/sharding_spec/chunk_sharding_spec_ops/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/distributed/_shard/sharding_spec/chunk_sharding_spec_ops/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/_shard/sharding_spec/chunk_sharding_spec_ops/__pycache__/_common.cpython-310.pyc,, +torch/distributed/_shard/sharding_spec/chunk_sharding_spec_ops/__pycache__/embedding.cpython-310.pyc,, +torch/distributed/_shard/sharding_spec/chunk_sharding_spec_ops/__pycache__/embedding_bag.cpython-310.pyc,, +torch/distributed/_shard/sharding_spec/chunk_sharding_spec_ops/_common.py,sha256=_3pH59pj849e4xr26UAgPUbrZXiwZTI_ytgCCXQ1tGM,13123 +torch/distributed/_shard/sharding_spec/chunk_sharding_spec_ops/embedding.py,sha256=vCSV8WXu8DSO9BQon8hNE8mf4xiqbTAvNv6o_3jpj-U,11209 +torch/distributed/_shard/sharding_spec/chunk_sharding_spec_ops/embedding_bag.py,sha256=Xzw3RLtKoh-JJEZba7siK3rbIm-8O9vWmLYQIxyhIq8,18443 +torch/distributed/_sharded_tensor/__init__.py,sha256=sL4DKv-CLF-9k_iqL2U689tEIJCSKgeWLsKNtjoqjdg,617 +torch/distributed/_sharded_tensor/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/_sharding_spec/__init__.py,sha256=PR7htIt_o1lIdWq_dvH3aXMHA22fj59dOpLT15vx3zE,646 +torch/distributed/_sharding_spec/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/_state_dict_utils.py,sha256=vqlW9_0JXC5p8y7TkSEwgogMchkxZVmjrZPNk8jkzOE,29814 +torch/distributed/_symmetric_memory/__init__.py,sha256=3AA_NKgnOpS3xwb3WhRcKV7nwo2FR9VVxInxrRttSs8,74734 +torch/distributed/_symmetric_memory/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/_symmetric_memory/__pycache__/_nvshmem_triton.cpython-310.pyc,, +torch/distributed/_symmetric_memory/_nvshmem_triton.py,sha256=radx-EsaFaNNwjjR7F6iFM5ePLOXL2cGC-FuE7uMo5A,46974 +torch/distributed/_tensor/__init__.py,sha256=6PYDt4AcQDMnCvbcTdOSNy1z-3kiftGBIGxXnJWT0PM,969 +torch/distributed/_tensor/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/_tensor/__pycache__/api.cpython-310.pyc,, +torch/distributed/_tensor/__pycache__/placement_types.cpython-310.pyc,, +torch/distributed/_tensor/api.py,sha256=ErftfbUVGCDavz7FfrQ0rEVlfYC0XmcTiWyjb4IZ1BY,300 +torch/distributed/_tensor/placement_types.py,sha256=pvi_dHBNCsZl1C-tAM9sdfYOiKb0Jwr3SqyAWMKgfo8,384 +torch/distributed/_tools/__init__.py,sha256=DYVOrVO_6vBZuEuW8EaKdxsR8bFVoE16R2DiGfKo6JM,327 +torch/distributed/_tools/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/_tools/__pycache__/common_utils.cpython-310.pyc,, +torch/distributed/_tools/__pycache__/fake_collectives.cpython-310.pyc,, +torch/distributed/_tools/__pycache__/fsdp2_mem_tracker.cpython-310.pyc,, +torch/distributed/_tools/__pycache__/ilp_utils.cpython-310.pyc,, +torch/distributed/_tools/__pycache__/mem_tracker.cpython-310.pyc,, +torch/distributed/_tools/__pycache__/memory_tracker.cpython-310.pyc,, +torch/distributed/_tools/__pycache__/mod_tracker.cpython-310.pyc,, +torch/distributed/_tools/__pycache__/runtime_estimator.cpython-310.pyc,, +torch/distributed/_tools/__pycache__/sac_estimator.cpython-310.pyc,, +torch/distributed/_tools/__pycache__/sac_ilp.cpython-310.pyc,, +torch/distributed/_tools/common_utils.py,sha256=UDK3OOV1docGbI2ZvLyaQj4_WFDEI9ePHr4ZAYowKgY,1188 +torch/distributed/_tools/fake_collectives.py,sha256=wFyAOAaAO4INTVDxg-oKNd4YSi34HNkTVbY2utxVhLg,11866 +torch/distributed/_tools/fsdp2_mem_tracker.py,sha256=bNSKcSAAN5u4lfEua-gJKG6qwFmHeLCe7WAISugIoo4,25383 +torch/distributed/_tools/ilp_utils.py,sha256=EeWnRKIDlR1Vs2RQXa37Em8_wLlIxQrvydiTC9AfaFM,10094 +torch/distributed/_tools/mem_tracker.py,sha256=n0lU3kDgsM7dxEkK4GWk_Fn3PDrkd8K-c-L2QAaIu1s,42430 +torch/distributed/_tools/memory_tracker.py,sha256=qNQHKwGE7sVbUjrtd0c3zv4hwO6RswSHkHc96G3NUds,11862 +torch/distributed/_tools/mod_tracker.py,sha256=GGqQCn4sX5J9s8ReLPMC4CTpBVgrYB7yXOEamu3LxKw,10267 +torch/distributed/_tools/runtime_estimator.py,sha256=F-7nUmPbRz8AgLpjI8do_ZK9Y0-k96Pb0LiCH_XzcVY,16729 +torch/distributed/_tools/sac_estimator.py,sha256=abtiB-WzOI29Mbir3kevhffeFJj3EiIp8F--RsH5kH4,42311 +torch/distributed/_tools/sac_ilp.py,sha256=gXQAz3ul17XO-ZtY6ZSs0OJpGSNqZyVDP_ikpRyRB8U,11287 +torch/distributed/algorithms/__init__.py,sha256=e5HJMsdSDkPOxNWYUh9YvO26GDODG5PBedTP2-Y16Nw,43 +torch/distributed/algorithms/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/algorithms/__pycache__/join.cpython-310.pyc,, +torch/distributed/algorithms/_checkpoint/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/distributed/algorithms/_checkpoint/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/algorithms/_checkpoint/__pycache__/checkpoint_wrapper.cpython-310.pyc,, +torch/distributed/algorithms/_checkpoint/checkpoint_wrapper.py,sha256=ls-Zo9oOfA9LL5w4bRHk48oeUkDGh8nbug-UezKXd3k,12226 +torch/distributed/algorithms/_comm_hooks/__init__.py,sha256=LkI4VBMJ6_1KGG3Nz0bPxGFOO-ZjfBj-38FNROlJt8Q,131 +torch/distributed/algorithms/_comm_hooks/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/algorithms/_comm_hooks/__pycache__/default_hooks.cpython-310.pyc,, +torch/distributed/algorithms/_comm_hooks/default_hooks.py,sha256=lAqlZiFeVsIH_mPUtOEHp-KXRxILRhuqsqNs2R6P0SQ,7616 +torch/distributed/algorithms/_optimizer_overlap/__init__.py,sha256=zuKlfE0DcQCZm0av9HrJZfXH6R5AzV2K3xrEAAgoVsk,52 +torch/distributed/algorithms/_optimizer_overlap/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/algorithms/_optimizer_overlap/__pycache__/optimizer_overlap.cpython-310.pyc,, +torch/distributed/algorithms/_optimizer_overlap/optimizer_overlap.py,sha256=zkw6dsk0wrK9Nj4-IYQU0q2yH2hzIL2tag5W9ccz9Oc,3753 +torch/distributed/algorithms/_quantization/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/distributed/algorithms/_quantization/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/algorithms/_quantization/__pycache__/quantization.cpython-310.pyc,, +torch/distributed/algorithms/_quantization/quantization.py,sha256=jbL_YAS9g8PVEjCk1hgi0b3A992tKevudfyndlGYWiA,5646 +torch/distributed/algorithms/ddp_comm_hooks/__init__.py,sha256=YiQ_2VSZ1Eba-f2trSVPnAMOHEd7jKVNhPu5ZGTH8WI,4167 +torch/distributed/algorithms/ddp_comm_hooks/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/algorithms/ddp_comm_hooks/__pycache__/ddp_zero_hook.cpython-310.pyc,, +torch/distributed/algorithms/ddp_comm_hooks/__pycache__/debugging_hooks.cpython-310.pyc,, +torch/distributed/algorithms/ddp_comm_hooks/__pycache__/default_hooks.cpython-310.pyc,, +torch/distributed/algorithms/ddp_comm_hooks/__pycache__/mixed_precision_hooks.cpython-310.pyc,, +torch/distributed/algorithms/ddp_comm_hooks/__pycache__/optimizer_overlap_hooks.cpython-310.pyc,, +torch/distributed/algorithms/ddp_comm_hooks/__pycache__/post_localSGD_hook.cpython-310.pyc,, +torch/distributed/algorithms/ddp_comm_hooks/__pycache__/powerSGD_hook.cpython-310.pyc,, +torch/distributed/algorithms/ddp_comm_hooks/__pycache__/quantization_hooks.cpython-310.pyc,, +torch/distributed/algorithms/ddp_comm_hooks/ddp_zero_hook.py,sha256=Hy_T5LUVkaNyqikcSuEFcupcgkNRbZh7fvLGNwoOnoY,19490 +torch/distributed/algorithms/ddp_comm_hooks/debugging_hooks.py,sha256=X49n0X3TnX650I-DeU-XtL_ssKjdYsn0RYyhB2Ndcms,1115 +torch/distributed/algorithms/ddp_comm_hooks/default_hooks.py,sha256=_v7QSzzDWZmzI3SrRu40IPdClkVGfTQrCsISFVy0Kus,7962 +torch/distributed/algorithms/ddp_comm_hooks/mixed_precision_hooks.py,sha256=sc2NnDmQKmSNYyZ6A83-s9DgYBV-YTfmMdrzurNouag,3254 +torch/distributed/algorithms/ddp_comm_hooks/optimizer_overlap_hooks.py,sha256=LXDz72NQAeDRBRvTAIbnb1pdoyG3jUxTHAr5tfWPZn8,6152 +torch/distributed/algorithms/ddp_comm_hooks/post_localSGD_hook.py,sha256=MPpCW3JHvFIqfC3frNnzuATOtlLiML6hXEgM6C8ZeGk,5150 +torch/distributed/algorithms/ddp_comm_hooks/powerSGD_hook.py,sha256=EDCTPG_hDK-1O3Wnk1nQEvJkjovwyfza_66_34Dzy8Q,40498 +torch/distributed/algorithms/ddp_comm_hooks/quantization_hooks.py,sha256=jDQwXM6McOwPUH5S6Sj9H-hV2rqT-NG0c-InuuyBLsM,8318 +torch/distributed/algorithms/join.py,sha256=6jQ657MzCGzWFZQXcWJcx8ht4Og1ySPUfpnXCVwQ-co,13445 +torch/distributed/algorithms/model_averaging/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/distributed/algorithms/model_averaging/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/algorithms/model_averaging/__pycache__/averagers.cpython-310.pyc,, +torch/distributed/algorithms/model_averaging/__pycache__/hierarchical_model_averager.cpython-310.pyc,, +torch/distributed/algorithms/model_averaging/__pycache__/utils.cpython-310.pyc,, +torch/distributed/algorithms/model_averaging/averagers.py,sha256=sNQvYipPY_JNWeF_zqPUCFXcYR8WLHt4ohqbKQdjkdQ,5417 +torch/distributed/algorithms/model_averaging/hierarchical_model_averager.py,sha256=ILK-Ra0ExrJMV1yhygp2dJsBxnBrOykdbJPf044Xx3o,9772 +torch/distributed/algorithms/model_averaging/utils.py,sha256=_H_E5K-EQv2p5RbFiVa8LH7zjds4IlKiwl6pYMv2DAA,3087 +torch/distributed/argparse_util.py,sha256=NFxjw2asYt06aFffcu6rhJpC3FFthwKLu9wvWEm_qQU,3903 +torch/distributed/autograd/__init__.py,sha256=o1YwfjRin8NfYkCjzcdABFT0bGRGAiuYmSLEwmbmeJ4,1931 +torch/distributed/autograd/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/c10d_logger.py,sha256=t7WGbk08OEfiTz_kiPGHy9kKyUlVokqY3BDw2WyZtkk,3185 +torch/distributed/checkpoint/__init__.py,sha256=OCW4GkIntMFO-DI2AK2jx4IH41jZsA338tqZ2NRBo30,826 +torch/distributed/checkpoint/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/_async_executor.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/_async_process_executor.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/_async_thread_executor.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/_checkpointer.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/_consolidate_hf_safetensors.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/_dedup_save_plans.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/_dedup_tensors.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/_extension.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/_fsspec_filesystem.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/_hf_utils.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/_nested_dict.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/_pg_transport.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/_sharded_tensor_utils.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/_state_dict_stager.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/_storage_utils.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/_traverse.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/_version.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/api.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/default_planner.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/filesystem.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/format_utils.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/hf_storage.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/logger.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/logging_handlers.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/metadata.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/optimizer.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/planner.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/planner_helpers.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/quantized_hf_storage.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/resharding.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/staging.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/state_dict.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/state_dict_loader.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/state_dict_saver.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/stateful.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/storage.cpython-310.pyc,, +torch/distributed/checkpoint/__pycache__/utils.cpython-310.pyc,, +torch/distributed/checkpoint/_async_executor.py,sha256=c3GiLIyaLZFCYpPj3-I4vdngnFofkjkc_FARr1fACOM,1209 +torch/distributed/checkpoint/_async_process_executor.py,sha256=PL1gF5w_ofEjRbP5kxUxudYR7e9DTR8a84eD9KcsiMo,18162 +torch/distributed/checkpoint/_async_thread_executor.py,sha256=xab91jSjCOC5RVWF5zgUMyWN0bhmmIQkVgG8GZt7Am4,2476 +torch/distributed/checkpoint/_checkpointer.py,sha256=JXjPk-iN2Lq6KwbS3051QXL3EDBLXPKgsG3f6LXjGvI,3802 +torch/distributed/checkpoint/_consolidate_hf_safetensors.py,sha256=k47uXXRmksWju_RSA1MmBxYR2eEkZjV2Be7851LgyiI,27138 +torch/distributed/checkpoint/_dedup_save_plans.py,sha256=QP__wSP0I0jglKEyPZ_JGXrgHIKSrU6c6Gow8vQTZkk,2754 +torch/distributed/checkpoint/_dedup_tensors.py,sha256=MU2RaM-qHxvn2I-LmNTgvw1cvGwoqItiCHxhb5vNrRM,1991 +torch/distributed/checkpoint/_experimental/__init__.py,sha256=ukQ1Zu9_BedHvl_JQrJhsWKwcJ8nxEYh4_AzvevbT9k,1761 +torch/distributed/checkpoint/_experimental/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/checkpoint/_experimental/__pycache__/barriers.cpython-310.pyc,, +torch/distributed/checkpoint/_experimental/__pycache__/builder.cpython-310.pyc,, +torch/distributed/checkpoint/_experimental/__pycache__/checkpoint_process.cpython-310.pyc,, +torch/distributed/checkpoint/_experimental/__pycache__/checkpoint_reader.cpython-310.pyc,, +torch/distributed/checkpoint/_experimental/__pycache__/checkpoint_writer.cpython-310.pyc,, +torch/distributed/checkpoint/_experimental/__pycache__/checkpointer.cpython-310.pyc,, +torch/distributed/checkpoint/_experimental/__pycache__/config.cpython-310.pyc,, +torch/distributed/checkpoint/_experimental/__pycache__/staging.cpython-310.pyc,, +torch/distributed/checkpoint/_experimental/__pycache__/types.cpython-310.pyc,, +torch/distributed/checkpoint/_experimental/__pycache__/utils.cpython-310.pyc,, +torch/distributed/checkpoint/_experimental/barriers.py,sha256=VFTymLaqeYsGGHE-xZ8EZxlR2fb9CNxw_mLthN-LN4Q,9137 +torch/distributed/checkpoint/_experimental/builder.py,sha256=PYj0wCXINZVb54EZ3qoIM9_S6vGrJfW3_oJTKEqi7K0,6123 +torch/distributed/checkpoint/_experimental/checkpoint_process.py,sha256=iFhS4bo_CcVken-0zBqwrENyInApFLq9F54Br6AZ0H4,13096 +torch/distributed/checkpoint/_experimental/checkpoint_reader.py,sha256=dd-Pcbxo2LkxikcrwYcPdLA2GbCjiI3R4mpK5d1UYrE,8695 +torch/distributed/checkpoint/_experimental/checkpoint_writer.py,sha256=ZWJf72u81qmNYqAjlNoUQAau38ndXaEIJmCI8LcRYBM,5270 +torch/distributed/checkpoint/_experimental/checkpointer.py,sha256=lMe26I13d83VJJEo2rI7LNZxcoVktaU4_NsX_a8xXRc,11948 +torch/distributed/checkpoint/_experimental/config.py,sha256=81BcsUGoE59ibhFW0OQ05Hi4zmqJ2-v9tITPJqMQDTM,1528 +torch/distributed/checkpoint/_experimental/staging.py,sha256=qCPIVEbgl13ZME_fvOqJRyz0vdgoA2tdF73UX1rLNNw,8237 +torch/distributed/checkpoint/_experimental/types.py,sha256=8BI2ouC6nlgXa3nKOjcDPVDZaLwDb__S_f1G79hR9Eg,759 +torch/distributed/checkpoint/_experimental/utils.py,sha256=rIaJLYRF03P1FPH57lo17JUD-b8Kd0NhHer1JdpEZa0,1305 +torch/distributed/checkpoint/_extension.py,sha256=kKW8qv-5Ha0RVWlHQt0_oR71khnFMbFeN9YsZxE1Fvo,7790 +torch/distributed/checkpoint/_fsspec_filesystem.py,sha256=facClh8LSpZwjQpMUowEJZ5hPwIVjz-_ZVrq-x6z-es,5634 +torch/distributed/checkpoint/_hf_utils.py,sha256=yBefhdMEyZWAWCV4zMJX6Js8kdCREhX6v5bq3xvkrEg,2835 +torch/distributed/checkpoint/_nested_dict.py,sha256=IPtO0mCEYB9xT0Il5g4GW978lubbCFCj51Qo9mTDJWo,2273 +torch/distributed/checkpoint/_pg_transport.py,sha256=8uvDnF-OpuM3_MWmN7yewSpsF-0CDo89znWjO-GfANg,13348 +torch/distributed/checkpoint/_sharded_tensor_utils.py,sha256=HZOdtN7SH2D79rgdm2g7BDEacEwTxkAJWZhNtSVv6O0,4144 +torch/distributed/checkpoint/_state_dict_stager.py,sha256=HqUtWLnREbfWI-aCXt-q3VPP1JM5dNU9GNPrMrx0mFs,18624 +torch/distributed/checkpoint/_storage_utils.py,sha256=cUesOcN9IgJZdH1zj76mUgWBSt47FukmXNrQzTt5TO0,1408 +torch/distributed/checkpoint/_traverse.py,sha256=nskZFG4sR-kEMQgCLiGXR3qkdpRTo9NlCnC8TVk0zKw,6966 +torch/distributed/checkpoint/_version.py,sha256=SVGnUOT2LrrOFXySPqUstbulvBXbaUFSyx4e-hEkcH4,122 +torch/distributed/checkpoint/api.py,sha256=2Ic6QbGHRFXIuz1f_OsXrEWHfdfHSTCtCEkhGLReq8Q,1417 +torch/distributed/checkpoint/default_planner.py,sha256=FxHjCqxcc2kcsujzwyVvcV4bYxPOL8iwwsWpMtfm-2w,27460 +torch/distributed/checkpoint/filesystem.py,sha256=o_4jLv0UtsR7VT3LkTridVQeCTcVACeeHmf9Y-7czoE,36953 +torch/distributed/checkpoint/format_utils.py,sha256=aQkFOvNOAhFovS_eGQsJapEDcESIjiGPBvqxZ9hpLfI,10797 +torch/distributed/checkpoint/hf_storage.py,sha256=2Cq4iqo5mG7KQmCEi5pCw-SaZlf70q_5VknFYPpS0mQ,15411 +torch/distributed/checkpoint/logger.py,sha256=N0xKPxzuyAH2g0TyPI_ij48U7z1HvgTXgfWJxcZOO5s,3635 +torch/distributed/checkpoint/logging_handlers.py,sha256=Ky7OdEi5JzxTwc2u34Mq-tX5S-Y0MynrHAc1xe2nCEk,220 +torch/distributed/checkpoint/metadata.py,sha256=KiO9S_t0Qs4gPS5ANGKY7yMTq1mg-_zIsF_5SCu8mco,5631 +torch/distributed/checkpoint/optimizer.py,sha256=tsriwo7MuuhhOIqVWXktB6zHMCimSeQZJqaiY44yh1k,13380 +torch/distributed/checkpoint/planner.py,sha256=-zHLbO-NNiKjmnuXh3L0IguHtMZx6UG5qMDGMrCHJI0,16263 +torch/distributed/checkpoint/planner_helpers.py,sha256=gGIYy_IO2WcsisQw9zo7_aGhxtoCovRqFAbleWluy74,16544 +torch/distributed/checkpoint/quantized_hf_storage.py,sha256=xcniuXfs_EyrXeDYlHG2GiAHfFYT7UlDS3HsU7HF74M,20124 +torch/distributed/checkpoint/resharding.py,sha256=1vF4sTAE5WaZaundzKVOOom7CgKohwF52TUQUoWpVxw,2275 +torch/distributed/checkpoint/staging.py,sha256=g3_WRkUNsHutWabFvuR32vjEzoldPAO1m8iNvpdlOks,19299 +torch/distributed/checkpoint/state_dict.py,sha256=pyfc2J1YorTwFFzWBap64QzmzeVQ1tkedm26nPwk3no,62472 +torch/distributed/checkpoint/state_dict_loader.py,sha256=zzMIo57w1_1oMDFeKkCg1o-2uEKN26OEtYqyZ4M7Sx0,14360 +torch/distributed/checkpoint/state_dict_saver.py,sha256=wq4DDzQWwPgnvgXWmzGrqSQepWYLtktAbty5eA9pmys,18596 +torch/distributed/checkpoint/stateful.py,sha256=1cJTGrO_TPFeSguyQhPYCw87ph_QjJRafyAVgx9u7bI,1061 +torch/distributed/checkpoint/storage.py,sha256=sbt4htU1eFZSSF9ckdKmVUuQjN9-WEqaBfeYGbI92VY,9834 +torch/distributed/checkpoint/utils.py,sha256=on7PsED_QFozyNCSgaOUVn_kPYNVz1eDtfYxsGpelPs,16563 +torch/distributed/collective_utils.py,sha256=AZZZe2iZATYieZl7xK61ZvYwzgs6Jc7eK4UZvtcGFJI,12113 +torch/distributed/constants.py,sha256=V6gthYXMG3nf08ObvYceJaNu43yLAVCZ6LXhCGAaKMo,1198 +torch/distributed/debug/__init__.py,sha256=NZEqaWw6BFGra4JuXdoNz0mwgfXrlTi9TG7_EseN5XY,2742 +torch/distributed/debug/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/debug/__pycache__/_frontend.cpython-310.pyc,, +torch/distributed/debug/__pycache__/_handlers.cpython-310.pyc,, +torch/distributed/debug/__pycache__/_store.cpython-310.pyc,, +torch/distributed/debug/_frontend.py,sha256=0sEpFWrxAAM2nEp8JwXUsCHniVx6cjuXCbJ7Xul4pJ8,17345 +torch/distributed/debug/_handlers.py,sha256=k9NoN59EZUgvdL41w2qfXRvSgn_WHk_tp8HNEgSq1qQ,776 +torch/distributed/debug/_store.py,sha256=mjjNaR1pizABV2Q8w9Ap9COIewtpt76VyIiwJMXj7gM,532 +torch/distributed/device_mesh.py,sha256=Q4yThyvANaA7WJ1iInyn_WlgBvqwut7FKVLc9h5EDng,64989 +torch/distributed/distributed_c10d.py,sha256=MRVTRCM653NgpjC76s8bQ8-hjxkjzyEDzVsxQts57Fw,247572 +torch/distributed/elastic/__init__.py,sha256=QMPilFK2QkDj895i4fqrtE5bzyO55GJkV4t4EM_1Qzw,3654 +torch/distributed/elastic/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/elastic/__pycache__/control_plane.cpython-310.pyc,, +torch/distributed/elastic/agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/distributed/elastic/agent/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/elastic/agent/server/__init__.py,sha256=p6OmZ3UC2RN276H3JLUZm0ygZ1GBWRcOOq4OQwozTo4,1401 +torch/distributed/elastic/agent/server/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/elastic/agent/server/__pycache__/api.cpython-310.pyc,, +torch/distributed/elastic/agent/server/__pycache__/health_check_server.cpython-310.pyc,, +torch/distributed/elastic/agent/server/__pycache__/local_elastic_agent.cpython-310.pyc,, +torch/distributed/elastic/agent/server/api.py,sha256=09Os9H2FwD1SISr6Vtjf11_8K4vzfmaFafM-1qpFgWw,38927 +torch/distributed/elastic/agent/server/health_check_server.py,sha256=-HrqCGGbZMklUL6Y0lWt6iwZEVNx7GXknKnB8KLCTtg,1688 +torch/distributed/elastic/agent/server/local_elastic_agent.py,sha256=l7sJdApg68boS-m2YVq-tARaDmEU3YNC1NsMpDGGEWw,18752 +torch/distributed/elastic/control_plane.py,sha256=EeYAL-0jl46KYrj16DDO8JVUybqqu7Jgwx7bm28VWmI,1181 +torch/distributed/elastic/events/__init__.py,sha256=-JZ75BaqO7Lz3cHReIQwq8o1xTd4cXRHWVGmsZubTv4,5367 +torch/distributed/elastic/events/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/elastic/events/__pycache__/api.cpython-310.pyc,, +torch/distributed/elastic/events/__pycache__/handlers.cpython-310.pyc,, +torch/distributed/elastic/events/api.py,sha256=68ornG0E1O7a3VxdO_MNbj09Cflef65kV_GPsa3fHcQ,3313 +torch/distributed/elastic/events/handlers.py,sha256=GVwoHQQFcpFeDW6eobtpDADBX8eIxYCN0tsiFO2pcDQ,556 +torch/distributed/elastic/metrics/__init__.py,sha256=HPZvYUDGNnxv9xqVW0xib9OBj1aBCYejIM4PembVACQ,4899 +torch/distributed/elastic/metrics/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/elastic/metrics/__pycache__/api.cpython-310.pyc,, +torch/distributed/elastic/metrics/api.py,sha256=KGdw_W79IGlKYN7GM_qYTZ_0dGjO5CthWLxhgBY1d4E,5751 +torch/distributed/elastic/multiprocessing/__init__.py,sha256=5vx85lNgWFLillVNsaUwj8a6vISu48sVhRKlIiBlEBw,8698 +torch/distributed/elastic/multiprocessing/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/elastic/multiprocessing/__pycache__/api.cpython-310.pyc,, +torch/distributed/elastic/multiprocessing/__pycache__/redirects.cpython-310.pyc,, +torch/distributed/elastic/multiprocessing/__pycache__/tail_log.cpython-310.pyc,, +torch/distributed/elastic/multiprocessing/api.py,sha256=6OW9ISX5_Qw62NEDrgW1hILDa5g-E-ur0q-wE0ta7Dg,38539 +torch/distributed/elastic/multiprocessing/errors/__init__.py,sha256=f5AzhlxzwJk-v5jHNZQtTxP8Km2E2jwIhgeaF9Uw9ZI,14707 +torch/distributed/elastic/multiprocessing/errors/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/elastic/multiprocessing/errors/__pycache__/error_handler.cpython-310.pyc,, +torch/distributed/elastic/multiprocessing/errors/__pycache__/handlers.cpython-310.pyc,, +torch/distributed/elastic/multiprocessing/errors/error_handler.py,sha256=HhOFjIQlCdKYwyt1CGXczy98P6Pg7sR0KN1HSarAtSs,6675 +torch/distributed/elastic/multiprocessing/errors/handlers.py,sha256=ea-3iQUTQRDp_YAUhk-3hZ2HQyCPqz_2iiL5_xfD9Q8,464 +torch/distributed/elastic/multiprocessing/redirects.py,sha256=areeeQwpnChPbp0uUJ7i-cyc7w8KEqn8FtyVIT57OJ0,2764 +torch/distributed/elastic/multiprocessing/subprocess_handler/__init__.py,sha256=pz2OzruD8OBIFFxiI1_TLy0Bd8LDBKNLowzW1_jZUSs,523 +torch/distributed/elastic/multiprocessing/subprocess_handler/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/elastic/multiprocessing/subprocess_handler/__pycache__/handlers.cpython-310.pyc,, +torch/distributed/elastic/multiprocessing/subprocess_handler/__pycache__/subprocess_handler.cpython-310.pyc,, +torch/distributed/elastic/multiprocessing/subprocess_handler/handlers.py,sha256=iqetloWZn4hjEoGUlefmHE1RCAP2DF1ht2MZ3Pu96aA,849 +torch/distributed/elastic/multiprocessing/subprocess_handler/subprocess_handler.py,sha256=ytf7YyjmgImWbL7dY1gn3JIki9ySJTIJzH3UT6L1fIg,2729 +torch/distributed/elastic/multiprocessing/tail_log.py,sha256=ti_DMcW6QUi1guQ5SRFVFGZg2eqBTbAV0vkp41fYOrM,5320 +torch/distributed/elastic/rendezvous/__init__.py,sha256=tcH-Q6v-bdJTWunq4JT-crJ7TxTh9jxEmdzt3vtRBbI,6269 +torch/distributed/elastic/rendezvous/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/elastic/rendezvous/__pycache__/_etcd_stub.cpython-310.pyc,, +torch/distributed/elastic/rendezvous/__pycache__/api.cpython-310.pyc,, +torch/distributed/elastic/rendezvous/__pycache__/c10d_rendezvous_backend.cpython-310.pyc,, +torch/distributed/elastic/rendezvous/__pycache__/dynamic_rendezvous.cpython-310.pyc,, +torch/distributed/elastic/rendezvous/__pycache__/etcd_rendezvous.cpython-310.pyc,, +torch/distributed/elastic/rendezvous/__pycache__/etcd_rendezvous_backend.cpython-310.pyc,, +torch/distributed/elastic/rendezvous/__pycache__/etcd_server.cpython-310.pyc,, +torch/distributed/elastic/rendezvous/__pycache__/etcd_store.cpython-310.pyc,, +torch/distributed/elastic/rendezvous/__pycache__/registry.cpython-310.pyc,, +torch/distributed/elastic/rendezvous/__pycache__/static_tcp_rendezvous.cpython-310.pyc,, +torch/distributed/elastic/rendezvous/__pycache__/utils.cpython-310.pyc,, +torch/distributed/elastic/rendezvous/_etcd_stub.py,sha256=r_XAqXKOwrTjmltbMyiKUPVsHtMe7sylfnzdVYvaVek,1998 +torch/distributed/elastic/rendezvous/api.py,sha256=VJD9NR3yEtrLM5AOj5avFe6kXDZVCoRS4nUqB9DH4eg,13084 +torch/distributed/elastic/rendezvous/c10d_rendezvous_backend.py,sha256=3ltlhI2UYHFH0bHBqm__GTLU9OcXEhpAMvaZKRU0VzA,10738 +torch/distributed/elastic/rendezvous/dynamic_rendezvous.py,sha256=lNu13ybaxXYMo9Hdjb2_Z-wsKvzE8OKzJ7KxKQCyU1Q,49376 +torch/distributed/elastic/rendezvous/etcd_rendezvous.py,sha256=80GDdTUJyX4Vb-X9HAoaPQm5xT9a8AorazRiRzvKUo8,43506 +torch/distributed/elastic/rendezvous/etcd_rendezvous_backend.py,sha256=4AruXChEmCCkVjonf27LHI9pb5o2mO7anC9xy_k1GPU,7348 +torch/distributed/elastic/rendezvous/etcd_server.py,sha256=P_u_EHl3dkMha9esvnmw8wfOwmdblgqcN7NzyMIN72c,8415 +torch/distributed/elastic/rendezvous/etcd_store.py,sha256=l1t21fly6Blfox_tVG9CEAAVIB6c4HqT3SEd7gODUN8,7221 +torch/distributed/elastic/rendezvous/registry.py,sha256=aZoI2aWaZSZxVlPusfpTyZadxxxcjlZWb98zwGozuKw,2922 +torch/distributed/elastic/rendezvous/static_tcp_rendezvous.py,sha256=Vni_9RgotHveIpmEOwUGcGbScwsx-mh9VwtHFr-XNPs,3652 +torch/distributed/elastic/rendezvous/utils.py,sha256=TP-dMF-YoQHP0FETNj_QEpUzo_EhyMSacZYvBqlmDts,8373 +torch/distributed/elastic/timer/__init__.py,sha256=IQ79GKrQX_UKab_Lbp0uqMuLgb2QzDQgd9EX7NJO5aU,1750 +torch/distributed/elastic/timer/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/elastic/timer/__pycache__/api.cpython-310.pyc,, +torch/distributed/elastic/timer/__pycache__/debug_info_logging.cpython-310.pyc,, +torch/distributed/elastic/timer/__pycache__/file_based_local_timer.cpython-310.pyc,, +torch/distributed/elastic/timer/__pycache__/local_timer.cpython-310.pyc,, +torch/distributed/elastic/timer/api.py,sha256=Cx5-79KRjjTub8YiPsIUxqTRoRyecOguChKSADUAz58,9558 +torch/distributed/elastic/timer/debug_info_logging.py,sha256=6mix9Su3bo9BVTM_QXNz75c-WAbDLL8jNbojKbjdEsE,610 +torch/distributed/elastic/timer/file_based_local_timer.py,sha256=OXtzd_N19NA27YJ986lupwk4b9dRB5O5Lklzfr5VepM,16389 +torch/distributed/elastic/timer/local_timer.py,sha256=yaOwmn9FXPTMJ57ubJ0K7TYkWkAeCqY4WF9pMpjrXMg,4282 +torch/distributed/elastic/utils/__init__.py,sha256=ztvtzgzf5pR1ixbbYfY0lGx85VhyhJuHH8er7-XNVpE,318 +torch/distributed/elastic/utils/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/elastic/utils/__pycache__/api.cpython-310.pyc,, +torch/distributed/elastic/utils/__pycache__/distributed.cpython-310.pyc,, +torch/distributed/elastic/utils/__pycache__/log_level.cpython-310.pyc,, +torch/distributed/elastic/utils/__pycache__/logging.cpython-310.pyc,, +torch/distributed/elastic/utils/__pycache__/store.cpython-310.pyc,, +torch/distributed/elastic/utils/api.py,sha256=QMd6BGMe0lVXYnOSMLinlB3Hh_EJn2s6R3Cre2K2l0s,1705 +torch/distributed/elastic/utils/data/__init__.py,sha256=tF96JUuxZmWRkvGOzP7tbZT6s8CKNz29F6O_OYTcL3o,372 +torch/distributed/elastic/utils/data/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/elastic/utils/data/__pycache__/cycling_iterator.cpython-310.pyc,, +torch/distributed/elastic/utils/data/__pycache__/elastic_distributed_sampler.cpython-310.pyc,, +torch/distributed/elastic/utils/data/cycling_iterator.py,sha256=T74d2dY-bCXqIYc0kHK0EMCFYAO54c-5otSzMHusDtQ,1643 +torch/distributed/elastic/utils/data/elastic_distributed_sampler.py,sha256=xKVhe02hp5igjSKL-jqo4aGbkoZ_cZyR2GLFQPZcJto,3056 +torch/distributed/elastic/utils/distributed.py,sha256=AOinZvHARbf5sGXBN7Ic9mI7cPmiNJ4Y4UgmZrTOJaE,5892 +torch/distributed/elastic/utils/log_level.py,sha256=1pOw0YanV5aPrMGwqkATk8OTXm6iLF2iuUYKbUf1b6Q,339 +torch/distributed/elastic/utils/logging.py,sha256=JNmQJu1-C2oM9MrBMmyJR5T32RXhqbSSnAV8I99kWo0,2260 +torch/distributed/elastic/utils/store.py,sha256=PpqwjpbzPgqKFRTAWTbrEQCuqkgdtHjkp1eZxpvmjFI,7241 +torch/distributed/flight_recorder/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/distributed/flight_recorder/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/flight_recorder/__pycache__/fr_trace.cpython-310.pyc,, +torch/distributed/flight_recorder/components/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/distributed/flight_recorder/components/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/flight_recorder/components/__pycache__/builder.cpython-310.pyc,, +torch/distributed/flight_recorder/components/__pycache__/config_manager.cpython-310.pyc,, +torch/distributed/flight_recorder/components/__pycache__/fr_logger.cpython-310.pyc,, +torch/distributed/flight_recorder/components/__pycache__/loader.cpython-310.pyc,, +torch/distributed/flight_recorder/components/__pycache__/types.cpython-310.pyc,, +torch/distributed/flight_recorder/components/__pycache__/utils.cpython-310.pyc,, +torch/distributed/flight_recorder/components/builder.py,sha256=zI3qxkZMrq_t3ytiKvNjedw1O7xGmT6oK9nwzg6o_EY,17916 +torch/distributed/flight_recorder/components/config_manager.py,sha256=GX3TCixEBQMzZY9QdneLcR5YNqvnlWCuoNtBRDs6q78,3906 +torch/distributed/flight_recorder/components/fr_logger.py,sha256=DLnrDoW3Pgy0oBUjGpKWo_LCmiWQuJ59MyWlsv9Zknw,1528 +torch/distributed/flight_recorder/components/loader.py,sha256=5KHaKlNMuqu9cuIZXa5Qd-eZ04Tx65KLthqL57iSNuA,2896 +torch/distributed/flight_recorder/components/types.py,sha256=CtAl2W_EEjvoamnP4O_Zim4DSQGX62CLcRBXyonKLWw,22794 +torch/distributed/flight_recorder/components/utils.py,sha256=NLMxIt25MI7aPASU1nQLymHchy06IeaRMp543bbdg98,29430 +torch/distributed/flight_recorder/fr_trace.py,sha256=dyBcOa3mGqg71gEuD93n7-lcCnUDIhPQGhjKNQlVXwU,3002 +torch/distributed/fsdp/__init__.py,sha256=YLpbErFqp00Tko3qn4UTwaPHmNXq4LahWeX6Vhq2ZEs,1835 +torch/distributed/fsdp/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/fsdp/__pycache__/_common_utils.cpython-310.pyc,, +torch/distributed/fsdp/__pycache__/_debug_utils.cpython-310.pyc,, +torch/distributed/fsdp/__pycache__/_dynamo_utils.cpython-310.pyc,, +torch/distributed/fsdp/__pycache__/_exec_order_utils.cpython-310.pyc,, +torch/distributed/fsdp/__pycache__/_flat_param.cpython-310.pyc,, +torch/distributed/fsdp/__pycache__/_fsdp_extensions.cpython-310.pyc,, +torch/distributed/fsdp/__pycache__/_init_utils.cpython-310.pyc,, +torch/distributed/fsdp/__pycache__/_limiter_utils.cpython-310.pyc,, +torch/distributed/fsdp/__pycache__/_optim_utils.cpython-310.pyc,, +torch/distributed/fsdp/__pycache__/_runtime_utils.cpython-310.pyc,, +torch/distributed/fsdp/__pycache__/_shard_utils.cpython-310.pyc,, +torch/distributed/fsdp/__pycache__/_state_dict_utils.cpython-310.pyc,, +torch/distributed/fsdp/__pycache__/_trace_utils.cpython-310.pyc,, +torch/distributed/fsdp/__pycache__/_traversal_utils.cpython-310.pyc,, +torch/distributed/fsdp/__pycache__/_unshard_param_utils.cpython-310.pyc,, +torch/distributed/fsdp/__pycache__/_wrap_utils.cpython-310.pyc,, +torch/distributed/fsdp/__pycache__/api.cpython-310.pyc,, +torch/distributed/fsdp/__pycache__/fully_sharded_data_parallel.cpython-310.pyc,, +torch/distributed/fsdp/__pycache__/sharded_grad_scaler.cpython-310.pyc,, +torch/distributed/fsdp/__pycache__/wrap.cpython-310.pyc,, +torch/distributed/fsdp/_common_utils.py,sha256=twI6u2LhMxQoH4HAjC9bVW4uhMNqE32DPl23Qnnd0FQ,22547 +torch/distributed/fsdp/_debug_utils.py,sha256=1SmIdIGZ42D8y-OWBbbTXCTvh7hf82h0jn2SbRquSc4,5818 +torch/distributed/fsdp/_dynamo_utils.py,sha256=_YtXy6KD9FUp--G1z7xpA4rrcSWFnF0bMkRtcDptpeg,2631 +torch/distributed/fsdp/_exec_order_utils.py,sha256=M2Gls5uilXU1ZibKrF09HXnZGksrjiKX7P_0Ud6-cuk,16168 +torch/distributed/fsdp/_flat_param.py,sha256=Q3z5MhsCN9Doo2N5FYYL-eEbjj3mBW0_zn5KyqYqgho,126271 +torch/distributed/fsdp/_fsdp_extensions.py,sha256=AL-vMEBkvzm8JFZuxD3C9bxVFjpGoFeE2GmX39jeQQA,5033 +torch/distributed/fsdp/_fully_shard/__init__.py,sha256=JJUfi0uaTdMUCjDfOg4FUQ6ZXnwVcvMqFpxVsOBszpw,418 +torch/distributed/fsdp/_fully_shard/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/fsdp/_fully_shard/__pycache__/_fsdp_api.cpython-310.pyc,, +torch/distributed/fsdp/_fully_shard/__pycache__/_fsdp_collectives.cpython-310.pyc,, +torch/distributed/fsdp/_fully_shard/__pycache__/_fsdp_common.cpython-310.pyc,, +torch/distributed/fsdp/_fully_shard/__pycache__/_fsdp_init.cpython-310.pyc,, +torch/distributed/fsdp/_fully_shard/__pycache__/_fsdp_param.cpython-310.pyc,, +torch/distributed/fsdp/_fully_shard/__pycache__/_fsdp_param_group.cpython-310.pyc,, +torch/distributed/fsdp/_fully_shard/__pycache__/_fsdp_state.cpython-310.pyc,, +torch/distributed/fsdp/_fully_shard/__pycache__/_fully_shard.cpython-310.pyc,, +torch/distributed/fsdp/_fully_shard/_fsdp_api.py,sha256=0zXMgcbrHJSXowowKNgET36vE7wtUqF-JC8xvZrVnPk,5442 +torch/distributed/fsdp/_fully_shard/_fsdp_collectives.py,sha256=-FJ6RdfYrgKeiyzni5_W_JCbleSzzxvnz6m6PacivjE,29826 +torch/distributed/fsdp/_fully_shard/_fsdp_common.py,sha256=alS5-Bloow5P63sDOOmBsPTOZzODaoxN7mFSP8bBBJ8,5770 +torch/distributed/fsdp/_fully_shard/_fsdp_init.py,sha256=9LCt6EJXlNZEgnefR7SBi4GYnHBoZllOHPRgBC1MOOg,9184 +torch/distributed/fsdp/_fully_shard/_fsdp_param.py,sha256=JxYPFddLQtT5foNW9kSn6nShRrQ7r_pK9mmltVh_OpE,45089 +torch/distributed/fsdp/_fully_shard/_fsdp_param_group.py,sha256=D4Ha8UfjCRT5-WvV5lTDvD33pfSg2zeBntdtPwCFjLY,40430 +torch/distributed/fsdp/_fully_shard/_fsdp_state.py,sha256=z3pnJXj4SAYmpu8ORHa4G4QR438AZbT7wgWvSyxiuK8,18049 +torch/distributed/fsdp/_fully_shard/_fully_shard.py,sha256=PhKZ5hjcqlicOnDI31HSb8QW3TSvHTfCuKXTDQqp178,33135 +torch/distributed/fsdp/_init_utils.py,sha256=A158I1Zn-0UVzM_88Q7xybw3svyHZNJ8S7rMp1-W50o,47073 +torch/distributed/fsdp/_limiter_utils.py,sha256=8QUeuAz8fTVqP0wxpRTDADpQKH-KrlyZqUfU6CTZbYU,1086 +torch/distributed/fsdp/_optim_utils.py,sha256=ueWZIbT4Xb2X3YE9tRELNA2b2_iYU08IDoTZvAbybdE,90432 +torch/distributed/fsdp/_runtime_utils.py,sha256=AkAzcG2JULmaRkVi01WoNEjVFiQ-WeYJ5EwLOukf1PI,66965 +torch/distributed/fsdp/_shard_utils.py,sha256=QvD0ZljyxmcbtKK8lBLNTtFFoCsxavUsdrfa9k7TZgE,4862 +torch/distributed/fsdp/_state_dict_utils.py,sha256=NZbTBRSpL1iDKmZM2kY60w9uDdJ8MBTB3sW7dxb1Bfs,34737 +torch/distributed/fsdp/_trace_utils.py,sha256=OUlw_ie4_n-zK2KTQ7JPJJPsWgRK-B3k9yz7MLTGSVs,10823 +torch/distributed/fsdp/_traversal_utils.py,sha256=haGRJUg9EyPuRJjUyUWfBDaRmEdJ7VOaOPi722DQ2Xg,4610 +torch/distributed/fsdp/_unshard_param_utils.py,sha256=hG8RJ0F-04VVqzmcOAf7c4upY6iapif3lOsimcjXSpQ,11663 +torch/distributed/fsdp/_wrap_utils.py,sha256=uQEWKWp0xAelEpUMYH5kA-5GZbQ8DCDE_Jrxbu2y0mw,10959 +torch/distributed/fsdp/api.py,sha256=wAWWh4wALbNeji0--fcH5TNTYwZ5kKVVNlZOUs8uSAA,18975 +torch/distributed/fsdp/fully_sharded_data_parallel.py,sha256=EFWY2j5VvAttyqVU8zOmhjqNH2isp0V-wNNHzG_6o0s,101286 +torch/distributed/fsdp/sharded_grad_scaler.py,sha256=wyT2VH1bDAir72z7mH8-zrz_ZKgvix-3mHJvSWpciGA,17104 +torch/distributed/fsdp/wrap.py,sha256=5D7BVeWhQ5y7-jY0TXEFFUl7rzNhiTbi3zm4M-i0i10,23154 +torch/distributed/launch.py,sha256=e7R-D1Wy1X98YSTVQESxOkDBA3UwCkrzpEzraXovYYc,7595 +torch/distributed/launcher/__init__.py,sha256=V0J5Y0SVG1ybhGeHnjarMc4dcOgyhRsHpnP7lBMyB48,349 +torch/distributed/launcher/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/launcher/__pycache__/api.cpython-310.pyc,, +torch/distributed/launcher/api.py,sha256=hLeF_KMu-zhGnZ_Jn1wSwoVcVI0hNj2Roh7-dX4E8JY,13786 +torch/distributed/logging_handlers.py,sha256=nXuxHnOEhAHqqDPhTk_-aLYIVHoZpQEYW_X4N1Qg0_Q,359 +torch/distributed/nn/__init__.py,sha256=Ta4l0Jr2gOK7eQR-e32stWaDKPOlV_Kii0SExydXk_Q,145 +torch/distributed/nn/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/nn/__pycache__/functional.cpython-310.pyc,, +torch/distributed/nn/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/distributed/nn/api/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/nn/api/__pycache__/remote_module.cpython-310.pyc,, +torch/distributed/nn/api/remote_module.py,sha256=Yfceo7oXjoTouBVjxSggzZlQ0cySQDzR4JxhfgO1t78,31825 +torch/distributed/nn/functional.py,sha256=0xCINl-75QF4AqhuNzw49bogozVTpZgPvdGTj1QM420,15844 +torch/distributed/nn/jit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/distributed/nn/jit/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/nn/jit/__pycache__/instantiator.cpython-310.pyc,, +torch/distributed/nn/jit/instantiator.py,sha256=By78umPD6olESwyjqyBw-UbIHpS1ZtadzxuP66l0_yE,4889 +torch/distributed/nn/jit/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/distributed/nn/jit/templates/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/nn/jit/templates/__pycache__/remote_module_template.cpython-310.pyc,, +torch/distributed/nn/jit/templates/remote_module_template.py,sha256=D_GFa70DG1KY1GwGwFAqvCC9gE9CwZSe1BJ-jHc2YMw,3463 +torch/distributed/optim/__init__.py,sha256=HxJ6GIWc3b6uAZWNh45oePXlQLAdX9Kmu3PByAOvlh4,1440 +torch/distributed/optim/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/optim/__pycache__/_deprecation_warning.cpython-310.pyc,, +torch/distributed/optim/__pycache__/apply_optimizer_in_backward.cpython-310.pyc,, +torch/distributed/optim/__pycache__/functional_adadelta.cpython-310.pyc,, +torch/distributed/optim/__pycache__/functional_adagrad.cpython-310.pyc,, +torch/distributed/optim/__pycache__/functional_adam.cpython-310.pyc,, +torch/distributed/optim/__pycache__/functional_adamax.cpython-310.pyc,, +torch/distributed/optim/__pycache__/functional_adamw.cpython-310.pyc,, +torch/distributed/optim/__pycache__/functional_rmsprop.cpython-310.pyc,, +torch/distributed/optim/__pycache__/functional_rprop.cpython-310.pyc,, +torch/distributed/optim/__pycache__/functional_sgd.cpython-310.pyc,, +torch/distributed/optim/__pycache__/named_optimizer.cpython-310.pyc,, +torch/distributed/optim/__pycache__/optimizer.cpython-310.pyc,, +torch/distributed/optim/__pycache__/post_localSGD_optimizer.cpython-310.pyc,, +torch/distributed/optim/__pycache__/utils.cpython-310.pyc,, +torch/distributed/optim/__pycache__/zero_redundancy_optimizer.cpython-310.pyc,, +torch/distributed/optim/_deprecation_warning.py,sha256=4lon9fWNrTNS4ARfi5Dag5tvohwNyPMflHBl9VFd_0E,547 +torch/distributed/optim/apply_optimizer_in_backward.py,sha256=uTNZylxBaBVQK1teYyPJ7R45-t8aqG6joeGT3qyi0AQ,5214 +torch/distributed/optim/functional_adadelta.py,sha256=rnI34B6w5-ISY_21uC2CgfoZVWVbovWOUsOAwFpQBqc,3923 +torch/distributed/optim/functional_adagrad.py,sha256=5qM9YJdGHQmYK9dhGYFCFZ50r-6PoqXI2pe9b9xbgTM,4273 +torch/distributed/optim/functional_adam.py,sha256=o0feTLaXh_Lx_DneB5Vy8vX4R0iO3lw1-Dk-dBeRWro,7391 +torch/distributed/optim/functional_adamax.py,sha256=OAc-Snni8vYQq5sJWcC8aV-dnrOA26i8zOS6nCsGGCg,4620 +torch/distributed/optim/functional_adamw.py,sha256=BJMztbCxW3lGdaBP-9AifkX2cHNnyskmMGbazMfKuFE,7511 +torch/distributed/optim/functional_rmsprop.py,sha256=2FLOhJNuA4wh2vnlb1mPGrll4dJ9zSjdAtImk-3dqno,4653 +torch/distributed/optim/functional_rprop.py,sha256=avQYdiVv0UaTcRGsPTFoeGrvSM1OMpsColMd06zJPdE,3807 +torch/distributed/optim/functional_sgd.py,sha256=dpVzD0a-GSIMG_iqwMvqDUyKOnsvi4sT9vjii0KHlxs,5898 +torch/distributed/optim/named_optimizer.py,sha256=MAk5HOJfkSxSXBHYfJUzOcQLyZBp3bnCcdYV3bhop8M,13974 +torch/distributed/optim/optimizer.py,sha256=PGqrPW0HJZmQPm6dT1b6V1_xmyVIk1yFB7DVfRb6w4Y,9756 +torch/distributed/optim/post_localSGD_optimizer.py,sha256=MT7Kno6EvcmnjAiQGJdsgOnKXpHXqm9Sm9QnHzV-EP4,4498 +torch/distributed/optim/utils.py,sha256=JhzIndnTdt0CMJiEblAbg-tOdVDhFv6tMk00_WjBPMI,2238 +torch/distributed/optim/zero_redundancy_optimizer.py,sha256=mhaGMB90Bk4TCu9dPtD9lLeFNftY9o0rECgLz0rrX94,72841 +torch/distributed/optim/zero_redundancy_optimizer.pyi,sha256=m6td9NSdO6PyW2JbITRhiRVULrxUEetvk9HfknsK_T4,2834 +torch/distributed/pipelining/_IR.py,sha256=HigbZ-8nK_P078P9m4bezpa1eixiAn04mhB6_ig9mM0,49519 +torch/distributed/pipelining/__init__.py,sha256=ywlBKSDSFkgi5wBXXS02nJ_srC1l2ACoCkI1PtDjcDY,689 +torch/distributed/pipelining/__pycache__/_IR.cpython-310.pyc,, +torch/distributed/pipelining/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/pipelining/__pycache__/_backward.cpython-310.pyc,, +torch/distributed/pipelining/__pycache__/_debug.cpython-310.pyc,, +torch/distributed/pipelining/__pycache__/_schedule_visualizer.cpython-310.pyc,, +torch/distributed/pipelining/__pycache__/_unflatten.cpython-310.pyc,, +torch/distributed/pipelining/__pycache__/_utils.cpython-310.pyc,, +torch/distributed/pipelining/__pycache__/microbatch.cpython-310.pyc,, +torch/distributed/pipelining/__pycache__/schedules.cpython-310.pyc,, +torch/distributed/pipelining/__pycache__/stage.cpython-310.pyc,, +torch/distributed/pipelining/_backward.py,sha256=cXbKiaJwDO9pRHZBmh2ap3npVYVM47z6nTL9iOr77wI,16647 +torch/distributed/pipelining/_debug.py,sha256=dDUjgp_-XnUEsM4I-zj5-yQGxcapHbBb3JcRSdRuCqc,608 +torch/distributed/pipelining/_schedule_visualizer.py,sha256=xyqIFVLRpkIVFbjqFPzBGMB6vRIkgUKseANgFLeM2Hw,16751 +torch/distributed/pipelining/_unflatten.py,sha256=GUpLGbhqxbAMjcY9aDxandxUd3Rva1aXs4BRApx9Gj8,952 +torch/distributed/pipelining/_utils.py,sha256=m8A1ZUaQpP-tcNalKwJ_k3yj53uy6hoPG1RNzBC5_0o,4667 +torch/distributed/pipelining/microbatch.py,sha256=ri_RVHvtAbBJUFwJFNDjz6Pkq_PIEcfDA2jXTsWUfSA,18011 +torch/distributed/pipelining/schedules.py,sha256=G_9dz1mRkAL943LCwqDo6B74twRQ249bD9slAvJWcYM,141596 +torch/distributed/pipelining/stage.py,sha256=BjlZY0VBQaAWsyQsYa0i95MfoUYmwSUHvxJDAH5x_zU,64387 +torch/distributed/remote_device.py,sha256=haIWdd7tKZty737AKugy5mQXV5v3oOTv28jvR6VhM9A,4706 +torch/distributed/rendezvous.py,sha256=nAq7xTMSOZOs2yaidnP3qQJjN7d3DZShwqT_C2YpsXk,10315 +torch/distributed/rpc/__init__.py,sha256=hHSugwap5MSOYxFFd4S_uBmYfE4QcOcuyOJUE0LDuCM,9945 +torch/distributed/rpc/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/rpc/__pycache__/_utils.cpython-310.pyc,, +torch/distributed/rpc/__pycache__/api.cpython-310.pyc,, +torch/distributed/rpc/__pycache__/backend_registry.cpython-310.pyc,, +torch/distributed/rpc/__pycache__/constants.cpython-310.pyc,, +torch/distributed/rpc/__pycache__/functions.cpython-310.pyc,, +torch/distributed/rpc/__pycache__/internal.cpython-310.pyc,, +torch/distributed/rpc/__pycache__/options.cpython-310.pyc,, +torch/distributed/rpc/__pycache__/rref_proxy.cpython-310.pyc,, +torch/distributed/rpc/__pycache__/server_process_global_profiler.cpython-310.pyc,, +torch/distributed/rpc/_testing/__init__.py,sha256=xSU_1OK5D0vaFTGSxPlzX6Ad4CEvsZv7DIJYY1d2Unk,479 +torch/distributed/rpc/_testing/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/rpc/_testing/__pycache__/faulty_agent_backend_registry.cpython-310.pyc,, +torch/distributed/rpc/_testing/faulty_agent_backend_registry.py,sha256=KmeZ2KHDwSWJB3mdfA06hdaabt25vKkkUU1h8SFVk1o,1639 +torch/distributed/rpc/_utils.py,sha256=tcq0ADOGMmd7OkKYFY7apu6c44VbgFLxCLOCh-aiyvU,1649 +torch/distributed/rpc/api.py,sha256=goDz-lfm0MmGGOEp3SAfZ9KibJXtxZNrZK3hwIZGDyU,37037 +torch/distributed/rpc/backend_registry.py,sha256=3nD41n3bCCp3r2-azKsdxhM_e-pP7kGNFz35DYM2jMo,16279 +torch/distributed/rpc/constants.py,sha256=AFzuxIi9gIVxb9nyZNZ6h70Is-DUMsCHZ-WEO3MOMP8,804 +torch/distributed/rpc/functions.py,sha256=9sE_wYiqlfUmb6AFBFPmOq6PApwYKxosNOnteoy_0Oc,7272 +torch/distributed/rpc/internal.py,sha256=zb1bTVAHPs56YzXXyzqOUe17j8szjHHFunQot-KjBeI,11119 +torch/distributed/rpc/options.py,sha256=Dsu8ifGebX_hfFX3TkaVv2RSY-Y4OnA7qN88q6VVj3I,7249 +torch/distributed/rpc/rref_proxy.py,sha256=QRFHO3EvUay19HkZgUkf1uNLDQgp1Gmop8z4Ics5Aq4,2705 +torch/distributed/rpc/server_process_global_profiler.py,sha256=orubm9t4oMO52rutABSU3XTPtZkv89L7PiU8wKvyJhw,8566 +torch/distributed/run.py,sha256=03GcIWEED9ImqrOVks0bUnTniESnE-KpV9Gr_I5PzdY,35846 +torch/distributed/tensor/__init__.py,sha256=ZYuQj1wVkadgecAunPdkYKlHo7NoNs_TMxS0Kvxsf0M,2249 +torch/distributed/tensor/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/tensor/__pycache__/_api.cpython-310.pyc,, +torch/distributed/tensor/__pycache__/_argmin_argmax.cpython-310.pyc,, +torch/distributed/tensor/__pycache__/_collective_utils.cpython-310.pyc,, +torch/distributed/tensor/__pycache__/_dispatch.cpython-310.pyc,, +torch/distributed/tensor/__pycache__/_dtensor_spec.cpython-310.pyc,, +torch/distributed/tensor/__pycache__/_op_schema.cpython-310.pyc,, +torch/distributed/tensor/__pycache__/_random.cpython-310.pyc,, +torch/distributed/tensor/__pycache__/_redistribute.cpython-310.pyc,, +torch/distributed/tensor/__pycache__/_sharding_prop.cpython-310.pyc,, +torch/distributed/tensor/__pycache__/_shards_wrapper.cpython-310.pyc,, +torch/distributed/tensor/__pycache__/_tp_conv.cpython-310.pyc,, +torch/distributed/tensor/__pycache__/_utils.cpython-310.pyc,, +torch/distributed/tensor/__pycache__/device_mesh.cpython-310.pyc,, +torch/distributed/tensor/__pycache__/placement_types.cpython-310.pyc,, +torch/distributed/tensor/_api.py,sha256=HfXJi5UdzNVG1MwRF57-fMkVECdS1r8zQUuH6MXNZzc,60439 +torch/distributed/tensor/_argmin_argmax.py,sha256=7qEz40oSKc4kE2tkXgZXttTrMEofez3Lgv70KhZBvp0,4398 +torch/distributed/tensor/_collective_utils.py,sha256=iGl1X3E0tcsuhu8JVYXTO3iCQ_-FhL9q1bvLKFcHyB4,15051 +torch/distributed/tensor/_dispatch.py,sha256=3qdRRL3uzDprbNRjBstXW1trBD0A58DBAGHUbe7plgU,28811 +torch/distributed/tensor/_dtensor_spec.py,sha256=n3rY64gEHHjcPCPVdXUivi7EBxi5T1EUS8g28ijtJoA,31259 +torch/distributed/tensor/_op_schema.py,sha256=LLAtdMJc1x-A42zuzRT6WB7-q8nEjaglZGxgw3yL90s,23049 +torch/distributed/tensor/_ops/__init__.py,sha256=bQDReWqPLgNAfjBJC18_Q8Yg9wTj_ZlIut6CnQ_KBiY,380 +torch/distributed/tensor/_ops/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/tensor/_ops/__pycache__/_common_rules.cpython-310.pyc,, +torch/distributed/tensor/_ops/__pycache__/_conv_ops.cpython-310.pyc,, +torch/distributed/tensor/_ops/__pycache__/_einsum_strategy.cpython-310.pyc,, +torch/distributed/tensor/_ops/__pycache__/_embedding_ops.cpython-310.pyc,, +torch/distributed/tensor/_ops/__pycache__/_mask_buffer.cpython-310.pyc,, +torch/distributed/tensor/_ops/__pycache__/_math_ops.cpython-310.pyc,, +torch/distributed/tensor/_ops/__pycache__/_matrix_ops.cpython-310.pyc,, +torch/distributed/tensor/_ops/__pycache__/_pointwise_ops.cpython-310.pyc,, +torch/distributed/tensor/_ops/__pycache__/_random_ops.cpython-310.pyc,, +torch/distributed/tensor/_ops/__pycache__/_tensor_ops.cpython-310.pyc,, +torch/distributed/tensor/_ops/__pycache__/_view_ops.cpython-310.pyc,, +torch/distributed/tensor/_ops/__pycache__/registration.cpython-310.pyc,, +torch/distributed/tensor/_ops/__pycache__/utils.cpython-310.pyc,, +torch/distributed/tensor/_ops/_common_rules.py,sha256=KR5xC0pkh4D3KLGkbrvLtyB5hiS3Evqv2yKYA270CvI,11949 +torch/distributed/tensor/_ops/_conv_ops.py,sha256=Aa4StxFYtTWghpAqws0dmzIOfKHHq4YTba-mAjcVt98,4292 +torch/distributed/tensor/_ops/_einsum_strategy.py,sha256=brXYcsx9SWNVCBFvch43tDIFE3QqW2WoF8o5EuI4m08,7175 +torch/distributed/tensor/_ops/_embedding_ops.py,sha256=vh7ghNpnQZbQpe7TY2U7Mgeo92uru7Ygp2d2jNCP8wo,4327 +torch/distributed/tensor/_ops/_mask_buffer.py,sha256=-3EVuRqHZbRUSMdGChIaoJdp1MkjtT4UpIv-Jjr9sdc,1532 +torch/distributed/tensor/_ops/_math_ops.py,sha256=2G6Gaq-CDW01dj2QkHTfZcZo_FnXGwD18J0Vpc9Im5g,54337 +torch/distributed/tensor/_ops/_matrix_ops.py,sha256=30cVyPaWFIjaTqK5UihIWPsuAZ04_3TGhD9aaXcSGNM,39599 +torch/distributed/tensor/_ops/_pointwise_ops.py,sha256=vyxJI-ptef5rtjLogFWD5p13GRI61DmTQ-Q1FDhO45U,26163 +torch/distributed/tensor/_ops/_random_ops.py,sha256=Aha4OyLDIhzD7tlAc_FUZ05othH7r6AQ2HVJeUrcYYQ,1310 +torch/distributed/tensor/_ops/_tensor_ops.py,sha256=XxQQPFfQiU49Ho4EasY7-vcV4wa6rB2HG931LLSG0GI,52015 +torch/distributed/tensor/_ops/_view_ops.py,sha256=4fJOxdepwxdd8vbNbkeqJNWK5R7WYDpZRjgRpBQi8Ik,29829 +torch/distributed/tensor/_ops/registration.py,sha256=jV_t6G5hkh7JBDV86-mX96Tsojt6lnYRHTSabegmAos,3083 +torch/distributed/tensor/_ops/utils.py,sha256=Be8xkJlRyMoXzfTVcyy0xbdRlv8DAKXzn9D18024idw,15125 +torch/distributed/tensor/_random.py,sha256=oBpiELOAipe-Q0UJI58gb8W5fZ9709OjrpQhxsjfVtY,19949 +torch/distributed/tensor/_redistribute.py,sha256=pMsrGiOZmddCEzdpYAFRClnt5CoAMgIs9Bh2Vm62tFo,44972 +torch/distributed/tensor/_sharding_prop.py,sha256=SKaeGhVCd5bEsVYcHqXy1JMfaD-8NQH40uA78g1bwRk,31051 +torch/distributed/tensor/_shards_wrapper.py,sha256=dXMTopPZZWRGV-V0fxAGEL9C4lq4lgC6v220EJy8JTE,13478 +torch/distributed/tensor/_tp_conv.py,sha256=72pvTBPGpmSa-jcLdI2vJiDym3aeTd4iY0VrDVxP5ZQ,10701 +torch/distributed/tensor/_utils.py,sha256=gkcI6zROmGOP8WrKe_A6bCsWJxraOUYoC34G6uRFPH0,18259 +torch/distributed/tensor/debug/__init__.py,sha256=RXJSXvuFFoIjJSXRkzLMAQURBkZkUu8rUYsl3V6p-6U,1807 +torch/distributed/tensor/debug/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/tensor/debug/__pycache__/_comm_mode.cpython-310.pyc,, +torch/distributed/tensor/debug/__pycache__/_op_coverage.cpython-310.pyc,, +torch/distributed/tensor/debug/__pycache__/_visualize_sharding.cpython-310.pyc,, +torch/distributed/tensor/debug/_comm_mode.py,sha256=Pq03XKiFx82q7fPFrB4nhZ-m-rpqne71yc9z-kLt2A4,28975 +torch/distributed/tensor/debug/_op_coverage.py,sha256=XvodNzv0mCTN4Z8XBWkTeriETm9mDE3YAwh3rWHqVZY,3238 +torch/distributed/tensor/debug/_visualize_sharding.py,sha256=hU90eXVLSi-KXsidTUl1thXlqwYn026iqdx40WkDzrQ,7549 +torch/distributed/tensor/device_mesh.py,sha256=MONPC_i1XphcY2E0AAte1MW668BTlUGugMSQzfJqzik,190 +torch/distributed/tensor/experimental/__init__.py,sha256=9I70AFPtyjGyKxAuaBsRfDxvHyCeM5a7o7q3X1yUe5g,1424 +torch/distributed/tensor/experimental/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/tensor/experimental/__pycache__/_attention.cpython-310.pyc,, +torch/distributed/tensor/experimental/__pycache__/_func_map.cpython-310.pyc,, +torch/distributed/tensor/experimental/__pycache__/_register_sharding.cpython-310.pyc,, +torch/distributed/tensor/experimental/__pycache__/_tp_transform.cpython-310.pyc,, +torch/distributed/tensor/experimental/_attention.py,sha256=Hz6IsHinuWEYMWAMGzQMuVEYAHiJF3VqLQjIbysMBtw,1229 +torch/distributed/tensor/experimental/_context_parallel/__init__.py,sha256=6yKCIGx9a4EB26ST6wrFUihdq8SPHvOj8wPgehrHeb0,1130 +torch/distributed/tensor/experimental/_context_parallel/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/tensor/experimental/_context_parallel/__pycache__/_attention.cpython-310.pyc,, +torch/distributed/tensor/experimental/_context_parallel/__pycache__/_cp_custom_ops.cpython-310.pyc,, +torch/distributed/tensor/experimental/_context_parallel/__pycache__/_load_balancer.cpython-310.pyc,, +torch/distributed/tensor/experimental/_context_parallel/__pycache__/_sharding_rules.cpython-310.pyc,, +torch/distributed/tensor/experimental/_context_parallel/_attention.py,sha256=pgltI3C1dA45mHxk2eRXPK6Lf5BjGAHOsaFIkLv4I7Y,60533 +torch/distributed/tensor/experimental/_context_parallel/_cp_custom_ops.py,sha256=xNWTO29HqyGhpcnheOMuujOh4q7zlCeAbVlFPNjQB_8,2969 +torch/distributed/tensor/experimental/_context_parallel/_load_balancer.py,sha256=-jEV9-btSu4ep8ePqAc3dXXm_WHxm_aw_upgz3L3lQI,22720 +torch/distributed/tensor/experimental/_context_parallel/_sharding_rules.py,sha256=l0I5iNSyWX4rW203q4zXzhYPNwmo0PQfqd9gP1LeH7Q,13781 +torch/distributed/tensor/experimental/_func_map.py,sha256=hXLKhNZmpdN3ksDQQDEnC6NKSCDkcly6SHLGd9gMKcU,12107 +torch/distributed/tensor/experimental/_register_sharding.py,sha256=9R8PjVMEesw-JpIuGcFruwR3gh5T9BxQHkOKjVvWo3U,5636 +torch/distributed/tensor/experimental/_tp_transform.py,sha256=lhpWLZJ_BHOTH1P-d00BEW5VfevM3HeVn02N2JeURkM,20437 +torch/distributed/tensor/parallel/__init__.py,sha256=_rDiCQ0mhllWr5HSDkOV47G4Z-WAZ3L1PCyzLhjgXeU,643 +torch/distributed/tensor/parallel/__pycache__/__init__.cpython-310.pyc,, +torch/distributed/tensor/parallel/__pycache__/_data_parallel_utils.cpython-310.pyc,, +torch/distributed/tensor/parallel/__pycache__/api.cpython-310.pyc,, +torch/distributed/tensor/parallel/__pycache__/ddp.cpython-310.pyc,, +torch/distributed/tensor/parallel/__pycache__/fsdp.cpython-310.pyc,, +torch/distributed/tensor/parallel/__pycache__/input_reshard.cpython-310.pyc,, +torch/distributed/tensor/parallel/__pycache__/loss.cpython-310.pyc,, +torch/distributed/tensor/parallel/__pycache__/style.cpython-310.pyc,, +torch/distributed/tensor/parallel/_data_parallel_utils.py,sha256=toFgFzlwhtjqPA6hOJjRFW4ZYjV77KZpmu2TssdBaPw,1498 +torch/distributed/tensor/parallel/api.py,sha256=h8TIf56coMFuKfOfgDAKxTfMOzmBZ3izgfEMwvCsoFE,6476 +torch/distributed/tensor/parallel/ddp.py,sha256=JCsmYx8AxIJBXID0zfbb7F0Ruwx3_AXyhXY7jRK5Iu4,3722 +torch/distributed/tensor/parallel/fsdp.py,sha256=FrICMq7bn47gfqqbYsBfBqI3Fznja-5YVs1PC7rq6kc,13708 +torch/distributed/tensor/parallel/input_reshard.py,sha256=mBhp-ecYPnCEigSlNZ0--V5osqua7xyoBSRtvpWBVok,3740 +torch/distributed/tensor/parallel/loss.py,sha256=Yd_mKLhUTQCuegW6Wj0Hks1Iy0eyFfpaGQJJZgB77Kk,18447 +torch/distributed/tensor/parallel/style.py,sha256=3GnRwyYeAomQzh463uK2f4ZPOAwXRIC7ZHDIzxNJad4,37109 +torch/distributed/tensor/placement_types.py,sha256=QTLdyw6OZRgdpIuE8_tCa_DLA6x6nGWg8b5TXNnUtOg,41784 +torch/distributed/utils.py,sha256=2hB0ktDA033lBMFwDrTJUP20pqbBcHjVx_3nwVEo0SU,13653 +torch/distributions/__init__.py,sha256=FdWgzsV7zpnl3LMsEv73LOOxNCSkciXh9JGuxpiCyDU,6111 +torch/distributions/__pycache__/__init__.cpython-310.pyc,, +torch/distributions/__pycache__/bernoulli.cpython-310.pyc,, +torch/distributions/__pycache__/beta.cpython-310.pyc,, +torch/distributions/__pycache__/binomial.cpython-310.pyc,, +torch/distributions/__pycache__/categorical.cpython-310.pyc,, +torch/distributions/__pycache__/cauchy.cpython-310.pyc,, +torch/distributions/__pycache__/chi2.cpython-310.pyc,, +torch/distributions/__pycache__/constraint_registry.cpython-310.pyc,, +torch/distributions/__pycache__/constraints.cpython-310.pyc,, +torch/distributions/__pycache__/continuous_bernoulli.cpython-310.pyc,, +torch/distributions/__pycache__/dirichlet.cpython-310.pyc,, +torch/distributions/__pycache__/distribution.cpython-310.pyc,, +torch/distributions/__pycache__/exp_family.cpython-310.pyc,, +torch/distributions/__pycache__/exponential.cpython-310.pyc,, +torch/distributions/__pycache__/fishersnedecor.cpython-310.pyc,, +torch/distributions/__pycache__/gamma.cpython-310.pyc,, +torch/distributions/__pycache__/generalized_pareto.cpython-310.pyc,, +torch/distributions/__pycache__/geometric.cpython-310.pyc,, +torch/distributions/__pycache__/gumbel.cpython-310.pyc,, +torch/distributions/__pycache__/half_cauchy.cpython-310.pyc,, +torch/distributions/__pycache__/half_normal.cpython-310.pyc,, +torch/distributions/__pycache__/independent.cpython-310.pyc,, +torch/distributions/__pycache__/inverse_gamma.cpython-310.pyc,, +torch/distributions/__pycache__/kl.cpython-310.pyc,, +torch/distributions/__pycache__/kumaraswamy.cpython-310.pyc,, +torch/distributions/__pycache__/laplace.cpython-310.pyc,, +torch/distributions/__pycache__/lkj_cholesky.cpython-310.pyc,, +torch/distributions/__pycache__/log_normal.cpython-310.pyc,, +torch/distributions/__pycache__/logistic_normal.cpython-310.pyc,, +torch/distributions/__pycache__/lowrank_multivariate_normal.cpython-310.pyc,, +torch/distributions/__pycache__/mixture_same_family.cpython-310.pyc,, +torch/distributions/__pycache__/multinomial.cpython-310.pyc,, +torch/distributions/__pycache__/multivariate_normal.cpython-310.pyc,, +torch/distributions/__pycache__/negative_binomial.cpython-310.pyc,, +torch/distributions/__pycache__/normal.cpython-310.pyc,, +torch/distributions/__pycache__/one_hot_categorical.cpython-310.pyc,, +torch/distributions/__pycache__/pareto.cpython-310.pyc,, +torch/distributions/__pycache__/poisson.cpython-310.pyc,, +torch/distributions/__pycache__/relaxed_bernoulli.cpython-310.pyc,, +torch/distributions/__pycache__/relaxed_categorical.cpython-310.pyc,, +torch/distributions/__pycache__/studentT.cpython-310.pyc,, +torch/distributions/__pycache__/transformed_distribution.cpython-310.pyc,, +torch/distributions/__pycache__/transforms.cpython-310.pyc,, +torch/distributions/__pycache__/uniform.cpython-310.pyc,, +torch/distributions/__pycache__/utils.cpython-310.pyc,, +torch/distributions/__pycache__/von_mises.cpython-310.pyc,, +torch/distributions/__pycache__/weibull.cpython-310.pyc,, +torch/distributions/__pycache__/wishart.cpython-310.pyc,, +torch/distributions/bernoulli.py,sha256=plmmFY-XyVjCGFu_CcypqJoRG-09MlGEayk94vxTN6w,4771 +torch/distributions/beta.py,sha256=qtd14nAjY8VGIoOYX_Lt6ZI6xJ-TNtrYdT-OWCjqZ-U,4050 +torch/distributions/binomial.py,sha256=vkfBS4o-5de77MggdjoU98C9YqxoNH133DjtLHv3d98,6484 +torch/distributions/categorical.py,sha256=mKKe9kWyfmiYyHu3ze-Y38dM5rUHey0BtNgRBYJvyMI,6221 +torch/distributions/cauchy.py,sha256=eCyHSB2pGpAlwYA71QghbmrxhYCm63Uu-lWrrPk_51E,3209 +torch/distributions/chi2.py,sha256=6P2DldE0LM7WYp-YPuAADuE5vNQP-NjgtF6N77nD3S4,1153 +torch/distributions/constraint_registry.py,sha256=Z49QrxE5eJqi7_84YM73khNXMNVGhM1jqb-ovWBKT-A,10306 +torch/distributions/constraints.py,sha256=8CLjtlu9-oQ65hO3N-lqqnbXxyLyO5K2TCO8sPn412I,21629 +torch/distributions/continuous_bernoulli.py,sha256=jZ6E5LJjStu7WJ-fXIKLUel91Ebbl8AgCG2WnniNWes,9307 +torch/distributions/dirichlet.py,sha256=oSBJJeZiKOTmVxRqDcNRx1HErbp7yni0dNQ_awSQZXY,4561 +torch/distributions/distribution.py,sha256=eI0z4KoQPLrMaGcLB0L6Te0tY0QfIXC5gefx23l_OVw,12671 +torch/distributions/exp_family.py,sha256=9VzgksiS2hYjPs_01GOOfbzdyul2K0WljQ0RXDd9DbI,2485 +torch/distributions/exponential.py,sha256=IOD_16-JDdUZ5rc2ewMGK0yz4vslUPIvMd0FNB_Gm4Q,2769 +torch/distributions/fishersnedecor.py,sha256=_QDX7hIyo3w7pGAv9XzF0v7lm-9MSh5y8PydAg_MkRg,3715 +torch/distributions/gamma.py,sha256=9aGZDHQ5nQnc8tn6E1AF1rr-Q2I-S2uWFwXSiFDsKtM,3982 +torch/distributions/generalized_pareto.py,sha256=0ASpwRqnVRIq4figaIpVHO1-8BJlI8CEZj3YLexwTOA,5881 +torch/distributions/geometric.py,sha256=AZA-zf9pHwTARr3mZXoRYn38TZlRdtYU1-VlYhjDCpw,5174 +torch/distributions/gumbel.py,sha256=98BUqiM_FaC2xKEiqOaoizQ_Xga6RM4BGGYdm6vzbiA,3052 +torch/distributions/half_cauchy.py,sha256=SJEP7ygrmd9nkc95ftx1F71DPBl4iI71LbezL-g1V3U,2682 +torch/distributions/half_normal.py,sha256=wJTT3sbqCCxkSeFSKfi43BwqT8DMMMYLWT7T8aXELM0,2447 +torch/distributions/independent.py,sha256=bef7nr-xwvWKMQbkYmmug72Iiy7moOds5psrPL6Pyk4,5019 +torch/distributions/inverse_gamma.py,sha256=fbAmhPqVseQBkMqGSc8QI4NOab3btSBQza5rrJYXD4s,2821 +torch/distributions/kl.py,sha256=HBZr7JwmN2nYSFCu8uxWrS1JOlbgoqzQCWCrAhCtqr0,31772 +torch/distributions/kumaraswamy.py,sha256=J8LBbdOiex0ju7thTvFZgwnZnt4_l_wm0pKWa_ErWcg,3735 +torch/distributions/laplace.py,sha256=FkC_DmNfiLNxCILnVaP7pLzii4SVgbJkAs95vAmDFyQ,3540 +torch/distributions/lkj_cholesky.py,sha256=_jI3DBuic6A796Rfq-16GZlboQ8u0QYKX6XR0zJ7K68,6594 +torch/distributions/log_normal.py,sha256=apywX4cgDNJ565ZzB2YPES-R90mp8M_XsYcHkC-fvcE,2274 +torch/distributions/logistic_normal.py,sha256=AjmG2xnBEeX9LlisvPQ-l4XThg7K2yc_8UFLsyJyAsE,2290 +torch/distributions/lowrank_multivariate_normal.py,sha256=I8ZPfZO_9FmM8uvlEvZRNjz9nbfsC7jga6eIGkMv9C4,10163 +torch/distributions/mixture_same_family.py,sha256=sOd_wZGr4VPIKSa6q6CSv1MPFMB21OGQVX2Krh3Ceak,8689 +torch/distributions/multinomial.py,sha256=jk0wX71BNL-GCJ9XF9LALbv3ZQNuKp8IlT-QLrANgn4,5714 +torch/distributions/multivariate_normal.py,sha256=yz4dvqrGn8q8q9_5jG5--j9p_uQqNZKh8fQ5gj6E4GM,11256 +torch/distributions/negative_binomial.py,sha256=yOk7FrDt9Sww-ZSBJ8fE9Irxo5MIYVtgxp35L9J2uqw,5174 +torch/distributions/normal.py,sha256=X9jLv5wIJ7sfNBLhSbkbdEkFYNlAUtEocZmV0WkNqKk,3990 +torch/distributions/one_hot_categorical.py,sha256=SHnnAObQfLA8nQrSTzL8EeWp5smzsgss8MGxrwfbsig,5028 +torch/distributions/pareto.py,sha256=r-NXRH2KnUrHwRfDkNI731-IMYDaVrmoDztlVfmVHjo,2544 +torch/distributions/poisson.py,sha256=6knythb0l4rvjIybpIaXHp_lHPwv71wPlmYszSG-CGQ,2521 +torch/distributions/relaxed_bernoulli.py,sha256=xT992R9S053bgZLko6rPEX9HfKv4SjOPrP_pjK8tkD0,6151 +torch/distributions/relaxed_categorical.py,sha256=mSeMUzNjfvjbbgu-zegqc4AX7OBG04si6zQISwAQdSM,5752 +torch/distributions/studentT.py,sha256=0B2GX5rgHafV3b1x2j2QpRPM-6kR3C4gmGKIQLT0uyo,4187 +torch/distributions/transformed_distribution.py,sha256=l9UEPrN75J4BU22ifDpf0mhU6V7FxnwiM25gkvTKqz0,8933 +torch/distributions/transforms.py,sha256=WwBt5QLhYhbQNT6uGi7BID_g89J-aEQwZpWY73fk7R8,42987 +torch/distributions/uniform.py,sha256=TC2JnF_N8N4Myra6ZMfTgI0iePPK-reGsEugog3WyBI,3398 +torch/distributions/utils.py,sha256=m987vstzi56dADN6i8iM2GWWROe2O_fDdKIjAkoIcDc,8027 +torch/distributions/von_mises.py,sha256=LwgrQ_zJhYplAz1Z4cfG71Fsbx1b-X_F0Yuu3Vj76oY,6554 +torch/distributions/weibull.py,sha256=hcP0YWAdRW5GcUVF6XX08Wdnnq3bToH6j_0EmWg_RM4,3467 +torch/distributions/wishart.py,sha256=vFCXRMv5zAAPZC1PnWo0NwtSsAc-sIU7cV1Hk-dAw70,13919 +torch/export/__init__.py,sha256=kooPwvJQV3myOts1ctleVnZym6b1-ENbBjAA2XmW5Mw,24183 +torch/export/__pycache__/__init__.cpython-310.pyc,, +torch/export/__pycache__/_draft_export.cpython-310.pyc,, +torch/export/__pycache__/_leakage_detection_utils.cpython-310.pyc,, +torch/export/__pycache__/_remove_auto_functionalized_pass.cpython-310.pyc,, +torch/export/__pycache__/_remove_effect_tokens_pass.cpython-310.pyc,, +torch/export/__pycache__/_safeguard.cpython-310.pyc,, +torch/export/__pycache__/_swap.cpython-310.pyc,, +torch/export/__pycache__/_trace.cpython-310.pyc,, +torch/export/__pycache__/_tree_utils.cpython-310.pyc,, +torch/export/__pycache__/_unlift.cpython-310.pyc,, +torch/export/__pycache__/_wrapper_utils.cpython-310.pyc,, +torch/export/__pycache__/custom_obj.cpython-310.pyc,, +torch/export/__pycache__/custom_ops.cpython-310.pyc,, +torch/export/__pycache__/decomp_utils.cpython-310.pyc,, +torch/export/__pycache__/dynamic_shapes.cpython-310.pyc,, +torch/export/__pycache__/exported_program.cpython-310.pyc,, +torch/export/__pycache__/graph_signature.cpython-310.pyc,, +torch/export/__pycache__/unflatten.cpython-310.pyc,, +torch/export/_draft_export.py,sha256=Z5GtbSoJXyJXUTCfyGRYG-qa7U5_ihXtOLOldXopR2c,20631 +torch/export/_leakage_detection_utils.py,sha256=5xVMp4tBV-BryPVo2Xi136t_bp0oCNVi6iuigKouLeA,3501 +torch/export/_remove_auto_functionalized_pass.py,sha256=LTko-ujLIw65ZViQrwXfjV9ipnJW-xjoG-zmvUmufb4,1951 +torch/export/_remove_effect_tokens_pass.py,sha256=h_qmx8tFpfFW3FlEl7Q65_5Aph45JA-6r3oufH4Mgh8,8056 +torch/export/_safeguard.py,sha256=7peuxoS51C1SC2h-4XAVDbZIu772gPUzRRTrDCzo14Q,1956 +torch/export/_swap.py,sha256=FCK1W2nwad7Vxsc2ce8ozWsdnbBQVH5PVGs3umi8vj8,17691 +torch/export/_trace.py,sha256=p9N3Di5M_6qx4Qb66fUfGTGb7gdB116fRWaxc92Br4E,96700 +torch/export/_tree_utils.py,sha256=n0Pw1zRSbWYkXHCQSNcuJtHh5C9skx1IB6dUjkKOd4Q,2242 +torch/export/_unlift.py,sha256=CyEi-3tjrNnpMhBOOBddPJwAXiwoxQuNErOLf6N8Wns,33277 +torch/export/_wrapper_utils.py,sha256=pAHvH2i0I5mn42Cpl4oyTBQzJz0rZjBi2siRQr2khOo,271 +torch/export/custom_obj.py,sha256=H6j0qawn-qiMlmafZDdjAuOOQY7YvQ7pbhiFW71hOMY,296 +torch/export/custom_ops.py,sha256=CestHbfNC3LApYBq46cctioOZuTEAtB1grIZw7fvsKQ,1781 +torch/export/decomp_utils.py,sha256=3WGV86fP5QSFIe31u9jyG63N-mhnsLxS5V2mtqRBK5c,5753 +torch/export/dynamic_shapes.py,sha256=AE4SN5EE45XqedYZDGnBhzMSEiskYlXx7QVyVXkzYkM,53927 +torch/export/experimental/__init__.py,sha256=_v_ie0hMoni-c4NVFDiIN8MUzZO61au8BLDnCLX7XPw,16800 +torch/export/experimental/__pycache__/__init__.cpython-310.pyc,, +torch/export/experimental/__pycache__/_utils.cpython-310.pyc,, +torch/export/experimental/_utils.py,sha256=oacgN3A5HM9UhlFukItN80d7xb9lDhsAr3TyAT5PwjQ,8587 +torch/export/exported_program.py,sha256=ZDbbWrXlpdaU3-UihxZ5m3wE4f_kGapyu7NYUWlI-c4,67333 +torch/export/graph_signature.py,sha256=AhLYl2loq2Q4RcPPFxqWDg-7QhyVOQcyhBB_UVHAoJo,25757 +torch/export/passes/__init__.py,sha256=6vyfrZbM2pi3XGyRYPu-J9p9tknELWJV4JfkJs1dqP8,3337 +torch/export/passes/__pycache__/__init__.cpython-310.pyc,, +torch/export/pt2_archive/__init__.py,sha256=vYIe2lq0nWwY77PVEsuIo_0fEWuAeX5E95FhGtXmwZ8,144 +torch/export/pt2_archive/__pycache__/__init__.cpython-310.pyc,, +torch/export/pt2_archive/__pycache__/_package.cpython-310.pyc,, +torch/export/pt2_archive/__pycache__/_package_weights.cpython-310.pyc,, +torch/export/pt2_archive/__pycache__/constants.cpython-310.pyc,, +torch/export/pt2_archive/_package.py,sha256=-ylHN0nRtZkkGPJUGXUYueHBoQCycK2vQ7dvavngr3I,42629 +torch/export/pt2_archive/_package_weights.py,sha256=gomoHF0NolW5lr7OKXgX-ULBSMn_yuXx1EycPcKJqT4,4780 +torch/export/pt2_archive/constants.py,sha256=I03jOUF2310XCUciV5QRi-QW3XbcvgUFWBuMWo99cMI,1765 +torch/export/unflatten.py,sha256=CmBlvMDeiyIju0itEksmLvoBOUculKVumBYiK0x0cKU,70882 +torch/fft/__init__.py,sha256=WqJ1Z1KMnbxX-6KdwopMcr7m-j6R9E0wd-cFlgf9VQ8,55337 +torch/fft/__pycache__/__init__.cpython-310.pyc,, +torch/func/__init__.py,sha256=sUjka9l7rIWURFlItERpQgoeiNfWjMi083ISlouT1cg,656 +torch/func/__pycache__/__init__.cpython-310.pyc,, +torch/functional.py,sha256=Wzj2IfukrH4PaJMc4B3iRu0kBK_cOfiQVhCFigu3n7w,87267 +torch/futures/__init__.py,sha256=0u7MFT7FooI81iZ4RoW25eDJdp4wxv3fe6abrJL5x2I,14479 +torch/futures/__pycache__/__init__.cpython-310.pyc,, +torch/fx/__init__.py,sha256=u-GEqNYTjXXKCezS9wIYxqfRYBM8EWUbdYpaTqUu6eI,4162 +torch/fx/__pycache__/__init__.cpython-310.pyc,, +torch/fx/__pycache__/_compatibility.cpython-310.pyc,, +torch/fx/__pycache__/_graph_pickler.cpython-310.pyc,, +torch/fx/__pycache__/_lazy_graph_module.cpython-310.pyc,, +torch/fx/__pycache__/_pytree.cpython-310.pyc,, +torch/fx/__pycache__/_symbolic_trace.cpython-310.pyc,, +torch/fx/__pycache__/_utils.cpython-310.pyc,, +torch/fx/__pycache__/annotate.cpython-310.pyc,, +torch/fx/__pycache__/config.cpython-310.pyc,, +torch/fx/__pycache__/graph.cpython-310.pyc,, +torch/fx/__pycache__/graph_module.cpython-310.pyc,, +torch/fx/__pycache__/immutable_collections.cpython-310.pyc,, +torch/fx/__pycache__/interpreter.cpython-310.pyc,, +torch/fx/__pycache__/node.cpython-310.pyc,, +torch/fx/__pycache__/operator_schemas.cpython-310.pyc,, +torch/fx/__pycache__/proxy.cpython-310.pyc,, +torch/fx/__pycache__/subgraph_rewriter.cpython-310.pyc,, +torch/fx/__pycache__/tensor_type.cpython-310.pyc,, +torch/fx/__pycache__/traceback.cpython-310.pyc,, +torch/fx/_compatibility.py,sha256=VS2lqogT1QHXcYSi3uNWvu4ulJ15UkkU9d_B-dRRg4I,1108 +torch/fx/_graph_pickler.py,sha256=jMLIhnXVosTS3-kNOebSC7sM6n3mrsnNYPQ8eIICRkw,23306 +torch/fx/_lazy_graph_module.py,sha256=gSj3vI6cVhZ7Yb1INUZ2CMAUvNQDE9bnbyTDQQ1JBtY,6855 +torch/fx/_pytree.py,sha256=yVrruqXXfL_ShZoyATJOkAXs3QRlp9FJ8uGo4xffUOQ,3610 +torch/fx/_symbolic_trace.py,sha256=goHmuw7v9VB4xVYeE3iw3xkwyksDGxN3KRZrqztI_Kg,52053 +torch/fx/_utils.py,sha256=C2b3HZBaEn6nuwO7XcXP7tCfzmhPxxH6HEqfR1pMcLE,1736 +torch/fx/annotate.py,sha256=3OjVD3HmPinz3R7luOaN3sdUa5QcAGAsJhezXLC8ojE,1256 +torch/fx/config.py,sha256=WCEtse0BbrYqxaZMeTfhL-jAls6d1SvUd4l8DwEB3DU,329 +torch/fx/experimental/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/fx/experimental/__pycache__/__init__.cpython-310.pyc,, +torch/fx/experimental/__pycache__/_backward_state.cpython-310.pyc,, +torch/fx/experimental/__pycache__/_config.cpython-310.pyc,, +torch/fx/experimental/__pycache__/_constant_symnode.cpython-310.pyc,, +torch/fx/experimental/__pycache__/_dynamism.cpython-310.pyc,, +torch/fx/experimental/__pycache__/accelerator_partitioner.cpython-310.pyc,, +torch/fx/experimental/__pycache__/const_fold.cpython-310.pyc,, +torch/fx/experimental/__pycache__/debug.cpython-310.pyc,, +torch/fx/experimental/__pycache__/graph_gradual_typechecker.cpython-310.pyc,, +torch/fx/experimental/__pycache__/merge_matmul.cpython-310.pyc,, +torch/fx/experimental/__pycache__/meta_tracer.cpython-310.pyc,, +torch/fx/experimental/__pycache__/normalize.cpython-310.pyc,, +torch/fx/experimental/__pycache__/optimization.cpython-310.pyc,, +torch/fx/experimental/__pycache__/partitioner_utils.cpython-310.pyc,, +torch/fx/experimental/__pycache__/proxy_tensor.cpython-310.pyc,, +torch/fx/experimental/__pycache__/recording.cpython-310.pyc,, +torch/fx/experimental/__pycache__/refinement_types.cpython-310.pyc,, +torch/fx/experimental/__pycache__/rewriter.cpython-310.pyc,, +torch/fx/experimental/__pycache__/schema_type_annotation.cpython-310.pyc,, +torch/fx/experimental/__pycache__/sym_node.cpython-310.pyc,, +torch/fx/experimental/__pycache__/symbolic_shapes.cpython-310.pyc,, +torch/fx/experimental/__pycache__/unify_refinements.cpython-310.pyc,, +torch/fx/experimental/__pycache__/validator.cpython-310.pyc,, +torch/fx/experimental/_backward_state.py,sha256=TzC9Uin0ccyk7oG5z7HQPhRP6I0_6-HC28DOXpzUZzE,967 +torch/fx/experimental/_config.py,sha256=_HueyDWIxkreNmL9M1WiEf0utejCXGaHqSbLNKODNvM,4953 +torch/fx/experimental/_constant_symnode.py,sha256=yQhfLfIcIY0HKznOrhlwb7SN5HqVSqA_gTGkY5JW1UM,1751 +torch/fx/experimental/_dynamism.py,sha256=kA1reH9b7TQTV2c_32VnKbvsKZH75aHFSwSoq8aQPtQ,4528 +torch/fx/experimental/accelerator_partitioner.py,sha256=RJ4FLt71BH2xxeuv9Zjpg3MgGmWxod8unU9olFkIm_k,47975 +torch/fx/experimental/const_fold.py,sha256=Cx1OdCmGox-cOKjMZCPNHWSGkDO3XYUXxrrYixTDcjk,14300 +torch/fx/experimental/debug.py,sha256=i3xyFB3WsaE3k09YInW_WUMTPi9mpNNbfTbB-7jFmvs,811 +torch/fx/experimental/graph_gradual_typechecker.py,sha256=l1ajdCP4kxc1kJF_zX8j2SKgZXxMiivpqSSkWSTpKS8,33895 +torch/fx/experimental/merge_matmul.py,sha256=af2O8HnVGDpqe3kHkmMvC1jc2dLvaSCOIJ_jcZu1FSI,6105 +torch/fx/experimental/meta_tracer.py,sha256=pgTG-QXj5--3CbDbLAKKdA7QAVP91TmvhMGDxzk7Fak,10776 +torch/fx/experimental/migrate_gradual_types/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/fx/experimental/migrate_gradual_types/__pycache__/__init__.cpython-310.pyc,, +torch/fx/experimental/migrate_gradual_types/__pycache__/constraint.cpython-310.pyc,, +torch/fx/experimental/migrate_gradual_types/__pycache__/constraint_generator.cpython-310.pyc,, +torch/fx/experimental/migrate_gradual_types/__pycache__/constraint_transformation.cpython-310.pyc,, +torch/fx/experimental/migrate_gradual_types/__pycache__/operation.cpython-310.pyc,, +torch/fx/experimental/migrate_gradual_types/__pycache__/transform_to_z3.cpython-310.pyc,, +torch/fx/experimental/migrate_gradual_types/__pycache__/util.cpython-310.pyc,, +torch/fx/experimental/migrate_gradual_types/__pycache__/z3_types.cpython-310.pyc,, +torch/fx/experimental/migrate_gradual_types/constraint.py,sha256=noLUf4MzsZYFp507xyESZOtLdivYJzQrLh7BO_tO_o0,17089 +torch/fx/experimental/migrate_gradual_types/constraint_generator.py,sha256=Mr6U2WdjYdLQh8-sHrkhOO7U70inKWsMRq29zrcHAnE,51315 +torch/fx/experimental/migrate_gradual_types/constraint_transformation.py,sha256=4OtFZxl4Ep0OSmkFR_irPxCF5QPH-Wtxpp0-jqNSfDw,41010 +torch/fx/experimental/migrate_gradual_types/operation.py,sha256=v7haImk8KCWq9XBmzu2MWoApiGGQsQY4xF-VChtRBVI,287 +torch/fx/experimental/migrate_gradual_types/transform_to_z3.py,sha256=-g7CXC7NOib1wcfGO20IKnrP4RyFeWCzjjfIqzFN9N0,16370 +torch/fx/experimental/migrate_gradual_types/util.py,sha256=7FpQPVuVeocjt7ZC8UYSiCES-Qe-D2HQzYWSTvaR5lY,1485 +torch/fx/experimental/migrate_gradual_types/z3_types.py,sha256=9CzjT7bWhU2CUNwZrQcdI7PDY8haxTrzGBRw_V7X7dk,807 +torch/fx/experimental/normalize.py,sha256=epf-IrRANBKb4wLcBA4zANEL8YD-UbZujP2Lzf7OHag,5491 +torch/fx/experimental/optimization.py,sha256=M4snlg1Mm84_-gwH2BIKPVHFFqrETHkwJS1-DhITlPE,17809 +torch/fx/experimental/partitioner_utils.py,sha256=OlitD91AGdurF5-P7hITygyWArX5vL9iL95iZlwkGXA,12295 +torch/fx/experimental/proxy_tensor.py,sha256=8sgP3fm7GFQx8M1dQ7se0gfQm8i9f7Tv0KvDMcO0IMI,106080 +torch/fx/experimental/recording.py,sha256=xAU6T8OhcwmQZD4w_WdEtoxOmP2mi6VAXS8gN-l7zC8,19950 +torch/fx/experimental/refinement_types.py,sha256=888K8p43hadBWu9MPg4lrPeDIF8g9XYRnmI5nnwFYpw,451 +torch/fx/experimental/rewriter.py,sha256=sfCBriNu5JjBoUcuDf2p2yr-xhlu-Yt8y46gtjxp_Ww,5495 +torch/fx/experimental/schema_type_annotation.py,sha256=DFGAdzaKvb4IKpuG1cwHoNJMVjeueqJA_Ry9zfnpXrw,5379 +torch/fx/experimental/sym_node.py,sha256=Q0UZ4v1LCJOc7R1HWg5eb9ZsAw4ZHzPPw5JXkZ7wSdk,61732 +torch/fx/experimental/symbolic_shapes.py,sha256=5vAZkkW_VLYjkuo3eOyTEJChUkMEr8SWYmohbEQvJ1Q,335722 +torch/fx/experimental/unification/__init__.py,sha256=zJTtn828T13Feto4TKixj88dtdoRz5_TjoseKssyzeo,196 +torch/fx/experimental/unification/__pycache__/__init__.cpython-310.pyc,, +torch/fx/experimental/unification/__pycache__/core.cpython-310.pyc,, +torch/fx/experimental/unification/__pycache__/dispatch.cpython-310.pyc,, +torch/fx/experimental/unification/__pycache__/match.cpython-310.pyc,, +torch/fx/experimental/unification/__pycache__/more.cpython-310.pyc,, +torch/fx/experimental/unification/__pycache__/unification_tools.cpython-310.pyc,, +torch/fx/experimental/unification/__pycache__/utils.cpython-310.pyc,, +torch/fx/experimental/unification/__pycache__/variable.cpython-310.pyc,, +torch/fx/experimental/unification/core.py,sha256=TsI4QAfsoffC1cjq1moVtbVobw-P8rJlDUQ0hiMAAfM,2780 +torch/fx/experimental/unification/dispatch.py,sha256=9oSoC5tHuRoDMwgjgI7NvGVo-aW9qRrgz6SBNEnx6Lc,207 +torch/fx/experimental/unification/match.py,sha256=nIPkwl-CJykPeZ9s97iMksw4l3OV2eOIBxVaIYBLD5s,3414 +torch/fx/experimental/unification/more.py,sha256=-bsfUvO-DTRuMXJ2EYh5McWTiY2fZkG8Ccimb2gm-9s,3194 +torch/fx/experimental/unification/multipledispatch/__init__.py,sha256=xjEjlwV6TTwkgteOREoXUJwMTiNnpJN3YfBALC9eslU,139 +torch/fx/experimental/unification/multipledispatch/__pycache__/__init__.cpython-310.pyc,, +torch/fx/experimental/unification/multipledispatch/__pycache__/conflict.cpython-310.pyc,, +torch/fx/experimental/unification/multipledispatch/__pycache__/core.cpython-310.pyc,, +torch/fx/experimental/unification/multipledispatch/__pycache__/dispatcher.cpython-310.pyc,, +torch/fx/experimental/unification/multipledispatch/__pycache__/utils.cpython-310.pyc,, +torch/fx/experimental/unification/multipledispatch/__pycache__/variadic.cpython-310.pyc,, +torch/fx/experimental/unification/multipledispatch/conflict.py,sha256=LcZzj_sal6mjl38p9kCL9c5-ou-E2okfEGI95-7oRQs,4210 +torch/fx/experimental/unification/multipledispatch/core.py,sha256=FS6cUF9-0llkG63x7hUCeUDdXVcjDnN_kTA3ngfniT4,2859 +torch/fx/experimental/unification/multipledispatch/dispatcher.py,sha256=6X6EpNgCFrblae53nwWOwDiglEZLTdCUO1C5Tei1ioA,13972 +torch/fx/experimental/unification/multipledispatch/utils.py,sha256=0OKZ13mmxBaSLwPbkofoeg2FZNQzLgHDKsGkMbIrCWs,3812 +torch/fx/experimental/unification/multipledispatch/variadic.py,sha256=irgdEYhgS2XLxgdZZLPrApQPiB7c2wh9jZt4J_yu4Xs,2962 +torch/fx/experimental/unification/unification_tools.py,sha256=hNtkXf6wNG80hCR1KXVjLJVmZZCbTBfoMfPfR-PApFI,10604 +torch/fx/experimental/unification/utils.py,sha256=0SLppRNEia8HHUs7YWc2ITjLu-EhEnoGypiVo16eglQ,2983 +torch/fx/experimental/unification/variable.py,sha256=mwytnm5NDShbcqIc6Jw3ARu5qCVPErP0WmV1HYw_exw,2057 +torch/fx/experimental/unify_refinements.py,sha256=Gh5xwG0o9le3hjZF3B43SG9TPA67j5wPnrjh7nVFur4,3130 +torch/fx/experimental/validator.py,sha256=xX-lEp4SYfYHRWC1OYl4izdQqgYxr5WK8qSRNRUBhj4,34185 +torch/fx/graph.py,sha256=98thhGPskjE1GuY1vvBCElVkUzmzkpp6PefLRa71nxI,88859 +torch/fx/graph_module.py,sha256=poE3jbxis273Unx_UlRjKmL_U2Q1uLWxITDUZDU0EK8,45812 +torch/fx/immutable_collections.py,sha256=9OeeV5ZPLcswvuNEo7xEepwdUJsW0JYdIwaNNYCOKG4,3269 +torch/fx/interpreter.py,sha256=xE0zQ82BMLvqyPNq3Nfh1NCPR8AbEH_hYaEYEdVQ0yI,25278 +torch/fx/node.py,sha256=AdJepkoUhW1Xsa5otO7F4mlIp6wsLG9S5F5goxN43yA,34949 +torch/fx/operator_schemas.py,sha256=d9UtbAEe4Jrkeg8UttXUwR1KwQaIpPv4wrTV6IE32FM,21904 +torch/fx/passes/__init__.py,sha256=qXzO3_W60MDLQ1l4Rymt3ZwAxtbmkQ7Plsx9kQjWIm8,263 +torch/fx/passes/__pycache__/__init__.cpython-310.pyc,, +torch/fx/passes/__pycache__/_tensorify_python_scalars.cpython-310.pyc,, +torch/fx/passes/__pycache__/annotate_getitem_nodes.cpython-310.pyc,, +torch/fx/passes/__pycache__/fake_tensor_prop.cpython-310.pyc,, +torch/fx/passes/__pycache__/graph_drawer.cpython-310.pyc,, +torch/fx/passes/__pycache__/graph_manipulation.cpython-310.pyc,, +torch/fx/passes/__pycache__/graph_transform_observer.cpython-310.pyc,, +torch/fx/passes/__pycache__/net_min_base.cpython-310.pyc,, +torch/fx/passes/__pycache__/operator_support.cpython-310.pyc,, +torch/fx/passes/__pycache__/param_fetch.cpython-310.pyc,, +torch/fx/passes/__pycache__/pass_manager.cpython-310.pyc,, +torch/fx/passes/__pycache__/regional_inductor.cpython-310.pyc,, +torch/fx/passes/__pycache__/reinplace.cpython-310.pyc,, +torch/fx/passes/__pycache__/runtime_assert.cpython-310.pyc,, +torch/fx/passes/__pycache__/shape_prop.cpython-310.pyc,, +torch/fx/passes/__pycache__/split_module.cpython-310.pyc,, +torch/fx/passes/__pycache__/split_utils.cpython-310.pyc,, +torch/fx/passes/__pycache__/splitter_base.cpython-310.pyc,, +torch/fx/passes/__pycache__/tools_common.cpython-310.pyc,, +torch/fx/passes/_tensorify_python_scalars.py,sha256=L3VSUcV9GUb6jXMtfysfCamgZmv-6_sI0B70B7jYW0o,17315 +torch/fx/passes/annotate_getitem_nodes.py,sha256=ODry9Z4eRLlAXBnT1FEuvlr0x2PVVxh-9yfNL9P1Z0o,2761 +torch/fx/passes/backends/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/fx/passes/backends/__pycache__/__init__.cpython-310.pyc,, +torch/fx/passes/backends/__pycache__/cudagraphs.cpython-310.pyc,, +torch/fx/passes/backends/cudagraphs.py,sha256=iRy6rWuLOPITB_-gkgJmK8eGYluYIz7ZGjYaO4x41fc,2079 +torch/fx/passes/dialect/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/fx/passes/dialect/__pycache__/__init__.cpython-310.pyc,, +torch/fx/passes/dialect/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/fx/passes/dialect/common/__pycache__/__init__.cpython-310.pyc,, +torch/fx/passes/dialect/common/__pycache__/cse_pass.cpython-310.pyc,, +torch/fx/passes/dialect/common/cse_pass.py,sha256=CBRTo0Hw3MOIzh65C-f-l-eJ3nWt4IBgUHPg_klizyA,5248 +torch/fx/passes/fake_tensor_prop.py,sha256=2jMqrQCNPaZh0V5pXvwD5EEl5fN1_a6mmQhYK2IEPs4,4200 +torch/fx/passes/graph_drawer.py,sha256=pF2blEFu_vxb4uJNMsYMLZK5WGw2j1gQLBSLZ5mmES8,19253 +torch/fx/passes/graph_manipulation.py,sha256=KIoz1SrXGCHCeyFaZ9w5R9LvmW64iCCwoDFI-7rUQwM,3965 +torch/fx/passes/graph_transform_observer.py,sha256=8VvlURND77mj-P7rIUuoxd14PoTZgGfcrWtKPztIiAc,7785 +torch/fx/passes/infra/__init__.py,sha256=UuBORluunUu4B8DKb0OlqkNIm71XUW_ZD_utIvqnBLs,27 +torch/fx/passes/infra/__pycache__/__init__.cpython-310.pyc,, +torch/fx/passes/infra/__pycache__/partitioner.cpython-310.pyc,, +torch/fx/passes/infra/__pycache__/pass_base.cpython-310.pyc,, +torch/fx/passes/infra/__pycache__/pass_manager.cpython-310.pyc,, +torch/fx/passes/infra/partitioner.py,sha256=8TCg-Dmh6e8ly-BEyTFebhsKfsWjBu3mVCzsE_3MJjA,17472 +torch/fx/passes/infra/pass_base.py,sha256=LYY5gHZwRlMdKwo59eP3HS7F65AT7BP61QMlWWAaUI4,2541 +torch/fx/passes/infra/pass_manager.py,sha256=CoLs4tHij-Roqn_0gMhsYKHTfpSbu8yrMYPJV3Ec5mo,10394 +torch/fx/passes/net_min_base.py,sha256=wUclOyFmwOKgS3fy0JZW8L9PGz318tl6TtEXRbFuLw4,36790 +torch/fx/passes/operator_support.py,sha256=KUeMtZH3xsjtx-CApqYzX7RAsuvdj2FKEDXp--SgqXU,7632 +torch/fx/passes/param_fetch.py,sha256=6gOQFJ-MRJF6g5sp8Typ9j6pBR9ibsVlJ50xjM2af4g,3741 +torch/fx/passes/pass_manager.py,sha256=M1payp6BTA07lxdgUoglDETvk5B-fWRJn0bItOHhKZU,7085 +torch/fx/passes/regional_inductor.py,sha256=tfbwOt-OBzn6_NZo0Og7s8vnI-8-jwA85TGihfEj7Wo,8408 +torch/fx/passes/reinplace.py,sha256=AbvbPJ_1AeRhi-9UAXDLjMwvl5E0vMV9N-Orquabqz0,34556 +torch/fx/passes/runtime_assert.py,sha256=8goGA0pmg5S9ytn8ZZMfVp9f3iuKdpUXa7zXhUZs1Dg,30096 +torch/fx/passes/shape_prop.py,sha256=5wtnWaoBP5M_WzRbLXvNCzqITm9eDq04H2Kn25xBPPU,8326 +torch/fx/passes/split_module.py,sha256=foPzj_amlQoofLBCFZI1atxcT79h643r7gDqCGbaVK0,27580 +torch/fx/passes/split_utils.py,sha256=pNJS9mfAX5V35pskfQZHCw9iQxViTSqzi1lmXCkGyW0,11679 +torch/fx/passes/splitter_base.py,sha256=22r8sVaV2X5SKK9ZRMOjxxZkLln8avH0_ohdShdhb9U,41175 +torch/fx/passes/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/fx/passes/tests/__pycache__/__init__.cpython-310.pyc,, +torch/fx/passes/tests/__pycache__/test_pass_manager.cpython-310.pyc,, +torch/fx/passes/tests/test_pass_manager.py,sha256=_KIwhlzOTY0XQb2WeaYYOFuBUKDtLFRqYeSxHVrS76E,1873 +torch/fx/passes/tools_common.py,sha256=gGY0v4O3NCMO6Qr4KPwYjWmuUk1KHOs8BMTTtCVWJLo,13862 +torch/fx/passes/utils/__init__.py,sha256=6xOYtGu1w_nVvuaxvBoQkSRtxkiIkPh-MzuXjmNC1hI,74 +torch/fx/passes/utils/__pycache__/__init__.cpython-310.pyc,, +torch/fx/passes/utils/__pycache__/common.cpython-310.pyc,, +torch/fx/passes/utils/__pycache__/fuser_utils.cpython-310.pyc,, +torch/fx/passes/utils/__pycache__/matcher_utils.cpython-310.pyc,, +torch/fx/passes/utils/__pycache__/matcher_with_name_node_map_utils.cpython-310.pyc,, +torch/fx/passes/utils/__pycache__/source_matcher_utils.cpython-310.pyc,, +torch/fx/passes/utils/common.py,sha256=Pibw7l3bM1EhlE99tcfPYhOwfRZ4zO4uJf1UFIwsTnA,3161 +torch/fx/passes/utils/fuser_utils.py,sha256=N8x9tgkuFiVW6XzVC19EZItdlnF_oAi5UrhOsIsxQCk,10345 +torch/fx/passes/utils/matcher_utils.py,sha256=peTWkoVultTevk4c3SKhmJ8cbvFTZDUXd2fnunn4SoA,17538 +torch/fx/passes/utils/matcher_with_name_node_map_utils.py,sha256=4V9B-IiJDOI29HKK4d5T85vkpfCbKok9tza4yd4lNxw,4241 +torch/fx/passes/utils/source_matcher_utils.py,sha256=Ev3h0d6NXwBoYksE3UcArOBKKGn1WncdbMLDh_NSTQM,5781 +torch/fx/proxy.py,sha256=ZIOAMGjRp78O5arUrPV0FtaFO9z4v_pD0ZgE1WTWXwU,30612 +torch/fx/subgraph_rewriter.py,sha256=kO4a6kMarmueD6rAdBTHt4jPiNIKvNa1wodFH7uRZHo,16265 +torch/fx/tensor_type.py,sha256=iinrL5hRbvDcMs4cYVKmfYVr1ci6YrQiMmanyH0DIIc,3009 +torch/fx/traceback.py,sha256=lbntyqZxLp6ScRo95YSJL0Lu5-ayinZ7N9M8glgDWxQ,16561 +torch/hub.py,sha256=pO2IRIWCOzHZ8P98BwY6Q156RdHaF3P-8zrYJh4jGQc,33919 +torch/include/ATen/ATen.h,sha256=BHC8UJw-Kkgse6RoCnFPsJL1ZTodth1VYbFstbIiByc,1361 +torch/include/ATen/AccumulateType.h,sha256=kzgekl85-Pf2id9qB_Uo2y5QyXxMGNcamXG-yvueh0Y,6365 +torch/include/ATen/ArrayRef.h,sha256=ofa5-yWJikSN5a0VsjvX-G2qByUSKsCE7z2Hdd1zZjE,298 +torch/include/ATen/Backend.h,sha256=rAIfvXr2KgiCtq5uAiBapYC1r3SLtupFjrmbpeXPhC4,297 +torch/include/ATen/Backtrace.h,sha256=yKbvQ16ihAHBkGQGKh-6pjm6jK-6cp6tjKAhs-3pQHI,300 +torch/include/ATen/BlasBackend.h,sha256=dM74cin5ObOdOP67BUREoUocYhMV043FeI0vom10vu4,1371 +torch/include/ATen/CPUApplyUtils.h,sha256=HImZBT4CCuqV47EmefXlaFdeuoVFOBt8Ey0UQoeNu1g,10872 +torch/include/ATen/CPUFixedAllocator.h,sha256=-z7Tz9exkjw8w2Lq-yjCgOK23L5YbPW4usEjJ2QEPEg,1136 +torch/include/ATen/CPUFunctions.h,sha256=UbQ7FfyyuDj2oE7kHAhxaGD9LFUdleSeWwUHpH795fo,2208 +torch/include/ATen/CPUFunctions_inl.h,sha256=IUZm4Z4LOA8dNOsSJjG1lXoaJsOY6Oi-T9Ne4wnjfNU,27592 +torch/include/ATen/CPUGeneratorImpl.h,sha256=qogO5E0lj9VQz6QVdoaNKSoFFrGagDBJbXVpEnO80Rg,1781 +torch/include/ATen/CUDAFunctions.h,sha256=nwdEjF4wGGMImssj3hmzSOQ_kz4ZKSeT4WQ8UdiBj98,2209 +torch/include/ATen/CUDAFunctions_inl.h,sha256=YZFc2J5wSNwA-Cai1JGFurCoL8SHUTfJeSCxpCrdVE0,33312 +torch/include/ATen/CachedTensorUtils.h,sha256=Rfo1BCyQrhFdY2tO7o2beQD8LxU-7pyZWrdjtTGIacw,1261 +torch/include/ATen/CollapseDims.h,sha256=dWXH85U4p4jsam0cS6pw0m9xunZ34HDLbF-0NR9eCQk,2814 +torch/include/ATen/CompositeExplicitAutogradFunctions.h,sha256=n7GTKOgLj3NDa9ELmt5PBi2AsqMZP26HUPD-YpGEqHQ,2230 +torch/include/ATen/CompositeExplicitAutogradFunctions_inl.h,sha256=3406Z2EG9MHPT9_M41BXfWEGfbNk3FNI8tC_5u4HME4,40924 +torch/include/ATen/CompositeExplicitAutogradNonFunctionalFunctions.h,sha256=5fa_cZ7Y3np6u7c94LzhMe5g1F_aPAcJVDvNxL1NZcY,2243 +torch/include/ATen/CompositeExplicitAutogradNonFunctionalFunctions_inl.h,sha256=sNzTjx4_pxnC_EJx7mf4FYX8lfoWhv4BTRRJWcp5kh4,26580 +torch/include/ATen/CompositeImplicitAutogradFunctions.h,sha256=wNw8oZ66wh3uuYpxU9X-e3Xd9umlWxbhOWKqja8oE2U,2230 +torch/include/ATen/CompositeImplicitAutogradFunctions_inl.h,sha256=hKNwuexCDFZ7KWPEac_fc7I1wGAOlcaHcJeyGDefx4Q,35345 +torch/include/ATen/CompositeImplicitAutogradNestedTensorFunctions.h,sha256=LtEbQKDO2Ez1IEVsjvy4GT2ZzDPOaWhFmIeHimLtIPs,2242 +torch/include/ATen/CompositeImplicitAutogradNestedTensorFunctions_inl.h,sha256=ViwELt6UAz5OKrc24yLg7-VTwdrqRge4iq7K6JseUfU,1380 +torch/include/ATen/Config.h,sha256=eBANP6HIgeS7Rf9hDDIzXqVfpT2CGHS4wG4qB0vJjm8,1055 +torch/include/ATen/Context.h,sha256=W4PrZNMTWiWkCs_yL1pj7BsLtaWCxOlIhT9dIKwU4Z0,25064 +torch/include/ATen/DLConvertor.h,sha256=-LqU122QRzQjYP2f5PVJ86w55oxIKNpz9SGnnbPH51c,3168 +torch/include/ATen/DTensorState.h,sha256=5Tf_4vlPJcvhauK-lyQU9FI9nicxD_7DLDbA1nukmsE,1270 +torch/include/ATen/Device.h,sha256=vefXE-ivuf98uv1Px06EGn9MycHCV350yNT9g3JCxXY,296 +torch/include/ATen/DeviceAccelerator.h,sha256=tEHMw_9Q1p4MZ2G4Dp2RBB7Eib9Mjz-EmtR9nltqVXA,4570 +torch/include/ATen/DeviceGuard.h,sha256=JMlpTXKWyXFaIIj_ZehQgfM5bP2EKdg4VnPbHAxy0JI,1419 +torch/include/ATen/DimVector.h,sha256=6Xv8E-rdaF4g-zRjm8aVO2AF41P61MpNjUbH-7OhL00,300 +torch/include/ATen/Dimname.h,sha256=KGwDTru2t_tk24ewGxmJexXVeYAOdQOkv23W1yXBE64,285 +torch/include/ATen/Dispatch.h,sha256=0cQd6O-2y6OwcdhzcnIBE_HYY_HVn7-ns21NuzkcUgY,39011 +torch/include/ATen/Dispatch_v2.h,sha256=spV91MM7IE6FwA1gQ8KsHRBs13SK8opA1Zj28BvaBk4,58876 +torch/include/ATen/DynamicLibrary.h,sha256=578X2i8u8535Av4VGp0XYwSPY-_rbvt7B0q0QaxTYeY,933 +torch/include/ATen/EmptyTensor.h,sha256=ZL1Pz5KThapI0aPLX5VW37HLtGP5ifznxv3seu736Wc,4946 +torch/include/ATen/ExpandBase.h,sha256=51GgMs8O36068o3xhE-2NjvOTV0KwVzyDbWOglc8GCI,1168 +torch/include/ATen/ExpandUtils.h,sha256=7eWtQgp1V6m7yauLzdXwY0LxBrbXxHvap8KYmFk8jAg,16935 +torch/include/ATen/Formatting.h,sha256=a7uH36sKyuNzq8kFdXO-214shUmRw8KmcnMt8VOTMJw,288 +torch/include/ATen/FuncTorchTLS.h,sha256=Fl4PmCDf7Sf6JM2ApHD5jbSEZBuG_ZCG_Buk_y2h8F0,2070 +torch/include/ATen/FunctionalStorageImpl.h,sha256=GD9QhDinZ0CRwSvD0U2bO-6UMOuXDPpOJfJmiF8cFdk,9905 +torch/include/ATen/FunctionalTensorWrapper.h,sha256=1sFB2PgE5pk9rqmKhmRuA-G_RcFeJ0strxwekBYq8Nc,18661 +torch/include/ATen/FunctionalizeFallbackKernel.h,sha256=LWHVmU55UcNZEyK4w1paUBkA1hqTkUSbGny0hoi_GMo,2082 +torch/include/ATen/Functions.h,sha256=l7WkxXsNjNxUVEQJKhyS19xUWMFw8cjy8PCgvfT4m-0,55559 +torch/include/ATen/Generator.h,sha256=HOTLCyhKpa4uAF4taTguJPTKvRhBXooFbVKKEomg6OM,300 +torch/include/ATen/InferSize.h,sha256=RTa90ICq20CJZ-pUshTdcGLtgWMeYEi1-HRnc7WQugo,4182 +torch/include/ATen/InitialTensorOptions.h,sha256=AjYaGyhq4NcQ3eyNnj6ctamEghynIVm1guG3VFczdOQ,693 +torch/include/ATen/Layout.h,sha256=tRw-433FrW3h68PD2DQO95UHaUt8yLMdMHiydQrCv20,296 +torch/include/ATen/LegacyBatchedFallback.h,sha256=wegTT0gYFlyoX8I7IuXa7H7o8nGHxZTjI7UadTUSd64,1228 +torch/include/ATen/LegacyBatchedTensorImpl.h,sha256=fS03y5jlojJCq3738MG4YhK2ocIfH6yTdv2Q92rxax8,5817 +torch/include/ATen/LegacyVmapMode.h,sha256=lnhuI05JjTfS7uL4feKP-iLZ5C0eLja6i3WysAYOO6U,1181 +torch/include/ATen/LegacyVmapTransforms.h,sha256=b2ZRmNr3IfHKM-mTVpjYF5ti5yyUKrLZNUh5dg-7G1E,8068 +torch/include/ATen/LinalgBackend.h,sha256=eBFKPJs-zcaW1GEVbojXthxShQ404cfTV6f5VqjEWmA,973 +torch/include/ATen/MapAllocator.h,sha256=0dB-x0W0HKVhxBcTy_O6qEkIfl-YWuF4M67yKH7rLlg,3942 +torch/include/ATen/MatrixRef.h,sha256=CSsbtMITAlDwQQ7nG9REtvsZsb1Ft4xcd3s08NXiQos,3260 +torch/include/ATen/MemoryOverlap.h,sha256=E06jBGvemBeQzG5f83ZyGbyUKUiwypNqLkhkBB3M_eQ,1541 +torch/include/ATen/MetaFunctions.h,sha256=F4QJuE1qvgTMD_pxybgCc3UQH3c7GqdjNB3BdRFvMsE,2209 +torch/include/ATen/MetaFunctions_inl.h,sha256=u98aN3OUikejR0cpHPB_csb_f53kG_Gf9qcQ9P92n-M,16210 +torch/include/ATen/MethodOperators.h,sha256=sZgm526EEFlmIxwHrazletqs9fsagr75zEJQIDbSrKY,15737 +torch/include/ATen/NamedTensor.h,sha256=pWHd3I9W1OQTcP7xqgD7y8M_xLuT8escT3VngDS3TGY,289 +torch/include/ATen/NamedTensorUtils.h,sha256=9Pa61OV7pxXtSasv9kKpzvjN-F0KSrhoH98s9EopgqE,7009 +torch/include/ATen/NativeFunctions.h,sha256=tL6VrHRaVtU1uTqHBIPu-sXa6f0CUuzx3hzwI6DBlP8,61368 +torch/include/ATen/NativeMetaFunctions.h,sha256=QTmglfz7dx-WdqoW0rwgsx2CM1d2c_UQmwnz0eIuwoQ,57863 +torch/include/ATen/NestedTensorImpl.h,sha256=Ut705YrlQpqGLCseQFvHVIF2zK2p1-0x504sT4NM4YU,10514 +torch/include/ATen/NumericUtils.h,sha256=DFP-P8EXkAhpX3xIzZljpzG8BdNxYZYc17KMTlMcY9o,5391 +torch/include/ATen/OpMathType.h,sha256=DZeNTy6bHsuldLJLLlnqHd_5atCSYt3BXBw1m_ba1cw,1835 +torch/include/ATen/OpaqueTensorImpl.h,sha256=-DEfs1JdJ9WEs6rpfXGJLs6atOM24dUKf7JOGWl7gbU,7069 +torch/include/ATen/Operators.h,sha256=DKLUX9CXPfjHetlYocTBYYWoeKYzv8HSvIfFwQzLT5Q,59438 +torch/include/ATen/PTThreadPool.h,sha256=B2QRG9BWowrxxpNvjj39vsVk3pFP54MkJJ4BAJR3mvQ,645 +torch/include/ATen/PadNd.h,sha256=UkJhEHwFKN-TZcN2i6XJEDprHoSSqUJo46diM8SttB4,380 +torch/include/ATen/Parallel-inl.h,sha256=vFqIxc3KSSdtx6Z_dkECPkgMy0AbMMhTvAd75nFvnZE,2547 +torch/include/ATen/Parallel.h,sha256=7tfhOczECJB8NB9Lc2kL5p1KVbQQKyMGksueVtBxvOk,5039 +torch/include/ATen/ParallelFuture.h,sha256=4vx_WX3OIIbFlQ4jkn44Kf3waTXNnEyd48iquBO5qVw,553 +torch/include/ATen/ParallelNative.h,sha256=p3C7kunTT9v2KvAOt6aWd1lh9p9VFPmHDBiPGxlhQvg,546 +torch/include/ATen/ParallelOpenMP.h,sha256=W6LXF3k0MoE21pu3Q7MlyI3D03-2dxHyU4c0HslE5ns,1537 +torch/include/ATen/PythonTorchFunctionTLS.h,sha256=wGyBA6K8qfWh_owJBAbdlcZSArbf0Ff9aVOlD6f25TY,1502 +torch/include/ATen/ROCmFABackend.h,sha256=1mY6byW5IpdUXVGZugzREWnh6QqX75B6OZfIeFReEDU,977 +torch/include/ATen/RedispatchFunctions.h,sha256=E00SwBCNRmPZkEuziWthc3-QnTUKUv8pdepYD6ZTk8s,2242876 +torch/include/ATen/RegistrationDeclarations.h,sha256=YoOXC_PUYacVcaGKiPe2tZr2e6vbJ5sQp-qQEV7RrmY,924160 +torch/include/ATen/SDPBackend.h,sha256=cmXomX1RjUAY9uCh2-bSn9FzRpMjFMvUF6bWJBIUczE,507 +torch/include/ATen/SavedTensorHooks.h,sha256=c3B9NplJ5PeOU3u3por0HtEbClY_tijozi0EwK1eyx8,2740 +torch/include/ATen/Scalar.h,sha256=LSNWNrn_jf_qZSVOFXeONdYs5wdSE0uRzKfNX78c_V8,298 +torch/include/ATen/ScalarOps.h,sha256=71v1_d2-kJqm1LD1IzlsFgAY4mufIgiryxmBo3-qaBQ,1849 +torch/include/ATen/ScalarType.h,sha256=SfIfa3E8pBOkFD19qgu43TLOGKptlPIOZrTa4NmD5Pc,383 +torch/include/ATen/SequenceNumber.h,sha256=3lZRqokrZ29LTAwEAFVUso6WrxBO_ZE3rTvvN2DKqy8,587 +torch/include/ATen/SmallVector.h,sha256=gNWDIANGgC7StyDTrqVTMbA2jQSV1AWiwVx397q8n8o,301 +torch/include/ATen/SparseCsrTensorImpl.h,sha256=utiY7n547k3fbK0jeN4kiQdzBCX2dhVUzS2pPEZp_NI,7421 +torch/include/ATen/SparseCsrTensorUtils.h,sha256=YKC1sAXjbnC_2PVBoWy6dtVBs8T4hWysh0kBCDXcBTE,18028 +torch/include/ATen/SparseTensorImpl.h,sha256=hwtP016bri4KpgnUyu5pueXUDh3DlOAYGUckKim9MC4,15673 +torch/include/ATen/Storage.h,sha256=X1c-p8qXYDFlMsVH5Kw_dgncGyQrrKuzyA0PaY9lY-o,297 +torch/include/ATen/StorageUtils.h,sha256=_VKiR9j8cAdZAHUyT5FA0C9E7HfTDzQxOCv41tMRDNk,1562 +torch/include/ATen/Tensor.h,sha256=C6FD9cacNwOuxJD4_JqjHg34qxaDUZMXWq2GZvm2Yqg,298 +torch/include/ATen/TensorAccessor.h,sha256=zASg1wYR2DpIcYfZnGqgEd9QG8RNWhzJT0mcE7D-WWA,305 +torch/include/ATen/TensorGeometry.h,sha256=cOYlRlEK5XQy5DryIrAAdrJ7uFg0nKnUMROreNDeWc4,4810 +torch/include/ATen/TensorIndexing.h,sha256=XC4dmvzjZ9YG1POeDujr2BeC96zfQDLOZM8dPY_xZSY,25177 +torch/include/ATen/TensorIterator.h,sha256=BqdFbEK1OOLkBCn_sZTprRt4ZzUJKBSp4kL9jUCHdxI,39240 +torch/include/ATen/TensorIteratorInternal.h,sha256=N-f8g2bYnUwKBFz_M4gaPKC-7u7SOGjz8Waa7QT3P8U,2176 +torch/include/ATen/TensorMeta.h,sha256=FvY4aUQbKUy3jLV8uOL5whccUfE337DbpxewhG3CEHU,5288 +torch/include/ATen/TensorNames.h,sha256=JXurFfj4LhYDhrpqS9qlPPci4bA-jaleQgAl8fx286A,2825 +torch/include/ATen/TensorOperators.h,sha256=rFW5uIPy2FvyDhV_Cv-SX4HluU7mkR-4sbt2kGF313g,2745 +torch/include/ATen/TensorOptions.h,sha256=58KP7XEfy87cJVZ8fXD1QPvhTMLTYtcV0DUiJSo5jgs,303 +torch/include/ATen/TensorSubclassLikeUtils.h,sha256=vYN0jOsm3jMh_yNKtB3GZzbnImJa-LAthHJbhRKlkVg,3484 +torch/include/ATen/TensorUtils.h,sha256=_-KPHNuzJz-5-HdisWWhK2zbk7CoPgSEQJpymCM0kms,6212 +torch/include/ATen/ThreadLocalPythonObjects.h,sha256=ucUPlRvWSUvfbXwa8qAyrkr1nwAfgqy9veUFsKvxVhg,861 +torch/include/ATen/ThreadLocalState.h,sha256=BapXkyAgHfntv0Dya1DIvjfwPHRO3DLYIHlWzTi8oM4,4608 +torch/include/ATen/TracerMode.h,sha256=zrQHJTz242lMURs7jQp5cIEMYIi-r0w0GL4LjJiqV7E,5763 +torch/include/ATen/TypeDefault.h,sha256=gItr5F3ooMk0KcBhYl07hHAelS1_Hn69maVJ871RNF8,697 +torch/include/ATen/Utils.h,sha256=bLoH6TfXKju5mLSMXCWSTGEPAppiheEEdly9jiVMgzw,3826 +torch/include/ATen/Version.h,sha256=gwJrgxcrcmw3WBLQ7zRzxhNoKmlF6_6nVDbaV2dYZV0,638 +torch/include/ATen/VmapGeneratedPlumbing.h,sha256=h91bWhy3nCm2dmxEoyubeDvt4cVK7YuCcLEy6e3cV8k,1763248 +torch/include/ATen/WrapDimUtils.h,sha256=ICeanLwAPsgdXpzErqbh3Fh8lE7str_veIpRSERuGwg,5109 +torch/include/ATen/WrapDimUtilsMulti.h,sha256=ktOVH3vp7JM5jKUy_bWisOamR-aomgs06AlRuxAg2IM,1329 +torch/include/ATen/autocast_mode.h,sha256=fMuPKrxnhK_T6ZiTnmksUkz67yaBXx6QBSQYxamtDsA,41455 +torch/include/ATen/ceil_div.h,sha256=ijWlLD2OVoG2d0qgrxvh9wlxYiLthVaZfLssulHBvhM,751 +torch/include/ATen/code_template.h,sha256=Dx-x6o01aL6MmdiezcVb_Uc-qFcb2b2WOBZgcJwrC8c,7205 +torch/include/ATen/core/ATenGeneral.h,sha256=_O9V6rXClA-PYtHzn1XvolQJnfw-eIOk-HprG_O-On4,299 +torch/include/ATen/core/ATenOpList.h,sha256=bbA9vLBtbI6ExK7ZNoVXC_jIuNlASPvIZWBFEE-xU6k,500 +torch/include/ATen/core/ATen_fwd.h,sha256=yPzzTcmZAkRJGr9raXER0AURpGXjBMy8znRvjlYu3VQ,1278 +torch/include/ATen/core/ATen_pch.h,sha256=tUio9zBcJZuzDOC75Yr4I00xTE_x94-bNSMYSc2FGZI,5332 +torch/include/ATen/core/Array.h,sha256=kVpLnzc2-eUkkMLK4KglsvpF7a7dwDFi9VFh6YKMEWU,1388 +torch/include/ATen/core/Backtrace.h,sha256=y1M82xbaY2gwML--qDHL1JbuyseD6P5UX1w3kqkcf8Q,313 +torch/include/ATen/core/CachingHostAllocator.h,sha256=Qj_y0F6L6cCn5eAXvsp-OhbRIrXqbm60nXGCyYs7vgk,29839 +torch/include/ATen/core/CheckMemoryFormat.h,sha256=V9IvV2yN0x7ogLqw33ygmriPS-u7V91cGN9AhjqIVI8,1044 +torch/include/ATen/core/DeprecatedTypeProperties.h,sha256=dhzNJbU70lKzF-bktvSMcGVBI0JjNXhQmP6RfcVQkTw,4133 +torch/include/ATen/core/DeprecatedTypePropertiesRegistry.h,sha256=CAh7FOjK___7yRlcthPcfZJ-3PvF4LsmXsRv-YVXskw,1098 +torch/include/ATen/core/Dict.h,sha256=ep-GA0dVgLgqBeyc6bMKZpUiBV-t6gLiTdAdK5SZ6NE,13530 +torch/include/ATen/core/Dict_inl.h,sha256=FzQ-5rlxuxfEjID0s3trK3NAi2217-yUnBCHYnLRfrE,7716 +torch/include/ATen/core/DimVector.h,sha256=LVBWqI_2nHqX39SBwtuFY9hTYs1l1FZNq2UV0VMHx5k,532 +torch/include/ATen/core/Dimname.h,sha256=T_w3U9xt8ZwhDg2zhus7svNQdKzSthsJF82uVQdFmhU,1421 +torch/include/ATen/core/DistributionsHelper.h,sha256=6ZUuaCGQEz7q2eHbq_tvY_Xw32Mal178XZGfKv8zQXU,12857 +torch/include/ATen/core/Formatting.h,sha256=yBqgBa7fjx1aLMk8vyKnDZd3F7fLFy2BUN3bwX6xh1I,947 +torch/include/ATen/core/Generator.h,sha256=wD7l-ASTdD4PZvvGcS7-31zpj3bAyO_C_Lj98s13kUg,6618 +torch/include/ATen/core/GeneratorForPrivateuseone.h,sha256=xRETR5JniORd3NzvcUNJnQygihErGRFB0417-wcOplw,1335 +torch/include/ATen/core/IListRef.h,sha256=bzt0QXkaVtN3tdLbfWF7-Cb0dAyl4XdlckN7U_AeXkQ,21284 +torch/include/ATen/core/IListRef_inl.h,sha256=yKTQ1K-WqJ6sXJ346fLeWY3KFyNtH2pUzvDW3mULyaQ,6460 +torch/include/ATen/core/LegacyTypeDispatch.h,sha256=KI_IJGWgHAAbcBcRQl9jvTleBMbkXSgPWaY9EReKEJI,5111 +torch/include/ATen/core/List.h,sha256=mdmo9faTv3jym9eSvvx95U-VGml4idh2VAXeVXaiA9w,16332 +torch/include/ATen/core/List_inl.h,sha256=O9HZbTr7CKntmYoMMxU77lkilYzg6hxl5h6zyxYeK7g,11006 +torch/include/ATen/core/MT19937RNGEngine.h,sha256=jfMpQi0pyWXxNWtRHKom8PcvdNuXsZh1Cee6-pT1dGc,6764 +torch/include/ATen/core/NamedTensor.h,sha256=drMtfa-rZFsy8xZ4rGJgQi3ivpVvclPyyV3xadVO324,5530 +torch/include/ATen/core/NestedIntSymNodeImpl.h,sha256=GE_nsax-X8ELeyu2ZYBA5gCOVEotOuRK9Z6RtPB3UPk,6214 +torch/include/ATen/core/PhiloxRNGEngine.h,sha256=YBxZwCRgyY1ci3yinbmwoFoQDFT88UmfSXYkomus-7I,7984 +torch/include/ATen/core/PythonFallbackKernel.h,sha256=H3uBekJXfQC--9X4ydMjPggK2DuWUEhpBErCOjewedw,1348 +torch/include/ATen/core/PythonOpRegistrationTrampoline.h,sha256=M4T2s3fROpzCOXJnft8tHdRGkp6g16-kC53DqNLopJw,860 +torch/include/ATen/core/QuantizerBase.h,sha256=wQAV8ECaiwW9UdEkOAKv-z_XpZGI5fpS1JdW686c_IA,2941 +torch/include/ATen/core/Range.h,sha256=zzBaUyO3CcuLvUga7QKP4H_gWeJ8wE7Ew2c1B3OedJw,672 +torch/include/ATen/core/Reduction.h,sha256=QAvMKcHeef39irdGfa4jxAmljpQe05HOxRSh3Lt4JSk,653 +torch/include/ATen/core/Scalar.h,sha256=NcGp-BNXkybOBVLuWjEFHe8G3UnAY4y2JV5BeAUaCzQ,283 +torch/include/ATen/core/ScalarType.h,sha256=MSQSYWx0IuOIFuzEBBKyPeVjYlR0xMDm72dGgs7VFqI,287 +torch/include/ATen/core/Tensor.h,sha256=YVN7gz5Ty4KrToW4GOivewFC_ISHApmYayNXwD-x_fA,2657 +torch/include/ATen/core/TensorAccessor.h,sha256=1YyEt1lMIJy4ttt48lBm3RhHOSRL27C9CSKZGA5fSwQ,2816 +torch/include/ATen/core/TensorBase.h,sha256=BXw2iIslw9Lw6z3ArNrOw1NqoiHz5alNTBc9feOV9Mc,40088 +torch/include/ATen/core/TensorBody.h,sha256=bzfmHxcUgDd1_yhSNsO6px9bMbm0c5iEV2DARhuLypY,294534 +torch/include/ATen/core/TorchDispatchUtils.h,sha256=iQ3i4dTXgFFX7uEXkFnhJlN_Kmx2xvOkfEzZKZdZxMk,738 +torch/include/ATen/core/TransformationHelper.h,sha256=jv-KmUraeyjA8O2MZWTSMhYN54shG6SeSRRbxYYlkmA,7085 +torch/include/ATen/core/UndefinedTensorImpl.h,sha256=SRf1XtiwBIMCQhRqppRAfKU3prcLBdFyUrqnJnNKkFc,296 +torch/include/ATen/core/UnsafeFromTH.h,sha256=XnaiDLsTu8NRwGHbONwvtqcDupaTxr62L5F_2NqclUU,962 +torch/include/ATen/core/VariableHooksInterface.h,sha256=7B7OleaLaYjYDQblChSk02xpr8sc6E7j61_PsQ1atjg,3973 +torch/include/ATen/core/Variadic.h,sha256=SrRuKG67BcShAjwck5fso_vUVSrSoQJQaxBpNniHIEE,2635 +torch/include/ATen/core/Vitals.h,sha256=Tn6AMLZ52daM-g4VxTFlhy8IIAC9kGSQWFZfoA2otx4,2687 +torch/include/ATen/core/alias_info.h,sha256=L1ASjM52he4SEZWb-cHB1Of-wnnF2PDb1SiR40iL2g4,4836 +torch/include/ATen/core/aten_interned_strings.h,sha256=zV9S3RtcGZ1RlyiGn66ukAL74YaIoCh_J740uQXZs8I,57019 +torch/include/ATen/core/blob.h,sha256=HzPJuyyhpAzgjQZNYNS_pYVZqes10TmvWp6sBe68z5c,5498 +torch/include/ATen/core/boxing/BoxedKernel.h,sha256=bXjLkqAiI_J4U61C5Vqq1hnhW1TcO7gaEzwdD0MJpCs,8555 +torch/include/ATen/core/boxing/BoxedKernel_impl.h,sha256=vtenHg6JkQ2_6WEjDM9K3fOly6MWdbiRbV9aKdx04ZA,3530 +torch/include/ATen/core/boxing/KernelFunction.h,sha256=YljsN0rP9AM0cRWkgciZ4B-MChv1VCfCPriKTFv3rC4,10544 +torch/include/ATen/core/boxing/KernelFunction_impl.h,sha256=Am-Ge3FDDLZGN_0ugGOkFKtk3suFXn9DFeV7nDjlS7I,14087 +torch/include/ATen/core/boxing/OperatorKernel.h,sha256=QHTWNctJNO9c1k45cElj6L_vWzgwR-_UeK62y1Emip0,945 +torch/include/ATen/core/boxing/impl/WrapFunctionIntoFunctor.h,sha256=qwWa2ySrY88KlQoDVMu9TBcHcz-hbbEZzqd_oqR70hk,1582 +torch/include/ATen/core/boxing/impl/WrapFunctionIntoRuntimeFunctor.h,sha256=jlmCXnBvefaVbKn_VVpku6ICZMeP0mW6O2CXbJmcxiE,1686 +torch/include/ATen/core/boxing/impl/boxing.h,sha256=pzo7YY_riut-_W1DyzJ6xcF_M4ECGajhsbVEjhfcfIQ,13841 +torch/include/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h,sha256=QLGTTvqHNAw9v1xho4J0-hQ20cJKJFxsybar0nh1yWI,32004 +torch/include/ATen/core/boxing/impl/test_helpers.h,sha256=nz9XM9HqNklaxmKZqqvhdhKlteXJ0suYExAhwA8zyfk,4655 +torch/include/ATen/core/builtin_function.h,sha256=hcvw2w83YPTxT7bfKkVdfdOKfpLVb6CEoFNdJgFjxWI,2331 +torch/include/ATen/core/class_type.h,sha256=WX2rG5KT-B-UHuw-YiJsOWitQQZSHs9-q4odcIqb8XY,14351 +torch/include/ATen/core/custom_class.h,sha256=g593lYHGtGMEi7wUutuC2qAom6hX0TmbyXJm05PxLsc,998 +torch/include/ATen/core/dispatch/CppSignature.h,sha256=GHUTygJ3aRssV9XcRTt28XyBKq_zaZ5aXLLsOWkKJ2g,2636 +torch/include/ATen/core/dispatch/DispatchKeyExtractor.h,sha256=ZJiK1NFO03FQZVWhT7cE_4-LHGCqSuXb8Mc-FY2lkL4,11211 +torch/include/ATen/core/dispatch/Dispatcher.h,sha256=pO4kCX8NIyHzWiVKuwbwEiPq7LqXSC7y8maG6P_v-mc,35046 +torch/include/ATen/core/dispatch/ObservedOperators.h,sha256=eKNoomteAbCsaQ7Qofff0buj44X4yGyrAOlAd794UFU,583 +torch/include/ATen/core/dispatch/OperatorEntry.h,sha256=B6FWoiRbFz6KE5g4Ky4mPdZvVgL2j4FKEJVx_YQy-pU,13434 +torch/include/ATen/core/dispatch/OperatorOptions.h,sha256=Ibh7cTueyJ3FNcDS86MMprRq3uNlZO19f2yURfIu-gc,1140 +torch/include/ATen/core/dispatch/RegistrationHandleRAII.h,sha256=5sWLlO1mx9tV__IwcZcUqftnxvjJ2_CA8pmG-r6WTkk,1131 +torch/include/ATen/core/dynamic_type.h,sha256=6a7Tkj4OVKepnB8ixw5e1Pl-MZ6BZZGPPlRaFtHhZ0o,11155 +torch/include/ATen/core/enum_tag.h,sha256=8gnbGKw0MpxgVr9pySZ0RBEcwKmuMDu4phH6DgjnaS4,878 +torch/include/ATen/core/enum_type.h,sha256=2si4vrOCltW7rJjlxYiuODIBy5CYgXBved82o05vhLk,3183 +torch/include/ATen/core/function.h,sha256=MF6WVKSjPmoBUVLtZbQWYfHAyxNTxo_j6iboqbzcqQE,3764 +torch/include/ATen/core/function_schema.h,sha256=6dJ9IyguRRV9NN0-TTflGizmvnKu8eby90c7V9v8UQU,24368 +torch/include/ATen/core/function_schema_inl.h,sha256=pgUnnBp9VgVUFWUtZKlFg3eLFV1mz34d5E1WyKibNIQ,2325 +torch/include/ATen/core/functional.h,sha256=2YeMi9lGkXDPJTQtr9AtxErPP72ioMMLf0v5jj0TqRQ,1718 +torch/include/ATen/core/grad_mode.h,sha256=v4cKv2y2EFgAqEH2yI_D1PdoPs5_neoLiddCCwrvqrM,464 +torch/include/ATen/core/interned_strings.h,sha256=VGkFPbSxxBJK2ernshcVx3vf9G-SC4V5x80dn1qOBxc,13662 +torch/include/ATen/core/interned_strings_class.h,sha256=rxTLcElTBOppL-iUUQitRcC-RebaQp3Ch0--85iS9Z8,976 +torch/include/ATen/core/ivalue.h,sha256=suZdJ9UILnO2BkWjWxADsufZmoQTbCHiR1l9IW9WhW8,53213 +torch/include/ATen/core/ivalue_inl.h,sha256=SoXeLgVDfhcQZcK5g4FcWSl8joQ9QZd7I_PImkcCdV8,88385 +torch/include/ATen/core/ivalue_to.h,sha256=OPCshnu8WClCKdXRzuNPhnwi9dtcH7HVB7NZQf2_cLo,1010 +torch/include/ATen/core/jit_type.h,sha256=9KE5Jgkyj1mhZmsN_rCNjtmTQ-884LtCIiUg147DccY,72405 +torch/include/ATen/core/jit_type_base.h,sha256=_ZbemJj0czwJ2Rzmo8aDnL9oceAmsp5q0QHMfYw4hiQ,19409 +torch/include/ATen/core/op_registration/adaption.h,sha256=kRQiFmEFwArdI_l_F7MpAg7AzdWGanMvunJZe4hcfqQ,3470 +torch/include/ATen/core/op_registration/infer_schema.h,sha256=5IaNPUJuTtzbv-Gl591VPWrDZuaRw_IkRcsltPIY3Aw,6992 +torch/include/ATen/core/op_registration/op_allowlist.h,sha256=BKCMs9ZStEtcOJ6dlRxJWnzM6DKyknZ0l-9rgjOdh-o,6559 +torch/include/ATen/core/op_registration/op_registration.h,sha256=-4NqKDvpmQiGuNZdFFRh60u9FhvVurjVacHvH-27Z6Y,28800 +torch/include/ATen/core/operator_name.h,sha256=tYDXXFlXn-iYO_HcxE1KbFAFIpBaHn2grS_7GDFjjJA,3306 +torch/include/ATen/core/qualified_name.h,sha256=wMsJ1QY3tiLOSe04oAx-vfELuZXraI5Lpy6UQUEnXJQ,4627 +torch/include/ATen/core/rref_interface.h,sha256=mhAcftY4AYad0H3q2vuRqqZBOKu_m0yqzC-z33yl3cQ,1462 +torch/include/ATen/core/stack.h,sha256=WVUVRJwhYl8mPcNwXVxd410k53ZA-mzlOy-hNQbLBuc,6436 +torch/include/ATen/core/symbol.h,sha256=3HsP6rlF5uQ8xISkUGuxLzNrAWhe5qDaKRN46HK2Akk,6127 +torch/include/ATen/core/type_factory.h,sha256=R9o5Y2pdvrg3gOP-2sv82vEqqDPiMMyp1B7smfLir3Q,3501 +torch/include/ATen/core/type_ptr.h,sha256=Mby1oP4rzL07obzNnL0DD5reEEnPfBsJJI3hto8NlzQ,1483 +torch/include/ATen/core/typeid.h,sha256=eMggcfZfdVXFBl32XD_y3SL-xntu8-3vsW2gaorUV0Q,283 +torch/include/ATen/cpp_custom_type_hack.h,sha256=uRYZgQGKQRkEh6F9SnGGWDNyBU-oxzlP2vo5wQEU4io,5684 +torch/include/ATen/cpu/FlushDenormal.h,sha256=9gYBrIZWnFSzBKy4SpTo7QPFzSHi5WSkGNrBbzLjMjM,791 +torch/include/ATen/cpu/Utils.h,sha256=YFj2uQ6-vbjFEFveq5TX8X4jB4IjSnJuF-pO99sczOY,1057 +torch/include/ATen/cpu/vec/functional.h,sha256=AWcimK14Ju73ML7A0rEXLtY4C9kH2qDeN0jLCdVpklg,356 +torch/include/ATen/cpu/vec/functional_base.h,sha256=9gFj127ey1vDhxtGr1L2FIvpyxLS03i96GzO9rUohTo,15733 +torch/include/ATen/cpu/vec/functional_bfloat16.h,sha256=bUDJvUshdQsBQL3q-TzY9FXE8EZrRQHJHmIYtCB0fvk,25665 +torch/include/ATen/cpu/vec/intrinsics.h,sha256=etCWzMEatbbky2AF29OWWN1owMc00LGkw50bh3CEBOQ,303 +torch/include/ATen/cpu/vec/sve/sve_helper.h,sha256=QMPRlDOypUOkH4B4l8POCfv1t4n0U-7YVZnEivccLwM,3423 +torch/include/ATen/cpu/vec/sve/vec_bfloat16.h,sha256=l0Y28seofXz8oo9cCLB6ynXwfy3F4ve93kEzsJRU2t0,20824 +torch/include/ATen/cpu/vec/sve/vec_common_sve.h,sha256=Re6kyLLDZ94ZX0-DVbcLhpPciCaEnnlwP_m5peLX-PU,8678 +torch/include/ATen/cpu/vec/sve/vec_double.h,sha256=PrUCco-k2hxwG614yUSFHZRKTgcA6suMeqpXIcz6aOU,19870 +torch/include/ATen/cpu/vec/sve/vec_float.h,sha256=_9hTft4l6wB4OHEkElSafCkQTF7hjrRkmG5MWoX4DT0,25713 +torch/include/ATen/cpu/vec/sve/vec_int.h,sha256=6xRqtc3yDcM5bHnyRBUGaKhE4FU1PxwVYW0W0xNiPWQ,28224 +torch/include/ATen/cpu/vec/sve/vec_qint.h,sha256=DETPQ9SS9xRQxrSUXZWdzz-XH5tjHMOcSiExB8ZAKRA,20297 +torch/include/ATen/cpu/vec/vec.h,sha256=GagNXvVOqjRWeA6kvDUFj8C7U4mEpGvD0GTsPGzaGeo,1603 +torch/include/ATen/cpu/vec/vec128/vec128.h,sha256=TEh2Oo9tpsUC9XH2ECUeHXWp3-skmtEPvoFiCuSGinQ,776 +torch/include/ATen/cpu/vec/vec128/vec128_bfloat16_neon.h,sha256=N--NSD9XRqRBt_cI81hqxznxLIhe-kdx90kBQR6WzSs,25989 +torch/include/ATen/cpu/vec/vec128/vec128_convert.h,sha256=jOLFwVl4yw_QNBFMkhMc5aSceBw7jYnXmRgQ-QWe_Ew,12870 +torch/include/ATen/cpu/vec/vec128/vec128_double_neon.h,sha256=r2P38smjaLS34VjWjFsTHGBy66coLysj6RBnFOIyRdg,18245 +torch/include/ATen/cpu/vec/vec128/vec128_float_neon.h,sha256=ntTUjUqE5gG5A2Cdx5_c3fBIfjozh-DimEiDJi4gcew,21396 +torch/include/ATen/cpu/vec/vec128/vec128_half_neon.h,sha256=hRsr4yxvVIPRjYS6FdJFXagrBS8dw6mCBBwGzEF-UQ4,20633 +torch/include/ATen/cpu/vec/vec128/vec128_int_aarch64.h,sha256=TDUVGA-OI12ERVDI7n5lCYTt8mChYbPLTqANk32Wmnw,32389 +torch/include/ATen/cpu/vec/vec128/vec128_reduced_precision_common_neon.h,sha256=VTyCdjQtf17cd5yUhOZSd44oTL32EtajY8mq3zBZIx8,10176 +torch/include/ATen/cpu/vec/vec128/vec128_uint_aarch64.h,sha256=51VwJSzDxBGbsMnEy9mRvADkMYEweNK7dwEoalfndhs,21095 +torch/include/ATen/cpu/vec/vec256/vec256.h,sha256=2LpUHPcDBYMV-cjB8qd7y0mkVTzsJAVsv-h1EljZgZ0,12974 +torch/include/ATen/cpu/vec/vec256/vec256_16bit_float.h,sha256=qi_RnATEaWQGHOqDldKSYTgn53Vyxuj5XRBdXNK8PmM,28702 +torch/include/ATen/cpu/vec/vec256/vec256_bfloat16.h,sha256=ozcJO1Jp3RNJ8Vo97IxhE_GvnhFxSmabYnMTmmf3IkI,9061 +torch/include/ATen/cpu/vec/vec256/vec256_complex_double.h,sha256=lceQ0Eo7PHIHq5VP4Pi6XHr6Uv5oxJ2iegF54Pez7sE,19830 +torch/include/ATen/cpu/vec/vec256/vec256_complex_float.h,sha256=J8nG_j0sWMUEX_xsXooWVobFfoVVVvvsLUOtwkEilNM,21867 +torch/include/ATen/cpu/vec/vec256/vec256_convert.h,sha256=sKvyirrkm4QhenxzQZYEatuzIOp1RIomJ4h8VSwo0ho,11287 +torch/include/ATen/cpu/vec/vec256/vec256_double.h,sha256=ocwFIIOxGpuPej65VNSY4fCfc0XYu-66VmPCWU5f5Zw,15832 +torch/include/ATen/cpu/vec/vec256/vec256_float.h,sha256=Ys1pFXJnAbe2LeoAwWQG6xeSwUDBl64aEuTTW5xtgd0,27555 +torch/include/ATen/cpu/vec/vec256/vec256_half.h,sha256=MKSjE6wiMvHRxr_Ci_prSCJ2eeonRFPS5IK8WNUs7Jg,8643 +torch/include/ATen/cpu/vec/vec256/vec256_int.h,sha256=fUGI0xrSGpC59pUgZh_0OMyiztXGYemk0yFDb4ao8uI,65745 +torch/include/ATen/cpu/vec/vec256/vec256_mask.h,sha256=W4mmnWT4Eh7nI6t1JziXE3-3SP9XKEpAg5CbBlUN3B8,9026 +torch/include/ATen/cpu/vec/vec256/vec256_qint.h,sha256=YbQfyq3C3FILyOdb58AmYHNgc5LubzKb9KuEiLbRaeg,49113 +torch/include/ATen/cpu/vec/vec256/vsx/vec256_bfloat16_vsx.h,sha256=PvlK-Gb3-0MFQylPhaG-6ho72E0wN_-1gzOwbT6Xu1s,2391 +torch/include/ATen/cpu/vec/vec256/vsx/vec256_common_vsx.h,sha256=H-2vPZiGmNo-0PJmRrqOpMU4_oCzthYuwAgCGwxJThk,8395 +torch/include/ATen/cpu/vec/vec256/vsx/vec256_complex_double_vsx.h,sha256=4-QuTuE6f7edBTD16E_GWAQaLaVHwq5J7Jqf8oH7I-E,21936 +torch/include/ATen/cpu/vec/vec256/vsx/vec256_complex_float_vsx.h,sha256=a7NIslKk8zsXM8MFr5D8CdqjtWFSXdCec03-HjNTKf0,24625 +torch/include/ATen/cpu/vec/vec256/vsx/vec256_double_vsx.h,sha256=zoZrV8is_U-4pghjBqfAsa07gtjZvG7Z_EETZrXFAvg,16539 +torch/include/ATen/cpu/vec/vec256/vsx/vec256_float_vsx.h,sha256=M9xzffcMLDeGTFEWBLJikAXIjzZPO72gZtuh0T3TdEA,17089 +torch/include/ATen/cpu/vec/vec256/vsx/vec256_int16_vsx.h,sha256=1jy4dhqJwivpN21EvwOCnVdUnz_X_eCXB-dwj20PS1Y,13874 +torch/include/ATen/cpu/vec/vec256/vsx/vec256_int32_vsx.h,sha256=k3kEBDt6jcCRFPR9yBmSJuSaikUJj6_QMiFI0EllZo0,11689 +torch/include/ATen/cpu/vec/vec256/vsx/vec256_int64_vsx.h,sha256=YDixVuNdXttFOUxJGqG2RbRar_BlKhcr0MKx30DH7Fg,9958 +torch/include/ATen/cpu/vec/vec256/vsx/vec256_mask_vsx.h,sha256=CQJIsE6joHaFwbtDr3ePX85j4NSj8U_SIGOmEFHZ4X0,1980 +torch/include/ATen/cpu/vec/vec256/vsx/vec256_qint32_vsx.h,sha256=WDOkNhlzeahJ-jOpPgILGUeyo1h8K-wCflugVGJiV8w,10319 +torch/include/ATen/cpu/vec/vec256/vsx/vec256_qint8_vsx.h,sha256=8aqlZqkHgBMOjTgaheDZfsd9VZL-sjXYn0GsFmMqD-c,17672 +torch/include/ATen/cpu/vec/vec256/vsx/vec256_quint8_vsx.h,sha256=-13l08O0IoVfrjUeL_pyDScyCWiM6a_TiyaaHFLBglI,18369 +torch/include/ATen/cpu/vec/vec256/vsx/vsx_helpers.h,sha256=uoMPqd68K1_R4jlS6vPKq245iVj-Kw_BkfQBlqdeVDs,22756 +torch/include/ATen/cpu/vec/vec256/zarch/vec256_zarch.h,sha256=41RaDQLMscyGLfoVEdNLjvk2hXcaGEP556QpStSieU8,102279 +torch/include/ATen/cpu/vec/vec512/vec512.h,sha256=6aEoKS1gqdUSyrHAdIm6VqRuUJgtvfpfHnFAxkI9N6M,11390 +torch/include/ATen/cpu/vec/vec512/vec512_bfloat16.h,sha256=RsSO9F7SP913aHUJunUvLkmDBFtF8MBlCF0bK_p9S9k,66745 +torch/include/ATen/cpu/vec/vec512/vec512_complex_double.h,sha256=DJW_DgozjXVDRkUWLV56NAn6CFIvWwtyU1HnYnfC2x4,24307 +torch/include/ATen/cpu/vec/vec512/vec512_complex_float.h,sha256=MzE3jbTqotDvaIQLAcTa2FqfO39BzhglEPZn7uaz6Pg,44800 +torch/include/ATen/cpu/vec/vec512/vec512_convert.h,sha256=La05FY5IwpLGs4pRqt84-Va_cjevk27B_xz6BVCxu3U,10210 +torch/include/ATen/cpu/vec/vec512/vec512_double.h,sha256=Lyka1WQbrdC94P6zivLmDnpdnKRAPeSwK0e-MLccnPk,17362 +torch/include/ATen/cpu/vec/vec512/vec512_float.h,sha256=AVDn7rsHpSNfGc5cdZNorDw7-T9l_0WWMqMLz5nViWw,30372 +torch/include/ATen/cpu/vec/vec512/vec512_float8.h,sha256=4pOqniQhU79-d3GNnIoLVf9CZDzkSVwMIyIkJZq6-cg,23942 +torch/include/ATen/cpu/vec/vec512/vec512_int.h,sha256=yDzLgRxx9Ej3m-Ovt_R8tU4bELhVPEFNFIfl5XEehn8,59208 +torch/include/ATen/cpu/vec/vec512/vec512_mask.h,sha256=KC5eBIuuC14cSChSVe41Z6FtFqqRn8OVCeG0nMY-9y0,12552 +torch/include/ATen/cpu/vec/vec512/vec512_qint.h,sha256=Qi3McIiEsYS2FfxxW-0rgOveWBYlOwKNC7m0c4y18u4,51704 +torch/include/ATen/cpu/vec/vec_base.h,sha256=Kj1vv3Wt-jCNwHkvozh7_IoLzu6P9USJ_my8uZ3JQRw,49468 +torch/include/ATen/cpu/vec/vec_convert.h,sha256=AGygrg700-TGPn5YUCNodk4q0OkjncC4Txu1cC3cN90,2543 +torch/include/ATen/cpu/vec/vec_half.h,sha256=PW1nLS9MdKp_smD5_xNW7hcy0gTc9nHIwG9TrtWGT88,3748 +torch/include/ATen/cpu/vec/vec_mask.h,sha256=Tyn3J6n-w2V7KTZd9R18j_2dEl8b9f3HaHcjqAdvLBs,10584 +torch/include/ATen/cpu/vec/vec_n.h,sha256=65PbUFbRex448sk8dXUH2MvQ6SZDIZClzjLEH_FPJ0k,13810 +torch/include/ATen/cpu/vec/vec_quant.h,sha256=b4rBHPDN4KwkTkoM0LtoiiLDhtdF8dvY9B19YwXu6uk,8891 +torch/include/ATen/cpu/vml.h,sha256=_biUSzcgtpOx-atj0MS8QOCFlQxHZDU2hrg7GQWgT0w,6327 +torch/include/ATen/cuda/ATenCUDAGeneral.h,sha256=Y3g0kFj0PlB9p2jUAA4XS22IQ3_R6tSGs6FEiTUBbRk,444 +torch/include/ATen/cuda/ApplyGridUtils.cuh,sha256=Y-V0zrTY1oL4SOLJzAHxz7wDiZ1hT_6H3mdi53c21Ss,1563 +torch/include/ATen/cuda/AsmUtils.cuh,sha256=hmNSZxEXEFJmvOHvSwJ9sekEhb73IB2gLhIAZjqxq20,3648 +torch/include/ATen/cuda/Atomic.cuh,sha256=xWwJ-77pH4vpxboBx0qWW85rI3KX0n-dtKNmEQYQEY0,27525 +torch/include/ATen/cuda/CUDAApplyUtils.cuh,sha256=D2hitirC9Zy4zll1cmE-1HjHM69f5LK5KZgIBU0pd-w,20700 +torch/include/ATen/cuda/CUDABlas.h,sha256=T-hxIvXGWAYg7Jx5d47Xbhc66MNqsUEpxD8MXrqMWrU,15513 +torch/include/ATen/cuda/CUDAConfig.h,sha256=gQOFRpFVFRDyDZAcC684-eS17fyGwOApqdE0N1_bPFc,1179 +torch/include/ATen/cuda/CUDAContext.h,sha256=FVxhveWjVQ87qecv__fmXrFj1HVowBTGI_uBUUhEQ9A,492 +torch/include/ATen/cuda/CUDAContextLight.h,sha256=G0B0ijgt7tAmxzHpo8WV5ZkuYA43rojjXWA9EYN_7W0,3466 +torch/include/ATen/cuda/CUDADataType.h,sha256=9LRtoarR6hBpMhKhYnd2oCgMX33oTgVG2Cno6gPAvag,3089 +torch/include/ATen/cuda/CUDADevice.h,sha256=ibOUWACsMvCwJkj8Vs-JaSAacLjfePU25ikYXuE0h6s,786 +torch/include/ATen/cuda/CUDAEvent.h,sha256=a85RgRSsZJTZax2wwrNGrv32xriw7zzW9Gh2QhXvKeg,11953 +torch/include/ATen/cuda/CUDAGeneratorImpl.h,sha256=8wJoGsLxgDoJ74Wpr697MwSsmFew2rpLYr28OHrylqE,6330 +torch/include/ATen/cuda/CUDAGraph.h,sha256=JLjQEaXVTpQ2om__fe3SwY6PzYrC_SCxK3bz6M4NYio,3694 +torch/include/ATen/cuda/CUDAGraphsUtils.cuh,sha256=PXQSJgSUWax-vwnalgy2iSUB3bN-1MIOXCp7f21UFj4,2155 +torch/include/ATen/cuda/CUDAGreenContext.h,sha256=abXm06yvlC37NwExmrWqPsXvkSVS3EDTLsq7ndKTrr4,1236 +torch/include/ATen/cuda/CUDAScaledBlas.h,sha256=3nqMv1oPd5N_jc0Bw91jWXHQ8NGsYC0KbgXo-JBCqnQ,5620 +torch/include/ATen/cuda/CUDASparse.h,sha256=m63Qnu-dAApQT2KtdzXf_piBnqN57ozR18Zb2m1JVaQ,1489 +torch/include/ATen/cuda/CUDASparseBlas.h,sha256=uSuuO4377ySGWjpN8Q_V9goTY2-YkecaR0ERIWdqwys,13029 +torch/include/ATen/cuda/CUDASparseDescriptors.h,sha256=NV9PJv9jn6Ki6FlAeOv8TBaSI6IhKEeIEQYYrB8UdcQ,8023 +torch/include/ATen/cuda/CUDATensorMethods.cuh,sha256=0XUAaYRzKUbJnw8-QsCk9huRWC_eBNqPI5rgw8m2Ecw,524 +torch/include/ATen/cuda/CUDAUtils.h,sha256=aqOrT9ciEgvqxTs6AIJ1g8AUYpuEkYDGbRDFrJHk3CY,670 +torch/include/ATen/cuda/CachingHostAllocator.h,sha256=Cubx1tn7320HVu04x0uI7uJP-UkxVma6N9Q8--xnqSM,3284 +torch/include/ATen/cuda/DeviceUtils.cuh,sha256=AeTpY9SftNyzRoB9_k1pfZdWna26kM66ut-f6K7Dn1c,3534 +torch/include/ATen/cuda/EmptyTensor.h,sha256=ic1E7hVwYA_iNMXuG8cFUN0j213xDHgv1wN9gsaXUFA,1460 +torch/include/ATen/cuda/Exceptions.h,sha256=gFwW4-ehCXlB0lLW6Xtv9XVTdEHG__alKBmWmJSdiIY,12842 +torch/include/ATen/cuda/MemPool.h,sha256=tR7MwhhTxU--0Ds1yUPzVKbSjgc2tg6PMXny_8AsQSA,1619 +torch/include/ATen/cuda/NumericLimits.cuh,sha256=2QmTbCmb3tOyk8s8Q69mLIjx8jpofnMiRVMLidwR3qI,5468 +torch/include/ATen/cuda/PeerToPeerAccess.h,sha256=_Em6zZCnGeoVbX3-KMvHSTxUdlMAZ5WtuRT6Jt8V77s,616 +torch/include/ATen/cuda/PhiloxCudaState.h,sha256=x1KYpK2i45uMEWt3uidetR8Vyp-0vsGkcpMQdqEE_2k,339 +torch/include/ATen/cuda/PhiloxUtils.cuh,sha256=42vYVkx5qDsakAMXakmFM3zEXgzxAooYG9j59NT_dJ8,349 +torch/include/ATen/cuda/PinnedMemoryAllocator.h,sha256=ZYJfIg5C4V3bISgVLBvk5Go_xeEcOuiu84XyZLyY2lI,477 +torch/include/ATen/cuda/ScanUtils.cuh,sha256=2z2Hqz5wfzxSwSpbzDfeuT9F4Zji2Ju3RtyCwNiggO8,2281 +torch/include/ATen/cuda/Sleep.h,sha256=e3wNkVyIhF2PH_qv2GwdqR3CR_xzniKsHuy2BfuM_bY,755 +torch/include/ATen/cuda/ThrustAllocator.h,sha256=vuoo-4-S71Xy4C5lfrVttB6UChIlYxlr3Wi6inoYuMo,759 +torch/include/ATen/cuda/cub-RadixSortPairs.cuh,sha256=7ZRAJC-Wvk63eaa7XLVl5qsiOMWWrdi909yoyvWWMdY,2459 +torch/include/ATen/cuda/cub.cuh,sha256=qsFth9fSFn6IGzXGnV-StiGALMH-a0arquRZDmWhLq8,21610 +torch/include/ATen/cuda/cub.h,sha256=D0lN7cr8YsLXyx83xbz7CYBCwmo1J0tcKV1dSTo_JyA,4016 +torch/include/ATen/cuda/cub_definitions.cuh,sha256=2Rg0L2a6O8__ZQc50KeC4F_5ww411XIRGusCtbRdMDE,1073 +torch/include/ATen/cuda/detail/BLASConstants.h,sha256=goHy09UIQi7XLieR3E3tfjcpzgpwxSkIhpjtDhMlUHc,460 +torch/include/ATen/cuda/detail/CUDAHooks.h,sha256=LXAp2WCAEP52zbhzbNGIPY29YjYf3i9X_T9l4sb_0fE,3143 +torch/include/ATen/cuda/detail/DeviceThreadHandles.h,sha256=Ls07N5gbS0vtCEQMX_L0eegkEDv-uFCiPBBxnqhpPxo,7269 +torch/include/ATen/cuda/detail/IndexUtils.cuh,sha256=xbtuHtr1-9TPZVQxNqxVEK9VuYjLwqEgpQRTamOd1xQ,1121 +torch/include/ATen/cuda/detail/IntegerDivider.cuh,sha256=qORRBvLTJxI54_r7S1_Yn7HftysizNWtKKSRysEHzVs,4273 +torch/include/ATen/cuda/detail/KernelUtils.h,sha256=I7_ldw6KRcc2hGcAv3Jqz1vARlHZbTMVfOdJMJla88w,1789 +torch/include/ATen/cuda/detail/LazyNVRTC.h,sha256=YvqkMO6N5dTfYQaSB2B5iv7kZaCV-dfeD4uPTu63NVg,474 +torch/include/ATen/cuda/detail/OffsetCalculator.cuh,sha256=Q8O-0N9eBPTnSDrmMQ7xvFdMvyKeB_Ig7vrigO3dux4,5112 +torch/include/ATen/cuda/detail/PhiloxCudaStateRaw.cuh,sha256=1bwPiGKT62D7Vs4llEQl4WTT75aWa3NfgNY7HBRyNvU,1612 +torch/include/ATen/cuda/detail/TensorInfo.cuh,sha256=KJwJRq_CHfJHX7RzpQQZshnm27T86F1k9Ry-QEOUz20,3494 +torch/include/ATen/cuda/detail/UnpackRaw.cuh,sha256=j5i7r21kCrg6SKQf_BBP_uDrii4xIup4IX4Z2pKLXno,1993 +torch/include/ATen/cuda/jiterator.h,sha256=gO2gKosxQYi4aLSupXH99e-TkBKSqifzCQNLdI1ltA8,1214 +torch/include/ATen/cuda/jiterator_impl.h,sha256=O9kiGZeeCGzohlucr92WunWpjzUZavj81oYc47IzOaY,7355 +torch/include/ATen/cuda/llvm_jit_strings.h,sha256=kJpasSteT1vKc5ujFRyDGa7whcIKnLwaOxyxtRKtkRw,682 +torch/include/ATen/cuda/tunable/GemmCommon.h,sha256=nq8PKcGU0aXUvnYkrqls03WQkmHaOkhzl2VmRdZ1y4E,22516 +torch/include/ATen/cuda/tunable/GemmHipblaslt.h,sha256=1qEbfwWdUta9-tMCg_BCIdc4peJiO964KOQ4x8Bm0IY,21287 +torch/include/ATen/cuda/tunable/GemmRocblas.h,sha256=_oyMmgdqH6HSfoLisS13F30uh5GAE-HIziKemA0irh4,10804 +torch/include/ATen/cuda/tunable/StreamTimer.h,sha256=g5V6mzx3oFvoFkYiRatDxEFGjrdSGoo2B0yJakz9IxM,1299 +torch/include/ATen/cuda/tunable/Tunable.h,sha256=-d44YjfJlyV-yFTI7uex4OI8J8bcpG4lnTyMdbuplPk,8589 +torch/include/ATen/cuda/tunable/TunableGemm.h,sha256=7PhUhYJzrVTkVHfeNSQ9p-6qSGPDmD2yIuKtFSVRlcs,9886 +torch/include/ATen/cuda/tunable/TunableOp.h,sha256=fnEoG-UTWKESas0PGVfgBFYGBbf9_rsBcRsc3SyTMUA,14925 +torch/include/ATen/cudnn/Descriptors.h,sha256=DmWD2pCzqLqxsfPCGmc4rDK6sCgmFkZPKaBcQDYEaVw,15335 +torch/include/ATen/cudnn/Handle.h,sha256=pGkiq0ZzcZLgbiGQ8ybHUvnVZmoPyLhjgsha4JNSkYY,447 +torch/include/ATen/cudnn/Handles.h,sha256=jmhakLkgV8AdF07lLAQbwsmcEeRRDi8fNcYhtYSI77g,298 +torch/include/ATen/cudnn/Types.h,sha256=HfZhdzuBc-DZ8L0ketUnMViu39Ct7jTkhhglPgzGQ2M,564 +torch/include/ATen/cudnn/Utils.h,sha256=y3Hdkk0UfdPIl8rj9NRpz-5jq11m8NJy8wK16GeHFn0,849 +torch/include/ATen/cudnn/cudnn-wrapper.h,sha256=QTBGaaa7_h2SB3HmG4U8LjN4AOx7393HWo70zI-TfGY,794 +torch/include/ATen/detail/AcceleratorHooksInterface.h,sha256=9bytpnF9OcNzUfqXbIjV66b9BQ_S25C0ByyOE6Eychc,3248 +torch/include/ATen/detail/CUDAHooksInterface.h,sha256=KPu-71kB-cwn5x_BXCNthVHUpUFTm_5xKE3R9O29gPs,8324 +torch/include/ATen/detail/FunctionTraits.h,sha256=l2zbT00idTMe7_B-9VuaO2g3mHg49dCdv0UVEPzas_U,3329 +torch/include/ATen/detail/HIPHooksInterface.h,sha256=r_g_MvwN_IUeRWn4LjHMJ_xjFEfH-088fmkSNYHSyoM,2258 +torch/include/ATen/detail/HPUHooksInterface.h,sha256=B5GS9btNsCRr17mytiHpK5sANHxZ61T9lFIUurboGps,1708 +torch/include/ATen/detail/IPUHooksInterface.h,sha256=7Z6JZQ202rhDoCQebYV8J6kdFj_81N8eCn_XpCdN_I8,1498 +torch/include/ATen/detail/MAIAHooksInterface.h,sha256=WRf1-O8_Qkw-yKRbwzXRx473kCTjxofmWMQALzH_RtI,1529 +torch/include/ATen/detail/MPSHooksInterface.h,sha256=jXs5PiR5OxrRMHGd2r_8KQjNvU-b4TfasAH_4zhv4xs,3994 +torch/include/ATen/detail/MTIAHooksInterface.h,sha256=r560Tw8K-7psCSGc04KBv_ycuV8V-SG4yVIJ_jXcCNA,5960 +torch/include/ATen/detail/PrivateUse1HooksInterface.h,sha256=OSy0j1RhVNngvxjGtO86N6lnMnQxQt4YnQwjdr5EOGU,2743 +torch/include/ATen/detail/XLAHooksInterface.h,sha256=F3bt_nEMb4BD4nYFNSoTtyGg83aFO_PAwc9wKgzangg,2685 +torch/include/ATen/detail/XPUHooksInterface.h,sha256=6RLn5P5DDWyHry3XL5KbMuKYKU7KBo0Qg1hlqWzp6dM,2716 +torch/include/ATen/div_rtn.h,sha256=4nvTpsu7JOVXbz2gkH7EqdYfREUw8zg3yjJLEo08IDc,465 +torch/include/ATen/dlpack.h,sha256=YtCs_UQXAPm5cO8taUvehijM1KNrC10xFZJ2g1D2jXM,23516 +torch/include/ATen/functorch/ADInterpreters.h,sha256=SimV299hZtyUMJekW7ytVKpvPW686YhuLctUjvG5Zro,1814 +torch/include/ATen/functorch/BatchRulesHelper.h,sha256=RE3eycUqrFQ2IOGni4IwcwI4Sjx3YxZdIP7bafj-kAg,18976 +torch/include/ATen/functorch/BatchedFallback.h,sha256=0ECOodFmirkxr_ztE34K_EToFxZ75h3pltUjnXawP1Q,3693 +torch/include/ATen/functorch/BatchedTensorImpl.h,sha256=G2e-GWothDMfdvbafrTKzTNoKE33oqxyioqi6va4G-0,6783 +torch/include/ATen/functorch/BatchingMetaprogramming.h,sha256=R8l4RZdmjefQfMPNMG1jvo3pB7RK0UVTw6AXR53ln00,5244 +torch/include/ATen/functorch/DynamicLayer.h,sha256=46n3oRlX-QxSTTBGkgAZGk2Lk02FepjTlH8XhZlUodQ,5816 +torch/include/ATen/functorch/FunctionalizeInterpreter.h,sha256=3jU-mTn8FDBqjyd1gUfW0dAE8ACSPFDx2dAbbgArX0c,1161 +torch/include/ATen/functorch/Interpreter.h,sha256=ZbnK_BFVKzrqmhtgj7-JR_TG-ZI5XH_BwIOFL1rphtw,14390 +torch/include/ATen/functorch/LegacyVmapTransforms.h,sha256=nHwpaVy-psnxBrDnAbcxedCc2iWjQ75QjUWVosg-ZWw,8505 +torch/include/ATen/functorch/Macros.h,sha256=hqjfrYvy4mqhY3MXdsNKQUXzb2y8LrkdWgColdke2bE,304 +torch/include/ATen/functorch/PlumbingHelper.h,sha256=qRDYK1BuwfrE1vr3QWGKEhSPeosHrq0lZqKOlirt_TQ,3108 +torch/include/ATen/functorch/TensorWrapper.h,sha256=kghomRRLftFFipY5vp6zZpCYAA6k1SyJOpHoXAYPYzY,4279 +torch/include/ATen/functorch/VmapInterpreter.h,sha256=egzDZVrqImPBju3_cVquUj4xKR6OSeNjKd5Gnt7dP6A,1211 +torch/include/ATen/hip/impl/HIPAllocatorMasqueradingAsCUDA.h,sha256=NCzHlI2_p3ip7eSO8uwtNTA21u4Ix7EBqOsgdf1S7zo,7521 +torch/include/ATen/hip/impl/HIPCachingAllocatorMasqueradingAsCUDA.h,sha256=Gb14zE7wa_-kgcBUmO-eWX4Mq1lk_Ik_TCplsyMrC1k,5769 +torch/include/ATen/hip/impl/HIPGuardImplMasqueradingAsCUDA.h,sha256=Ge78JhZmaO1RnAfflRW9nV8XzgUfMhJEXWlJYF_WhsU,15424 +torch/include/ATen/hip/impl/HIPStreamMasqueradingAsCUDA.h,sha256=VxQk873sqs-7UVyxmOHO6SQK_7Nr9PFhX0pMzSv-zrk,4768 +torch/include/ATen/jit_macros.h,sha256=M6xEVYL7q98hfLdEBiTuCjtgR-pkGmclxU8L09Qntik,484 +torch/include/ATen/jiterator_macros.h,sha256=g-vRy4Cy6UmhGVXErSsGIM_vcAtxu40vmcLA_6xPF2I,1760 +torch/include/ATen/metal/Context.h,sha256=3Sf57yULLhzLS_JYMrGeIaC99E4_0V9-G4VzeV6YjH8,936 +torch/include/ATen/miopen/Descriptors.h,sha256=va3W8f46dwzKkWh_eBWq67kAznncuISmLdLIHGNsP3o,8064 +torch/include/ATen/miopen/Exceptions.h,sha256=TR_v4esdfmchPEDQW0jIOIk2EcbF1URQaAtmHb9XWNA,1330 +torch/include/ATen/miopen/Handle.h,sha256=PS1MpPWMhbewMTh9E8ZmChcp7lz_Dkms6xMRTuoqNng,442 +torch/include/ATen/miopen/Types.h,sha256=_FLSgfeb6nV39a1W7iH7DmBkALf38EKMuV6uMjR0fqM,523 +torch/include/ATen/miopen/Utils.h,sha256=U17pahwfbSBWMSUnA2d--b1SeHbtRjrGTSGHHLuPUvU,655 +torch/include/ATen/miopen/miopen-wrapper.h,sha256=ahvUP9sBkQMbjNxMzROwgiMyQvf9RQF7J7lHrgAtKyA,782 +torch/include/ATen/mps/EmptyTensor.h,sha256=_fvSflyj38etC3e3sL1pWP2OsuDAEsY3AwaHlY1vd98,1009 +torch/include/ATen/mps/IndexKernels.h,sha256=34eAxG3mfF6MwY1sdF-4ZeNUZV6ap1SxVGEmoosEv8I,9730 +torch/include/ATen/mps/MPSAllocator.h,sha256=bRDTqT2ZqHcLDZBMt8QOCnr4mKZKBT6zdvgOpQCG3dY,18810 +torch/include/ATen/mps/MPSAllocatorInterface.h,sha256=bNlyLGmW3_RU2i0PL-92vAOD_5mqP_OPBW7i3sekZ3g,2972 +torch/include/ATen/mps/MPSDevice.h,sha256=cKX4FVatjSAa6D3QgPD9nmFCK3_ruar_xz3dnBmLINU,2130 +torch/include/ATen/mps/MPSEvent.h,sha256=dtNUJogYAMLEbWIm0Ek-pKHfA-N1xbzBwjbS3L7HRUo,3822 +torch/include/ATen/mps/MPSGeneratorImpl.h,sha256=Moeo7-MXtLeO1d3JsIOKcittj89_V1Xnk7q7Re5FHTo,1816 +torch/include/ATen/mps/MPSGuardImpl.h,sha256=rtB1Ypv3-haV7p3oM214bwKhjxegmEz4s_5krGahlko,5673 +torch/include/ATen/mps/MPSHooks.h,sha256=Ouma6-LIm1nYmd7vjtJFM-acP7Oh6P2OkWy5mrCad1A,2556 +torch/include/ATen/mps/MPSProfiler.h,sha256=FEz5ZCb97uL3Eer8IQtXSa-qXV4kItq71_ZAnr9JyxU,16844 +torch/include/ATen/mps/MPSStream.h,sha256=1bth85z3CuIpn43kH6I4LfI3b2gGpWnzSC-tefuQpz0,5094 +torch/include/ATen/native/Activation.h,sha256=5jUBzS9MrhXbg9i0cc0yWS_mG0CTYOd8FyELEqpSj9E,3769 +torch/include/ATen/native/AdaptivePooling.h,sha256=gbGBydyKyO833hfzVuf6O09uJrEPEAuNVLALm1GHfvg,2682 +torch/include/ATen/native/AmpKernels.h,sha256=NF0ckllzP6u0cuybr-a7mHBEF7iRAmdq8OtuMoomSiE,871 +torch/include/ATen/native/BatchLinearAlgebra.h,sha256=vc3DbmSXZkrkr9QfLaYUnNiENr_wLyJwzovyqaga8c0,10509 +torch/include/ATen/native/BinaryOps.h,sha256=Rivz4kOArz1ASwD7pVO23-XcoUt7BxwLC_N5Z20GI8s,6186 +torch/include/ATen/native/BucketizationUtils.h,sha256=DNCdyntNrq3f8qbdWbcjYJEERDuBIKUeWpIlKNryyjg,8036 +torch/include/ATen/native/CPUBlas.h,sha256=p_G4s7zWZpkCFwxzCRfO76DaGqGEidvqbV4Ib3Bph7E,9118 +torch/include/ATen/native/CPUFallback.h,sha256=db7ZH0Xvlxq2yFGBkdYqp-6uKZ2cKfT45H-7KklaGs0,2667 +torch/include/ATen/native/CanUse32BitIndexMath.h,sha256=8u7Fm_XJ5AqSN_h2G2jxyAlYtpxGDNR-Hdufhwu5p54,496 +torch/include/ATen/native/ComplexHelper.h,sha256=5rCutOqKCF6pAZStHRMhcuEqaZx4NvqWHQaipdQ_8eM,4302 +torch/include/ATen/native/CompositeRandomAccessor.h,sha256=-jQf0lb1feMo8S_HqBbpp2jY3y8ORmKNjNnT2syptUo,1130 +torch/include/ATen/native/CompositeRandomAccessorCommon.h,sha256=7edXzVXw7rpfekC5_PRaCIzexfRYEJxUm8WXUZBsmlE,6987 +torch/include/ATen/native/ConvUtils.h,sha256=sQNn32VI5R6lduB-_LOWwCZAozn7KvBJnHID4AzRv1k,20941 +torch/include/ATen/native/ConvolutionMM3d.h,sha256=G0D6p90oXpyeb2mhp_fovuRaIBWX37n6jN6q0Nxc8Ao,594 +torch/include/ATen/native/Copy.h,sha256=9mJ--HBtsJ4-gjBbG2uMgjHNN8_cOL3fEFkL-kSCQtQ,626 +torch/include/ATen/native/Cross.h,sha256=7yIZE8n6_-zcjM494HQmI2n7v7ncpJIbqx_-yzpc-gs,513 +torch/include/ATen/native/DilatedConvolutionUtils.h,sha256=GidEeuor8wOenGeOxSXQN4Tn6_DNOHjfCEmsHwoIzRY,6656 +torch/include/ATen/native/DispatchStub.h,sha256=Rc3j9fJKiazFNqBkoX8AcYklXWmYMhp6xTTHtvFN2yc,16273 +torch/include/ATen/native/Distance.h,sha256=z1vYpapV_W6PyHABYumrYd57ggsR1gK7vBPlf89PzTk,974 +torch/include/ATen/native/DistributionTemplates.h,sha256=eDSxPmwC-NrVQuM-A54b6xTzMh3wLCt5kECtllrO_6M,18746 +torch/include/ATen/native/Distributions.h,sha256=28PYnkpbXeFMW6roS1rRmjEGYcvcZp7dPzHCvbQPoBI,21867 +torch/include/ATen/native/EmbeddingBag.h,sha256=dlik8mXJIeXv57OzTxGs2DpWYg3CzfPs_xMRDFCp26Y,5482 +torch/include/ATen/native/Fill.h,sha256=4RBR3xh3iiYpk0SU93MXSVuh03u0PRpQNraXcU4T7UI,650 +torch/include/ATen/native/ForeachUtils.h,sha256=usi5kgz2xgOTbsKVkZHR31-Q_WEsvOq5-lq1MBxRAm8,14356 +torch/include/ATen/native/FractionalMaxPooling.h,sha256=NIrym6OL5oKgXOuG-jWS5Hd-37hKOypZUbXOloWqz3Y,2415 +torch/include/ATen/native/FunctionOfAMatrixUtils.h,sha256=TBbECD73rwVVPvMePLeIxZhTyQJYTvLs7p2om2EkmMQ,642 +torch/include/ATen/native/FusedAdagrad.h,sha256=xYmXlb-ICVMYCI8EVdfZ6CgoD9AbVJSn_Zaz4Gg8V2k,749 +torch/include/ATen/native/FusedAdam.h,sha256=9f7Q9Gv9DbsLRwsnhxK5Evy8_DoFMmU_MuPEQAK9OVQ,937 +torch/include/ATen/native/FusedSGD.h,sha256=m_wkHWws_x4aplWRxIS-8nWyflrUGrGpJVMSqHMFLDA,770 +torch/include/ATen/native/Gelu.h,sha256=_xxqp_o3ocmwVdwYiyJ_Zr_Ak8fTqfRQmGr80GkUlAs,1097 +torch/include/ATen/native/GridSampler.h,sha256=RAbPa6nbPgTD-8qO-e3Dol64-8WiiNYFyqOYxvQB_s0,10661 +torch/include/ATen/native/GridSamplerUtils.h,sha256=9uAjJvZ3lzV6hfBlcCgpocCjIyaYC0LRyHt7l--bMO4,3959 +torch/include/ATen/native/GroupedMMUtils.h,sha256=FAynODGhJmzXjTi9FeUgtUP0OkmkVXHf7zNkcsUpTTA,7206 +torch/include/ATen/native/Histogram.h,sha256=81LzK2uszgc5Hk35lUpf7Ocuibm6nmO7hSDZdOQZ-yk,999 +torch/include/ATen/native/IndexKernel.h,sha256=z0pBirBIRp3tNWAqtvFsYlTj0tuVQt-LQqLB3yBm09U,1957 +torch/include/ATen/native/IndexingUtils.h,sha256=TOqqlY_7_4kh5FVJvxsax0VD0jiWeEcq0-NAzzOp9kU,6546 +torch/include/ATen/native/Lerp.h,sha256=dM_FRmp1GtU8hHyJzcsPhYAxi9SldMaWMQnPzvNyaB0,1715 +torch/include/ATen/native/LinearAlgebra.h,sha256=UzXQ5Os6eK8E_TU2EAJpUOHjVEVpmEw6hPP4lCY5BuM,553 +torch/include/ATen/native/LinearAlgebraUtils.h,sha256=mEcriKCJAdTOniyhFQkntn1QzMqbVLoAyLvnNfZsIik,26610 +torch/include/ATen/native/LossMulti.h,sha256=xMdKuLRgoTuxVe4pLUsVN1K5Q2ZZJYA1bia7AjEv0m4,2368 +torch/include/ATen/native/Math.h,sha256=ba2hAZo6AF2r_nuSYe-9PM0ZMEWb0GJjmrQ3DfzE_ds,142307 +torch/include/ATen/native/MathBitFallThroughLists.h,sha256=LV6aBXlLS3r6JeU0EGHrzFQ5STahu2NUlS_vREsH0EE,4390 +torch/include/ATen/native/MathBitsFallback.h,sha256=qNxqOQoXjCyZ7FXrgAxb5HwhEigG_Gm13QQB7wLLSIo,7572 +torch/include/ATen/native/MaxPooling.h,sha256=9ArUuAHT2x-sECepMiaFZ2VvcQoTENfr6aGPCERXbpg,3522 +torch/include/ATen/native/NonEmptyUtils.h,sha256=OaBD1Vyz4PTpn3Us5BQ3MZ9A7xrFiRuxWs9e_kVBQGg,853 +torch/include/ATen/native/NonSymbolicBC.h,sha256=biHlvGKtt6Ui93Ju32MmURhSEc2npmkjX-7JGsxW6oI,3130 +torch/include/ATen/native/Normalization.h,sha256=AQ5IVOcofut6ZE2l9SedS-XVD9kxQK1qOzLud2HjNi0,807 +torch/include/ATen/native/Padding.h,sha256=KGtXh2yuMsGoD_cTGRnRkz-rRdcIwwxGJGSyLGDdKf4,2315 +torch/include/ATen/native/PixelShuffle.h,sha256=LtPpsV4uTDfmEDnDNL6vxDqV8gzFa8XtCQ5pYIf4g5o,2211 +torch/include/ATen/native/PointwiseOps.h,sha256=QcuNw-z_rvR3fz5fLw9U-w9Am-akjoCIefj5doVF9bA,1035 +torch/include/ATen/native/Pool.h,sha256=gTWkL_odUrvxSDhyoX7dblHMu4DYsDlTXS_84RiVL3Y,13508 +torch/include/ATen/native/Pow.h,sha256=HAOQzKdHYhaHKFgigE4SjB6svSZSNdldUkv1Z-5WGqk,1903 +torch/include/ATen/native/RNN.h,sha256=9DZwrm7U_KLV0y8nrdXQAs7PIlEtH763L8iG6wKlmuE,2758 +torch/include/ATen/native/RangeFactories.h,sha256=GT82Hg0DPHlPWboZA-e2myfK4wyGHaBXcPWU4Wu3HLY,608 +torch/include/ATen/native/RangeUtils.h,sha256=U5qvswfBKI4rYQUoD_sUPLAWN9FT1wWHoXDs1495iKI,2356 +torch/include/ATen/native/ReduceAllOps.h,sha256=StNDQgM49wEdfdroZvpTcll7h0hrIkqb76U0lnya_kA,651 +torch/include/ATen/native/ReduceOps.h,sha256=rh6yXA3EvhxyO9qX6PLg-K_2ZYhcnm0ZkQVF7in2g80,2062 +torch/include/ATen/native/ReduceOpsUtils.h,sha256=6BVLtVZ56urcbQbmSR9dkVuHImpbsxwYUYJ6PeTJq4E,16691 +torch/include/ATen/native/ReductionType.h,sha256=-84o3NlrAKdzIHf2vu5wgDikNy9-UvowgkMs9XnZINY,1393 +torch/include/ATen/native/Repeat.h,sha256=e-6_LlR3AydXMSaL57bvclfYNfMhE6BELxJQggDrtmY,1731 +torch/include/ATen/native/Resize.h,sha256=k3-AGBefdoecrUhhMqMZYrnPmb9IMau73wXRfx1cy_k,8419 +torch/include/ATen/native/ResizeCommon.h,sha256=DWUOSk4e5RUodW3aJ1_a9bqsg47N2QB3BC_TN4PHd4M,2745 +torch/include/ATen/native/ScatterGatherChecks.h,sha256=jh1aGzDCQQvyGmo1BqMbi2PDujCYWLkgqqSWE7emjQE,3990 +torch/include/ATen/native/SegmentReduce.h,sha256=KHETESlR7O3jxUcHvj5CD4MjAwzM8VMNM-Wv8RHfqDM,1519 +torch/include/ATen/native/SharedReduceOps.h,sha256=aBbpm6QkrhTcmksVsijrRn3QD8pBWkjl28rFWWhOKCI,16410 +torch/include/ATen/native/SobolEngineOpsUtils.h,sha256=pNNPAQN0x0Br2jQHikIWd2xht9D0yGU8DUg_n7pQ6IA,2089 +torch/include/ATen/native/Sorting.h,sha256=YthtMuMvduf7oy_qqfjL3hbxZH9nNbbg4c91v2BF4aU,870 +torch/include/ATen/native/SortingUtils.h,sha256=bV3C_qbVQTfKY84nXQGcCDL3xUrzprsaviBKx3vf8r4,2926 +torch/include/ATen/native/SparseTensorUtils.h,sha256=HQVciWWBvDldwO7g-RSKPldE3uOujADedTbqVuK45aI,6754 +torch/include/ATen/native/SpectralOpsUtils.h,sha256=i78AR7qegJD9FC_CerTuu3dXYOMK65No7cUxDqfMBSU,3536 +torch/include/ATen/native/StridedRandomAccessor.h,sha256=PZKVO993ozr5g9IsTE5FZlDwn4yjA3kXX5VAIAFU7zU,7089 +torch/include/ATen/native/TensorAdvancedIndexing.h,sha256=wUXDM_I6v7TYYKPzg-USJF6o4mA9WzILx1M7cFjLlG8,3151 +torch/include/ATen/native/TensorAdvancedIndexingUtils.h,sha256=_M2s8Pqk4UnyZ-Mi8Ol_ux3IRCflAR7RV72unG6Cbjo,3367 +torch/include/ATen/native/TensorCompare.h,sha256=xYZgiLO_WTB8nrPNBsDMsTsjR9akehbFLGZe8YTNGNw,1772 +torch/include/ATen/native/TensorConversions.h,sha256=0MeFKSwGxMwjeE7kPyHTMmVog1un0SCl5hv7akwlTJM,1092 +torch/include/ATen/native/TensorDimApply.h,sha256=xCVtk1TTObjwmO4cBByaHLS16i-phVragc01PCx5WwQ,2081 +torch/include/ATen/native/TensorFactories.h,sha256=iMrkaCXDAL_3PlPg3hd9tzJjpMQUtKVCL9IH_c9TQPg,5652 +torch/include/ATen/native/TensorIterator.h,sha256=EGjHBhlzhM9qtyOLFTPl9Cion2Tk55izMcG7hZMIaJk,300 +torch/include/ATen/native/TensorIteratorDynamicCasting.h,sha256=gfkNvB2B9s6IFHANJR0hLWUzORb24pCEVIJmbVoJhZY,2064 +torch/include/ATen/native/TensorProperties.h,sha256=BQlo_WTYnIIFSy6PQtwSmBOcdp4BTwhzvhRkAPn6JpA,452 +torch/include/ATen/native/TensorShape.h,sha256=94C3OMr9UObeXNtrNnn3OCqcI3AHdblYgPQcpSn3Kjw,4851 +torch/include/ATen/native/TensorTransformations.h,sha256=cOkKfad87XienVW5PnqiQNCkdyQq-bSoIxo4t9BY35Q,1181 +torch/include/ATen/native/TopKImpl.h,sha256=H_JLqHjMs4FlEbo0YJ1yRyJTQsaqYXQLUZF8jKeUB6s,3713 +torch/include/ATen/native/TransposeType.h,sha256=jkE2HIVVQe0WMoFLBTz4HTtlXJza7GyBmS190mAWFeM,918 +torch/include/ATen/native/TriangularOpsUtils.h,sha256=sGk-__VAdO7bFuSwPEnIEYnVPEzOiR8ynfOqljMF3Ws,2256 +torch/include/ATen/native/TypeProperties.h,sha256=MJATK6vHjuCCgS8N2wde2QxDYsG0YQM_VqN8nXeMVO4,912 +torch/include/ATen/native/UnaryOps.h,sha256=8Pu91eWMl8D5PSJRA7zVp8r2XbER_LMRpAKlJ68VbM4,5669 +torch/include/ATen/native/Unfold2d.h,sha256=r5hQGu1j7sNzIaZzrn0WybL9HOtXfnXM2lXTWXas81k,1233 +torch/include/ATen/native/Unfold3d.h,sha256=9H3NktUNEnXLlSDxJQ1MsFSp9E_Ea1Xq5QiJa-jqouU,1127 +torch/include/ATen/native/UnfoldBackward.h,sha256=53PYK7KVjOHfnnDd5s5idG9soaE5y4ql5qWYilyYjC8,3347 +torch/include/ATen/native/UpSample.h,sha256=6DKYXPFA2I-KQeNMlrJ_e3bwokwSFXlFOk8NefyFmQU,19450 +torch/include/ATen/native/ao_sparse/quantized/cpu/fbgemm_utils.h,sha256=bn3kx0zdKPRUTi1ATGIOnylaPwbH33_pFPyd3qShkHU,3234 +torch/include/ATen/native/ao_sparse/quantized/cpu/packed_params.h,sha256=wUv3YyCo_WkTQfM6o5r8VidmyAUisf_WixBEfELkvJQ,2995 +torch/include/ATen/native/ao_sparse/quantized/cpu/qnnpack_utils.h,sha256=1rAzuMEU4AdDuEvherVtCc4hK8bMoNysZNH_4-71b94,3496 +torch/include/ATen/native/batch_norm.h,sha256=DMbmfhic-MpRaWOjcvtgds0yUN9MnY6jr6hhZn3BTIE,1679 +torch/include/ATen/native/cpu/AtomicAddFloat.h,sha256=u2eTBDVfo1ZegYDR-3eZF-6wrTDy_5qTonS6M-alqao,1096 +torch/include/ATen/native/cpu/CatKernel.h,sha256=xgya3MDFZuSx6GvrxfEYCwzjlqhjPgwzkK9wdPvf51U,560 +torch/include/ATen/native/cpu/ChannelShuffleKernel.h,sha256=_HVvj3sFQKRmPnsn2KYuwYIrzWqOZkHU06wnXVWsd90,540 +torch/include/ATen/native/cpu/CopyKernel.h,sha256=5RtfJ5tLE8jp2azBmsxJV0xCsexHxAzmne3Uc9Ly2zw,566 +torch/include/ATen/native/cpu/DepthwiseConvKernel.h,sha256=ogyYOVvDHyWg6ACz0jTZesJs07A5pyUXdWW08UrCZ5c,724 +torch/include/ATen/native/cpu/DistributionTemplates.h,sha256=CIp3dO4J181DsmfjP5wRdSv5pCuI1iC-8ONYI2ytX_k,16704 +torch/include/ATen/native/cpu/Elu.h,sha256=7hsZrAQh4SmgD_4eEv8E1Mkv5PkW1IkyCEXflgByRzM,3120 +torch/include/ATen/native/cpu/Gelu.h,sha256=gLK-AVzZIUwC_hPb5mXyomsuxNkbLljS_gMf8mmbkok,3358 +torch/include/ATen/native/cpu/GridSamplerKernel.h,sha256=NcAOuHU33S2mQT1pxM-o9MZJcvMacy43GQieH4YDfCI,1077 +torch/include/ATen/native/cpu/IndexKernelUtils.h,sha256=XUCtKIuJ4g75rN_GZekuUlgyFRfqZBr5yzAFlS1Kfx0,3181 +torch/include/ATen/native/cpu/Intrinsics.h,sha256=Is00ayXygoN_okRnxej4mDi0UCHphme37N7fVKmicvs,1466 +torch/include/ATen/native/cpu/IsContiguous.h,sha256=g8a8_i1hFP8Gu34DA9IC1TuSNYL54KsNeEiB1BctEAI,2623 +torch/include/ATen/native/cpu/LogAddExp.h,sha256=z2avx_FN6ANXdonid9GMF6JpwdevZ6SzCRQlynkANl4,2700 +torch/include/ATen/native/cpu/LogSoftmaxKernelImpl.h,sha256=6yR5jf2tWdYR03lf3-B0E7qr4mm5AlX10rBKORGK_tY,13404 +torch/include/ATen/native/cpu/Loops.h,sha256=pvKrLm5xdUVPHEImmUF3zS6TTYRP6JsJ3ASeenenhy0,15167 +torch/include/ATen/native/cpu/MaxUnpoolKernel.h,sha256=gRdiFBOyWHNBjsDJclEudywwpCPhLOfMBYqKUaK6DK8,560 +torch/include/ATen/native/cpu/PixelShuffleKernel.h,sha256=gYm4HRFVMcBhRCObqeGH8mZWRfj0Yeha5YKZlyy5eoI,574 +torch/include/ATen/native/cpu/Reduce.h,sha256=9yhsH6l-lll7hyiWip9jnR0X8ZE8ZJJvjkhe1XDfhU8,12324 +torch/include/ATen/native/cpu/ReduceUtils.h,sha256=bT7DEvWx_0YHMvXhqVRN01YaQ8Lm9h4D7A8kKGdIjGI,8963 +torch/include/ATen/native/cpu/ReducedPrecisionFloatGemvFastPathKernel.h,sha256=vuSKm5PeIz56Ko3ctjEvg7Gm1Aqr0euypN-cqk_VYLc,1374 +torch/include/ATen/native/cpu/SampledAddmmKernel.h,sha256=hG9d1W8jvG-36slz4ApkeDEJrPu9n7o_5_9H9ba-X5s,576 +torch/include/ATen/native/cpu/SerialStackImpl.h,sha256=Sq8zzXe7u9c3o6sLY0VBHCNK92YORvU_GvbNt-NVKQA,5710 +torch/include/ATen/native/cpu/SoftmaxKernel.h,sha256=Ll2YpX52fims5NsYPrbT8ygfZp5wk7CwC9-7lGEYpTY,1189 +torch/include/ATen/native/cpu/SpmmReduceKernel.h,sha256=85iB6aCW_bH7v5iLwb_ofq6idbS-rkdktLx0lW5PNmg,1606 +torch/include/ATen/native/cpu/StackKernel.h,sha256=IaY88AYCdMcb0c3TWdpZVaGsTTqDOc4gDj3HDNFWr3E,562 +torch/include/ATen/native/cpu/UpSampleKernelAVXAntialias.h,sha256=SN2vmmtmP4qy3LIXI5CAI7hD2XHvnGoKlftSPxWWB0A,58392 +torch/include/ATen/native/cpu/WeightNormKernel.h,sha256=GzLqqFhn6W_bf0MRcBPOP8kl6qGCejNbdtWMytinYEc,804 +torch/include/ATen/native/cpu/avx_mathfun.h,sha256=5xPW_GSg4DSxPyz0s7nUgfy0qw6iqSUVTuEob-Um0Ho,17702 +torch/include/ATen/native/cpu/int_mm_kernel.h,sha256=VGOuXJXQ8zVU1GSBXkH-bFVrK-8TwjPuiBLxv9cocHA,1359 +torch/include/ATen/native/cpu/mixed_data_type.h,sha256=WAxkpUy7WJoR8cwYBENYWN_o5NicWAe6UaYq518p0AA,1662 +torch/include/ATen/native/cpu/moments_utils.h,sha256=AiVFmQj3IOdLTWgU5LYXNAQrPX2yL8jJ2YqIntESbf8,7162 +torch/include/ATen/native/cpu/utils.h,sha256=A0dq7dHUPvH9NwdZnFO5buqJbzpCMkVuG40rm8n8ZKM,7770 +torch/include/ATen/native/cpu/zmath.h,sha256=pXuvamS1M8HhO81LfeVy9zLi9-X4VniQadUpAHYCoMg,6876 +torch/include/ATen/native/cuda/Activation.h,sha256=os9YOpv6tVDWxq8FsjvMEf_ip-aj-g-6XZXK7XSWb7c,790 +torch/include/ATen/native/cuda/BinaryInternal.h,sha256=3c2TDjMEUA7aOoj_LHQM17CHB49TN7ajr13BPlLU6yU,1441 +torch/include/ATen/native/cuda/CUDAJitLoops.cuh,sha256=UHtIF3HcMsFINgAfPY1HwhhMNDaxgxGUmHzRShDVz2k,12131 +torch/include/ATen/native/cuda/CUDALoops.cuh,sha256=jxEMG0fwlmNwnemoWhL7x1zHCyQXeDTqs2llQYjuB7w,40608 +torch/include/ATen/native/cuda/CompositeRandomAccessor.h,sha256=kLOaquI3zKiFC2dnHcybVwsaac3y7WOyGFEKNVgdc8Q,1208 +torch/include/ATen/native/cuda/Copy.h,sha256=mcsIfjzE4YvB0opzHQzwysrCdlasG9f5PeZ4OVCIp4M,408 +torch/include/ATen/native/cuda/CuFFTPlanCache.h,sha256=uKMnLjAkwtkpkvrhIqye3PEGy4-4-DlILsjioYFP8gM,18182 +torch/include/ATen/native/cuda/CuFFTUtils.h,sha256=Fay9wPMjepT8wcVEFxa0BcsyD7eGrF8LeCxCL7VqjKk,2185 +torch/include/ATen/native/cuda/DeviceSqrt.cuh,sha256=LXvb7RnB_WDeLmmRDAlc5y-I6bWJg_YBv5wxn1e6Qv4,839 +torch/include/ATen/native/cuda/DistributionTemplates.h,sha256=1VQCK26LYYgMoCx7Vy2G7yZqZJygRMZhOEuJvFm8nHg,29502 +torch/include/ATen/native/cuda/Distributions.h,sha256=sWc_6Qaj8BXxIjWCfmi7rsdLwvAq5jx1vicAqE6KXeA,895 +torch/include/ATen/native/cuda/EmbeddingBackwardKernel.cuh,sha256=TUm8dx58lh7P86KCI_wfliCtu8DKm4ybcAu9540NcpA,809 +torch/include/ATen/native/cuda/ForeachFunctors.cuh,sha256=MhzFTs2CdMiCVqmdCjKEhX6zJeDnDugTe4539irDfTU,24940 +torch/include/ATen/native/cuda/ForeachMinMaxFunctors.cuh,sha256=-qBpnBW-iMbqxIWPIsXk2bEUwH91DV3vtUTVui8fzKw,680 +torch/include/ATen/native/cuda/GridSampler.cuh,sha256=wiPXUzbFGiQXF60jGAlqigEYMwrNEreGvVrlqC88a68,11229 +torch/include/ATen/native/cuda/GridSampler.h,sha256=P0YJuHG5fCMvbqJvHEYP4K8bn4i_vOvJ1NEDHwUNjxQ,1399 +torch/include/ATen/native/cuda/GroupMM.h,sha256=-L4d4RsZiACoeXzFuHkQFmvaxi8PuNx3OlILtXY-Sfo,581 +torch/include/ATen/native/cuda/GroupMMCommon.cuh,sha256=_mQeCqW2nyRjPOlompxxJKxN5wyh8WJWUhfJFRTO530,6706 +torch/include/ATen/native/cuda/IndexKernel.h,sha256=aotVt_oAfWzDL5AjtcEfCVp2lHop4KzwtQSR3SoXXvE,592 +torch/include/ATen/native/cuda/IndexKernelUtils.h,sha256=VtIHfQrdq92aKX-ET9NvR33XN4jO0r2M3M_MwHC6AZI,2160 +torch/include/ATen/native/cuda/JitLoops.cuh,sha256=PT5ek97JOjp45YfLpfHxZz0fGwzRPb6JUqirw-a5kXQ,7161 +torch/include/ATen/native/cuda/KernelUtils.cuh,sha256=sA6_3R8x8VN76oo-A4WTMP-KlmHJ8MPpjZA3fE9hxBs,15040 +torch/include/ATen/native/cuda/LaunchUtils.h,sha256=Pbewby1CzWNCP8etqYoWS9pNYmeRrIPILujKxTywS3Y,536 +torch/include/ATen/native/cuda/Loops.cuh,sha256=AyuhHsJ5xxuEhGnMa4opzY1sAtfEt9j6Ua848-gaeqA,12043 +torch/include/ATen/native/cuda/Math.cuh,sha256=BiYbgQ8jK41prA-xRUv4xotrVlQ4a6eFovJhMgxbtVY,123364 +torch/include/ATen/native/cuda/MemoryAccess.cuh,sha256=YVJgkgH8dDmE4dHNx8Z5StQtCp-9jYhwrIs0AudAn2Q,22533 +torch/include/ATen/native/cuda/MiscUtils.h,sha256=L73h_i3i-iP9aoPPfLP1PUSmpBsTQ6ED4GiBboqkVI0,1188 +torch/include/ATen/native/cuda/MultiTensorApply.cuh,sha256=y80xwQcXYCiifXHSddt-0zkNMBmoh_zHIkyHcdW2Q-Y,14189 +torch/include/ATen/native/cuda/Normalization.cuh,sha256=vF_RwsCdEOt771hdcJ8lhbIr9W6nFltXtRQgT_JYAWw,75457 +torch/include/ATen/native/cuda/PersistentSoftmax.cuh,sha256=QjuSyxvOVFomPq4bhN8s7W7U2l0CWKgz5bOoQ4LvWtg,18237 +torch/include/ATen/native/cuda/Pow.cuh,sha256=OQysVDoNrRMJqiCd-d457gjAyrDY3xjgNdAQh_Vo0RI,2408 +torch/include/ATen/native/cuda/Randperm.cuh,sha256=rMZPMF3X_t5foRCbZIjUNg7qKDxmEDtN1BBPyc8mQ-I,2362 +torch/include/ATen/native/cuda/Reduce.cuh,sha256=r7sBGBO2m7k9pSUXKIxqtzurQu3BxXpukrBJvz-rKR8,52133 +torch/include/ATen/native/cuda/ReduceOps.h,sha256=ULkJzjFMgAay0fhVmytY9Gw5V3-5ndsqseTV8Hkum6I,742 +torch/include/ATen/native/cuda/Resize.h,sha256=OrAewKGX34CeDGNxaF_6ja4Z4Ld7UdqTWXwlxM8Mic4,1798 +torch/include/ATen/native/cuda/RowwiseScaledMM.h,sha256=w1t47IiYnTc9w2lGdhWRA4Kg-TIaCKBaE0Y0rjmMl1w,623 +torch/include/ATen/native/cuda/ScaledGroupMM.h,sha256=Ig4NQervFHI5rwjR6e8VZeYhz7lIr5WrEWx0uKwSNWg,668 +torch/include/ATen/native/cuda/ScanKernels.h,sha256=vFFvo1hDdUGcZ6pBJSMPuMq3d3HSvyESdQep7KOmWxU,1033 +torch/include/ATen/native/cuda/ScanUtils.cuh,sha256=CTKYG-nxRTxcBDr6sDJqjojFwnlBeCYV634zEWvXdIE,21911 +torch/include/ATen/native/cuda/Sort.h,sha256=Ak6nIQWuEAAmsUVIIvp7XEa8-pDKNOPBe8lY9g8J-c0,655 +torch/include/ATen/native/cuda/SortStable.h,sha256=0bVzhFzFllv-yHxlYiIrJiUMB1vkAGkuchYwUOOfI1c,693 +torch/include/ATen/native/cuda/SortUtils.cuh,sha256=BN8rQi_OiCadXC9xpb3tLg6uRtZS2Xl8OzXDY8ESgP0,12629 +torch/include/ATen/native/cuda/Sorting.h,sha256=CWfKEDadWdjAy-osIW9yRNCPtpm0ifR9V0Mfy2kTrf4,650 +torch/include/ATen/native/cuda/SortingCommon.cuh,sha256=7mvhis3CPtIu6_tyCiyi_In6u-ozg-AwKWmq6Aj86HM,5710 +torch/include/ATen/native/cuda/SortingRadixSelect.cuh,sha256=JIwmYcYMA3KgdYcDC-F0Y4uWSnmvC4jImh0VeWOww5I,12568 +torch/include/ATen/native/cuda/TensorModeKernel.cuh,sha256=TLm-0Mxr3GZ2ktHf8kK8JapE0nmU0JrlLfXUeLYlpQc,14683 +torch/include/ATen/native/cuda/TensorModeKernel.h,sha256=xxQTk4ZtcEQG4EA6jVkigxUAFeL5rAgBVFgjm6vBW9g,673 +torch/include/ATen/native/cuda/TensorTopK.h,sha256=Yz2XLDh4W77eya4wUV70dJ3IqTm-r2PbN_oTOK4O67c,508 +torch/include/ATen/native/cuda/UniqueCub.cuh,sha256=5UcInlJD8-4H0pDNDw7XBTR2Lgcsf24rKZ-4p2R8VAQ,556 +torch/include/ATen/native/cuda/UpSample.cuh,sha256=OM1dbe9whS1Jsrg-IzeauTPcjRvi9EXklYf5SI8--hQ,11886 +torch/include/ATen/native/cuda/block_reduce.cuh,sha256=rcTxhFDkP28XZafyxQfGWqHIgRecsCtHQZFA_ss4ye0,4733 +torch/include/ATen/native/cuda/cuBlasCommonArgs.h,sha256=eTaQRfMTPe7bdAnJ7ddHKXwkFbqMRtBc2He29qd2CXM,7119 +torch/include/ATen/native/cuda/cutlass_common.cuh,sha256=hVn6wIrFmMVY_DwRvPdNKpLe82ss50Do8p99w_DVXbA,1531 +torch/include/ATen/native/cuda/fused_adagrad_impl.cuh,sha256=LbnP4NqPrpXCPup_huZIMvHz-_fZt_Mgktil69vpySg,1099 +torch/include/ATen/native/cuda/fused_adagrad_utils.cuh,sha256=YnQPA1feq2VE5pft1SBI6YE6qa6fUixxuJOtN0ZhUjI,4368 +torch/include/ATen/native/cuda/fused_adam_amsgrad_impl.cuh,sha256=wnDK1DTBn9kwV3Kzybo0t9b_WEFhxg806saEN3T3wLE,1283 +torch/include/ATen/native/cuda/fused_adam_impl.cuh,sha256=33CbBaJsUWSO9nO5mvJN9XhD0sngVwemzdueL_2AQ9g,1195 +torch/include/ATen/native/cuda/fused_adam_utils.cuh,sha256=aJh5S8Ckp5xFearCAlz3QKaHOomu35deNSdyR0LdqUQ,7255 +torch/include/ATen/native/cuda/fused_adamw_amsgrad_impl.cuh,sha256=y00SBNCAsVlsZ1yNMvoxQVfIJyDRr0j_oK_QeKrwBK4,1285 +torch/include/ATen/native/cuda/fused_adamw_impl.cuh,sha256=NEimgkgX2RGXMO_KGfGCQ37GPrHi7NXdGeSbp-4dtLU,1197 +torch/include/ATen/native/cuda/im2col.cuh,sha256=GK-g822eCAPDyguDVMb6RIxm2jzAmbTi0d7Loj5Z_h8,9954 +torch/include/ATen/native/cuda/jit_utils.h,sha256=03BRLVBw9yC2PPzbaUB0MqAO5IYCnvCwbi1YFQKfc-w,7365 +torch/include/ATen/native/cuda/reduction_template.cuh,sha256=zjRERt_FfS90XYnQ9yIv9-V9OVVNeRh19C15pHO25Uk,22057 +torch/include/ATen/native/cuda/thread_constants.h,sha256=YeD3M6Aacp-WA2zYS3hkVzHRJlNPPsyXKj6R08N0FtI,914 +torch/include/ATen/native/cuda/vol2col.cuh,sha256=Pm5y-TyCSSlUZCkom13iE85Efr9V141hhYcshxE3JBo,8347 +torch/include/ATen/native/group_norm.h,sha256=3u_A32TeaFVatZXYQChtc-98oSaaBZBC_m253cOhEYI,1159 +torch/include/ATen/native/hip/bgemm_kernels/bgemm_kernel_collection.h,sha256=3QNiGsAXKaS5wl9jlOUdp43uqc7ejrc2Fa4B0imnqfg,3708 +torch/include/ATen/native/hip/bgemm_kernels/bgemm_kernel_template.h,sha256=Nmzlp4lp2G2LHyyXATolfTfJBmlz2T9PywpMFxX_okE,6208 +torch/include/ATen/native/hip/ck_bgemm.h,sha256=2YM3vQrL0cznzCtrLD8jdyj1YfvbkZzWL4rKOIQm0sg,699 +torch/include/ATen/native/hip/ck_gemm.h,sha256=j5WmuO-ZeBqgGgdwMbXwZ7lgDhuPsw5zRGgQWzlHMSg,933 +torch/include/ATen/native/hip/ck_gemm_template.h,sha256=uUlOgEIAgiBUMxfmKIW7z0FsiIdnkZe20SWUeMev6dI,15887 +torch/include/ATen/native/hip/ck_group_gemm.h,sha256=zdAmCdcA5YFBDElcsRJuh5RtKnW8vfOxFOcwzH_4vYM,643 +torch/include/ATen/native/hip/ck_types.h,sha256=DlYtcGYQDc-T1AWgcnfguyBXRgPCaTwRvs7vhZJFppA,1896 +torch/include/ATen/native/im2col.h,sha256=fMatUfeOB6WmPopF-fxFy_dATyP8C43su7DJaqveaXs,5491 +torch/include/ATen/native/im2col_shape_check.h,sha256=05pnpUamWXqdFP5ylNwR0GseaeOUFDlGsnu7BlZ81KM,7590 +torch/include/ATen/native/kleidiai/kai_kernels.h,sha256=_bbIJKjF-_rBeWJPMTBXV4TylwpVPt1MwEEynm3V_gg,1346 +torch/include/ATen/native/kleidiai/kai_pack.h,sha256=x8qdEciDczhNbVYxzI0hAqIt3bxj3peMxDM5X7AnVRw,3009 +torch/include/ATen/native/kleidiai/kai_ukernel_interface.h,sha256=Pnj6ZOTnfrEbIvx2Q2epTrWwqimzaUbVqgYZR35Ib5A,8379 +torch/include/ATen/native/layer_norm.h,sha256=X74aXlRCzDOg3FcGTonw6ItiprPyldpwukiz4ukvYWU,4837 +torch/include/ATen/native/mkldnn/xpu/Conv.h,sha256=27pZH_4xwnDM3dNQZZ91DUeIuyQmZHI5H6UMQratwRo,1811 +torch/include/ATen/native/mkldnn/xpu/FusionUtils.h,sha256=wB-0gmec2eUzaFOmLTgZUO1IfXMaSKM2lZzs1mHahBc,1999 +torch/include/ATen/native/mkldnn/xpu/detail/Attr.h,sha256=dzuZAltzmn4vr9OaYNNdxQoQSuPAG6fU0OT-K5q-tFI,17670 +torch/include/ATen/native/mkldnn/xpu/detail/DnnlExt.h,sha256=4sV9DlQBe-NPmEMHq0WIhJRx2I3UwpSqlfhWz1WqS0o,18296 +torch/include/ATen/native/mkldnn/xpu/detail/LRUCache.h,sha256=xz8suMEoO_MMpO2u-WImH9T4VB0z-j0nFkoS20giO8I,2715 +torch/include/ATen/native/mkldnn/xpu/detail/Utils.h,sha256=usCIgVmOADI15uoutWjENEGVarR5vCgAarZg_oTSvS0,5005 +torch/include/ATen/native/mkldnn/xpu/detail/oneDNN.h,sha256=xKWTDwErwJZqQD_R-XyM5gQDCjjsReYyhpAOfitt58I,6472 +torch/include/ATen/native/mkldnn/xpu/detail/oneDNNContext.h,sha256=c_BM11baUDJOEp_KfjEnClFNQp4_-zOi9cTXobytwTI,2966 +torch/include/ATen/native/mkldnn/xpu/qconv.h,sha256=D-3zfEMsw4k1JlLUH3gZt7_oLbs42rjupMPwN59OW0s,3833 +torch/include/ATen/native/mkldnn/xpu/qlinear.h,sha256=hPodJggfIQomRKgRVAhOxs1nsSB91Cjj4yuHcbbaWBg,3064 +torch/include/ATen/native/mps/Copy.h,sha256=cWZYhk8NCIlRVberjIBYriUyhpU7to3gVc5qp4hJLW8,549 +torch/include/ATen/native/mps/MPSGraphSequoiaOps.h,sha256=7_W75X77Hicqx_YQdArpiiVfgZyv61W14lVftkFsD1E,1773 +torch/include/ATen/native/mps/MetalShaderLibrary.h,sha256=GFrELaFrOKnMc3JqQnPmFFqnHvi9SeX2nkCFMKigbAQ,6806 +torch/include/ATen/native/mps/OperationUtils.h,sha256=5W_FjGI_T2N9piZ8etvSCMfUY_1n6hs8ZA7qNHDW7VI,30608 +torch/include/ATen/native/mps/TensorFactory.h,sha256=8h9YbcxYmei_ZpCZo2km9xCxUsI8c-07wSqyerPFXmk,1258 +torch/include/ATen/native/mps/kernels/Activation.h,sha256=leCfxgI79PkwRDayn8hE4PkfBPRxajfRZ1KrAU-OKDE,461 +torch/include/ATen/native/mps/kernels/EmbeddingBag.h,sha256=iqVw27waBNcFgZq8_q5Wo0JSc0sq6kzF0D1MqAf40UM,1622 +torch/include/ATen/native/mps/kernels/GridSampler.h,sha256=gDMriZYZJmyPAA7EPLTG8l2mfhVjlvcgDxWnt2AfK_o,1103 +torch/include/ATen/native/mps/kernels/LinearAlgebra.h,sha256=HhQHT9GclOKrjfb_DJkSzUjUVNEO8DarxBHqhdmW2pM,736 +torch/include/ATen/native/mps/kernels/Pooling.h,sha256=AqZYSkn5btqhWq_CnsS9yGB9_S17BI7RRPKxxEJMKw4,2586 +torch/include/ATen/native/mps/kernels/Shape.h,sha256=a7AyZzapWbkD_liMf400jvYyJLDr8UKP57DRUv0whsA,811 +torch/include/ATen/native/mps/kernels/TensorCompare.h,sha256=aSdaemSF2GiRF_7CALJZ4yktIgof63-Tah6zLnI_lV4,338 +torch/include/ATen/native/mps/kernels/UpSample.h,sha256=XUU1fisZof9f7SZVxCuKMy3CEjFITiiqkqMEjKnGja4,615 +torch/include/ATen/native/mps/operations/BinaryKernel.h,sha256=Ek5fMGOxQ3_wtcTk5xOBsJO4GCJJanbdHMcGzF0mkpM,514 +torch/include/ATen/native/mps/operations/FusedAdamAmsgradKernelImpl.h,sha256=G1xwWT0LLYyUs8aHXn7Up8sxahjir4DgGsyHqaRIXLo,1235 +torch/include/ATen/native/mps/operations/FusedAdamKernelImpl.h,sha256=OkmiF5mPsfFZToRmusrwik-P_lyvo49HskPCRq28hYM,1142 +torch/include/ATen/native/mps/operations/FusedAdamWAmsgradKernelImpl.h,sha256=Ho9opeG56HSH8yC8Hb7-wWYH9kW402dQI4NR5CeEPcI,1224 +torch/include/ATen/native/mps/operations/FusedAdamWKernelImpl.h,sha256=xXf1MVaDz2m_RUB6EsuEEYWwfWaV6Eev_cgKOdc_iCs,1145 +torch/include/ATen/native/mps/operations/MultiTensorApply.h,sha256=rZt4ixFlCLtxNMGESV0QqlkTWtQPjOM68ZXX8fjPRt4,16278 +torch/include/ATen/native/mtia/EmptyTensor.h,sha256=y4w1cqaHBsUNTE5TZae1kB-XFhLVZWjAMdiwofVAJoE,1336 +torch/include/ATen/native/nested/NestedTensorBinaryOps.h,sha256=NMoLtp9nf45FWGIvt451kQdx1lHmfiNRh0AtEdxEa6E,667 +torch/include/ATen/native/nested/NestedTensorMath.h,sha256=bQj336uDnNYyflProhEgl8eh2FVEPAZFBUIQG9k4uo4,2972 +torch/include/ATen/native/nested/NestedTensorTransformerFunctions.h,sha256=lZY9I9b3J06iT2alJeCCEqGR_hfbvVho2l0Pr5Nk3E8,3086 +torch/include/ATen/native/nested/NestedTensorTransformerUtils.h,sha256=a4vfhIgp242JzWWPVW4U4ctPGPwgSdO27Rgu8pGveYE,1652 +torch/include/ATen/native/nested/NestedTensorUtils.h,sha256=2K1G5DP4SDKe0NtqJNdfwo3cOev_-PLqp6xnBfpn9yY,15502 +torch/include/ATen/native/quantized/AffineQuantizer.h,sha256=4HhLJpNCAXkWvnW09Alk4_QCBa1igqV4X66QyNk54Us,3969 +torch/include/ATen/native/quantized/AffineQuantizerBase.h,sha256=UDX0a_eLF_a2JDVrSf-Y-VGgEk8-Ne25Z2KqmPBUl3o,1747 +torch/include/ATen/native/quantized/ConvUtils.h,sha256=8F1-pAtLWECGODsMOQGp8WcmeEns8ZxwuIO9Ilfvuss,2494 +torch/include/ATen/native/quantized/Copy.h,sha256=P3SjvRGc1TR2-lQ1TmGd0l1BzlB1NVEzm6C8LrtMXWA,410 +torch/include/ATen/native/quantized/FakeQuantAffine.h,sha256=mneUnXSFk6uTqtr8vDp8u0ARXM_qCoM2Cq0PLqe2iiI,2041 +torch/include/ATen/native/quantized/IndexKernel.h,sha256=7n0KvKky8K1dARuMLS0LrxMVfmXepTQ6qzT1VEvcdnE,834 +torch/include/ATen/native/quantized/PackedParams.h,sha256=TjRb8G6SvN_lDqEh3Gjf-lAbtJ1hmNYWJ_tWWC02g9A,4855 +torch/include/ATen/native/quantized/cpu/ACLUtils.h,sha256=gP4f8Vojx_EBJBcJ2-yjmZXegLGxJ9wYtwKpPEHxmpY,8141 +torch/include/ATen/native/quantized/cpu/BinaryOps.h,sha256=OvT3b3V7CcNXnB6iZp-GK8tT7eR9VKBiGsZ4wQSjTEI,422 +torch/include/ATen/native/quantized/cpu/EmbeddingPackedParams.h,sha256=9StMsjybpzchN6Uo0DqF4Tq7TTuQhGUDSrvmN4IR_nc,1175 +torch/include/ATen/native/quantized/cpu/OnednnUtils.h,sha256=MJ4C8BAzJU-WY1CGMImMZeehirZ44rnwKYFXp2Nq3Ck,15442 +torch/include/ATen/native/quantized/cpu/QnnpackUtils.h,sha256=sCMzRkF9QMaDiMU_0IbfdWNbfd_XNe7gHV3oB33oMVY,17663 +torch/include/ATen/native/quantized/cpu/QuantUtils.h,sha256=FGCsFT_VNSDEd6C_UcokTYSuMtw1FvgSd6efw_wHfww,8501 +torch/include/ATen/native/quantized/cpu/QuantizedOps.h,sha256=UFaInkdktyPSpCbbcxkmfhca2B1jxF0baSx9XZtDxQY,8864 +torch/include/ATen/native/quantized/cpu/RuyUtils.h,sha256=F7tDQoOD_kZeAHhjbQA1BuluvmbT2brbp5J7XAKYuOE,592 +torch/include/ATen/native/quantized/cpu/XnnpackUtils.h,sha256=KijeLMwXrpDfgJlZgyEUYdvnBl5RvLzQLg0HSr-qhMQ,14359 +torch/include/ATen/native/quantized/cpu/conv_serialization.h,sha256=u33Rn54djfJ0l1E7Hi8PFsxpiRGNwoXSGr9Bz26Rszk,13142 +torch/include/ATen/native/quantized/cpu/fbgemm_utils.h,sha256=NqmpZpLfewpnwH7avgftbcP8nzmF9fLgUuEsKywqm4A,12278 +torch/include/ATen/native/quantized/cpu/init_qnnpack.h,sha256=-_t7Ge0F62TBT3YIrsEWds7bYYFjdtb-GCO0p1Xkb30,375 +torch/include/ATen/native/quantized/cpu/qconv.h,sha256=-nk0VPofdj0D8WiJFD88F_ZQvXSbRnldUx_SNvZETao,3809 +torch/include/ATen/native/quantized/cpu/qembeddingbag.h,sha256=IHc-UVtGXTW1ZOsCIAnCwUecwqtFYLzaafki8a7D5o0,1269 +torch/include/ATen/native/quantized/cpu/qembeddingbag_prepack.h,sha256=R7xEP6Xcg3gVU4ZqOMG3XWxr0kS5UE3i5lk6B4woLs0,626 +torch/include/ATen/native/quantized/cpu/qlinear.h,sha256=lzjM6vKSEiXGSRhe9V9Q3qIhp1dPBm1hsC4VNl2Pq84,1932 +torch/include/ATen/native/quantized/cudnn/utils.h,sha256=qrdJrTM4Dq5k1j6gbRYS8yfUaghFasD6VOdu0JMLHho,10732 +torch/include/ATen/native/quantized/library.h,sha256=68goeCvNPxaYgPVXKxldAUpXQVdtObbGtl50lJwqDZ8,443 +torch/include/ATen/native/transformers/attention.h,sha256=M9kUVQO91aN83n5pJWaHRc0JgxK7eseS6vV58nwiOFI,2520 +torch/include/ATen/native/transformers/cuda/flash_attn/flash_api.h,sha256=FHSqediqbOOZhNvDwKrZ26KDq4GfA0Nw5c-3CYBSTuc,5608 +torch/include/ATen/native/transformers/cuda/flash_attn/static_switch.h,sha256=oh3hsokaOuamc3t3wnjbWVaw-3jMwU7FdizCHDw2hFQ,4021 +torch/include/ATen/native/transformers/cuda/mem_eff_attention/debug_utils.h,sha256=hxFI0_GO_WCTXvNcbXDw6JLd1ZdRV7SczH8B4x7mt_8,10508 +torch/include/ATen/native/transformers/cuda/mem_eff_attention/epilogue/epilogue_pipelined.h,sha256=oBygv63GlhEVVSGPJX_SA6ClKGdnjg9tKPLD0wRlirw,22541 +torch/include/ATen/native/transformers/cuda/mem_eff_attention/epilogue/epilogue_rescale_output.h,sha256=aaF13g1a-GpjSSnkWlGSmbdyi6I3OCVoiREPLEEn_Vc,8036 +torch/include/ATen/native/transformers/cuda/mem_eff_attention/epilogue/epilogue_thread_apply_logsumexp.h,sha256=irabXGOwaVKIgoAe9HBBIjReeKVS2NsbPV6cTD58I8g,6377 +torch/include/ATen/native/transformers/cuda/mem_eff_attention/gemm/custom_mma.h,sha256=ODUdD2YzVUUDgp0bUyIW6a7IfKJ5xBrX8VGgiTzD-t8,2745 +torch/include/ATen/native/transformers/cuda/mem_eff_attention/gemm/custom_mma_base.h,sha256=CZnj6_RVJOuf0L2qqjhBg3610A4ZOsqpTnsu6TlVEHo,6495 +torch/include/ATen/native/transformers/cuda/mem_eff_attention/gemm/custom_mma_multistage.h,sha256=_kvJ_lQvprby69IWo9YgYtlqIM02u95wg-FACAZWqjY,27535 +torch/include/ATen/native/transformers/cuda/mem_eff_attention/gemm/custom_mma_pipelined.h,sha256=j0leQxb_tkfXkUy6nmpGo4Un_j2W9iIvXe9a2BHmgcI,14399 +torch/include/ATen/native/transformers/cuda/mem_eff_attention/gemm/find_default_mma.h,sha256=u2YDMC6WhwawOznVd-hUHEz87Tbn_vxTdcYztSPmnvk,5430 +torch/include/ATen/native/transformers/cuda/mem_eff_attention/gemm/mma_accum_lambda_iterator.h,sha256=Yl5F-XCv26rf4XfSVXcEwAiqBbGMXGYHlvMkb-3AuvE,12604 +torch/include/ATen/native/transformers/cuda/mem_eff_attention/gemm/mma_from_smem.h,sha256=MQKS3DmL_g3dyCKrwyx-N_vHb9c5vRau2pR9YGF-ew8,69054 +torch/include/ATen/native/transformers/cuda/mem_eff_attention/gemm_kernel_utils.h,sha256=c8HRDeKpXFmf_pYPv1hcPWXETI7G1k5oZrmAS9J74kw,8862 +torch/include/ATen/native/transformers/cuda/mem_eff_attention/iterators/default_warp_iterator_from_smem.h,sha256=_QDBg3mpYTLvkm6QmMPvCnlXKH-6q5UBgxjFnjDbeDs,6081 +torch/include/ATen/native/transformers/cuda/mem_eff_attention/iterators/epilogue_predicated_tile_iterator.h,sha256=ji1fnnW6YcwUF0-PZ46XcVX-PiOmhc6V8GLk_TM383Q,24110 +torch/include/ATen/native/transformers/cuda/mem_eff_attention/iterators/make_residual_last.h,sha256=5TwEgMXnapiI8dXgSD2qKaZaTHdTmu4k5OEiIl8Iaok,1904 +torch/include/ATen/native/transformers/cuda/mem_eff_attention/iterators/predicated_tile_access_iterator_residual_last.h,sha256=t1ZDqOd92TNY7poZz8aWKgxcEYxo5UQZ6Lr_trMdpKU,64720 +torch/include/ATen/native/transformers/cuda/mem_eff_attention/iterators/predicated_tile_iterator_residual_last.h,sha256=gp7am6w0DCJEhboAUVzw5hXDASCxHIh-6bIOWxERn_A,64753 +torch/include/ATen/native/transformers/cuda/mem_eff_attention/iterators/transpose_warp_iterator.h,sha256=a4X84U9_G20Fc_XFD3fCkfjvzo2a7ako4AS44pj8ngE,1215 +torch/include/ATen/native/transformers/cuda/mem_eff_attention/iterators/warp_iterator_from_smem.h,sha256=xh58eUP15rAToajIZdPtEldFhQaezl8YbF3vKyHW4rw,10309 +torch/include/ATen/native/transformers/cuda/mem_eff_attention/kernel_backward.h,sha256=fF5Gh_8XIbqv4jRg3q2IXS7PXK7dy1yf11J-039MUEM,100289 +torch/include/ATen/native/transformers/cuda/mem_eff_attention/kernel_forward.h,sha256=GwwC8VHauUblm43-BHo7Cm-u5UgdnjeyYQrhHCoXTK8,54368 +torch/include/ATen/native/transformers/cuda/mem_eff_attention/kernels/cutlassB.h,sha256=pxXq43uhRIlaTKO_p4k2n9Ow3T_wKF-xVqSa4Zl420s,96895 +torch/include/ATen/native/transformers/cuda/mem_eff_attention/kernels/cutlassF.h,sha256=9qHoIIlkPqWREfpFgQSj9f_IP3AXnpiAu0YHeZUFuKU,26204 +torch/include/ATen/native/transformers/cuda/mem_eff_attention/pytorch_utils.h,sha256=elA-QEGbaRvCdvmzJBgImCcDhyGyOb4f1shhYMiQ-as,1214 +torch/include/ATen/native/transformers/cuda/mem_eff_attention/transform/tile_smem_loader.h,sha256=tf0MqYkM9JIaMj88yQfIWgzaBMfaIPKMAojAtJgze_E,2406 +torch/include/ATen/native/transformers/cuda/sdp_utils.h,sha256=HbGU4wsXmqHb5zdoQqYLTQ8FxmzjDBn-3FVA0u2Dc1g,881 +torch/include/ATen/native/transformers/hip/aotriton_adapter.h,sha256=xujnFxl_sfxIheblCarMMXIv6t8vqe0QZkFDTBh2vTU,5501 +torch/include/ATen/native/transformers/hip/aotriton_versions.h,sha256=-cM4CU3Of2lVciNyxfkGy6mCVq7Jo3qB6SLfAhnNvuU,697 +torch/include/ATen/native/transformers/hip/flash_attn/ck/me_ck_api.h,sha256=2Au0JqJZmYLlAovY6rD_-qFrnp06USJIMe58wDfDRak,2021 +torch/include/ATen/native/transformers/hip/flash_attn/flash_api.h,sha256=U4mNQNV-HAUAEd1Cirn5VB8qMkbdOcylZ6LiWXOGpz0,21108 +torch/include/ATen/native/transformers/hip/gemm_kernel_utils.h,sha256=2r4RXOKhLO517Ex4Vrt1Asa2xU54DqV6mi2t7uChnoY,1729 +torch/include/ATen/native/transformers/sdp_utils.h,sha256=8Zy9WkIvDr2Ca52HWOn2b4LdlKPGnprqGn16qhAW5HY,3170 +torch/include/ATen/native/transformers/sdp_utils_cpp.h,sha256=0hSyQX8zGHEJeDh_OoGx-_hvLaBE6FK_p5uFNf1BmjE,18169 +torch/include/ATen/native/transformers/xpu/sdp_utils.h,sha256=TJP33v_Umxffcwa04qphK2N93jnnpWKMDp9hujoTO4c,754 +torch/include/ATen/native/utils/Factory.h,sha256=hulmOFEIX_WWiqQwSH-RwO_eeOS0yN5GiKK6mCeBPlo,741 +torch/include/ATen/native/utils/ParamUtils.h,sha256=ih8hZmb-uy6FgF43gZJJkP280JiXnh56tEzH1QYm2kM,1452 +torch/include/ATen/native/utils/ParamsHash.h,sha256=TQBsz_mSlWUpZ2NMdj7AHuKbpMA3BfIMBlzs5wtnKkA,3380 +torch/include/ATen/native/verbose_wrapper.h,sha256=tSL4joW3TAZdsqba7Y7Cauyq0Jp3G9C4116lGmdTs6c,447 +torch/include/ATen/native/vol2col.h,sha256=zAA7LrKdvrCGsuitLlcWXHMD7V75Gh0C21r6-wW17oM,3809 +torch/include/ATen/ops/_adaptive_avg_pool2d.h,sha256=VKv9hXeA4KAtFD4NCgbXz8wfdejTzHII8vcP5_D4oJA,4395 +torch/include/ATen/ops/_adaptive_avg_pool2d_backward.h,sha256=8Ubr9PuqM_27gN2Yyk03vq3RrO8Hwovqoy2VVBrxIuc,1706 +torch/include/ATen/ops/_adaptive_avg_pool2d_backward_compositeexplicitautograd_dispatch.h,sha256=mLkVi1HCGh9nSBkKESDUAqtfRaZ0Z-00rW8-UgIq554,1231 +torch/include/ATen/ops/_adaptive_avg_pool2d_backward_cpu_dispatch.h,sha256=OsC_c6UUjet4H_zYi7IIZw0sKrzC0V9ztHGk9pjFhnQ,1029 +torch/include/ATen/ops/_adaptive_avg_pool2d_backward_cuda_dispatch.h,sha256=6QcvbVmZky7Q0hbelPJyv3I10D1R0b0aaVfPp7bNaww,1031 +torch/include/ATen/ops/_adaptive_avg_pool2d_backward_native.h,sha256=r7HHxy8BF7Ou5o3Z3lS0FGx3j-7zaNeMUlVzix4fHHw,1034 +torch/include/ATen/ops/_adaptive_avg_pool2d_backward_ops.h,sha256=BhB-sEfb_DaxKIKckF_68PuVI-wCY_fOjgGMYehQG-s,2147 +torch/include/ATen/ops/_adaptive_avg_pool2d_compositeexplicitautograd_dispatch.h,sha256=k7uR9x4eqtcgWoutyVO4IR9WdCp45_k52Zjb0rLgbLQ,1472 +torch/include/ATen/ops/_adaptive_avg_pool2d_cpu_dispatch.h,sha256=lp8Ne9a25VTEcrtpsYruG9qlsSKA9PlJ320oGoEubdY,1125 +torch/include/ATen/ops/_adaptive_avg_pool2d_cuda_dispatch.h,sha256=NuLYus9z6EKbte63g72zIR_z5zHzz0VaSggJ45L_54o,1127 +torch/include/ATen/ops/_adaptive_avg_pool2d_native.h,sha256=yQB5NsFghSasLHbkDz-XawSCqyHzjQVxamL0UhK5ehI,1230 +torch/include/ATen/ops/_adaptive_avg_pool2d_ops.h,sha256=99HZh1i09c0SA5KV64nk-VTPK4vaeIEOzjW5jY6-BBg,2105 +torch/include/ATen/ops/_adaptive_avg_pool3d.h,sha256=v2a_8P7iuJ06UvQKIWKYI5_HxhaIOSnfo_RlAO_gUu8,4395 +torch/include/ATen/ops/_adaptive_avg_pool3d_backward.h,sha256=3cVh_GUjUbgLPJLRTW2e3Ta97b6bggisWhNN2k79_FM,1706 +torch/include/ATen/ops/_adaptive_avg_pool3d_backward_compositeexplicitautograd_dispatch.h,sha256=43DpFO1vxssk3yj7QYLBfdY6-jrjwVZmjrmBgPmc9GI,1231 +torch/include/ATen/ops/_adaptive_avg_pool3d_backward_cpu_dispatch.h,sha256=UM0xvlbTYxwnsDKzEOqaosV9s3cNUIWYt29gwQqOnbs,1029 +torch/include/ATen/ops/_adaptive_avg_pool3d_backward_cuda_dispatch.h,sha256=_350PXjjuL0GNI753yx8iKuZwKQ2Uh9c6zLWjih2uXw,1031 +torch/include/ATen/ops/_adaptive_avg_pool3d_backward_native.h,sha256=KCwuX9lPBO2jfosSnOiPqNJ9o8uXg8GSPXKtEDUXnGY,1034 +torch/include/ATen/ops/_adaptive_avg_pool3d_backward_ops.h,sha256=4K6JCalwtIBYas68HT8fgERDxVShrbLhhZbTP791-co,2147 +torch/include/ATen/ops/_adaptive_avg_pool3d_compositeexplicitautograd_dispatch.h,sha256=t-Iy_nYO5oxgcoAEZtM8bUZymZwR8aeBdVWHimIff38,1472 +torch/include/ATen/ops/_adaptive_avg_pool3d_cpu_dispatch.h,sha256=uJjRa0Koz3qaFx-e9SlGZ3io2is7smRWro2zH5KSxK8,1125 +torch/include/ATen/ops/_adaptive_avg_pool3d_cuda_dispatch.h,sha256=3iRhAMZ1qyofZpU8uIIKN5adBjekHe6upXAwr55SgTY,1127 +torch/include/ATen/ops/_adaptive_avg_pool3d_native.h,sha256=XtGD7YLyX-gz9KqSHVRAhk2D8PlBytuEg332Xg0APTM,1119 +torch/include/ATen/ops/_adaptive_avg_pool3d_ops.h,sha256=EXAipK5kpqItDp0H81q9hS8TnA7goCYh-iwBeZErOyM,2105 +torch/include/ATen/ops/_add_batch_dim.h,sha256=VIz0gGHwr_Sye4buLvGsa2nTXtotVQNl1qne_Bub-1E,1001 +torch/include/ATen/ops/_add_batch_dim_compositeimplicitautograd_dispatch.h,sha256=ZfoHh_My_mxOKUlNz8nNDG1aFL_oWJiLtMwwV_Xay-A,1060 +torch/include/ATen/ops/_add_batch_dim_native.h,sha256=h2Kk9wSX8FFzZCjJh76H6TyJg9gXcP_bQIcpkn8T2zs,772 +torch/include/ATen/ops/_add_batch_dim_ops.h,sha256=0y0o7r6MA1vnR77n2LsW5ukEaHIqxx-uzeE-ZMD8DFs,1347 +torch/include/ATen/ops/_add_relu.h,sha256=vnceR2sZ-FMjyE00C_I_vwd_SKNHuKrtT3XjEuFloaY,3035 +torch/include/ATen/ops/_add_relu_compositeexplicitautograd_dispatch.h,sha256=hUNyJx_nMiZwYeb5i75UP5uLcN9UFLIjxsx1jVHl0Oc,1233 +torch/include/ATen/ops/_add_relu_cpu_dispatch.h,sha256=REC2x8KKagTEtAwbtfHN4RtIjXIONz5eelHVd86rG-I,1627 +torch/include/ATen/ops/_add_relu_meta_dispatch.h,sha256=JLWkg0N4MNaLrhV7J0PNevRi3P2XVcA56XSNDZRLKfc,1138 +torch/include/ATen/ops/_add_relu_native.h,sha256=ptS5iBg9uD4tzaRHGaOtFCIEC4eYGx8mwqoAyn_5PBA,1382 +torch/include/ATen/ops/_add_relu_ops.h,sha256=0iMn3D4ZwCoKsi_9CDvGIpkfZOiLnApPTDQ8hDFnJt8,5094 +torch/include/ATen/ops/_addmm_activation.h,sha256=NFXY6zE8pZJ53l0hwyQTFPJPbbD9fVS4iNZNQUwCywQ,2101 +torch/include/ATen/ops/_addmm_activation_compositeexplicitautogradnonfunctional_dispatch.h,sha256=zc4M5jyoTUOOvCUdQ7DFlFzvsy8hd-u8sHt0ahifELo,1181 +torch/include/ATen/ops/_addmm_activation_cpu_dispatch.h,sha256=QFoZ5pSn68aAgyxyCXBq6CGRCEhBVIESOCloETpWfg4,1532 +torch/include/ATen/ops/_addmm_activation_cuda_dispatch.h,sha256=x-ArIRqgPH9MaWVhIWPt2PPgTuYJucA2NjkQwLa5Bnk,1534 +torch/include/ATen/ops/_addmm_activation_meta.h,sha256=zQs0DP6jEuXc131wioxiuLSx7f57u2GB6xYySqzErbQ,948 +torch/include/ATen/ops/_addmm_activation_meta_dispatch.h,sha256=LJ-qSa6F7dtiale1qdWtblQDpyNQ0qCohC7DI0bcUZw,1534 +torch/include/ATen/ops/_addmm_activation_native.h,sha256=9KrUGdrLmXNecFwyiGaXDeU9XMBlAA0ostjW9jnQmHo,1285 +torch/include/ATen/ops/_addmm_activation_ops.h,sha256=cDCyYLEx9WwDg1ymxPYEUvB_FdmXqphuzTD9Af138-U,2662 +torch/include/ATen/ops/_aminmax.h,sha256=_JKA35j3Hw6HhCJqbcqHKACzDK-dEaerEL_nvQnLbAU,2504 +torch/include/ATen/ops/_aminmax_compositeexplicitautograd_dispatch.h,sha256=-UB2ENjtdZhPT8vTj4fd-XWhNI444dgmGccSVJtNxEk,1534 +torch/include/ATen/ops/_aminmax_cpu_dispatch.h,sha256=JfDl8NSKZ_KuT8advdH0RUiGvkQroIbrypcYO0zoBhM,1115 +torch/include/ATen/ops/_aminmax_cuda_dispatch.h,sha256=cbjKuLphT7N66jabChNFqo2oWbbFKAyg8t5LIiePLf0,1117 +torch/include/ATen/ops/_aminmax_native.h,sha256=M48NN_OtbMGf9bYDJEXlsHyBDWfrMm4edOtFaMR5YpI,1160 +torch/include/ATen/ops/_aminmax_ops.h,sha256=xW39vDxpi23hwdnGEszwL5oRNUY8CNFnJxh2ijS83_M,3638 +torch/include/ATen/ops/_amp_foreach_non_finite_check_and_unscale.h,sha256=e8CuktcHI7bn87uBRzuJtg5WQSO76KpjBrWzHOlA_Tg,2377 +torch/include/ATen/ops/_amp_foreach_non_finite_check_and_unscale_compositeexplicitautograd_dispatch.h,sha256=VXLsaOjSRF2B2xQph85eMtcePFfWzGhVZukvnTjG2II,1464 +torch/include/ATen/ops/_amp_foreach_non_finite_check_and_unscale_cpu_dispatch.h,sha256=TfYb0wqSIp7wJvieB9xHFAGsFhlKi8nGgRTk2JVCSAE,1054 +torch/include/ATen/ops/_amp_foreach_non_finite_check_and_unscale_cuda_dispatch.h,sha256=mGRzwu0aolPlbO2Nho0ibcuLp86DH54hsB38PyH92w0,1056 +torch/include/ATen/ops/_amp_foreach_non_finite_check_and_unscale_native.h,sha256=X5k13v-pQX-wkr3HSkBRbrPuplybZ5W8OjVlEwkaVsU,1295 +torch/include/ATen/ops/_amp_foreach_non_finite_check_and_unscale_ops.h,sha256=PH3IpIBYawlq9GeRIIMUxOGm4_q2yQE32TxLvHrY0vM,3262 +torch/include/ATen/ops/_amp_update_scale.h,sha256=m5NSz43QaTDRqAyEvKOya71WqTwK5mdUloeH0puemx8,3018 +torch/include/ATen/ops/_amp_update_scale_compositeexplicitautograd_dispatch.h,sha256=q-KqXU0UiXyiHAvsA91rq8ZUYka3gtrHxWi6mKve1iI,1662 +torch/include/ATen/ops/_amp_update_scale_cpu_dispatch.h,sha256=7N15m6iQbPylF_iCg-KTrs-v0WvXI2LydzfinzIM90o,1123 +torch/include/ATen/ops/_amp_update_scale_cuda_dispatch.h,sha256=yNcvckOdIf88VDGvYUV0ZfBbJ6sTEq5Wzwl4RgAGPGc,1125 +torch/include/ATen/ops/_amp_update_scale_meta_dispatch.h,sha256=8VDbSMIA53C_Wex35_MHAGxgyHoTnzk7MY2Udclp54s,1125 +torch/include/ATen/ops/_amp_update_scale_native.h,sha256=-3IT4l-Se22BUw52HnDiT7knBPUR9Fkiu3rGcidtXv4,1558 +torch/include/ATen/ops/_amp_update_scale_ops.h,sha256=7pt7ckvF4x80pmTtcZI0sF_l0llEWq6D16HCnxkf_4Y,3903 +torch/include/ATen/ops/_assert_async.h,sha256=NU64JdJs9kO2GaC3hDE8oJJAqkzPU3rjWDeLGaq-I4c,1120 +torch/include/ATen/ops/_assert_async_cpu_dispatch.h,sha256=8TWiV4wTxBGib2X21PnqM6xcyyBKpTATUiCspwkXo9I,1059 +torch/include/ATen/ops/_assert_async_cuda_dispatch.h,sha256=hb89YSZIwi1MDNAWXDaIaNCKKopZnmOlF_Q4mWu8GPo,1061 +torch/include/ATen/ops/_assert_async_native.h,sha256=Suv-5Ls1siFxFXjhIIHMjl10UXTM5Wxx143C2mQ3FcQ,980 +torch/include/ATen/ops/_assert_async_ops.h,sha256=qlkmiPuJ7jmlQPWenFdY2WGtWYGki3WjPkeWI8OtFsw,1812 +torch/include/ATen/ops/_assert_scalar.h,sha256=cuff-IVFPf2VkAJ-hpG9D8MRCmrc8Dq3vQjr4oISYIg,970 +torch/include/ATen/ops/_assert_scalar_compositeexplicitautograd_dispatch.h,sha256=TtEYQMZ69qKusuxsf-aeOjJUP31rCsguWCOkI5AV4pI,1049 +torch/include/ATen/ops/_assert_scalar_native.h,sha256=XTx6IF8VVQ-cq9oZCDlLwmPbg4BNjtSGiaRPrnCVS1I,761 +torch/include/ATen/ops/_assert_scalar_ops.h,sha256=jU1JJNn4_3UGgtEJnUqtzM-nQquVmUM-MMmTXlnoSno,1305 +torch/include/ATen/ops/_assert_tensor_metadata.h,sha256=cXDhhq656r4YDYdFinLYOn9eu3Z13H_kloP5GEg0XvQ,3272 +torch/include/ATen/ops/_assert_tensor_metadata_compositeexplicitautograd_dispatch.h,sha256=qQkLHdbYoBWq3jM7pYTD9Zu_nDffN68TEL23cDp0Pm8,1597 +torch/include/ATen/ops/_assert_tensor_metadata_meta_dispatch.h,sha256=pA9v-ov8VAO5wUQ-grfgzxy7x638CTqDyIN11LuBexw,1555 +torch/include/ATen/ops/_assert_tensor_metadata_native.h,sha256=7h-X_m5RsMAC3QPX7fyrEVio1fFmIA_6X4cRPluwHoE,1314 +torch/include/ATen/ops/_assert_tensor_metadata_ops.h,sha256=t4gkCXNhLgte-i0jz5ATfwzzZinlnVBq0YPS0Xt4XsY,1849 +torch/include/ATen/ops/_autocast_to_full_precision.h,sha256=3F4Q2TewdBXsSFSg6MTL4AVbvLlq4-mqQZ6qElUvQh8,778 +torch/include/ATen/ops/_autocast_to_full_precision_compositeimplicitautograd_dispatch.h,sha256=ZV6rFidwsaHXWOWQNPPkpkYZbGny9fPDeoEvsbo1lhY,1076 +torch/include/ATen/ops/_autocast_to_full_precision_native.h,sha256=5G8Jeejaliid0n7xxs8i3zeyQN-NonRM44IfjD8pJSc,788 +torch/include/ATen/ops/_autocast_to_full_precision_ops.h,sha256=_wouMqdvfFJL4-TrK7eLXcyTCri_u33NpQmUmT2a_es,1403 +torch/include/ATen/ops/_autocast_to_reduced_precision.h,sha256=cgqPSA-IAKKYs_xsrri3-UburVPSvZJWxhfeO8POkWE,781 +torch/include/ATen/ops/_autocast_to_reduced_precision_compositeimplicitautograd_dispatch.h,sha256=i13BWqXPk8hFtzXQNZg7YsSmj9gMzwc-34_l8O5GvdU,1132 +torch/include/ATen/ops/_autocast_to_reduced_precision_native.h,sha256=MFscclOIoT5hAlHdZ2ewIyd0gCzFbz8icgT5pzqO7qY,844 +torch/include/ATen/ops/_autocast_to_reduced_precision_ops.h,sha256=G-f_alHvPgQjuPz5O3EAWBzITSTrcPilnaPzMxyOMvo,1595 +torch/include/ATen/ops/_backward.h,sha256=BW07CJoOliQbp9F42ephO8cNvgorce3PNcOs3rPNA48,760 +torch/include/ATen/ops/_backward_compositeimplicitautograd_dispatch.h,sha256=jA9epTU1M9w1Evm03JmVCoJaQuF7rnacxhpvOWKXGHM,1163 +torch/include/ATen/ops/_backward_native.h,sha256=-AbG5eqnAl3djIXSiRej_apsXFGRYUb1nEyP45S3GkE,875 +torch/include/ATen/ops/_backward_ops.h,sha256=xm_Nte-p1bAnRZZgtubHW9C2jNRb7Z7iY20P-4VS4tw,1618 +torch/include/ATen/ops/_batch_norm_impl_index.h,sha256=f-cwCC2OOt3JCgQglZmh0PQMzRl7XlKMGViMMs5Od78,1509 +torch/include/ATen/ops/_batch_norm_impl_index_backward.h,sha256=7Bp5xP1DZIC75Gs_rXx5mCQMYr2Cmwcgldagep6c4FQ,1777 +torch/include/ATen/ops/_batch_norm_impl_index_backward_compositeimplicitautograd_dispatch.h,sha256=2BJgAze5zGVOeP4HQqulXhKipOJ0pKA13qPze50RmoM,1470 +torch/include/ATen/ops/_batch_norm_impl_index_backward_native.h,sha256=xUnZjUpfRL6POftgbtMH2t9VI03OUtkMN0ssS-vdtsI,1182 +torch/include/ATen/ops/_batch_norm_impl_index_backward_ops.h,sha256=2r5mtBrLVtKMpAjvylJWAIIhT438oBVYVcvV6F7hO3M,2673 +torch/include/ATen/ops/_batch_norm_impl_index_compositeimplicitautograd_dispatch.h,sha256=Ewr-XGnFSikwRYpyGOZk7frC9eYHd4dNAsgXqX5ZCPc,1339 +torch/include/ATen/ops/_batch_norm_impl_index_native.h,sha256=tAoprCXpkL45Y-SL5mOVMYXH6dRuodGSvpdwP-0TZzY,1051 +torch/include/ATen/ops/_batch_norm_impl_index_ops.h,sha256=PBqZ6dNJtPu5W8llYfCmbzPpCBmY12o2ULUWiO2TWVs,2267 +torch/include/ATen/ops/_batch_norm_no_update.h,sha256=0q26fQ4TkGIFBOQ-1rXmiqQhbQKFK1qD0XF-tunPhWs,3063 +torch/include/ATen/ops/_batch_norm_no_update_compositeexplicitautograd_dispatch.h,sha256=HAxsh33mQ4H9sQSN7DQqyKXJvjvEC02aGTyOQb9JxQo,2134 +torch/include/ATen/ops/_batch_norm_no_update_native.h,sha256=rAUyAzEl9xsqjUaEHtQ3raTYnUNaBlBziQWwW-MC8fM,1426 +torch/include/ATen/ops/_batch_norm_no_update_ops.h,sha256=TILf3FK6lm-ASfHLmEy1XnWDAcrz05Y0JDzBKQX48_E,3855 +torch/include/ATen/ops/_batch_norm_with_update.h,sha256=N5fMIXovPnpBDuIGeCqG_4o0mjgtiqr4bGe_8VV9lqQ,3747 +torch/include/ATen/ops/_batch_norm_with_update_compositeexplicitautograd_dispatch.h,sha256=aEJAQBBW8f33iIXBeiuGCLxYYxrhCnVmSaOlwETCWTU,1296 +torch/include/ATen/ops/_batch_norm_with_update_cpu_dispatch.h,sha256=wuN1YbE3ujiNhjHf5YYDGJztIOEiklZpOSWGthNdPQ0,1986 +torch/include/ATen/ops/_batch_norm_with_update_cuda_dispatch.h,sha256=Rp_AgdR8ymgAexMLxz4rq35snL7UXDSmsz7WIX60QBA,1988 +torch/include/ATen/ops/_batch_norm_with_update_native.h,sha256=5mzx_xP-eoAOx77l3X399JlsntboLI2ZD9DdsDikwB8,2672 +torch/include/ATen/ops/_batch_norm_with_update_ops.h,sha256=IVRgqFcs55zMdv8aTuF35iEkMOQhKnaLih7S75i3Q_U,5102 +torch/include/ATen/ops/_cast_Byte.h,sha256=iUEt6J2gNyETwvNPufNb3QXf1B0Lk82uI9IbBYJre0c,971 +torch/include/ATen/ops/_cast_Byte_compositeimplicitautograd_dispatch.h,sha256=GAMd54TpuYLJqla4jkgSncD36gAk9jrZC5oF4gAmJ9U,1047 +torch/include/ATen/ops/_cast_Byte_native.h,sha256=r3Cz2B1FnuwiG3OYBrNMwqrI21-O0E8P1Tt9NuMC8-4,759 +torch/include/ATen/ops/_cast_Byte_ops.h,sha256=uw1XDJr8AEx3Y9cKkB2TRJxVpV3dCegCuVaYUL_7_Fw,1292 +torch/include/ATen/ops/_cast_Char.h,sha256=W8CCak9jEOtwzrrxHEHjmRA4ZRF0pXJSEIMCuKhUddg,971 +torch/include/ATen/ops/_cast_Char_compositeimplicitautograd_dispatch.h,sha256=QCN2swYd6xNMS2rFKyre_D4tdZ8Ys-e5dych1VyHHL4,1047 +torch/include/ATen/ops/_cast_Char_native.h,sha256=tmhgYowjNN_Z4h8JL9DeVce9zq5xtWwSu8Qt6KD_cEc,759 +torch/include/ATen/ops/_cast_Char_ops.h,sha256=IJJww6lMEhtzi7AaE9KJ8oXfwqjJlx8SSKSP2u2vDwk,1292 +torch/include/ATen/ops/_cast_Double.h,sha256=qfyoNBLnGsT6T-w7U_5d8o_v3so49U-E7yn4du8mnFg,979 +torch/include/ATen/ops/_cast_Double_compositeimplicitautograd_dispatch.h,sha256=MSiiUBlIJjbi-9Vi1i9mbrco6KKsh1zXG8hHemVUQlU,1049 +torch/include/ATen/ops/_cast_Double_native.h,sha256=5UQdbXBOdrut4ZBXlcICD5zplBm1YQoT8HHHLrM1nTU,761 +torch/include/ATen/ops/_cast_Double_ops.h,sha256=ZsbiOn9mzLE8db7ubpoVpWvtCFoKqc1aFNUfAz2_n6o,1298 +torch/include/ATen/ops/_cast_Float.h,sha256=tATJSdY3Alki6EbaIOZROvlWrOICxXbSiSM-BqJh5f4,975 +torch/include/ATen/ops/_cast_Float_compositeimplicitautograd_dispatch.h,sha256=OWeqPDgm426C6d3TjMJpuU6XYqk46qV9mu9TCcwHGQI,1048 +torch/include/ATen/ops/_cast_Float_native.h,sha256=pdAGU-5aIjQv8NzKIeXlTU1Y6o3A8aMIW2zOAlNGQs4,760 +torch/include/ATen/ops/_cast_Float_ops.h,sha256=p5kNK97whfzBZuCso0s-l_sYOy9eXR4TZ_Kfqmk5cOg,1295 +torch/include/ATen/ops/_cast_Half.h,sha256=TaqI_D3YLGhwLX6zkNz8Ioo7E988i_L0aBNx8KhbFbw,971 +torch/include/ATen/ops/_cast_Half_compositeimplicitautograd_dispatch.h,sha256=Daf1_C6LfpVL7nr16k_oatRAk_iupE4LU84-HNBVKu0,1047 +torch/include/ATen/ops/_cast_Half_native.h,sha256=koynLsIimWLnvFTbh_OUtbb-j4Sk_YN2W7_p1erjdP4,759 +torch/include/ATen/ops/_cast_Half_ops.h,sha256=Cnp7hvpq5cCmyGEbYXY_V7i10SIirxxF3nAeLIKUWKo,1292 +torch/include/ATen/ops/_cast_Int.h,sha256=_i0h3Hcwxovwfnb80Y7_SxsU-fMCV-d9uZM3QdabIDs,967 +torch/include/ATen/ops/_cast_Int_compositeimplicitautograd_dispatch.h,sha256=qyJwe6vAd06IDjhj3IFdRj_csh4jLT6vnzllcbvuCt4,1046 +torch/include/ATen/ops/_cast_Int_native.h,sha256=fU7d7ep-emIz4Wj8auNcBgjgRCgm68UDvguodGoYCVE,758 +torch/include/ATen/ops/_cast_Int_ops.h,sha256=Gnq8WunEMadHatpIRAb972UB3aw1f891pBHKujTTOnU,1289 +torch/include/ATen/ops/_cast_Long.h,sha256=VZweppx4HFvooEZpt3K-8-PsRyEPSV5PP98OugsNjtY,971 +torch/include/ATen/ops/_cast_Long_compositeimplicitautograd_dispatch.h,sha256=JDWTNIDQ_BB4MFnSOuudgxHb4dF1Uq2DepBI4KCUk_U,1047 +torch/include/ATen/ops/_cast_Long_native.h,sha256=8YBfwMAvxCeQXyXDgdP3-Ix8XZHzZokD135VxjOijMc,759 +torch/include/ATen/ops/_cast_Long_ops.h,sha256=QszCLEyc2Ez62bHrt0JlEUfxibnaUZMs-2TCLkfHPQY,1292 +torch/include/ATen/ops/_cast_Short.h,sha256=GgjfVe2S0RgVpZgHo6Kau1qbwNiE9DfWFkA0l0pavfc,975 +torch/include/ATen/ops/_cast_Short_compositeimplicitautograd_dispatch.h,sha256=VLVdL13yRlMSxSJZyG-1Xr4Ytct4rqObuz-G3_xUXsE,1048 +torch/include/ATen/ops/_cast_Short_native.h,sha256=It3CgornyGV7rnn9TZzwh00Jy6m7ToEubFrsyNbLf-Y,760 +torch/include/ATen/ops/_cast_Short_ops.h,sha256=79_EaptGAYz4X7YfPzd-QC1hzm9RG8gT2t2dh8RW08E,1295 +torch/include/ATen/ops/_cdist_backward.h,sha256=U-V3i5Lizw0Gc5xDZxygsa7p3uwjgB7syKcgFuLwdRQ,1806 +torch/include/ATen/ops/_cdist_backward_compositeexplicitautograd_dispatch.h,sha256=TVX87qwBiRVjqROxup6FZTlkJq9GiUlhqNyemwqice8,1303 +torch/include/ATen/ops/_cdist_backward_cpu_dispatch.h,sha256=AYYZyPELdw-24gl9NrNETvN4OslT2ebXduzBDOVfsnw,1065 +torch/include/ATen/ops/_cdist_backward_cuda_dispatch.h,sha256=7FulepCGFLuBBIKMSIPlT7SrYdjuN9TaBhT1xhLE3VM,1067 +torch/include/ATen/ops/_cdist_backward_native.h,sha256=XvmWKGrIkXSx1vZ8je_a7eGkhoPIAnDjOEGrdxe-NyM,990 +torch/include/ATen/ops/_cdist_backward_ops.h,sha256=WaGGYd8GQdyFA9A_R4nmOo4ERAHK08yKA2el3sfd-_Y,2409 +torch/include/ATen/ops/_cdist_forward.h,sha256=KZ6DmmHw3jPvtB4VfYYGT0nMshTKcveu0LbPa4N4GQY,1739 +torch/include/ATen/ops/_cdist_forward_compositeexplicitautograd_dispatch.h,sha256=UgQS0ZUGuf1ats_zIuSZdP3_-LyY31AeS6zWPhn3SIo,1277 +torch/include/ATen/ops/_cdist_forward_cpu_dispatch.h,sha256=8FlF-PXLzmcNcycd3w3fYKgjg-vri4Rx_KHkqp2-F3A,1052 +torch/include/ATen/ops/_cdist_forward_cuda_dispatch.h,sha256=Kf6jo1ZPTPWiAQLmrzV5gOeuPMDhBOTAIVKvK0YCMNo,1054 +torch/include/ATen/ops/_cdist_forward_native.h,sha256=-MG8DF1QwsiAjRyiqCDwul9HJlMYbwxgkJVsLashk44,964 +torch/include/ATen/ops/_cdist_forward_ops.h,sha256=hzMkV3q3BzgWMwPV5mqS4S4ylU2M5-IpmHVxhFx_uCk,2311 +torch/include/ATen/ops/_cholesky_solve_helper.h,sha256=WSC4_9F4Bbap4noFpACrORmdYLxiG-CJJOpoACP1uD8,1639 +torch/include/ATen/ops/_cholesky_solve_helper_compositeexplicitautograd_dispatch.h,sha256=BO5o1jS9T-kkw9ZdcO_9rer3ha3YLXSBz2ag7CUWRJ8,1221 +torch/include/ATen/ops/_cholesky_solve_helper_cpu_dispatch.h,sha256=ObB-pLnODn4w45B_mfDplqdqj01b62iItFJ8z3Y4Y1E,1024 +torch/include/ATen/ops/_cholesky_solve_helper_cuda_dispatch.h,sha256=zOBtWBt10BPpa_6jylzVjFCReQDaGfK-CcSTx6wSTmE,1026 +torch/include/ATen/ops/_cholesky_solve_helper_native.h,sha256=yeiQt30yfDz94JoDHqzSy9eDJgLhKzOVg2ILDAIhVcQ,1021 +torch/include/ATen/ops/_cholesky_solve_helper_ops.h,sha256=xJqu_YSMiUtyBKhaDL5w0uF0v6HjtRKbWwi_ft9c7uo,2129 +torch/include/ATen/ops/_choose_qparams_per_tensor.h,sha256=B8FYNi4YNh5HVA6orsR7bBHngPmiHsrofnaFvjXWP0A,1059 +torch/include/ATen/ops/_choose_qparams_per_tensor_compositeimplicitautograd_dispatch.h,sha256=RJKzWLBY7okEhWlnEb1F_nx4kuHt8dlzufG-niQ_3gg,1081 +torch/include/ATen/ops/_choose_qparams_per_tensor_native.h,sha256=vAQvomoawvPD0d7jpIjwNbbhVrGXSwToK_e5ZZ2Ygv8,793 +torch/include/ATen/ops/_choose_qparams_per_tensor_ops.h,sha256=y57Z7uuQUQF2cG_UBZPLi7hmTNHorPvE2gBnYEXrAm4,1400 +torch/include/ATen/ops/_chunk_cat.h,sha256=T9pTGfyJy52r7bgPJlpOsRVmbBKWO9Su_1OV8l8zYYE,1567 +torch/include/ATen/ops/_chunk_cat_compositeexplicitautograd_dispatch.h,sha256=epexgL_T4kVC7Hi8cFbmsmtE08AaK4NQn4NtdUxIw2s,1283 +torch/include/ATen/ops/_chunk_cat_cuda_dispatch.h,sha256=VTrX11jLlT5B9zTPYTD49ZLwQ9LC3N-fHc_tcDTBb8k,1241 +torch/include/ATen/ops/_chunk_cat_native.h,sha256=e7J_6_g0BvWrt93V3-yid2-3RQe_kgVHu-pyxaSG7Ic,1094 +torch/include/ATen/ops/_chunk_cat_ops.h,sha256=CWggP0xIMY8ssvXBfyIo7DACCgC6CSpq7Nblp-4s0-k,2041 +torch/include/ATen/ops/_coalesce.h,sha256=N0BSrvTZjla5WLys7UM5t0KkaOIMEXZju3kVyWhdpDI,1311 +torch/include/ATen/ops/_coalesce_compositeexplicitautograd_dispatch.h,sha256=Hwc44Lu6xmDsoNlFToxCyooWSqO4qkEXeBIBO7Npqu4,1127 +torch/include/ATen/ops/_coalesce_native.h,sha256=IZzOMWVpLqWR3S1R_pxXZaeiOsgvqQ-WmWg6UcQW0Ng,894 +torch/include/ATen/ops/_coalesce_ops.h,sha256=182XiGHaPEqjvqZVVpVh-7041I6k-_04PJCIOAg3cw0,1819 +torch/include/ATen/ops/_coalesced.h,sha256=6upz2I_Cz6AAj-noGFu9fytzrasEoHmcEFfSG68eisQ,1450 +torch/include/ATen/ops/_coalesced_compositeexplicitautograd_dispatch.h,sha256=bQAOq--qjPQXpU458gmtCIjRv--1tm4XQUigqo6vqbI,1235 +torch/include/ATen/ops/_coalesced_meta_dispatch.h,sha256=uoZYnRD-za2B4bk6wcPbPORdR8_OGloko6sYx-a18Zk,993 +torch/include/ATen/ops/_coalesced_native.h,sha256=dbrXtbdzfRU3cu3oNWd6CYKSzkDdsIDMgg7i-UTKlHo,926 +torch/include/ATen/ops/_coalesced_ops.h,sha256=hgewfg3wKaUot6UiGPjWg78VhXXwOO8MhmJikYCrg-8,2498 +torch/include/ATen/ops/_compute_linear_combination.h,sha256=8wGZlGnNfIWISMCvVzlL7ROCjl47pdwCqTQemYqLTEc,1704 +torch/include/ATen/ops/_compute_linear_combination_cpu_dispatch.h,sha256=Ajtd3CjthKwJ7V3qtszHnv0FuF_hlxYnDNSu-Iqs7jo,1296 +torch/include/ATen/ops/_compute_linear_combination_cuda_dispatch.h,sha256=n3HM0-oJNiu5YSsbZ6YG8I8VgTIH4JjhZ8jE1yyBvcQ,1298 +torch/include/ATen/ops/_compute_linear_combination_native.h,sha256=za2Y3ia5OKIs36aqoDm1ag4Dbsjb3C8kt3s_Z30Gnno,918 +torch/include/ATen/ops/_compute_linear_combination_ops.h,sha256=5jNsiFzBxgyO9_odc7t1rhyTzuud2mtonfsG9oThVXg,2147 +torch/include/ATen/ops/_conj.h,sha256=Vqqr4_E1xNeHHWsjX6zD5djPF0Xax7K-aDugkARvXVw,893 +torch/include/ATen/ops/_conj_compositeexplicitautograd_dispatch.h,sha256=4OMPve0UexbWAY6l-772oFDMRBkiSbsdRzvioc4IXBk,1017 +torch/include/ATen/ops/_conj_copy.h,sha256=YhalmUTfwScRx01_Ywimk54DfAryQyWWdrFWJN9XKms,1321 +torch/include/ATen/ops/_conj_copy_compositeexplicitautograd_dispatch.h,sha256=EJc9ItHLNPpT3LSrqgX7PVEfvD6qT3zYODWbmMar30Y,1129 +torch/include/ATen/ops/_conj_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=CsDc8Mfo_u67sRUvY9K4tWqghj8hhltsiyODNkkw_Pg,1048 +torch/include/ATen/ops/_conj_copy_native.h,sha256=9f_Okj59riaDKjCf-0kYFu0o4xb_IsFG7A48r6Iq_b0,816 +torch/include/ATen/ops/_conj_copy_ops.h,sha256=D3FDjoHVKA4ftBmATHt-ZX4q3dfiHcUWgiM2sn0OHRE,1825 +torch/include/ATen/ops/_conj_native.h,sha256=cSdPVDZuBSqhVVlgYyL7uBIhg1d95B-J8PhC-wEPbbI,729 +torch/include/ATen/ops/_conj_ops.h,sha256=5FxQr6pCdhZw0fHu-A0LEMvh4q6CVTY0A9zi7dKJWj4,1214 +torch/include/ATen/ops/_conj_physical.h,sha256=UAzAku0g6WDKOs19vYlnNCOWjiRO6phZsMpVC7Xp9Jo,1361 +torch/include/ATen/ops/_conj_physical_compositeexplicitautograd_dispatch.h,sha256=M8f53piexBsVfRHMrzQE3sIzHbVfBXYAlfg-fcDcUiU,1199 +torch/include/ATen/ops/_conj_physical_native.h,sha256=hGW_VDV9utF3Y4DB4SP4FVqEstX82rQJVOfvgrKsQoQ,896 +torch/include/ATen/ops/_conj_physical_ops.h,sha256=121AJUJBjTeTuw4qPQfhhXC5lH8SWW9tRPhKtblECNs,1849 +torch/include/ATen/ops/_conv_depthwise2d.h,sha256=C0OEfvrPKN24-7iz1PVVb-nbajfwmtko7py41yx4Q04,7578 +torch/include/ATen/ops/_conv_depthwise2d_cuda_dispatch.h,sha256=9Uulq3grbRQKSzhRLMAyfJ6r32iAn7E9rg_F2ECCP_M,2517 +torch/include/ATen/ops/_conv_depthwise2d_native.h,sha256=TL4CMRMhGgk8vvIoeeKpkvZ9sJiN9ifBMBwdQwbVumQ,1184 +torch/include/ATen/ops/_conv_depthwise2d_ops.h,sha256=yYdFvBUWT4TWShQLvbDHSMmqCcj0ajzYv6aMTUt-XnA,3123 +torch/include/ATen/ops/_convert_indices_from_coo_to_csr.h,sha256=y6F5QIzN4lmg88sOsLH-AkL7Orbx-j-EhYl2MRTojfw,1793 +torch/include/ATen/ops/_convert_indices_from_coo_to_csr_compositeexplicitautogradnonfunctional_dispatch.h,sha256=VmRCUDmcdWiwHnyO89Q0-0KFFSKTTxjXHa1jED7qj3k,1106 +torch/include/ATen/ops/_convert_indices_from_coo_to_csr_cpu_dispatch.h,sha256=5ZLNV4BXw96cIfwPGyO9CguDVHrq521NOnFEn_zjgiI,1311 +torch/include/ATen/ops/_convert_indices_from_coo_to_csr_cuda_dispatch.h,sha256=uiCx_mveYp1ax36n22hj-r4_tc7CQWCJq9NnG_mNpfo,1313 +torch/include/ATen/ops/_convert_indices_from_coo_to_csr_meta.h,sha256=rvq_cGMN7RQoAGSrq9n6DoukTAlHCW6sTY2CNpDxcmY,877 +torch/include/ATen/ops/_convert_indices_from_coo_to_csr_meta_dispatch.h,sha256=B0k5XWC6aDpEwJ77xLG2u7jnHFyPZRALFHIJKTqjWls,1313 +torch/include/ATen/ops/_convert_indices_from_coo_to_csr_native.h,sha256=QWU5T6PNeQBX1BthUMVammhscFQaN9cyzlAAZBqtqcg,1204 +torch/include/ATen/ops/_convert_indices_from_coo_to_csr_ops.h,sha256=Sm5n8A2hp3wijgyR5nWiJ3eSbVPVRz4VijSRvWU0Ldw,2174 +torch/include/ATen/ops/_convert_indices_from_csr_to_coo.h,sha256=OD3B0dwhrRbq1itJQCDaJgWFXs-9pMgW-DdYKGdMK8c,2129 +torch/include/ATen/ops/_convert_indices_from_csr_to_coo_compositeexplicitautogradnonfunctional_dispatch.h,sha256=OFI4r1IM6gYL2h4JCpPY6IRP9lQeJXqbLbQYdicR6Io,1154 +torch/include/ATen/ops/_convert_indices_from_csr_to_coo_cpu_dispatch.h,sha256=PtqQQ5ubZTicTR3kKiaq4JaZXmsJF4hDfLaYh0HQDAg,1449 +torch/include/ATen/ops/_convert_indices_from_csr_to_coo_cuda_dispatch.h,sha256=G8ScbUetSbvFVF8KdWrbfxHITiJRT6RTbmLGRbKOZFY,1451 +torch/include/ATen/ops/_convert_indices_from_csr_to_coo_meta.h,sha256=pxEZUmYTv3XycK7htukyU_bdTD60FgF07sqFbZsmfV0,919 +torch/include/ATen/ops/_convert_indices_from_csr_to_coo_meta_dispatch.h,sha256=Vm331Z7hvxirfJqdEL6u-yqpsFexuH-rFxiljX3tykE,1451 +torch/include/ATen/ops/_convert_indices_from_csr_to_coo_native.h,sha256=-LZJCtnRrdBLa_fh8xvNfTBLf7zt5h_d-yKlWMN-rWk,1288 +torch/include/ATen/ops/_convert_indices_from_csr_to_coo_ops.h,sha256=q43U78gVKNtouUgPVdjU2Nc_0N8ltIc4HVbTowJEI3k,2456 +torch/include/ATen/ops/_convert_weight_to_int4pack.h,sha256=clAs63Ym8Z6fS3RV8yWCkVEK8mDwiMObipkHT7vMPkI,1026 +torch/include/ATen/ops/_convert_weight_to_int4pack_cuda_dispatch.h,sha256=gJmUQtj4btzKA71uQALoSxcB5SwejJG2Q3xO52a-ckI,1018 +torch/include/ATen/ops/_convert_weight_to_int4pack_for_cpu.h,sha256=PJ2yIS77nZIuJqeA3BcjL34HWF4ysq_Y6tGAPuF9rQ0,1058 +torch/include/ATen/ops/_convert_weight_to_int4pack_for_cpu_cpu_dispatch.h,sha256=crWsYSxqmoCOgj5VOWoUkp0BrW78R2p415tGkKKqbNw,1024 +torch/include/ATen/ops/_convert_weight_to_int4pack_for_cpu_native.h,sha256=fofPdIl8fBJmdddCQzyaWX5VdRTwHnmRwubMte4H8Iw,776 +torch/include/ATen/ops/_convert_weight_to_int4pack_for_cpu_ops.h,sha256=Gxq8mfMMczVVXCyf6VqX4ZQRSXQkW7gHRRc66fxleME,1366 +torch/include/ATen/ops/_convert_weight_to_int4pack_native.h,sha256=sHaYxqPr2SWJb74zbpqL2ECuKgYS8DM0duAQvoOZoQ4,777 +torch/include/ATen/ops/_convert_weight_to_int4pack_ops.h,sha256=Y2bhIULr9GBS96v9m3HKWvZ2pVT1--siycwbmwVLJsc,1342 +torch/include/ATen/ops/_convolution.h,sha256=3auCvvpmqx0E3g1ByQB-sVS1IW-ZD0PL6iNAv0ZMjQw,13232 +torch/include/ATen/ops/_convolution_compositeexplicitautograd_dispatch.h,sha256=RvzdIzZAg8olya3lONwzCC9NhoYy-tIOMqUOV4UZ2nY,3201 +torch/include/ATen/ops/_convolution_compositeimplicitautograd_dispatch.h,sha256=n4Gk9OcpOYERvsmJ7rj3OEujPyFnkf7ROxCQM60UPKA,1639 +torch/include/ATen/ops/_convolution_double_backward.h,sha256=_d8lQqr7QeWHcW49ZgkF2UUO0ZAnt21semHW6hj0Hac,4289 +torch/include/ATen/ops/_convolution_double_backward_compositeimplicitautograd_dispatch.h,sha256=3MP4QuWcx5N9tIwlsCMWFPizxWU_9tOB6EqZPke0rcY,1909 +torch/include/ATen/ops/_convolution_double_backward_native.h,sha256=CL3sWzZYuj-thybC1EDA25szJppDWRK1kiT44Dad_TU,1135 +torch/include/ATen/ops/_convolution_double_backward_ops.h,sha256=Yf4rrQMZlDleevdEdS2ANOAslAl1CXyrKw23BTbNpsM,2610 +torch/include/ATen/ops/_convolution_mode.h,sha256=6nDUoGLHi7vHwEA6IdaZNOvGZo4oM-hoL4u0NB5_To8,2710 +torch/include/ATen/ops/_convolution_mode_compositeimplicitautograd_dispatch.h,sha256=I-SFmVpM5P64X59qw_lyf9ORMJxhijOyg_2fwCp8xhU,1437 +torch/include/ATen/ops/_convolution_mode_native.h,sha256=mrxLJmT8HQZMGokfQ2KF3eI2tOhfyOgUS7bvYKEhDo0,922 +torch/include/ATen/ops/_convolution_mode_ops.h,sha256=jXbkXUt0XhqpcV1ICWfbrbyIjjkGxIEHuqiJDuPr3nA,1816 +torch/include/ATen/ops/_convolution_native.h,sha256=6mrBYsun3KF8GVe1iQQ5SAIzeWW7_fRe3rAxle4Rv0E,1739 +torch/include/ATen/ops/_convolution_ops.h,sha256=Bd3M7Ww3z4Kxa8QKSsmLE4ZRjxkwccGlGCEX8kL2Vxk,5327 +torch/include/ATen/ops/_copy_from.h,sha256=pDJW1q2oJddNVYBbH6Khi-D7WoSraBu1TGAVyUSd30g,1630 +torch/include/ATen/ops/_copy_from_and_resize.h,sha256=8udbMt8r-DoM-Y6YFXn86kUXPUDM7CWC5ScKD4Hu-i0,1554 +torch/include/ATen/ops/_copy_from_and_resize_compositeexplicitautograd_dispatch.h,sha256=szedXNusDjSX5t-Cfxz24hTN54tB7dZjQM_33L22_bU,1199 +torch/include/ATen/ops/_copy_from_and_resize_native.h,sha256=PaLHyphbbxbd2eQ2tttTnUOiHrbrk69slap1McuzECk,793 +torch/include/ATen/ops/_copy_from_and_resize_ops.h,sha256=Q02ezptAzTTRSotMbaOPosW5f4tywYkVh8AaNce9hyw,2051 +torch/include/ATen/ops/_copy_from_compositeexplicitautograd_dispatch.h,sha256=i7_6r8WmqkVWCVKVT3UEKUZgZsfOVs2xZq2lYzVih-M,1221 +torch/include/ATen/ops/_copy_from_native.h,sha256=pt_tBlRzrTiWX2DFeXj5EOUMYVpmAE7HQ-tJTaiCfbE,801 +torch/include/ATen/ops/_copy_from_ops.h,sha256=Tsegewq3PeolieA3ynHK8vmbye625Pqivg9xkEifdeo,2123 +torch/include/ATen/ops/_cslt_compress.h,sha256=qTrF7uvH9q7PXTCMyHWuk1qL6qTgeTmZR3cJMLaJOX0,926 +torch/include/ATen/ops/_cslt_compress_cuda_dispatch.h,sha256=-4ZSi06rU-L55Wu-8LxXTGr1u2MRItxo1eTvYFqIUUw,985 +torch/include/ATen/ops/_cslt_compress_native.h,sha256=BVEnYUmbQpcKk4i1_zxkR6YUlJT4vigw2U2qIOs5UFI,739 +torch/include/ATen/ops/_cslt_compress_ops.h,sha256=D7Nqx2ZSGn8r36tFVtnLFiSwPIqSZY-blp9NN_1IqKs,1238 +torch/include/ATen/ops/_cslt_sparse_mm.h,sha256=rA6OUpZpjv6ARg30nrq9Lh4nQkmvro_qW7-n-EqXWnU,1463 +torch/include/ATen/ops/_cslt_sparse_mm_cuda_dispatch.h,sha256=V8DiN2dfGhFs20FPkM3fUg1M3RVeMvwku0E0O9cMX_w,1261 +torch/include/ATen/ops/_cslt_sparse_mm_native.h,sha256=AeTRHqCUFWaIyYf_fjTt465KRij9hzYkBiFCgG1HCis,1015 +torch/include/ATen/ops/_cslt_sparse_mm_ops.h,sha256=shSaNCBa5K1zQL-Lpy77l9BLIO_-TLnhOU-Pwr3TFIo,2052 +torch/include/ATen/ops/_cslt_sparse_mm_search.h,sha256=6GtENsF_a2eXdkQdYHcgrM3j8JwI5SGFofE3qwZYTNI,1342 +torch/include/ATen/ops/_cslt_sparse_mm_search_cuda_dispatch.h,sha256=dJGjzjCsXvBaKotlwl4dh59LIpwvvMatDzMAMeYj_uE,1203 +torch/include/ATen/ops/_cslt_sparse_mm_search_native.h,sha256=lEuNQVGKAsgM_Ciii5MKDfEmUbZQMOwPRrNCQ1QoxBo,957 +torch/include/ATen/ops/_cslt_sparse_mm_search_ops.h,sha256=zDzWYINV3cnFXCAdvJ0uuS4u1niPwzkAtbhp01aN4XM,1874 +torch/include/ATen/ops/_ctc_loss.h,sha256=hxqHNrx2XCzsh66yks_dGkvo4bEA4FcAcGzq118kASg,4181 +torch/include/ATen/ops/_ctc_loss_backward.h,sha256=u1xL7bKDbN5I5eTm8rUzI6zyuUbN_me-rLhhfQ2SydU,3564 +torch/include/ATen/ops/_ctc_loss_backward_compositeexplicitautograd_dispatch.h,sha256=2uAknJCSIhVo3l3yqkkkZVwdg1DNGrJum5d75uG5iPA,1601 +torch/include/ATen/ops/_ctc_loss_backward_cpu_dispatch.h,sha256=tQvxXUJqOC1khhpyuUIGPUWnQ6SWxecCYjIwQOVtZc8,1520 +torch/include/ATen/ops/_ctc_loss_backward_cuda_dispatch.h,sha256=1hqPL0Pc8KUXJqwBpqzgAV7dRyMuNTflUjKV8j4PC40,1522 +torch/include/ATen/ops/_ctc_loss_backward_native.h,sha256=juUH-nqtsgW7cIcVMVXgXkCAnAhofVIWRQBn5Kkko-I,1900 +torch/include/ATen/ops/_ctc_loss_backward_ops.h,sha256=YccJeFoP1gQ4g4FYGH2SgrzWNndJGCUWtJSklpt_ZZc,4663 +torch/include/ATen/ops/_ctc_loss_compositeexplicitautograd_dispatch.h,sha256=J_4ShbyWtk3RubHjuPFhcXKC9VWBxiyFCAVF7kTSnC8,2030 +torch/include/ATen/ops/_ctc_loss_cpu_dispatch.h,sha256=KRPTeCeJ9nWdgK-FIsvmqvtJLCmb2JQEzJF4ccKHRTw,1368 +torch/include/ATen/ops/_ctc_loss_cuda_dispatch.h,sha256=E_GQ51VdoSHuIIKCyK7LxSCgzWZJRzoQY9-jnVB6DPk,1370 +torch/include/ATen/ops/_ctc_loss_meta_dispatch.h,sha256=W73IJbx1BT4OC9yeF9BaqQcoBMVRPh5mOs3xHts0BsU,1143 +torch/include/ATen/ops/_ctc_loss_native.h,sha256=fNlM1OaZdffvlgiTUrFeLjTKVGOjCrBij_u3E6PTKCE,2113 +torch/include/ATen/ops/_ctc_loss_ops.h,sha256=0Xd4cwR12xsf0ltk6FvnLMLqv3Sbk0WCrG3w-M-55jw,5248 +torch/include/ATen/ops/_cudnn_attention_backward.h,sha256=OzaadgOnD2VVZiUKo3Lyt_iqSDQic3fJLhYMGZD31Dg,4508 +torch/include/ATen/ops/_cudnn_attention_backward_cuda_dispatch.h,sha256=q6zIR38mHzaY9eH71ozTOv8-WLEtkgvGBzKwi1qG1LA,1955 +torch/include/ATen/ops/_cudnn_attention_backward_native.h,sha256=Pft_AcyOQgxgw521KMUZCuWryx9HfL91NwHt5YH9LSw,1185 +torch/include/ATen/ops/_cudnn_attention_backward_ops.h,sha256=lVenysf5Um5_aGWv2dOruaDNlyRa9qupWbQdQvW2w2w,2698 +torch/include/ATen/ops/_cudnn_attention_forward.h,sha256=5_S-T8gLDVuW-caVmoMd9-GZC3_FvCILyPiCOVujBfY,4813 +torch/include/ATen/ops/_cudnn_attention_forward_cuda_dispatch.h,sha256=Hjy-36-6VPpw3tkNwDfyZQ5yOcmme4XglCA85gaCTwg,2023 +torch/include/ATen/ops/_cudnn_attention_forward_native.h,sha256=VihKiFlWz6FNxMtdCANtMMemSWBI1jrUpbNteZL1Vdc,1219 +torch/include/ATen/ops/_cudnn_attention_forward_ops.h,sha256=s9FVwOIk1ivS3zb_N3JIR1mWZyQSJJz9OHl03avptGM,2882 +torch/include/ATen/ops/_cudnn_ctc_loss.h,sha256=nAgADceZjhVsA8XgoLe_q4TXhMHovuw3J8dwKdKNc3E,3189 +torch/include/ATen/ops/_cudnn_ctc_loss_compositeexplicitautograd_dispatch.h,sha256=QUF-5of97XiGsDqL_h7KL5v2ctGfv33TFhJDb5du2ig,1535 +torch/include/ATen/ops/_cudnn_ctc_loss_cuda_dispatch.h,sha256=43FN93b7zLxCw3N6jX4fuJWnBH9mTsKpSGRBS69isVg,1406 +torch/include/ATen/ops/_cudnn_ctc_loss_native.h,sha256=t8ayfKbh2QizjHxt0cC6XVyqJel7eCDlYs7GUfHowhg,1452 +torch/include/ATen/ops/_cudnn_ctc_loss_ops.h,sha256=KCpHIHOnTUt7cdvEnBctpoosuhCRLo94PbFqkgpDXsw,4235 +torch/include/ATen/ops/_cudnn_init_dropout_state.h,sha256=hJyo-naI6KsTKGSZa7rnxrdCfReBPfUrqLydQB7XyaI,2503 +torch/include/ATen/ops/_cudnn_init_dropout_state_compositeexplicitautograd_dispatch.h,sha256=yJLLK4yefNBK9RGsZHCpqOQhl2sO2FvSrrC6JWPvwQ0,1209 +torch/include/ATen/ops/_cudnn_init_dropout_state_cuda_dispatch.h,sha256=L4EaPrI__6ShcU5YaHpCAmg258C3ztxYCJu8crGAx7o,1290 +torch/include/ATen/ops/_cudnn_init_dropout_state_native.h,sha256=R9LqorAehoTFWS2kVkzOlacz9BLhdw-5S6oTnlIcjgw,1053 +torch/include/ATen/ops/_cudnn_init_dropout_state_ops.h,sha256=h7vcoHuTjB8Oqx25E9AVZgFtQ42SeoQOF_weLiUgtmk,2582 +torch/include/ATen/ops/_cudnn_rnn.h,sha256=_9h24m4R8CcUzV-oHQLwwFYs4Q95c8n7hMLN2QhSqJA,13597 +torch/include/ATen/ops/_cudnn_rnn_backward.h,sha256=6MPc7MQ7WB-Ypc3lQMlyPhK_vXZmMJKXBqwOON6jFnA,16712 +torch/include/ATen/ops/_cudnn_rnn_backward_compositeexplicitautograd_dispatch.h,sha256=CFMxzWsbRdZ9YCESUaleDp_ayJ9MTKN9lzbkbJh4fNI,3936 +torch/include/ATen/ops/_cudnn_rnn_backward_cuda_dispatch.h,sha256=N7ysay-6ViX1RxiO16TF4se-Xd6fQwPFN9tCh2srPMM,2379 +torch/include/ATen/ops/_cudnn_rnn_backward_native.h,sha256=ArkPkbugVJfW10oONGQ4fye0_h8ZBNfdAREow9YnJpw,2147 +torch/include/ATen/ops/_cudnn_rnn_backward_ops.h,sha256=dGt8jwIWS-bugalOABRzrWhHWJsPjI0t76u0XD-ow68,6215 +torch/include/ATen/ops/_cudnn_rnn_compositeexplicitautograd_dispatch.h,sha256=QaQv-hyg1U9y1OD0MHC3KIE7CfeSWm5tWQItG93kXyU,3420 +torch/include/ATen/ops/_cudnn_rnn_cuda_dispatch.h,sha256=oOwpaV-RHiGDcH1m4bxFuzCb5FNP7ZOF75eG11f9LdU,1931 +torch/include/ATen/ops/_cudnn_rnn_flatten_weight.h,sha256=og2KovZnaRrnbEBQCeLPCrS6k3QrX8BqdyzGofik1vw,7838 +torch/include/ATen/ops/_cudnn_rnn_flatten_weight_compositeexplicitautograd_dispatch.h,sha256=rn5EvbHxUswehYnNUjm4pYYU6zHyKsSZ-fgv_zuRgvg,2024 +torch/include/ATen/ops/_cudnn_rnn_flatten_weight_cuda_dispatch.h,sha256=w3407R86rGJiE-XL5WyNj_LtIp9fm06qw9Mc5Ml8ofc,1403 +torch/include/ATen/ops/_cudnn_rnn_flatten_weight_native.h,sha256=9284SeZWDMCOh2OfqWpZ-CpBv5St7tRtN7ls-Hp94Os,1181 +torch/include/ATen/ops/_cudnn_rnn_flatten_weight_ops.h,sha256=4cFcdJbq7Kuz_C6gweag5kOBVaANNuw4T-NkvzVC7GY,3041 +torch/include/ATen/ops/_cudnn_rnn_native.h,sha256=jL4LxWlkeT7ys_3vy-kp2fOXnqYSzjLCgnlhPn3RGXo,1794 +torch/include/ATen/ops/_cudnn_rnn_ops.h,sha256=OsVPj2AqRBfeDWxugUUFiHMQsu-yhkqm6zjLDgNMSVU,5128 +torch/include/ATen/ops/_cufft_clear_plan_cache.h,sha256=ZZC4WBBuxAITnBhD3UGB2VPGk4ia-1DFGbpZLo35VKg,975 +torch/include/ATen/ops/_cufft_clear_plan_cache_compositeimplicitautograd_dispatch.h,sha256=wOA17ABLp4_Lu5R6ILOdAtI5OmsloBxhosD3WlKWcrc,1034 +torch/include/ATen/ops/_cufft_clear_plan_cache_native.h,sha256=U4chjMHkmSw1chMIPO4BhjQIEkHCHjST8CG39bYnQB4,746 +torch/include/ATen/ops/_cufft_clear_plan_cache_ops.h,sha256=gGAH1J-EfcXJ48t_8DdFIycDDb2AGMSDnBsSsLgQI2Y,1260 +torch/include/ATen/ops/_cufft_get_plan_cache_max_size.h,sha256=ymozapyrEoZqfcAXp5J7jTrIw_LLlaTlfhncSVwIP4g,1007 +torch/include/ATen/ops/_cufft_get_plan_cache_max_size_compositeimplicitautograd_dispatch.h,sha256=q4bkX5P29uU9IzWHj-cuI6568WwK9euGiKAzf1kOOtE,1044 +torch/include/ATen/ops/_cufft_get_plan_cache_max_size_native.h,sha256=TjXJSwsOzS6vRXxtyjVIqgla6PzeCkQ5SF_IH6GmepU,756 +torch/include/ATen/ops/_cufft_get_plan_cache_max_size_ops.h,sha256=verPE2PINzX8oiC3hknhMJr2RZZPeVkF3izyGwu97QI,1291 +torch/include/ATen/ops/_cufft_get_plan_cache_size.h,sha256=-EZ0PTwuwqcKBzjmPNwhs9QTxm5DDcCXqX9UJhnjfEo,991 +torch/include/ATen/ops/_cufft_get_plan_cache_size_compositeimplicitautograd_dispatch.h,sha256=W_Wt4a9r0eAvQL0OC2ffXdx452RU3VzAdgiAIdcNhB0,1040 +torch/include/ATen/ops/_cufft_get_plan_cache_size_native.h,sha256=dSzhi1Y4jkQDuh-6EkfJrrx_qyq7-IhhErI5eqa9KKs,752 +torch/include/ATen/ops/_cufft_get_plan_cache_size_ops.h,sha256=ZC1gL0T01MAIPte9nPZaXdyxpJf-XiVNowkwwI6DPqA,1279 +torch/include/ATen/ops/_cufft_set_plan_cache_max_size.h,sha256=ys2B7AIeGCnoyZYwz-YzO3vrJrm4R7yUW9RRDT1XIq4,1045 +torch/include/ATen/ops/_cufft_set_plan_cache_max_size_compositeimplicitautograd_dispatch.h,sha256=OVP6gALGbiO_BxkxjJc4sxI7E76r93VeNTw4cDe1WyY,1059 +torch/include/ATen/ops/_cufft_set_plan_cache_max_size_native.h,sha256=FL4dZmSLhg_7xhR_G5oPKtnMytQg2ABKzeI6-F9SDBo,771 +torch/include/ATen/ops/_cufft_set_plan_cache_max_size_ops.h,sha256=qBoYdkhCWS5ENVpJkHdkRygcmWd9Mphs0Xb5CQFyshg,1340 +torch/include/ATen/ops/_cummax_helper.h,sha256=It9F836ziJSYsDsAu3h5vhtS96tV00nKbAXmVNudlZk,1039 +torch/include/ATen/ops/_cummax_helper_cpu_dispatch.h,sha256=IVGL2jYSDP2txe08RD30GyVr-Joo4ufuyLS8rAGqgco,1032 +torch/include/ATen/ops/_cummax_helper_cuda_dispatch.h,sha256=UO02t4HF8bfgXL1HiyN4RZfmFOFLhjDzC8aUVGSAbC0,1034 +torch/include/ATen/ops/_cummax_helper_native.h,sha256=_VR9YcSzmE9UpdqgSPKylv6EPl26ktrXnd-wF3ncR30,907 +torch/include/ATen/ops/_cummax_helper_ops.h,sha256=oLOa9MUc5Q6huIoOqhNlIhwBotGQESnN_wanw74ZOho,1410 +torch/include/ATen/ops/_cummin_helper.h,sha256=yCIFnbdBIL9rlO4WMGLvLGky01t-W6bdl6CR9MVUgyo,1039 +torch/include/ATen/ops/_cummin_helper_cpu_dispatch.h,sha256=pnqYF6bxThbn_3IHjfnKIN74MR_RtOKO9oEmaKar9ms,1032 +torch/include/ATen/ops/_cummin_helper_cuda_dispatch.h,sha256=nefInjgToYo5_bj36-LOtSx9T37hpZMeQ2SI8rKjmLE,1034 +torch/include/ATen/ops/_cummin_helper_native.h,sha256=k8EbJNzgjSXf6StEOvgBtLEiXnpfpYbaPZHT_wlEpD4,907 +torch/include/ATen/ops/_cummin_helper_ops.h,sha256=jKAW2klA7MjFUFLwEHVRx513RWunsmuks3YaTxNUmhU,1410 +torch/include/ATen/ops/_debug_has_internal_overlap.h,sha256=odlifVaXZdMqmkcQJM9kDLSfKG2ZBFhOJm8vJeQvIpE,969 +torch/include/ATen/ops/_debug_has_internal_overlap_compositeimplicitautograd_dispatch.h,sha256=zo2r-ziwiqKyQ7JB07Ow84GWmPfAg1Qvll8Ks_d2mEc,1036 +torch/include/ATen/ops/_debug_has_internal_overlap_native.h,sha256=uGLy0kkJHzgaU-PulXTxQFvXvU9cwpPqqYFpXFFtwBQ,748 +torch/include/ATen/ops/_debug_has_internal_overlap_ops.h,sha256=s7zczZwzKw_Gm3OtriKUFNXbjwytoVgLTC3CYJ6Pww8,1262 +torch/include/ATen/ops/_dimI.h,sha256=Cx62L7zqnJ3TIcWzT69IrOdxL_-hkuSRqRjgnSLDbeY,756 +torch/include/ATen/ops/_dimI_native.h,sha256=F-t3aPIhLO10H32AqEO27rLoWvHcJ512pSK09Lwqf0Q,738 +torch/include/ATen/ops/_dimI_ops.h,sha256=4vxt9zoyzka_YA9uy_anw9wmijp3z26o8PuIHPurx14,1196 +torch/include/ATen/ops/_dimV.h,sha256=IF5xJLSAwkwPmFgMeiU6WJSbbfKRYDx97L4VipjK3oE,756 +torch/include/ATen/ops/_dimV_native.h,sha256=U0yalBhDzUVuQ-E1QnVSH2smn3nJnlRO9BQKsIhxh2g,737 +torch/include/ATen/ops/_dimV_ops.h,sha256=LNnX6fTC8jG_IaO9S9h9gvy9Dh_6Z0jVzdPcPdW7VEw,1196 +torch/include/ATen/ops/_dim_arange.h,sha256=50Va0IxTAjs9UPuOA2qHugOTRDEws_xgbPkmmtagkXo,938 +torch/include/ATen/ops/_dim_arange_compositeimplicitautograd_dispatch.h,sha256=ojMc5z0W0_9nRgI4KCcTUl4Qp_tqlvG5W3lZhiBQoIk,1036 +torch/include/ATen/ops/_dim_arange_native.h,sha256=-3e4A0sXzfZB-y8gvGbG1S2hR2cCd2Jkk2IfPX5LmZw,748 +torch/include/ATen/ops/_dim_arange_ops.h,sha256=CEremvxrEYml_NqzZWqzxEEfxKgxzf4Zdfsh6rt-XZw,1270 +torch/include/ATen/ops/_dirichlet_grad.h,sha256=qVuIXEe_nijryVN3K2HAk-1VC_OuNvXOL5IVka31vuU,1626 +torch/include/ATen/ops/_dirichlet_grad_compositeexplicitautograd_dispatch.h,sha256=H65Fllj3pol3go4cBOxdqHp83gWtZcuQg5sVoIO-_XU,1237 +torch/include/ATen/ops/_dirichlet_grad_cpu_dispatch.h,sha256=eav3KrAAS2FUim-nebCTnIUlOTi6NDujp_H4d6Lyrtg,1032 +torch/include/ATen/ops/_dirichlet_grad_cuda_dispatch.h,sha256=UzHzrCRJz4w4X1V9ZA31goGMmICizge_g3a-bqLSmmk,1034 +torch/include/ATen/ops/_dirichlet_grad_native.h,sha256=aTVnxksJA3NbWO4yqmcYulnZtBHcS5XaOdvnheFCJN0,1045 +torch/include/ATen/ops/_dirichlet_grad_ops.h,sha256=mb88CbtgAAbY3N4Z4CsjQosY1eFQA6xtnmT4_izMyds,2181 +torch/include/ATen/ops/_dyn_quant_matmul_4bit.h,sha256=CuW3ucyBZkGAhBw5J0hkKjYpPNeiwcWlgJjwCaLBuJ8,1179 +torch/include/ATen/ops/_dyn_quant_matmul_4bit_cpu_dispatch.h,sha256=Jjg6SbeD7EUpzv8XCiOPghwl4Z_sABrMi1DhE6bN1qw,1087 +torch/include/ATen/ops/_dyn_quant_matmul_4bit_native.h,sha256=_FtksKJhpqqFkrluXxrkEo4WcTD5I6-oOm95b_lcSgE,847 +torch/include/ATen/ops/_dyn_quant_matmul_4bit_ops.h,sha256=G0eRfu340uhLQkecwQKJukV7-awcYgov1QWmvh3BHmA,1573 +torch/include/ATen/ops/_dyn_quant_pack_4bit_weight.h,sha256=OWObLMDe7Ux7PbzSrIWLOpNxLgQ7CIdUS9KiUwKy7Vs,1267 +torch/include/ATen/ops/_dyn_quant_pack_4bit_weight_cpu_dispatch.h,sha256=ayVeu3na6MVdsyTDNMipiAX2i6sSh0sb95M6tL9otNs,1136 +torch/include/ATen/ops/_dyn_quant_pack_4bit_weight_native.h,sha256=iKQkYVRsHNGiZcNE4VxWBhw041_sMsPnITh-tPiJrCs,896 +torch/include/ATen/ops/_dyn_quant_pack_4bit_weight_ops.h,sha256=M7LD3PzL9U0gzWKlCzjkaPjTdMF9Uyn01j1rrDZh7LY,1729 +torch/include/ATen/ops/_efficient_attention_backward.h,sha256=MVnKPjlpEf1wKxVC9sxhBJEE-mJEO0uVARpmiWSZE0U,6238 +torch/include/ATen/ops/_efficient_attention_backward_cuda_dispatch.h,sha256=XUMj2TNH42Yvw8D9qbMWrfsO2BtLCPNYCTbaUpwAxKA,2475 +torch/include/ATen/ops/_efficient_attention_backward_native.h,sha256=z-V_tH8B6yhH9-V3kG3ICw_SVEHq9ELxt1I3Py5q_54,1445 +torch/include/ATen/ops/_efficient_attention_backward_ops.h,sha256=bFYFkY5NCtNsdoGpWbuiF7_IMoywCFzvku0fRp4pJrk,3420 +torch/include/ATen/ops/_efficient_attention_forward.h,sha256=cHYPjuU2GxQWwCC__rLYYf3B6l7TySf6lL--kSlQ5fs,5659 +torch/include/ATen/ops/_efficient_attention_forward_cuda_dispatch.h,sha256=9tQLaJ59jwwgUFhcu94KMcLh1gccpfUL6jRqcsSVEbQ,2219 +torch/include/ATen/ops/_efficient_attention_forward_native.h,sha256=BZIphbOtsVo6Q6Au_hR3uw9-B8bAdNVRr3XhXmaPWGY,1317 +torch/include/ATen/ops/_efficient_attention_forward_ops.h,sha256=TFeiO38vvhRifGl0mHDKdrwgeSLnsBaUSUXXCcax1RQ,3128 +torch/include/ATen/ops/_efficientzerotensor.h,sha256=9Q3R0P_EnmdX27hy_SMN5Rmb6c7BI7RbmF90YUy1Ve8,6294 +torch/include/ATen/ops/_efficientzerotensor_compositeexplicitautograd_dispatch.h,sha256=62zWmeMSVAC7xEYI0lbcK_OcGfjpwdV2JoUGjJLAeJA,1344 +torch/include/ATen/ops/_efficientzerotensor_cpu_dispatch.h,sha256=eFrsnXh8Ehz0nrZV-_u6lemsOo6FKIyv0tGjh4KIrTM,1552 +torch/include/ATen/ops/_efficientzerotensor_cuda_dispatch.h,sha256=E0jAaKF067A7ehNcSxkc_u5AXoDKs4JtEtCH1z-P4Tk,1554 +torch/include/ATen/ops/_efficientzerotensor_meta_dispatch.h,sha256=vdpSqeBXNIufJ0E2f8-rv8TuvBJWVN9dXT3tRC09HFk,1554 +torch/include/ATen/ops/_efficientzerotensor_native.h,sha256=5AnXWOnBkqQTlT8ELj0pIkiilGQpymcEveELZK9ojZI,1463 +torch/include/ATen/ops/_efficientzerotensor_ops.h,sha256=x01MQTGXpxy5CDpFEVs7x8AWz334sWa5kO2BFvEysmU,2391 +torch/include/ATen/ops/_embedding_bag.h,sha256=-GZ6pdJ7VgIklM6PjzNeDYFvkzqJYWGf-eTzh4h6I-s,3432 +torch/include/ATen/ops/_embedding_bag_backward.h,sha256=NJ5Sw_KxRhU2G5PQ9K6vzVdOF50ckh515nyxreWBdpI,3804 +torch/include/ATen/ops/_embedding_bag_backward_cpu_dispatch.h,sha256=xrvnd9GImT7-v44gRFBCb6n6xZq6obYA53ChV4_hOsM,1683 +torch/include/ATen/ops/_embedding_bag_backward_cuda_dispatch.h,sha256=r6CUqnPsatki51BarUvtr6xAWm8WcNFQbUC8PaCSxw8,1685 +torch/include/ATen/ops/_embedding_bag_backward_native.h,sha256=Rw7xGFq0385Y4ggVKNRLcG0lj-biH2ROXCNLdYHUuVY,1063 +torch/include/ATen/ops/_embedding_bag_backward_ops.h,sha256=blLpnpU2cq60urzf8zbibegGVMcb6Qt0RKCzzdpT6IM,2262 +torch/include/ATen/ops/_embedding_bag_compositeexplicitautograd_dispatch.h,sha256=FNXwLTAmUkwgJGN9YQF5fB1hLRRc7vWY-QIGCo_GjvQ,1811 +torch/include/ATen/ops/_embedding_bag_cpu_dispatch.h,sha256=ZhCQc6e_4m0iLXZ6i_5YK7qfInVIBFYxbvX7fYmfUbc,1268 +torch/include/ATen/ops/_embedding_bag_cuda_dispatch.h,sha256=Sl9BH3udbP7b-wuLZEMULarvWIlfGJbsMbnnvQvWJak,1270 +torch/include/ATen/ops/_embedding_bag_dense_backward.h,sha256=MJSUI3hNDGkQ4jOCT-wmy4KkvYuvOVxripcHn6CcrlI,9546 +torch/include/ATen/ops/_embedding_bag_dense_backward_compositeexplicitautograd_dispatch.h,sha256=GhgIbw42JGRTvNuZGxpzbVKzEw9VD0vPclbgKcM0l38,2442 +torch/include/ATen/ops/_embedding_bag_dense_backward_cpu_dispatch.h,sha256=TCeNyY4_qFGMftZ_qLcmDm1f1O1IP1G3HcovYrIqXNo,1613 +torch/include/ATen/ops/_embedding_bag_dense_backward_cuda_dispatch.h,sha256=_PbwxBjfEh-qskR82LUAzeIQZ5wLYj_N04g5ldWG7MM,1615 +torch/include/ATen/ops/_embedding_bag_dense_backward_native.h,sha256=Hd7SnZ--9ooRW_85oifDn6OxZjUh4V2v4k_8fXTRW0U,1740 +torch/include/ATen/ops/_embedding_bag_dense_backward_ops.h,sha256=FZ4L2Od9jrAEolD3GpLTayvlq6ZdodFC6ztaHaJOn4s,3665 +torch/include/ATen/ops/_embedding_bag_forward_only.h,sha256=GPYXLnAS0l-eWm6kC1GDRuP88GOSR0N85gvs9SlfPkI,3562 +torch/include/ATen/ops/_embedding_bag_forward_only_compositeexplicitautograd_dispatch.h,sha256=_gJsOl0wDQhQvNaINsHtYxiFiD8POIelOzsR9jp8WpQ,1837 +torch/include/ATen/ops/_embedding_bag_forward_only_cpu_dispatch.h,sha256=C-RFxQqYC3qxaAw_L3nI-5Meq7XEkog7f1aFZVWB3MI,1281 +torch/include/ATen/ops/_embedding_bag_forward_only_cuda_dispatch.h,sha256=0JYuvVYoH0XmTPHYi8uZBvtyGd_6nrEsh0F61cF8MDA,1283 +torch/include/ATen/ops/_embedding_bag_forward_only_native.h,sha256=mhpf3kXa4tEPOH-RFd3Ghd9WNCdDx4kcCDBBx8YGEWQ,1830 +torch/include/ATen/ops/_embedding_bag_forward_only_ops.h,sha256=xSvOM0TI-v7qDhQGdncW_XafU7OE1luBjcSqf4-YbX0,3941 +torch/include/ATen/ops/_embedding_bag_native.h,sha256=pzuBiDXZZG54qIbFmylElJwE-B1ipJqh9IcNTUURBVY,1791 +torch/include/ATen/ops/_embedding_bag_ops.h,sha256=3fSeu07m5HCNrXE_N-qWmgsumeUElpDwArGBXU8754g,3863 +torch/include/ATen/ops/_embedding_bag_per_sample_weights_backward.h,sha256=tdZxxvkkSwc2Jb7S9YvFKILki_tiMQ9wpJCGQvR7TC4,2553 +torch/include/ATen/ops/_embedding_bag_per_sample_weights_backward_compositeexplicitautograd_dispatch.h,sha256=ZLQt0xFlv_ahOMYd_m8hy_G417OIYgaPnPTKe6DsxY8,1494 +torch/include/ATen/ops/_embedding_bag_per_sample_weights_backward_cpu_dispatch.h,sha256=EL34PhlVUOCs10Mg9rVA04VaiUPeCXcjvV_ghLw-lMs,1162 +torch/include/ATen/ops/_embedding_bag_per_sample_weights_backward_cuda_dispatch.h,sha256=XDlOD1I-ZDH096Opw9HobMj-Groz_QlL9cde2gLoXRA,1164 +torch/include/ATen/ops/_embedding_bag_per_sample_weights_backward_native.h,sha256=c-uiha-2DiY0L0xGUm-6rT93mbeSbmhpqdyRV4Eezrs,1432 +torch/include/ATen/ops/_embedding_bag_per_sample_weights_backward_ops.h,sha256=s7sXZWM8OnhCiEAT2yZQynwZe8eYjV4OyHOLzEF9uGo,3001 +torch/include/ATen/ops/_embedding_bag_sparse_backward.h,sha256=NTiAVTGLW4GPfjzQK9AfaNx3f5GVREv4PXvhbsxgQx0,3511 +torch/include/ATen/ops/_embedding_bag_sparse_backward_compositeimplicitautograd_dispatch.h,sha256=IFx_v4S7J_8ckaT1Arct3PXxxCcsKcaJcP1B5x8VDJQ,1643 +torch/include/ATen/ops/_embedding_bag_sparse_backward_native.h,sha256=sTHY4G8VfeBT3T4umm7iMH9BqZvUdMd2RFjDSrhzZsk,1021 +torch/include/ATen/ops/_embedding_bag_sparse_backward_ops.h,sha256=oEmN4eprf_CxlAA5mkyEE2mNe3Oiq1ymUMBUY7Vujq0,2122 +torch/include/ATen/ops/_empty_affine_quantized.h,sha256=4LyPSMoy-FwF-uZCo7IQJABNhyhdV7qsP5CVtQ6T7lg,9473 +torch/include/ATen/ops/_empty_affine_quantized_compositeexplicitautograd_dispatch.h,sha256=q3f5beVH5kQqLp_jxFejar6YtvYHWZV10Jh3nsVCv84,1756 +torch/include/ATen/ops/_empty_affine_quantized_cpu_dispatch.h,sha256=GBzcPHvSRpDo25VOic0dD7fy8Gpe_ERxdYLzOslP5Zc,1964 +torch/include/ATen/ops/_empty_affine_quantized_native.h,sha256=NYKnX5S6yRHvhIgfNe2grdf14YXnw8iPOqUJrrq2QT0,1564 +torch/include/ATen/ops/_empty_affine_quantized_ops.h,sha256=DtaVTfee2CL_sHPG0k0J_UxU_iaclVymshoveaKdSzc,3005 +torch/include/ATen/ops/_empty_per_channel_affine_quantized.h,sha256=tCRs5RrCO7pd_KqtE87N1Im4nXUrUKg3u414CtRTVV0,10781 +torch/include/ATen/ops/_empty_per_channel_affine_quantized_compositeexplicitautograd_dispatch.h,sha256=eYsRCX0CCUEpUWIi7AYslCxR7D9lqgMyRvWmsUZ88XI,1952 +torch/include/ATen/ops/_empty_per_channel_affine_quantized_cpu_dispatch.h,sha256=PgAWsJGHWAp4Rk-WU6PbQgQ029gWZVJDfEOzo3ol3So,2160 +torch/include/ATen/ops/_empty_per_channel_affine_quantized_native.h,sha256=ReCG3ckv-uPpPWsZiqxRukdL-Rhslgof9X6OYAGz_x4,1709 +torch/include/ATen/ops/_empty_per_channel_affine_quantized_ops.h,sha256=c5QBjpab_cKDm7VxIb_s4fh9K5ht0xvu5i1hwSw2OlM,3321 +torch/include/ATen/ops/_euclidean_dist.h,sha256=XPELByV84weaRT5wb2NnFU19LlGbWMhDhNyVjltiY74,1467 +torch/include/ATen/ops/_euclidean_dist_compositeexplicitautograd_dispatch.h,sha256=st9pYJzsV0ja8IEEuPtQGB3nnpkYDPgxd6eaPdsn1Iw,1265 +torch/include/ATen/ops/_euclidean_dist_native.h,sha256=OPNt5RmKW-2qrLTNOLrY57bcgPiifNmmXJ-3RuDGYuQ,868 +torch/include/ATen/ops/_euclidean_dist_ops.h,sha256=J9XjRcmvZEkoR_slwFGZgXPIWlyyLWxmiWSLbyA3sa0,1997 +torch/include/ATen/ops/_fake_quantize_learnable_per_channel_affine.h,sha256=ZJGPuaSavLVzgpOG7gxbdNchhiQNE9_ybk001tPctyw,2514 +torch/include/ATen/ops/_fake_quantize_learnable_per_channel_affine_backward.h,sha256=hHw5MALf5AB_O3X5YoobKltAnfJmqdUI9SL_IEYiRac,1462 +torch/include/ATen/ops/_fake_quantize_learnable_per_channel_affine_backward_cpu_dispatch.h,sha256=YxYavfm4XyFlyePswco2f5Jv_3waaIFguDToWDam0o8,1214 +torch/include/ATen/ops/_fake_quantize_learnable_per_channel_affine_backward_cuda_dispatch.h,sha256=QpFbTiLiFR_VHOiUive07zO323W5fSD0sOk8D7Uh2rM,1216 +torch/include/ATen/ops/_fake_quantize_learnable_per_channel_affine_backward_native.h,sha256=9D9FXJ8vykwyoQScen8J6R1KSYBeLOiwtFswsbZWAB4,970 +torch/include/ATen/ops/_fake_quantize_learnable_per_channel_affine_backward_ops.h,sha256=MpHWhN5M0HzQ188h0NERVGPgwaLVsl2Y3k7OAb-i9A0,1987 +torch/include/ATen/ops/_fake_quantize_learnable_per_channel_affine_compositeexplicitautograd_dispatch.h,sha256=VhI2U3Ezz9nTRmCcqGHAAtyby-7qwZ0ZWiU070ZD9vA,1457 +torch/include/ATen/ops/_fake_quantize_learnable_per_channel_affine_cpu_dispatch.h,sha256=v4N9BDpFenkmLT-gMiEWhRdtI7pWlg_EsNK8is4-vHo,1144 +torch/include/ATen/ops/_fake_quantize_learnable_per_channel_affine_cuda_dispatch.h,sha256=-vrAKuz3HHpzjyZLT-OsPNlwaZDUBGUkPqJMYKbo8IA,1146 +torch/include/ATen/ops/_fake_quantize_learnable_per_channel_affine_native.h,sha256=57dwJvkMruko0G3Aw767Faz3fbFktVo4Cobvc-jd_ls,1144 +torch/include/ATen/ops/_fake_quantize_learnable_per_channel_affine_ops.h,sha256=Mivsy0rLR2NDv5xVkRTfbNSP1f5Tia7_D7a1y2FAe84,2881 +torch/include/ATen/ops/_fake_quantize_learnable_per_tensor_affine.h,sha256=as4jcG_npOdTWLIlwIIsydqi5TyG6zMn1DEipQKYEJE,2414 +torch/include/ATen/ops/_fake_quantize_learnable_per_tensor_affine_backward.h,sha256=HB5GrByPw-ayrBxSsorhb8BRCI7jgG_pj63Qsfp4EGo,1428 +torch/include/ATen/ops/_fake_quantize_learnable_per_tensor_affine_backward_cpu_dispatch.h,sha256=LW4QWW9iiHe84LkOBxYDrlcIwi1G41TP6M-ING6yQS8,1199 +torch/include/ATen/ops/_fake_quantize_learnable_per_tensor_affine_backward_cuda_dispatch.h,sha256=Ezc77DMKXV9E0XAAIIIC_3xtOcaYbze52pWt1jrl2Vk,1201 +torch/include/ATen/ops/_fake_quantize_learnable_per_tensor_affine_backward_native.h,sha256=Cxv-XMyYZoTVIX7eDCMfEH_JVu16X9VgEW2MrJx7tCY,955 +torch/include/ATen/ops/_fake_quantize_learnable_per_tensor_affine_backward_ops.h,sha256=x0fQggJ-WcY4Jx_5fH1Im1if3UqZq8wKtgMr3jedp90,1937 +torch/include/ATen/ops/_fake_quantize_learnable_per_tensor_affine_compositeexplicitautograd_dispatch.h,sha256=RyY2XkPaq556mq6vm51XmtVByEuGrMYH0aTo7n3EDlY,1427 +torch/include/ATen/ops/_fake_quantize_learnable_per_tensor_affine_cpu_dispatch.h,sha256=pEZLfN2mtqQ2xzHQFMOeT5mDWrUE_yijT0_a1YRsmdk,1129 +torch/include/ATen/ops/_fake_quantize_learnable_per_tensor_affine_cuda_dispatch.h,sha256=yn9e9wBdeYLLD3JBld7-RypHxXW4LejZeSouq_F_6Ws,1131 +torch/include/ATen/ops/_fake_quantize_learnable_per_tensor_affine_native.h,sha256=GWdKLVqgzmKl_QzULxxobEDuqMGvX47ICYgdDK5cunM,1114 +torch/include/ATen/ops/_fake_quantize_learnable_per_tensor_affine_ops.h,sha256=vfCXW13QszoJtoHlLSdMTBQlLnIitFw1DdrlNWJ4SGc,2781 +torch/include/ATen/ops/_fake_quantize_per_tensor_affine_cachemask_tensor_qparams.h,sha256=dDW6dGNEMXPhWkzcxVcZgacp_GbraVSgZE3gwhhaCtA,2865 +torch/include/ATen/ops/_fake_quantize_per_tensor_affine_cachemask_tensor_qparams_compositeexplicitautograd_dispatch.h,sha256=TKvt0C08H8uhvYzRdYaPMINTx0hz7LChgCKwE3uD0uM,1585 +torch/include/ATen/ops/_fake_quantize_per_tensor_affine_cachemask_tensor_qparams_cpu_dispatch.h,sha256=mSrS2uFM9DlRW6OrhUjPyHyHtx519hIo12zfSvbdMEY,1184 +torch/include/ATen/ops/_fake_quantize_per_tensor_affine_cachemask_tensor_qparams_cuda_dispatch.h,sha256=AOR5lDHkbWNWGgxR2G5fCjCGhbEdyMeNtayR3JR-h14,1186 +torch/include/ATen/ops/_fake_quantize_per_tensor_affine_cachemask_tensor_qparams_native.h,sha256=JypsTHDOmK1eDCYhHLQT0vBQ5mHi5j0USc-ZpGMK8jA,1250 +torch/include/ATen/ops/_fake_quantize_per_tensor_affine_cachemask_tensor_qparams_ops.h,sha256=pG5BsRaOxwDB1YdahNx8-w_rwak209X6ooimtK_HExQ,3243 +torch/include/ATen/ops/_fft_c2c.h,sha256=t9eZZrQJSWQPbKAasRDof6LD9jiahSboAyG4LxUeaIA,4707 +torch/include/ATen/ops/_fft_c2c_cpu_dispatch.h,sha256=9MK-rivL7BM3Zpvk35ztxOkjuiJb3MrjspFB5VAqvFI,1735 +torch/include/ATen/ops/_fft_c2c_cuda_dispatch.h,sha256=YfG7ep5cn9YFVJZdCWF95AFcwujFaOH9iKG2M5eiaYA,1737 +torch/include/ATen/ops/_fft_c2c_native.h,sha256=mWU7grU5WQgaUbbhpJ0gRLQpOB7TN17wTleZVROJUP0,1200 +torch/include/ATen/ops/_fft_c2c_ops.h,sha256=hgnrV6Gl4N7Yq-EjG8lhd79E1hMHRQqtlVkxAzEqPE8,2227 +torch/include/ATen/ops/_fft_c2r.h,sha256=sMbYev1IASIs-bpqknrFwXOjZgTIHYRoYfCPz9i9TkQ,4761 +torch/include/ATen/ops/_fft_c2r_cpu_dispatch.h,sha256=JrQQ6k3VhhGqj8a7SHnuLEclmmOOomueaWeuUxnaT4E,1789 +torch/include/ATen/ops/_fft_c2r_cuda_dispatch.h,sha256=LaxvuxAHWJxvtcee1REoNsi9g-pP7T7pDVaEo6Vx3lg,1791 +torch/include/ATen/ops/_fft_c2r_native.h,sha256=OXdFhtOZ7mKVQ8E_jXWrwK8ukH31bAnIsrXj1-Mz3Wo,1236 +torch/include/ATen/ops/_fft_c2r_ops.h,sha256=si7oZH1F5gfVyhf6vQ4vX66xo7MaltbkLLfvRvMzp48,2279 +torch/include/ATen/ops/_fft_r2c.h,sha256=sPc9kbqy7k2AlQ9wieVzTIT1jtaKHP8H2JbbRNOcmFU,1703 +torch/include/ATen/ops/_fft_r2c_cpu_dispatch.h,sha256=IcILr3PMvEioM6-NY3phWeUnG9MmZvHqub5LN1N9J08,1314 +torch/include/ATen/ops/_fft_r2c_cuda_dispatch.h,sha256=3eIssSqvb3L5rMO18fMIGBo_wtvnC4TU-8_6iWUh8Qg,1316 +torch/include/ATen/ops/_fft_r2c_native.h,sha256=vyvmL3RnX-5GrSdifgKasIg_kllEKzSzbxGMwMKaOes,1204 +torch/include/ATen/ops/_fft_r2c_ops.h,sha256=QnjqS5dgWxprVfU0bsmhYCFG4t_8Mr0aT43IWEKh0VM,2203 +torch/include/ATen/ops/_fill_mem_eff_dropout_mask.h,sha256=ui78K-IOF5CCQQcP_NBPdlp9R3-TXYpFeQ3jMZFKhDo,1090 +torch/include/ATen/ops/_fill_mem_eff_dropout_mask_cuda_dispatch.h,sha256=z6FZ0tvGQ_0PhcfB-nF0Ycwte1CclFSfxc11OCVdClE,1041 +torch/include/ATen/ops/_fill_mem_eff_dropout_mask_meta_dispatch.h,sha256=yq7ecW0HOo7zoVhL8QsdA9FFirnhITPag-Urtw18XxI,1041 +torch/include/ATen/ops/_fill_mem_eff_dropout_mask_native.h,sha256=-ku1Qi-aNyOn4mejeWQZ7czydboWWf7Wljv0HX8U1Sw,795 +torch/include/ATen/ops/_fill_mem_eff_dropout_mask_ops.h,sha256=lzJy6QpsfC-nUQDq5LWIVBgzQ7_hHJZUCcJ6t1owJuQ,1431 +torch/include/ATen/ops/_flash_attention_backward.h,sha256=mL4YZFPTHDLs-RIe7uo6LSYDaKZ3Cl9cgrFencVqBhs,5314 +torch/include/ATen/ops/_flash_attention_backward_cuda_dispatch.h,sha256=RAv8Vk5LcMUknovqNroXI5JnN-M_p6zceEtotMD8iIU,2119 +torch/include/ATen/ops/_flash_attention_backward_native.h,sha256=0m3B_3vJ45JneH-4XbFxQgYuyIt-PW8bhq0v-vHzDwY,1263 +torch/include/ATen/ops/_flash_attention_backward_ops.h,sha256=Rjg6IlgQFkpVa2pfe-bxIHVD7AZ9iGLDzIIKCKTx9aw,2886 +torch/include/ATen/ops/_flash_attention_forward.h,sha256=wtSHan4pUvpLStdPVAcfgTYysoL1a4Y9_9txdCoKwZI,5613 +torch/include/ATen/ops/_flash_attention_forward_cuda_dispatch.h,sha256=rBtVFe4cL7VRmChp8zd11A0QPDtc__dtaJ_fOqcIntw,2203 +torch/include/ATen/ops/_flash_attention_forward_native.h,sha256=5Onrs8fQgksZ1cRSZzNqHNwIbkzkY-2auJ2b0XV728w,1305 +torch/include/ATen/ops/_flash_attention_forward_ops.h,sha256=uO7DMSQDBZXllqZuHtuh18Z6P7qTtaUzM1rMdFPujac,3064 +torch/include/ATen/ops/_foobar.h,sha256=OHMlqMu7z_V4xehj__H86Qlz94UKxH6zwuwNszYpieQ,1621 +torch/include/ATen/ops/_foobar_compositeexplicitautograd_dispatch.h,sha256=EX9OMnCcQbR3_-Elc5NgubLUL6nCDlYTgqDDjQiu6-8,1204 +torch/include/ATen/ops/_foobar_cpu_dispatch.h,sha256=reCzEZ9MnpHtxpygrwLN2iqudL9AA20ne7mKiWGIMUg,1023 +torch/include/ATen/ops/_foobar_native.h,sha256=0GVP3RRBvPBHFUlZrABKnqKztv3wL4DCRR6Xwaem_tA,890 +torch/include/ATen/ops/_foobar_ops.h,sha256=YrlYfACiQX7WOTqaaHNWCVODX8GJbPZte52UtzMtisE,2074 +torch/include/ATen/ops/_foreach_abs.h,sha256=H863vI7g-07E_lUN5pDSIGAeZmL6RGz6pp6rPORYeoE,1476 +torch/include/ATen/ops/_foreach_abs_compositeexplicitautograd_dispatch.h,sha256=sqUV-WF32oTQGLusgnH26uIVUK409aiJ22pzGkMXG3k,1235 +torch/include/ATen/ops/_foreach_abs_cuda_dispatch.h,sha256=cnAXMVAXFd8FgOkgZt3xAb8mJIRQ6v6jJ8OcL9okebE,1044 +torch/include/ATen/ops/_foreach_abs_native.h,sha256=cHEe4iXe0JX6QUwPlWOxjK7CFkB_EraPu3dn0zjbXUw,1038 +torch/include/ATen/ops/_foreach_abs_ops.h,sha256=_pTuqBnMrUVhGDTD0pInq3870ObN1TSdpJbtJF6DFT8,2333 +torch/include/ATen/ops/_foreach_acos.h,sha256=mm2QP92RDiVeMpNegL19Ghu0dPkGRQ-0BEPO7RL3o9U,1489 +torch/include/ATen/ops/_foreach_acos_compositeexplicitautograd_dispatch.h,sha256=uSrz49WDHwSExLYI3Pl6BZrivhIstkeKPtaTwZdgzlg,1239 +torch/include/ATen/ops/_foreach_acos_cuda_dispatch.h,sha256=AEVicWLKkERE-cwbkK138wLCqgEO76tMNXnl9L0lt50,1046 +torch/include/ATen/ops/_foreach_acos_native.h,sha256=85Orh43GvNVmePYlaG2q6Jppw6gnCsZzOvkZketB7LI,1043 +torch/include/ATen/ops/_foreach_acos_ops.h,sha256=XeKTKWYH07s8SElwwn_7f29XlYONtQS0wIzfhaBMce8,2342 +torch/include/ATen/ops/_foreach_add.h,sha256=r7_hg7RPm74YE095Fqgx3A0-dvhZLlTcu_4khQPzkYQ,5086 +torch/include/ATen/ops/_foreach_add_compositeexplicitautograd_dispatch.h,sha256=KDGfuajqUsUqiEyltzNlke8Q-765o7X3wh7j_mRFSiw,2704 +torch/include/ATen/ops/_foreach_add_cuda_dispatch.h,sha256=Lmycadk-Ljhl3Jp_UEH7JgHwQpxg_Hxnlj8dAYTB5Hk,1740 +torch/include/ATen/ops/_foreach_add_native.h,sha256=uDNupOwbM9fNIKA_9x74-9faOJLadBAeFEMW777wFTE,3207 +torch/include/ATen/ops/_foreach_add_ops.h,sha256=PVe2D0-WNu9HUmPKoLqXGhLjjlqQixOm5HJz4ocIODo,9090 +torch/include/ATen/ops/_foreach_addcdiv.h,sha256=QdqMWlv6rWisZoQS9CvaqclJUE57ALaX3VPlFtXcbnI,5134 +torch/include/ATen/ops/_foreach_addcdiv_compositeexplicitautograd_dispatch.h,sha256=L_iSOvJkfX6mGoYADBsptgFWVPtT4n4lWQjYEkY3RQw,2759 +torch/include/ATen/ops/_foreach_addcdiv_cuda_dispatch.h,sha256=Zoe0yN5WPdWYMUhrl-v8AQWNGfdMQpVFSje1mT6cjwc,1780 +torch/include/ATen/ops/_foreach_addcdiv_native.h,sha256=gtnxGvk5WWVgewh9zNN7XafmUo873UtiKr-SZE6s7zk,3115 +torch/include/ATen/ops/_foreach_addcdiv_ops.h,sha256=DPPJbw81OAROJtSFLUtoEf3qoW3pgAyXHPM8ObMk8l8,8256 +torch/include/ATen/ops/_foreach_addcmul.h,sha256=NRegWHyCzqk_CywgC5NYaVIdHtc7pAHu4qeu4Zc-7ao,5134 +torch/include/ATen/ops/_foreach_addcmul_compositeexplicitautograd_dispatch.h,sha256=vZduFS7dP9mR-KEiNl9U_p1W73mswv081Y_a6uedi1U,2759 +torch/include/ATen/ops/_foreach_addcmul_cuda_dispatch.h,sha256=sFZfz5V_mKVm3te-V9JIDEmg8BGSVtqgYoY_GACuj74,1780 +torch/include/ATen/ops/_foreach_addcmul_native.h,sha256=TMluaUjl6WJSdGnfc7_AfCVzAqY3b7jKJni5MLuxbSk,3115 +torch/include/ATen/ops/_foreach_addcmul_ops.h,sha256=qIfClJLemXQcb25qQmoFHcAiN-kR-0EgFrT3X-tgjAc,8256 +torch/include/ATen/ops/_foreach_asin.h,sha256=AZ1lCR5Ly7qkoJdkFvDCUYlLmumyUc1cZXOtSlsDbAg,1489 +torch/include/ATen/ops/_foreach_asin_compositeexplicitautograd_dispatch.h,sha256=MXVA17N5xbhb_Fv1yBOfk_3pq-TbvKlHCct5XqbtgtM,1239 +torch/include/ATen/ops/_foreach_asin_cuda_dispatch.h,sha256=ycthJAtsYQ78QvhDddarb9P8pBYnXYSffz4xFEprFxs,1046 +torch/include/ATen/ops/_foreach_asin_native.h,sha256=xQnFUvkaVhBrqmajLDp2jeXmsz8slaSfrz1mw40phXc,1043 +torch/include/ATen/ops/_foreach_asin_ops.h,sha256=zia9gGDBjxTixjApN7K5XpcYQ-x3vLMOICtMBZYal1E,2342 +torch/include/ATen/ops/_foreach_atan.h,sha256=ly38qb46pBtJezAfJwZFTzQ4qHWlAIubPFMu1inaBAA,1489 +torch/include/ATen/ops/_foreach_atan_compositeexplicitautograd_dispatch.h,sha256=RsAVr5mF-RBdMFzWfmApC5HPq5J3trFPFIM-4OrHbMA,1239 +torch/include/ATen/ops/_foreach_atan_cuda_dispatch.h,sha256=3FRgTZh7vbGRUHOuKDV92XTj4uyCsN0ujg7mj6rrxhk,1046 +torch/include/ATen/ops/_foreach_atan_native.h,sha256=A70eF0bj1fPT9WZCVaDjB-PKleXIOd-rVLXVQuP2uoM,1043 +torch/include/ATen/ops/_foreach_atan_ops.h,sha256=vj9Jw3ulFiad6XNtXs6Bi4vZ4OeOriH2kEj1-uogXaE,2342 +torch/include/ATen/ops/_foreach_ceil.h,sha256=ylomgp_WfsCcSnGg5_uY0FxlMiKm-dwO5OXqwH9ISOw,1489 +torch/include/ATen/ops/_foreach_ceil_compositeexplicitautograd_dispatch.h,sha256=Sgfo4Qje1tT-mCeKExLibph112avchPLsYOO6-CBp1M,1239 +torch/include/ATen/ops/_foreach_ceil_cuda_dispatch.h,sha256=U28q_9kLOCWLewRuyozP3rveOjIml1PyAaJ-AagJZEk,1046 +torch/include/ATen/ops/_foreach_ceil_native.h,sha256=2ttSNiQU5mEDR4Pr20fADYyAK99ftB6A2oPfWS-gBhY,1043 +torch/include/ATen/ops/_foreach_ceil_ops.h,sha256=nTB0u2b404gCrZooJtHkk9WFFLuqZw3EDu9ovr9YkIg,2342 +torch/include/ATen/ops/_foreach_clamp_max.h,sha256=a_BW0FS6OZsX_Yibdamiuhz2xChrHZ7DnOBq7W4_-bM,3934 +torch/include/ATen/ops/_foreach_clamp_max_compositeexplicitautograd_dispatch.h,sha256=QHEHN5oNSJO-E0R7sYNh5V_D6Pqg9XfgI5Jfq5z_1-g,2181 +torch/include/ATen/ops/_foreach_clamp_max_cuda_dispatch.h,sha256=e2y109ojK3XojCHM2fVsqBOzXMlLfs4ihR3XdMMY5VA,1490 +torch/include/ATen/ops/_foreach_clamp_max_native.h,sha256=AAwI5fVIlYOOXIqcs9l8fVnNPjYr-Sz93w4VYvwtg4k,2466 +torch/include/ATen/ops/_foreach_clamp_max_ops.h,sha256=kaJdwnosGzpEEBLEGNLx4mrpOdLmDe7HfnFr0XcXS_A,6771 +torch/include/ATen/ops/_foreach_clamp_min.h,sha256=25dLVXkKbBf11Bvq9-GT2e1Bsfo-XPgDHlnHZr5CMl0,3934 +torch/include/ATen/ops/_foreach_clamp_min_compositeexplicitautograd_dispatch.h,sha256=94KOoii2md9z6kpDv5S2-xlymZFn2SYbEXXNb-klVRk,2181 +torch/include/ATen/ops/_foreach_clamp_min_cuda_dispatch.h,sha256=ENO8mCycIXkuVtCfAhqz8M6leW9HXX3PDjxARxzuwso,1490 +torch/include/ATen/ops/_foreach_clamp_min_native.h,sha256=MPxdF1l-17q5a5_I6wGSL_mM_jxo8hGop2Ae-pf1drs,2466 +torch/include/ATen/ops/_foreach_clamp_min_ops.h,sha256=1qloDHuRonStj0x3gSbCwihO88zzSztUJvonsMRY3q4,6771 +torch/include/ATen/ops/_foreach_copy.h,sha256=Pk8drkCVEwKYrKsIFHTTnZ__UM-0m3kCenUguFpRz8I,1904 +torch/include/ATen/ops/_foreach_copy_compositeexplicitautograd_dispatch.h,sha256=XyUYvtKdm_QVO04rJFQ1T5oePEkv3Nhus0ii8TN5eqQ,1413 +torch/include/ATen/ops/_foreach_copy_cuda_dispatch.h,sha256=0P4FLaXGMQR7RxKYIcQ2gdEDQiZK2-uEu-CdMHGDNUs,1019 +torch/include/ATen/ops/_foreach_copy_native.h,sha256=iEqLLaHxqf2n7WPXIcO81FoXDlA86j8SKrAaET8kKcE,1147 +torch/include/ATen/ops/_foreach_copy_ops.h,sha256=IidO_pI1qQMx3fOAEzFGOR3Aby52ZhFXmYpQovS3zHc,2768 +torch/include/ATen/ops/_foreach_cos.h,sha256=mm-lR8hp6b5T36aK_DY_UxXpDCRs_3t6M6UkPc1Hp7A,1476 +torch/include/ATen/ops/_foreach_cos_compositeexplicitautograd_dispatch.h,sha256=NZ8xb3dOpyrV2Lr66YJG_8nD8x5urxwj-Pxje7HDH9k,1235 +torch/include/ATen/ops/_foreach_cos_cuda_dispatch.h,sha256=ljip2w81ew2OU03AQQUJ_OACs5PviAwic5qZSFsZuic,1044 +torch/include/ATen/ops/_foreach_cos_native.h,sha256=BXp97JJxUDwVJJQRKhFZ3juoOmiGCS_llHzWtGw8U6I,1038 +torch/include/ATen/ops/_foreach_cos_ops.h,sha256=RTVTtHJzHIsJcOLGdLbELjZOFsk0YSb23vVz6mPqxCw,2333 +torch/include/ATen/ops/_foreach_cosh.h,sha256=iV57AAPWDrqjDevEuddigjyr-XGisCr9ZzQPtfNzFas,1489 +torch/include/ATen/ops/_foreach_cosh_compositeexplicitautograd_dispatch.h,sha256=EdOnWqAsggtDIyNned5ApVuvSZ0TfsgN1wxjOAdQ_3Y,1239 +torch/include/ATen/ops/_foreach_cosh_cuda_dispatch.h,sha256=HOYIU5vfN7me-70xM7oygwC-eDrYPQTs_7mpL7W_Cy4,1046 +torch/include/ATen/ops/_foreach_cosh_native.h,sha256=elnAgkI38rrJiUK3epdWCdd3GaWOQreIClYT9NKyaXs,1043 +torch/include/ATen/ops/_foreach_cosh_ops.h,sha256=5l8mNInBPwZIzBMKAv-HOqrl2e5pDz0fHj55U5g83oA,2342 +torch/include/ATen/ops/_foreach_div.h,sha256=7tL_jzBZYVATEXYxAg0uhzf0REpuwZ-nr_seV4Tu8wo,4670 +torch/include/ATen/ops/_foreach_div_compositeexplicitautograd_dispatch.h,sha256=o23HPAV0dtqoJPBkR9UU7RQkVlsPUS9JFf0XIzcvCOY,2484 +torch/include/ATen/ops/_foreach_div_cuda_dispatch.h,sha256=2WEVSD6Ed2X3J6Kc6S3kqA4iWGBMmxr1Ywp2g0yxaEw,1628 +torch/include/ATen/ops/_foreach_div_native.h,sha256=r9iNzytjGfIHJGu-bllTYwU_9vzv_WD_9zyHAtGR9fc,2931 +torch/include/ATen/ops/_foreach_div_ops.h,sha256=2ePX4pNpCpgj_wDF7rvJsG0b3q4VoO59NI1WLMBGwSk,8550 +torch/include/ATen/ops/_foreach_erf.h,sha256=38gYf2ysFed8ObLjQVPr0SSRAUP908l6dEInrooYr2c,1476 +torch/include/ATen/ops/_foreach_erf_compositeexplicitautograd_dispatch.h,sha256=h4bCyke1qDQ-mJKocKU-YPZR4WkllMqNg4Fc13wvRuo,1235 +torch/include/ATen/ops/_foreach_erf_cuda_dispatch.h,sha256=lKyNusBh-1YZaCxM0u1Nhkbr4DBtoQCGjiRvNO9HCJk,1044 +torch/include/ATen/ops/_foreach_erf_native.h,sha256=2ayNv2c2WZrPYtkQgxOlX0SAbf6SfVUvd4CqHe5yQYI,1038 +torch/include/ATen/ops/_foreach_erf_ops.h,sha256=QTae0NNBZIoBVPKrPFAxCqStOmRQdU9dCOjmUVts-qw,2333 +torch/include/ATen/ops/_foreach_erfc.h,sha256=Od5r6R7pJQk9hg3uE29In2eCBcKWMD9yvcGY4CvbA_k,1489 +torch/include/ATen/ops/_foreach_erfc_compositeexplicitautograd_dispatch.h,sha256=14iV6dmI5YIyq4p03Nb-cXUEyM7CPvNylnJJy94BrdA,1239 +torch/include/ATen/ops/_foreach_erfc_cuda_dispatch.h,sha256=z_R1wxaVb0MPM3mx-543rITbyIxRM4vgDSsWNPn89to,1046 +torch/include/ATen/ops/_foreach_erfc_native.h,sha256=ddQnOPmpzhDhClzOjANPs6umcQbafJH1fhZH5prBuws,1043 +torch/include/ATen/ops/_foreach_erfc_ops.h,sha256=OdnSirkkA0W-cIbte2iEnHx3FVdSdGNgcLJQDqfA424,2342 +torch/include/ATen/ops/_foreach_exp.h,sha256=Vd0LWgNOjrenImwVhuJpuITyNr55VN_HSNtwB4lWS80,1476 +torch/include/ATen/ops/_foreach_exp_compositeexplicitautograd_dispatch.h,sha256=bPe0PDDhV6uJEl7WjZzRRxcBaA1MU7nA2eDOqJLqjq8,1235 +torch/include/ATen/ops/_foreach_exp_cuda_dispatch.h,sha256=Qt8Ll-En7IogavZKZeiuILHbZODYP7dS62gRPBAUlDo,1044 +torch/include/ATen/ops/_foreach_exp_native.h,sha256=177rueOWuMS_umUOb_BVByeqzQ0Q6mMTmjyiEGZ3HFg,1038 +torch/include/ATen/ops/_foreach_exp_ops.h,sha256=VaQaevTmB8qKgwTwT8rjVuiPuBikpneCrtYMVUC2pSg,2333 +torch/include/ATen/ops/_foreach_expm1.h,sha256=zuvcpuiReWSzhGlTElAVX3-JJK6FDnrgwnl8x7o4k4Q,1502 +torch/include/ATen/ops/_foreach_expm1_compositeexplicitautograd_dispatch.h,sha256=1Q0qBTfhFLEwMTOyfpK5P9zO3jizX5ZUc3u-hEmHLWM,1243 +torch/include/ATen/ops/_foreach_expm1_cuda_dispatch.h,sha256=l-4ROJhUnVdM8zMF4A83BuqbJYdSrzyzySzZM91GQQk,1048 +torch/include/ATen/ops/_foreach_expm1_native.h,sha256=WRbWVaF5d2ZITLWpck7hpTSIN7jlRUHjgZqgRMXoiI4,1048 +torch/include/ATen/ops/_foreach_expm1_ops.h,sha256=iX071mcf9zuE_kZMmhHgPsJBpt-MztQ03yhqmktuiiQ,2351 +torch/include/ATen/ops/_foreach_floor.h,sha256=Hm7ephKM9iyKPGm6pjjM0Gre6AowCt2yXOfe577wNOQ,1502 +torch/include/ATen/ops/_foreach_floor_compositeexplicitautograd_dispatch.h,sha256=A9B6UJ-4FXFEMvSw3LBE4whsScVNTEVEIVB1SpWPmDE,1243 +torch/include/ATen/ops/_foreach_floor_cuda_dispatch.h,sha256=jnloWHKWy4z3qtHnFx8EfUbEuOI08wRSeTgQXxHdDsQ,1048 +torch/include/ATen/ops/_foreach_floor_native.h,sha256=pDEWkpjrZSFDo6YHvJdOUCxHDxMfIUCM50AtfmVS_yM,1048 +torch/include/ATen/ops/_foreach_floor_ops.h,sha256=qVdoWm1oEkVltP6jddpF2_Wl4zrb_msDd2OFNLJndbk,2351 +torch/include/ATen/ops/_foreach_frac.h,sha256=rOl9T4TYEZsLsB-oKszqGWWjS8t8XTnYLskhbaC1iJ0,1489 +torch/include/ATen/ops/_foreach_frac_compositeexplicitautograd_dispatch.h,sha256=FPwx5X7NPsDzKtqHe4oSlHPaw17hXZTeshkKsqjP1fk,1239 +torch/include/ATen/ops/_foreach_frac_cuda_dispatch.h,sha256=TwHTX5rcTITTdaaTZoImvSnsbIcSK1A9K3W6NR2Dn-I,1046 +torch/include/ATen/ops/_foreach_frac_native.h,sha256=6MxCgTD3_51OdyNmJTjfZf_x0CvAT4i2LhEiKj6J4NQ,1043 +torch/include/ATen/ops/_foreach_frac_ops.h,sha256=42VbxkwtYQy_qSpJfZ7KXqGWJrn2DmpRBZMkR3PRQKc,2342 +torch/include/ATen/ops/_foreach_lerp.h,sha256=AZtgGbGwOQetDEeTmc7k_lQCSQspkg09CThinZKkWu4,4409 +torch/include/ATen/ops/_foreach_lerp_compositeexplicitautograd_dispatch.h,sha256=Lvhy_KhTgnQ9Ue7ovMj8W6J7EffJ95bmmyYv6uvRnCw,2425 +torch/include/ATen/ops/_foreach_lerp_cuda_dispatch.h,sha256=5cy7EWDwxXs8KZyAEg6P-mDnbrCZ6bS0iPpr09cTx5g,1612 +torch/include/ATen/ops/_foreach_lerp_native.h,sha256=aZOu9iAB40q1Dg_1JqmF2SwNOGphBK8FXMJx0Xp4OBI,2719 +torch/include/ATen/ops/_foreach_lerp_ops.h,sha256=vM8Wfx03t87nRzmynTp_zLCESE_3wDNMiVdaVk3I6Xs,7410 +torch/include/ATen/ops/_foreach_lgamma.h,sha256=4iHn8HKc7QwX9c_8uxRWUNUVHQ4gyGwHKCbtKQ5Ev1s,1515 +torch/include/ATen/ops/_foreach_lgamma_compositeexplicitautograd_dispatch.h,sha256=OReicr7ulgPTvspPJ1Di2piOD0BaxesLoa0h6_yueLs,1247 +torch/include/ATen/ops/_foreach_lgamma_cuda_dispatch.h,sha256=PHVTDRpFsU_g2xDZMkSr3tfqMd7VAD06GN2TiuNHnUI,1050 +torch/include/ATen/ops/_foreach_lgamma_native.h,sha256=JX4E9KlG5tyw0OqsL4VROsSq3VorJIK4pwUrnbgpMgU,1053 +torch/include/ATen/ops/_foreach_lgamma_ops.h,sha256=2LZwYWbvbiGPUOFsWrkgcFCUtw16N1SSnN0C5vGnvMM,2360 +torch/include/ATen/ops/_foreach_log.h,sha256=STsM_GXWdN-7Mk2N0WfbCsqkD_JTwU3AcPt7wA0Y9A4,1476 +torch/include/ATen/ops/_foreach_log10.h,sha256=qm2nxgsfzw82xgRX1dCUL_7Efa8M-B8vCikcV-kyNxA,1502 +torch/include/ATen/ops/_foreach_log10_compositeexplicitautograd_dispatch.h,sha256=PrPQgoqCgTqNQTvZDhn8TL_OMhD9Ir51zJiNTiMO2Nk,1243 +torch/include/ATen/ops/_foreach_log10_cuda_dispatch.h,sha256=hFhB8DaVRBMpGl6-LYzcW6MYH2PE0lldhXoRcPMkzGU,1048 +torch/include/ATen/ops/_foreach_log10_native.h,sha256=3fb7wnkKIwolFx-Ccjl8vLXhxK687_HYofdRq7e4Iu4,1048 +torch/include/ATen/ops/_foreach_log10_ops.h,sha256=yinh1BipcB_2KqB_nK8sIfIJLN6WSYyfrsMjQSNaYC8,2351 +torch/include/ATen/ops/_foreach_log1p.h,sha256=C9-W3fYHFRh7dSmMH0Pyvngc1GbsJI4inm1wYEr3Jh8,1502 +torch/include/ATen/ops/_foreach_log1p_compositeexplicitautograd_dispatch.h,sha256=hMvNDcEimHAbuipN1B6pIqYBkTZHttmCR47aVBHR03k,1243 +torch/include/ATen/ops/_foreach_log1p_cuda_dispatch.h,sha256=WnaJJRWgOz1AE73IttiO5PFL6X32zSTYrvEhAaQSBao,1048 +torch/include/ATen/ops/_foreach_log1p_native.h,sha256=WlxuK1Es7YX3X6gB33AapX6ENjnSywifTn7CKOP4IUo,1048 +torch/include/ATen/ops/_foreach_log1p_ops.h,sha256=c7qCg3AEFkLjVBqFuwaRNVznXrwAkXMEV-ER8cPqF1s,2351 +torch/include/ATen/ops/_foreach_log2.h,sha256=V1jZHttgoka1gKa9L92tB0eeh52xWYHG0djnuH_eGHg,1489 +torch/include/ATen/ops/_foreach_log2_compositeexplicitautograd_dispatch.h,sha256=OdGW9UwPYRwEtA9t6bHAAImzW_TOJT693SIFXXc-bEE,1239 +torch/include/ATen/ops/_foreach_log2_cuda_dispatch.h,sha256=HiuoNRGvHtxoa_KSujZQdVvAl7KyetiEEoFVpwDdzqU,1046 +torch/include/ATen/ops/_foreach_log2_native.h,sha256=IKBnVWLN5mQKdAyWEplc4qSlnXuzcAhsBaBaoeu8Xq8,1043 +torch/include/ATen/ops/_foreach_log2_ops.h,sha256=oSwZVFS6K9mT9XlaLlyyORrdZwVqo_Jk3xIGaiMRMqU,2342 +torch/include/ATen/ops/_foreach_log_compositeexplicitautograd_dispatch.h,sha256=uV7YAY7SYPr19EfPIxwiQdK4TaDo_WFgHeEbXnCHC-g,1235 +torch/include/ATen/ops/_foreach_log_cuda_dispatch.h,sha256=LloA_WZ00FnhlE-Kv2eSbYzHKZw7wuvD868_MMMxSpY,1044 +torch/include/ATen/ops/_foreach_log_native.h,sha256=nSaNq7XU5aoS6NmM9Rm10fxV819GGhqsAXcMAomGjxs,1038 +torch/include/ATen/ops/_foreach_log_ops.h,sha256=5Z1RG81knsJ4gCECyv7LqIiaBsqdy8718HRv-0EOns8,2333 +torch/include/ATen/ops/_foreach_max.h,sha256=a0wbuTvV2pvD9TNq-V4OgtBBWjLdX77JiEFKU18DxtU,1328 +torch/include/ATen/ops/_foreach_max_compositeexplicitautograd_dispatch.h,sha256=a8VHMeSCtgmpP5AP9rPGP3lzdzThPOixu4XBxbxArHA,1184 +torch/include/ATen/ops/_foreach_max_cuda_dispatch.h,sha256=QeiCSqUg8WbtaQEYR2B9OY9mb4ENmOyCEXvKYXAgxpM,993 +torch/include/ATen/ops/_foreach_max_native.h,sha256=4S_VvDyRgMW7xhpIXonJecOYZIpzINDYlqFHAfRBRbo,914 +torch/include/ATen/ops/_foreach_max_ops.h,sha256=0EWp4GXeELrHig2xuH8iF_aCIEPLaMTcVlmcfmvhP7c,1840 +torch/include/ATen/ops/_foreach_maximum.h,sha256=Mp5ZcMzfg_gl0_7teXFg_ojdSbn1IRqGwBSS5EBkuGg,3860 +torch/include/ATen/ops/_foreach_maximum_compositeexplicitautograd_dispatch.h,sha256=W-Gf1WH1rstCKwKHtvwWXkbilUnHmKszC3CX06jajFY,2157 +torch/include/ATen/ops/_foreach_maximum_cuda_dispatch.h,sha256=uo3AoRyJzybbQGmZ_fHk0xC8X6nmZWEtMGIMbjq9TsQ,1478 +torch/include/ATen/ops/_foreach_maximum_native.h,sha256=k_7sTfeOZm4ReqeWuX2Lcju13fPOZv099Oxig3bhoNw,2460 +torch/include/ATen/ops/_foreach_maximum_ops.h,sha256=EItwNAP5KlKCl66TQvgUVnhtlbNTbULvImqMUeOvZAg,6717 +torch/include/ATen/ops/_foreach_minimum.h,sha256=RffEwCJCcpuaT_dJU3AA46FJEHe7XtibFx11xGlI_jM,3860 +torch/include/ATen/ops/_foreach_minimum_compositeexplicitautograd_dispatch.h,sha256=qAP5EzKdl3nrptdjNsluWgy5SLMctgxN--8GQUaKsVU,2157 +torch/include/ATen/ops/_foreach_minimum_cuda_dispatch.h,sha256=t_XFkxwi2sGv4KFL5fr_-DgOQQOWlfAIyGZ_qUd58ZE,1478 +torch/include/ATen/ops/_foreach_minimum_native.h,sha256=k3kHt0HHhA7xfYZtELtOWpb7rAOVTmdbRjumVffQ9qQ,2460 +torch/include/ATen/ops/_foreach_minimum_ops.h,sha256=zFiblbn0l07Wt8Rj9rVPYbSycPOyx2qQOZqpTWcGzoQ,6717 +torch/include/ATen/ops/_foreach_mul.h,sha256=9ajVCQvTXsBcfeSSZhjtyGegYyCkIE5WR2A1RzqRLnA,4670 +torch/include/ATen/ops/_foreach_mul_compositeexplicitautograd_dispatch.h,sha256=TNAKI_Km56tWjXvYtXWPTwEazRcCxYmB1hUVxsqcNGY,2484 +torch/include/ATen/ops/_foreach_mul_cuda_dispatch.h,sha256=kRUdpZ0dLpF5-CCZOFZ6ep7jGsshIdXQRGdhvvYcw7E,1628 +torch/include/ATen/ops/_foreach_mul_native.h,sha256=Drr3pJ_BqXrFLdsDlM59M2Hl0zj4SWBNT7DG-IPRD5o,2931 +torch/include/ATen/ops/_foreach_mul_ops.h,sha256=p2YHSMBZgghntRmjcqc5LXy7mkB-YYdk5WZRp-DY2Qw,8550 +torch/include/ATen/ops/_foreach_neg.h,sha256=f2x-pvcxiYFg4vG4NwlktlEmTWk3YVv4Cl-6qJ8yva0,1476 +torch/include/ATen/ops/_foreach_neg_compositeexplicitautograd_dispatch.h,sha256=XywtYFHU-u8yArCKnE4vfjnVSIVun_5O1wOEGP_MVDQ,1235 +torch/include/ATen/ops/_foreach_neg_cuda_dispatch.h,sha256=LPVYNaE-gBkG-rPj6SfEA6GMq2HyV9aSqUG715zh27Q,1044 +torch/include/ATen/ops/_foreach_neg_native.h,sha256=uLsNgz0OpcMZs9a8xdvLQQqNZyOS1nZB0uSed5uAxFo,1038 +torch/include/ATen/ops/_foreach_neg_ops.h,sha256=xpcJUIDkpQDJ1MO6-_Je5_iU4qXUmNib_fUwU_ft_eI,2333 +torch/include/ATen/ops/_foreach_norm.h,sha256=W-1qQrogPdbIAnCBm1dV4LZzsJ1ga055wnIZWlyWGkA,1753 +torch/include/ATen/ops/_foreach_norm_compositeexplicitautograd_dispatch.h,sha256=4mJ1ag9PjJRAyVvh8Xnk1W6_KAKIWAPW4UaM8-Oq4OE,1410 +torch/include/ATen/ops/_foreach_norm_cuda_dispatch.h,sha256=VdTC_m4xcvd4LWKbu6RMXE2cPpRna40LstMqA7Gbz0w,1074 +torch/include/ATen/ops/_foreach_norm_native.h,sha256=-L3O42cEqG5eD0131Z3pgRxThv1SmUtpfkhGTJQgu6o,1147 +torch/include/ATen/ops/_foreach_norm_ops.h,sha256=N-jKDjNpmoRnGm4jDOgtRQJPz9o78QXnYu-3M2DYoq4,2321 +torch/include/ATen/ops/_foreach_pow.h,sha256=-lKiqGD6SqjLc2BOE9j5vRtzupA04WUdi3CEYneRudk,4040 +torch/include/ATen/ops/_foreach_pow_compositeexplicitautograd_dispatch.h,sha256=GTRYb9tsFgcu3Q3PvwAvPVn5askjon87TOCDCv3xx6o,2233 +torch/include/ATen/ops/_foreach_pow_cuda_dispatch.h,sha256=22HIk8rUtUf9jMnsTFb6MMl3hoCA9V265ezAxQMU5tI,1566 +torch/include/ATen/ops/_foreach_pow_native.h,sha256=_RhdTs4jarBm9fcDJjJdQohp8YAGs_1_oll_W6nLBJY,2652 +torch/include/ATen/ops/_foreach_pow_ops.h,sha256=iphu4rfr_pz7fukCdZgLII1Kk-bofPyl5g5M_cFd_qE,7360 +torch/include/ATen/ops/_foreach_reciprocal.h,sha256=zrp2-TrifV9HJLgA3bRNtgZ2tLJu22OHGXxz-bzZYQI,1567 +torch/include/ATen/ops/_foreach_reciprocal_compositeexplicitautograd_dispatch.h,sha256=YuUJdFd9vvITYxj4yG-26R7_fU-_elBZpyJxcUaF7G4,1263 +torch/include/ATen/ops/_foreach_reciprocal_cuda_dispatch.h,sha256=g1ZQKR08zNfyoaHTmZf6sp49AYmN94urcTpAEzUhya0,1058 +torch/include/ATen/ops/_foreach_reciprocal_native.h,sha256=_FZB-q2w_tZADF5FQlupTiQXt6Echx6E0luOzUIgZ7o,1073 +torch/include/ATen/ops/_foreach_reciprocal_ops.h,sha256=dgcEk2YLh4OeeQLXrHwu67bYWbCWlw7cPJLxrTnyKR0,2396 +torch/include/ATen/ops/_foreach_round.h,sha256=HO8iLDuX1cW-uLKq4kTmLzP--J_I_XgBgy7ItM19fk0,1502 +torch/include/ATen/ops/_foreach_round_compositeexplicitautograd_dispatch.h,sha256=r5ovquR7UP-MNtEm9SQZQ9Hd-5W_pKTS8jEYSMLPlyo,1243 +torch/include/ATen/ops/_foreach_round_cuda_dispatch.h,sha256=H1_XxtOTnBIQEg0pWjipGH3sMwJT6a4MO7pjwuneqRo,1048 +torch/include/ATen/ops/_foreach_round_native.h,sha256=358Bq56dXVg-R8BIGK-mW2Sklg3OfEr9Idr0V0mpfQE,1048 +torch/include/ATen/ops/_foreach_round_ops.h,sha256=2rogSekI7iktty6J_FT1v5hfGpXz829rtQZOXUGQD-M,2351 +torch/include/ATen/ops/_foreach_rsqrt.h,sha256=JV8xRQv5qWIa_yFkKdtmAWB4vRTjJvCWo9BpLA7lcNg,1502 +torch/include/ATen/ops/_foreach_rsqrt_compositeexplicitautograd_dispatch.h,sha256=LVMtWef5OtXMniZwpf9yfaOl9JprNMqpWv4iWT0_TkU,1243 +torch/include/ATen/ops/_foreach_rsqrt_cuda_dispatch.h,sha256=IbgBwe_VNVo-_muQ32MCrcQfpQQuzvA7L_FkTqmoTDg,1048 +torch/include/ATen/ops/_foreach_rsqrt_native.h,sha256=jOdnUZW0xZ8relwXMg9wk3FXHG0dQzPf3LrZz_0N6jI,1048 +torch/include/ATen/ops/_foreach_rsqrt_ops.h,sha256=sjeT527-oIAxOCjr_7Kui-MA48HvYttPFuMztn2cSPI,2351 +torch/include/ATen/ops/_foreach_sigmoid.h,sha256=Di4wPgfzzXTJUIiaGYAJX4basJJfqvELEA4KOIgrfVk,1528 +torch/include/ATen/ops/_foreach_sigmoid_compositeexplicitautograd_dispatch.h,sha256=6WbOVDA-iu9pUFKR1N5Qlbh7BUChar5ztZo_cXcGWMs,1251 +torch/include/ATen/ops/_foreach_sigmoid_cuda_dispatch.h,sha256=myuRlVqZK9iKugcTgT0Fio_ueR9hirPVTxjuDX26fnI,1052 +torch/include/ATen/ops/_foreach_sigmoid_native.h,sha256=UnmVWKMao1vjORYmmdC1IiPQId_gevnufam_Gsy407o,1058 +torch/include/ATen/ops/_foreach_sigmoid_ops.h,sha256=CYhginFUzrmqTgcQhfOTmxCwoZrRCFr1xBDCzKPlpZg,2369 +torch/include/ATen/ops/_foreach_sign.h,sha256=4-ZaVDCZx7gONguObU9Q68EwkPpWTA3iVtHuR_DC530,1489 +torch/include/ATen/ops/_foreach_sign_compositeexplicitautograd_dispatch.h,sha256=cedUDCe5TEh-T1JzUlgf6Gc_aMoOFrhXTVBJ2qSbjbw,1239 +torch/include/ATen/ops/_foreach_sign_cuda_dispatch.h,sha256=aRNfBqg3kvHyQC-n8sQIVs1kBkbsNkALxdZ-vKLwPOc,1046 +torch/include/ATen/ops/_foreach_sign_native.h,sha256=n8Tzx2_rSx9QL-ktFIz0dHkLp96paPcUEp8RcdKE4YI,1043 +torch/include/ATen/ops/_foreach_sign_ops.h,sha256=y64JnpNYl_T7swUVMmHc3XcmxGHtWEvdULoSXAazSwg,2342 +torch/include/ATen/ops/_foreach_sin.h,sha256=lF-jF7TQJqcPLDw9VUf4ljOJ890UkaZBpSL094q7gUg,1476 +torch/include/ATen/ops/_foreach_sin_compositeexplicitautograd_dispatch.h,sha256=1uCQUdqUZLZxhAzQwg1sRlI5aisMdSoeem7m3rUWkeM,1235 +torch/include/ATen/ops/_foreach_sin_cuda_dispatch.h,sha256=LA3hhqnAjtlNtIYuCfDz56qaQWoe6k4QXmSqJt8QE6U,1044 +torch/include/ATen/ops/_foreach_sin_native.h,sha256=3YAAZVODEwgTFPY3EntwnmgBrUD6xN69iguJ1lnhOQQ,1038 +torch/include/ATen/ops/_foreach_sin_ops.h,sha256=x8yLT729lln4-6XjWg2hN3pF1wkDIl6fxD0TlvtQ5-I,2333 +torch/include/ATen/ops/_foreach_sinh.h,sha256=EZtu8CFHTc92qEo89KsENz9gWM1Gvwt38lpbVrqzm08,1489 +torch/include/ATen/ops/_foreach_sinh_compositeexplicitautograd_dispatch.h,sha256=DqYfQBn55qXnoUBwiaiW0T8dptpB_NeTRAaXICp8PtM,1239 +torch/include/ATen/ops/_foreach_sinh_cuda_dispatch.h,sha256=ZR9siY3t5T0yGh8baMRDyDfem1QXOv41MfYjsWW5GB4,1046 +torch/include/ATen/ops/_foreach_sinh_native.h,sha256=PcA16H8nhg9eLcQlAKH0AT037Gl4n1VDUfWOtwPAFv4,1043 +torch/include/ATen/ops/_foreach_sinh_ops.h,sha256=AyD3tG1OHOVosobFXw7cj5e55z1J-HL2FTOV2hEe3xg,2342 +torch/include/ATen/ops/_foreach_sqrt.h,sha256=QGJyYtGx5_pK38TJ4kAaTW00i3cOD5ALRluZijG42yg,1489 +torch/include/ATen/ops/_foreach_sqrt_compositeexplicitautograd_dispatch.h,sha256=KCDYeq0eRSsJrdNBsKg-xgjw4TWs0Z4w59G7NcIFxZk,1239 +torch/include/ATen/ops/_foreach_sqrt_cuda_dispatch.h,sha256=qn6bQS82-PJid6yksU19GEupBm4JhB6z8YFsHEYVdCE,1046 +torch/include/ATen/ops/_foreach_sqrt_native.h,sha256=Hu0L_QWZk0rO30Ox9ASrVHWAtWgkYLGcR3UrPIl44-s,1043 +torch/include/ATen/ops/_foreach_sqrt_ops.h,sha256=dM_VJreHXO5U6z9b55UnyguccJ4Hf7OHTIFtuYnkTG0,2342 +torch/include/ATen/ops/_foreach_sub.h,sha256=_EbUgHyvVYfGyVoRClzEcRmVITxetnpP56YrMyJKbsI,3920 +torch/include/ATen/ops/_foreach_sub_compositeexplicitautograd_dispatch.h,sha256=hOKkh-18w6BOFIEA4SEoODYkGC5O4cAduN_w_jyOZ3o,2219 +torch/include/ATen/ops/_foreach_sub_cuda_dispatch.h,sha256=F5NRnKE-5ErGvpGjkhKb_XVEZAlgb231zS-phJDyM-g,1510 +torch/include/ATen/ops/_foreach_sub_native.h,sha256=lvR_Nmh6qAlRXLLEwGWxEEM64fmL0dhryFGdYx9Lm6I,2514 +torch/include/ATen/ops/_foreach_sub_ops.h,sha256=_cKVdFUp75SwFKHF1JWlxwvkhbwnMzH_WUkq4okQO2g,6879 +torch/include/ATen/ops/_foreach_tan.h,sha256=_7I0j7mDxBRR3kSaq75qmFwr8vPmoN-JUbTHvVJMTVM,1476 +torch/include/ATen/ops/_foreach_tan_compositeexplicitautograd_dispatch.h,sha256=lLY4NItXa8VBF5uabl7kZuknRSiqHNkGUXbLMGIXuDY,1235 +torch/include/ATen/ops/_foreach_tan_cuda_dispatch.h,sha256=ONrhGzHeYoee8g8XYyPAffn4sTaKIwEcZhrlWM9TunU,1044 +torch/include/ATen/ops/_foreach_tan_native.h,sha256=N5Ohc8bIxv-RvId_TFlq7bd0WbthQE8iv-oI7OxRt5M,1038 +torch/include/ATen/ops/_foreach_tan_ops.h,sha256=9SjxsWf2S-D3MPwnY-m7QSUbAxWXRq08JbvMSzmmRns,2333 +torch/include/ATen/ops/_foreach_tanh.h,sha256=-JOTdt54l6vCKVREf_O9QaPnFYjT_Si3Eagb6Wq35wI,1489 +torch/include/ATen/ops/_foreach_tanh_compositeexplicitautograd_dispatch.h,sha256=yStqmJpT4WVLZVMl1j_TFBWalCd___Owouoc2BNNoXo,1239 +torch/include/ATen/ops/_foreach_tanh_cuda_dispatch.h,sha256=q5k2GcVxPZBFxVDrcgnY46_B08v6nGnGSdv9pEG2Uhs,1046 +torch/include/ATen/ops/_foreach_tanh_native.h,sha256=O9X9kSNDxjuwt1m-lJaeXuEdnvrPa5_PhsPqnYLNAbk,1043 +torch/include/ATen/ops/_foreach_tanh_ops.h,sha256=Y0m_yTJt3l4XBpSABsPgvxb8dHHtrM3W6KvP5h1_cFQ,2342 +torch/include/ATen/ops/_foreach_trunc.h,sha256=H-_8HPF6s-GcQyWa1UIsYGpGwujl4frkPNgXeUfydGY,1502 +torch/include/ATen/ops/_foreach_trunc_compositeexplicitautograd_dispatch.h,sha256=CggimwSCuqV-garTGnMa-8J6cCV88wRb9BF45RbIovg,1243 +torch/include/ATen/ops/_foreach_trunc_cuda_dispatch.h,sha256=sJSlCjErUBZnEN7xlegy38O1v2x45nDmBOp6xUjb1CM,1048 +torch/include/ATen/ops/_foreach_trunc_native.h,sha256=u9-q21wCzFGTxS7pA-hMXqJI1Z5pjl4dnM_csv3lAJo,1048 +torch/include/ATen/ops/_foreach_trunc_ops.h,sha256=7Ic71FFdspzGbqwphxfdp8XhjQQ3d1Awlob1qsl_ab4,2351 +torch/include/ATen/ops/_foreach_zero.h,sha256=7aYbFms3Uq2a_hGDBss2HnSASvdYSbPvB7BGYf9trBs,1498 +torch/include/ATen/ops/_foreach_zero_compositeexplicitautograd_dispatch.h,sha256=_Go_fWuNKmEnWtwKqJaJ0bzx3zSjrZy2INDJgOhUkRI,1239 +torch/include/ATen/ops/_foreach_zero_cuda_dispatch.h,sha256=qV4RIuX7YDd2QnaWNeFI3V2__GzzfBMzOGI-3dI4F7s,974 +torch/include/ATen/ops/_foreach_zero_native.h,sha256=v_AuTLkkmt3Rf3XGSsmBbnZ2OfhsSCoYBwZGneO5zVM,949 +torch/include/ATen/ops/_foreach_zero_ops.h,sha256=mW19R0-S7SvWKnCNi2iKOuiSblnRYjLq9F6-UxtFHS8,2351 +torch/include/ATen/ops/_functional_assert_async.h,sha256=W6HDTE5JmdmJijszzDMKXVcoTwNzH620DjIEck0cpZ8,1087 +torch/include/ATen/ops/_functional_assert_async_cpu_dispatch.h,sha256=nhBcOZ4gZZckPfaUCYVo-tS5oCb_rapoJbI-L63C2yI,1051 +torch/include/ATen/ops/_functional_assert_async_native.h,sha256=BEZoN2QPpAhRxhHvq5ed_foEIeKnRCLi0t3bv9okUTA,815 +torch/include/ATen/ops/_functional_assert_async_ops.h,sha256=Lt0WTqU8kGmMGdaMUxycYAj6EY5D10SMsWKBtUaVPGo,1466 +torch/include/ATen/ops/_functional_assert_scalar.h,sha256=wXUJEP5VjMC-O_0mRidnwFg-H7dfQSJLLi9n3KqNecw,1083 +torch/include/ATen/ops/_functional_assert_scalar_compositeexplicitautograd_dispatch.h,sha256=kB5oy61fM8HprD-QAuiwnabEolmjhAPtdAbBblfCDys,1096 +torch/include/ATen/ops/_functional_assert_scalar_native.h,sha256=y_MoX99UnZvdpCzWghOAI3tzKZJfPKmMay0ZYK40tEY,808 +torch/include/ATen/ops/_functional_assert_scalar_ops.h,sha256=UUrhCEyPGBa2po3N5Zamd4DHZ5b9wMi7coca3KrqpQU,1458 +torch/include/ATen/ops/_functional_sym_constrain_range.h,sha256=GUUOhmT0c_ukEp6TAHVcoLwJYeAHrpR7PQydxspTL3E,1140 +torch/include/ATen/ops/_functional_sym_constrain_range_compositeexplicitautograd_dispatch.h,sha256=_Sj45uWlcBgpSP6ZL5HduisY0SJFfQH8rp7ObaBJssY,1133 +torch/include/ATen/ops/_functional_sym_constrain_range_for_size.h,sha256=Je4Y86981gJGLUhJXcsLXL4Vf8opJliaWtkf9e2t3GQ,1176 +torch/include/ATen/ops/_functional_sym_constrain_range_for_size_compositeexplicitautograd_dispatch.h,sha256=OuZ9Bj3usdVqxugoYrje7i32ICHq8oQvkWfstcW6vHU,1142 +torch/include/ATen/ops/_functional_sym_constrain_range_for_size_native.h,sha256=dVKydlWzUtCkLlIigDI1-x0H0lQgz4q7W0nFtkR3-Nk,854 +torch/include/ATen/ops/_functional_sym_constrain_range_for_size_ops.h,sha256=EGIIdkAl_8JeO_I47n18PvjWqzJ01ocid82_fHMrPoY,1603 +torch/include/ATen/ops/_functional_sym_constrain_range_native.h,sha256=bx_QtLkDAJ3hgEDXJh9LcyjfaW8H5mepoI4115yxLMI,845 +torch/include/ATen/ops/_functional_sym_constrain_range_ops.h,sha256=r-3S0vkU-qb3qt2D93aWomcy3p6c1dg5X63BYVWQSSk,1576 +torch/include/ATen/ops/_fused_adagrad.h,sha256=m_RygKv8bERhR8fC1smEKkvcfVDcm0SGWxDjIdL1bAE,6984 +torch/include/ATen/ops/_fused_adagrad_compositeexplicitautograd_dispatch.h,sha256=GKMJr9vxK7Jx3_h48dovgRo_r-kqYAMu3mYfrDGn5oY,3122 +torch/include/ATen/ops/_fused_adagrad_cpu_dispatch.h,sha256=K-5jeNGchNTjQar7CyrpkIH7wolF2XzQISR5JYFYcNI,1546 +torch/include/ATen/ops/_fused_adagrad_cuda_dispatch.h,sha256=Ssu2ujMcrLLilFm_KTZFRbshE9kN1BSPhG1VhVMak6M,1548 +torch/include/ATen/ops/_fused_adagrad_native.h,sha256=Rd2-cIuFk4iAZh8c5SwtSq1U7fZ1EiZVtnnn_YZl1pk,3468 +torch/include/ATen/ops/_fused_adagrad_ops.h,sha256=uqpMtJzCSfY3RU9KPVzTzLpq2pDXXJ-HCw9JVo9MB98,9870 +torch/include/ATen/ops/_fused_adam.h,sha256=4gu7b8llgCs-MKBqdfhT2Gi4eK2uZXeiV-3x6vxZk-I,8657 +torch/include/ATen/ops/_fused_adam_compositeexplicitautograd_dispatch.h,sha256=MkeYXsYf3P7p1ql2q88jJe44WuQbs8fh_0Wa74Syh38,3680 +torch/include/ATen/ops/_fused_adam_cpu_dispatch.h,sha256=gAqHh0CTO7D0BDpnkIwMonn9Zgc1At8562mfd0YCctg,1706 +torch/include/ATen/ops/_fused_adam_cuda_dispatch.h,sha256=AnSRyMEDkoCayIRY_1QTbU9HPS35WtoFRTSeka8sqUE,1708 +torch/include/ATen/ops/_fused_adam_native.h,sha256=KMRl1U7-wuGu1Oa8MxYhhA8VKtUMRoFkCf1MqDJJWOg,4186 +torch/include/ATen/ops/_fused_adam_ops.h,sha256=0er_m6NFg3gGlz4AfvbmNgzq7CWrNdlafTL1mN6XAlc,11848 +torch/include/ATen/ops/_fused_adamw.h,sha256=gjcLKnseiuOg1DjEldDdxeumsWBJdmcmt3KW4iS1_2M,8682 +torch/include/ATen/ops/_fused_adamw_compositeexplicitautograd_dispatch.h,sha256=pRd-OIed7QKpcRGw_26CtP7sAx5Hq4nHkemonbGbJew,3686 +torch/include/ATen/ops/_fused_adamw_cpu_dispatch.h,sha256=T3-O1luEVQZE-7Oi8CyvV0lUrmPgep_UduNsyTMzyNg,1708 +torch/include/ATen/ops/_fused_adamw_cuda_dispatch.h,sha256=uf92VyZ13criF2iWdLabMYGg_uTrmCxQb8-r0ovRLQ4,1710 +torch/include/ATen/ops/_fused_adamw_native.h,sha256=kestFLIiQQnc-1OBlgZsqVlA_roPQInMAwKk_Co1gIw,4194 +torch/include/ATen/ops/_fused_adamw_ops.h,sha256=SFRU5tI9ZXYpEThmlfQzOXUkQ0AOAGfKr7gbwrYXWQ4,11866 +torch/include/ATen/ops/_fused_dropout.h,sha256=NZmoa_Pzhz_doB-Mw6O_9PFAacxLXXIsMFRjEgCcFIM,1904 +torch/include/ATen/ops/_fused_dropout_compositeexplicitautograd_dispatch.h,sha256=_2L2YkqjQNGbJsAGg1K5f11MvRoKqpEATL6jTTdrA0A,1350 +torch/include/ATen/ops/_fused_dropout_cuda_dispatch.h,sha256=Meiu-cfclgDAa-Kw0Sh9Wefnld2FYAlMQok0uaArnzk,1076 +torch/include/ATen/ops/_fused_dropout_native.h,sha256=BOHrkLwgDv_FAdEVQnPXk4SkzEhYEH3h-ubGm3TLKWQ,1019 +torch/include/ATen/ops/_fused_dropout_ops.h,sha256=7djoXYEL90MSOB0PEs89tonh7QZO4hYuEwDIkHDnc4k,2461 +torch/include/ATen/ops/_fused_moving_avg_obs_fq_helper.h,sha256=NVf_adVLWAUqxqNu7AnxvjEDM_DGAZhsI32GlNDiIiQ,5029 +torch/include/ATen/ops/_fused_moving_avg_obs_fq_helper_compositeexplicitautograd_dispatch.h,sha256=TA3YjyVb7hYBuZ0c3G_7AW11HfJfSDOifddUMdK7xDs,2339 +torch/include/ATen/ops/_fused_moving_avg_obs_fq_helper_cpu_dispatch.h,sha256=1R_GDqoo9w3O_9Iozqo2WsSdAAq0M8RN_59lW3LJCe8,1325 +torch/include/ATen/ops/_fused_moving_avg_obs_fq_helper_cuda_dispatch.h,sha256=7QOJ3Oe2OmUakqOaPCbVsZs7IzHh8yDM_Jwqs20Z5DI,1327 +torch/include/ATen/ops/_fused_moving_avg_obs_fq_helper_native.h,sha256=yO2HLpfvuro99T8ygD8_BJ6PBz1javZPxP4q5uc7fQ8,2418 +torch/include/ATen/ops/_fused_moving_avg_obs_fq_helper_ops.h,sha256=V6ywNUALozA4Q_D5puIT3P_r8hgwmJOmmYLJUwPvdaI,6128 +torch/include/ATen/ops/_fused_rms_norm.h,sha256=GOt2xf3p0Nd53N83eXAowzyXj2dI-1mEP4MQ2n07wfQ,1155 +torch/include/ATen/ops/_fused_rms_norm_backward.h,sha256=Nuf4HhveJzXXyqs3IV65tt8ivgpsL1O5SgAWYcnUg3Y,1313 +torch/include/ATen/ops/_fused_rms_norm_backward_cuda_dispatch.h,sha256=57IUFwQsfPEfaKU4sPn9Fz4tUvIzUnHrNEsFgfH7l8M,1186 +torch/include/ATen/ops/_fused_rms_norm_backward_native.h,sha256=ZZNH4XLvDUU7L--pgo4qascNVAnTBCkw6ZptrVBmWhQ,945 +torch/include/ATen/ops/_fused_rms_norm_backward_ops.h,sha256=n_I3yJ0jlX65-DYDGjjVqnPESnxmc0QEdVr8bLr5e6E,1892 +torch/include/ATen/ops/_fused_rms_norm_compositeimplicitautograd_dispatch.h,sha256=mt-FKhSXc4s3WrDg-YIV4RVjsc7in3tT4Q2Ju7At7fE,1160 +torch/include/ATen/ops/_fused_rms_norm_cuda_dispatch.h,sha256=aq7kf92EtEoo5v_AZn8lO1hU1-erwRw6Nj_1lvt1OI4,1118 +torch/include/ATen/ops/_fused_rms_norm_native.h,sha256=_I8UfSoAXZtYXYTnlzwpD64VIcIWBZmm6I59DHSpk1w,1076 +torch/include/ATen/ops/_fused_rms_norm_ops.h,sha256=2XT_ijz0-BLZpO2E_NHDk-cH-DYf7g3Ih7yutXDP_gk,1671 +torch/include/ATen/ops/_fused_sdp_choice.h,sha256=_HEFRv_VRlLRIAoAyRVHjVSUT1FgYIpbNQCCHhz7hV4,1347 +torch/include/ATen/ops/_fused_sdp_choice_cpu_dispatch.h,sha256=aORjujP3gbUp4GtzJ8i7Nks5x4_BZFBqyaGT-C3sW1M,1196 +torch/include/ATen/ops/_fused_sdp_choice_cuda_dispatch.h,sha256=Cu9tZ73xM32Rd5xXD89LUophfZ-EhWZyQVDoUqG3eoA,1198 +torch/include/ATen/ops/_fused_sdp_choice_meta_dispatch.h,sha256=liX_lECLD9EhJbEdSxZXwUEqoc8SVq5yE0AsT6H-WVE,1198 +torch/include/ATen/ops/_fused_sdp_choice_native.h,sha256=VB43OsQZq_zFD2XcsIWclu77TLeUqnpfyppCP-gePaw,1518 +torch/include/ATen/ops/_fused_sdp_choice_ops.h,sha256=3IThPWmUDTbjFeFgtiiErqcdIPv_L4WGtXRFnBYygS0,1853 +torch/include/ATen/ops/_fused_sgd.h,sha256=92RH6gah9UQ13vQk6Ivw1OWA7YfhxWI4-APYavBwEBA,7480 +torch/include/ATen/ops/_fused_sgd_compositeexplicitautograd_dispatch.h,sha256=s3wzfP7iGYLfWyUbicFriGOC2_DK81VJz2NPunVB71g,3210 +torch/include/ATen/ops/_fused_sgd_cpu_dispatch.h,sha256=rPLpZowdauA6q7UbgoKb2FzHK5AMN9kqUxZmLsclxCU,1584 +torch/include/ATen/ops/_fused_sgd_cuda_dispatch.h,sha256=kJv-9IWn3Vx-CT_y8SYTDcg7xvpfKYhGwl9I7AV2Snk,1586 +torch/include/ATen/ops/_fused_sgd_native.h,sha256=sJgU4NMnCQAozx9UTDqJ74befOYo00Sjyw9-vJP7JF0,3594 +torch/include/ATen/ops/_fused_sgd_ops.h,sha256=RU2ZpSyTrED0K7FO5oFc2ailR951pwMA3E1_PcaIRxM,10132 +torch/include/ATen/ops/_fw_primal.h,sha256=eqnSVoaz_S1dGjcflCN7C3SDn4wMk84GlECSG7h7X7Q,761 +torch/include/ATen/ops/_fw_primal_compositeexplicitautograd_dispatch.h,sha256=byVDwgcrFjUY_7-vwtuO5cM3HGhNKnyxF3Cdpq-LvIk,1037 +torch/include/ATen/ops/_fw_primal_copy.h,sha256=EPEcdpjDqsfuOYmrSXlzF59IWbxdrdTUkcPxQV9pc2g,1470 +torch/include/ATen/ops/_fw_primal_copy_compositeexplicitautograd_dispatch.h,sha256=xljGBzOGRheaqvv8CsMovYmard6RU1bfuEElvX0fx7I,1169 +torch/include/ATen/ops/_fw_primal_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=eWCHGSGN23_AouEUgK55Bx8bmY7S2StCo3BAvcy3tpU,1068 +torch/include/ATen/ops/_fw_primal_copy_native.h,sha256=3COu1iUg5bUftO7xZFq7IjBnHo-MIPfKPoxsPkhjK8s,856 +torch/include/ATen/ops/_fw_primal_copy_ops.h,sha256=BqPn0y-ejD9W_kihe-AMQUNNtMnZRiFkHttyO-iUurc,1955 +torch/include/ATen/ops/_fw_primal_native.h,sha256=1hgOMQ8BKAJvouhw1jmoQBjPirudECnFhFovpKzGKtg,749 +torch/include/ATen/ops/_fw_primal_ops.h,sha256=xlvOAkCdGyh5vDHfiWgt4HkytX3h4P-3ICdZf13iVQw,1279 +torch/include/ATen/ops/_gather_sparse_backward.h,sha256=OsMhYE-vtK8MmzizCLwyv_I1wcUrCPPyLrRQd-TvO7o,1077 +torch/include/ATen/ops/_gather_sparse_backward_compositeimplicitautograd_dispatch.h,sha256=WlxYG619OdDjb6h7qXMC84sINUC11CFXhwintaKzxS8,1099 +torch/include/ATen/ops/_gather_sparse_backward_native.h,sha256=Q5mHqsWbalZR7Qz4lMR85b1f8NBzQoqpo8rXEPFQqy0,811 +torch/include/ATen/ops/_gather_sparse_backward_ops.h,sha256=4P-fVu4UPm9K6xXA4ujhTfuAyCDy7rl04P2CsNq-0hw,1475 +torch/include/ATen/ops/_grid_sampler_2d_cpu_fallback.h,sha256=3AGo7iv7NQ-mVBF_e04qljzyNgJ0Gp6aiY4R0AtLDZY,2195 +torch/include/ATen/ops/_grid_sampler_2d_cpu_fallback_backward.h,sha256=JjkgzSbPqWNM6510ku26ajgU6il0TtHpP7ZzvIdW3Z0,1347 +torch/include/ATen/ops/_grid_sampler_2d_cpu_fallback_backward_compositeimplicitautograd_dispatch.h,sha256=LR-I9YludffKlEC2iHwYh5FgcE0BnGOen9auGfIwqKE,1203 +torch/include/ATen/ops/_grid_sampler_2d_cpu_fallback_backward_native.h,sha256=dinXnigeucoYbz-iQ29Rvx-DuTWHhy4KJQEj8keo3XA,915 +torch/include/ATen/ops/_grid_sampler_2d_cpu_fallback_backward_ops.h,sha256=0Fn7oGVShuglrhzNjfscLsc83xiJiondgoJMCE3Td0o,1808 +torch/include/ATen/ops/_grid_sampler_2d_cpu_fallback_compositeexplicitautograd_dispatch.h,sha256=4xPbK_VCXWXbku8LGhy_EQ8rHjF-qXGVxQWm5iBeuEA,1532 +torch/include/ATen/ops/_grid_sampler_2d_cpu_fallback_native.h,sha256=F2bv-kkWS8LtG985EK7-rFfv7dzPnQkKoVsY43xWOBM,1046 +torch/include/ATen/ops/_grid_sampler_2d_cpu_fallback_ops.h,sha256=b5BtmpGqmN7zGhZCp4H_Tlm92EzWt4Nwf3BfHYTfm20,2563 +torch/include/ATen/ops/_grouped_mm.h,sha256=Oknxhi_RW3urjNu3gLQSruaE2B6MhgYU1l7UgEJXDYU,1192 +torch/include/ATen/ops/_grouped_mm_compositeexplicitautograd_dispatch.h,sha256=-GLNHx9IRx864cXNkMEl-tE5VyOnHiEWYdoS7njmAtQ,1196 +torch/include/ATen/ops/_grouped_mm_cuda_dispatch.h,sha256=vrJzHv9jE17zK1iXs7LvmZj6b39NVtmv6qRRKUEST5U,1154 +torch/include/ATen/ops/_grouped_mm_native.h,sha256=KihZtmkZ6QCB0XANpp5Ek3Kqyo8vwGzLdPWonsUKAe4,1145 +torch/include/ATen/ops/_grouped_mm_ops.h,sha256=WHjBMKMfSyAJuDK-we8TZVcti6doLlEiGVvIcJkAAdA,1736 +torch/include/ATen/ops/_has_compatible_shallow_copy_type.h,sha256=JvzVYninQkma7cCLj7A9Ovm-6gB0INlSFDtXPMGAv18,1035 +torch/include/ATen/ops/_has_compatible_shallow_copy_type_compositeimplicitautograd_dispatch.h,sha256=A1ugji9dhSaxQBwA62uN1QkZakN4DBbZyPC99cEmhYE,1064 +torch/include/ATen/ops/_has_compatible_shallow_copy_type_native.h,sha256=lPEEEyzCgCD6u7MJyB4hxR96aOWkYv1jW5h1H7eFQm0,776 +torch/include/ATen/ops/_has_compatible_shallow_copy_type_ops.h,sha256=y1SQrcX2Hhz77UqvYsir5XBF8hvj2jDTG20N_qN7oA8,1355 +torch/include/ATen/ops/_has_same_storage_numel.h,sha256=JsIte5GuSkCizr-dzT3Y-qpPEnTnpmKt1czMJTT8wMU,998 +torch/include/ATen/ops/_has_same_storage_numel_compositeexplicitautograd_dispatch.h,sha256=yk48siOtnOPaKdXKj8frEKZ671d0YARYf3HvYu_vjiw,1055 +torch/include/ATen/ops/_has_same_storage_numel_native.h,sha256=XBykH_i69Vo2mSYsdX5vqR5K97Jrj39_FQTs1amdzjM,767 +torch/include/ATen/ops/_has_same_storage_numel_ops.h,sha256=gDmTLhUD91aM48v_e6_xkqbHbq8LRFNjAMvqidR9Z4A,1328 +torch/include/ATen/ops/_histogramdd_bin_edges.h,sha256=zGcwlj0CPYmN-MjKFr1NvKIRaurObaVTlzv_AW8Grkc,2172 +torch/include/ATen/ops/_histogramdd_bin_edges_compositeexplicitautograd_dispatch.h,sha256=xC4THPV4Q5X53wg7diS--cg7g35rkBDjhVJXBel6hto,1415 +torch/include/ATen/ops/_histogramdd_bin_edges_cpu_dispatch.h,sha256=iBRVd-tGILfHi0Ya6o7Y3Bo_SHVArwotMbFiYwQnsIs,1154 +torch/include/ATen/ops/_histogramdd_bin_edges_native.h,sha256=zUCxrJaZfkmMbXncGENEN2ob2wger14G4MMgZbyHy0k,1122 +torch/include/ATen/ops/_histogramdd_bin_edges_ops.h,sha256=drxSaAGdAH93INVP456MKlYT8EpE1_sxKZ0_GO85Q9E,2769 +torch/include/ATen/ops/_histogramdd_from_bin_cts.h,sha256=In6rhp37etcyN2SGp370g7BIeER6eXnamicm9NP9RpI,2209 +torch/include/ATen/ops/_histogramdd_from_bin_cts_compositeexplicitautograd_dispatch.h,sha256=DRf3RHIugrMTu2KEQ26ub3wiX9X5v91yeZIMOrFObZ8,1433 +torch/include/ATen/ops/_histogramdd_from_bin_cts_cpu_dispatch.h,sha256=hyTkeFAqjh8eAYDp1tytyedRukkstmq6EemWf6Rq0e4,1142 +torch/include/ATen/ops/_histogramdd_from_bin_cts_native.h,sha256=D4Jr4I1_Jw1YUx5El3AKhrRoD6LZQ_fo1Vuz2-bt4Po,1107 +torch/include/ATen/ops/_histogramdd_from_bin_cts_ops.h,sha256=t-ryxmvxK6SgkDNCfat7NNECgqdOpfzcaY53d23BtYQ,2764 +torch/include/ATen/ops/_histogramdd_from_bin_tensors.h,sha256=XXi3LjXFtO86-EVHXkjK1vedEgDRcs_dtfoOX_7wa2o,2006 +torch/include/ATen/ops/_histogramdd_from_bin_tensors_compositeexplicitautograd_dispatch.h,sha256=qC6e9ppTsrpaTPH5_w38avOMRc8nOcl-Wni-nPLihPg,1334 +torch/include/ATen/ops/_histogramdd_from_bin_tensors_cpu_dispatch.h,sha256=5U3Eq_9aVTfxpTcFux73HC2PSSSM8XgRcVQkfw2I2I4,1085 +torch/include/ATen/ops/_histogramdd_from_bin_tensors_native.h,sha256=CWTma5YlLtHjOW6UNldw6SADVVI9lwVVFZQftca_Peg,1004 +torch/include/ATen/ops/_histogramdd_from_bin_tensors_ops.h,sha256=CSj5COc2SiQNRP28-Ijn_rB0FVylF_0mEh7BKf_8EaQ,2488 +torch/include/ATen/ops/_index_put_impl.h,sha256=yLwFi2tr1vKi3ldSW9AAPMy-pI7HaGMtrPOjZ0FdSgU,2480 +torch/include/ATen/ops/_index_put_impl_compositeexplicitautograd_dispatch.h,sha256=ZdxPYVQN11B2vzRQnVuKHZGjfZX4S6frTHbs-oHjCHM,1565 +torch/include/ATen/ops/_index_put_impl_cpu_dispatch.h,sha256=Eckm0NE-gWbQ0Zn44L4d8Y2Dz3qT3u8X19hh-cDUaC0,1105 +torch/include/ATen/ops/_index_put_impl_cuda_dispatch.h,sha256=51gizcWyfrNX9rKTxHlpJPG0b9kwWzllj7WQtu2pR40,1107 +torch/include/ATen/ops/_index_put_impl_meta_dispatch.h,sha256=uL4nByEuc-KdpaN84KzyUQeO1oMu7NDNdTIAaX5m4Ag,1107 +torch/include/ATen/ops/_index_put_impl_native.h,sha256=HAe0daZdssepvdISf4C51B4-MEfH2Qv_BMtmE46FTMM,1648 +torch/include/ATen/ops/_index_put_impl_ops.h,sha256=-EiIDOjLsULTswoDTDw0D3YuDhis1dA9iLnCFuvUKUw,3527 +torch/include/ATen/ops/_indices.h,sha256=B9bgDB6Hd_qIyHiyX0M52n0QoxAxMcbyZZ17MwT1ahE,759 +torch/include/ATen/ops/_indices_copy.h,sha256=jTYE9cJGJHvQK6ykNMDVU9vdNg1L4HEgzZiYEShcmJk,1351 +torch/include/ATen/ops/_indices_copy_compositeexplicitautograd_dispatch.h,sha256=QgR3pNQjcVbUAgB1S4D1qmC8Pk681CP90LAnVBY7UJc,1135 +torch/include/ATen/ops/_indices_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=2nZ49beNBblP71sAv06BwTiGddig-K0EKRsHlye4Fqc,1051 +torch/include/ATen/ops/_indices_copy_native.h,sha256=lvpN2CAOPXdpfRVS7VW2EzhaCtDL-tLCnSGtE2R4xuM,822 +torch/include/ATen/ops/_indices_copy_ops.h,sha256=5ABJhQinJjUS0SGVDeLJ7Mq72a_BRn1CFjtAObVCYlw,1843 +torch/include/ATen/ops/_indices_native.h,sha256=Bviu9rgkpNQsO54VIvqXwxB03TNrnL1rl-cPc6weVQA,739 +torch/include/ATen/ops/_indices_ops.h,sha256=XEzlLxcR26JtHM4DNJl1AdOL6v5sKTxqOrThUaXwkS4,1223 +torch/include/ATen/ops/_int_mm.h,sha256=vP6kGVBO0FozEkwDY2wr5MoZND_axEJ1PmSpihIJakw,1423 +torch/include/ATen/ops/_int_mm_cpu_dispatch.h,sha256=O-kSdVrNEN3K2hAUmU1M3FJTQ1oEvYVDdL9JOSciC-8,1209 +torch/include/ATen/ops/_int_mm_cuda_dispatch.h,sha256=Upp3HbSSNqd9Dfo1XsegSfge29olCIZiOMyz0Zti9i4,1211 +torch/include/ATen/ops/_int_mm_native.h,sha256=qvUnlJjpTFYJNQzC-JpEo8l-GD2wBdjG0L0r9ZgIzgA,1062 +torch/include/ATen/ops/_int_mm_ops.h,sha256=uzON3HOkVfn-VaHs7Uit0oBm5ZK_vJzNAQaVZiy9-lU,1973 +torch/include/ATen/ops/_is_all_true.h,sha256=7HwG7ClGkY-kMz_dV5rFMnI_mnvuB2Ut2uGGjdV4v2k,915 +torch/include/ATen/ops/_is_all_true_compositeexplicitautograd_dispatch.h,sha256=8dGqPyH1aZXRypFevFfh5i_ku2N7L7Ty0M6QlxCXGsk,1024 +torch/include/ATen/ops/_is_all_true_native.h,sha256=WxZLnnRxQKJCuCvlHPhdGVROUJdc3s8n4ZfGMXRW8B0,736 +torch/include/ATen/ops/_is_all_true_ops.h,sha256=oMy7qgZVxPPzYslsvladgqsUWZG29yn9URUI7ODGLgM,1229 +torch/include/ATen/ops/_is_any_true.h,sha256=KZni9CoGBeA812_m_Sy1sLh79a0gHtt_1tb1G6bfMV8,915 +torch/include/ATen/ops/_is_any_true_compositeexplicitautograd_dispatch.h,sha256=GDp3leGCp9Pk18PoJPnehQHpgo4wEulydPMBKr13DSc,1024 +torch/include/ATen/ops/_is_any_true_native.h,sha256=Qfw9XCWtC3ds_cSjW3HEyHJ7GNjAymuospkoEPs9FhE,736 +torch/include/ATen/ops/_is_any_true_ops.h,sha256=mccte8AhGJ8imAiIRogXRVg_Ae8Ov9g_DQ_8ehDAQaQ,1229 +torch/include/ATen/ops/_is_zerotensor.h,sha256=z1izUiqfNhXX6O-8TUfS5F2dWcfz1uqmbvN97yqN4FI,926 +torch/include/ATen/ops/_is_zerotensor_compositeimplicitautograd_dispatch.h,sha256=RQ2qriVDEWDI96lqyzc_dw4Zlk-dKRjGnNwjEQ7uF08,1020 +torch/include/ATen/ops/_is_zerotensor_native.h,sha256=8M3z83uvLl285t7mhTmotaobg5jq1ePFP8saUIIzlUs,732 +torch/include/ATen/ops/_is_zerotensor_ops.h,sha256=aK9Vwvof9XrPNNaPCy7G1Lk6RWe6TiSfDNOwLjTe1xE,1215 +torch/include/ATen/ops/_jagged_to_padded_dense_forward.h,sha256=y14xK8qzPSQHFtF0waSlBczdikPWmpYMgzlqhtl7Wu8,2374 +torch/include/ATen/ops/_jagged_to_padded_dense_forward_cpu_dispatch.h,sha256=62WMJ-oBtP_AI_9A3tGiF8Hqr1fYQNrceLxb-HOwPV4,1251 +torch/include/ATen/ops/_jagged_to_padded_dense_forward_cuda_dispatch.h,sha256=tGGkmrpliFrP_qc8kimo2rDV6sRw17SnYSKPTpJpGw4,1253 +torch/include/ATen/ops/_jagged_to_padded_dense_forward_native.h,sha256=QdOdnQGTpkkL8uJTOPbcT0eMkkD-eWsRET8LPshguo0,1007 +torch/include/ATen/ops/_jagged_to_padded_dense_forward_ops.h,sha256=_EqMYg0vBmrseAg--3FthFdEx4FOamOi8oxbkCk3RLU,1560 +torch/include/ATen/ops/_lazy_clone.h,sha256=y_BJD4U-ki-BqnrvgqTca4LYQi1dCiRmpwKs5s3WtB8,911 +torch/include/ATen/ops/_lazy_clone_compositeexplicitautograd_dispatch.h,sha256=3Uc8hTM0lw3nM9r3SN1rbsFpr7-szP3ZuIcYjXipa1w,1023 +torch/include/ATen/ops/_lazy_clone_native.h,sha256=-KVgQ1ouT7TjUWaTcFBeJbk0GqhM1vLT-quBbIVfbHM,735 +torch/include/ATen/ops/_lazy_clone_ops.h,sha256=Opv7LelkqSvBnwXj8cAYFSQP9pjaLJCppzpIKe4y_k8,1226 +torch/include/ATen/ops/_linalg_check_errors.h,sha256=nN8ew-8Jee5DaXtUGNb6tZtD7v5FK1pvPjlUq2FlojU,1034 +torch/include/ATen/ops/_linalg_check_errors_compositeexplicitautograd_dispatch.h,sha256=Jn6cmdryebetzoNUxd2GbA6Clx_uEDFYhLBVaHjj-fQ,1069 +torch/include/ATen/ops/_linalg_check_errors_native.h,sha256=apqCF9Nk8pWEzLbsNaEoPhhaUgselsBBp1gH34S1f04,781 +torch/include/ATen/ops/_linalg_check_errors_ops.h,sha256=AU7t6aeSziKIFe4qyTGpRMk4bowjBWHuzFdlbOOyzR0,1374 +torch/include/ATen/ops/_linalg_det.h,sha256=7OAdq-cnH1tOx2qHxRBm4FxoUNJpbU5keNnrYBjTDc4,1739 +torch/include/ATen/ops/_linalg_det_compositeexplicitautogradnonfunctional_dispatch.h,sha256=bKs74yufkRN8TSAEprisvYxHfAdNEb0ZT4oCoeKEWeI,1082 +torch/include/ATen/ops/_linalg_det_cpu_dispatch.h,sha256=orTSclzAkSEuVAIKfJZSMP5F7BVvLx_Lh7ESxOHiN5A,1335 +torch/include/ATen/ops/_linalg_det_cuda_dispatch.h,sha256=tv0iyI66MeotWwWbUi0kMVDhSAXpiPdczKG5cFGGtTQ,1337 +torch/include/ATen/ops/_linalg_det_meta.h,sha256=f1gRAY-pVAFngq2-9844Utz8ck9F_clnXeYbVSVXPXU,823 +torch/include/ATen/ops/_linalg_det_meta_dispatch.h,sha256=VkszfbK7XhaY8_omQxtXhr4S_-OdCCoTbhHb9cajuEY,1337 +torch/include/ATen/ops/_linalg_det_native.h,sha256=dJtiMdRi6W9cxhYUccW6XUJ5ZhWZqlXFFtd5N1tT67c,915 +torch/include/ATen/ops/_linalg_det_ops.h,sha256=UexIu5Ngk5t5hCtvGPzunB_0TFO9ALM_46HiDS7pGDc,2275 +torch/include/ATen/ops/_linalg_eigh.h,sha256=pRgxxSyESWhwCzqE3vy7Eincef9iAhU0pYUOhBiT4KU,2009 +torch/include/ATen/ops/_linalg_eigh_compositeexplicitautogradnonfunctional_dispatch.h,sha256=beXmcF-FRIQUi4G_ATVYBpUHlG8iHdKKXIpvoABg4FM,1120 +torch/include/ATen/ops/_linalg_eigh_cpu_dispatch.h,sha256=oXCjYSY9MDYZvrQg9r_LYGw6yO_u9uU8bu7Ut6-sQJ4,1424 +torch/include/ATen/ops/_linalg_eigh_cuda_dispatch.h,sha256=3ECkpLJwdCXaklrZu6m3_xeQa0TOJceBphGOvvIPpdc,1426 +torch/include/ATen/ops/_linalg_eigh_meta.h,sha256=IVjTv1swP6esVMlYBJYmkjSTFD4lJnJVkOMchtHdfMg,863 +torch/include/ATen/ops/_linalg_eigh_meta_dispatch.h,sha256=6BXt1HovirmqvMYO5-hjX9aVyZv8jPKKx6PTH3UZ_Gw,1426 +torch/include/ATen/ops/_linalg_eigh_native.h,sha256=TYq7E-8EwVBrZHz_sKPIV38qg8yUxZ7Sb2N3y466QxY,945 +torch/include/ATen/ops/_linalg_eigh_ops.h,sha256=leg8vw1gKVwoen9nI0HKAYYGtYIfKiCbTQg8A-FjB6E,2468 +torch/include/ATen/ops/_linalg_eigvals.h,sha256=T9GN8LIoVrqq071U2NlrNf81IZ7ucgp8yvtb9Zea5VI,927 +torch/include/ATen/ops/_linalg_eigvals_cpu_dispatch.h,sha256=G8NZm4VDaffheSe3GIrnOCa8yzthMvhZJnmmBc39H28,983 +torch/include/ATen/ops/_linalg_eigvals_cuda_dispatch.h,sha256=lTah4XbL8EqrVXrhmHMMrXMSw3pKObt38mgstUQrzPM,985 +torch/include/ATen/ops/_linalg_eigvals_native.h,sha256=uWniTMiY4vVBx3049rzStty0vBDSi48eCFV-_rUh6VY,739 +torch/include/ATen/ops/_linalg_eigvals_ops.h,sha256=m45gYnwjVooaMSq_u-m814LxQ_GNVHERlDC6fy1WVZ4,1238 +torch/include/ATen/ops/_linalg_slogdet.h,sha256=3sAUHeQZBLIvdEfexYshSjyQxSdKQuApc5A34pAyunc,1966 +torch/include/ATen/ops/_linalg_slogdet_compositeexplicitautogradnonfunctional_dispatch.h,sha256=U-YcUlJxCBR6QfUG7p1cAURY7P_giSJdfUsFh77rYIU,1097 +torch/include/ATen/ops/_linalg_slogdet_cpu_dispatch.h,sha256=IusECkYHKucwoYHVxUzncB5YNROOjVJl--glLSadwPE,1428 +torch/include/ATen/ops/_linalg_slogdet_cuda_dispatch.h,sha256=rx0PrV1M5h-NS9e13oMgjq5EjI43VwOJG475LTFP0OM,1430 +torch/include/ATen/ops/_linalg_slogdet_meta.h,sha256=uyrjqpym_MBMCBulrbwZmwt4KCylcEdLI2Iz_XyqTbY,827 +torch/include/ATen/ops/_linalg_slogdet_meta_dispatch.h,sha256=Wk7bilFLzFAQURTXnLsHlHs2dQZAR0ErPIxmIjNKxeM,1430 +torch/include/ATen/ops/_linalg_slogdet_native.h,sha256=UeJc2hENJ6S862TDnP6SnQm_8lGEorqharLmWPSVVIg,955 +torch/include/ATen/ops/_linalg_slogdet_ops.h,sha256=sALoNjfl9hSjX5NWMzJkdBv560NgMP_ZR9STrWlEBdQ,2479 +torch/include/ATen/ops/_linalg_solve_ex.h,sha256=dFYgvtzzgEDJQJy1w_isoXUR900CGivuSdjlkTgUALs,2360 +torch/include/ATen/ops/_linalg_solve_ex_compositeexplicitautogradnonfunctional_dispatch.h,sha256=xRoO0ptz9eb3VL6KLzuMokk9mKwuN2qc39mgWYX4gaQ,1161 +torch/include/ATen/ops/_linalg_solve_ex_cpu_dispatch.h,sha256=oajvVMzPYPDSWaZNCaPEKH7TjQolwRnG2c62BfXVMXs,1603 +torch/include/ATen/ops/_linalg_solve_ex_cuda_dispatch.h,sha256=XZzsQrJYUa5NpXGFjAFAwV_oTB3pfhRMV93CXjvrMs8,1605 +torch/include/ATen/ops/_linalg_solve_ex_meta.h,sha256=zjTWANQOPPa5oUklsIQv4DLWCWb0s3X9mUcLWq2C_gE,880 +torch/include/ATen/ops/_linalg_solve_ex_meta_dispatch.h,sha256=xyp25fmuR2ZxonzHqqRMLpaNXdDnewcf4F4FsWdCCEM,1605 +torch/include/ATen/ops/_linalg_solve_ex_native.h,sha256=7Bo6VLU6GULd681DXVVz8vHDQLofuCD2nruWDHYcVUY,1007 +torch/include/ATen/ops/_linalg_solve_ex_ops.h,sha256=dW2Z_nCry3rR65vH3ZuN5BqYTyrhHna5wQVMIFbHw2Q,2853 +torch/include/ATen/ops/_linalg_svd.h,sha256=rNbYo18rgipCI1IRuGBhrnJ3zEZ0kX8amTfIyGuEUVE,2224 +torch/include/ATen/ops/_linalg_svd_compositeexplicitautogradnonfunctional_dispatch.h,sha256=nzl8wivTY3HCfFtAqobddkPz2H7UJhpkXnfrOJwO7HY,1187 +torch/include/ATen/ops/_linalg_svd_cpu_dispatch.h,sha256=OW1qhWXr2EKS4p6R3SnE831kldRJSHMfJUudywrO79c,1604 +torch/include/ATen/ops/_linalg_svd_cuda_dispatch.h,sha256=grQTlXIQU9rWvdsiBc5y3JieZzwdS-NLJMwaWgRhMLw,1606 +torch/include/ATen/ops/_linalg_svd_meta.h,sha256=PAJddROtT27cyo1bPzNE3E15nrqliYQRCE44Pd2wXKg,902 +torch/include/ATen/ops/_linalg_svd_meta_dispatch.h,sha256=OqF4rnwzKOJUq1Uo8ZQwe6prqyhwo8EWwVs-0e9vK-s,1606 +torch/include/ATen/ops/_linalg_svd_native.h,sha256=BWyvEaKXH5ehBTbEYQiulTqrXNzKaTTYB7Pojg6tlAs,984 +torch/include/ATen/ops/_linalg_svd_ops.h,sha256=AT7NxPanqKGUyycJ0dGS8t8yo63SmMwRb9KEqiLcmcs,2755 +torch/include/ATen/ops/_local_scalar_dense.h,sha256=YdQi4kyJSjnkOxmDgn58MVsByVP34zT6kbhxdOhUxqo,943 +torch/include/ATen/ops/_local_scalar_dense_cpu_dispatch.h,sha256=B4RkqORNP85-ldpilHuVkSnglFod9vSkXvlXBcyAS1k,987 +torch/include/ATen/ops/_local_scalar_dense_cuda_dispatch.h,sha256=SJLgmAc1nEEO8_JOc0LNeCjakVubV2gxI0cGkcX8Gz0,989 +torch/include/ATen/ops/_local_scalar_dense_native.h,sha256=IGmKiqohSHMVzGSGZI48oyDqilpmkGxWKTQbV7Vzwu4,819 +torch/include/ATen/ops/_local_scalar_dense_ops.h,sha256=JocN89AMOnwG7MlkC8N_P5zJjXqMjAial5wlvp4IfRw,1250 +torch/include/ATen/ops/_log_softmax.h,sha256=Vc17KWDatvvzl_jFAiDtSib5rKPaNJOScIWSRAEJboM,1587 +torch/include/ATen/ops/_log_softmax_backward_data.h,sha256=cENGT2LAJCsZuaV3qTr2DgI8kxQixrl9BRo1nH9VTzg,1970 +torch/include/ATen/ops/_log_softmax_backward_data_compositeexplicitautogradnonfunctional_dispatch.h,sha256=31ElJCAOKNJOT9j6ScR1aADbeWtcGR_rZX8-wWLI-Ho,1139 +torch/include/ATen/ops/_log_softmax_backward_data_cpu_dispatch.h,sha256=Da92Ve5wa9zL1poYggLwMNMafOjZOwxsNnVhOqlwj2A,1416 +torch/include/ATen/ops/_log_softmax_backward_data_cuda_dispatch.h,sha256=kq12AV2s0b0g51RsYhVE_59tGSfi_axRN_GK_InDxxc,1418 +torch/include/ATen/ops/_log_softmax_backward_data_meta.h,sha256=RevOxSYwpFwekZx6a4t38aH-7nTFT_eb8SZ_AAVCD5w,916 +torch/include/ATen/ops/_log_softmax_backward_data_meta_dispatch.h,sha256=GxbPLRJwDak0NB8zPNjxu1gjf0X3xrUrqOSoWv9PssM,1418 +torch/include/ATen/ops/_log_softmax_backward_data_native.h,sha256=54HTvaEO-PloYuHc4NsYNc5G67oJuHbV9k2M1pKfqT0,1238 +torch/include/ATen/ops/_log_softmax_backward_data_ops.h,sha256=7AR2cy_pkPWl0H5q1t3uv-rLLlZZSvD9QfITzxrhgb0,2421 +torch/include/ATen/ops/_log_softmax_compositeexplicitautogradnonfunctional_dispatch.h,sha256=bfKJtzt_jZ_HHW_KjGEeoMFMM-cMAjz6-rbCTtufgzI,1083 +torch/include/ATen/ops/_log_softmax_cpu_dispatch.h,sha256=iGpInGk53v4qMD1ti-0Lsptov0pjY8tWmPVq6q3M83w,1248 +torch/include/ATen/ops/_log_softmax_cuda_dispatch.h,sha256=VC_ulzLlh443M41Ba5uOVDD4LK3Hf2lG1S2ULps3jdc,1250 +torch/include/ATen/ops/_log_softmax_meta.h,sha256=cQDb6O1X-OksB9qIQMj3iMrFkyRevOVCCsP_W0No4gM,860 +torch/include/ATen/ops/_log_softmax_meta_dispatch.h,sha256=xl3kcn8NY_8mPCD3z2bfxS_BEEKBIYD71LyUORkKS1A,1250 +torch/include/ATen/ops/_log_softmax_native.h,sha256=laZ31Pmq6KA045SMNjHp2Xi2wl5TBs-oqDQ9TPv_0g8,1094 +torch/include/ATen/ops/_log_softmax_ops.h,sha256=dcDZPT41LhVi8xoPJwsx6vIMrG2zYUyq5c5o-ars9n0,2057 +torch/include/ATen/ops/_logcumsumexp.h,sha256=k1kTuCmZWazs-DrmDS-NWlpflZKZ2r_O-CCGxk6LMg8,1432 +torch/include/ATen/ops/_logcumsumexp_cpu_dispatch.h,sha256=xOQdURtU8lDYB9qoa5IWk5c2dFWyIAvQb8z0EHIHLr8,1191 +torch/include/ATen/ops/_logcumsumexp_cuda_dispatch.h,sha256=TfCloLY4vg-Xun6dMYv31tNQdfuLsw66VpWmga77WUE,1193 +torch/include/ATen/ops/_logcumsumexp_native.h,sha256=Rm-xxbppAG4ZkMUZbcR5wj7W4clKvmggfLHFr9ljDjs,1038 +torch/include/ATen/ops/_logcumsumexp_ops.h,sha256=eyCNGjqtjok3vbXjJcw436KisudTv8C6jEZeDXu0-p0,1931 +torch/include/ATen/ops/_lstm_mps.h,sha256=Q8q4tEYEna7gGmLQZWkymWXC6Y1Fk6xVI9RanVHS1F0,3198 +torch/include/ATen/ops/_lstm_mps_compositeexplicitautograd_dispatch.h,sha256=veskHXK-6LMES7KxDpiCVjpQG_xA4VhcGS-3XCX8VAs,1769 +torch/include/ATen/ops/_lstm_mps_native.h,sha256=-si0UsLrZdgtcgTosZhKkcRVjfKoHQ5TJgcegPdp2Pw,1078 +torch/include/ATen/ops/_lstm_mps_ops.h,sha256=OAP9-bU8ddOeLRuDHIavhyyeK8pMXYCJY7d-eArn8HU,3703 +torch/include/ATen/ops/_lu_with_info.h,sha256=bAzbZk274x74UBS70O7zYWFpM0tZLjcidN1hkvQBsWI,1091 +torch/include/ATen/ops/_lu_with_info_compositeimplicitautograd_dispatch.h,sha256=pprMtCFldmT7wZ5VLhzDukxs74S7ZP9ton1aaZ8vioY,1102 +torch/include/ATen/ops/_lu_with_info_native.h,sha256=4UmSNjUC3z80AMPEsBspYd4gDQd3bokM3mlUvaf9u14,814 +torch/include/ATen/ops/_lu_with_info_ops.h,sha256=EPoJ9siquxaVIpnE8CpuXCg6yDjSJziMK-9sneuQ_M0,1488 +torch/include/ATen/ops/_make_dep_token.h,sha256=L4RMR-RO4zC7Aq0VldcN5WoMQZZ9YdCfo4XR7rW4Zvk,1797 +torch/include/ATen/ops/_make_dep_token_cpu_dispatch.h,sha256=aSM4FB2peO1e0nita16J7I9ON3qOWJd62N4OJCsufXw,1284 +torch/include/ATen/ops/_make_dep_token_native.h,sha256=f-1ezQBz8VLD9t3hDX3gv2zX0CVA8bGvCqyr0txeNTI,939 +torch/include/ATen/ops/_make_dep_token_ops.h,sha256=CjR3gH5mAK7DvPeMaYcaD9U9m-du5F4YfcuA5NyLxhQ,1818 +torch/include/ATen/ops/_make_dual.h,sha256=kShiyoMAx4XfV722yNcvJRqVkrL9dSZG9eDj0O-JIOk,1005 +torch/include/ATen/ops/_make_dual_compositeexplicitautograd_dispatch.h,sha256=_5LzYcN2OtDkOnxlHaGTUs8pQU1vYMPSiklhLw_QZrQ,1067 +torch/include/ATen/ops/_make_dual_copy.h,sha256=gvng4RVbzjFRg2cbfFIxoe5bDZfDYEpfsGZYSToTzQY,1647 +torch/include/ATen/ops/_make_dual_copy_compositeexplicitautograd_dispatch.h,sha256=iL8tCYcu0SelFb5FIs6kQZpsWiMZvvAimWeqBojnb8I,1229 +torch/include/ATen/ops/_make_dual_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=QciZdYPYQHzO5ITk-3_BNgLFiVlAPpcCga1uV0fc3KI,1098 +torch/include/ATen/ops/_make_dual_copy_native.h,sha256=46emE78H2drJ1kU2hAr0a7niFnkSyCcrSGHljHSGXtk,916 +torch/include/ATen/ops/_make_dual_copy_ops.h,sha256=F21kvgkZxmJkJINPnF1duFWK4YJo56QxGqZNc57-TUY,2151 +torch/include/ATen/ops/_make_dual_native.h,sha256=PmcU0bylU7qk6ArXzWZsAa0wEeDDCgjrKe1BjKtzRlM,779 +torch/include/ATen/ops/_make_dual_ops.h,sha256=_-9UOxoXCUdh_Pu7PgNIUH05cCqz4-wVt26rUANLl0M,1377 +torch/include/ATen/ops/_make_per_channel_quantized_tensor.h,sha256=Nlm-3RbfYmYBuzosO9Doo7whGxir74q4q6lZf5j2LI8,1978 +torch/include/ATen/ops/_make_per_channel_quantized_tensor_compositeexplicitautograd_dispatch.h,sha256=ub6HPt7XX-MKCXTfAL70BWI7Scs9k8hXoSGKj2Yxjf0,1319 +torch/include/ATen/ops/_make_per_channel_quantized_tensor_cpu_dispatch.h,sha256=SCf4HJ2Im114u_Bq1wzvvyl29lBfoKkllpOhsJb9zSg,1073 +torch/include/ATen/ops/_make_per_channel_quantized_tensor_cuda_dispatch.h,sha256=6mLl-TQM8YIUriwhJoGVhe7rKe1uq7L6NtjRY3lEL2A,1075 +torch/include/ATen/ops/_make_per_channel_quantized_tensor_native.h,sha256=ZfAJxbGdz1eD4iiaZ8Casp1yI5Tu39cYiM_OypYMOzM,1166 +torch/include/ATen/ops/_make_per_channel_quantized_tensor_ops.h,sha256=HsnKiZ4jnftpDi4LYEiOKELDKsZTqgbpnSYBqyoB8CE,2437 +torch/include/ATen/ops/_make_per_tensor_quantized_tensor.h,sha256=eW6yd2Yu7gndltfIQVWPar92bhA1lXi-C7rFcdnygKQ,1797 +torch/include/ATen/ops/_make_per_tensor_quantized_tensor_compositeexplicitautograd_dispatch.h,sha256=mancFkP3TRUbu4vM2Eeems9-OoZD-RPbSOGhHy-SVJY,1243 +torch/include/ATen/ops/_make_per_tensor_quantized_tensor_cpu_dispatch.h,sha256=MZXM5SWZCJVWO8jjfZp1_isKyp83bzP3CovSLx0UZug,1035 +torch/include/ATen/ops/_make_per_tensor_quantized_tensor_cuda_dispatch.h,sha256=Sacy14ZrAHsZTeWpscCnTS34ZHfUZ8jwSOdm3BtxI1Q,1037 +torch/include/ATen/ops/_make_per_tensor_quantized_tensor_native.h,sha256=odWNKoJcIz6RAw76S-YuHKb_GR3zy7EVLGxspffxwNg,1052 +torch/include/ATen/ops/_make_per_tensor_quantized_tensor_ops.h,sha256=lbdp-9kHyX5-N53dtXG8bRDj-expygmvKS8JENwNN74,2191 +torch/include/ATen/ops/_masked_scale.h,sha256=2l0PqbGWQO_CpqhyEpXltfmyAa99oBH4qXiTHG2iS8Y,1585 +torch/include/ATen/ops/_masked_scale_compositeexplicitautograd_dispatch.h,sha256=CbCAXOjrQSx4NE904hBOGVejXfLxIj4j1Xt2OWXoyts,1213 +torch/include/ATen/ops/_masked_scale_cuda_dispatch.h,sha256=09MMY41P8TkQESTMppFHDy99lCGM_H0LsyI_-UdWH14,1022 +torch/include/ATen/ops/_masked_scale_native.h,sha256=glMoa-DUeZjO4l-zd7wbpNbP6VzzHtOkGJaH-H2kT4Q,904 +torch/include/ATen/ops/_masked_scale_ops.h,sha256=KJnnCB5izfAv0SEdBb09XryasK1bkqo38fQFiApS9n0,2107 +torch/include/ATen/ops/_masked_softmax.h,sha256=hif_h_cXz_HLZrm5MBR0-8CJsYw3UR0ocuMm0ElIbmQ,1917 +torch/include/ATen/ops/_masked_softmax_backward.h,sha256=dNeFW72xVQiuOaOHhVRGpcV6PeGYSo2fC6yrmqd9cI0,1986 +torch/include/ATen/ops/_masked_softmax_backward_compositeexplicitautograd_dispatch.h,sha256=QYfH6D1cLPzb1TWcxCI1Qq7y_qlDKcb8jpsXeVyMuec,1350 +torch/include/ATen/ops/_masked_softmax_backward_cpu_dispatch.h,sha256=O-F-uzYX3b3Y-5ArdAcAAU6R2CAbOwdNhkMiHNw0b9k,1096 +torch/include/ATen/ops/_masked_softmax_backward_cuda_dispatch.h,sha256=hN3CgsvM4rxDBeMzkpIp00PS_EZK8YIygocw5UqE98s,1098 +torch/include/ATen/ops/_masked_softmax_backward_native.h,sha256=-scXyc1NA9QFNW1mUqDpCpFYkORstxazi29e4q5BQUs,1220 +torch/include/ATen/ops/_masked_softmax_backward_ops.h,sha256=7F_9wVT4_BfGX_TAHF-tCiWO91qBhWU1_p9JbWeiD9c,2497 +torch/include/ATen/ops/_masked_softmax_compositeexplicitautograd_dispatch.h,sha256=-zRxlmj8qQPkIAxQJk4B6gLxRDXej_d6M0ofM9HLV6Q,1351 +torch/include/ATen/ops/_masked_softmax_cpu_dispatch.h,sha256=8J5e6cVoL56S5v5ZHxY1oSSPsS877OCydHQhc8jA8-o,1104 +torch/include/ATen/ops/_masked_softmax_cuda_dispatch.h,sha256=fwISicEL5mnjA3w1UmCrGocbDbHA5b0UdWcWN_Emvuo,1106 +torch/include/ATen/ops/_masked_softmax_native.h,sha256=7CvF2U2YXTC0anqzpI14R8TEFoeEF8_82RVOBwJU2jc,1229 +torch/include/ATen/ops/_masked_softmax_ops.h,sha256=aoI36gcmhfoHhy-uRUtH7PucjBf-bE2oy5K70ZEpoh8,2461 +torch/include/ATen/ops/_mixed_dtypes_linear.h,sha256=7qVLBSmVjZQbsqjAyHfn26Kw0kIx8p9qoYajUjqnz0I,1215 +torch/include/ATen/ops/_mixed_dtypes_linear_cuda_dispatch.h,sha256=DnWTWYlSCjRjcxY7DjwmCHYW_U2j_nDZvRfqN-bsHwM,1150 +torch/include/ATen/ops/_mixed_dtypes_linear_native.h,sha256=ZM_2YNgYIAQDjIlwDJx1ZHJSk6_Lb6h9tZlVJBCiw08,904 +torch/include/ATen/ops/_mixed_dtypes_linear_ops.h,sha256=sZd6bOLHXTUUyVqG0NSCyvI5uJeVY7oVbMxcC19MjTA,1723 +torch/include/ATen/ops/_mkldnn_reshape.h,sha256=X6ifDS83CzjgdFdaQgb-YB4cyW-NKV4yfXmI-gMWiTs,1500 +torch/include/ATen/ops/_mkldnn_reshape_compositeexplicitautograd_dispatch.h,sha256=9fdIyoMF2So9lhmv0XYnz-pFXiSiBNL0V80YjrO3Wmw,1185 +torch/include/ATen/ops/_mkldnn_reshape_native.h,sha256=dYQO5_IxIAOTPpNozsd4pCi4_EWjXuNbl_76qb_Cjj4,871 +torch/include/ATen/ops/_mkldnn_reshape_ops.h,sha256=a2FMs-xL1Ff3Yuz95cpOfkBGB6kghL3daVbxwBHbXLs,2007 +torch/include/ATen/ops/_mkldnn_transpose.h,sha256=DLH5rxwrtcKSUvD1rop6x4vjybnbMC8YWHCyIISGuNs,1806 +torch/include/ATen/ops/_mkldnn_transpose_compositeexplicitautograd_dispatch.h,sha256=fdvNDAUeLrJW7BYvsAhCiSr0l53PhnLaWmYm-YZmq1I,1199 +torch/include/ATen/ops/_mkldnn_transpose_meta_dispatch.h,sha256=aAWHv7QMsJGJRadz1hoLQ-nOhjn4RD8udT5PbthVMrI,1012 +torch/include/ATen/ops/_mkldnn_transpose_native.h,sha256=S-2LxbWOFrjLANO3X1vxNF1A_lHli4snraD3PKlMMV0,974 +torch/include/ATen/ops/_mkldnn_transpose_ops.h,sha256=OyJQOpMbEOla-IvUjltnFnHT-56teDq9HkYvaxclG5Y,2681 +torch/include/ATen/ops/_mps_convolution.h,sha256=WOXceZcaOz2AurYWbUn3DPCkUWDpzMx8q0aOjmf3GCc,7109 +torch/include/ATen/ops/_mps_convolution_compositeexplicitautograd_dispatch.h,sha256=Hpf6-vaCasZA5SuiH_xCYnxVPgvgvJkRugS-fhfe-z0,2004 +torch/include/ATen/ops/_mps_convolution_native.h,sha256=N7hCaItIiY-LZeJJMNfu9yUnVeNBKshnUzeC70tdD70,947 +torch/include/ATen/ops/_mps_convolution_ops.h,sha256=SxGn8w9cM6HVfUDKBMER99ecpTcUBD4eTgRmeGo4J_o,3027 +torch/include/ATen/ops/_mps_convolution_transpose.h,sha256=7rDbr402p4OQrfzU7K-vpbwFtVzMQ1NRR5aj50f1T8M,7665 +torch/include/ATen/ops/_mps_convolution_transpose_compositeexplicitautograd_dispatch.h,sha256=yev_85hfQeZSFMql1Lm_Y-nV_LKXPsCwUYsRoaa6NPQ,2012 +torch/include/ATen/ops/_mps_convolution_transpose_native.h,sha256=sCoee66jIuAgDSTmqebXxxrkB4CmpFrlEcSNB2sAiPY,951 +torch/include/ATen/ops/_mps_convolution_transpose_ops.h,sha256=8XIIfGfZR_x1tamDqpVJ0oFR0pEmjQpqtYsJa_cEZys,3053 +torch/include/ATen/ops/_native_batch_norm_legit.h,sha256=Piv9Qzj77TBu3ZZYn4C-x4Lfp2C1RCTjZa2-c-XqZKw,5629 +torch/include/ATen/ops/_native_batch_norm_legit_compositeexplicitautograd_dispatch.h,sha256=LZoJ3rEVP7f0kzlpCsLBN-ETh__BgILrCDGKovFWYOY,1301 +torch/include/ATen/ops/_native_batch_norm_legit_cpu_dispatch.h,sha256=9bBXrY0yYBwv9vSjsOvxWRIxLKIbT585xYC9JPEUU7k,2827 +torch/include/ATen/ops/_native_batch_norm_legit_cuda_dispatch.h,sha256=uP7iwdONIPLFU9MA5Kev2JD5LzvDaTv--HDZz5dFVKI,2829 +torch/include/ATen/ops/_native_batch_norm_legit_native.h,sha256=dLHhP24L4Pb8wKx269ju3URq5dlwm43yAdp6GLrREbA,4005 +torch/include/ATen/ops/_native_batch_norm_legit_no_training.h,sha256=40_UY_kSvZd8eWfDtghDl9CAZHcZHFWgPAoDjKuz-2I,2952 +torch/include/ATen/ops/_native_batch_norm_legit_no_training_compositeexplicitautograd_dispatch.h,sha256=4mexEc_nSHC7KN5aSO6m8Utqf2AcIJi0RpjIxRaAoo8,2002 +torch/include/ATen/ops/_native_batch_norm_legit_no_training_native.h,sha256=ZeA9PDWZcIbwgBO2Y34Z1e48yqJnqrpN9GouLwlc1tk,1338 +torch/include/ATen/ops/_native_batch_norm_legit_no_training_ops.h,sha256=iWJJLKTjtfey9lbDR97TTqVMhURqazBwJi9CRMvkcHU,3576 +torch/include/ATen/ops/_native_batch_norm_legit_ops.h,sha256=Ig2LpSR-assOsIkywsYFSuHSxliMa0YEvLXnZnluREA,7612 +torch/include/ATen/ops/_native_multi_head_attention.h,sha256=7ChUggNS4MauHuDhmoA6AXG-7RRGDrE5eYWdGetW55M,3843 +torch/include/ATen/ops/_native_multi_head_attention_compositeexplicitautograd_dispatch.h,sha256=2DPz1ZIw_wXaqqXHLIcauzHkRrXoDrIAFICgBYA4egI,1955 +torch/include/ATen/ops/_native_multi_head_attention_cpu_dispatch.h,sha256=xn53Go1cIV3oZOGa521HlsXAwiNFzh7opb8Zl3ptv5A,1383 +torch/include/ATen/ops/_native_multi_head_attention_cuda_dispatch.h,sha256=iaiZ3v6VXOPpS9v8fE_WbkYsucI3Z_CO8mJmCVSqeCs,1385 +torch/include/ATen/ops/_native_multi_head_attention_native.h,sha256=0y0nK_orB9mfl36OyifNQbFZuY70LZdJkcA4MZPycCA,2090 +torch/include/ATen/ops/_native_multi_head_attention_ops.h,sha256=Z5sIbRr50PEYV5B19-mwB2D9A2Y_FS6dtkyc2US6nrY,4399 +torch/include/ATen/ops/_neg_view.h,sha256=p7o-UzQA_Dn32bEOK__65k0ibZ13Iqa6hLOStPG33H4,909 +torch/include/ATen/ops/_neg_view_compositeexplicitautograd_dispatch.h,sha256=Ex6ZBQqWqarYoFbdcZpsrXs9PQRJg-xWwEuEISKpwL4,1021 +torch/include/ATen/ops/_neg_view_copy.h,sha256=sWVQ2X9Zy0CBuDCybbd6xYyCOvPX67t_CXC9XTK-m7c,1361 +torch/include/ATen/ops/_neg_view_copy_compositeexplicitautograd_dispatch.h,sha256=pDPtjQhbYYa-yTf1PMUz-u61Kqq4HtkMZ2LHlBXhejc,1137 +torch/include/ATen/ops/_neg_view_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=078FA_mJpLZmv5GTNNTO6unMJ9y85yQv-JAA-MrcmhY,1052 +torch/include/ATen/ops/_neg_view_copy_native.h,sha256=fvwXd21CjdtNsUMNaURx3po0Fvp48gW7zdRV5ekONGs,824 +torch/include/ATen/ops/_neg_view_copy_ops.h,sha256=eMEN_ebhUr1DTYPmJr6zd3K74mBHdEXIT5T7evPdEx0,1849 +torch/include/ATen/ops/_neg_view_native.h,sha256=BD2ddBGe-P4PZ5ZMQ5LjKxRP335jrmYBxOnd5ouQBw8,733 +torch/include/ATen/ops/_neg_view_ops.h,sha256=bljzYKV-uoFUsGm3B9tief60GpoGlKjwRfqV1Ul3E_U,1226 +torch/include/ATen/ops/_nested_compute_contiguous_strides_offsets.h,sha256=eJz39LIIOscRhVZYQtZibgoDz9o6kBguyX4UBL2h52g,1091 +torch/include/ATen/ops/_nested_compute_contiguous_strides_offsets_cpu_dispatch.h,sha256=E0AQGIcTB7jxSksViD8VaeGGXwemIWzkE6Y8gE_pHfE,1042 +torch/include/ATen/ops/_nested_compute_contiguous_strides_offsets_cuda_dispatch.h,sha256=p2rDWVcVbQpc8-pm6k9o2ElJFmgIXgDG_lPkD5yjc2k,1044 +torch/include/ATen/ops/_nested_compute_contiguous_strides_offsets_native.h,sha256=S8gaFsTR150w-fNgrTBcibUh6Px8wsllYhKbhO4b4eI,798 +torch/include/ATen/ops/_nested_compute_contiguous_strides_offsets_ops.h,sha256=zUlSz4sUYEkhQW3mH1HZUFN8S4wmIZPCBhVkjWfhT3I,1425 +torch/include/ATen/ops/_nested_from_padded.h,sha256=qbPDTatCYiUIFUGOOgWIQdxL3n-2402UY2uEI8blr20,1990 +torch/include/ATen/ops/_nested_from_padded_and_nested_example.h,sha256=MwsHQ-RjZyiOPzdWVv0NaFX3Jan7ghsaS9a2iPyheS4,1805 +torch/include/ATen/ops/_nested_from_padded_and_nested_example_compositeexplicitautograd_dispatch.h,sha256=EEfOuSpqFC1OI_b_rc6PnWXYVnOV_5ZYYZmQ8ztvkJo,1251 +torch/include/ATen/ops/_nested_from_padded_and_nested_example_native.h,sha256=GClSqEA2CKgxbj5tbWc-M3dKrzyvvnwH76RAM8qoUNM,943 +torch/include/ATen/ops/_nested_from_padded_and_nested_example_ops.h,sha256=OW0dR3yqWtc6kohw6esBAA_1ZRfFikNsl3meXbhynRI,2207 +torch/include/ATen/ops/_nested_from_padded_compositeexplicitautograd_dispatch.h,sha256=fhCMm5O1pPZAuNxiflhVEcUpBh-yrnww-dyXu2KJpsc,1299 +torch/include/ATen/ops/_nested_from_padded_cpu_dispatch.h,sha256=y259uoH0wavd5fhAeGUHPvwNfAnTqAPUWfqNIMWxi5g,1066 +torch/include/ATen/ops/_nested_from_padded_cuda_dispatch.h,sha256=mKaHoc_6LuuywBKrMAwFllxj8b_KS7Tm69Z1T-aruFI,1068 +torch/include/ATen/ops/_nested_from_padded_native.h,sha256=GB5KLo-ARcVxt3GNUk8KaA0IbuLt95QTkOUihO4p-C8,1143 +torch/include/ATen/ops/_nested_from_padded_ops.h,sha256=w1O1u_hnp4q4i28qdp6gX9QCBXa_Peo__phlB-rbVoc,2357 +torch/include/ATen/ops/_nested_from_padded_tensor.h,sha256=vL_QabkoP93d0va5WPoo9uKY8CL7kv2IiPXOWg6pJDI,3191 +torch/include/ATen/ops/_nested_from_padded_tensor_native.h,sha256=0SAoE4aPf5nZIVqujS9jFASmof4GFAJst2Lcyq_eobA,676 +torch/include/ATen/ops/_nested_from_padded_tensor_ops.h,sha256=UG33LDfo_u6hJbCqaVR6Vtz___z-ocwZ-z2ulXiFLsc,1960 +torch/include/ATen/ops/_nested_get_jagged_dummy.h,sha256=u0t9Dp8KGzMZt6c2BrnuuflNqBzdGtX0pJ3DYrh77XY,960 +torch/include/ATen/ops/_nested_get_jagged_dummy_native.h,sha256=0SAoE4aPf5nZIVqujS9jFASmof4GFAJst2Lcyq_eobA,676 +torch/include/ATen/ops/_nested_get_jagged_dummy_ops.h,sha256=txHoQqMUEOrTWo620X4dXvh9tgSeFmJ51xshJJZ_bsQ,1262 +torch/include/ATen/ops/_nested_get_lengths.h,sha256=0TiBIJyyCdg5tExL3WnB18xRet0P1gaji7c1fFejr3c,943 +torch/include/ATen/ops/_nested_get_lengths_native.h,sha256=0SAoE4aPf5nZIVqujS9jFASmof4GFAJst2Lcyq_eobA,676 +torch/include/ATen/ops/_nested_get_lengths_ops.h,sha256=D43NKE_z8wB0-j8jozy_HyeiLyzoxbsgz2RcNTihqag,1250 +torch/include/ATen/ops/_nested_get_max_seqlen.h,sha256=nzZbB18DiKvmKWAw79alg6_ikm0QXkqpy-chSj87FWU,955 +torch/include/ATen/ops/_nested_get_max_seqlen_native.h,sha256=0SAoE4aPf5nZIVqujS9jFASmof4GFAJst2Lcyq_eobA,676 +torch/include/ATen/ops/_nested_get_max_seqlen_ops.h,sha256=Z73wu4YKRc05gORZcuuj_pV_8_o0BMmOgw28lkBGsgE,1259 +torch/include/ATen/ops/_nested_get_min_seqlen.h,sha256=syxLMrzaRafldlb72DYVtRNuX9hj61-BNZMA0mhJVWw,955 +torch/include/ATen/ops/_nested_get_min_seqlen_native.h,sha256=0SAoE4aPf5nZIVqujS9jFASmof4GFAJst2Lcyq_eobA,676 +torch/include/ATen/ops/_nested_get_min_seqlen_ops.h,sha256=22dLbSFfiEMotNaEDqq_vr_HYWLDBxzVVYenVLx_DVY,1259 +torch/include/ATen/ops/_nested_get_offsets.h,sha256=Zq67eFwT3BN5qC-tFC8lNg53m_bmUOdf3xt1lkSXUmo,943 +torch/include/ATen/ops/_nested_get_offsets_native.h,sha256=0SAoE4aPf5nZIVqujS9jFASmof4GFAJst2Lcyq_eobA,676 +torch/include/ATen/ops/_nested_get_offsets_ops.h,sha256=Lixu-4IOsN0o9Ng_rEVezkVkd8pIn1weKPfqZ8s-mTI,1250 +torch/include/ATen/ops/_nested_get_ragged_idx.h,sha256=4m0HMSdv6asF1mFwBx3otAqvv8T8rnomhgCFZykdEXk,949 +torch/include/ATen/ops/_nested_get_ragged_idx_native.h,sha256=0SAoE4aPf5nZIVqujS9jFASmof4GFAJst2Lcyq_eobA,676 +torch/include/ATen/ops/_nested_get_ragged_idx_ops.h,sha256=nrxTrL-h-PqazlXSFu5kHzUEXzA0v93QBoahEAk5q7k,1247 +torch/include/ATen/ops/_nested_get_values.h,sha256=r_ni-_UlF_M3fXAc0E5A3qPQ1bQzNHpi1KDFm9j_WwE,945 +torch/include/ATen/ops/_nested_get_values_copy.h,sha256=IGi1nzacRvkXiAbKdOth_axdtF6mMgcRdo-NGmabOqQ,1451 +torch/include/ATen/ops/_nested_get_values_copy_compositeexplicitautograd_dispatch.h,sha256=wHk_loD_qpswu7pBICrJs5G8ZE74eU3iAUhufPGzSXY,1155 +torch/include/ATen/ops/_nested_get_values_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=1l3lpyfq0q9IwynINogr7fsDGU3XWb5XZcNmJ_XyZU4,1061 +torch/include/ATen/ops/_nested_get_values_copy_native.h,sha256=g6noUV2MhXFSbDsHqL5gcjIFLyYCs5xhtJqIzMXAxnM,842 +torch/include/ATen/ops/_nested_get_values_copy_ops.h,sha256=sYjF9AxHizL4ZLmsCpUC5FaeFWvqz0DPV6jMLoxoJLY,1903 +torch/include/ATen/ops/_nested_get_values_native.h,sha256=0SAoE4aPf5nZIVqujS9jFASmof4GFAJst2Lcyq_eobA,676 +torch/include/ATen/ops/_nested_get_values_ops.h,sha256=qKjIL9j2liwOY93UXYDjiYu7ctUuQa_f-WYWC1ZPhkE,1253 +torch/include/ATen/ops/_nested_select_backward.h,sha256=tcQkdS4RMMmOHU92vqMTT1WSxSMvVGXsX7AzZonwKt0,2046 +torch/include/ATen/ops/_nested_select_backward_native.h,sha256=SF90xp5J-pGQ53Eet8pI1h4mwryadrqCQf59b4jXlyI,818 +torch/include/ATen/ops/_nested_select_backward_ops.h,sha256=Lcb-XM1bIG4DVKkG_3EqdJII19NEtibzhU0bx7BtODE,1475 +torch/include/ATen/ops/_nested_sum_backward.h,sha256=6uiixQaF-kPYwuP9QRfPzP0vgTy1FetkCzLLspewfcE,1087 +torch/include/ATen/ops/_nested_sum_backward_native.h,sha256=ZWqtD1k7li6LxgVdjoh-iMwXG5dbcHLtjwKxV2EJs7U,822 +torch/include/ATen/ops/_nested_sum_backward_ops.h,sha256=RIx-yj5qGlPyOz35NA-Ibv0qzh8emnw8PK4yJqP8rYI,1486 +torch/include/ATen/ops/_nested_tensor_from_mask.h,sha256=6uMwnpvqUOrTkupzZwhGz1W_D2sbf2Hj_BgoD6umLm0,1729 +torch/include/ATen/ops/_nested_tensor_from_mask_compositeexplicitautograd_dispatch.h,sha256=cJP7mz1eINDE5jdsVk0JssHY6F05QBlJ-6ovE5e1XzI,1240 +torch/include/ATen/ops/_nested_tensor_from_mask_cpu_dispatch.h,sha256=d7FQymcdFUYborzyVmSU34CIj-aoAR15ngVMLx2ISzg,1036 +torch/include/ATen/ops/_nested_tensor_from_mask_cuda_dispatch.h,sha256=tr2JMVq7Wuu0Fktij3qAoxu0GIXW26qkyX0J3HcJH_k,1038 +torch/include/ATen/ops/_nested_tensor_from_mask_left_aligned.h,sha256=m-8mI_HgKjNJPbU9cw4aT_kTxez4ELY5TrjlyQcfUKM,1042 +torch/include/ATen/ops/_nested_tensor_from_mask_left_aligned_cpu_dispatch.h,sha256=B8SdezwPYv43KzjKyLIJrfp7yNPhwKggJeC9PbDN9Zk,1021 +torch/include/ATen/ops/_nested_tensor_from_mask_left_aligned_cuda_dispatch.h,sha256=tEgesJtiiPNZ0jsWuGT7HpGiSxETG7ka-SvNHjGhCw4,1023 +torch/include/ATen/ops/_nested_tensor_from_mask_left_aligned_native.h,sha256=mcULN7xoyoZ2TRsZtF7D1Mwh61SfuceE-kY3KedFK04,789 +torch/include/ATen/ops/_nested_tensor_from_mask_left_aligned_ops.h,sha256=qymThN3IylZFHM4tIz0yg5vBDMIOevQ1MzTSMnYyvDg,1358 +torch/include/ATen/ops/_nested_tensor_from_mask_native.h,sha256=CsMBroXHC5BVXFNxPZG43qgR0ZY3T86-fSRErRK6JuA,939 +torch/include/ATen/ops/_nested_tensor_from_mask_ops.h,sha256=ocK5ESPILoqEWMpW79BrN7YJs_4X1-25VcHIlBE5RLY,2181 +torch/include/ATen/ops/_nested_tensor_from_tensor_list.h,sha256=iXinPceFxSheZpC773jdPI2VAeRFkfeUBgjySEGCsqU,2452 +torch/include/ATen/ops/_nested_tensor_from_tensor_list_compositeexplicitautograd_dispatch.h,sha256=S9NnU5P1toJ9CCt3w3fkPo7un8mtgwZLqj5lzAzPGtw,1793 +torch/include/ATen/ops/_nested_tensor_from_tensor_list_native.h,sha256=4beD9th12gVvJSNrIFCT4A-xRSpIHXLCHwzUy_0weAg,1200 +torch/include/ATen/ops/_nested_tensor_from_tensor_list_ops.h,sha256=p-m3FksJlwvyvMW2UpmgcFyXEvB2sM4ZBO25uKibD8I,2917 +torch/include/ATen/ops/_nested_tensor_size.h,sha256=TOcJ4zjcHmWDlL96sl-E1Ic7Hvuv1lbXr6GZUqAspO0,1237 +torch/include/ATen/ops/_nested_tensor_size_compositeexplicitautograd_dispatch.h,sha256=Ys0d2nB5aY_diK5HbZgPLSjz-jfcLxA8ejl4oeEd2_A,1147 +torch/include/ATen/ops/_nested_tensor_size_native.h,sha256=Dve5Q3AsGvOC-FEzImBACLfgCczuqQ0La-edLOMGPpk,834 +torch/include/ATen/ops/_nested_tensor_size_ops.h,sha256=ZZYqACzwLvOARnQagYpWJ31uuAwIYja7Y0dhLsH1g1U,1879 +torch/include/ATen/ops/_nested_tensor_softmax_with_shape.h,sha256=RXMJtTEl-8ngq4LRo-Gpq7oJ2VrDGtFx9sbxLoZp4Wo,1046 +torch/include/ATen/ops/_nested_tensor_softmax_with_shape_native.h,sha256=NnTWSLC0aXIy2R0rq6vYqoDHS0ncz1nJiMbcVQlELAA,885 +torch/include/ATen/ops/_nested_tensor_softmax_with_shape_ops.h,sha256=m4Js9TZNsoCMa5g6DIzUoN2iPy-s9DQVtBMxDhQ_bl4,1378 +torch/include/ATen/ops/_nested_tensor_storage_offsets.h,sha256=gYtJHftdPs9l-t0VVoV22usLk1vDWvQaJmzgDyEjXuQ,1314 +torch/include/ATen/ops/_nested_tensor_storage_offsets_compositeexplicitautograd_dispatch.h,sha256=DDs78gyojwTRBzMgZqoCUna68UU17j3dLyKbpK08doQ,1169 +torch/include/ATen/ops/_nested_tensor_storage_offsets_native.h,sha256=9wWVxOIb5VwFQbWZa1BfPMh73UME_IwCF4XTLj5bVmY,856 +torch/include/ATen/ops/_nested_tensor_storage_offsets_ops.h,sha256=4JYMSYdsHWrJq3WobN89kGdr94iymE3tHhWs6P_GBdw,1945 +torch/include/ATen/ops/_nested_tensor_strides.h,sha256=T7UZLFrXgE8wWkfmK6snp7cD7iANCSbUasVvwrTJHAw,1258 +torch/include/ATen/ops/_nested_tensor_strides_compositeexplicitautograd_dispatch.h,sha256=HYJ_89DTAS-K2hnivmLYl7bf1pzqqSfwHZVH7bXsYIo,1153 +torch/include/ATen/ops/_nested_tensor_strides_native.h,sha256=M1JxPb1uml6NQmMfBmuKWmezNo8Q-xCf_7sHegs2NzU,840 +torch/include/ATen/ops/_nested_tensor_strides_ops.h,sha256=yyO8U40gG65-21vidpDZ0a6idrSwP92gtQmhoQbpFcQ,1897 +torch/include/ATen/ops/_nested_view_from_buffer.h,sha256=2F05MotFQrLut8-9WXxn-f6YD2ae6x1GAIq3D-C6f1s,1161 +torch/include/ATen/ops/_nested_view_from_buffer_copy.h,sha256=-cezMkB4XzvtENbv8YAfAJhkpEqE4V5lZlr-JKzwgmM,2087 +torch/include/ATen/ops/_nested_view_from_buffer_copy_compositeexplicitautograd_dispatch.h,sha256=dUk1mGiyIxE3pSNl1uDtfVvRzmhTHqlHGs7jSF_ivfE,1357 +torch/include/ATen/ops/_nested_view_from_buffer_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=NSg5ojU4IYoRSRHjGwrnteUVoRIsxKuWY8upXAoGkuY,1162 +torch/include/ATen/ops/_nested_view_from_buffer_copy_native.h,sha256=4h7sHjtAMEWcZJW5tOntNhhu5p4rPXJivsqmI1-yr40,1044 +torch/include/ATen/ops/_nested_view_from_buffer_copy_ops.h,sha256=mp3RQDugyeEmnfoDvDQeftoQr7H6iPaFgj1aSnqLXkY,2557 +torch/include/ATen/ops/_nested_view_from_buffer_cpu_dispatch.h,sha256=noEMqKx5oBcIg4JfjD4A-R6LgS4nxaj9yGINfrV66Ds,1087 +torch/include/ATen/ops/_nested_view_from_buffer_cuda_dispatch.h,sha256=0SOfAqLY0jjyhrxvHlRzTmJhsB9201XQqeXQw5YDH-U,1089 +torch/include/ATen/ops/_nested_view_from_buffer_native.h,sha256=yK0-7yVCHR0z2C6BwDTfC6LKsX8YicPMcrHa-iGtBsE,843 +torch/include/ATen/ops/_nested_view_from_buffer_ops.h,sha256=cC0HgQLdMlsJ2Erv1xEJc-zyA8hOmzmGwHH9tcpKLjQ,1580 +torch/include/ATen/ops/_nested_view_from_jagged.h,sha256=HBSJCZQSB2m22oJFdIcd0WHOWWX7vf9A1P7LdFp89ho,1376 +torch/include/ATen/ops/_nested_view_from_jagged_copy.h,sha256=EIfzBk1_wizg39QzGP_gTfenokRA7FSO3tnA8nLblvE,2721 +torch/include/ATen/ops/_nested_view_from_jagged_copy_compositeexplicitautograd_dispatch.h,sha256=oneV_O0u2la4ZjSa7f8oXiLAtcnkZSMtnbc1gmkuCD8,1608 +torch/include/ATen/ops/_nested_view_from_jagged_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=n1oP1N01iBEYfOVatzEKEI19OXpr7KoQmnD8I45CDB4,1293 +torch/include/ATen/ops/_nested_view_from_jagged_copy_native.h,sha256=NA8Z06s0On7_YpOLNaY3pYc-m3oJPR53L-5Exsp6dgk,1295 +torch/include/ATen/ops/_nested_view_from_jagged_copy_ops.h,sha256=ds2eLXsd6Lm2bIBUGKQtS4yK_GmKCud3gLEji3GmI7c,3359 +torch/include/ATen/ops/_nested_view_from_jagged_native.h,sha256=0SAoE4aPf5nZIVqujS9jFASmof4GFAJst2Lcyq_eobA,676 +torch/include/ATen/ops/_nested_view_from_jagged_ops.h,sha256=2J2NFfl9yby6482uSund9MMbmUjwvhRa4Q4dHYTUpf0,1981 +torch/include/ATen/ops/_new_zeros_with_same_feature_meta.h,sha256=dIlT3WxZdEP3gsDxcoY2TIHhPClg_TsnFXqAxQS6vnM,1930 +torch/include/ATen/ops/_new_zeros_with_same_feature_meta_compositeexplicitautograd_dispatch.h,sha256=qNdZue4vTN725RTTbSBVeCYes1i_8XRBhgTZa295VAg,1425 +torch/include/ATen/ops/_new_zeros_with_same_feature_meta_native.h,sha256=21dyGksOg9JVquqobYotzQQKTPQ8hDKdxmMJiB_dDx8,974 +torch/include/ATen/ops/_new_zeros_with_same_feature_meta_ops.h,sha256=FiTwAT05czcmKiUQqT_J33iwX39vzd0ex15KAVmIhOM,2326 +torch/include/ATen/ops/_nnpack_available.h,sha256=oV6goa4QfSK2ZnP0YkUj-htxuPMbpkTqCZ6ev0aal2U,889 +torch/include/ATen/ops/_nnpack_available_compositeimplicitautograd_dispatch.h,sha256=nwl_jrYLOQJNF_Nf4Bsde1Y9YjwmLe_z32DdmxZa4jc,1000 +torch/include/ATen/ops/_nnpack_available_native.h,sha256=OJdl_W9li1i9IT0aq4sSRqlRqTVeTZqp3-5dwOd-zsw,712 +torch/include/ATen/ops/_nnpack_available_ops.h,sha256=cPDJhQBUZgS5-bmdylCEzFvkuLOqJ4fwXHqpiqUhhho,1147 +torch/include/ATen/ops/_nnpack_spatial_convolution.h,sha256=2xPWYvPZyNLoJUjU4ILOwD17DDSyJAo8RAmpl0OcIS0,6444 +torch/include/ATen/ops/_nnpack_spatial_convolution_compositeexplicitautograd_dispatch.h,sha256=qhSqoJQDRGtq7APTeOT8T0-GVJ3oinWkJaccLj6S3v4,2305 +torch/include/ATen/ops/_nnpack_spatial_convolution_native.h,sha256=EJBcEcar35qUtvANNl2NHnNJNh9fHkAo_6ea94bCbHY,1105 +torch/include/ATen/ops/_nnpack_spatial_convolution_ops.h,sha256=mBA7eDU5ysJdVpDZVUKoH9-84A_ioFb-dfrRo8dywrM,2771 +torch/include/ATen/ops/_nnz.h,sha256=1lhtBgMlJLNkXzhrmiBSMKlTdO_ElbjumibHEQWwPFM,755 +torch/include/ATen/ops/_nnz_native.h,sha256=MghWvuHpTXpKNlv5O9WMKJPd8eF2EKjHDRR6jGsz2aY,792 +torch/include/ATen/ops/_nnz_ops.h,sha256=tO21m1z6ovn14GY2KpuCjYsidQY9oROtax81ef13zys,1193 +torch/include/ATen/ops/_pack_padded_sequence.h,sha256=VAzBB43qgvNRqR_MWqqA_f1bhhAnobizbcVWmTwoZWc,1953 +torch/include/ATen/ops/_pack_padded_sequence_backward.h,sha256=aHHcQJlth0ZXzfhTvezDUoOJ1CXMnlDjtxQVQg9rZ5A,2331 +torch/include/ATen/ops/_pack_padded_sequence_backward_compositeimplicitautograd_dispatch.h,sha256=D3Edg-_Dm_2YabwbbCPUEOruFbb5DYMAHsHwVIfpEaQ,1287 +torch/include/ATen/ops/_pack_padded_sequence_backward_native.h,sha256=OyFkYMzbnQcIzlLBfSUASwTjAEKjsRWByc3ZY7BW-MU,843 +torch/include/ATen/ops/_pack_padded_sequence_backward_ops.h,sha256=XneV5fcPXUjXcs3x_Ls03vu3Fl3EJX_sxgmbBSX8VDk,1553 +torch/include/ATen/ops/_pack_padded_sequence_compositeexplicitautograd_dispatch.h,sha256=hOG9jRikNJXBqYLi71HXSvdohCRAEIlT54JGVbEIgvg,1480 +torch/include/ATen/ops/_pack_padded_sequence_native.h,sha256=PI7qNyx_QLPnYEnHrgy7WRp1tjFxrmQiaPwI12S2L8k,1004 +torch/include/ATen/ops/_pack_padded_sequence_ops.h,sha256=JabqY2LKAhiaeudwRjm0VSXAtS0N1jHBr9H5dISK_zU,2453 +torch/include/ATen/ops/_pad_circular.h,sha256=o5ucFDdsd1JISu64r-rPDXKIjxgQlbY-Ciuqs7vuUYI,1694 +torch/include/ATen/ops/_pad_circular_compositeimplicitautograd_dispatch.h,sha256=AgoYwD5vcDecPJI4HGsTU1KRZet5m-zlyIDwA5IKdxk,1139 +torch/include/ATen/ops/_pad_circular_native.h,sha256=vnkhNRGw30N893xxiI_dAqNu1Inov2PE9MqGL2DQU0o,769 +torch/include/ATen/ops/_pad_circular_ops.h,sha256=cN5RmjIHW6BPUNvE3DmXRIzUb_u7wn4mt_EpS62cb8A,1317 +torch/include/ATen/ops/_pad_enum.h,sha256=cheoBM9BGnVmhgPYVw0nqgtpmF795qOqqthOmAWheI4,2000 +torch/include/ATen/ops/_pad_enum_compositeimplicitautograd_dispatch.h,sha256=_85vUmAnX-QvMUCH9z0K49jPHJm7bJfg8uuH9ydPU34,1251 +torch/include/ATen/ops/_pad_enum_native.h,sha256=NnBsHt8oH95te3tKnLz1hbJi1EJY4IqEKI42Hzl5_6Q,825 +torch/include/ATen/ops/_pad_enum_ops.h,sha256=cImMByfi56IM9G0cpBewab1Z-9kh5M29PJ-7fqyMUyM,1458 +torch/include/ATen/ops/_pad_packed_sequence.h,sha256=_wyjVZx-ohpIF2dD9iTbPnrszIFcIhAFhzTgmnOBmLk,1221 +torch/include/ATen/ops/_pad_packed_sequence_compositeimplicitautograd_dispatch.h,sha256=knDvQ9I0JD2ZNbwn0nmSYqzGd4nPHxUviC3OLaCxCq4,1163 +torch/include/ATen/ops/_pad_packed_sequence_native.h,sha256=cKQKcsCkqSX3BEQ96PdJUus9m3WADoiw6bnKCacpiEs,875 +torch/include/ATen/ops/_pad_packed_sequence_ops.h,sha256=13sTUuiUZaS4U1LFjCx9Ymskk00jqCe3CvNEs31KHiA,1683 +torch/include/ATen/ops/_padded_dense_to_jagged_forward.h,sha256=lYAKhkELvNpDruD83Ylvzf57qJPjFCyzuVHDkSpaP00,2312 +torch/include/ATen/ops/_padded_dense_to_jagged_forward_cpu_dispatch.h,sha256=rF9of2-Su4dYaVHQg80s5oEq5Y3psbsVepw623FUOuc,1237 +torch/include/ATen/ops/_padded_dense_to_jagged_forward_cuda_dispatch.h,sha256=yT4E2vcxrIlp4tBy1ixfMDksUgGz9ERgVSCr7EqfBSE,1239 +torch/include/ATen/ops/_padded_dense_to_jagged_forward_native.h,sha256=VNMKk3iUGeb9gzTbloNRnDs4ExnvkjFUBaBBXpgXYto,997 +torch/include/ATen/ops/_padded_dense_to_jagged_forward_ops.h,sha256=PfoDrDSwS2kDzs-xqQVtbDLXM-IO42fXupICwitz_Vw,1499 +torch/include/ATen/ops/_pdist_backward.h,sha256=k6WF9BWQWVzCgrc8Dw-TI6U3YYONJoRjgnemtM8T0gY,1710 +torch/include/ATen/ops/_pdist_backward_compositeexplicitautograd_dispatch.h,sha256=eOJkEYOZ6zCO1o0174UKCoWq7lhmgtlVODrCkBUHeO4,1261 +torch/include/ATen/ops/_pdist_backward_cpu_dispatch.h,sha256=9N1r5E0pWVef9Z9hhQA3P_qXEcqlFfe1HbunCR6gahE,1044 +torch/include/ATen/ops/_pdist_backward_cuda_dispatch.h,sha256=9y5Jx36VQPDqbnFCX5CAdr0vv_R7wTaWREZjTep2qNw,1046 +torch/include/ATen/ops/_pdist_backward_native.h,sha256=BanagFCshbXiAIhQG29lQT2abDt0p2qwsHrwWn4EgBU,948 +torch/include/ATen/ops/_pdist_backward_ops.h,sha256=oskEoGnOyyQBYbGdKsqR_r2CnRcUF2h2z5DU1UaVMw0,2267 +torch/include/ATen/ops/_pdist_forward.h,sha256=SAhfuJiC_sSJ4CBTJjbYNuGiKtAd3FMUqCG4JFMyq3w,1437 +torch/include/ATen/ops/_pdist_forward_compositeexplicitautograd_dispatch.h,sha256=oZkc-g21inrOivY3kypbp_-5LOQ08eX_iz4YLl-8gD0,1159 +torch/include/ATen/ops/_pdist_forward_cpu_dispatch.h,sha256=w_y6YucqwE2ESCC3CVXXkpAUbNCFZT1i-RF4bUMRZCs,994 +torch/include/ATen/ops/_pdist_forward_cuda_dispatch.h,sha256=BbKWrdPU5JUJWpMKX0Hx-O9MgzFoIuwsxdoh64XXecY,996 +torch/include/ATen/ops/_pdist_forward_native.h,sha256=DJV2ETpnGpK2KTwEBSkI5QKrelauXuUvVJ73Zm0jdhQ,846 +torch/include/ATen/ops/_pdist_forward_ops.h,sha256=gZA3SmdXe3Z1WQ0ezUuK2ns26vBcCP_JhZuJFYysidA,1927 +torch/include/ATen/ops/_pin_memory.h,sha256=f48BJC7C9RGchaYMBreKLAAnOWt7lUZ8tO528RCEJGY,1556 +torch/include/ATen/ops/_pin_memory_compositeexplicitautograd_dispatch.h,sha256=2pR4TFh4mLg8JIbNPjmZlnouvrlVFNx79nqrOtGINnI,1328 +torch/include/ATen/ops/_pin_memory_native.h,sha256=GVWmoFeYHgQsUV2vKkkBY_0PB_-J6o8eOCfizizp3VM,1271 +torch/include/ATen/ops/_pin_memory_ops.h,sha256=DRrtsUcd52KFy3fBCF0bRCLTbRw2o7xClb5sl6z6JsY,2075 +torch/include/ATen/ops/_prelu_kernel.h,sha256=t9cVX2B3sJE5L8U6qDuF226d9qHbcgw4Cb6c1nhwyLk,969 +torch/include/ATen/ops/_prelu_kernel_backward.h,sha256=houKbWxWPT83Ni-v4qOVAdvvXhO48VFyPJZRT0lzHxQ,1105 +torch/include/ATen/ops/_prelu_kernel_backward_cpu_dispatch.h,sha256=8Pov0cexygKx5Hjc9FwHN-I_qyOl1sZA8ZkEOuCVtHI,1074 +torch/include/ATen/ops/_prelu_kernel_backward_cuda_dispatch.h,sha256=3OnRK62T-H-oEtFdfGcAAJXZ1wKn1qetfaSzz-5bns0,1076 +torch/include/ATen/ops/_prelu_kernel_backward_native.h,sha256=GESj8stQzse6y6RE_CecxT1-CUfie7y1QStXmDp5G3s,983 +torch/include/ATen/ops/_prelu_kernel_backward_ops.h,sha256=qN2pj58EOAhRhqdDMpwzQ5pHJVSN7acrlzt_Dl2LfjQ,1537 +torch/include/ATen/ops/_prelu_kernel_cpu_dispatch.h,sha256=804eCC9spcycAV9wPsigRLg2YuANH_hxF4i4PaTMsgg,1008 +torch/include/ATen/ops/_prelu_kernel_cuda_dispatch.h,sha256=SmM1Ll432iY1i285LPsdEfb0ciCa2bj6Haug1fSzy0Y,1010 +torch/include/ATen/ops/_prelu_kernel_native.h,sha256=6iZiOIuIG_fdMZjmYbAw2SCGEjABiYosFpKO19kpFj8,953 +torch/include/ATen/ops/_prelu_kernel_ops.h,sha256=3EI2ZjI9LjgB4eSXrv-og899JycdyKr04_mlVnlPRuc,1321 +torch/include/ATen/ops/_print.h,sha256=5OFA77nJYf8LkC-rSZ2KGkTQZiXBpmbUdR-3MJOto_o,867 +torch/include/ATen/ops/_print_compositeexplicitautograd_dispatch.h,sha256=zl_WKOQf4zPyxUUhBPK68ujxSzFQIQzG8_CC8Hs42Yk,1007 +torch/include/ATen/ops/_print_native.h,sha256=eCprfTdpT5-nMOcNXP-_tWir1um52cHjaGAawJSO3rs,719 +torch/include/ATen/ops/_print_ops.h,sha256=zkvwZygubiiO8XzYUrStY762cfrUzRsOITK0HYviVZ8,1171 +torch/include/ATen/ops/_propagate_xla_data.h,sha256=6Jo_dbF13X7oQr7NmtU7rjd3IYrgAsOdIJmUWX5SxVs,986 +torch/include/ATen/ops/_propagate_xla_data_compositeimplicitautograd_dispatch.h,sha256=ps64PnUTXuRhjL1hILg9AehyosHnrB_EAhN3-3l4OYg,1053 +torch/include/ATen/ops/_propagate_xla_data_native.h,sha256=gZ88nHqN9B6w97UnbbrRRWhy6II8UDb4s_7hPSVkgm8,765 +torch/include/ATen/ops/_propagate_xla_data_ops.h,sha256=3xnHo-pSDPbfE1QYDMoeEMilDEttUmapQl6B7VluJwk,1320 +torch/include/ATen/ops/_remove_batch_dim.h,sha256=eOpL9u5q-Qz_kB6lgOYu1BOK3eWqYSgyX5a2TdQyVZ0,1960 +torch/include/ATen/ops/_remove_batch_dim_compositeimplicitautograd_dispatch.h,sha256=Xwe8xXM4f8DLcRc9q6sthSqyWmMQGDDgDtwYBVUKczY,1209 +torch/include/ATen/ops/_remove_batch_dim_native.h,sha256=ZNniP5PB9mIjrWMf4h3ZEeP--tmkM8_8tnsPI4Vi9NE,793 +torch/include/ATen/ops/_remove_batch_dim_ops.h,sha256=6znZrY45-YMP4FoV5AdOvTD0qEyk1ByZXAUCMzxNj_U,1430 +torch/include/ATen/ops/_reshape_alias.h,sha256=ReViPo3V-LiTtuD5qSw0i-6xitFPNs64mawUXIXKj88,1949 +torch/include/ATen/ops/_reshape_alias_copy.h,sha256=7hrQF2mFmBilYx_spJuzzLi6quOqmDoArsCSgeSY2do,4814 +torch/include/ATen/ops/_reshape_alias_copy_compositeexplicitautograd_dispatch.h,sha256=0-YZVkeLhJYOD5Ba-ZNI9ppRMfp-rz2VDJDB4WIOpAw,1544 +torch/include/ATen/ops/_reshape_alias_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=N8GKbgxyKQt2sYVRnmQQ3TYOjUNDVyNMLvNZzlLmJYY,1231 +torch/include/ATen/ops/_reshape_alias_copy_native.h,sha256=tph-eWL2VYNjTkbDx0lVyK5ZQ1llXI81LbR5vxEzanI,956 +torch/include/ATen/ops/_reshape_alias_copy_ops.h,sha256=JWjYFRQPyuI0TRDTVVUDJrYGKcbxzvtLEXwtNFeGPuI,2243 +torch/include/ATen/ops/_reshape_alias_cpu_dispatch.h,sha256=V9z_QhGXRKUN7O8IL5w4hJWLiXmcZRh8d-MAqZlN0MA,1151 +torch/include/ATen/ops/_reshape_alias_cuda_dispatch.h,sha256=-t-_vz8cqBndjmsF7hFa1bC3V-pLEeUmyL5DcUI9IHg,1153 +torch/include/ATen/ops/_reshape_alias_meta_dispatch.h,sha256=XaGj8uswEiurDazL7HzNwj3QSnBpF43xCU9y9ipWzaY,1153 +torch/include/ATen/ops/_reshape_alias_native.h,sha256=GR4Y6u8DRhmQl6EzXx8xgaxSIrQNWyrVc8Aj8izm19E,784 +torch/include/ATen/ops/_reshape_alias_ops.h,sha256=jZGqQc2izhQrLdWoE__8IBkEmFXgHr5x0P7M5o3SbTg,1423 +torch/include/ATen/ops/_reshape_copy.h,sha256=CetYqNpV4vOlT0tGu-beT1uO0mvK-IqpV9vNA-pxZIw,1704 +torch/include/ATen/ops/_reshape_copy_compositeexplicitautograd_dispatch.h,sha256=YovmUvVX4I97WjWOe9dWtHJRH3GAWkxYjEz6blhZ53w,1141 +torch/include/ATen/ops/_reshape_copy_native.h,sha256=vGML376As41Qx1hxEY6YyqqjVxB94S7SErJmh8gd89E,770 +torch/include/ATen/ops/_reshape_copy_ops.h,sha256=NAV-P_6a_8neA5jIY8btg4xNywiDtMigJMDd3kdJWoM,1320 +torch/include/ATen/ops/_reshape_from_tensor.h,sha256=MAiAplBHMN_UkymV0Qjp-MN-HagklaV9h1xyf_HdKqA,994 +torch/include/ATen/ops/_reshape_from_tensor_compositeimplicitautograd_dispatch.h,sha256=JaOPbYWXJFOPlQc1zUwbZcFkz63X2QFd3kqiva_CfGE,1058 +torch/include/ATen/ops/_reshape_from_tensor_native.h,sha256=v4_cg7r-qz16qgmhShPYtQNEP2QZfVWR0W1CSpZPmzo,770 +torch/include/ATen/ops/_reshape_from_tensor_ops.h,sha256=qISJkKrMyBVq9dKuKV2oloyN1k7ozg2GcARSZwdE9Vs,1339 +torch/include/ATen/ops/_resize_output.h,sha256=0Y0DX1HE1azWUJQaPFJRV4tO4iCxPd00KTCd3w47BYs,5650 +torch/include/ATen/ops/_resize_output_compositeexplicitautograd_dispatch.h,sha256=hznXLriUm5o0ojq_EvKhDkxqQeJIYFabGrlhTHOXGOE,1761 +torch/include/ATen/ops/_resize_output_meta_dispatch.h,sha256=BgJf9sp67uXVRJ0ZQ7Rum0JPveFLiOUEPyT434D7gW0,1157 +torch/include/ATen/ops/_resize_output_native.h,sha256=Dkl0hwr8J_vUe6jDsly4GPIj8HNoIUwgWjjAjGOXdzs,1052 +torch/include/ATen/ops/_resize_output_ops.h,sha256=lFyaKqF0X2wzcxtrcvnX-skHuE2MZA-LzNXQxapE4p4,2903 +torch/include/ATen/ops/_rowwise_prune.h,sha256=gOJxK_UJhxkXINCe9w3xTXvV7A32g3tNgxe1RlF10SY,1112 +torch/include/ATen/ops/_rowwise_prune_compositeimplicitautograd_dispatch.h,sha256=Kbn76FF543PcePQ23cmOZhI2BwonNQjRxD3gH2eJv6I,1119 +torch/include/ATen/ops/_rowwise_prune_native.h,sha256=bgvfHcLPZv9OZ9MFYb9YjBHuASKfMxExJp-n4eT5zRk,831 +torch/include/ATen/ops/_rowwise_prune_ops.h,sha256=SLCR51rc_G-VTbvmP9OH6gP6a7f8oliwhUVIwG1KmKY,1544 +torch/include/ATen/ops/_safe_softmax.h,sha256=fXBpzi7mkNyn0oeq9-Q65ltkcWZ_njA-WZRYklnWfhQ,1031 +torch/include/ATen/ops/_safe_softmax_compositeexplicitautograd_dispatch.h,sha256=Ig2Qvf97RxcSTFzsDJwmYMDpqCPWatXHIbgDN_6L52g,1092 +torch/include/ATen/ops/_safe_softmax_native.h,sha256=IUiXfibyQdI4ukkw2yWcyKLDZrctDq-1RBQfEHJF-ck,804 +torch/include/ATen/ops/_safe_softmax_ops.h,sha256=jKYKZgg7IBEQ4J0BO6JaUeyHwicu5aUlKI79sB9d9_Y,1411 +torch/include/ATen/ops/_sample_dirichlet.h,sha256=uCfuSXMIHuxUw6cyz9bqnf4KnWxE9WfOGks7fJ7Y8Uw,1661 +torch/include/ATen/ops/_sample_dirichlet_compositeexplicitautograd_dispatch.h,sha256=3jq_U_Qz7HZtPmhQDbWf6Zf0ykxJv2zWXWM8RtsPFEQ,1242 +torch/include/ATen/ops/_sample_dirichlet_cpu_dispatch.h,sha256=ASQ3z19-oFmygGnHZ5vzHGHD7rLtIjOfyOWVGxUKMFY,1042 +torch/include/ATen/ops/_sample_dirichlet_cuda_dispatch.h,sha256=olV0fpUQUcXm2xT_R7LVj87KbP-oeqESo9V7HaM6QyY,1044 +torch/include/ATen/ops/_sample_dirichlet_native.h,sha256=cFMCLxvkjS_PSAEKWiRGad_6rd8xEfVd143wXI5Id8w,1050 +torch/include/ATen/ops/_sample_dirichlet_ops.h,sha256=X6HJ3f1MPN9r22ZQ3zp3nlHmaZ7ELG4lDNhR4Uk4_8k,2153 +torch/include/ATen/ops/_saturate_weight_to_fp16.h,sha256=RNha5FkTQxxR0UXIlNCuSS4z2XANaMJG11LFvBFrecM,969 +torch/include/ATen/ops/_saturate_weight_to_fp16_compositeimplicitautograd_dispatch.h,sha256=yS0SNFXQz2jxuwe7Zt87JFq9UqXKA16TPX34rhwXJxE,1038 +torch/include/ATen/ops/_saturate_weight_to_fp16_native.h,sha256=AdxN_fk1juTYK7zMrCiNNvL8lLnXycQSf7zN60ZWap0,750 +torch/include/ATen/ops/_saturate_weight_to_fp16_ops.h,sha256=5T9Rc8BlPbtjuUSzLc6ysXENetHb8C1wB7xrc-WZ1L4,1271 +torch/include/ATen/ops/_scaled_dot_product_attention_math.h,sha256=_TYa8ktH1PHzHcwtRwN6qBpxbZmjQ-ajgPMjKqBuijY,1550 +torch/include/ATen/ops/_scaled_dot_product_attention_math_compositeimplicitautograd_dispatch.h,sha256=_eEt8qvdNJ35HTyWqYqYbFPHr9plP-zWGlaq5zooseQ,1338 +torch/include/ATen/ops/_scaled_dot_product_attention_math_for_mps.h,sha256=F1k8n4v9eHDwvzPLGpO5Hx2sV_BYTWnF-ShURCjBQrc,1524 +torch/include/ATen/ops/_scaled_dot_product_attention_math_for_mps_native.h,sha256=0SAoE4aPf5nZIVqujS9jFASmof4GFAJst2Lcyq_eobA,676 +torch/include/ATen/ops/_scaled_dot_product_attention_math_for_mps_ops.h,sha256=nuu98tqraI5Cd6Vh1kA2OMybuwUutpCTsWT56FFQ3Wc,2126 +torch/include/ATen/ops/_scaled_dot_product_attention_math_native.h,sha256=lrUtfvmGJ2lI1ZTPQ7PzjPtuhqdQk0Ep24jcgXN4OCg,1050 +torch/include/ATen/ops/_scaled_dot_product_attention_math_ops.h,sha256=Hxchl300QXavAAQyZLgpZNZWyF63rOTqILjce5u3Ypc,2165 +torch/include/ATen/ops/_scaled_dot_product_cudnn_attention.h,sha256=Y_5_NeGXfvohk235UKUVZgRFs7HZnK_3b0T9tHfLEKg,1769 +torch/include/ATen/ops/_scaled_dot_product_cudnn_attention_backward.h,sha256=guWO3YXvUDY_PY3ZgF4zA6SaBelbZjioKtmCwjUdAes,4717 +torch/include/ATen/ops/_scaled_dot_product_cudnn_attention_backward_cuda_dispatch.h,sha256=oZA8H0WIJDscfG5VIjMP9dcWSeaYYeSIFWrOZ4tewbk,1993 +torch/include/ATen/ops/_scaled_dot_product_cudnn_attention_backward_native.h,sha256=Tk4j3AvE4DqNIIsGZQV16lk9adYcXpkWVQSBSZzMOdA,1755 +torch/include/ATen/ops/_scaled_dot_product_cudnn_attention_backward_ops.h,sha256=DzEJ_0MEY6U3ltKq8oKS4od907SuAFpJrlmkh0WI5_M,2755 +torch/include/ATen/ops/_scaled_dot_product_cudnn_attention_cuda_dispatch.h,sha256=ja7ieHhj_P7B5Tyf4RlWQyiV3aMKL9WZHYcWIZcD-OY,1352 +torch/include/ATen/ops/_scaled_dot_product_cudnn_attention_native.h,sha256=JTe1uzm1cKP2SMKTEJvSD1VXRR7Vxbpkb1DjALSo9j0,1559 +torch/include/ATen/ops/_scaled_dot_product_cudnn_attention_ops.h,sha256=ztRblSKZWgG-JzkKd59jzGOzt_wF_6uaNPKJT9Az4H8,2485 +torch/include/ATen/ops/_scaled_dot_product_efficient_attention.h,sha256=oIzzTb7AxKgxUT6h8fhUsrKV8tTHYWIQ9VXy9bY53xA,1562 +torch/include/ATen/ops/_scaled_dot_product_efficient_attention_backward.h,sha256=8iG2kcH3RzKLKUvgyMJhTU0khR8p-kq4Kd-F-MrABys,1833 +torch/include/ATen/ops/_scaled_dot_product_efficient_attention_backward_cuda_dispatch.h,sha256=xt_dgIQETh8Xd00wCk7flwo0HiZ8-ycdmXKNdSorp3Q,1420 +torch/include/ATen/ops/_scaled_dot_product_efficient_attention_backward_native.h,sha256=UiE9SlKp51xMit_8HeDuMIzo5AiUVLGVJyS0DOGKoXU,1179 +torch/include/ATen/ops/_scaled_dot_product_efficient_attention_backward_ops.h,sha256=jdMQ0XZWQ490YpHrer26ZyP6XEFvtAiE0ED_cuFQ5WQ,2614 +torch/include/ATen/ops/_scaled_dot_product_efficient_attention_cuda_dispatch.h,sha256=XR3vVssxe6h1rAzus4mu8tg6pmU-dtQmtD0Vc8m1tK8,1269 +torch/include/ATen/ops/_scaled_dot_product_efficient_attention_native.h,sha256=zjbVX1j4eayG1cpQ7U96v4TVa45laC1126gvCyEiDAA,1393 +torch/include/ATen/ops/_scaled_dot_product_efficient_attention_ops.h,sha256=Qp5BxaHjlxCeU0pIMoqyupIiyMUfTC37zp1CogwKEnY,2155 +torch/include/ATen/ops/_scaled_dot_product_flash_attention.h,sha256=fDAW1xKYpyd2Qfo0NzVX2exCcX6PddD5X1kjeksSgug,1613 +torch/include/ATen/ops/_scaled_dot_product_flash_attention_backward.h,sha256=bfTRMLwYVILUmWXMqgGry3eoSmHqU0C5HOwsysS8IPA,4579 +torch/include/ATen/ops/_scaled_dot_product_flash_attention_backward_cuda_dispatch.h,sha256=xpG07K1M8QZugD2zuSibkHp5Rvtg2Cg4VeP1e3xiDaM,1933 +torch/include/ATen/ops/_scaled_dot_product_flash_attention_backward_native.h,sha256=VMOnC4uilfT2ycz5d26S5qAm1e8nbpY6bi1AXNdepCw,1684 +torch/include/ATen/ops/_scaled_dot_product_flash_attention_backward_ops.h,sha256=XUVZ39QSXd3DGzoEPKCu9YYk8-gW7YwNSfV_fT7CHgc,2688 +torch/include/ATen/ops/_scaled_dot_product_flash_attention_cuda_dispatch.h,sha256=YTDI2rEAQFivsHCDghODwWnC97T6d-DTyXfPtTmDISg,1280 +torch/include/ATen/ops/_scaled_dot_product_flash_attention_for_cpu.h,sha256=XvYvOuB4Lc9LBRUKStYjSZNnjS9BhBYbfRx9Zps05iY,1451 +torch/include/ATen/ops/_scaled_dot_product_flash_attention_for_cpu_backward.h,sha256=T44fSiswgcEhzGmnnblItTTHKUx1knaOGm1HB09xIG0,1656 +torch/include/ATen/ops/_scaled_dot_product_flash_attention_for_cpu_backward_cpu_dispatch.h,sha256=xRJSuu7OdMOh3p61Iy5K8yMHZdYfXZKPX4KDRedGSxs,1320 +torch/include/ATen/ops/_scaled_dot_product_flash_attention_for_cpu_backward_native.h,sha256=Ok5e_LibHBAyw4MWT0Fw4jbfVz2LUQN8_4RP63Mvxz0,1072 +torch/include/ATen/ops/_scaled_dot_product_flash_attention_for_cpu_backward_ops.h,sha256=BsXy05iGQr3gywL-66xw4zu6ECoziyfFLxadvy1UDVA,2327 +torch/include/ATen/ops/_scaled_dot_product_flash_attention_for_cpu_cpu_dispatch.h,sha256=ubvOoqbhAHoxXMRC-8zy3W2DkBLlPdOgBpDbHPR4tK8,1227 +torch/include/ATen/ops/_scaled_dot_product_flash_attention_for_cpu_native.h,sha256=t4iu9-OSrOW62l-RGutiOUGASk6zAV_ir75QSK5UnJs,979 +torch/include/ATen/ops/_scaled_dot_product_flash_attention_for_cpu_ops.h,sha256=mtmXBmdPYb0uqfXjdvh1Zd9_UZSKEsMC36W9CYonL8g,1982 +torch/include/ATen/ops/_scaled_dot_product_flash_attention_native.h,sha256=4Yk1NM1Kbw8-bzjOBeZfSeuPYdmGQQlrmHxHnHvOeEM,1415 +torch/include/ATen/ops/_scaled_dot_product_flash_attention_ops.h,sha256=PG_B3zIcQVvJKkOi_yzcPN5UdahDls4sCOPAWtnHrXI,2245 +torch/include/ATen/ops/_scaled_dot_product_fused_attention_overrideable.h,sha256=OX16nWo0XgylrrHdN43oHx9A5_i8GU_6zkxyfbrcRkw,1759 +torch/include/ATen/ops/_scaled_dot_product_fused_attention_overrideable_backward.h,sha256=dTHaB2E3ejSBjRUmMOmrrz2gMbTMrR2zSGeC2QNpF08,5282 +torch/include/ATen/ops/_scaled_dot_product_fused_attention_overrideable_backward_compositeexplicitautograd_dispatch.h,sha256=x4_rX0eySBtka0fHxPb5wpxCnvLRS8nBQ1zSdvU3rm8,2159 +torch/include/ATen/ops/_scaled_dot_product_fused_attention_overrideable_backward_native.h,sha256=R8HD1CtZxVrA876Ss3FGgFNyNfx7Euo8bPg-09tY-u0,1266 +torch/include/ATen/ops/_scaled_dot_product_fused_attention_overrideable_backward_ops.h,sha256=n7dvP0-SJPSva12sveflpCDsZEEZDjYfS8B3kEK8wsA,3004 +torch/include/ATen/ops/_scaled_dot_product_fused_attention_overrideable_compositeexplicitautograd_dispatch.h,sha256=gNB-hIMsciN7KHcvN8mLle7y_jBWKbj4s2l5gFRqLRU,1385 +torch/include/ATen/ops/_scaled_dot_product_fused_attention_overrideable_native.h,sha256=7rUEqX__mv3Gigo808FQLL926uKdLbnFc3l4MsOhl98,1097 +torch/include/ATen/ops/_scaled_dot_product_fused_attention_overrideable_ops.h,sha256=aL877R44j4ObBaTMB1coDQ-wmTybIuE1EQbSSlojI2A,2448 +torch/include/ATen/ops/_scaled_grouped_mm.h,sha256=5fH8ry71RiDFW-8OfBXBPvo6iTisN0VgfdFtKWx2t2Q,1490 +torch/include/ATen/ops/_scaled_grouped_mm_cuda_dispatch.h,sha256=pOmC0lABNzTDimislWqwtXfApjj7iHlZb2HysadRKgE,1297 +torch/include/ATen/ops/_scaled_grouped_mm_native.h,sha256=JyBtRzlUDxKfBRSalre6Qo4g53irZ8FaTdg-He2-iRA,1056 +torch/include/ATen/ops/_scaled_grouped_mm_ops.h,sha256=jQZgnj4Pp8iSdGG1Qlh-egj7vLZL_cdr1qMvJRLc7Fo,2180 +torch/include/ATen/ops/_scaled_grouped_mm_v2.h,sha256=trd4A9GAer1lzzPXfdudscoBUSvqlxyRpAE5CPta21g,1697 +torch/include/ATen/ops/_scaled_grouped_mm_v2_cuda_dispatch.h,sha256=LuQcyCfWlwKAgJZtuWwJKpKGUq-XJP-DFc7qhTc4--0,1381 +torch/include/ATen/ops/_scaled_grouped_mm_v2_native.h,sha256=aPa3n-jxYTLKlgTe6fyls8oPCSgW-4tP6s4jbwkWpoQ,1140 +torch/include/ATen/ops/_scaled_grouped_mm_v2_ops.h,sha256=Qg7xYjRsP1NzsGl_ZTyCJG8jMSMNhZim0uMzvzFo2T8,2460 +torch/include/ATen/ops/_scaled_mm.h,sha256=SxYr8M0K-PvNWV0rq1SXxqk6r4B4RfwlaiTL0R1LELU,2737 +torch/include/ATen/ops/_scaled_mm_cpu_dispatch.h,sha256=uXKAuos4jLgSi2NYYH4Ql1aVrDHC0o3qOcgSw56ahtY,1908 +torch/include/ATen/ops/_scaled_mm_cuda_dispatch.h,sha256=TmK3LinNsD1INvIPaVWtVvRweI6PmDHptC2f5n0aeqg,1910 +torch/include/ATen/ops/_scaled_mm_native.h,sha256=G2dQN2ulY42Ts9dRuI89IfcuErWjSt1NsdtLjqp3Teg,1976 +torch/include/ATen/ops/_scaled_mm_ops.h,sha256=QGCS_zvD2Dk2P0lCYPBuRDhAc8W5dTnckSnwMkgiVCQ,3411 +torch/include/ATen/ops/_scaled_mm_v2.h,sha256=uDzVdSWYu1m8grLHpY-aIUueeqM9C5dbsM2zPbQjN9A,3286 +torch/include/ATen/ops/_scaled_mm_v2_cuda_dispatch.h,sha256=MzYexNGWBwhumd6ja18Fb7Ow5yBuUbK-fMzNjVAK27M,2126 +torch/include/ATen/ops/_scaled_mm_v2_native.h,sha256=9iUlJ2PhOFpWo9xL4s0sjPoqli2NON7DJPn_5gzb6pI,1477 +torch/include/ATen/ops/_scaled_mm_v2_ops.h,sha256=JtTwMckuG0DEn2qZkmGHkAajEhcS2v1807LThlCpOWQ,3951 +torch/include/ATen/ops/_segment_reduce_backward.h,sha256=vWDpFfJnjyTOSmc2nHlmlO5A8UfRQ2kadsMQKuQdpes,2707 +torch/include/ATen/ops/_segment_reduce_backward_compositeexplicitautograd_dispatch.h,sha256=QmJhzSRJYKQhDspir9ZHg88cb5TbVhkhm44orgLHXmE,1632 +torch/include/ATen/ops/_segment_reduce_backward_cpu_dispatch.h,sha256=fBCvjzY1-eqrongBoCAnyaTux29OtpQWttWOV4tHzx0,1241 +torch/include/ATen/ops/_segment_reduce_backward_cuda_dispatch.h,sha256=Eg8VaPpl5O1S5zDpAQCTsKuGvi6gIu_K7pogSCJo1jY,1243 +torch/include/ATen/ops/_segment_reduce_backward_native.h,sha256=eY7cybZJSDck8JxrPYdsgQYD2UxiJ_ang_06pW95i4s,1326 +torch/include/ATen/ops/_segment_reduce_backward_ops.h,sha256=XCDcxrC0_5e4K7IkF6a-O-0DNkABncuRD-X0B1kRPQE,3408 +torch/include/ATen/ops/_shape_as_tensor.h,sha256=5cBcV9Y3mIgrz9FYwsv6P9AFPV0NYa_32s3PXwJAqUk,931 +torch/include/ATen/ops/_shape_as_tensor_compositeimplicitautograd_dispatch.h,sha256=LkHLx596h8aTto0QYiS5Bp1ZRgkUzAd2ivtQx_ba1Yw,1028 +torch/include/ATen/ops/_shape_as_tensor_native.h,sha256=6_jJzgkp8kEN5q18QSiV9y98CXgCm0DDsrhNRwRjOiI,740 +torch/include/ATen/ops/_shape_as_tensor_ops.h,sha256=Q_WY76hISVwIcpo9qukzHnyNpmSCViT2j5LXCuJgo9I,1241 +torch/include/ATen/ops/_slow_conv2d_backward.h,sha256=q5cCUlgUROJMkEVsWUt4B61fstGH8vA5h_LdG7IIrlc,14784 +torch/include/ATen/ops/_slow_conv2d_backward_compositeexplicitautograd_dispatch.h,sha256=1eq9KUm7R8OMCQAgJj0AaBCVyrG27_WrgUD1Ii_VEbQ,2376 +torch/include/ATen/ops/_slow_conv2d_backward_cpu_dispatch.h,sha256=9ZG5qi3HQfBISIRCoba20QYy_7MeZJlt1LdlWY39Ogg,2839 +torch/include/ATen/ops/_slow_conv2d_backward_cuda_dispatch.h,sha256=qE01tDtOcLqdmU3Md2B1t90Edp1Oa5Qh8WCAUkhTeEA,2841 +torch/include/ATen/ops/_slow_conv2d_backward_native.h,sha256=v3MfyZWyD2h8AYRIT7gQfHrx3K7B3RD4UFxLEj9uM50,2270 +torch/include/ATen/ops/_slow_conv2d_backward_ops.h,sha256=xJk_txYe9lmIZIrP-NKKij__-fsPnPNvzdn_cDnqyAU,5115 +torch/include/ATen/ops/_slow_conv2d_forward.h,sha256=qxkRvjqxn357DQSz78KkkT6w69lrrg23pAxZpazZxRk,7035 +torch/include/ATen/ops/_slow_conv2d_forward_cpu_dispatch.h,sha256=KRL0Jud3OYaSu610QTiFpgyGZ42a4FS_hiaEyVJV39s,2377 +torch/include/ATen/ops/_slow_conv2d_forward_cuda_dispatch.h,sha256=fgfhOSXJp5OZSrJDT6LSIIWHKq0esaOSX3YB6dFd1Wc,2379 +torch/include/ATen/ops/_slow_conv2d_forward_native.h,sha256=5HTfK0oOpvJJ6I_WUDtyIbUCc9RNmsI20pzu7wzhhvQ,1604 +torch/include/ATen/ops/_slow_conv2d_forward_ops.h,sha256=IyiW8shg7orMvtokL5slUchXv9rbR62TD9Hadn39jVM,2957 +torch/include/ATen/ops/_sobol_engine_draw.h,sha256=lvsUWXNIgr9r56OOVJFq9CRz7vpxsdHJFPBPQ2zMzyI,1227 +torch/include/ATen/ops/_sobol_engine_draw_compositeimplicitautograd_dispatch.h,sha256=65Ym5KrYaQNz4TdyxF0GgBpxPb2Xy3BMJDGiaFwMnH8,1179 +torch/include/ATen/ops/_sobol_engine_draw_native.h,sha256=vNo9jtij6VeNmN9dXuzmknkeph_0BRsgmvxT5p5_oiU,891 +torch/include/ATen/ops/_sobol_engine_draw_ops.h,sha256=1aXyvdNp-nUZgxAz8qNLs4N-YvacCKfNeQiPyKwhfbU,1740 +torch/include/ATen/ops/_sobol_engine_ff.h,sha256=ZH5vRLbXj81-ahRDCQq6c16lg489WdzUyage0k1zV8U,1123 +torch/include/ATen/ops/_sobol_engine_ff_compositeimplicitautograd_dispatch.h,sha256=iF1A81S53AIupGsoa7Kru6LC-lpWRYnHU6WEVccLUyM,1109 +torch/include/ATen/ops/_sobol_engine_ff_native.h,sha256=cNK56cUosSNE6BK1JZEbWK8YpzdBPwnVD_dY7u9wV70,821 +torch/include/ATen/ops/_sobol_engine_ff_ops.h,sha256=3GLaQlauLSyTMAXDjAK0jx8RuALpvL7MntnEMbee_b4,1515 +torch/include/ATen/ops/_sobol_engine_initialize_state.h,sha256=_PdWJ2ZbqLToQuWJUF8zC23aFA4daA5SKUW7EQz0k0o,1039 +torch/include/ATen/ops/_sobol_engine_initialize_state_compositeimplicitautograd_dispatch.h,sha256=u148FflLZtFN_nfTPzAhpxQkSNPV32vU6bCKtRQHMMU,1058 +torch/include/ATen/ops/_sobol_engine_initialize_state_native.h,sha256=vJA4CfAXV9boGHvHdbcKcSf1QjrUWMOB94rQiQ8H-fU,770 +torch/include/ATen/ops/_sobol_engine_initialize_state_ops.h,sha256=vexYzpW2yMRfwXqHVqriXgb4IXlb1x7CrO31Nh-LNws,1344 +torch/include/ATen/ops/_sobol_engine_scramble.h,sha256=DQOI4cEmgNk-4engAmYN-O6crpFPGhltET9GDqpWdtQ,1048 +torch/include/ATen/ops/_sobol_engine_scramble_compositeimplicitautograd_dispatch.h,sha256=e7NWRZCxyhN7YsebZOzdId9XIYNT9BL1Ft5bhKT1EfM,1074 +torch/include/ATen/ops/_sobol_engine_scramble_native.h,sha256=wD6RyT-6CfRE626PmzOxucBmDbkK0OGJ2v7nmpTa8OM,786 +torch/include/ATen/ops/_sobol_engine_scramble_ops.h,sha256=lq8Abkv4aJJL2qA8y8lmXlMtwb9YBMg4tA6pnbkKIRE,1400 +torch/include/ATen/ops/_softmax.h,sha256=8lOsfawl-QWdBIWspiWtWMOWalcHFMQIasvUolQ7y8g,1547 +torch/include/ATen/ops/_softmax_backward_data.h,sha256=dFj_eQOb2zHjd9U9iQMFqHgDSXLF76Gmf2PBLVjuhV8,1972 +torch/include/ATen/ops/_softmax_backward_data_compositeexplicitautogradnonfunctional_dispatch.h,sha256=dpoxWsAEphwDD8laI2JQkrOOCFBTFwL8n49Nk2M4Z18,1135 +torch/include/ATen/ops/_softmax_backward_data_cpu_dispatch.h,sha256=Z47zOaFUgXtAtlvonugAgVKfrSV5mPH6B-nNhb9EzSM,1418 +torch/include/ATen/ops/_softmax_backward_data_cuda_dispatch.h,sha256=wGhaqWx7Z8wi1lmnBac_dwzXI0SvYcQwlu6RWs8aKYo,1420 +torch/include/ATen/ops/_softmax_backward_data_meta.h,sha256=cxDyRkbKF_4azg6yjdUoYvK0AxQ7fYlq1DqkB8tdPsg,912 +torch/include/ATen/ops/_softmax_backward_data_meta_dispatch.h,sha256=HdM-irR7kbKN9l4yENrmJzCDeWAc1tC5WqscbeNzIrA,1420 +torch/include/ATen/ops/_softmax_backward_data_native.h,sha256=o3mB1NEY5NboLqp1H7rGSH9MWQT4UPgsYPgSNgk_a5s,1378 +torch/include/ATen/ops/_softmax_backward_data_ops.h,sha256=0cxJZhGOtOUpTUkxJoq6-up6hwmeB-6l9XBUqP9MPU8,2418 +torch/include/ATen/ops/_softmax_compositeexplicitautogradnonfunctional_dispatch.h,sha256=pyg2QGOmd5bf_CcTCmF3bLiNiXwtdVp0ZiWtFhXiOYU,1079 +torch/include/ATen/ops/_softmax_cpu_dispatch.h,sha256=nWnn5RAdOuSOdxRWKovDc78M4dQv-G4ekxnf3-QS_3I,1236 +torch/include/ATen/ops/_softmax_cuda_dispatch.h,sha256=eyU0svBZ3lzVw-usu6SlQJtiFJcM6IjTHstX-YIzHCQ,1238 +torch/include/ATen/ops/_softmax_meta.h,sha256=aRU51tHchS-GOToBhfgBbLDa-1RKq2GdDdhmf0543Q4,856 +torch/include/ATen/ops/_softmax_meta_dispatch.h,sha256=obxSUmWx_vMfnR_vZOy7cVKmQk4gZKmcPcnawXJg5WM,1238 +torch/include/ATen/ops/_softmax_native.h,sha256=9hrvUOrNewBAEBVymKc2hfp1qT7_7YdvBF1VUMgQm5Q,1264 +torch/include/ATen/ops/_softmax_ops.h,sha256=e0_lj7QnXdXxtVHvqMbHaF3JDuC6cV4uB3tXuZS4c4Q,2033 +torch/include/ATen/ops/_sparse_addmm.h,sha256=JEdDAUeHzFcYB1FpwpQQW7o49AtinJCvrRhW0p31F1U,1911 +torch/include/ATen/ops/_sparse_addmm_compositeexplicitautograd_dispatch.h,sha256=51DXy9yeutts-LVrlp4J2IDDQHPCFi9iaNKFgzgZ65A,1507 +torch/include/ATen/ops/_sparse_addmm_native.h,sha256=drjrZr7Caqn2xmXATLFVBFFPbTVgfuPmsLe4MdZTckM,1028 +torch/include/ATen/ops/_sparse_addmm_ops.h,sha256=mhHRDikq1oFt8Ru8xFa1sf94bcPCSdS5ZL2rwcwLFqw,2524 +torch/include/ATen/ops/_sparse_broadcast_to.h,sha256=yUS1PDFUk1Jb0PDUX3g0ot-M5bMp4nIVbP7qrASbWLM,993 +torch/include/ATen/ops/_sparse_broadcast_to_copy.h,sha256=nrKzCAJzPSeZKvTnDO5eavcSGyIL8BJczKJ9T6_Z5Ro,1591 +torch/include/ATen/ops/_sparse_broadcast_to_copy_compositeexplicitautograd_dispatch.h,sha256=zrtDHs6SaISFfJSasbJJV4ziG-sX5WA2SC_m9JtgurQ,1203 +torch/include/ATen/ops/_sparse_broadcast_to_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=TK2VUzQzMHc8E4KsaTaHvSxp1RNvHI4t0SmfdLpoIMY,1085 +torch/include/ATen/ops/_sparse_broadcast_to_copy_native.h,sha256=2iik3L_kA3bawcG0SVqdXovWDGR03FV6OhJjwaVhF-M,890 +torch/include/ATen/ops/_sparse_broadcast_to_copy_ops.h,sha256=em22CsWUQz8V9_ZJAQC0JLka6szWPGsFAQQKLfRdogs,2061 +torch/include/ATen/ops/_sparse_broadcast_to_native.h,sha256=eZPbTAYymLlhoPzk_1pkDGu062cygSzL95GLXRwy2Hg,765 +torch/include/ATen/ops/_sparse_broadcast_to_ops.h,sha256=Kz8GL2O53DLp9cBtOiqUacRnuzchb_jVxa0zlC2N_8Q,1332 +torch/include/ATen/ops/_sparse_bsc_tensor_unsafe.h,sha256=A2gN1HzWjMa_tMcO-72B6tadPtBAbuKeQYuSxbFYKKs,2034 +torch/include/ATen/ops/_sparse_bsc_tensor_unsafe_compositeimplicitautograd_dispatch.h,sha256=uYmltbo0r8Y1eE94IBKOTcwmUXZF47oCl8MZLB7JvFE,1463 +torch/include/ATen/ops/_sparse_bsc_tensor_unsafe_native.h,sha256=sKWgsCui-VOs1KC5YqP8hgH_FLcQtJv_BYAbkPJgtdI,995 +torch/include/ATen/ops/_sparse_bsc_tensor_unsafe_ops.h,sha256=mfpeNSPJRWupTJUgnasOtDtzGrAi-qUIOYlmp37vAQQ,2054 +torch/include/ATen/ops/_sparse_bsr_tensor_unsafe.h,sha256=Q9xkWvd4fFu_2-FIejybvXsjrJXAD55JebRKdeEhp9M,2034 +torch/include/ATen/ops/_sparse_bsr_tensor_unsafe_compositeimplicitautograd_dispatch.h,sha256=1a0LwgVW-jOhsbCIDot7Yguay54rGphf8YMvuYbESIM,1463 +torch/include/ATen/ops/_sparse_bsr_tensor_unsafe_native.h,sha256=7SGI_yU64V1K-U7CLYx51A1zl8cO5VqpEi2f1uwxdsI,995 +torch/include/ATen/ops/_sparse_bsr_tensor_unsafe_ops.h,sha256=GPvZEdldYhgn0Z5DOYhk6gdJY_lsyRH2AXv4QKcRfik,2054 +torch/include/ATen/ops/_sparse_compressed_tensor_unsafe.h,sha256=zeEkVnGhQg2wxwNl3vZrpR5DEgZ0yAO44k0m48QSGVM,5848 +torch/include/ATen/ops/_sparse_compressed_tensor_unsafe_compositeimplicitautograd_dispatch.h,sha256=yapsu8aA6yNbvHAAa2AtfwEfHEd2u8mvvjpDA8C9vs0,2044 +torch/include/ATen/ops/_sparse_compressed_tensor_unsafe_native.h,sha256=4QGn8qwVFR8jgs2yGbRbaW6HFocgS-fR2-1oBwFcRew,1021 +torch/include/ATen/ops/_sparse_compressed_tensor_unsafe_ops.h,sha256=ya8ZkcT2VTETU0zGDLZu5qbABidrTNbthlALCRGt3tw,2114 +torch/include/ATen/ops/_sparse_compressed_tensor_with_dims.h,sha256=Txw7x1xRKi8Hg-gomGnwVHwQWqvIGyYxKEI0WdiMi_E,2121 +torch/include/ATen/ops/_sparse_compressed_tensor_with_dims_compositeexplicitautograd_dispatch.h,sha256=gU9X8no1v8UPgW0K9rsQUPmt3edA9z72-OPAtS2hvXM,1470 +torch/include/ATen/ops/_sparse_compressed_tensor_with_dims_native.h,sha256=wSjtN6NMkx-wabA6DmMJAVWjAbfzmjtS_gxXddpNIVw,999 +torch/include/ATen/ops/_sparse_compressed_tensor_with_dims_ops.h,sha256=Qxbr_UV6rG8_rtVPEts_kgMANSmr4tmGQDL3mn-Nrr0,2075 +torch/include/ATen/ops/_sparse_coo_tensor_unsafe.h,sha256=MRqgWKE7p1XjAbXSi385DNQQ5fgc9Rsg0YChCfu9HYI,5561 +torch/include/ATen/ops/_sparse_coo_tensor_unsafe_compositeimplicitautograd_dispatch.h,sha256=I4COQMvvNAqKCnBG4sviRtpuGGJrdqa9b0vQCoYTqOY,2010 +torch/include/ATen/ops/_sparse_coo_tensor_unsafe_native.h,sha256=PNN84LpBpZgp6l-QwsweQ554iugLVaASvufw5Cw-lwg,1020 +torch/include/ATen/ops/_sparse_coo_tensor_unsafe_ops.h,sha256=ZCYYGDivCKCjXlFhxeORHFG6B7RkR_oB4xJBSL_usYU,2070 +torch/include/ATen/ops/_sparse_coo_tensor_with_dims.h,sha256=hP2mu_mF1NZKJ-UuGoGfyn2Lr258zx-tz8tS816-1uQ,2574 +torch/include/ATen/ops/_sparse_coo_tensor_with_dims_and_tensors.h,sha256=_ud5eZHzzm3A3miiomMbVNKn8K5a4Qnp7DDV25tuhJ4,10866 +torch/include/ATen/ops/_sparse_coo_tensor_with_dims_and_tensors_compositeexplicitautograd_dispatch.h,sha256=7fhZ8UmuXz4UqCy5TzyLaH2zZf0k7ygbrg_8p3NAZwI,1974 +torch/include/ATen/ops/_sparse_coo_tensor_with_dims_and_tensors_meta_dispatch.h,sha256=BfX_2JnsWN4_zjB_7kWtdr_79ODjb0GZc1AZWbGrP9Q,2178 +torch/include/ATen/ops/_sparse_coo_tensor_with_dims_and_tensors_native.h,sha256=kuOmLICVh3tXoIgtMFgnItiLHO4bnRZNj8wP1UithMU,1315 +torch/include/ATen/ops/_sparse_coo_tensor_with_dims_and_tensors_ops.h,sha256=jeL9qWLxP-JsVCLIM_-cnXAeS6QGTju45_9x7i_QAmE,3368 +torch/include/ATen/ops/_sparse_coo_tensor_with_dims_compositeexplicitautograd_dispatch.h,sha256=unUeTIogxeXNsACfFRqOLY8FqwezsiXsltiVw5ZF7Qs,1237 +torch/include/ATen/ops/_sparse_coo_tensor_with_dims_meta_dispatch.h,sha256=8vuvVso7W4x_SsjvxQTS9cfdjPojVurwcPfJq0Z_v7A,1318 +torch/include/ATen/ops/_sparse_coo_tensor_with_dims_native.h,sha256=8UBpjmPNTLwa0Lq3DUpKNUVAlYcWb1LE419r4EeXxFE,1073 +torch/include/ATen/ops/_sparse_coo_tensor_with_dims_ops.h,sha256=6dA9JReQiQRoNhZKx2VA_Vdr6cIxnyM14U599u4mi-c,2664 +torch/include/ATen/ops/_sparse_csc_tensor_unsafe.h,sha256=Kd6aJgw73c6W2TiVTKZdlPmcjgk9WW2JKmWuQ_8dQ8g,2034 +torch/include/ATen/ops/_sparse_csc_tensor_unsafe_compositeimplicitautograd_dispatch.h,sha256=0ACSp5RERfN0O-p7GjUKcx88IXgqkSruQZWamVqoeGM,1463 +torch/include/ATen/ops/_sparse_csc_tensor_unsafe_native.h,sha256=rkp4pNmus9mptxFaMQaGivfx2zQpUgtWqL0w_zeLuhQ,995 +torch/include/ATen/ops/_sparse_csc_tensor_unsafe_ops.h,sha256=tPrEXo5lJ7nL9RBUeXphUvkFsVGM5U89HrauLz-44Kc,2054 +torch/include/ATen/ops/_sparse_csr_prod.h,sha256=pU8xfUzU3ciWeMOAUupWigKMM1GYmbokfEKV9CM5lPI,1939 +torch/include/ATen/ops/_sparse_csr_prod_compositeexplicitautograd_dispatch.h,sha256=eCYI3JZAipAMwj2RsFQC8EqUQNLQPwya8t2zqMYQyp0,1310 +torch/include/ATen/ops/_sparse_csr_prod_native.h,sha256=KbO2KlLvXp0HxNJAHYg7ovb1zYTW3THJapmYtDbOaCw,1175 +torch/include/ATen/ops/_sparse_csr_prod_ops.h,sha256=tTq7zKGz20lG_I0EI-Oj6arlHoxdlz-YKMWcweOzHTw,2443 +torch/include/ATen/ops/_sparse_csr_sum.h,sha256=W70LlX-1oMqF84EaH5ApjGZIz6gOlYRjI5AXq5KRXIk,1929 +torch/include/ATen/ops/_sparse_csr_sum_compositeexplicitautograd_dispatch.h,sha256=RusXksQYxdWOExp_15c-T3C6WlwaARbR07ofnInjrXc,1308 +torch/include/ATen/ops/_sparse_csr_sum_native.h,sha256=_2Dl4mymkm4810qo8Om1rrZu6XUk290OZR6t4PWtvR0,1172 +torch/include/ATen/ops/_sparse_csr_sum_ops.h,sha256=zjfamLMz6ydl-Qf7DY7bPel2HsBsFkSSXzURZ11vLZM,2437 +torch/include/ATen/ops/_sparse_csr_tensor_unsafe.h,sha256=IPaUHDUl_KojGaczSaxcQd73zbvta1yoYfGAR9q5Sto,2034 +torch/include/ATen/ops/_sparse_csr_tensor_unsafe_compositeimplicitautograd_dispatch.h,sha256=IEcOH_XXfEZ6lolx2HD9_1j-3zs-eOQ3X24x4y6Hnvo,1463 +torch/include/ATen/ops/_sparse_csr_tensor_unsafe_native.h,sha256=d9V63axTfdAKYN3bCqeIqp2eynwOuF2xreUxD8tQrQI,995 +torch/include/ATen/ops/_sparse_csr_tensor_unsafe_ops.h,sha256=77KzwoW5hNfLc7yh0e-YLVSDCwWqdSCBaMuUSuh62Hs,2054 +torch/include/ATen/ops/_sparse_log_softmax.h,sha256=Cidw4F-GJcjHpioYr4ZVIipdtKqc2o0Jlh2irqyq0G8,2264 +torch/include/ATen/ops/_sparse_log_softmax_backward_data.h,sha256=7Y6uM2Ddf2V6uRfrioAA7BkzOfVWDooc_64GAUlIk9U,1977 +torch/include/ATen/ops/_sparse_log_softmax_backward_data_compositeexplicitautograd_dispatch.h,sha256=eWodcdmSG8PSk2uLYpjqbLaPreyMekhzk2dmqgLlsJ8,1319 +torch/include/ATen/ops/_sparse_log_softmax_backward_data_native.h,sha256=Hub86o313x5WOi7dafisMLg0-IgP_Ultz5valJx8NG0,1156 +torch/include/ATen/ops/_sparse_log_softmax_backward_data_ops.h,sha256=HSRDJqXo8zG7wTkli4MAtqgIT8Ny3hHty7Hnw4QcuyM,2437 +torch/include/ATen/ops/_sparse_log_softmax_compositeexplicitautograd_dispatch.h,sha256=QgIjZskOPK4xGBj8mff7SMwovE27mRT_-gE5RKOojwc,1213 +torch/include/ATen/ops/_sparse_log_softmax_compositeimplicitautograd_dispatch.h,sha256=LpomyYXIbISeqSuBSi--f4Fn2iHaaN_F-9d3YHgYCf0,1236 +torch/include/ATen/ops/_sparse_log_softmax_native.h,sha256=1oNEdQyExba9-5OALr21g3AewyGirzDwNoroGPrn5MA,1279 +torch/include/ATen/ops/_sparse_log_softmax_ops.h,sha256=nA27sg0wvjV1MPCqcq3mbclATKVjyVlu7V12eIbM70Y,3588 +torch/include/ATen/ops/_sparse_mask_projection.h,sha256=FoaHGbwWWMLd02YR_RsQ3yqEJohr6f9PNP3b3EaO_Pw,1511 +torch/include/ATen/ops/_sparse_mask_projection_compositeexplicitautograd_dispatch.h,sha256=U3o3tSyDMITR31LY46IPXQgAdVkS98_lZiIAY7Pklws,1261 +torch/include/ATen/ops/_sparse_mask_projection_native.h,sha256=cVjQfwmWBehkIZc6Q-Rgozct7cailHO8MpP51hXocyQ,947 +torch/include/ATen/ops/_sparse_mask_projection_ops.h,sha256=KI3xUidyM47D9He9FWuDdg2JbLgm39yj1iausnnuIaE,2243 +torch/include/ATen/ops/_sparse_mm.h,sha256=HfkW16IjYIL4egSq8DCoIJj4R8dHfae3TdzD0FmS6_U,1219 +torch/include/ATen/ops/_sparse_mm_compositeimplicitautograd_dispatch.h,sha256=pU1WH4vYdcJZDi3bIQkyqWOpyrCHHM-wTGRRmYdkJ2M,1161 +torch/include/ATen/ops/_sparse_mm_native.h,sha256=A2A3t-d4mUSGtoJ6lIQexV9irH3ZOia7zrGpCRYwT68,873 +torch/include/ATen/ops/_sparse_mm_ops.h,sha256=v7rKiTxWlJ5RKTwD4BbF9ZZkhziRHn7hQ6IPJcamWO8,2019 +torch/include/ATen/ops/_sparse_mm_reduce_impl.h,sha256=uEifMo5AFiy9XuMYA6BuptEKcAYEa5jC4JQ9gn0q7qU,1082 +torch/include/ATen/ops/_sparse_mm_reduce_impl_backward.h,sha256=BB279Lss-5J8I29XESfPgsIWmQ_MI9yKnDCrArRbvIY,1298 +torch/include/ATen/ops/_sparse_mm_reduce_impl_backward_native.h,sha256=e7awKjdhzjSh9-0J61H9Ecm5W90We5N0J1C_aB3e3Us,938 +torch/include/ATen/ops/_sparse_mm_reduce_impl_backward_ops.h,sha256=YWitpUyea5R-OzrypovoEThEmzVOgB4PKBWrLzyEq5Q,1838 +torch/include/ATen/ops/_sparse_mm_reduce_impl_native.h,sha256=7yWu1afm8uZ8lv31dISjHoNka8KQHAWnrxkH5-mCXmo,837 +torch/include/ATen/ops/_sparse_mm_reduce_impl_ops.h,sha256=VAJrRP31GkwuurZs5i-L9mjyZmROsfnaoaooJgBA7bQ,1510 +torch/include/ATen/ops/_sparse_semi_structured_addmm.h,sha256=mCAqiZsnMFaULuBWihG1UxK1vCrkLIT-hOxvkVIIYqg,1332 +torch/include/ATen/ops/_sparse_semi_structured_addmm_cuda_dispatch.h,sha256=IOywnxpQBMJoCa2urDcUPWimsB3hPYZGbiyrxIcnsnc,1193 +torch/include/ATen/ops/_sparse_semi_structured_addmm_native.h,sha256=TslEn0gAcV2rOaKPVcTLsQ6DDg7vt-kNyKOgyhG1QR0,947 +torch/include/ATen/ops/_sparse_semi_structured_addmm_ops.h,sha256=O1v-3RFtr9XdIQHik-2OtIcXqPofytf6_Di_5d4g9es,1870 +torch/include/ATen/ops/_sparse_semi_structured_apply.h,sha256=SuyU6NZUWh8rv9AYoxOQlPejy83FzqZBn5F8eujIejs,1089 +torch/include/ATen/ops/_sparse_semi_structured_apply_cuda_dispatch.h,sha256=b8k4KvRC697kVzTOOUV7XvezeYk14uQh4uhBo8kCOgE,1058 +torch/include/ATen/ops/_sparse_semi_structured_apply_dense.h,sha256=4urKlxLsz-b8WtuTI5utUMO_AwHY1AcSTuIxjhPgkm4,1078 +torch/include/ATen/ops/_sparse_semi_structured_apply_dense_cuda_dispatch.h,sha256=U0PZwukT3WhYuwyiM8MOunIMER_MziaNW-yWuVZ7lUg,1039 +torch/include/ATen/ops/_sparse_semi_structured_apply_dense_native.h,sha256=M80uZ_e0ykiJGUQyQBDMieoE8R5YJuJJ7tGScCuQaAQ,793 +torch/include/ATen/ops/_sparse_semi_structured_apply_dense_ops.h,sha256=ryjbK6f1ah6Uk5yjRzQY8bmbq9UEJfxPTjx5of3hlp4,1408 +torch/include/ATen/ops/_sparse_semi_structured_apply_native.h,sha256=Ra5TuyofUEyBj1a1s4jeOKVFzx-CI5hwq9p2EzY7KfI,812 +torch/include/ATen/ops/_sparse_semi_structured_apply_ops.h,sha256=J_4tvx4orqWUwopZC5GuV6F6UWcJAWjMf5l4eEPEhKQ,1475 +torch/include/ATen/ops/_sparse_semi_structured_linear.h,sha256=RitS-VqQD6z9Kr8nO42HG3l_v0c4Uz5WqwKyI2W8ehw,1349 +torch/include/ATen/ops/_sparse_semi_structured_linear_cuda_dispatch.h,sha256=bizinDywN1rMa_SP9kAMRC_SljifVzdrrTCthcdmY5c,1217 +torch/include/ATen/ops/_sparse_semi_structured_linear_native.h,sha256=AwJ9JnoSQz__M2c9Q6YL5XFrzBVCG4r8r7-7e7FhKb4,971 +torch/include/ATen/ops/_sparse_semi_structured_linear_ops.h,sha256=14GM-GjwN7Zqtww5JKnbL8H3TEqi59ZbWOggHiP1JVM,1897 +torch/include/ATen/ops/_sparse_semi_structured_mm.h,sha256=zl3wgkIqzZ4dQDqPtn9v1iUfFhRyE2QmgCTSXIGrsvE,1174 +torch/include/ATen/ops/_sparse_semi_structured_mm_cuda_dispatch.h,sha256=3VmapmQJgJWeQGHCwvLI-xCJOW6nMrjvahmQHIIb3vg,1109 +torch/include/ATen/ops/_sparse_semi_structured_mm_native.h,sha256=nneNw3v6IAgBaxt8raRGoo82MTgB2mWItRFKXCmJIog,863 +torch/include/ATen/ops/_sparse_semi_structured_mm_ops.h,sha256=-8B9GHe_4N3pP42VzJjZufl4HusSwT78YXnEZ9zCp1A,1602 +torch/include/ATen/ops/_sparse_semi_structured_tile.h,sha256=WAfC5WFpJGW59fNNubWF5iUg7cTpyGgYS9z7n7u1_gY,1193 +torch/include/ATen/ops/_sparse_semi_structured_tile_cuda_dispatch.h,sha256=4OJKQ5l2KGlX-o7Kdn_Tc6nSbXy4DRCDJRErH4GYcSI,1111 +torch/include/ATen/ops/_sparse_semi_structured_tile_native.h,sha256=olsupM3GOEAIkrO3_Zni3BtkuvcjPL0OJjsVdyKQZw8,865 +torch/include/ATen/ops/_sparse_semi_structured_tile_ops.h,sha256=u-IukdlhaQ894uXGIL0ZV2IISghVkYIsP_zUjuYbVYg,1647 +torch/include/ATen/ops/_sparse_softmax.h,sha256=x4p-0H_87O6IeohGjZHqjEc-s3SEC0co_ctjgkRqu44,2200 +torch/include/ATen/ops/_sparse_softmax_backward_data.h,sha256=iVMeIXD1SJsTHRE9zOKH35Q9WrellOb9KnwdXivDuQ8,1937 +torch/include/ATen/ops/_sparse_softmax_backward_data_compositeexplicitautograd_dispatch.h,sha256=Un5JWG1L6j8YqUGaaCe-YfaWjoxqXAYnq0GJeN00Bao,1311 +torch/include/ATen/ops/_sparse_softmax_backward_data_native.h,sha256=p6hXfyhQKvSFxLoQYX48jVol2csu6VNXBJqersAwlkQ,1144 +torch/include/ATen/ops/_sparse_softmax_backward_data_ops.h,sha256=w43m6xczEcQjkDpYzsaVNaB5vjplF86eKiqGfpbxR7M,2413 +torch/include/ATen/ops/_sparse_softmax_compositeexplicitautograd_dispatch.h,sha256=ciQS89KIPR6-GRA0Y5ugtxaDFy4o6LEUND6oE5FCEHE,1205 +torch/include/ATen/ops/_sparse_softmax_compositeimplicitautograd_dispatch.h,sha256=9TbKUv06GXMvLgD9acuC3iHraUw9A2fcKG93yMyBZWg,1228 +torch/include/ATen/ops/_sparse_softmax_native.h,sha256=dtNHO5qh-9fYQYgH8eMpUY9zgM8M0tt-RRY6Nh0y1j4,1259 +torch/include/ATen/ops/_sparse_softmax_ops.h,sha256=NarX-lC5H05UcniMJ83zB7H9vJ6_Ola3DFIPyM-iQfM,3540 +torch/include/ATen/ops/_sparse_sparse_matmul.h,sha256=e2UucJi5VgQvBpl6Z9H7PmWSY3GTZbwaMPsfCNj_G4M,1572 +torch/include/ATen/ops/_sparse_sparse_matmul_compositeexplicitautograd_dispatch.h,sha256=72-49i__SIo0HQpV63v1MvsppLp73vgcuyNm8Yxqf8M,1203 +torch/include/ATen/ops/_sparse_sparse_matmul_native.h,sha256=Yq-3LjgMSuExeMng8lLDVnI7yn4kx675rylGc1iQsm0,992 +torch/include/ATen/ops/_sparse_sparse_matmul_ops.h,sha256=zwknDCvBhb8lDmRBGEC3PuS6OP3qq5vleDMLJDY3gPc,2063 +torch/include/ATen/ops/_sparse_sum.h,sha256=QZjgSW1nbi3r0TLn_YRsqL833ogLtQU7AblcckvTOG0,2089 +torch/include/ATen/ops/_sparse_sum_backward.h,sha256=SdhxYiZir_ccdH-hpWfXkozbdBUeRAJ2rpwB4fCOd-w,1664 +torch/include/ATen/ops/_sparse_sum_backward_compositeexplicitautograd_dispatch.h,sha256=qkaIlTWUwrK7Rd44f-6MJDB0TkjK-olpfE7QklU3eUg,1241 +torch/include/ATen/ops/_sparse_sum_backward_native.h,sha256=Jv_VV7b-3QGFFShAxJmumHWplEl8FVFcVtymA4dlJz4,1051 +torch/include/ATen/ops/_sparse_sum_backward_ops.h,sha256=G9D7nr5P3o52X5PcGFIcgKbAlHK-cQu2vMr5ewi_NUg,2191 +torch/include/ATen/ops/_sparse_sum_compositeexplicitautograd_dispatch.h,sha256=0VSZOM5OGo3iijux1aAU5DxbWaW38Svf690IYp3Uwhg,1253 +torch/include/ATen/ops/_sparse_sum_compositeimplicitautograd_dispatch.h,sha256=S5_wOPtSALWkZEeJoGEi38eg50coYP5xFEHTGlvR3zQ,1206 +torch/include/ATen/ops/_sparse_sum_native.h,sha256=wK1grkBCuzNTQ_nm5RbcYeqwsF0zscc7hMNG0LCCykg,1106 +torch/include/ATen/ops/_sparse_sum_ops.h,sha256=T146SrkDcTzZVRAivQ2dl92JG9rr0jCvaKXEyXy4tpk,3820 +torch/include/ATen/ops/_spdiags.h,sha256=hmokoL_XkEDpK5gqTYIR7F-njd0WGNR3F4j7PZh730A,1859 +torch/include/ATen/ops/_spdiags_compositeexplicitautograd_dispatch.h,sha256=UbRPm531USYxmiw8A6rBnVSBhOwqB-UUo7o-XYTIgOA,1324 +torch/include/ATen/ops/_spdiags_cpu_dispatch.h,sha256=JdlH1ntLN6NxWtH1HwEoovXXnVi9kC3yBN4zXfnEie4,1083 +torch/include/ATen/ops/_spdiags_native.h,sha256=Zm3V1MJSf5vev3dLBMg-Lb8baiBBmCz9HA5-Ozr4kTc,1010 +torch/include/ATen/ops/_spdiags_ops.h,sha256=_0X9qyNcNn6HPfX3HWViH7rNP7N0XtNGTzar-OHd7Y0,2423 +torch/include/ATen/ops/_spsolve.h,sha256=P_jbKsoRCLSqlchfnfoMPhZI8tzBRKO1AjK-WnCiHW0,966 +torch/include/ATen/ops/_spsolve_native.h,sha256=KWTsfcG47pJvToZ2kSRpmAV_qSrQ8QXTAhWzTl-J9RM,783 +torch/include/ATen/ops/_spsolve_ops.h,sha256=jk6LRaRv16UHadUJAm4RDl8yowK5BpXW5V4eyN_MWvM,1329 +torch/include/ATen/ops/_stack.h,sha256=6ZidL51Sq5pJIuRpTyp0zMl0OZ30SC7McXC4e9gHUlI,1393 +torch/include/ATen/ops/_stack_compositeexplicitautograd_dispatch.h,sha256=d6FPj-EEKnwaE00xkZ36li_dF8yLkRtErLtUbsPnZLI,1215 +torch/include/ATen/ops/_stack_cpu_dispatch.h,sha256=tyj0nLjDPr6P3UOw47BKKuiGA1CgDqXe5u2m3Fz9Vvw,1171 +torch/include/ATen/ops/_stack_native.h,sha256=Cy_GV1hYym7KG5_6MCD1UgTnGhd3wu6jhk-sFpAcRlc,1000 +torch/include/ATen/ops/_stack_ops.h,sha256=h3pO7_QHRrZRQatSHEpisnT1iAl6PP6gN5FMyIgXWJ0,1891 +torch/include/ATen/ops/_standard_gamma.h,sha256=-KzniOFGogDHzok-kuEPStCYKJo6cfI0WwQmI8KfD2Q,1641 +torch/include/ATen/ops/_standard_gamma_compositeexplicitautograd_dispatch.h,sha256=-n5jp-Qoj30yUEdqFu-ieCVNgEr7Mn8TU_Ai6cfmIhU,1238 +torch/include/ATen/ops/_standard_gamma_cpu_dispatch.h,sha256=oDGhf689aXLHSqhFx3s6tlQ7RSu3WmoneVjupHT4vac,1040 +torch/include/ATen/ops/_standard_gamma_cuda_dispatch.h,sha256=mWGYhroqAyXC8pwiBnlfyNjnfHDewfQAa651IHEFH7w,1042 +torch/include/ATen/ops/_standard_gamma_grad.h,sha256=C2PxB5rU9p3ckbRX5euZ-fzhiA0pdW0cBG34R8LJ7e4,1571 +torch/include/ATen/ops/_standard_gamma_grad_compositeexplicitautograd_dispatch.h,sha256=8uydEf72uD9UdImqI0-JBxraOE8gFdCnCKITFMvf_zE,1203 +torch/include/ATen/ops/_standard_gamma_grad_cpu_dispatch.h,sha256=vqE9ir-H-pAeVk8lHrP2rU73W8_jQEgqRBVBpDa9gnc,1015 +torch/include/ATen/ops/_standard_gamma_grad_cuda_dispatch.h,sha256=qz_2wfki-yfGQ8jWCb4WdF3OyF1OvwI3fRMpsAOzipg,1017 +torch/include/ATen/ops/_standard_gamma_grad_native.h,sha256=M19WbHdhSB5G4Z2-gzhszcjAhkYDfWhkn7H9QizKeQI,994 +torch/include/ATen/ops/_standard_gamma_grad_ops.h,sha256=Du9ZuWG4BpLoSmlxroDtEJXQFu2VjEuiZUPI3ezqVLY,2063 +torch/include/ATen/ops/_standard_gamma_native.h,sha256=Y6hwkP3RjNYUh3YDqloQwRBmBMIACBoTos9US49wBDI,1040 +torch/include/ATen/ops/_standard_gamma_ops.h,sha256=HtyoxMF8Pu6N6XmQpuCEGERWu827L_ifOpUdAzYbmJY,2141 +torch/include/ATen/ops/_test_ambiguous_defaults.h,sha256=iiPtWn9ulkBfqYYjQoFRq5nYGChMY1kPRWlTX7UFO3w,1273 +torch/include/ATen/ops/_test_ambiguous_defaults_compositeimplicitautograd_dispatch.h,sha256=L75HozizZ7Iya6kQXRP4oe2tOXhBBEzVGtxWpG_2S-A,1167 +torch/include/ATen/ops/_test_ambiguous_defaults_native.h,sha256=jr9B7bYvx6C3fy6hCVfrusEHGaiJY8ypy-8YmlJbeiE,885 +torch/include/ATen/ops/_test_ambiguous_defaults_ops.h,sha256=cMVW6fX2gumn6g7HKde7zAQ8ItLL2pyf5IadLjPVe80,2026 +torch/include/ATen/ops/_test_autograd_multiple_dispatch.h,sha256=3yh8AVcE3X3A4NJkZWo_vdwBWcfchWejgoywny1Bn4k,1865 +torch/include/ATen/ops/_test_autograd_multiple_dispatch_compositeexplicitautograd_dispatch.h,sha256=gq5orbrQFiF69pNB4VkDTrlQSPLJ6CDzIN1GiqwnVh8,1253 +torch/include/ATen/ops/_test_autograd_multiple_dispatch_compositeimplicitautograd_dispatch.h,sha256=MX2T8vzFVdHkrW-a-WMNrJsQsx_r1qA5Hw3qusRZVKo,1052 +torch/include/ATen/ops/_test_autograd_multiple_dispatch_native.h,sha256=eOQfDPVueJiTNQfR8Qcn9sdD1n4hqCuhE7Ki2ZDathw,981 +torch/include/ATen/ops/_test_autograd_multiple_dispatch_ops.h,sha256=jne9YO_AT_O75rbKU2y3XcHntXssxtD4a_iX5wXAcR8,2662 +torch/include/ATen/ops/_test_autograd_multiple_dispatch_view.h,sha256=Lqdwo5wPaxS7u9bTKJfuj8FynwHH4xTKCc8LAlC1ZWM,1021 +torch/include/ATen/ops/_test_autograd_multiple_dispatch_view_compositeexplicitautograd_dispatch.h,sha256=cVsywZBhxk1JNeSKXmGNulTde20iGUnybrUH0s9wuvY,1049 +torch/include/ATen/ops/_test_autograd_multiple_dispatch_view_copy.h,sha256=qOD7aMjHdtabPyI-x0zWhILvpN57IJhRklFjpHKLRMA,1641 +torch/include/ATen/ops/_test_autograd_multiple_dispatch_view_copy_compositeexplicitautograd_dispatch.h,sha256=7xqOvc8zJt2JCc9eQIHglbttOHjtWTX3ywMnZzjICnE,1193 +torch/include/ATen/ops/_test_autograd_multiple_dispatch_view_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=44Lo7Aj3C5QTkXrrhQFYiy0WsnHdHeHAa-saQqbFU9o,1080 +torch/include/ATen/ops/_test_autograd_multiple_dispatch_view_copy_native.h,sha256=2UH3GOMfrNRo-ITvG_1_NA3nrebhI6clR1AHL2shGBM,880 +torch/include/ATen/ops/_test_autograd_multiple_dispatch_view_copy_ops.h,sha256=wfc2QKwk1HSg-gpLUfOSUAJcsMkpkbhugH8OCJcGFfM,2017 +torch/include/ATen/ops/_test_autograd_multiple_dispatch_view_native.h,sha256=zv9UT9OBO1RQyrthAffhkskiGIeXEtKGyoL4eQMfbS4,761 +torch/include/ATen/ops/_test_autograd_multiple_dispatch_view_ops.h,sha256=T2mbQs-DO5fEn904Ds_5y4Gqu-nhreSAJ9rG6tXyh_g,1310 +torch/include/ATen/ops/_test_check_tensor.h,sha256=RkhX2TkiDgaLZ23G8D5UtXnsmA7I-M6xn6H4_c0WEpU,939 +torch/include/ATen/ops/_test_check_tensor_compositeimplicitautograd_dispatch.h,sha256=yetb_9AbjPBYcafcVg7_KLX_-Oe4OK6RsQktBD_vYKI,1030 +torch/include/ATen/ops/_test_check_tensor_native.h,sha256=Yr56mwGyLjxYV-FYiLhe92eT--XPV4bRw-ymI-SIIdk,742 +torch/include/ATen/ops/_test_check_tensor_ops.h,sha256=zzSMYPS5AMfj57zE9RYHwAb31uGsb6M7VsXWNNk3nhw,1247 +torch/include/ATen/ops/_test_functorch_fallback.h,sha256=hZlXO84x0tHo1VDpvbnrwGzOJdjlxdkSk1yB2adNKo8,1602 +torch/include/ATen/ops/_test_functorch_fallback_compositeexplicitautograd_dispatch.h,sha256=35xKz2Q8FEMcI2OsqYXl6hdotm65t7y8jrjxfM4DXMQ,1209 +torch/include/ATen/ops/_test_functorch_fallback_cpu_dispatch.h,sha256=k5A4RAW4tCQsaDua4yjdqqkMFy3XdLz7G5DXaFF1bMk,1018 +torch/include/ATen/ops/_test_functorch_fallback_native.h,sha256=6JYXhXAJCjITbx1w1IcukfQ6vBVaMDusHr5otHGJ1HA,896 +torch/include/ATen/ops/_test_functorch_fallback_ops.h,sha256=Y_gPiQRrV787GGrwuWrNV8y5Z6-nu-HdNBvFwYx66O0,2081 +torch/include/ATen/ops/_test_optional_filled_intlist.h,sha256=lYrO4oOhnypBvMYCqJnWPdsZ_MfvjFdr7w_r1f5dAtw,1706 +torch/include/ATen/ops/_test_optional_filled_intlist_compositeexplicitautograd_dispatch.h,sha256=MUUnG2zgq8yUXrpEoTNQkso2xEZ-9B7b_5Q8CrTXt0Y,1237 +torch/include/ATen/ops/_test_optional_filled_intlist_cpu_dispatch.h,sha256=lcLe8-9tfyzFmtV_ZacLxjhQ2UXojJwXHN5zWYJbhH4,1032 +torch/include/ATen/ops/_test_optional_filled_intlist_native.h,sha256=VUQVnTJz7lR_WBl4RnYL7Fv9XcVd4KY8bhYDFRImlCY,917 +torch/include/ATen/ops/_test_optional_filled_intlist_ops.h,sha256=wXPxlWCQJcbVWrCYD6qXK12l5oYsl48ZnjscjclBSoE,2167 +torch/include/ATen/ops/_test_optional_floatlist.h,sha256=NXjBKt0Ih4z9s0wNF2V3kGgKHc1BixIeO1Byx7r_sEs,1701 +torch/include/ATen/ops/_test_optional_floatlist_compositeexplicitautograd_dispatch.h,sha256=Mk7xzLP7Zau1TS-9MadiV1KLCK2RO2XunxtXmsJtjxw,1255 +torch/include/ATen/ops/_test_optional_floatlist_cpu_dispatch.h,sha256=2p4O-2D29o6ZuHMiAuXmb2A93uSmJXR3MQHCbPoAwyY,1041 +torch/include/ATen/ops/_test_optional_floatlist_native.h,sha256=lU9leB1FcvJ1v-j10qhOj-2_OpHXO23DOrV3fxmvEY0,942 +torch/include/ATen/ops/_test_optional_floatlist_ops.h,sha256=CTwGUUkBgbbIJ3ovoE3-B-zBBzDkcWG0NJ4bVCR4AUw,2223 +torch/include/ATen/ops/_test_optional_intlist.h,sha256=gsoYLS-wG97IkuYqVsUt5fWPLFrzQtTXt6y1S_BLJig,1633 +torch/include/ATen/ops/_test_optional_intlist_compositeexplicitautograd_dispatch.h,sha256=c_I6ss6CQH0sL-I7ASwqDCvVSFjACOqD0fHh4eQ2kYA,1223 +torch/include/ATen/ops/_test_optional_intlist_cpu_dispatch.h,sha256=O1mM_o7BAe9mwbORP304rlJ2UJB_ssm4VBlJcz4NiuA,1025 +torch/include/ATen/ops/_test_optional_intlist_native.h,sha256=Csx-clXQ8K1etHdDBh2jDn9zTrAlWtQKqDa44cS5Xks,910 +torch/include/ATen/ops/_test_optional_intlist_ops.h,sha256=Zp7jqQikbc1qUyBHBib5TreRymYF8YYkDid_LiPJ9es,2123 +torch/include/ATen/ops/_test_parallel_materialize.h,sha256=8iVOsGVdf7hlUmfgJzVieIiCvonMVl2B6asSror2RLY,1083 +torch/include/ATen/ops/_test_parallel_materialize_compositeexplicitautograd_dispatch.h,sha256=gG0Lzh7Gtz32PWB771DD2VEe-8YgKc8tlm-GiWCiQZ8,1083 +torch/include/ATen/ops/_test_parallel_materialize_native.h,sha256=RlO4B6CrscoSEQhpCho5wtrpQpwMHzcVw8T7B7zeH_U,795 +torch/include/ATen/ops/_test_parallel_materialize_ops.h,sha256=Wwc16ZTWV4Ltk7Ps3PD7f0gjuwCorXFhexScEqkB2Yg,1405 +torch/include/ATen/ops/_test_serialization_subcmul.h,sha256=c94gI8FK_cSpWBUlJNAcPS3_SCm06L1ac3rD43Ja4MY,1073 +torch/include/ATen/ops/_test_serialization_subcmul_compositeimplicitautograd_dispatch.h,sha256=9F9Zx2vOVVizB6CWR37s1FBsriyxLc0xkham2u5N-_M,1093 +torch/include/ATen/ops/_test_serialization_subcmul_native.h,sha256=Fph5WdDjpuPj6Gr8ag6unMEXoNln49Xb9P02LYbA_y8,805 +torch/include/ATen/ops/_test_serialization_subcmul_ops.h,sha256=JcV9JJwbX32tMC-NdQcDEZno-0Wwww_qqxCAtF-uowo,1448 +torch/include/ATen/ops/_test_string_default.h,sha256=MkDq9X7C6LNIqbaAdigNAoYCpGNUrJC3VEozLxfjZEU,1042 +torch/include/ATen/ops/_test_string_default_compositeimplicitautograd_dispatch.h,sha256=95twlmJzcdPqZNp3dBO9zwCJNrX1A3Vany6gkB9LAI4,1089 +torch/include/ATen/ops/_test_string_default_native.h,sha256=YuUCUnOdzdV9Xg0BpzcI_TwuHE0PemIROwDwqltWonA,801 +torch/include/ATen/ops/_test_string_default_ops.h,sha256=xzUdQK1Q5WpI8N2RabosI5krcQOnu_c6Zsut3x13eTc,1412 +torch/include/ATen/ops/_test_warn_in_autograd.h,sha256=Gi-ntGUk4XePMOqdAfNVYU5czjLksh7dIt-4G0pyBwI,1441 +torch/include/ATen/ops/_test_warn_in_autograd_compositeexplicitautograd_dispatch.h,sha256=_Q3jsnVyp3c4sa7YFe8rPaJCis0AUfFuvMKey9In47o,1223 +torch/include/ATen/ops/_test_warn_in_autograd_native.h,sha256=fRS5fd_8Bze8ZmdQoU8IEJW5KaixpzBNDoU2qzfcJ34,840 +torch/include/ATen/ops/_test_warn_in_autograd_ops.h,sha256=BVaQph_lXY3xiDNy94G4Nkme-xVp5SG8NDyEE6v_fVA,1897 +torch/include/ATen/ops/_thnn_differentiable_gru_cell_backward.h,sha256=3rYNygXOxdIInxRTzgx8lxcbvglR5ps9fz43xyew62Y,1454 +torch/include/ATen/ops/_thnn_differentiable_gru_cell_backward_compositeimplicitautograd_dispatch.h,sha256=ayMB6RaUjgaYGXhbNROL_k75g78xr2IgH7JSBFFiMOU,1296 +torch/include/ATen/ops/_thnn_differentiable_gru_cell_backward_native.h,sha256=9bQRwlW-KZPiezKunCyHLaHWGOIYqZWf_VNm--Rlxc8,1008 +torch/include/ATen/ops/_thnn_differentiable_gru_cell_backward_ops.h,sha256=LkUlqgdeziGo26TdMXNhpVg9cbiMtn8LRGV5upwJ3jo,2121 +torch/include/ATen/ops/_thnn_differentiable_lstm_cell_backward.h,sha256=7ORzQuyn76mxppmfJ4z3yJJnb6wcRYq46XlHcTGcVBA,1585 +torch/include/ATen/ops/_thnn_differentiable_lstm_cell_backward_compositeimplicitautograd_dispatch.h,sha256=ZAhJe97_XioS_mr3Hr_GwSe_-QWA7ZJZOq5MuD2fyo4,1382 +torch/include/ATen/ops/_thnn_differentiable_lstm_cell_backward_native.h,sha256=eTaSLHJcoGl-GTkoog70UD51p_Svj9jfWFre0jnEvBs,1094 +torch/include/ATen/ops/_thnn_differentiable_lstm_cell_backward_ops.h,sha256=ulRHgb1PdTcg54seN0gP8t4DGMIjn0ysJKFxLBmDkgQ,2397 +torch/include/ATen/ops/_thnn_fused_gru_cell.h,sha256=TZD6mm3HwOcvsxUdScXu_Y0tLmodM1OMx4jKtRnIjIQ,2540 +torch/include/ATen/ops/_thnn_fused_gru_cell_backward.h,sha256=blgtOG-qOt3OOghh7pwb2RSlz_sMOI_eXh5RwoYYb7s,2501 +torch/include/ATen/ops/_thnn_fused_gru_cell_backward_compositeexplicitautograd_dispatch.h,sha256=CVLGfjVwdhBsSElbfsDe1IGXwJxJRTgT8K5Y8ImQpgI,1549 +torch/include/ATen/ops/_thnn_fused_gru_cell_backward_cuda_dispatch.h,sha256=m3ry3x_6zrZZcbN2QSjXo0skv_ZW-LRkHsC60ObZm14,1105 +torch/include/ATen/ops/_thnn_fused_gru_cell_backward_native.h,sha256=tUbVl5QyCKVvr9srb8mClH9AspZuFZW2NAOoxVvEq_E,1156 +torch/include/ATen/ops/_thnn_fused_gru_cell_backward_ops.h,sha256=VvluDNLP-aMG7nGBsV-Auf9tgwlnm_32aSvftzOjX7c,2990 +torch/include/ATen/ops/_thnn_fused_gru_cell_compositeexplicitautograd_dispatch.h,sha256=QaTe26tIyQkScWIvOQWpRW0gfPEwuZksM9m0A-ht2BE,1569 +torch/include/ATen/ops/_thnn_fused_gru_cell_cuda_dispatch.h,sha256=9PFDuacMncKGt5iniW7ji3MsJM68lcwatlRC7C-Tbj8,1181 +torch/include/ATen/ops/_thnn_fused_gru_cell_native.h,sha256=k_zNAKP-upd44yiioQz5Epf8z9_fLbqImJszy0dp0-w,1239 +torch/include/ATen/ops/_thnn_fused_gru_cell_ops.h,sha256=ZwXU1Hq2yTYjS1dm2txZ7YS8y1_LRw4m4e_ReuciEUo,3185 +torch/include/ATen/ops/_thnn_fused_lstm_cell.h,sha256=LxpRssFRX03DOkSdHv0SZOGI4nopHg5EYlKM97DhgRE,2703 +torch/include/ATen/ops/_thnn_fused_lstm_cell_backward.h,sha256=eRZxbhFrEx0Ct27bS0u-KIzIzeu2kwqvqwiwQQSxlw4,1352 +torch/include/ATen/ops/_thnn_fused_lstm_cell_backward_compositeimplicitautograd_dispatch.h,sha256=2Qm_7BsP8P17VYxji3AmEIamfK5m5N958eOyrQUm9mU,1256 +torch/include/ATen/ops/_thnn_fused_lstm_cell_backward_impl.h,sha256=YZJrnHzKvchwNtxFV9fi9m5V4pZkyKYXEyIRXnQoa2s,2750 +torch/include/ATen/ops/_thnn_fused_lstm_cell_backward_impl_compositeexplicitautograd_dispatch.h,sha256=xS_8bA-RVA0KGTO9Lpu1vjW1U_6lzvoo4GzIlHBl7kc,1649 +torch/include/ATen/ops/_thnn_fused_lstm_cell_backward_impl_cuda_dispatch.h,sha256=eWBlJPHyzh_5_onvqDhMiNj1Bz-c1dABLgIk-2QTxvg,1197 +torch/include/ATen/ops/_thnn_fused_lstm_cell_backward_impl_native.h,sha256=tBAOyw72oi8MjdYIRj3gqx87Iy6XvIgY4FGbzs9VrSw,1298 +torch/include/ATen/ops/_thnn_fused_lstm_cell_backward_impl_ops.h,sha256=lhESqcBvYOsV79aRx-L4OKfcpU48E733VEZ-jz5wQ1A,3404 +torch/include/ATen/ops/_thnn_fused_lstm_cell_backward_native.h,sha256=2S0LBDdGQbJtyEnmkfdMei9yoYZjZtP1eVUJePMTOPY,968 +torch/include/ATen/ops/_thnn_fused_lstm_cell_backward_ops.h,sha256=Oa1K65JHI53azCXF8H5-ftwtoeHDrVtMALEKshT25-U,1999 +torch/include/ATen/ops/_thnn_fused_lstm_cell_compositeexplicitautograd_dispatch.h,sha256=HLDN--t8Pycpt6BoojAvbwYsZvtaoJ3J-ulT_vLh6q0,1635 +torch/include/ATen/ops/_thnn_fused_lstm_cell_cuda_dispatch.h,sha256=Qm_T4EXAMKlq1wwn9B5DFutmMs-i4L0NzqlntnXPGCk,1193 +torch/include/ATen/ops/_thnn_fused_lstm_cell_native.h,sha256=quhv1CVF6ROjcYItTKfh13Iu6YPWthVR4Pylo4S4udw,1284 +torch/include/ATen/ops/_thnn_fused_lstm_cell_ops.h,sha256=W4mz7BrNZlFyxnFI4LdNr7OaB-jKjz1qtR8ahMD7t_I,3352 +torch/include/ATen/ops/_to_copy.h,sha256=tpoNP066ht4v1ErhbFf_qGK0lK5Ad1ipxZr0Q3QGVbw,2693 +torch/include/ATen/ops/_to_copy_compositeexplicitautograd_dispatch.h,sha256=0VzVL9Z4dtt2GLIhhkXobAL60ZpyKD-1-GN_qRV2oGA,1726 +torch/include/ATen/ops/_to_copy_native.h,sha256=x4RJ5pROivBwy4eRFl0c5RQ3PGBuV1RVteadk3oUmas,1435 +torch/include/ATen/ops/_to_copy_ops.h,sha256=G907Zm67PpZzv82bOD9-MLdE-tw-yGjHx2Fa0OB6SKY,2781 +torch/include/ATen/ops/_to_cpu.h,sha256=0Swg1FZ0RY7Kf6ayBwx_cQqjsQJAAGvFR6YY4thXuGE,919 +torch/include/ATen/ops/_to_cpu_compositeimplicitautograd_dispatch.h,sha256=_bCRoXU70kTb2yrOdMj_5WQrq1K_WHf8LztBbzsCtfA,1033 +torch/include/ATen/ops/_to_cpu_native.h,sha256=h1lwJcSbsMEP0MtTWF5AGf2WJUTdjW8JO2V8wu5FUDg,745 +torch/include/ATen/ops/_to_cpu_ops.h,sha256=ozgmX-jT6ggk0lujxiAEe-AzVUg1f4VMgS8y7_Sku7g,1260 +torch/include/ATen/ops/_to_dense.h,sha256=uaEPGLX0IyPdRx7aYFq83qKGWaj64MvdZsr_jpRdnsc,1481 +torch/include/ATen/ops/_to_dense_compositeexplicitautograd_dispatch.h,sha256=_JJBbaQa-a5ercbt_y9DMLvQM-K8FkH6W_4jFluHeHg,1305 +torch/include/ATen/ops/_to_dense_native.h,sha256=srizXVjFy42LtfMK8m2vqOyXZYtOu-rlNAhghTHG5QA,1343 +torch/include/ATen/ops/_to_dense_ops.h,sha256=khbFC-w5ssmlPkXCvsmD6tSZNJenPHTsSgu1UPes5TQ,2323 +torch/include/ATen/ops/_to_sparse.h,sha256=1IAf1F-luOLE5uSH7YaUy1jPIOyd9OSfBEcYj6TNOyU,2179 +torch/include/ATen/ops/_to_sparse_bsc.h,sha256=J6FTBASFvRx4mdOtYH0FF3vuJ80NsAtd-ZkLrCEIARk,1465 +torch/include/ATen/ops/_to_sparse_bsc_compositeexplicitautograd_dispatch.h,sha256=AQNyoGIMeKiRZGkQzmQ7LVPXUFk6X0-3GAb47jcLhao,1278 +torch/include/ATen/ops/_to_sparse_bsc_cpu_dispatch.h,sha256=nROADU_Frn7O_8u1Iu48fmotZeYZVNLm-WXVbY8jYyc,1060 +torch/include/ATen/ops/_to_sparse_bsc_cuda_dispatch.h,sha256=Qn2ZNHW8anH9YgGgWNawz-B7hQrERv5hh6gs8HZVj-8,1062 +torch/include/ATen/ops/_to_sparse_bsc_native.h,sha256=TY4fGH2XwXC0UjBffwntD27_mApnvaYsVihn6XTKKBw,1270 +torch/include/ATen/ops/_to_sparse_bsc_ops.h,sha256=cG5kZny2-Kh9PZWM8zaFIDRODha722Dgy3dR0yM3Ydo,2265 +torch/include/ATen/ops/_to_sparse_bsr.h,sha256=8iYLbWbqd12yNYgr9u-jVO-WXm_6X0yLAwDHNdm8qBo,1465 +torch/include/ATen/ops/_to_sparse_bsr_compositeexplicitautograd_dispatch.h,sha256=90sqsU_SxEzydbt5QaC_V-8hQSSR0KPa-IdyLvVhKjg,1278 +torch/include/ATen/ops/_to_sparse_bsr_cpu_dispatch.h,sha256=6dzkt81WGdIFGyyqj64S7fj4-IcpDk0uoxgkztMdOVw,1060 +torch/include/ATen/ops/_to_sparse_bsr_cuda_dispatch.h,sha256=aKKHNV294ySAQY9Bna5d6udKdAkjnmq9B9I9dy6es2A,1062 +torch/include/ATen/ops/_to_sparse_bsr_native.h,sha256=hQy8QH0uZJqVFr6VJCaKAIeAvLPR2n9P7_yUBQ3FoBs,1270 +torch/include/ATen/ops/_to_sparse_bsr_ops.h,sha256=WuONWRG747jmI6BMOY6-ufe9l04m5L17RaELH1n1tzY,2265 +torch/include/ATen/ops/_to_sparse_compositeexplicitautograd_dispatch.h,sha256=sfJ_wKTZAgsF_lVjYiooHFJUdvHG3q0nlBJGjB_n-wQ,1593 +torch/include/ATen/ops/_to_sparse_cpu_dispatch.h,sha256=cLcYe7nMrOqL_mTXloboizJ9RNs6levVCwhgd5IUWpg,1208 +torch/include/ATen/ops/_to_sparse_csc.h,sha256=Cuopo1zMED5QszPJ-9OZ9uxmVU4EvvNLVpkDKOdk3xU,1353 +torch/include/ATen/ops/_to_sparse_csc_compositeexplicitautograd_dispatch.h,sha256=5dU_F4SqaULfV7jl_AdgMdv1rOTEl6gPkwdsF9BwZdc,1224 +torch/include/ATen/ops/_to_sparse_csc_cpu_dispatch.h,sha256=2PzIQy0Q9EH7dYJe6keoapENxX2D1mEMQi3KWv4fDXM,1033 +torch/include/ATen/ops/_to_sparse_csc_cuda_dispatch.h,sha256=e2uVuonpP3_8CRxlDRijgd1xX3KofGSBBJbUaZpcOXA,1035 +torch/include/ATen/ops/_to_sparse_csc_native.h,sha256=T_2e5QnDuSD2ZOtWQkLo7AjMsjGsplZlfb2j89H7SuI,1162 +torch/include/ATen/ops/_to_sparse_csc_ops.h,sha256=1X4xl2FBIwbOrhk15871vJlqa09_llcfnyOyDdG1eYQ,2087 +torch/include/ATen/ops/_to_sparse_csr.h,sha256=BihHWEBdsjLwa6jCfArqraQF6d0Slu9IqAufcpU9O84,1353 +torch/include/ATen/ops/_to_sparse_csr_compositeexplicitautograd_dispatch.h,sha256=f3QFjUvMYGxxEpc2Z37rA-NsCwJbws2TlhfZ_UMRCdk,1224 +torch/include/ATen/ops/_to_sparse_csr_cpu_dispatch.h,sha256=8QZRGZwGCHjgcvukd2Zi2GlVWDSeMhEde1URTj_lo1I,1033 +torch/include/ATen/ops/_to_sparse_csr_cuda_dispatch.h,sha256=1i8E88LM7yiwPBAi4bxRE-hRm1fyv7XqAeyk-kOwKI0,1035 +torch/include/ATen/ops/_to_sparse_csr_native.h,sha256=od03sYzRJRdZF22Vh9R9s6HTSLdtA_hSeQ-LLR55dbA,1162 +torch/include/ATen/ops/_to_sparse_csr_ops.h,sha256=qHO0iyPyco3ICqifeOe6hakLF_Ek3MqjYN7zTgCiFhg,2087 +torch/include/ATen/ops/_to_sparse_cuda_dispatch.h,sha256=cxiAoklxa_3LEnihP4IG2-1LG2EB35Pq9sKau072sXo,1210 +torch/include/ATen/ops/_to_sparse_native.h,sha256=9nTzl9JW3h_nhq56dwM3ETMIcDsQLRyWeVWHw-2_Ais,1906 +torch/include/ATen/ops/_to_sparse_ops.h,sha256=zRMEiSFRTxDJgF1Fhn9hqBhUv1rCE4tCapCrTQdJfVw,3857 +torch/include/ATen/ops/_to_sparse_semi_structured.h,sha256=wgJmbxJ4oQKHSmT7pvY1j4QUebK8SAKXOHW1nPnqFmo,1009 +torch/include/ATen/ops/_to_sparse_semi_structured_cuda_dispatch.h,sha256=EZrmc-Tq5Oec1TnAyXkxhY2FNqrzLbU9tBsc7e9GImE,1022 +torch/include/ATen/ops/_to_sparse_semi_structured_native.h,sha256=oZItHPByU6fk34Z9nwdiAVSjrb5gYG_KRGK7beK7kMI,776 +torch/include/ATen/ops/_to_sparse_semi_structured_ops.h,sha256=Uxoqo5uvFQqCPts6cMS69VOv-WTIS5wGIb0aAr_uwR4,1359 +torch/include/ATen/ops/_transform_bias_rescale_qkv.h,sha256=6gku0rcEDkC1811k_xCUS3DzOwastelNpTNw5HezcZk,2145 +torch/include/ATen/ops/_transform_bias_rescale_qkv_compositeexplicitautograd_dispatch.h,sha256=hLKILXQ4udHttEAMQgGC3RUqpkuDVbLz14RjqOBa6o0,1415 +torch/include/ATen/ops/_transform_bias_rescale_qkv_cpu_dispatch.h,sha256=ud1g1jadambd9o168X2eksnRRLz8TKYSKjukRrg93cw,1078 +torch/include/ATen/ops/_transform_bias_rescale_qkv_cuda_dispatch.h,sha256=4dCJGHvqgqZi023TzGXtCe8rqmu8pQWyb3ydPbMMj_k,1080 +torch/include/ATen/ops/_transform_bias_rescale_qkv_native.h,sha256=IpsnK4ozG2dIG3cDnOUFKbx7c8biTRAUP29srJ7LiRw,1224 +torch/include/ATen/ops/_transform_bias_rescale_qkv_ops.h,sha256=OYTQsL9dq4ZJVzjDlB7LWHam5oFOR5gqDEIhCklvZtU,2648 +torch/include/ATen/ops/_transformer_encoder_layer_fwd.h,sha256=4kflBQOqZjWzW7qkn7tBHdzEDOubiCmu7DKS37oWXhg,4887 +torch/include/ATen/ops/_transformer_encoder_layer_fwd_compositeexplicitautograd_dispatch.h,sha256=Jp3KMyhoPvItq_BKT7XJ7uzSGIFXXn0YKc89L1kXFyA,2269 +torch/include/ATen/ops/_transformer_encoder_layer_fwd_cpu_dispatch.h,sha256=SK2XOuopetC6pxsn44jftP8esI1uKOPvyfvo7L6ZJfY,1557 +torch/include/ATen/ops/_transformer_encoder_layer_fwd_cuda_dispatch.h,sha256=hKTWBHC2a1SQRPs6abcc1Nj08VQC5yr5GQf2lpK8xRc,1559 +torch/include/ATen/ops/_transformer_encoder_layer_fwd_native.h,sha256=s-q8chcwY-4Dbvr5HDvW-YbXOz5efV01awE3YCi1sdU,1959 +torch/include/ATen/ops/_transformer_encoder_layer_fwd_ops.h,sha256=id1Zw8x670qVh-l-xhdm__VaHiSt6fmpfQBudSLEo64,5491 +torch/include/ATen/ops/_trilinear.h,sha256=srDh0Ggs6TYyhcqmWUirhlIALcokJia28GXtV0CDbdM,2264 +torch/include/ATen/ops/_trilinear_compositeexplicitautograd_dispatch.h,sha256=-fWp8km2cB31JautRCWfBk4ziUZzk33Jyyn9x4wq5a8,1457 +torch/include/ATen/ops/_trilinear_compositeexplicitautogradnonfunctional_dispatch.h,sha256=-eVbZWsDJBrLonyTNiuTLPJyd-cYG2BQ2kh81VbK1RE,1213 +torch/include/ATen/ops/_trilinear_native.h,sha256=hExdKVtIQFbxyhh8WgrWe6knk10FaTPavRW3uJ68Dcs,1144 +torch/include/ATen/ops/_trilinear_ops.h,sha256=wkuix8odQE0_HHk53OGXfa_Orpzc1tFXv3OLLRH1jgQ,2905 +torch/include/ATen/ops/_triton_multi_head_attention.h,sha256=kXIu7XGcUz9MpoW82eZ3IX1Y_RP2o4gXqGu0XehFeJM,2968 +torch/include/ATen/ops/_triton_multi_head_attention_compositeexplicitautograd_dispatch.h,sha256=5WCY6MZVIEno9HAF_UPvHpXCvUb9x3q9oA53LuEYak4,1672 +torch/include/ATen/ops/_triton_multi_head_attention_cuda_dispatch.h,sha256=abR5-NvbQ0DYHmyFShW-O9ur1-g4m7fo3TrF09TNJs8,1253 +torch/include/ATen/ops/_triton_multi_head_attention_native.h,sha256=6bJpLjY1CJ92P22NMwFvWOoRBoT6iDtj-QToKX2steY,1358 +torch/include/ATen/ops/_triton_multi_head_attention_ops.h,sha256=LH_nwn_cYh-nwvRM4l6xS8l_zgS01vwwpGtbaq_x3cU,3589 +torch/include/ATen/ops/_triton_scaled_dot_attention.h,sha256=fWD5zErvCpc4k1wijK8hSwEALPOYZk94jlUJlbFkHoc,1842 +torch/include/ATen/ops/_triton_scaled_dot_attention_compositeexplicitautograd_dispatch.h,sha256=cA-65pJuUIAV5i9ugLzDyYp4dryi2ByMlY4cRQ7VGXg,1287 +torch/include/ATen/ops/_triton_scaled_dot_attention_cuda_dispatch.h,sha256=VIVFOLyBgTKQ_1S1edrFncvLSExGTa9-9QK4jkKelUY,1061 +torch/include/ATen/ops/_triton_scaled_dot_attention_native.h,sha256=CtseK7CfJ3vGzP8rodW6CKcW_1YKrFMGwwNtJKnVoAk,973 +torch/include/ATen/ops/_triton_scaled_dot_attention_ops.h,sha256=LENUJ9C2kXqyQPysqeaAP7LqT_O7fDbCBr4v_R9Sftk,2341 +torch/include/ATen/ops/_unique.h,sha256=rsqLx0mhRbgCX2eYi5x2u4ogvYKmnK0_h0nnFHX0PhA,1829 +torch/include/ATen/ops/_unique2.h,sha256=QwDxpD1oOcskM_fTg3tbuGlkkrZIPvLgo-6UP6XowI0,2187 +torch/include/ATen/ops/_unique2_compositeexplicitautograd_dispatch.h,sha256=ySHQRbtkGisvdRleUXa3F_MI9hX7MhCJgbHuXXJgI_0,1408 +torch/include/ATen/ops/_unique2_cpu_dispatch.h,sha256=hZ-roODay6Lq9rAsKZTs11H4ai7X7OGctTcx06k_r_Q,1083 +torch/include/ATen/ops/_unique2_cuda_dispatch.h,sha256=YivjIGnQa8Nj2Ld1nNYfAVr00yrJCjfPV4yVhxLzmIY,1085 +torch/include/ATen/ops/_unique2_native.h,sha256=WYltVX55P4VrjpPBBXRv9bqnW-AYANdlVM5KxybtjN8,1224 +torch/include/ATen/ops/_unique2_ops.h,sha256=Sb4UohpniqR5WQoyUYSCj3FtMJtmzD7h-FjIipYTDtA,2620 +torch/include/ATen/ops/_unique_compositeexplicitautograd_dispatch.h,sha256=vxE9L9FkrbDtegjsLEdF7CDfNyTNa_8ZBWxggW90US0,1296 +torch/include/ATen/ops/_unique_cpu_dispatch.h,sha256=8YaUqvCqyUP5xGnlUe6Wmao1DIbiXq5SV4LmQBd7y00,1045 +torch/include/ATen/ops/_unique_cuda_dispatch.h,sha256=FP1taNR0AfrBLjgkl-j8NoKGmO4QPlDKpyi21QT9wm8,1047 +torch/include/ATen/ops/_unique_native.h,sha256=79Q54mE5ALgnBI_P6cyfW9hYrLWRKgRk8TDNWeS-1NE,1095 +torch/include/ATen/ops/_unique_ops.h,sha256=GX19M2iokyDKfBigxLPy3mHIwrF4X7sUtH_AOhqQ4uE,2309 +torch/include/ATen/ops/_unpack_dual.h,sha256=brWF2l6JfeVlIMeiYBdEMpu4Dj2f9oMm1zLrklsGVDw,1004 +torch/include/ATen/ops/_unpack_dual_compositeimplicitautograd_dispatch.h,sha256=4kc9r9ThBnwM-H1-_mVIB326iYiQxV6g_4YzjhVQsF4,1064 +torch/include/ATen/ops/_unpack_dual_native.h,sha256=ed7Z3N_dwDUgyufmf69qtur7Ow-_mBUUqBMUqFO9aFc,776 +torch/include/ATen/ops/_unpack_dual_ops.h,sha256=5LTmk3aKWbUGeRPImUbQ6_ZxIfePGU3kZ14kmesYPSY,1385 +torch/include/ATen/ops/_unsafe_index.h,sha256=hmqradtOd00tUFx_L8MQzr4eZLLGTCeblnAECPeiX6U,1017 +torch/include/ATen/ops/_unsafe_index_compositeexplicitautograd_dispatch.h,sha256=8pacFQIDwJ02Td3ocszbl3Zy4D01GjTpEM_gMkZ6SLM,1081 +torch/include/ATen/ops/_unsafe_index_native.h,sha256=Z5b21NnM8Yg6C-QULzb2tE-dEKuBMHZ11BMwF0tCmt4,793 +torch/include/ATen/ops/_unsafe_index_ops.h,sha256=_TBdjzHJw73BVk474H2JhvohhhkpZLxWl65Qtc77Vuc,1431 +torch/include/ATen/ops/_unsafe_index_put.h,sha256=TRH3v7-MlIboiSh-WvlrttMdbFR6TVyZtgwl4kfFGio,1127 +torch/include/ATen/ops/_unsafe_index_put_compositeexplicitautograd_dispatch.h,sha256=PTSv-olEDp985V0lzpffHLUSkCVmBWro9uS8D7IJg8U,1135 +torch/include/ATen/ops/_unsafe_index_put_native.h,sha256=2fECDmIRQAO--I-8QzIqjNy-yvea7vgE_HEDVFpqZOk,847 +torch/include/ATen/ops/_unsafe_index_put_ops.h,sha256=6S5CIlpNtu4DcRIgnw0hNJVZbJ2E3-Tfvke42bMokXY,1575 +torch/include/ATen/ops/_unsafe_masked_index.h,sha256=N8gUW1UuTzmxWboI8wZYHlkbeIACGO-7i-W5aZhH76w,1119 +torch/include/ATen/ops/_unsafe_masked_index_compositeexplicitautograd_dispatch.h,sha256=jMuot6odiiXSaeB20ZHxQeS34Odw3XQZ0VV9lsZ7nlU,1138 +torch/include/ATen/ops/_unsafe_masked_index_native.h,sha256=iWj1FFAc62GwnTFgUdUc-dUndV6UhB3vocdAoSpEEBA,850 +torch/include/ATen/ops/_unsafe_masked_index_ops.h,sha256=zZhROJWH0z5m9fi8DdPrjOj1qB1ZhMFGifP2BDVo7J8,1598 +torch/include/ATen/ops/_unsafe_masked_index_put_accumulate.h,sha256=6-c5FqqWIJarYlkKSdjhoBgxGWDjRVQYOLyh1LidYBU,1185 +torch/include/ATen/ops/_unsafe_masked_index_put_accumulate_compositeexplicitautograd_dispatch.h,sha256=tixFFt6nN3TLQQ-ACd8ac7hseUSCbuBK27X5kZ1WjZ0,1155 +torch/include/ATen/ops/_unsafe_masked_index_put_accumulate_native.h,sha256=4zwlnCAYJ8H97YQoi1FfPr9mbGzdMdkYqp49DIBLKJ4,867 +torch/include/ATen/ops/_unsafe_masked_index_put_accumulate_ops.h,sha256=MjWX6KKvWZGUCIF6k9iznV36TvqOp3n-bfGR6I6--24,1649 +torch/include/ATen/ops/_unsafe_view.h,sha256=iWocRbucWFBOCvCcDyVRFzdpt780gnL0ZE8OMLVToUM,3931 +torch/include/ATen/ops/_unsafe_view_compositeexplicitautograd_dispatch.h,sha256=lvA9HWSfa-DVbSxecuti6sloK6r-_tY8ZUk6LxLr67Y,1587 +torch/include/ATen/ops/_unsafe_view_native.h,sha256=krtBJoLo-CkfQxBi_z_0XcEPtcgPXZ4zUD6xOwGRNnk,875 +torch/include/ATen/ops/_unsafe_view_ops.h,sha256=YIoUMtZGrQVXEgtjbmwUjgl032oEsPCogr3-zyBaSt4,2013 +torch/include/ATen/ops/_upsample_bicubic2d_aa.h,sha256=a505MLcsXUXioGqzgMy7l3APw7YNO_3sHPSo5YKuoxc,8356 +torch/include/ATen/ops/_upsample_bicubic2d_aa_backward.h,sha256=i4pmLCRcgFdIs9ye1EvL_M4yBuOSk4Wyjy9NtzLBV2s,8062 +torch/include/ATen/ops/_upsample_bicubic2d_aa_backward_compositeexplicitautogradnonfunctional_dispatch.h,sha256=W_9xAAMDhMnpUwjqGAX9kTGebwert8vbZEE9sVCAMfE,1527 +torch/include/ATen/ops/_upsample_bicubic2d_aa_backward_cpu_dispatch.h,sha256=TtDQHCGRM__yxkFoNJh1jBq3JaCQYPi_xNWWbLV5fxk,2597 +torch/include/ATen/ops/_upsample_bicubic2d_aa_backward_cuda_dispatch.h,sha256=UCFFR7P6iSvpMhugfqZJi_NRIqcRPFjPnekrKvP2WDo,2599 +torch/include/ATen/ops/_upsample_bicubic2d_aa_backward_meta.h,sha256=LwU2FU6gP1lN86wNuhWadqMpmT7z3uWVEZHU_3HWeKs,1010 +torch/include/ATen/ops/_upsample_bicubic2d_aa_backward_meta_dispatch.h,sha256=pqUCYptw_A2NGFTe9Vgl0G2XtNqnb5WmkllW1reN7TU,2599 +torch/include/ATen/ops/_upsample_bicubic2d_aa_backward_native.h,sha256=nJg7zl7NRrZfZrMt1hzK1kAX75DRGc3QI-Ojm6FCmyc,1467 +torch/include/ATen/ops/_upsample_bicubic2d_aa_backward_ops.h,sha256=LY0YbBxzz_WUzrRGVEzaruV1RZBmxApBz2uVp83z6pY,3061 +torch/include/ATen/ops/_upsample_bicubic2d_aa_compositeexplicitautogradnonfunctional_dispatch.h,sha256=3S6UhJjgiPhYABBzXEl62OQ3HHeba_mEEsSX2uOcrZM,1435 +torch/include/ATen/ops/_upsample_bicubic2d_aa_compositeimplicitautograd_dispatch.h,sha256=Xup1yTCrYPBYmJxMAeE91mtVJt4e1SeABmrAdrKJ0Z0,1336 +torch/include/ATen/ops/_upsample_bicubic2d_aa_cpu_dispatch.h,sha256=jylbU4Hm4HjVVRwMlZH_qELnUgbrjns52k6l6tmvrgY,2293 +torch/include/ATen/ops/_upsample_bicubic2d_aa_cuda_dispatch.h,sha256=2YO3KWkm4JQ2V0B84HW_7PNAIsP2wWp-XMxZsn4sTOc,2295 +torch/include/ATen/ops/_upsample_bicubic2d_aa_meta.h,sha256=dzJ5dBmumhp4WsR_ofKMaWU3-KGRdB1SoJQvTtfAONY,960 +torch/include/ATen/ops/_upsample_bicubic2d_aa_meta_dispatch.h,sha256=v56I6MFZ0Q_ndz7_kGi-xHEdxKxbdwGY0Mwa6sdd_OQ,2295 +torch/include/ATen/ops/_upsample_bicubic2d_aa_native.h,sha256=cwYKmsxsYHhN_tA5zwi8oyUZLzTajfmWOfke0lABlS4,1507 +torch/include/ATen/ops/_upsample_bicubic2d_aa_ops.h,sha256=yMbSWB2p_4jdtxnSvdnCiP01z5nxhkwJm232VzW8Lag,3637 +torch/include/ATen/ops/_upsample_bilinear2d_aa.h,sha256=YvzGar8UtH6sIUpcloHX_lQb4HsVE2_zFBm_Ko_xbCo,8397 +torch/include/ATen/ops/_upsample_bilinear2d_aa_backward.h,sha256=cZWyZZfbkDSn5PWQ7FbaHWBJ_PJKZIFX7MohHAI844s,8093 +torch/include/ATen/ops/_upsample_bilinear2d_aa_backward_compositeexplicitautogradnonfunctional_dispatch.h,sha256=rIXZ4EhlE-XK2JHk6OG2z_sLKk71_iKan_I07THrftQ,1529 +torch/include/ATen/ops/_upsample_bilinear2d_aa_backward_cpu_dispatch.h,sha256=Kl2BoO9w2E8WCYbT3UeIZtQDwSK3pOeMI8IuyN0MOCA,2603 +torch/include/ATen/ops/_upsample_bilinear2d_aa_backward_cuda_dispatch.h,sha256=VKS6OSPTdcwuWJy6VkiPFUj38RKUCGfXZ6YScMaoC7M,2605 +torch/include/ATen/ops/_upsample_bilinear2d_aa_backward_meta.h,sha256=Fnw_6m4lpSvYZvGJgvwCCD4IDcR_SDW8uM63n83pjbA,1011 +torch/include/ATen/ops/_upsample_bilinear2d_aa_backward_meta_dispatch.h,sha256=rhk4ZnZncfcz6FSKlbtXAW9CQX0bepl5Cu15xPVnnzc,2605 +torch/include/ATen/ops/_upsample_bilinear2d_aa_backward_native.h,sha256=MXh0vjrR6uzhoA33v4awCddfT-j7N_U3MCJ1iYjGLBY,1472 +torch/include/ATen/ops/_upsample_bilinear2d_aa_backward_ops.h,sha256=qyb7xOIH1D6H_rR_BIbxKPuFyYSkW049vH4JfAfO--A,3067 +torch/include/ATen/ops/_upsample_bilinear2d_aa_compositeexplicitautogradnonfunctional_dispatch.h,sha256=K0Z7mqEwvw-q9bhOIR_pzbtIRy-QNwHhxIPRZElWlvs,1437 +torch/include/ATen/ops/_upsample_bilinear2d_aa_compositeimplicitautograd_dispatch.h,sha256=bKKUnvrWzy8IkleB5q0HzrRLgLaND0Du0ganG-Ew4Qg,1338 +torch/include/ATen/ops/_upsample_bilinear2d_aa_cpu_dispatch.h,sha256=q5nBGrSbHYNHErUc1LpPvC24LVUXpB_yDDh1WWWgjls,2299 +torch/include/ATen/ops/_upsample_bilinear2d_aa_cuda_dispatch.h,sha256=6AkwSQliMB4kXSdDgyevsVU2wENF-M7n37y5vn1W45c,2301 +torch/include/ATen/ops/_upsample_bilinear2d_aa_meta.h,sha256=qWLGU_eX5jO6ohH75JVgF2vLiZ1YoBz3AGuGnTUHI-E,961 +torch/include/ATen/ops/_upsample_bilinear2d_aa_meta_dispatch.h,sha256=bzfgxinFjQy3f8HFlGaFdWQvpNkJe5Jtis2a3folihQ,2301 +torch/include/ATen/ops/_upsample_bilinear2d_aa_native.h,sha256=n9Z_xgi8LzuWD4ssW1ImaOjWN0XTrjs7kXfdSEtC4ns,1513 +torch/include/ATen/ops/_upsample_bilinear2d_aa_ops.h,sha256=0Olc6R8uKhj1PQPfeGTr1mPaEqY73oddDf9r3q0OK2A,3646 +torch/include/ATen/ops/_upsample_nearest_exact1d.h,sha256=-VzqLi1f5OqNPNXBfRCuAf9XITS7vhPEfdeZ7aLd98E,6919 +torch/include/ATen/ops/_upsample_nearest_exact1d_backward.h,sha256=Zq8vPZFESYz-2YhSXApOYSfaHwdp6DpBGbWLxHMN-BQ,6775 +torch/include/ATen/ops/_upsample_nearest_exact1d_backward_compositeexplicitautogradnonfunctional_dispatch.h,sha256=JtPQnN0MBhW7jVGVRgfe5z-b1t6UBqf19FFPvGCWkMY,1391 +torch/include/ATen/ops/_upsample_nearest_exact1d_backward_cpu_dispatch.h,sha256=Buxozcm713Vzuo_DLXTmGXnG5OjutSNfQvN6k0-USLI,2219 +torch/include/ATen/ops/_upsample_nearest_exact1d_backward_cuda_dispatch.h,sha256=qR0U3H7WZp4fnRXpPimht7hB_f-OfVvCLLwf7QNXDnU,2221 +torch/include/ATen/ops/_upsample_nearest_exact1d_backward_meta.h,sha256=nHyhPyOPQrpHAT3AAMXyxPI3GCmStmCzyt0-9flq1y0,957 +torch/include/ATen/ops/_upsample_nearest_exact1d_backward_meta_dispatch.h,sha256=sARQXSfllsDLVuTw46DzReAbeAmlobxVZVX0X9LmY30,2221 +torch/include/ATen/ops/_upsample_nearest_exact1d_backward_native.h,sha256=KUxRIl74AANLQcB7b1pdLmsJYMF1apieVw5RMcWadfs,1370 +torch/include/ATen/ops/_upsample_nearest_exact1d_backward_ops.h,sha256=2SpIfpezDzwgkFl1R3B98PIrAxOv2NrIxlEj4Ph3Zmc,2705 +torch/include/ATen/ops/_upsample_nearest_exact1d_compositeexplicitautogradnonfunctional_dispatch.h,sha256=KtdVloCczJfolOClZkGjukZ5YuQkEqJ3LD3NPx757zQ,1299 +torch/include/ATen/ops/_upsample_nearest_exact1d_compositeimplicitautograd_dispatch.h,sha256=hPRQy2ofENs0SetSTeaZl42mhucTQj1KkSVN4MT8_Jo,1302 +torch/include/ATen/ops/_upsample_nearest_exact1d_cpu_dispatch.h,sha256=TtTBUGPwY7AV0cEe7uVJs9QHf0NTEDpbjo8nZ13HKvU,1915 +torch/include/ATen/ops/_upsample_nearest_exact1d_cuda_dispatch.h,sha256=qi43BUOSbTNMhxMbq8F_DrfvdtI8ZH4XLyWNI8k8A8U,1917 +torch/include/ATen/ops/_upsample_nearest_exact1d_meta.h,sha256=7HSjwa0I-NQB936fGElGvp-RIWmus3QHSZP3WoktRIE,907 +torch/include/ATen/ops/_upsample_nearest_exact1d_meta_dispatch.h,sha256=layj9A_7u3EDqLaMhJJ-1cP2VhppbzJc0ckjUSGG-18,1917 +torch/include/ATen/ops/_upsample_nearest_exact1d_native.h,sha256=lazql9Sdgxqv21aKEv-2IHrNEubItERKEIDuTfVzjcQ,1393 +torch/include/ATen/ops/_upsample_nearest_exact1d_ops.h,sha256=GKrlFdXOLwJkKJ9U9-wtV5ZCkkwJYy0pLhzy28IXB9Q,3224 +torch/include/ATen/ops/_upsample_nearest_exact2d.h,sha256=er7MXi7yI46xSpkIflPtVPGrKczXdwgn9oM_ImftD6E,7759 +torch/include/ATen/ops/_upsample_nearest_exact2d_backward.h,sha256=jxZdHt20lbOtnX28tVHGaSs1lGK8tEa5snhilG7tNIo,7615 +torch/include/ATen/ops/_upsample_nearest_exact2d_backward_compositeexplicitautogradnonfunctional_dispatch.h,sha256=wfxLzb2DI9s3lNrP29rUltdVjqliI4NRxBDJgj-a7Lc,1493 +torch/include/ATen/ops/_upsample_nearest_exact2d_backward_cpu_dispatch.h,sha256=JvQgfoNa1J9_bK7AWSOFWDYKf5l4Hx1Y0uuAN8pGlIM,2495 +torch/include/ATen/ops/_upsample_nearest_exact2d_backward_cuda_dispatch.h,sha256=VPvkSeiBjHlQk3437ZQnVPUX-kjAm9HDYAHVXyrleR4,2497 +torch/include/ATen/ops/_upsample_nearest_exact2d_backward_meta.h,sha256=zDN18dX0bcQ1-NV0zSCao4VWoDwd4PXWFktT-OO9390,993 +torch/include/ATen/ops/_upsample_nearest_exact2d_backward_meta_dispatch.h,sha256=STtiQQ6Zg8fbszcGtR9AnLtQsEri0qsDSwtBG7Uww_Y,2497 +torch/include/ATen/ops/_upsample_nearest_exact2d_backward_native.h,sha256=NAWvamyBca1bbaz6iQSZ2C_Ho5_hxaLI1d7xL8nwdGA,1442 +torch/include/ATen/ops/_upsample_nearest_exact2d_backward_ops.h,sha256=Fj1buERxJHULu7Ljz3qJ56rRHmTiEuNAS2ttF3YftJo,2947 +torch/include/ATen/ops/_upsample_nearest_exact2d_compositeexplicitautogradnonfunctional_dispatch.h,sha256=55uGnP6Vas5Z94bMqZocP4Wddx2nKALWJz8SeB7_Ffg,1401 +torch/include/ATen/ops/_upsample_nearest_exact2d_compositeimplicitautograd_dispatch.h,sha256=_8ZULi7SYU1W3OIgdwoDaZi_qMUegD3Tbmp2XzoB928,1302 +torch/include/ATen/ops/_upsample_nearest_exact2d_cpu_dispatch.h,sha256=NJMT6BPIlENl8qnpiACaEhRyfPy0M8tELzG0U0rlU7M,2191 +torch/include/ATen/ops/_upsample_nearest_exact2d_cuda_dispatch.h,sha256=RZ38hgBJK0z7wOYxBNarekhjhOtw8jejV-BHsNY-BRw,2193 +torch/include/ATen/ops/_upsample_nearest_exact2d_meta.h,sha256=wOy0A87SiFip_E-IU5svRcy1-jJRAiJSNOm0ClCnPX4,943 +torch/include/ATen/ops/_upsample_nearest_exact2d_meta_dispatch.h,sha256=a82hPBXPZkFGzC2AO_lg8pyX63aw7_NtgNYOha90ElY,2193 +torch/include/ATen/ops/_upsample_nearest_exact2d_native.h,sha256=ztbEqaJR1Un3378p5ZrAC6RdrqD80DnBX4mm489hnZw,1679 +torch/include/ATen/ops/_upsample_nearest_exact2d_ops.h,sha256=9_ETL_S3FxEx2z0f_j6YASRF11_S-8RVXrRovn3fr7g,3466 +torch/include/ATen/ops/_upsample_nearest_exact3d.h,sha256=m66uZfhFrU3Q68rrx9i0IruJxF8MTD6XLsGbTNVqaN0,8539 +torch/include/ATen/ops/_upsample_nearest_exact3d_backward.h,sha256=gGAEvwTsKbDJJbfZN1L0N_hRKjRyInUMOtd917ewm0w,8395 +torch/include/ATen/ops/_upsample_nearest_exact3d_backward_compositeexplicitautogradnonfunctional_dispatch.h,sha256=Dj45oW2SKqkOxcJifeL6KGdICQcfrKEVHyHlrmAvMp8,1591 +torch/include/ATen/ops/_upsample_nearest_exact3d_backward_cpu_dispatch.h,sha256=FeOrO-KUXod0-XZTDYL-FgLvIWcETT_fD6eB5oL0ygc,2759 +torch/include/ATen/ops/_upsample_nearest_exact3d_backward_cuda_dispatch.h,sha256=BxgfmFKa-sW4-NGVGyFWk6OzIkRrvo8pulnJlv_nBDk,2761 +torch/include/ATen/ops/_upsample_nearest_exact3d_backward_meta.h,sha256=tOsyGMLkR7kQ-txLR6A8uLGNv79_FXPTsmgD-uRC0iM,1027 +torch/include/ATen/ops/_upsample_nearest_exact3d_backward_meta_dispatch.h,sha256=WfTcn_mx8KFRPJHqlGvZRRse3Q7rL1-v7D_P36ePOgE,2761 +torch/include/ATen/ops/_upsample_nearest_exact3d_backward_native.h,sha256=7WPaxijaJ-pw_aeSoTvTtUeY1NF8p0edcCjAeOW_CFo,1510 +torch/include/ATen/ops/_upsample_nearest_exact3d_backward_ops.h,sha256=V7irNu74WJGlj0iSCwZXaiQJW6ts0UrAkAn-SBjjIM0,3177 +torch/include/ATen/ops/_upsample_nearest_exact3d_compositeexplicitautogradnonfunctional_dispatch.h,sha256=ukjik3qvwnmcUQuR8P7ppo3b_m9BQVENFbcQmsWE6lY,1499 +torch/include/ATen/ops/_upsample_nearest_exact3d_compositeimplicitautograd_dispatch.h,sha256=Wd79kYkAQsrl4jAvkPAq2itfTImnu2KllGfhCqXVwkU,1302 +torch/include/ATen/ops/_upsample_nearest_exact3d_cpu_dispatch.h,sha256=9d89SQwDQqPlRrDT9qN90GoN2T8o0_j6CSDYt_OxfFs,2455 +torch/include/ATen/ops/_upsample_nearest_exact3d_cuda_dispatch.h,sha256=Mnkl-UneGBFuU3AdDmq4AcP6mz12zKO7eTlPGtyLFoI,2457 +torch/include/ATen/ops/_upsample_nearest_exact3d_meta.h,sha256=qfVa4ROO2O5uOalXdUaT7JzJCQ2_DtykNhTH08761SQ,977 +torch/include/ATen/ops/_upsample_nearest_exact3d_meta_dispatch.h,sha256=H4x4ehY2jkrfO4jy__o7ykqrLVqLFaD0Az3dh9KGtHg,2457 +torch/include/ATen/ops/_upsample_nearest_exact3d_native.h,sha256=M34L2Ck0Hd_otuL9gGPwHUbmde57WSn2dYUWYH80R88,1796 +torch/include/ATen/ops/_upsample_nearest_exact3d_ops.h,sha256=ymyECr6drkzmluGFbjcpR0z5ncBwAkkJBr9rYq1UdWQ,3696 +torch/include/ATen/ops/_use_cudnn_ctc_loss.h,sha256=Q6dtRzf423FRHCbPF8Ys8oHqMOAqFA-sam0N-F3sfbA,1599 +torch/include/ATen/ops/_use_cudnn_ctc_loss_cuda_dispatch.h,sha256=DTkZf4JozwSePZGvbikJ4a8Mv3iv-aQMJW4A5h0DAAk,1272 +torch/include/ATen/ops/_use_cudnn_ctc_loss_native.h,sha256=a_UfLMuo9166t4hvHmvqkejgWnEmui2gK_ysLKpC5FQ,1033 +torch/include/ATen/ops/_use_cudnn_ctc_loss_ops.h,sha256=xAg02IGRYu-Y1u7keUOjEcNWi3gfhJMwvBY1LSqAZos,2509 +torch/include/ATen/ops/_use_cudnn_rnn_flatten_weight.h,sha256=KMjHrpDN8_LM_RniE2Gab1A-vBRa0Pp83X_KH_SKzrU,937 +torch/include/ATen/ops/_use_cudnn_rnn_flatten_weight_compositeimplicitautograd_dispatch.h,sha256=hlgWIOKVPFJ-wFRJ1gDJovQu8nIKlresHJ0jgHMxXhQ,1012 +torch/include/ATen/ops/_use_cudnn_rnn_flatten_weight_native.h,sha256=wxTQ21j3wTM5xQBgfydOXm8C0MLwH5uIALNtKH8W2E4,724 +torch/include/ATen/ops/_use_cudnn_rnn_flatten_weight_ops.h,sha256=xw7TKU8qsfBLCqOXIvNRwtZ-6twudxr48W1dTkO8X4s,1183 +torch/include/ATen/ops/_validate_compressed_sparse_indices.h,sha256=TwKTJlw2cRBvVIIroFatmHZDMfHUMUp9mSAbea6XjbM,1207 +torch/include/ATen/ops/_validate_compressed_sparse_indices_cpu_dispatch.h,sha256=p1WvNhq856wg39g-58tQwA8HHYbAblibVLYAbrLSZp0,1091 +torch/include/ATen/ops/_validate_compressed_sparse_indices_cuda_dispatch.h,sha256=BSNli22tTDuxG3itkZcpGXQsc41kBP1GvoDSyDyAdUg,1093 +torch/include/ATen/ops/_validate_compressed_sparse_indices_native.h,sha256=glqBe3VCHW3vTd2bUCH3MkkQ3sWnFG62F2tsWpZtZmk,1027 +torch/include/ATen/ops/_validate_compressed_sparse_indices_ops.h,sha256=Zf_fMspJD9BqD8LMV_AEuOwJ2-eAQoUR_jhSf2AxH_Q,1587 +torch/include/ATen/ops/_validate_sparse_bsc_tensor_args.h,sha256=ixNPc5dm8_i606gp5fbUIo5W29jBmXSaCwYVTPl6crw,1257 +torch/include/ATen/ops/_validate_sparse_bsc_tensor_args_compositeimplicitautograd_dispatch.h,sha256=lcsWlj5pzZdSoVh9dkh8MH_NIA986axGqPhLq-vpvWw,1179 +torch/include/ATen/ops/_validate_sparse_bsc_tensor_args_native.h,sha256=zWxbahDHV3c5zRGuM7FVHn5gSYmi2uxiwkd0hL0vt7Y,891 +torch/include/ATen/ops/_validate_sparse_bsc_tensor_args_ops.h,sha256=kgwjjPBD9jTiudWr0GONJbkV32YC2_SiiCBPsotmm0I,1680 +torch/include/ATen/ops/_validate_sparse_bsr_tensor_args.h,sha256=rXkSNbt5k2zbytjH_lRPx7TNspy-8IjedrY3ep-HVJM,1257 +torch/include/ATen/ops/_validate_sparse_bsr_tensor_args_compositeimplicitautograd_dispatch.h,sha256=xD8GBwPs5j4_Cs-rVtEjIeWdrehYRMSJlNNLe1nOGbc,1179 +torch/include/ATen/ops/_validate_sparse_bsr_tensor_args_native.h,sha256=_88gen0XPNtZEEWEJcNuUWyLVJLPa4Y1tNbz01p5njo,891 +torch/include/ATen/ops/_validate_sparse_bsr_tensor_args_ops.h,sha256=YVuveutg3GJ6mZZLQ6xMQwD95SIOPAAHMPcCc3I8FnY,1680 +torch/include/ATen/ops/_validate_sparse_compressed_tensor_args.h,sha256=7YGke7COaJqCpj8Qk8S8mK7ka1BaLxe5IQgNIb7HCN0,1351 +torch/include/ATen/ops/_validate_sparse_compressed_tensor_args_compositeimplicitautograd_dispatch.h,sha256=EVH8XCKguYPWBXgX_gaOp5ocDYRs57nAZwJL8bVAsS8,1213 +torch/include/ATen/ops/_validate_sparse_compressed_tensor_args_native.h,sha256=B4pvQ7iPzNOZsEH_N2sP0eygQtFbYcLOcGHrnPnnEaQ,925 +torch/include/ATen/ops/_validate_sparse_compressed_tensor_args_ops.h,sha256=fWlNj3YlEEBZXM3LVJ72Bi2_LAlgqeAO8Flp7tiM5mc,1790 +torch/include/ATen/ops/_validate_sparse_coo_tensor_args.h,sha256=WBRIzoKsgrWjaQTDW6NyTQrAnytE9d45A4jRHZ7iXQI,1267 +torch/include/ATen/ops/_validate_sparse_coo_tensor_args_compositeimplicitautograd_dispatch.h,sha256=3NEmCQCZ683DROT3XMRaI_8sRWgUDHFQEll02M6U7y0,1193 +torch/include/ATen/ops/_validate_sparse_coo_tensor_args_native.h,sha256=q_hWs9fNeUoMFyz4OaTWbjiA5iIOfXdaf4L6BJUwT64,905 +torch/include/ATen/ops/_validate_sparse_coo_tensor_args_ops.h,sha256=oA_FWScGvbW334yN9b83bWmXkRk1ZbtzFwBVNyxf9Bc,1681 +torch/include/ATen/ops/_validate_sparse_csc_tensor_args.h,sha256=WgPHJOtv2MP7vY1fvHRBLXkcvnDLNzw-wMIc1FPr5bs,1257 +torch/include/ATen/ops/_validate_sparse_csc_tensor_args_compositeimplicitautograd_dispatch.h,sha256=VBjHhDxZM4B6DYRiCRIoeMVLWGD1-Eh4pUp1v4jOsE4,1179 +torch/include/ATen/ops/_validate_sparse_csc_tensor_args_native.h,sha256=Srfpvfb_RG1a93X9VAwcHIXW3ooV16eIU1kkwrmjgFU,891 +torch/include/ATen/ops/_validate_sparse_csc_tensor_args_ops.h,sha256=3zxD2w3kY9usfrrNeNbEsRiIV8Ady8I9gkULhYZmzTM,1680 +torch/include/ATen/ops/_validate_sparse_csr_tensor_args.h,sha256=VnlhJ_bOBPeUMxkyT-mVmQSmVAkVJ97EJCmdg3vslTI,1257 +torch/include/ATen/ops/_validate_sparse_csr_tensor_args_compositeimplicitautograd_dispatch.h,sha256=6RoNg5U44a6AYbBq7QTfNC927ES9AII-SN5nwYv_TVk,1179 +torch/include/ATen/ops/_validate_sparse_csr_tensor_args_native.h,sha256=6kRnFWMOs3eJ0yJDIk5nlV_deUIKo9F-0lkQwjZWlyU,891 +torch/include/ATen/ops/_validate_sparse_csr_tensor_args_ops.h,sha256=-whUikyf2-mb0uyqAiEEkNSj1cmmVqGhjUpjzdCXDjQ,1680 +torch/include/ATen/ops/_values.h,sha256=Dg_QWAMq-LLw-BhgaT0IJp42KzKqfOD81eeqesFgXus,758 +torch/include/ATen/ops/_values_copy.h,sha256=wbSEhync8x7_GE35tOco5AgT9W9FCgdjIiPZyZNDBuw,1341 +torch/include/ATen/ops/_values_copy_compositeexplicitautograd_dispatch.h,sha256=XN9fghPHAE3SITptDJ7XTbo676rHuPAO7my_yvFjs2A,1133 +torch/include/ATen/ops/_values_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=_xVpqjkTVrMuk1MbbVj1mPbtO2B5If_1Ez6OFje2ZG0,1050 +torch/include/ATen/ops/_values_copy_native.h,sha256=_8AdpssN8ZEmmVoSg3yrVehBMp39YNT539UPryAXlOg,820 +torch/include/ATen/ops/_values_copy_ops.h,sha256=C4A9ULsTUU2kTyMCF42pIvHszsVU0_Wwt2QdV_JBSjA,1837 +torch/include/ATen/ops/_values_native.h,sha256=dKcw-lt74N_w3u5aLwIgacV_LBzklGQY-GZpHJCQmX4,738 +torch/include/ATen/ops/_values_ops.h,sha256=NMvnlMuOvESmPZgDq_csK17NdxQzvlaIns4BJr9NsY4,1220 +torch/include/ATen/ops/_version.h,sha256=LNcq-X-EzC_6_HcNV7LvEz0t8Egc7os0P1J6ZUkwsGA,759 +torch/include/ATen/ops/_version_compositeimplicitautograd_dispatch.h,sha256=3YwoJcapKyeRV4v4Z7QFIig-jjWT6OsPREw2Zi5pQCc,1017 +torch/include/ATen/ops/_version_native.h,sha256=AX6eWzsaxd6erMgw9UbE6SrzjuvUGXMmxYu8A8dbRzU,729 +torch/include/ATen/ops/_version_ops.h,sha256=tQVkbnf_X2Z3_CxZcTOEw1b-tk-avcZDSYt5FyCDfw4,1205 +torch/include/ATen/ops/_weight_int4pack_mm.h,sha256=d_A5j_NLmHnTjOdrms94oL8u0ZmL7jCu_YnsOjC-TA8,1109 +torch/include/ATen/ops/_weight_int4pack_mm_cuda_dispatch.h,sha256=rq1R-KrOuyzeYOgNK785Up7aocrOoD2XN3bJtzgki2c,1069 +torch/include/ATen/ops/_weight_int4pack_mm_for_cpu.h,sha256=mpPE3zMiTIFstbHvw5CSTf3LcEQrycU4CiyoDeDqhrM,1141 +torch/include/ATen/ops/_weight_int4pack_mm_for_cpu_cpu_dispatch.h,sha256=bPXPjUFsE-0wQjKNlVj7bCDbV6rCSqM2QhKo3H5BVvA,1075 +torch/include/ATen/ops/_weight_int4pack_mm_for_cpu_native.h,sha256=DspzQu0zLyAFgMSlI25j86NPkvHlbw6pnQkZ5u8FdiU,827 +torch/include/ATen/ops/_weight_int4pack_mm_for_cpu_ops.h,sha256=zk_5TdC4rAjBtS6w8pAJBcX8Py_6gppYg1dbVtHZjIc,1535 +torch/include/ATen/ops/_weight_int4pack_mm_native.h,sha256=zzeyLnTm-SVLwjo76XijeXR6p0Kos6tLtudEKLt2ZrA,828 +torch/include/ATen/ops/_weight_int4pack_mm_ops.h,sha256=9gMEf6DWByJoj2Ig2k8bYDgeXeX9MabhviaTykwwGHY,1511 +torch/include/ATen/ops/_weight_int4pack_mm_with_scales_and_zeros.h,sha256=J6Zbv4lrP2njY1W7JrVFAkw9Lc8ihp720tjgkUc7wC8,1223 +torch/include/ATen/ops/_weight_int4pack_mm_with_scales_and_zeros_native.h,sha256=0SAoE4aPf5nZIVqujS9jFASmof4GFAJst2Lcyq_eobA,676 +torch/include/ATen/ops/_weight_int4pack_mm_with_scales_and_zeros_ops.h,sha256=ZM2T5f15r7-ZOq090mOZBErf2FvBmym0qEv9w0h-Y_U,1642 +torch/include/ATen/ops/_weight_int8pack_mm.h,sha256=ANwF-STyZXSbLgt0vmXCBGkjb7aIUHtryjP7JK7Adjg,1037 +torch/include/ATen/ops/_weight_int8pack_mm_cpu_dispatch.h,sha256=faxXveYKBUFxP8qpcOPRaIneL_gWFgDa1z9rae5FAyk,1039 +torch/include/ATen/ops/_weight_int8pack_mm_cuda_dispatch.h,sha256=LeE0AoQYkbCt1JNp5Xf3FupaDETMQ7l8Ka_9LArA-BI,1041 +torch/include/ATen/ops/_weight_int8pack_mm_native.h,sha256=Mb0vQ-eedFjP67QVoXtXHhTm3ZFj0bSlqOfgNxNLuG8,923 +torch/include/ATen/ops/_weight_int8pack_mm_ops.h,sha256=txoGYIYKRfBf2DNsW2hdJqx6JqcMlzNjh35kat3hf2o,1422 +torch/include/ATen/ops/_weight_norm.h,sha256=53Igt22qD3j3vJeRsVrCpxiIZlFbperaR7czMYPssMs,972 +torch/include/ATen/ops/_weight_norm_compositeimplicitautograd_dispatch.h,sha256=EVdypz618yzvtYHohBCqJE2OlxVPuGSRyrJ-nsTrS6g,1058 +torch/include/ATen/ops/_weight_norm_differentiable_backward.h,sha256=a9yqCBnDttIWMYdaIBPWnwpywN3s6mUbWvGOT2NEryk,1250 +torch/include/ATen/ops/_weight_norm_differentiable_backward_compositeimplicitautograd_dispatch.h,sha256=BiIwoIpFNwoeHMOJPEzkLR1ri5MCg9eNI7jAq1jfzX4,1176 +torch/include/ATen/ops/_weight_norm_differentiable_backward_native.h,sha256=mueSgaJg2vLKmTHMv9FSZFIwH34pOh5YgyGxEQFmEQo,888 +torch/include/ATen/ops/_weight_norm_differentiable_backward_ops.h,sha256=qqGc2wqeuT1u3ftQBdze5Ko07UmJt9JKqULbYF9Hs5o,1724 +torch/include/ATen/ops/_weight_norm_interface.h,sha256=Q-7cHN7MqPwEtti8gWDpYBpHu9g-HiWqUyBmnhHtFhk,1817 +torch/include/ATen/ops/_weight_norm_interface_backward.h,sha256=3w5avTEfb0RWLOa2qstBuIMvi3X3P1zEb501hKaEJr8,2350 +torch/include/ATen/ops/_weight_norm_interface_backward_compositeexplicitautograd_dispatch.h,sha256=d5D5t0o1-dt4GhMzM-jx0gxnck6nbNJjWRpeSSs3Uzg,1471 +torch/include/ATen/ops/_weight_norm_interface_backward_cpu_dispatch.h,sha256=-l5pfXMZyBR-Yi-ipEv5cXkoeMclTRj-x3WGdy2KQuM,1127 +torch/include/ATen/ops/_weight_norm_interface_backward_cuda_dispatch.h,sha256=C3pxxD-DNIeMfMhLAYpG7J4xnSutPHkvM6ec-vUx924,1129 +torch/include/ATen/ops/_weight_norm_interface_backward_native.h,sha256=jaHptF8p7gC9RuuIfOYVoEro6iX-5iJnQYYP8YpWdWo,1330 +torch/include/ATen/ops/_weight_norm_interface_backward_ops.h,sha256=YXsymQ-zpFhpT9xk1hpM2xjumvYoe--TtT7PkmRKbok,2879 +torch/include/ATen/ops/_weight_norm_interface_compositeexplicitautograd_dispatch.h,sha256=x-gifq-hW3-GI-MZUJswEn19VEKcgzVaaK2rOLSUTzg,1313 +torch/include/ATen/ops/_weight_norm_interface_cpu_dispatch.h,sha256=_4qkNcvXOOjgV8kPfndwpkQZsDa_B9UsJpmy8cDB1o4,1049 +torch/include/ATen/ops/_weight_norm_interface_cuda_dispatch.h,sha256=hGm-oFnLcqherEvgsxkp-pjs_PAy-UTri8M07oVALeo,1051 +torch/include/ATen/ops/_weight_norm_interface_native.h,sha256=jWUabmzr8wmyFCdwYst9umGl6KtmQ0oOK_Z3jEagzTo,1094 +torch/include/ATen/ops/_weight_norm_interface_ops.h,sha256=alXGbBsVF2vnMqwIJrPX8D6xrojG3ALVrpdW4haOjuo,2371 +torch/include/ATen/ops/_weight_norm_native.h,sha256=6BGgUKA-xq2m-mMd6ExG4STPlCTk7TpSwOSEWwAxT18,770 +torch/include/ATen/ops/_weight_norm_ops.h,sha256=db1Y0FTDHTNULHav8b3IWpUhQoyYQTJtB4UaDqwIKhg,1340 +torch/include/ATen/ops/_wrapped_linear_prepack.h,sha256=JjNAgMROK2W7Qkr_IGUZQWmaBP-KLXBzaiONj7_ycxs,1160 +torch/include/ATen/ops/_wrapped_linear_prepack_compositeimplicitautograd_dispatch.h,sha256=rpHde5mnq6ksUC6ZRTEyT5uDPDDBpMSjT7_lv2dC_Us,1133 +torch/include/ATen/ops/_wrapped_linear_prepack_native.h,sha256=Ch7JDo7iqRnV0pX-Bzmq1pyLwXUKJ6lmQ1F5mp7h56o,845 +torch/include/ATen/ops/_wrapped_linear_prepack_ops.h,sha256=eBuyNNMhjQwZbFRtYmHmCkGpRDWh2sYe1LWp-UCPFzo,1580 +torch/include/ATen/ops/_wrapped_quantized_linear_prepacked.h,sha256=53a_dA5maOraTx47ZtLHBs-St7Ur3bZokrUSSTLrh3Q,1428 +torch/include/ATen/ops/_wrapped_quantized_linear_prepacked_compositeimplicitautograd_dispatch.h,sha256=gCB1ZGWw48KsWTdoBhjz6DSQKbsyQejH5p4aHuYsuu8,1243 +torch/include/ATen/ops/_wrapped_quantized_linear_prepacked_native.h,sha256=inuj7a2dL8DF3pmNozXomSTy3UQE97mXAFMWidu-se4,955 +torch/include/ATen/ops/_wrapped_quantized_linear_prepacked_ops.h,sha256=NEwrsYRTuJ_41uiIf4u1eor20BKTEp_c1_OZs9I4q6U,1931 +torch/include/ATen/ops/abs.h,sha256=VXFWROeF1b0aR89jjuqNJyWSNyzJnUb5JZAlsqS8oxU,1384 +torch/include/ATen/ops/abs_compositeexplicitautograd_dispatch.h,sha256=u6L9CwtSRZRzdS0_c790fSGbDXtENGMgGsE_rlYnQb4,1063 +torch/include/ATen/ops/abs_cpu_dispatch.h,sha256=RmBoDt2pf_ZcrjtiDibUtue7LckDTWp98829UkSK3ns,1071 +torch/include/ATen/ops/abs_cuda_dispatch.h,sha256=slcECZpytQQvdRamusQOZzoBvjZ56olHX8gqorrQON4,1073 +torch/include/ATen/ops/abs_native.h,sha256=S94QPOwCbKpx8-4VSnKs8OOfitkXbV6mulYerIYthOk,1377 +torch/include/ATen/ops/abs_ops.h,sha256=dpwWlKCtkJjwVFLldthcEVScXEOeZHLyIQtjqpZtJkY,2273 +torch/include/ATen/ops/absolute.h,sha256=q2xeb2HznUk2cnzOUXLXMhALhiEJ8CrDZR3er0pLvxs,1301 +torch/include/ATen/ops/absolute_compositeimplicitautograd_dispatch.h,sha256=gavmbjy7CJUy6Tv0EoL0734v59nz6zQTP76qTc2LudQ,1234 +torch/include/ATen/ops/absolute_native.h,sha256=4BnamnLyV9FNQnkwMfKYCmScXFpaPb4PKBx7zUGVAkE,865 +torch/include/ATen/ops/absolute_ops.h,sha256=tr6kE0CsXtkedRNoX_aGbeFrRSVSNZQjLZIu3pEiGqY,2318 +torch/include/ATen/ops/acos.h,sha256=SKpJhnPpujmVHi1iJ8KgEI5f9SoHiogDcq06Dn_NQYo,1397 +torch/include/ATen/ops/acos_compositeexplicitautogradnonfunctional_dispatch.h,sha256=M-Fc06_5nf9VQr_jpO3OXp-xwLypFGBrSoCLogCDrTs,1091 +torch/include/ATen/ops/acos_cpu_dispatch.h,sha256=JCidOgttCzsb0OsfTZyxeRpPy4wsUZ4crLs8ya4hQ84,1174 +torch/include/ATen/ops/acos_cuda_dispatch.h,sha256=Z7NDPlrOc_7fN0G2W0k0pmsWoHz5hDhqMiSZWS5DsLc,1176 +torch/include/ATen/ops/acos_meta.h,sha256=Fxbx8TWXXStWsWioRtg8As5GSOuLHtrc7WBAka3NPB8,819 +torch/include/ATen/ops/acos_meta_dispatch.h,sha256=A9w0xY-3Fx7VKf4ZoOkiaaUQuQ72f1W7S9v0jRftezI,1176 +torch/include/ATen/ops/acos_native.h,sha256=7VpMi1YjhJ_Terwk7Ozi6rGD15Bpp1kR2R7OUPik8I8,844 +torch/include/ATen/ops/acos_ops.h,sha256=P64P2WrWDRjw_e3qz1PyU7g3B_PUBAjn0kQdADkLf-o,2282 +torch/include/ATen/ops/acosh.h,sha256=EX0TixTnxegkFnOGVG4Mjr5FJBkVpDHeGBuJai9KIXw,1410 +torch/include/ATen/ops/acosh_compositeexplicitautogradnonfunctional_dispatch.h,sha256=zRKBMgPIxXPdf9oeMtxk05VxLI-QohO6Z67VRqk-UMY,1093 +torch/include/ATen/ops/acosh_cpu_dispatch.h,sha256=BSsz3pCVkbC6NQ3PgGYFoYX_2umRiNqAI4M9n1yYStQ,1178 +torch/include/ATen/ops/acosh_cuda_dispatch.h,sha256=HhiwzW9WovfcXxFCFD9wrTiP-0dXlxCigU4I2RJVPlo,1180 +torch/include/ATen/ops/acosh_meta.h,sha256=MnBmRufU_rF0A3deLJM88POAlsF4z_JhKMuDBiYVnek,820 +torch/include/ATen/ops/acosh_meta_dispatch.h,sha256=y1V6AsJD6J6BedlPJWSlkiL2Oin6szguVi95nfrLZAw,1180 +torch/include/ATen/ops/acosh_native.h,sha256=hEINhUyNBvZhIviefJ6HMI2TcxEsd4sRQmu2vLeRLKY,847 +torch/include/ATen/ops/acosh_ops.h,sha256=KcQtwP5odYPQ4jrNejm01e9EiYXmR5UN7upRvqB0zK4,2291 +torch/include/ATen/ops/adaptive_avg_pool1d.h,sha256=cvsqAqTtZ40owD4ztXLtC6ABdzkHkDTNvb53QTSUJNs,1597 +torch/include/ATen/ops/adaptive_avg_pool1d_compositeexplicitautograd_dispatch.h,sha256=wdimpWVjiyPUmC_x7svgZwIJGpCJurjbBOZn5dTyXIM,1205 +torch/include/ATen/ops/adaptive_avg_pool1d_compositeimplicitautograd_dispatch.h,sha256=TMUh3JrcxOCWurevgh_SOltOCLlDATQznB0i3qee6E8,1060 +torch/include/ATen/ops/adaptive_avg_pool1d_native.h,sha256=bVW8pIThIaO_ztDhjqKlt1KWiwljT5g9rp-JxKlzO0M,892 +torch/include/ATen/ops/adaptive_avg_pool1d_ops.h,sha256=TabCm5eD_1CLwISDZW6ZfS2uCvqrQmw1UcmV04Sxqj4,2069 +torch/include/ATen/ops/adaptive_avg_pool2d.h,sha256=vYkvJHL1O-psigyoX4Ir6lJcPGnmsZN6Pr-vmz2OUKs,4364 +torch/include/ATen/ops/adaptive_avg_pool2d_compositeimplicitautograd_dispatch.h,sha256=_iB9nsHDQLelULrwxKstVF3Ymt4ODy2BbnxGdG8VE9A,1167 +torch/include/ATen/ops/adaptive_avg_pool2d_cpu_dispatch.h,sha256=riHjvmY7FcYlICc2G8qKU-sDQxvDk1eZemC9uu0C-Qw,1424 +torch/include/ATen/ops/adaptive_avg_pool2d_cuda_dispatch.h,sha256=FySDy4KR6dR0LWAYqVxj2irJCXdcp-zQiXYl1nNo_ZU,1426 +torch/include/ATen/ops/adaptive_avg_pool2d_native.h,sha256=dmjqNiS0zu2YJZ8R_td-SNgxsezNOL-7ctKmvuCmO_I,1164 +torch/include/ATen/ops/adaptive_avg_pool2d_ops.h,sha256=hONaDBIPqUT0goP3QsLrcJJGydx-xDGuc22NNUQ6SCE,2099 +torch/include/ATen/ops/adaptive_avg_pool3d.h,sha256=vQGmOt4e0xO65j1tdX2KGcOnNh10fg1QgKCqu3LOcR0,4364 +torch/include/ATen/ops/adaptive_avg_pool3d_backward.h,sha256=kGBO5I4IU6XB-W4vxWIRKwlavAZaPH6Nrag7BmdAvqY,1500 +torch/include/ATen/ops/adaptive_avg_pool3d_backward_cpu_dispatch.h,sha256=crqhUCUQ0tf9lsX27HkFtxNMBsKaqCvq_EpzXmqGv-k,1199 +torch/include/ATen/ops/adaptive_avg_pool3d_backward_cuda_dispatch.h,sha256=2NRZ9pY3aRj0-c7PizQweWOJ1eLvR0RH4o23XpEZBGQ,1201 +torch/include/ATen/ops/adaptive_avg_pool3d_backward_native.h,sha256=lPeOAGo5WFgDzkcfTEcuWqUEGviiJdQFKVeE1NEo9hs,963 +torch/include/ATen/ops/adaptive_avg_pool3d_backward_ops.h,sha256=7o-jdsz-2aZOk6k4G-tYJ_BRALs3B71SkLpdiacSvTs,1513 +torch/include/ATen/ops/adaptive_avg_pool3d_compositeimplicitautograd_dispatch.h,sha256=29Uyj16XTh4IwPFrPq2NSBRg8IG9cszYK9yeV67ocjU,1167 +torch/include/ATen/ops/adaptive_avg_pool3d_cpu_dispatch.h,sha256=tECjefOtr6qP2_4V8HlafzZVB4lS6V34BOjp4V9u9N0,1424 +torch/include/ATen/ops/adaptive_avg_pool3d_cuda_dispatch.h,sha256=uaEyHDUA4sYOflg37tVYk9AcJ9KvWLd3chP_oBJfO1A,1426 +torch/include/ATen/ops/adaptive_avg_pool3d_native.h,sha256=4-iFS6x1dsVC9lUN6z7es7Vo0GbBlYSHRAMpbvMN2R4,1166 +torch/include/ATen/ops/adaptive_avg_pool3d_ops.h,sha256=XdGoF4Ed5SCSzDhol6XP1uwdl8KUZZUx4jA6ggXDcqA,2099 +torch/include/ATen/ops/adaptive_max_pool1d.h,sha256=-0nUlAjaMhmDW-8jJpDB6cf9p6vyrhjx58xawtfU43U,1040 +torch/include/ATen/ops/adaptive_max_pool1d_compositeimplicitautograd_dispatch.h,sha256=PIEUSJlaiP2HPbXk1qSqzv8j577spTaGT8Pz7WbWG0Q,1085 +torch/include/ATen/ops/adaptive_max_pool1d_native.h,sha256=v_03nADvw8uSvoQCSX-gw4ltLXjtJZA1uk0yMGyR9mE,797 +torch/include/ATen/ops/adaptive_max_pool1d_ops.h,sha256=FIsp8cU6UcWzRINYPbIFJvfWejjb-9oaPRFrlvW7M0c,1430 +torch/include/ATen/ops/adaptive_max_pool2d.h,sha256=DiqjLsIJP2Sm1WmHm5OGkLz0IecNxWJSMHCTQiIh0y8,1816 +torch/include/ATen/ops/adaptive_max_pool2d_backward.h,sha256=PiQpByD_7uKpDggvX--9GtypF0eHpNOmEC-BEcnnV5o,1925 +torch/include/ATen/ops/adaptive_max_pool2d_backward_compositeexplicitautogradnonfunctional_dispatch.h,sha256=02oRBkplBUc9eEdS5j-h0juQzUNdS_J01mddjEs818g,1126 +torch/include/ATen/ops/adaptive_max_pool2d_backward_cpu_dispatch.h,sha256=tqLtKqYZlr-6p6WjqW46Dt_arVQl_U6zPGwE1zSvZ0g,1391 +torch/include/ATen/ops/adaptive_max_pool2d_backward_cuda_dispatch.h,sha256=3moJIuUczYODEL_Qcps0EB28xisuG0nwPAI5miNEQc4,1393 +torch/include/ATen/ops/adaptive_max_pool2d_backward_meta.h,sha256=3DADcZ9jFtPW7FQ_gcHg1baAi8wdMy7ZwqAwZ3mzEkw,903 +torch/include/ATen/ops/adaptive_max_pool2d_backward_meta_dispatch.h,sha256=tEVGBbPrA0EAWhvd3ffFfsngrmNkCHMBBRwrHzDRrdM,1393 +torch/include/ATen/ops/adaptive_max_pool2d_backward_native.h,sha256=LUJYEPD6xlYduE-N7s0qBWsy1KR00S5dpTKcwPpYcu0,1244 +torch/include/ATen/ops/adaptive_max_pool2d_backward_ops.h,sha256=mSmZWYiPjdV_GdOkfpzMTezz2pLHzPizO3DlxIHCVdI,2367 +torch/include/ATen/ops/adaptive_max_pool2d_compositeexplicitautogradnonfunctional_dispatch.h,sha256=k-1oMt7cse1IXiRnJ9KLPJBlRPigDdjplHljnU4kYqU,1111 +torch/include/ATen/ops/adaptive_max_pool2d_cpu_dispatch.h,sha256=DXINe5KXCxRT-x7fDSshhcNxdrkgjzr4il3-L9Mwdyg,1380 +torch/include/ATen/ops/adaptive_max_pool2d_cuda_dispatch.h,sha256=yBpiXu_emEYAnhpdn9yNO-3Hdme2iJIOIfwtfT8VZdQ,1382 +torch/include/ATen/ops/adaptive_max_pool2d_meta.h,sha256=9JRYrYuvXxUtNN4tFkBDE8zsKV7Nl6KTqdZDEj7K6SM,863 +torch/include/ATen/ops/adaptive_max_pool2d_meta_dispatch.h,sha256=yhk7E9WvMoedpFCOZ4xM0oUDLDsUIHIQn3wv4yucfdo,1382 +torch/include/ATen/ops/adaptive_max_pool2d_native.h,sha256=k5cP57Q1tt01OqRHiAxFt0EaC_JKImrSDeLHo-mtCdQ,1179 +torch/include/ATen/ops/adaptive_max_pool2d_ops.h,sha256=LbM5aT7NC94rDKKsMuRi7NXGs_7aDT2okScHfZfXY6o,2327 +torch/include/ATen/ops/adaptive_max_pool3d.h,sha256=Hoeb545SJ6Uc8yaV11NvBaNUBX377iyuJwlfhFv_7TY,1816 +torch/include/ATen/ops/adaptive_max_pool3d_backward.h,sha256=3h2u6Az-qQ26JJ-2OINMhyWx0vglIIK-pjtJxGx850E,1925 +torch/include/ATen/ops/adaptive_max_pool3d_backward_compositeexplicitautogradnonfunctional_dispatch.h,sha256=kk3oXJyrZ7JmF3G8Y5BxJ7bffPijQNzyMFfsCjeBelY,1126 +torch/include/ATen/ops/adaptive_max_pool3d_backward_cpu_dispatch.h,sha256=UFXGqbwSgFOxRQVX2vFQLNx6ea_DvBEgbYqQ9T1nSus,1391 +torch/include/ATen/ops/adaptive_max_pool3d_backward_cuda_dispatch.h,sha256=ulInN7kRNb-B-HPP2ksr8_cro7zMj_fa-r0tzC3kaxk,1393 +torch/include/ATen/ops/adaptive_max_pool3d_backward_meta.h,sha256=7gBriWeTokAlpa21zWII6FMSD9dHOQIA9TY2B5XI180,903 +torch/include/ATen/ops/adaptive_max_pool3d_backward_meta_dispatch.h,sha256=cTBBNkqu42TwIcacV2Y0BlDg1cVgxSUX-UCCsgt7mK0,1393 +torch/include/ATen/ops/adaptive_max_pool3d_backward_native.h,sha256=irD9zifg2Fdlte7xCUDj-BmhHsejs4EljVeHdaafxWU,1244 +torch/include/ATen/ops/adaptive_max_pool3d_backward_ops.h,sha256=euHKvHjqqo0rLIznV7Em3VyzpBQyKkuSZJh7VYR1MmA,2367 +torch/include/ATen/ops/adaptive_max_pool3d_compositeexplicitautogradnonfunctional_dispatch.h,sha256=k8Qg5NkGA1UWpJOjTcUznOLF8BocpL6OIC1kJEXQqEw,1111 +torch/include/ATen/ops/adaptive_max_pool3d_cpu_dispatch.h,sha256=u71JjIEhqWKqMuMJcS3FLtqL9vrIaAs75BLRbJ2TGd4,1380 +torch/include/ATen/ops/adaptive_max_pool3d_cuda_dispatch.h,sha256=_5eSr9wwtG341WSKVqGf6l4PkTmXUXe8v9ZAYg-T9FE,1382 +torch/include/ATen/ops/adaptive_max_pool3d_meta.h,sha256=q46EVVKttpu6Qyof7xlg3Py6vn7Tp5QOh11oZozy-0A,863 +torch/include/ATen/ops/adaptive_max_pool3d_meta_dispatch.h,sha256=MGRsJ_ions_nZXwhfjkcd6xeMqwVPMa41eLko-rfwYs,1382 +torch/include/ATen/ops/adaptive_max_pool3d_native.h,sha256=ML41yts1pIlfeq7LjmrDj4YIQtZzD6Uv_srUMiuZ3bI,1179 +torch/include/ATen/ops/adaptive_max_pool3d_ops.h,sha256=tGRlbBitSgWSrWl4J--_O3yb-Hv1BFCY6IaGCCsKf2o,2327 +torch/include/ATen/ops/add.h,sha256=m6lrA7B-rSG51Io7oG5_ewnfC1aBLFkCgFU1_4dFE3w,2392 +torch/include/ATen/ops/add_compositeexplicitautograd_dispatch.h,sha256=D03vfZ9tGlCEE4nkGdALemm9hU9Au0nppYI0OAhbIbs,1428 +torch/include/ATen/ops/add_compositeexplicitautogradnonfunctional_dispatch.h,sha256=-75RV2Oijnk1s42Hlx-A3JXJCvw2MW3F294vw9cqo2g,1197 +torch/include/ATen/ops/add_cpu_dispatch.h,sha256=Q9exi82uR6zlensj46mqIWfbZCslgKKm3u52lwys0p8,1384 +torch/include/ATen/ops/add_cuda_dispatch.h,sha256=CghG0_M5za1UyzcdMz0xzQCxfS-eNs2R5i8GRNZnnok,1386 +torch/include/ATen/ops/add_meta.h,sha256=6ezeJtIKFAdP-GOBpTAzxHUGGMbSZyDziwlfUtlkWd0,877 +torch/include/ATen/ops/add_meta_dispatch.h,sha256=XsCV2u0nuzkf-emhWiMxI-FgQf-oenCWcYG4U9sm8GM,1386 +torch/include/ATen/ops/add_native.h,sha256=-3Gfdb9dKvIeQSJhiuoJqZE-Otuxgj6UODoim2rXU0Y,3192 +torch/include/ATen/ops/add_ops.h,sha256=uhVYiPvpY3UOEiy7L5RcWXDTg6iDIdaQ7VDj5p098Ow,4986 +torch/include/ATen/ops/addbmm.h,sha256=YpB0pzkc5Kf1QsFE3WgTzxs0Dw1jwrhAjpFEQC_q1Vo,1877 +torch/include/ATen/ops/addbmm_cpu_dispatch.h,sha256=ii329H4Wgj75g1Mls-ibCF2RYJoK026mPulo4PQsRZo,1614 +torch/include/ATen/ops/addbmm_cuda_dispatch.h,sha256=B3jfKpPKNkEp0Sqy6v82AFcRmM7ZJ70Ko1WC1ClzGPM,1616 +torch/include/ATen/ops/addbmm_meta_dispatch.h,sha256=pgTGN84OfzusKgeTOEPUWUNn1GNd_cie5aYwTZ1U0RU,1082 +torch/include/ATen/ops/addbmm_native.h,sha256=vf3QakRHDJ-bLAi_aTQi8vLear21WvoOMuir5mdRp30,1182 +torch/include/ATen/ops/addbmm_ops.h,sha256=GoyU1hlrfdLEPZNWZ_zuBek8g_OpzGcFEL9aRg9mPTs,3359 +torch/include/ATen/ops/addcdiv.h,sha256=t1U1iGjBm28GpDL8V9A24UtbXEEjl_BGFDNsb8Py4yA,1763 +torch/include/ATen/ops/addcdiv_compositeexplicitautogradnonfunctional_dispatch.h,sha256=0kYJpDH1sM06As6VjjhAJnMHX9SNfDV7ktYkNuIoEPY,1265 +torch/include/ATen/ops/addcdiv_cpu_dispatch.h,sha256=ckKtNft32z9OhHOwC8CbMgcQXz2JVyS7V3cvEaVqgLM,1520 +torch/include/ATen/ops/addcdiv_cuda_dispatch.h,sha256=U_BZgItyHrVbYYqaVaeepNMfRYGadNQ5bsTnuEttLeo,1522 +torch/include/ATen/ops/addcdiv_meta.h,sha256=M1U0yXPKvh6GmvmVZdR66gr3JlZudAnAUPJy3i7v-aQ,904 +torch/include/ATen/ops/addcdiv_meta_dispatch.h,sha256=xob8iHLMv6Byfcd-1QiECDW_QVXf-H4JWX_c4-VRgsQ,1522 +torch/include/ATen/ops/addcdiv_native.h,sha256=ciBlAlh3nJgu9kk-hJCu8tUjO5pu1ttKXtitnBo62Uk,935 +torch/include/ATen/ops/addcdiv_ops.h,sha256=3lU7IxvAddBY5j4U07glO6C1eisnnrHFkR7m3_p0BFU,3131 +torch/include/ATen/ops/addcmul.h,sha256=d6yA0MFFrCTnUQAE2cNdgLiI-tVKSm2uWfT0jssBzk4,1763 +torch/include/ATen/ops/addcmul_compositeexplicitautogradnonfunctional_dispatch.h,sha256=nPohaadyYLB8gTbpFwHWOsldaKht-G4NDuksGQW0qOc,1265 +torch/include/ATen/ops/addcmul_cpu_dispatch.h,sha256=9lbRsf9NnypuUx2ANm4AOdlhWYutQZczs_JckYPK2x4,1520 +torch/include/ATen/ops/addcmul_cuda_dispatch.h,sha256=yoHtIwKQ2X_W0NR5vIkzDDIyJQBiAUgtRoW1_z11_h0,1522 +torch/include/ATen/ops/addcmul_meta.h,sha256=4dkSP08fKvzhfnbDkfHUiD_ALxoeWCkIhDb6SDMKM18,904 +torch/include/ATen/ops/addcmul_meta_dispatch.h,sha256=DxXVOvhZtAvjnSOckDnltKHW-6li068UyqlvsXDgA4E,1522 +torch/include/ATen/ops/addcmul_native.h,sha256=B0l0RAVuKH25aZCMwMs4U5lgdwKvGsNeUbl8-ictIR0,935 +torch/include/ATen/ops/addcmul_ops.h,sha256=_SHuJnwpd2P8EBoYAVGUw1O1H8_WKQiclKOUp_osUFA,3131 +torch/include/ATen/ops/addmm.h,sha256=-o4XEvaGbcMOUVC3fYmNtzRbpuenK_BozOSu3PxuW1U,3120 +torch/include/ATen/ops/addmm_compositeexplicitautogradnonfunctional_dispatch.h,sha256=pTq70OPuEuU2y-2EKy9itDkiamtnIcJXpldE-cSq7Cg,1303 +torch/include/ATen/ops/addmm_cpu_dispatch.h,sha256=XcQ2YnhQ30RBEWx1aBAh41Lb_3SV9j9uhiyayjpXZsk,1594 +torch/include/ATen/ops/addmm_cuda_dispatch.h,sha256=Hwi-qjy0MF__LENK4XIzryX-LY4vmJAWoNtG3A1dX6U,2193 +torch/include/ATen/ops/addmm_meta.h,sha256=yROoxshtWW22uqJlz3fvkp6jg3BBMl8J0OJs68DyrV8,921 +torch/include/ATen/ops/addmm_meta_dispatch.h,sha256=-ZMxQ-JE76mSB7gDQYhIu5Du3m0H0fqAy0jolBsLTj4,1596 +torch/include/ATen/ops/addmm_native.h,sha256=vs-YcOXmXcStBbkisyf_efeJpB1M2xlcsRjA-re5z-0,3283 +torch/include/ATen/ops/addmm_ops.h,sha256=qdE3qyCMnWHrwvO8NzKjjO8pw5erGAvLL26ekb-oZjU,5294 +torch/include/ATen/ops/addmv.h,sha256=3nzVDqeH7GXa-NnDQkx_vHNOs2b4WuYsdjBqmVJQ7Eg,2136 +torch/include/ATen/ops/addmv_compositeexplicitautogradnonfunctional_dispatch.h,sha256=T3ypXKUu0OQprtEXQcG35Bw-iAzOeR29MX3m6g4Yeis,1299 +torch/include/ATen/ops/addmv_cpu_dispatch.h,sha256=VZ35EDvsSpxLG1k6Y8mFtPYc7ISEVPKriZQ7vUwBIC8,1586 +torch/include/ATen/ops/addmv_cuda_dispatch.h,sha256=pqfco4hy60f_7EfoHTJUfPeRG6iVjCkXFc4Evpklxlc,1588 +torch/include/ATen/ops/addmv_meta.h,sha256=cYVBtR_dkXbUJi3dZHqEO8VVBv2j27bOpujSmhcR8bc,919 +torch/include/ATen/ops/addmv_meta_dispatch.h,sha256=uZMhLPU3Vy8NPsDA0n6hwQxKIkp4npvjjA1h9D_pxgk,1588 +torch/include/ATen/ops/addmv_native.h,sha256=okfZBptq9X2rQEZKhgoXF3mcoWUq0qwQ3ERStbCa3Ag,1586 +torch/include/ATen/ops/addmv_ops.h,sha256=an0RD3s7ZFVaeySL_Ec0l-ihYH2yYYe6XtjH1rz3pSc,3296 +torch/include/ATen/ops/addr.h,sha256=dEn7LHRNJGIVldThT92l4K2TAxKn6vVBkS1_3qN6KL8,1821 +torch/include/ATen/ops/addr_compositeexplicitautograd_dispatch.h,sha256=P0K5QJPwOkuCZAUsKQXCUXEWStMRUu0AoDQYVKjalUg,1634 +torch/include/ATen/ops/addr_cpu_dispatch.h,sha256=7HaSSdqfzjDzt_T3xHvNPTSbnBRjl6GKl-_YBrOV3Io,1436 +torch/include/ATen/ops/addr_cuda_dispatch.h,sha256=PFOzyufX3Vavp9-R49R1d_Z99qP_0lBQOm4z8cd2Yek,1438 +torch/include/ATen/ops/addr_native.h,sha256=YqPn6BzOANF1u-djnS2VITqI_oAtUUhMqbN3idzP31I,1508 +torch/include/ATen/ops/addr_ops.h,sha256=QjiEGQos_q_JBj9ZnX70RfcwqqFen_BaCnKPUDL0gaM,3305 +torch/include/ATen/ops/adjoint.h,sha256=F4s5cN51xoXVAZySno7UItx-OTulfrZJIghCx_mZ97Y,901 +torch/include/ATen/ops/adjoint_compositeimplicitautograd_dispatch.h,sha256=vOv3srLAcfcrhWeXgTJ6fXg-kxIPqf7ZgbWejFdS034,1019 +torch/include/ATen/ops/adjoint_native.h,sha256=iTV4PJEUIZ8tECa8n9uownsHvZv_ncuFC8Kbp4j-smc,731 +torch/include/ATen/ops/adjoint_ops.h,sha256=iECvks7drZWCFkU7gMQUkXgZYeimSaCn_rST02Hkh9o,1220 +torch/include/ATen/ops/affine_grid_generator.h,sha256=8rQXkwWs772jDr86bPgLP5KFHabnJ17K10PEsomFOMA,4780 +torch/include/ATen/ops/affine_grid_generator_backward.h,sha256=MQV2eisa_JgMsrrEiwjB-L30h1ae0hYFUajcScZsnDw,2071 +torch/include/ATen/ops/affine_grid_generator_backward_compositeimplicitautograd_dispatch.h,sha256=4aS922-zBlehaRkf2-6AWrXOUz-0Vp9RHOgoF8bMfCE,1215 +torch/include/ATen/ops/affine_grid_generator_backward_native.h,sha256=C1VkRkqkdbms7sTqtq-7P-e1YhxPJZdHDgNITz6nzZg,796 +torch/include/ATen/ops/affine_grid_generator_backward_ops.h,sha256=3yvW_Zy50JcrWZggc7FuuVZUvTPU5Kekv0DRj5Qbk7c,1437 +torch/include/ATen/ops/affine_grid_generator_compositeexplicitautograd_dispatch.h,sha256=TpVik6hkMQWZKeLI5K8gvFXdBUfI9b4rZNUmKB95iUg,1767 +torch/include/ATen/ops/affine_grid_generator_native.h,sha256=gE5EaMMPudhWonJpB3E56HWW9tGqsWixqfwqs98G0aw,935 +torch/include/ATen/ops/affine_grid_generator_ops.h,sha256=WoGEgeJqPsnjgBfU6maVP-JF0ZfECVVkbPVGtphQ8kY,2205 +torch/include/ATen/ops/alias.h,sha256=C3LMBrHP_HTyd1AOfdjTV-1scg7ofP821Id2Kg3Jeyw,893 +torch/include/ATen/ops/alias_compositeexplicitautograd_dispatch.h,sha256=nGzzFW756BOmAxwNfYDAyVWU8x5o-E10KRFVQeqscGc,1017 +torch/include/ATen/ops/alias_copy.h,sha256=5vy0sl19ExUPPGiUBOEPK00khwpGrWFpVZdAh3O1AS0,1321 +torch/include/ATen/ops/alias_copy_compositeexplicitautograd_dispatch.h,sha256=cri_CZ9jyxStuFPaEOx0uRvIfg941j_QZrwWG_UNrA8,1129 +torch/include/ATen/ops/alias_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=9psWzdjcAxS9J7YS7Ovo3XwRqG9_r1QDIm4ZHwHMcbM,1048 +torch/include/ATen/ops/alias_copy_native.h,sha256=OdmggpAqopsw1afrHW4T1duNA3yrlKS0k8WVGmTJZFc,816 +torch/include/ATen/ops/alias_copy_ops.h,sha256=njs9obBY3RTj2MBiVLuEp_lVGCVaryS0Y-P7LpuY2aI,1825 +torch/include/ATen/ops/alias_native.h,sha256=e1VY3X5nTr-DwVXWC5FBOB0bDBWXPb5EEycaN37n9MA,789 +torch/include/ATen/ops/alias_ops.h,sha256=NYc_8dfK1oLYtC7uzl1HTSoFsJFIdd1EjXDFmhAjjEY,1214 +torch/include/ATen/ops/align_as.h,sha256=ujMiBDHo7VkIPyI8BTsxJQv-mF6WSHE8vzdUPvE6MRA,759 +torch/include/ATen/ops/align_as_compositeimplicitautograd_dispatch.h,sha256=b0Rrzlo1h8_RmUFCWArMX6OY0aOa7LdKRn2UjCJB-Vs,1046 +torch/include/ATen/ops/align_as_native.h,sha256=CdxT_2m488GjcGE7Pw3OxNGKVnuLmF_aH2E2HtTlmFs,758 +torch/include/ATen/ops/align_as_ops.h,sha256=YGBFsxFJxH6RQVtEmgwW4mu4roRl5HZXVdGlSz5gwaY,1303 +torch/include/ATen/ops/align_tensors.h,sha256=88_U4CVD5klXL14gov16_gufkvKZ5jwK-yvuL_j3Iv0,943 +torch/include/ATen/ops/align_tensors_compositeimplicitautograd_dispatch.h,sha256=6Sh7qf2gZsgjUmhwtye50w8M36tuClWiBC3gHNANBHg,1039 +torch/include/ATen/ops/align_tensors_native.h,sha256=BGzfMifCGiaNaBhtnu24C7PKxoBR_F-ZewIW_7InUaE,751 +torch/include/ATen/ops/align_tensors_ops.h,sha256=YJt6RE5TsyUh4OtYr1J5nCdAv_wZcHvWr26s_hVgGh8,1278 +torch/include/ATen/ops/align_to.h,sha256=kQ_ykm1cX048R4vl3hE12USWqvOyPG6LYM3KuAvVuSc,759 +torch/include/ATen/ops/align_to_compositeimplicitautograd_dispatch.h,sha256=ZK99o-bZ4zXlrxhYyXS0Y5FV2dhkugdCLzyJgeAYev0,1144 +torch/include/ATen/ops/align_to_native.h,sha256=NDLpM31kErwhRhXS_vL3FRgDVedpKGVDI-_Ql3f7bPM,856 +torch/include/ATen/ops/align_to_ops.h,sha256=Fxzd4I0jK5Cc89C8rJOUa-hzA2E_VtLkoI_rZqrXZgY,2004 +torch/include/ATen/ops/all.h,sha256=m-OA6Lk9lJxyq4NuVhBf_hY_hUq7jKoWGJJj-_KjhOc,3609 +torch/include/ATen/ops/all_compositeexplicitautograd_dispatch.h,sha256=mmbBiM2Zn5e1VPEby000TDr3kAHlXskmwYoIGij1P6I,1307 +torch/include/ATen/ops/all_compositeexplicitautogradnonfunctional_dispatch.h,sha256=5nlH9Qbc_MKWl2lGEcNmR6tP2b95ePZ31QKWDc7-8e8,1225 +torch/include/ATen/ops/all_compositeimplicitautograd_dispatch.h,sha256=hal_NnwWNXoVR2_s58r_-0c2OST6-Do9GluNodd-13I,1271 +torch/include/ATen/ops/all_cpu_dispatch.h,sha256=K2NbhOus9oXaAOUqXuvuiqp6jcHm3HR0h9iAnfLsMyA,1760 +torch/include/ATen/ops/all_cuda_dispatch.h,sha256=_XYF8bg24XGb1XozeaZ98VitehNLIK4oMQ436Ww5Xbo,1762 +torch/include/ATen/ops/all_meta.h,sha256=tfRrW8h6Too1ySoip6viegLP981E_miX23dHTx0ve28,1111 +torch/include/ATen/ops/all_meta_dispatch.h,sha256=JNgmdwnAbTf4tFuJjJfrZKm3jszdsrw1lCVSFS0yZec,1762 +torch/include/ATen/ops/all_native.h,sha256=d-_Gde2BxCqp-F6v-MRnQc8pxYAcEkJMLymO-fJ0png,1749 +torch/include/ATen/ops/all_ops.h,sha256=jAkvm6soh5cS-3jMXXm9xum6nZ9wi6WeQybxNgo8G2A,5830 +torch/include/ATen/ops/allclose.h,sha256=HnudG9IsIjn4-Rr0MO_hA4JfKw34snPxpvCy8Dlwt2o,1079 +torch/include/ATen/ops/allclose_compositeexplicitautograd_dispatch.h,sha256=9A3NW8DQFDHQRRwxI3Kg0IyQ1zhOY_iZRfC8JXr7Pgg,1100 +torch/include/ATen/ops/allclose_native.h,sha256=0TQiTzJCl0Di97b54c73YhPcwfT-TfQRid9JkNys3XQ,812 +torch/include/ATen/ops/allclose_ops.h,sha256=n68rqZCqEUG8tA7P36BpP1F0lgbzQsCrYwL6puKJjCg,1447 +torch/include/ATen/ops/alpha_dropout.h,sha256=N4BN3lvZSnWZOmMbGF7_PyQmPqCDxvvbh8vSs-Nz1ew,1191 +torch/include/ATen/ops/alpha_dropout_compositeimplicitautograd_dispatch.h,sha256=5xAG7bhcYGrOWWpNDCxflqmKO3sryvhiQ6Jp_n1T7sc,1128 +torch/include/ATen/ops/alpha_dropout_native.h,sha256=PosbfR95kB-Bn1ikwRDnjRlJjpQjLW6tkPGe9ki-l6M,840 +torch/include/ATen/ops/alpha_dropout_ops.h,sha256=9gk_Nx2RTfTLjXqUYxCabKLdILs16hSkWi2Yp_a9WYs,1913 +torch/include/ATen/ops/amax.h,sha256=WqDBBZstAAC-a32OWFFx_6YrOhs40w6VpK6BIq0CxQU,1531 +torch/include/ATen/ops/amax_compositeexplicitautogradnonfunctional_dispatch.h,sha256=epYea8UhHq6-xL290YLgWWk_pyUgz87Aym0c5HFPhz4,1086 +torch/include/ATen/ops/amax_cpu_dispatch.h,sha256=BTQMNI7KiMPfEpISmuPHGy3qG3XxGiuXhQRECRWWPsA,1248 +torch/include/ATen/ops/amax_cuda_dispatch.h,sha256=D7_kizvYrmC1qyyEU6fv0vRXhnmoyy_5bLH1lfDyLvQ,1250 +torch/include/ATen/ops/amax_meta.h,sha256=-kS1mONJ60VjoruggHXlOmvRGT--FOtrVgfVBi0nlqo,854 +torch/include/ATen/ops/amax_meta_dispatch.h,sha256=ahiWzmV4oILNaQJPgZMQ-E7mB1DS46l--naNxGGszHE,1250 +torch/include/ATen/ops/amax_native.h,sha256=pfyy_S3FTHq1pR5jhsf15c6Gk_jJlShnrUI-XwjTNgI,879 +torch/include/ATen/ops/amax_ops.h,sha256=WbUAGnxlfXCl-NZf9DVwy43WTPRBTkvPriOcKUTnSVQ,2045 +torch/include/ATen/ops/amin.h,sha256=ci0xVbQeMyy0giupqRD1R5MyIjTBUl4IZ8g5SCQqhF0,1531 +torch/include/ATen/ops/amin_compositeexplicitautogradnonfunctional_dispatch.h,sha256=WqXwuPaYDZMkJCM9W96AspBK8PpOrbj895feSVO0XvI,1086 +torch/include/ATen/ops/amin_cpu_dispatch.h,sha256=rVHPbkrq9bFHRHkFjZ0zQDQCHTnzAwuzYdTpFk3ukQ8,1248 +torch/include/ATen/ops/amin_cuda_dispatch.h,sha256=baxW91d_C_P56g7YqexLeyJHapim4YvyVz1qFhb-7oQ,1250 +torch/include/ATen/ops/amin_meta.h,sha256=ZHKQgvQLDtk1CkfpQWYp13MfWTyJtTFfuslxboLJej4,854 +torch/include/ATen/ops/amin_meta_dispatch.h,sha256=5Rd9iLZN05jRS1YT8lwAMZ_cj1foGHkfkwe30AAo0vE,1250 +torch/include/ATen/ops/amin_native.h,sha256=pwtGuBWvIgDPKHZUVMZPAMQZrAFmHS0nTKwr0P-xdG4,879 +torch/include/ATen/ops/amin_ops.h,sha256=rMxfVThw5U8NONM7hfX93GsBJBfyqN84QrB9OE_gPeQ,2045 +torch/include/ATen/ops/aminmax.h,sha256=bQGvNkG0savYjSdImC9eitYWHeLzMMD4OjbrqmRIh-g,1834 +torch/include/ATen/ops/aminmax_compositeexplicitautogradnonfunctional_dispatch.h,sha256=KAR7lCRKROBN5L9yD2T7b-o2OYr_zuunTQrf6MLBJ70,1135 +torch/include/ATen/ops/aminmax_cpu_dispatch.h,sha256=SpKfPBzl44ZC0BAC6RoR8NnHZJ7JR8cfjVjKRZRfZhA,1423 +torch/include/ATen/ops/aminmax_cuda_dispatch.h,sha256=oVDKenyb6eoDfj2-8_b7a-qowJqbcmYFIRjDaYZC6SY,1425 +torch/include/ATen/ops/aminmax_meta.h,sha256=G6d7rD8shu4SYoLNhwV4DG_5i2nNTsHyy4Kbt2UwEeU,866 +torch/include/ATen/ops/aminmax_meta_dispatch.h,sha256=BgMJAQt7Yi686_dG5Zs3KkbXr0UdnEZzIKOiKNc9zy0,1425 +torch/include/ATen/ops/aminmax_native.h,sha256=7IJhFuuP_DjdQyoJ2wHeJ2XG-eIBclTK4O3YjnBj1dg,921 +torch/include/ATen/ops/aminmax_ops.h,sha256=QISYeuZishhhlckBsmrtmYOLszmsrzd5KOXEVtO6o_o,2382 +torch/include/ATen/ops/and.h,sha256=AfdCY8DiDqbF-enw8ZCxtrQC4IVPH8R_Gv3JXBLz8_Y,1151 +torch/include/ATen/ops/and_compositeimplicitautograd_dispatch.h,sha256=5g_sYbFMv32u9xp5FWoc3sT7_-m0L1Z-s6UUL7HnroQ,1282 +torch/include/ATen/ops/and_native.h,sha256=-sX5_rHtYxeNREVIGa7Fl1wXYOKsYyW-CA0LOwnXMmE,994 +torch/include/ATen/ops/and_ops.h,sha256=J3Cr8oBu3R_BNrpnGPESqx55LJOJhOzYdXaXJ8ghzsU,3145 +torch/include/ATen/ops/angle.h,sha256=90wdYFa_q_k42MD_g8ctgyOf6BcfgLC5wyJjxDLYxtI,1271 +torch/include/ATen/ops/angle_cpu_dispatch.h,sha256=bnibbXmwA48hSTJfpselkDimsEj5UlRjL5YrvfBIyJw,1128 +torch/include/ATen/ops/angle_cuda_dispatch.h,sha256=KIM5oQrYRaEzbQ8PHwlQ23xDs2ZDbeliL69SchyjStw,1130 +torch/include/ATen/ops/angle_native.h,sha256=Xuzdky7qeAuYU1TS-aB1L8hvShvV0xw5zL-CBIRQgQg,958 +torch/include/ATen/ops/angle_ops.h,sha256=g80gxwCtt2_jc2y3R9PSMto3QHQVzHEX_0RIxm8XcVU,1795 +torch/include/ATen/ops/any.h,sha256=O2OM8fdyEedhvg4FwUt5bvwi5QsHznX-mU3EAgtb5-s,3609 +torch/include/ATen/ops/any_compositeexplicitautograd_dispatch.h,sha256=SJslF-IN092tN2SYcxQep8zmJWChwoexIAXRRkHEyng,1307 +torch/include/ATen/ops/any_compositeexplicitautogradnonfunctional_dispatch.h,sha256=XcZKZhHKk1oE_QmoqC5gvnQGNCXmKGzD7eXYN_pWAmE,1225 +torch/include/ATen/ops/any_compositeimplicitautograd_dispatch.h,sha256=9lbOK5LwRhI7dn-hJ-kloXNgW5XW5wdkST0sE2ujQWc,1271 +torch/include/ATen/ops/any_cpu_dispatch.h,sha256=sWT1UNvum9ZQW_QyhyNYxvSCT9JwGZDcR_velMkv8PQ,1760 +torch/include/ATen/ops/any_cuda_dispatch.h,sha256=RWeH9RF17J_I79QNlH9Pi50w-Rdz0Zhij_c8H4ZtOQQ,1762 +torch/include/ATen/ops/any_meta.h,sha256=wlYXdI-imjoS6AUmQ--hgq1uA9ZcKdzH5zKgkddHMuM,1111 +torch/include/ATen/ops/any_meta_dispatch.h,sha256=jQSiHAePU_687iSWqz9WotdfwUzwmVBfMhbm6NazRng,1762 +torch/include/ATen/ops/any_native.h,sha256=uR5vqKxAz6fp6AVVZEmWN0QExeUoTwWfwCDfhqSfGoA,1710 +torch/include/ATen/ops/any_ops.h,sha256=0EiCLcqDPkeGyRKb7WReZrvAMdtRMPTXYvBbeA4UV90,5830 +torch/include/ATen/ops/arange.h,sha256=ZC56YE4iOmBl6n-ac5x6eGYfeDWHAi9jTlEJ8N1QcqM,4425 +torch/include/ATen/ops/arange_compositeexplicitautograd_dispatch.h,sha256=BXxVE0ecp-tENMd-6TJ2liaRx90s-INb8clb_Pkmk7o,2116 +torch/include/ATen/ops/arange_cpu_dispatch.h,sha256=yftx4XApoiS2TGAtjlfhmlrpomD3pLK1hDD9_9bjTD8,1177 +torch/include/ATen/ops/arange_cuda_dispatch.h,sha256=O2d8hakjkuO08SEZrMmkiw_vHXSLjvbOIvP9G7X9J4s,1179 +torch/include/ATen/ops/arange_meta_dispatch.h,sha256=_WYLjKaJDqjXrA4MIWZ1VFIWRm791JGWY-X011MXXis,1179 +torch/include/ATen/ops/arange_native.h,sha256=AQB_g8uGZ36kn1cPsL3qyf-g7LzO_dlUhOLaJvCr5QY,1723 +torch/include/ATen/ops/arange_ops.h,sha256=mOYjd_YPPA904rmA3RyJjgPriDhogeFFezEo5lwjuqw,5359 +torch/include/ATen/ops/arccos.h,sha256=5Uk3Ps5cTYJOoI1uRfF4vGlfQf-7bexPSi4N-wanxos,1423 +torch/include/ATen/ops/arccos_compositeimplicitautograd_dispatch.h,sha256=20FTmdmQdnBpiD61wcZCla33mPnWhRHtsPBPX1XgoyM,1226 +torch/include/ATen/ops/arccos_native.h,sha256=yErsbOBMKzEgOZKqmt1u_XVGeYpUzYV6JI3xS8zDI6k,859 +torch/include/ATen/ops/arccos_ops.h,sha256=MtwZnA2kMzcF0qVWDGWqTw-xgF7JthGbchWCGR8PgGk,2300 +torch/include/ATen/ops/arccosh.h,sha256=p9En4OL2rdTbXa0tsA5KOuYvKbNBNhoWLC4pDv8Okc4,1436 +torch/include/ATen/ops/arccosh_compositeimplicitautograd_dispatch.h,sha256=ogslVweuObutgL4Pq66k-oWOZzC-oSLmoHaRmpScV5s,1230 +torch/include/ATen/ops/arccosh_native.h,sha256=vfT1T5VA205RoNphHt6a90IhfZ_dYC63Es25p9FeIE4,862 +torch/include/ATen/ops/arccosh_ops.h,sha256=qBgF84vdlKjvlWtKOHbtwJJeqL9WJuv39lLFYGkHbzk,2309 +torch/include/ATen/ops/arcsin.h,sha256=x2yuqImoVOx-osPoQKeprHFPaaVFgff5hO4SdAv6Y3U,1423 +torch/include/ATen/ops/arcsin_compositeimplicitautograd_dispatch.h,sha256=qqSFPhFEf5tpr9-8oFGdNyJohZRbvBf70g9OlDwavoU,1226 +torch/include/ATen/ops/arcsin_native.h,sha256=uMPZE0fDu53Nb6BneOe6tZY1Iue_Andh1TqafqK43RA,859 +torch/include/ATen/ops/arcsin_ops.h,sha256=WPA8_X5cnnxl8dJUkoB4bZtc7c6vroLjMj9L9CA0RtU,2300 +torch/include/ATen/ops/arcsinh.h,sha256=MDyYdl7ux4Z0_2sjMCWaSSj3jX8HhYmGdp_lZT3IpoA,1436 +torch/include/ATen/ops/arcsinh_compositeimplicitautograd_dispatch.h,sha256=vZu0a0jk-yLlFlmKWD9LrHvk1EDh5EDJ1HfSSsa_hho,1230 +torch/include/ATen/ops/arcsinh_native.h,sha256=JhmmU6Kl1vaghGW3C7f37BPIdo-GbvPM-2GQG8XR9qU,862 +torch/include/ATen/ops/arcsinh_ops.h,sha256=2e2tGcaiwr8f1LXAbdvNZtGeP4GFkMyA3xIqdFNiTGE,2309 +torch/include/ATen/ops/arctan.h,sha256=zb-WgJZLEAvPJLFeIdSNjSY90nJac5mr1GiHkNC6z7Q,1423 +torch/include/ATen/ops/arctan2.h,sha256=FYrvrRpCoh2pCPi9CsnlpaL8OdhUzdDRyXvgjvNa5W4,1432 +torch/include/ATen/ops/arctan2_compositeimplicitautograd_dispatch.h,sha256=fypc2XKT61xM0GQ8-dzVUjqfEXrPV_Y6KNfoHJctfVM,1334 +torch/include/ATen/ops/arctan2_native.h,sha256=Kwvcy1iWGYA3VuIx92CLaxyvhvdcVJnc4oHOA7OzdGs,940 +torch/include/ATen/ops/arctan2_ops.h,sha256=LwpOsawft6yiyzY5brvOu1tcervVBFkq5LW3Pmvy5c4,2567 +torch/include/ATen/ops/arctan_compositeimplicitautograd_dispatch.h,sha256=1MALW4LAvSK6hc3RgXlDDWWZF6CN_zAGeabYbAh-W2Y,1226 +torch/include/ATen/ops/arctan_native.h,sha256=IU-c4I1YdT6Iyofe4Jq4TJzSCtMCFHud4Wlgy5301T0,859 +torch/include/ATen/ops/arctan_ops.h,sha256=6La376X5EkAzig226WdvdaOD46s13NdsDdXQgh259u8,2300 +torch/include/ATen/ops/arctanh.h,sha256=nnaFGSuGPTVOMcdIJ5wiFaS_wa8sx5_K353TAvn8D48,1436 +torch/include/ATen/ops/arctanh_compositeimplicitautograd_dispatch.h,sha256=UuImT6ryokuenV8F2mvr1vsm52UKviVbEv6es7wX35w,1230 +torch/include/ATen/ops/arctanh_native.h,sha256=iDY4ajSbtFqagCIGfHWZOpGiLQZjNyOsd9aJsVxF1Jc,862 +torch/include/ATen/ops/arctanh_ops.h,sha256=3C5UrKxlNwi-FnM4P_bUJUC_EVxLp8LzcwuJld-tzEo,2309 +torch/include/ATen/ops/argmax.h,sha256=BOaWkUGCQ52vEFFOgGnphdWc7haL2syExSmeW6xwk0I,1602 +torch/include/ATen/ops/argmax_compositeexplicitautogradnonfunctional_dispatch.h,sha256=_Gy_M1Wd_sCmkTpPo06kWPX0JzcE3Oi1kLE8QMGO3vQ,1109 +torch/include/ATen/ops/argmax_cpu_dispatch.h,sha256=5VQgtrUwgkvLY5nJrTJmHsI6PZVor7PbJ-xmrgJI3TQ,1305 +torch/include/ATen/ops/argmax_cuda_dispatch.h,sha256=BiENtvgFCJ19UW_6hBSjJbaQ9iixl9fgAqHZAttY1Ao,1307 +torch/include/ATen/ops/argmax_meta.h,sha256=ylVsv-yozGfX0-4dvaqNLl6NLeesW78A4oVJVbdZaNY,865 +torch/include/ATen/ops/argmax_meta_dispatch.h,sha256=9LS6-qecZPjCzF0ZR-MLKbrOXSwxvc9LRaYUZo6ZAEg,1307 +torch/include/ATen/ops/argmax_native.h,sha256=i98fmx-73yBjZuats3G2x7tF9NEVlLvtq27HthxjRPg,894 +torch/include/ATen/ops/argmax_ops.h,sha256=WwP7S_xzRIzayYstRW49xEbULtm3at6ZJosHkP-rKDA,2111 +torch/include/ATen/ops/argmin.h,sha256=hWI6tUKRkEXSxpn_gUxSFTsMK7dRlPqdu5eh-KJHKH4,1602 +torch/include/ATen/ops/argmin_compositeexplicitautogradnonfunctional_dispatch.h,sha256=OErO2xFMI74nlrcYGv6TypvHuSrqmklo6Aq9ugaQK_A,1109 +torch/include/ATen/ops/argmin_cpu_dispatch.h,sha256=yIM31vEpJ-sPDyBMFN_6XAHTG2nM2EBJrAbwVHz4uIU,1305 +torch/include/ATen/ops/argmin_cuda_dispatch.h,sha256=9mKzbp3MenIDMgiXWxYd0ntzta0h_J6AIENiwT9Y1Wc,1307 +torch/include/ATen/ops/argmin_meta.h,sha256=0hZA7tEq_TxBwj30Hy01j6-tswYRnpJNTJFyaMY1xCw,865 +torch/include/ATen/ops/argmin_meta_dispatch.h,sha256=9TZOAvEJz7ZFyvS_28u89EIaAsaTvL5WCMcJv1cfTCk,1307 +torch/include/ATen/ops/argmin_native.h,sha256=F9KZtYuNzEypuWlaIM2naQtYfeGV4oDKBiyqWwyTI1w,894 +torch/include/ATen/ops/argmin_ops.h,sha256=3osfrvcAKFrAXmGVNf_tG2Pwoz8nEMnf6ld_giRjQIs,2111 +torch/include/ATen/ops/argsort.h,sha256=6GwFmV2vXCr4HiJuKO8MFz4QR08iqvO99X3E4opoe10,2178 +torch/include/ATen/ops/argsort_compositeimplicitautograd_dispatch.h,sha256=C8IzcVGUjSwf-We7uwDkbaFU_XgGd1k65Oms5R6uL8A,1514 +torch/include/ATen/ops/argsort_native.h,sha256=n4WWFfxBzNNrRmbneNWmokbqfksdOzZrYGOGlwtZc-A,1094 +torch/include/ATen/ops/argsort_ops.h,sha256=7btlypVACdG56oGqkvOUEMRjGG8Sz5DObjPIbdH6Hlw,3423 +torch/include/ATen/ops/argwhere.h,sha256=Nq_Zqfh23SZ6-Ti-hxFCc0-j-CXcmyPQ6HM2GPPqTs4,899 +torch/include/ATen/ops/argwhere_compositeimplicitautograd_dispatch.h,sha256=AB3PDtUWP1Xn6X5WFaZknKUi7lLm_XvWGl4bGEzfID8,1020 +torch/include/ATen/ops/argwhere_native.h,sha256=gmts4IxllA2N6bVI24zT6IMq-7oFetY-rbGzpNq0POg,732 +torch/include/ATen/ops/argwhere_ops.h,sha256=nA-QJ7XKGbtt8YD3wXA2CnQhS5DxN9UzNmC5SRarPSA,1217 +torch/include/ATen/ops/as_strided.h,sha256=wUrhKUFhKNPg8zaIGq3CGfXUaUUGG8PtGPk54_KZr_Q,4132 +torch/include/ATen/ops/as_strided_compositeexplicitautogradnonfunctional_dispatch.h,sha256=AhnQg49Y4YLSokWXqOfLP8iP1nZ_SiSfPtkOhV3DaO8,1347 +torch/include/ATen/ops/as_strided_copy.h,sha256=CtKlIupFJhHj213e82Fp6ONHTrkV0tnDS6KU3x99HXo,6184 +torch/include/ATen/ops/as_strided_copy_compositeexplicitautograd_dispatch.h,sha256=5kBkiuBTg8sYOXYztjk-V8_R2gUejpgrA6D1CDnxOsQ,1730 +torch/include/ATen/ops/as_strided_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=0cUJbTv-Qw0U5zDFtvSpABbEgkT1-hHIFJW88-fYs7A,1339 +torch/include/ATen/ops/as_strided_copy_native.h,sha256=c2Pp2Wb6cKoamLB9oE9gT2dMAhLzBgo4DXGG76dOS54,1053 +torch/include/ATen/ops/as_strided_copy_ops.h,sha256=LgZ-m1QHzwbzFzMtMKntMrOLNuYfZ5zBLNGRw9W_0cI,2517 +torch/include/ATen/ops/as_strided_cpu_dispatch.h,sha256=U4-kH_sTgIBunN5YXokn_WprFxJXYZylhC1Q2ZWVZmM,1259 +torch/include/ATen/ops/as_strided_cuda_dispatch.h,sha256=eDfgl_rwHq8ugvWhJA3QrSZMflMmgXVmSMtzHZ5k7MI,1261 +torch/include/ATen/ops/as_strided_meta_dispatch.h,sha256=rLGfb9kI-PMVeQNuP4TVl-6XghaAFDxurm6olzH8Ae0,1261 +torch/include/ATen/ops/as_strided_native.h,sha256=fC7uGifTcEzKKbwRdNoHsjYHSkolg24wzsrAHXPtpN8,1402 +torch/include/ATen/ops/as_strided_ops.h,sha256=GoIWysvt1VPdLBm6ogoVxJw3nXMjxSK3nK9a5FFw_hc,2438 +torch/include/ATen/ops/as_strided_scatter.h,sha256=YLigoF9Kw-XMdVICCakVhFmRwLCJ7qE923tCwt2IDPE,6697 +torch/include/ATen/ops/as_strided_scatter_compositeexplicitautograd_dispatch.h,sha256=1upHXfTvZhSrMP8rWZ21dF1Hd6Qepqa7aB6w6YCWD2o,1838 +torch/include/ATen/ops/as_strided_scatter_compositeexplicitautogradnonfunctional_dispatch.h,sha256=J8uzr66aZPTstDIErZHKVCFF7Qzjku6P7Bb4xwIF9gU,1393 +torch/include/ATen/ops/as_strided_scatter_native.h,sha256=aulN12IHKBwp0In-BvNX1E5idPdIsCfzWkjdV3fPBdU,1107 +torch/include/ATen/ops/as_strided_scatter_ops.h,sha256=C0VF4z8kW6pJtdVK35FlPeXB3t0io1XigWBSvkNAudo,2695 +torch/include/ATen/ops/asin.h,sha256=6dZJKY4qGci-jldWDnOKRWrA-a4swl5A04YnEX59IpE,1397 +torch/include/ATen/ops/asin_compositeexplicitautogradnonfunctional_dispatch.h,sha256=pS1KONtDptODIyWb24gDwd6zYWxqq3UU8ce95217Z-I,1091 +torch/include/ATen/ops/asin_cpu_dispatch.h,sha256=TU_cp8cqXXLd0TnQcWdAdyIop5VfjeywdzIvHB6MNLM,1174 +torch/include/ATen/ops/asin_cuda_dispatch.h,sha256=sYh8Y4VSCZDrIeXoD9Ugb1TRiPyImmdL1GvB7KkU83E,1176 +torch/include/ATen/ops/asin_meta.h,sha256=O5kgNxFEMt2e7Y1xEIYhIGO2B3kKa9gbGwGBEVdS05k,819 +torch/include/ATen/ops/asin_meta_dispatch.h,sha256=gGj8XqdzL4KOQ_M1KGbS8hyHLJ52fVo9zliBkBgvKZU,1176 +torch/include/ATen/ops/asin_native.h,sha256=eyknEruGD7pH_F_RW-r7nhqQm-rYZRosKAchUKsA48Q,1252 +torch/include/ATen/ops/asin_ops.h,sha256=RGX5MrYJ1ypFCCveF2MMiISTd_1bGdYfR4Cty0VpU-w,2282 +torch/include/ATen/ops/asinh.h,sha256=B5iPezw69GwhGn9zthCnlgb-PR4wCqx-KM4etx_tpoQ,1410 +torch/include/ATen/ops/asinh_compositeexplicitautogradnonfunctional_dispatch.h,sha256=tA0Ci9Wp9pTHmyQu5KdZht4A8wwVm6GAoR9vFh5kph8,1093 +torch/include/ATen/ops/asinh_cpu_dispatch.h,sha256=gL3KygVUN0VpdOvH3QmVGjCpbnS0LetxoK5MZnpcqSY,1178 +torch/include/ATen/ops/asinh_cuda_dispatch.h,sha256=fcgoxE_B54nYsLDiVp0sWBnwF5E7-KjctvdapzFUynw,1180 +torch/include/ATen/ops/asinh_meta.h,sha256=uu_oPJwLAO80zNWX-YNSHXAuLgGkozoqqfsVMdLkR44,820 +torch/include/ATen/ops/asinh_meta_dispatch.h,sha256=7VJ0tjC6w2_Fa9lMuzpIHSa05LKKMpJlXSUJQq5VcJ0,1180 +torch/include/ATen/ops/asinh_native.h,sha256=3z81vK6b55PFPiN-UB4fxmBLi6dpvh4wVs96P3oAVT4,1261 +torch/include/ATen/ops/asinh_ops.h,sha256=7EfRswjdCqmUf5Tr3ZiGP4IsoiRKuX07HnQOXYRbYNY,2291 +torch/include/ATen/ops/atan.h,sha256=-SJqz5oGrT9HvRgKsmS8SqS7IXD5ol32w8215ZW6WJE,1397 +torch/include/ATen/ops/atan2.h,sha256=1zEyo-XJ40uIovW8ywDpT2DMvDTwYgkwNjn0kNOva7U,1412 +torch/include/ATen/ops/atan2_compositeexplicitautogradnonfunctional_dispatch.h,sha256=692Lrb7ojzHqKgGwo_Stt68QD-C4BEomPM7d-PAHjSM,1145 +torch/include/ATen/ops/atan2_cpu_dispatch.h,sha256=cj6dDror4xzOtToQm5Vw-gCM7K3R9vp4YYaUSjoWknY,1282 +torch/include/ATen/ops/atan2_cuda_dispatch.h,sha256=Ni9e9SPjoVHutlIv8hL0Bc9UKNw4a1j5fxmjbsNEh3o,1284 +torch/include/ATen/ops/atan2_meta.h,sha256=P--U8dOOFN8U_j-FDkO5Ph8h0iS8BomIupQnzvPrr28,846 +torch/include/ATen/ops/atan2_meta_dispatch.h,sha256=Wgbo19_on-VDMBS3UE9ucOdZ9Q0svlvqboVI7awKWDQ,1284 +torch/include/ATen/ops/atan2_native.h,sha256=vMivDfcTyRxV2AuT3HVuqrA70wfPqxN5PAi25nxhQ7A,873 +torch/include/ATen/ops/atan2_ops.h,sha256=Z4Y95GL1FWpzjsDe7khNOhJ7_4_a_2_kNJBOvinm42c,2549 +torch/include/ATen/ops/atan_compositeexplicitautogradnonfunctional_dispatch.h,sha256=F53co3TTVHf_6VdjI5ot-pBoph23Am70UpCTe3r9BxM,1091 +torch/include/ATen/ops/atan_cpu_dispatch.h,sha256=pZl0lgc8um-cj36fSxWUhfXZwf2aiISgexPVxa1TYlo,1174 +torch/include/ATen/ops/atan_cuda_dispatch.h,sha256=BUOsp0_a4krYjeNuuawq-LdYGuPKFhj4sOQJtacMozI,1176 +torch/include/ATen/ops/atan_meta.h,sha256=mLf6Rm97Uuj2PRlSXevn70Bf3Sc4rA6HY0IenQiOTzk,819 +torch/include/ATen/ops/atan_meta_dispatch.h,sha256=23awb09Suck2tJK7_13e8AXn8qOvO05hhW_gw0XX2YI,1176 +torch/include/ATen/ops/atan_native.h,sha256=F48TyFjJBGas9TBbyqFrD_V8Veiz44nDAAL8CJ3Nuu4,1252 +torch/include/ATen/ops/atan_ops.h,sha256=oERuhew2uNIkvGwFI_NxIiJIYdCNMG00D6HJZhTVF0I,2282 +torch/include/ATen/ops/atanh.h,sha256=VZJaifaBgMMw0WKMvYy2zMUlRlBxHGzDtwjTZLD9GWk,1410 +torch/include/ATen/ops/atanh_compositeexplicitautogradnonfunctional_dispatch.h,sha256=aoVfbRzWJ8yo7LkQjQAgodxiZHNSR75YyZnNECFw_08,1093 +torch/include/ATen/ops/atanh_cpu_dispatch.h,sha256=lGWIjCsDc6wnyHc0GHeKb6nKJcdYZQzMG8rvMpyK2tk,1178 +torch/include/ATen/ops/atanh_cuda_dispatch.h,sha256=Ynl5-b8IA0bOpT7DJXhM6PApF2MiaT8TJw6KgckJcGU,1180 +torch/include/ATen/ops/atanh_meta.h,sha256=jOwwN_UxjCWHJ_WuQ7NuGP-RcXrr5i-ezrM9147aIlo,820 +torch/include/ATen/ops/atanh_meta_dispatch.h,sha256=HoqJGAxHmTwxED5N7KpFlWLH4_0T4UVJWzf5o77PB9A,1180 +torch/include/ATen/ops/atanh_native.h,sha256=wKNo6q05YLH7nEO0AV_PpcffS4Yv5oa9BBAZMYjUUy8,1261 +torch/include/ATen/ops/atanh_ops.h,sha256=qXSEXc2cRG8bRy-Ks48xbqQcH1bxxrpeJl0yJa8428E,2291 +torch/include/ATen/ops/atleast_1d.h,sha256=Y2h7FBWO4_ZdnxwkH2n7CFeDPKQFttDw1JT1qK63XVM,1096 +torch/include/ATen/ops/atleast_1d_compositeimplicitautograd_dispatch.h,sha256=cSV_5QNtgEvLGPl67GDLC0vs23zqrIOo2JHxTilNUAM,1094 +torch/include/ATen/ops/atleast_1d_native.h,sha256=qGWk-JixUS2GW_mSwuEnsqIzEdAsIwFAeUu28fNzbWE,806 +torch/include/ATen/ops/atleast_1d_ops.h,sha256=yzKSzeCx6HkC2RHkTc1B6Yp42UC7S8ljja8wdvs8Ziw,1807 +torch/include/ATen/ops/atleast_2d.h,sha256=mzq2LFo5UJjh140DDHNcKEPzV3hX0MSzZWzvNyaMQ2E,1096 +torch/include/ATen/ops/atleast_2d_compositeimplicitautograd_dispatch.h,sha256=9HA8LiiHCm4baPn3MBQhTYLnJXpQUZec_uTB9whnfy8,1094 +torch/include/ATen/ops/atleast_2d_native.h,sha256=ID2YC10s5sZaHUjsDbj2apIB8COPweEREHXMzxsHMuU,806 +torch/include/ATen/ops/atleast_2d_ops.h,sha256=nYVgyh6lO1GPgRVQEeWyfL7TzmhHkD_lat8xpYhrPQc,1807 +torch/include/ATen/ops/atleast_3d.h,sha256=fTcDHZ3EI-auZ_BSG1FUBFheWNq8N4uHnHpRlYf6-sQ,1096 +torch/include/ATen/ops/atleast_3d_compositeimplicitautograd_dispatch.h,sha256=ymjqBMIDFWQaeQy9tBa8J5MjUZnHuKAg3EmO9Bl7D1w,1094 +torch/include/ATen/ops/atleast_3d_native.h,sha256=2DY9kGlI_Zwzo47BV_q4Gjgz-SXcrqTme-wVCEXUdxM,806 +torch/include/ATen/ops/atleast_3d_ops.h,sha256=Rx66_U0cioX8NSPQ4s1xSGGxrCXwENLe0v_ItxEiZY8,1807 +torch/include/ATen/ops/avg_pool1d.h,sha256=GAS9xY3dzNIJ2GPehFWg_oU42MV_XoBeR71nLMDwIfY,2208 +torch/include/ATen/ops/avg_pool1d_compositeexplicitautograd_dispatch.h,sha256=3-Ah5DXwbjPddbzmx0AnsjNLXaN_XsiIfUmtZHT5sw0,1381 +torch/include/ATen/ops/avg_pool1d_compositeimplicitautograd_dispatch.h,sha256=po0kt9Zee6y434D9BmV8e7s_V6QxThEtmDcTdL1jYjo,1156 +torch/include/ATen/ops/avg_pool1d_native.h,sha256=OhtFUdUNC5uIqQUVeJYovj8LTIt12vTSdHQDSJrHHCA,1068 +torch/include/ATen/ops/avg_pool1d_ops.h,sha256=fF3y7aNqFX9a7QNPGYA1CFrNiKRZJRbKqk2Js_56g7E,2637 +torch/include/ATen/ops/avg_pool2d.h,sha256=zzctGWwcWrZFEL6KIf59HWwuyMvCGhv3W883Y6ES3cM,2505 +torch/include/ATen/ops/avg_pool2d_backward.h,sha256=Jsxj5sW6zD3gIhziA-EKNByq9Xm2ibUQ8HaKGic1XuU,2735 +torch/include/ATen/ops/avg_pool2d_backward_compositeexplicitautogradnonfunctional_dispatch.h,sha256=G-nAYYYS6LghwifGh3ZuLISuI02wvCK4qDo7pSNZ9Nk,1250 +torch/include/ATen/ops/avg_pool2d_backward_cpu_dispatch.h,sha256=66mB_AehRWKNj4-vSKo6lHbV2E1fkaTarGmrKhE5QY0,1763 +torch/include/ATen/ops/avg_pool2d_backward_cuda_dispatch.h,sha256=6dPIVB2jOmbjMsIg-IdmC_6dlCLdxLkAHwgDTnxkaNQ,1765 +torch/include/ATen/ops/avg_pool2d_backward_meta.h,sha256=T_nfx1dVnS9aBFrp4msWpjudKDDkKxJ-EI4UNPcxMcg,1027 +torch/include/ATen/ops/avg_pool2d_backward_meta_dispatch.h,sha256=2CfFr-CY9XsEBtx9hDHRTZgm3nz3GM3K7ujJa9VU7qY,1765 +torch/include/ATen/ops/avg_pool2d_backward_native.h,sha256=Pd1ltV_pBxAXjKaixWNRWmcBg9UGcS4JEfBX_Ou3DfE,2030 +torch/include/ATen/ops/avg_pool2d_backward_ops.h,sha256=TP5KSfqcZcJoZk-f7ystcV2VEACZsLzFtGun10ihoZA,3179 +torch/include/ATen/ops/avg_pool2d_compositeexplicitautogradnonfunctional_dispatch.h,sha256=SjBe7jvi6SroirbD0Jgbfoxe_FCw1LAgYuMOu1p9G2E,1240 +torch/include/ATen/ops/avg_pool2d_cpu_dispatch.h,sha256=Fr0c3sjjXUVGXK6k1RylsLoGM1oO6kZurn_tJgK1NdU,1688 +torch/include/ATen/ops/avg_pool2d_cuda_dispatch.h,sha256=htK8eLQ1_aj6bbomIN9NoxRas8Iwbw1AF9yXPqiB_1I,1690 +torch/include/ATen/ops/avg_pool2d_meta.h,sha256=jhOe0UDiJonIpDovNKbSfNX-A-eR9QWStrF0_caOPic,3696 +torch/include/ATen/ops/avg_pool2d_meta_dispatch.h,sha256=RLSQM1VAuzAM1SZ19RVU05Hhi3FQEo88jA-wN9B4Uds,1690 +torch/include/ATen/ops/avg_pool2d_native.h,sha256=CRBYguBG8G4n6y_AnB8YlVjVIEHW1eS5HLFxMdf_3FY,2109 +torch/include/ATen/ops/avg_pool2d_ops.h,sha256=z3mHD10BR9MEjIUDfzofY7MZmkK-WTiuLnDw7dShu9I,2917 +torch/include/ATen/ops/avg_pool3d.h,sha256=pOHOCZfdU02EbBNYScxKtIAaqvVu3Rx8t1HYD29Hk1g,2505 +torch/include/ATen/ops/avg_pool3d_backward.h,sha256=J-JoplellOM4YMYJGH6XxYOtaYjn2TjtPDs_q4TbJiM,2735 +torch/include/ATen/ops/avg_pool3d_backward_compositeexplicitautogradnonfunctional_dispatch.h,sha256=fHCPVhseY42rw4HNB1wfPzrsUVRhnN4c0sQlReSBVp8,1250 +torch/include/ATen/ops/avg_pool3d_backward_cpu_dispatch.h,sha256=QXjzdsDhsrTJsY47iuBJOlS_xxlpic---PuvW_5Cmzk,1763 +torch/include/ATen/ops/avg_pool3d_backward_cuda_dispatch.h,sha256=O3HTIehTjwReRGRDq9eYQCJvnx_danLT_YIj064XMIQ,1765 +torch/include/ATen/ops/avg_pool3d_backward_meta.h,sha256=t-guFOuk1OKRykPPza4QV1ErOITzDteuXCd0JT2lKuo,1027 +torch/include/ATen/ops/avg_pool3d_backward_meta_dispatch.h,sha256=L4y34jkq0CHscSAi-D_lJ3aWEmivEx__lFLPDFxFTa0,1765 +torch/include/ATen/ops/avg_pool3d_backward_native.h,sha256=_FEs7qPPaDLXjIe4cscLmZfE-qXNCahKr-wS_VLbL44,2030 +torch/include/ATen/ops/avg_pool3d_backward_ops.h,sha256=lJ6-lxJ4XpdVKiuvP_n01E3TLrUYdA_gyu5u9dKZ_7A,3179 +torch/include/ATen/ops/avg_pool3d_compositeexplicitautogradnonfunctional_dispatch.h,sha256=vr0DzAinimkzlf6qWuYVlIWFdyuZoVLj71SQd7w1CNM,1240 +torch/include/ATen/ops/avg_pool3d_cpu_dispatch.h,sha256=0omjaNll7JkYCMVZZIvIYThYRp-7n6Uyo3m8lbkugjQ,1688 +torch/include/ATen/ops/avg_pool3d_cuda_dispatch.h,sha256=p4qMEwwGfom8p-C5OGZ55Wk1gDx2vh3RbeM7RNzSSYw,1690 +torch/include/ATen/ops/avg_pool3d_meta.h,sha256=oS2j0t1wsZ-Ggs9qPdGdoiyrevuKP0hN_NhDaL1X5do,986 +torch/include/ATen/ops/avg_pool3d_meta_dispatch.h,sha256=ajLQpnjRtIxPSMz9YjyEOIQCs9yOx7_yx-x8zi6OfIM,1690 +torch/include/ATen/ops/avg_pool3d_native.h,sha256=tciz5tF8OwHbrcSHh3VXlrlbt_4cC9_F1khH0tVuZ54,2113 +torch/include/ATen/ops/avg_pool3d_ops.h,sha256=2UuwBhneqHoU32UPwBQnFfsa-in1XOTjHJxN-7GspCs,2917 +torch/include/ATen/ops/baddbmm.h,sha256=rnbZi1R9Lny3CABJZt_U6fCTTAwcJeo7YAKwvnz8J6U,3230 +torch/include/ATen/ops/baddbmm_compositeexplicitautogradnonfunctional_dispatch.h,sha256=wKXOhmtTSl_bkkls4IUVy6ph3VeMvyRGsvphh4TKilk,1315 +torch/include/ATen/ops/baddbmm_cpu_dispatch.h,sha256=SdfMUkrYPByfx6zkDeIYS-CprSjrKNFbKaTc53Yg1BU,1618 +torch/include/ATen/ops/baddbmm_cuda_dispatch.h,sha256=TXpPDMF5qXu5nw7dVAEenyx_mZ7rvz6aj5CNednlUSw,2235 +torch/include/ATen/ops/baddbmm_meta.h,sha256=jgBmEsntIO-92RLc42kBP987RlQo2ELCjkLCOUiTdnU,927 +torch/include/ATen/ops/baddbmm_meta_dispatch.h,sha256=7t1cJ8xpyTSsnRapiMq1TDjO1Zp8XdPatDTQPw_0Q08,1620 +torch/include/ATen/ops/baddbmm_native.h,sha256=t8PaKQDsNURwvL74Oq6ZhU7kXsiadqFBcK-47GvtAQM,1839 +torch/include/ATen/ops/baddbmm_ops.h,sha256=Q8cSb3m4DefUVeY7wVu2Ea-eOaOcGYgtpwnWMRlo1iI,5384 +torch/include/ATen/ops/bartlett_window.h,sha256=EcWHAx2pNqicPUPWA39vER6JEhKbKMtmfT6uWXD8oQw,3671 +torch/include/ATen/ops/bartlett_window_compositeexplicitautograd_dispatch.h,sha256=iVkQn8joRZw1k6pYXNCfjVvATo-qwQl236TUCHkr3Mw,1960 +torch/include/ATen/ops/bartlett_window_native.h,sha256=ithhbQXMutpR9w3u1R10znm3L-_cL4yPzdGAQUjhl-4,1321 +torch/include/ATen/ops/bartlett_window_ops.h,sha256=KeRzUE3yz-ab79mrzWAW159X6WhUncZeGfwUwHkNweo,4110 +torch/include/ATen/ops/batch_norm.h,sha256=LFi4DCZm_lZ-UEAPcQh1C3Z1vAInCV-3EClwTTFChPs,1375 +torch/include/ATen/ops/batch_norm_backward.h,sha256=Ix3krX6gPn_6ka1GoNXze4hniInBaI4y9jnTnI2hzQM,1609 +torch/include/ATen/ops/batch_norm_backward_cpu_dispatch.h,sha256=Thw7yMxSfgAW4rRmDZmVICF6ttmojf3mGzCE-ZQP-zI,1359 +torch/include/ATen/ops/batch_norm_backward_cuda_dispatch.h,sha256=A92xSMyMeqTSTaUaSe10oxFNvpkhIRzr5FzG_SEjiE8,1361 +torch/include/ATen/ops/batch_norm_backward_elemt.h,sha256=vc2wMSx4kgE0EEVcOkwCkCnNkiHQPMs21SWn6qR9zrI,2611 +torch/include/ATen/ops/batch_norm_backward_elemt_compositeexplicitautograd_dispatch.h,sha256=3otyyE6qzQGikvHxuA-dhTPaVNezovDCqT2U0SCWzfQ,1579 +torch/include/ATen/ops/batch_norm_backward_elemt_cuda_dispatch.h,sha256=155d-60cp5mMW4t9StIIrkrVoIVvFX3OnB_DFHpKnz8,1205 +torch/include/ATen/ops/batch_norm_backward_elemt_native.h,sha256=wsILFVrlVTfv48hHnBQ7tzx8JnYGyYe3fKzwuF64Jtg,1271 +torch/include/ATen/ops/batch_norm_backward_elemt_ops.h,sha256=iREb6jye293XQtvBJYCObr9KeNdHeNEUyaSMDvQZBWc,3289 +torch/include/ATen/ops/batch_norm_backward_native.h,sha256=58zP0Y852N-k4-KpC-7WH5S5CuDJKCGe6oOsbo3iEYc,2024 +torch/include/ATen/ops/batch_norm_backward_ops.h,sha256=15IQ8uCSE4hesE4WJxKnAX6-aNQXPQhq6wioZEjryGA,2466 +torch/include/ATen/ops/batch_norm_backward_reduce.h,sha256=5i2EX80H-ybANCg6RP9_bvZ1Bp8g_Y2E2qp9HUFNnGQ,2990 +torch/include/ATen/ops/batch_norm_backward_reduce_compositeexplicitautograd_dispatch.h,sha256=9aI10F1lQ7fQopytP3-WPmMLRLzqd1R5CWTjlL5ZcQ0,1719 +torch/include/ATen/ops/batch_norm_backward_reduce_cuda_dispatch.h,sha256=QOIQ-1ZFgwUHyZVg3CV07IEd1foVlGquKuRkXFDqy2I,1211 +torch/include/ATen/ops/batch_norm_backward_reduce_native.h,sha256=163855V2OnH39p6_u0coTSPxTTYwLRxbjTxtJLVvdes,1347 +torch/include/ATen/ops/batch_norm_backward_reduce_ops.h,sha256=5GG1OEWLAh-nRB_e6XJynAAGKyZi3eT4dgaurfFqeq4,3605 +torch/include/ATen/ops/batch_norm_compositeimplicitautograd_dispatch.h,sha256=U97fC9tk8J6mw9qaq0nR2WpZKMFR9CX7qQ3Ehyue0_8,1272 +torch/include/ATen/ops/batch_norm_elemt.h,sha256=CqYc72LHO7iq5yi9FCm9mxKanWXtWAjZV1e8LV3pEdg,2146 +torch/include/ATen/ops/batch_norm_elemt_cuda_dispatch.h,sha256=-gOrrAWEUE1LDZBh7opbmsiNbb50BzoxyO32DtF8zvU,1616 +torch/include/ATen/ops/batch_norm_elemt_native.h,sha256=JHtJh340ZK_GgvwJxJk8jb2fEQyBMWlUpmzgRDn3Q1Q,1140 +torch/include/ATen/ops/batch_norm_elemt_ops.h,sha256=KOgVoKZe-NddNNcvxiQBgFknh8cHmB9b6TZhUw0aGK8,2849 +torch/include/ATen/ops/batch_norm_gather_stats.h,sha256=J90Pi9BhzMyv1q21l1ObqIHVGOro2_AQeKN8EYdTL7s,2768 +torch/include/ATen/ops/batch_norm_gather_stats_compositeexplicitautograd_dispatch.h,sha256=CU-WZCQ4eCkXfpnE8dko9fneQRz3ta--7zpkjjhNp_I,1641 +torch/include/ATen/ops/batch_norm_gather_stats_cuda_dispatch.h,sha256=erMlizQQFYtz4lXSWwjrBq7U8luJgR3Wpjv9axE2G8U,1214 +torch/include/ATen/ops/batch_norm_gather_stats_native.h,sha256=-QiU22S_AOUFrCVclH9gFJ6_Q4DoUdi5Cs9s_VT6kUw,1311 +torch/include/ATen/ops/batch_norm_gather_stats_ops.h,sha256=B_F2AJG5mlBP8nNk5Ld9qwlwy-keUwUj4QGpz0ch5Cs,3437 +torch/include/ATen/ops/batch_norm_gather_stats_with_counts.h,sha256=0SZm219jWI0J3QmMrfKxOvBoD12d3tCx17Fc2mu3cvI,2939 +torch/include/ATen/ops/batch_norm_gather_stats_with_counts_compositeexplicitautograd_dispatch.h,sha256=rl9fglm_nFsxlkOCWgUPsqhcWY1mZTWHsGMcn1AnPD4,1689 +torch/include/ATen/ops/batch_norm_gather_stats_with_counts_cuda_dispatch.h,sha256=gHAx_WiKr6R69eNX2uKMeRzD4d3_kjBkC8oqnJU35vE,1238 +torch/include/ATen/ops/batch_norm_gather_stats_with_counts_native.h,sha256=O2znHltp1VMqbAwnZp8MbYThS5KFS6KCXUK1O1hHTmM,1359 +torch/include/ATen/ops/batch_norm_gather_stats_with_counts_ops.h,sha256=kWTLHmVV5JlB1DNZDiicaEyh7mijEVNaHT-kDIN6vtk,3587 +torch/include/ATen/ops/batch_norm_native.h,sha256=DhlN-5nJdZ8t6jRw-9QLGov-SoFCZRfR4yFzfJx1Tbs,984 +torch/include/ATen/ops/batch_norm_ops.h,sha256=S5H5cMyVDvNoG-FAsv3s8cN2QrLsQAwLMn4VaD3WzSc,2035 +torch/include/ATen/ops/batch_norm_stats.h,sha256=a1O45Ft0a3M5C3-7JyG3bRxSLBiXfSDb131rZ326YdY,1681 +torch/include/ATen/ops/batch_norm_stats_compositeexplicitautograd_dispatch.h,sha256=oWcMS63gF6_rWFEzCU32hhgeHZajls6rzDZVALJPUms,1261 +torch/include/ATen/ops/batch_norm_stats_cuda_dispatch.h,sha256=tUArcNzKAK512laBnEdIAoCTR7bWF3BT7e1OXcOv3f4,1024 +torch/include/ATen/ops/batch_norm_stats_native.h,sha256=-rmoHPcCKDPEEZJ4OkOSTl5SACBflyTLo8-gJFALTYY,931 +torch/include/ATen/ops/batch_norm_stats_ops.h,sha256=pD6tFonqozI0Ge_tkD3E6CaPQ8AyhJbB3h_vb0Pg-OY,2205 +torch/include/ATen/ops/batch_norm_update_stats.h,sha256=Z3iMOEL_uxncsA0aqmeDn6MY05UHrwEByzSdMj_ypaY,2303 +torch/include/ATen/ops/batch_norm_update_stats_compositeexplicitautograd_dispatch.h,sha256=gzVw2m52ywuj0Hi16OVNGRo6NPLow6R4nWt4aoydZO0,1483 +torch/include/ATen/ops/batch_norm_update_stats_cpu_dispatch.h,sha256=G110gtSbrjf54bO-HUaUwGkCh3tUJdlvgEp8GYJAyYM,1133 +torch/include/ATen/ops/batch_norm_update_stats_cuda_dispatch.h,sha256=UFmJ6x_bWNh63cVfSgkeTLILdf90Yu4XMyoStq8qWts,1135 +torch/include/ATen/ops/batch_norm_update_stats_native.h,sha256=1rjoRTg3jwuVNsODK9Vl6GN1WgPfCZueOMtLhZTBHic,1370 +torch/include/ATen/ops/batch_norm_update_stats_ops.h,sha256=qN7CflwLSXAjnQAQqKReZxoBvpUdOrqHVcBAzp1DACc,2907 +torch/include/ATen/ops/bernoulli.h,sha256=B0xXToy5r6yPYDIEaCyTZ8pNlOBTiS0Ohr-Vp-BD-I8,3487 +torch/include/ATen/ops/bernoulli_compositeexplicitautograd_dispatch.h,sha256=qxWLxWJOqrGTmc_lFudOAPrinIS7QTRr11Bn9vz4plk,1806 +torch/include/ATen/ops/bernoulli_compositeexplicitautogradnonfunctional_dispatch.h,sha256=PQU6gOYC_HNaDLhlJCLCdKlCidKHTTfqVFTBTXyvNH4,1114 +torch/include/ATen/ops/bernoulli_cpu_dispatch.h,sha256=yibi4VzrAVN1Kp1uzxIpVFMTx4dX1KehEcoQO3JByKc,1440 +torch/include/ATen/ops/bernoulli_cuda_dispatch.h,sha256=ucwS4BbWGFLnAhZ5aBEFyPkDLorVC7k3INu3EkAIXwk,1442 +torch/include/ATen/ops/bernoulli_meta_dispatch.h,sha256=pOz3yuIbZZnP0_w5R1dMoBQQgMrTgw4rqawhVJkS91w,1180 +torch/include/ATen/ops/bernoulli_native.h,sha256=X2BYZoCeV6AG8qbHA1aSxwQou7woAT9ydOJXWAbv9C8,1722 +torch/include/ATen/ops/bernoulli_ops.h,sha256=S8DmmYaRvo1xRC6KeB6npo-kji0tts5qwXY-_Ew19co,6652 +torch/include/ATen/ops/bilinear.h,sha256=FYNT3GohTwwoKL5ODZP0HG7ZJ-TdclUxSf9Yx-o9Uqo,1075 +torch/include/ATen/ops/bilinear_compositeimplicitautograd_dispatch.h,sha256=e3YXu_hWDmorApn1kuLBqWX1KDMCsWDo6_KEkhKgXvs,1121 +torch/include/ATen/ops/bilinear_native.h,sha256=PBrU7BXA-8tvkWY1LKRfRfuFKEie3lifBOafIMQHroc,833 +torch/include/ATen/ops/bilinear_ops.h,sha256=qjaEWwoCBghOTo9Gw0kMcOgLPF8Eak-qtCFjHkIcAaM,1541 +torch/include/ATen/ops/binary_cross_entropy.h,sha256=DCF7LF1HHd19oSDts25qagv9asrXXQElT37AUCqq2ag,1986 +torch/include/ATen/ops/binary_cross_entropy_backward.h,sha256=7RCy4uoQy9PZI2gYJj539lEHPTMv6V1qZ8nm22JejbM,2341 +torch/include/ATen/ops/binary_cross_entropy_backward_cpu_dispatch.h,sha256=JSyYOMegYHYYFqkmCnBzqgT3gLI17XpeHBhWwX6K6Mk,1626 +torch/include/ATen/ops/binary_cross_entropy_backward_cuda_dispatch.h,sha256=wIr-nVSozbeGZwfBpeW34WPF6ZqNcCGR6S91OfV1Xdk,1628 +torch/include/ATen/ops/binary_cross_entropy_backward_native.h,sha256=x4spYwPmveyMQjtEcNWGVrhJYDnKj1B_PCd3ZHtyPsk,1598 +torch/include/ATen/ops/binary_cross_entropy_backward_ops.h,sha256=0xjgIB9_TGuvGTG0jb3qzZffgcpbWuZdcEhqbi53Dsw,2793 +torch/include/ATen/ops/binary_cross_entropy_cpu_dispatch.h,sha256=xxQMdCXt2GZ6D-SgSBiIsu8QIu8tCxH_re28py0ivIc,1489 +torch/include/ATen/ops/binary_cross_entropy_cuda_dispatch.h,sha256=P-ZweLmp1dWSj_VmTv0J4h9KiTwLzA40vVj66cWwXZc,1491 +torch/include/ATen/ops/binary_cross_entropy_native.h,sha256=KgYba0LJtDl7gmw7xJa2MAn1aK2o8u9CVbPVPJp-pFI,1420 +torch/include/ATen/ops/binary_cross_entropy_ops.h,sha256=yVypxWGMmZcwVs81oKaX8Za_tcr68Doq6jC0uVQTXhk,2489 +torch/include/ATen/ops/binary_cross_entropy_with_logits.h,sha256=NpkbQVY1TE5K24xXPY5Lq9TUFS_M8lhue9ufwF-2nx0,2367 +torch/include/ATen/ops/binary_cross_entropy_with_logits_compositeexplicitautograd_dispatch.h,sha256=UQQwtNrIusKed8oifuTq0C8JFJ1lshe8ASKWuPbyFCY,1719 +torch/include/ATen/ops/binary_cross_entropy_with_logits_native.h,sha256=WUGJDzPdDGnCRMD5d8M7nAEIN40etar8foL7UHgFLLE,1162 +torch/include/ATen/ops/binary_cross_entropy_with_logits_ops.h,sha256=2CZZIU74najADjMReDtGY9XurD0FBK74cfQzwNfPN8o,2877 +torch/include/ATen/ops/bincount.h,sha256=zpEwE5AOGA4kzDzu1dc8A7bKgyN45hQjPM6f53wCOSk,4525 +torch/include/ATen/ops/bincount_compositeexplicitautograd_dispatch.h,sha256=qVY8LA1oNcZrro7ZbNTyNLmaMKjibaJ2J85p0R_v8Ms,1574 +torch/include/ATen/ops/bincount_cpu_dispatch.h,sha256=PLY2VvXZPzpup8wyL-JLOQwd9ncivzLQlVqnNs1IabI,1181 +torch/include/ATen/ops/bincount_cuda_dispatch.h,sha256=rQlaxDtxTnMup732yi_5SLFsN0Rz6GB9sRi62UfCyw0,1183 +torch/include/ATen/ops/bincount_native.h,sha256=iqtTp__75jB88uAV04Acup-SkcUFitUXM9K8pS0usuU,1092 +torch/include/ATen/ops/bincount_ops.h,sha256=4X8DRBzXZK6zO65z3PtS75En1VoUfACGNcCK6h33tXQ,2269 +torch/include/ATen/ops/binomial.h,sha256=qGDK6P_X0RzjHwQoO6Cen9B3iqqERlGx7DpXC4Qv2eo,1712 +torch/include/ATen/ops/binomial_compositeexplicitautograd_dispatch.h,sha256=F6-55607MVn2ZoHz8BpOVlDgI1NZkVL1vS4DTfe6A3k,1276 +torch/include/ATen/ops/binomial_cpu_dispatch.h,sha256=ML9WXhZWcO58zDFJOXbuGJk8aLpFMyvv55rdFJRpSDs,1059 +torch/include/ATen/ops/binomial_cuda_dispatch.h,sha256=Rzlyj5xMrm1-2msFyDbdLK0wqonWUhfHGMB4e9_PfMM,1061 +torch/include/ATen/ops/binomial_native.h,sha256=1EMlINS04wgfd1TivQTJsdae4cPhSa0ZASOMrXamUwQ,1117 +torch/include/ATen/ops/binomial_ops.h,sha256=IqYFvyiwEWMPvt1X0_hpc6RMxHoF2RLSyitA3UHKnnY,2271 +torch/include/ATen/ops/bitwise_and.h,sha256=CLnDto9LHTOSQO_mfNQ4rLCw-jdiyCdIb7ujwWaTR0c,3062 +torch/include/ATen/ops/bitwise_and_compositeexplicitautograd_dispatch.h,sha256=5oAHtdrUIRMRgxbKxPsMU_QdpQXnkR8jOrpTn7PfWYM,1654 +torch/include/ATen/ops/bitwise_and_compositeexplicitautogradnonfunctional_dispatch.h,sha256=RRqH3_LwHfq38YDnF4m-8Pwgvv4W_kY3ZC5vkLX-MwY,1157 +torch/include/ATen/ops/bitwise_and_cpu_dispatch.h,sha256=CubvluiIpMCfUj3HlJVgWHipVb5xNjX6PnsLD7Ul0eY,1306 +torch/include/ATen/ops/bitwise_and_cuda_dispatch.h,sha256=30pdrrJIB6LlajhqfCamdSn9AYIHPr2PSPzowCpkX54,1308 +torch/include/ATen/ops/bitwise_and_meta.h,sha256=U8K8WmOvuYdT9S39Gzy9YDYf5fzueWCR789gHqAxvSA,859 +torch/include/ATen/ops/bitwise_and_meta_dispatch.h,sha256=JIzvnJoxHWeY0n6GQ_EWqhkJWcCcvxN5Skz5H2Pjgm4,1308 +torch/include/ATen/ops/bitwise_and_native.h,sha256=U96dGy4rnd3ND4UKMty-61sG3SvfaGF6HLa74-pXVCE,1382 +torch/include/ATen/ops/bitwise_and_ops.h,sha256=4W_wWJAAPAmPg0YyjzMJSi-4SxAAjfl0nBxmq1BKEFg,5992 +torch/include/ATen/ops/bitwise_left_shift.h,sha256=oMcxJpA2P9yuXrRjTCooE_C6LoFlH_0MbNGBj7MStdQ,3300 +torch/include/ATen/ops/bitwise_left_shift_compositeexplicitautograd_dispatch.h,sha256=AKp5xmpr7fAKQZ8__vhqh9s1Wehd684iPPzVcRDjDSg,1703 +torch/include/ATen/ops/bitwise_left_shift_compositeexplicitautogradnonfunctional_dispatch.h,sha256=1t3_VdKZMfYTFuVndXxcJ7EHhxSdlfNsnavpyvzv8Zs,1171 +torch/include/ATen/ops/bitwise_left_shift_cpu_dispatch.h,sha256=UWDDYZT-kPNxL55iUgllZtfTMKc_0LtAGs3bU3fZHSA,1334 +torch/include/ATen/ops/bitwise_left_shift_cuda_dispatch.h,sha256=79OydsP3XTYGf5AFmSpE0hhq-4uUDKdl-fLo71Squ44,1336 +torch/include/ATen/ops/bitwise_left_shift_meta.h,sha256=MULPWugoHVhjYNdFq7jsFmgdaqkIP3HradZ6FTWADUU,866 +torch/include/ATen/ops/bitwise_left_shift_meta_dispatch.h,sha256=B3Qahb2LvZP-FIkMshMfJrH-q_rO-2G2GER8Fnibnoc,1336 +torch/include/ATen/ops/bitwise_left_shift_native.h,sha256=AmYhQHzJb6JBwkh8EBTWxEDQJrKbAIlFGMLIPcnzWfM,1438 +torch/include/ATen/ops/bitwise_left_shift_ops.h,sha256=DIOuexY7sm3VkHrdPorurBKRDCNeUeE9wMWKl0pveDA,6223 +torch/include/ATen/ops/bitwise_not.h,sha256=3cQohMDKPaXDYE0JkJp8RkAlqbc9_khCNaPLrk2hqVQ,1331 +torch/include/ATen/ops/bitwise_not_compositeexplicitautogradnonfunctional_dispatch.h,sha256=U_0i_TRsnmBcy-c8o6sjQrsMG3ayYfCbUOMLx4m0Yt8,1105 +torch/include/ATen/ops/bitwise_not_cpu_dispatch.h,sha256=P86aJOqHlqGt4BcgvxMJfbIEdlfIteDMDOKIZNaUuNU,1202 +torch/include/ATen/ops/bitwise_not_cuda_dispatch.h,sha256=wenskXlaBh2-u9nvfLAbB-InMrvQUitGMJPZcM5LzrY,1204 +torch/include/ATen/ops/bitwise_not_meta.h,sha256=-kKMzUjLBcqaRZe9yZcsxz_ylVHP1hjiPmtQI8_4pws,826 +torch/include/ATen/ops/bitwise_not_meta_dispatch.h,sha256=NlWbzqh8U4bKHuiGjfKy0rLktQnCIbi9PgZka3TX5lo,1204 +torch/include/ATen/ops/bitwise_not_native.h,sha256=rX-_LvhGQ8sW_yUBNOQvAdDdfFkVn-zNFVbu6BGveiQ,865 +torch/include/ATen/ops/bitwise_not_ops.h,sha256=t9kYlpM7xHdcHcudtWbjUn714J0tgUwJQD_PLYUdOoo,2345 +torch/include/ATen/ops/bitwise_or.h,sha256=t5hFHyg1yXrz3hx3HMUka6gk3mxkOaUJDFaocZcqFiM,3034 +torch/include/ATen/ops/bitwise_or_compositeexplicitautograd_dispatch.h,sha256=dvye_yu_Ssr7ka2cU031i9MqerD0RIYxtM7rb6Eos0U,1647 +torch/include/ATen/ops/bitwise_or_compositeexplicitautogradnonfunctional_dispatch.h,sha256=6m83NqXR_FlMI9EYhP2hsQLSDe8AFHC3k6sFf1Ro1EQ,1155 +torch/include/ATen/ops/bitwise_or_cpu_dispatch.h,sha256=xroX9NVDO-bNGw74l-UeHWWQwIjzQ2cb4VZILCtK48I,1302 +torch/include/ATen/ops/bitwise_or_cuda_dispatch.h,sha256=XwYo5OPNzZMi0A-6PTLlqg6aU-f_zuFz4OimrrVChX4,1304 +torch/include/ATen/ops/bitwise_or_meta.h,sha256=t7r4cEqy1i1T8TyxVLOVmsYSGk13RK2xr9SJh-oPdWo,858 +torch/include/ATen/ops/bitwise_or_meta_dispatch.h,sha256=ViNKm8QcwlpYwSF0g2Y2GmF3RAEv0WZ-YjBf6frxAh8,1304 +torch/include/ATen/ops/bitwise_or_native.h,sha256=X1-J9UPXTLgPQYSgGxSxkijM-3jl1-6aQNNyvVotTdo,1374 +torch/include/ATen/ops/bitwise_or_ops.h,sha256=Ec9AlsHaY_UzJDwnu102BDYWTHDaatla1QyYVacz2Ks,5968 +torch/include/ATen/ops/bitwise_right_shift.h,sha256=ZSRJoCZoRYRgpghFYRdc2ynvw8S8FgVu6MNUynu7Oqs,3328 +torch/include/ATen/ops/bitwise_right_shift_compositeexplicitautograd_dispatch.h,sha256=65j4-CNKmDKmTKpvpsaP663aegfkYud7fIMTR21gjXU,1710 +torch/include/ATen/ops/bitwise_right_shift_compositeexplicitautogradnonfunctional_dispatch.h,sha256=6cKQhbj-sKPCs6dsGJKWjHel-hA6jF01IEU2KXt-n2A,1173 +torch/include/ATen/ops/bitwise_right_shift_cpu_dispatch.h,sha256=i5g1QTRgkgxhL2SknTA5MOKDpCCJnkzp6LuJuAl5vao,1338 +torch/include/ATen/ops/bitwise_right_shift_cuda_dispatch.h,sha256=fEmaX4tcc5fb_zfE_G_ApB5FgDmfr7mCh8kznfxGQxs,1340 +torch/include/ATen/ops/bitwise_right_shift_meta.h,sha256=VZv8tNQCJepr_JI6ErlaXPUOtQyqyuHTx8kLAU94as0,867 +torch/include/ATen/ops/bitwise_right_shift_meta_dispatch.h,sha256=RP3QitT4gOr9VZ82o2R0kx285mWCyNR6Ymp42-sSmYs,1340 +torch/include/ATen/ops/bitwise_right_shift_native.h,sha256=j6qgg5CKTZ8M_vFc64mae_DoVm_hcJfri-w9GUvGsMc,1446 +torch/include/ATen/ops/bitwise_right_shift_ops.h,sha256=QYuDcJsQQPGKQ66FB2cQWf2TGAH-hvKnikXaF1Q_nFg,6247 +torch/include/ATen/ops/bitwise_xor.h,sha256=AqyGL6wXyy2ugK8oDDR-OVRlAlrg9FiO54i8RCcayjY,3062 +torch/include/ATen/ops/bitwise_xor_compositeexplicitautograd_dispatch.h,sha256=N6ShDRUxa5WrdUCAoqKYSWkbflXXFGFnAZwl6B2GsrE,1654 +torch/include/ATen/ops/bitwise_xor_compositeexplicitautogradnonfunctional_dispatch.h,sha256=38eTFTo0RP6Sj7Em-5-cxzOykWaYfmWOgnxF8uOkqvY,1157 +torch/include/ATen/ops/bitwise_xor_cpu_dispatch.h,sha256=kPj6XBUAhHpK01y98m4fB7hODoyFGgR4gSPoZsHRVh4,1306 +torch/include/ATen/ops/bitwise_xor_cuda_dispatch.h,sha256=2jJSLVWY0UgT7nYG3hXZcaE49KXBeQ43HyIZiqAOb8s,1308 +torch/include/ATen/ops/bitwise_xor_meta.h,sha256=4JR5wmov_3T8yyuoelc_Y927wRZVq4c7dego6s5P9rI,859 +torch/include/ATen/ops/bitwise_xor_meta_dispatch.h,sha256=o4doeAJae5xyHDJaCJxmM2LGW4TsAgCuAihFAwdYzEw,1308 +torch/include/ATen/ops/bitwise_xor_native.h,sha256=JTZ548ZF52GpEkAiIoJmjB3H4DoeaBT73M5OBfmaU7M,1382 +torch/include/ATen/ops/bitwise_xor_ops.h,sha256=MnweymakQHl3y9b0RU7X1aO8LGl7JTJFqINA43pcu9A,5992 +torch/include/ATen/ops/blackman_window.h,sha256=PJ4BiS7fkTgWl0apKCorR4iwPBkShSCs0QEFt5kexFs,3671 +torch/include/ATen/ops/blackman_window_compositeexplicitautograd_dispatch.h,sha256=aPYzSx0LmDokm3rPloJblKuSdXW-sGOpFDR5HrKd2LA,1960 +torch/include/ATen/ops/blackman_window_native.h,sha256=FNQyxSNQSBVpAh5irIOeAa-izJXkWs3PgKkKBo6YU1g,1321 +torch/include/ATen/ops/blackman_window_ops.h,sha256=-iUzN9oqi0AfgJo6L-vi0glRSaN4IH_n4ZfWcRe0Jb8,4110 +torch/include/ATen/ops/block_diag.h,sha256=Cep1xA7-_a9eLh5NrLfoSlgXpaNHsJDcHIL-6kd12nE,1342 +torch/include/ATen/ops/block_diag_compositeexplicitautograd_dispatch.h,sha256=ZYMRhzAt-9RVShw9E_oW5sfjANvNj0-7HQqrrOBZ-ng,1184 +torch/include/ATen/ops/block_diag_native.h,sha256=rit_2uwtA7HJ_ZAyp1aRuNPVZnN5VIvIXUvLBwaV_Ks,814 +torch/include/ATen/ops/block_diag_ops.h,sha256=JMzfvH6Nbr51898ww9jFzdlxng6FJTcE34ajAI3KZyQ,1823 +torch/include/ATen/ops/bmm.h,sha256=YE5pesQ8-LICeGtu5rwUCKfZwJrQe0KLVYULDNltfrM,2226 +torch/include/ATen/ops/bmm_compositeexplicitautogradnonfunctional_dispatch.h,sha256=ewnx2XAt0IcPK_wkWKKtmepuyJ2aYwIqVbdMneXRpYc,1066 +torch/include/ATen/ops/bmm_cpu_dispatch.h,sha256=H_7IrlmbZpy0GEbX5D2ROi7gSRuqB5AUMDN3O_yZH0o,1197 +torch/include/ATen/ops/bmm_cuda_dispatch.h,sha256=qpStrLwVgPekY8YmvyzPVFm6gGQbH7u4-TdxZ96Uhhg,1554 +torch/include/ATen/ops/bmm_meta.h,sha256=7vvi-eZOa_KSehwvGe2JoCtBORXG2OumHWSTDMDbwoc,843 +torch/include/ATen/ops/bmm_meta_dispatch.h,sha256=bA6Lf-9SSmaQA8NmTSZqHB6bNhYhSV37MpZsE8yJHI0,1199 +torch/include/ATen/ops/bmm_native.h,sha256=3jbVY0aFvauu3JwXCapJCqtc28pf6rm7Y7CUEeHNAXc,1972 +torch/include/ATen/ops/bmm_ops.h,sha256=y0VtT8Uvpj2vsyQ0C2qU0095ePztLntxtK5yZU3x0nA,3402 +torch/include/ATen/ops/broadcast_tensors.h,sha256=JoP7HiuHIYoyXqbDxyjAmJ8Q857aaRJIVR5lEGq2Pyw,959 +torch/include/ATen/ops/broadcast_tensors_compositeimplicitautograd_dispatch.h,sha256=OXMeBBMcXQHsk-Ft353kmJQnuYteb3FxJ0zexnHBp44,1043 +torch/include/ATen/ops/broadcast_tensors_native.h,sha256=q0T5QQa0bFlY6CHaNlkQ22Br6E0vvykNQ-kErS7XY8k,755 +torch/include/ATen/ops/broadcast_tensors_ops.h,sha256=dm2WeOnCxxmONgbID734Lk8PK4qz67MVNAiBsY93qLA,1290 +torch/include/ATen/ops/broadcast_to.h,sha256=xUAhNiHus5FE66lcTbtap3rtky1qIwBtDZ1z4H_iPs8,1705 +torch/include/ATen/ops/broadcast_to_compositeimplicitautograd_dispatch.h,sha256=jMK3yT5Q-9W3CXEKHBSW_oTUraOWY849XK44BqMrD3E,1139 +torch/include/ATen/ops/broadcast_to_native.h,sha256=KDSLk201EBwRnexlAVYjm0XrpsofzAS1-rsg2jmbaGU,769 +torch/include/ATen/ops/broadcast_to_ops.h,sha256=H8AQD-XoKRg2aFd7rAnaXzRWSjSgr5tQjQcV0R4g0Qw,1323 +torch/include/ATen/ops/bucketize.h,sha256=CrAisMsWIsQPwD999GLAFf-r2yR5AX-gGx1kCj1LSXA,2889 +torch/include/ATen/ops/bucketize_compositeexplicitautograd_dispatch.h,sha256=8AlSkC7dBTgN1hyAKqwHvsjYII_msXh0auzx2ba_R4E,1257 +torch/include/ATen/ops/bucketize_cpu_dispatch.h,sha256=bU8i1pR8phE1FOITliaAwa_PmLVq4zqAMxMSqTAOYF4,1469 +torch/include/ATen/ops/bucketize_cuda_dispatch.h,sha256=wZHCh8wert8awZey9TbYhR5KPxwQRD_qGJSzmlxAzJo,1471 +torch/include/ATen/ops/bucketize_native.h,sha256=OCaJ_Xq6Y6kszqdO4-TT9ipjaOq7QxD-7PVVU4dLPmk,1642 +torch/include/ATen/ops/bucketize_ops.h,sha256=5CVTumNf05JifGSCsVRUdHTG5abJVg7pVnXEf7Y4sPo,3851 +torch/include/ATen/ops/can_cast.h,sha256=71vNOsb8uJtHpnn8w4U2gWVHXsOmW3TzP70vMjqiHw8,932 +torch/include/ATen/ops/can_cast_compositeimplicitautograd_dispatch.h,sha256=xwwIEuliU09wyo5A-m2BKy7rWrZ8xiXX-B1__ccpa7E,1030 +torch/include/ATen/ops/can_cast_native.h,sha256=AgwnlPvwSosVqt49JSHq2G0mmxKBinXrV9-IftPYESY,742 +torch/include/ATen/ops/can_cast_ops.h,sha256=xIXV1rmHMZXczKGXp_fXbXhVyB1QBda5u-GTStDu_Y4,1261 +torch/include/ATen/ops/cartesian_prod.h,sha256=M5-Q2uCjPP-0X7ag8A8Ps2qX2uWH2I4hv5y7A_o80hE,930 +torch/include/ATen/ops/cartesian_prod_compositeimplicitautograd_dispatch.h,sha256=vd3MNkCWCabbAC4Cdj1--ThVG8Uz6Zn8Rt0VWXmCYe8,1025 +torch/include/ATen/ops/cartesian_prod_native.h,sha256=mmBRBCffrZfT7yuk1DyKe3FH0UFaozFDG5JAS4Ga7Wc,737 +torch/include/ATen/ops/cartesian_prod_ops.h,sha256=j90wDadDEV--q9-S1sp7zyafjew60LESBHBfmK3Y95Y,1234 +torch/include/ATen/ops/cat.h,sha256=nRl_af61gCbEfIyWfX6Y-klna6QU4RHRKUsnJ9c4uIc,2059 +torch/include/ATen/ops/cat_compositeexplicitautogradnonfunctional_dispatch.h,sha256=alQw12v-X-6Hi696dM_nBlgJT1uj6eJnIwG_vY-rqDM,1067 +torch/include/ATen/ops/cat_compositeimplicitautograd_dispatch.h,sha256=pZFMdtlLNJOERvwAFai56LM2KeEJIxUT4ChLUd1W20Q,1214 +torch/include/ATen/ops/cat_cpu_dispatch.h,sha256=t3bHA5XTrHVOZ9zkq-oLJPHcp5I9diRfHQT6Zs_kZ6o,1198 +torch/include/ATen/ops/cat_cuda_dispatch.h,sha256=4SEMu4cZhcLSm3BSz8jTQ1HvEc8ogEPhKzkIvBM2q7E,1200 +torch/include/ATen/ops/cat_meta.h,sha256=VlMv2ne_DNklqcrQGoRQTDQWKtn1AEDQKXuhF-FeggQ,5060 +torch/include/ATen/ops/cat_meta_dispatch.h,sha256=KPwkwoPyp7FKJvBT4cK12Cly9zvleXTJQJ3EKb31svg,1200 +torch/include/ATen/ops/cat_native.h,sha256=NwRR27UW8qv2dTRhpz5z_Msl_LAKUPKHzcCOJQR6oWs,1805 +torch/include/ATen/ops/cat_ops.h,sha256=BoUzPbrjxNw3HhYU4yy-mZuWuOQND9W8NEPN_i55VDE,3170 +torch/include/ATen/ops/cauchy.h,sha256=BdUIyMufrVKZdcdtycSa5c9yxR7pOq8TjyLP1Q3i0Cc,1787 +torch/include/ATen/ops/cauchy_compositeexplicitautograd_dispatch.h,sha256=MqWVRW9raVK2Px8H7X2QoPtllCZwieulT5zG8OOF8Fw,1426 +torch/include/ATen/ops/cauchy_cpu_dispatch.h,sha256=Lq83Czdk3o1OptTQIevDfVfUF12ILII85d--DAeozQw,1061 +torch/include/ATen/ops/cauchy_cuda_dispatch.h,sha256=p27VKHIPdJ4bO3aaPj55O_-ARbPny9DWmiS46I-xkT0,1063 +torch/include/ATen/ops/cauchy_meta_dispatch.h,sha256=4nxXRVBGeTk_9C4WebFxgl6ukrnojYBjYbXB0f--tbY,1063 +torch/include/ATen/ops/cauchy_native.h,sha256=tWtRqn3-8LBgzbjZfkN9MGdTidUqXy6bGR9FnOyA1Ho,1110 +torch/include/ATen/ops/cauchy_ops.h,sha256=3x6VNCI7BVbuYnPxl4zqzhI_z_VXlR273MVzE7JEpC0,3050 +torch/include/ATen/ops/ccol_indices.h,sha256=MrORAXn8d13FtSy6pNyJrlwrOeybly0_xSA1sGH1OpY,763 +torch/include/ATen/ops/ccol_indices_compositeexplicitautograd_dispatch.h,sha256=cDDpnCkXfXjVfC_ozwJkFNDgpZcOs19C5OWe82xUPno,1024 +torch/include/ATen/ops/ccol_indices_copy.h,sha256=17AXM43zKwwmSuw0oAbMTGDKbDgq73kMXZgnFDrkFF4,1391 +torch/include/ATen/ops/ccol_indices_copy_compositeexplicitautograd_dispatch.h,sha256=iZ8H30ey1RQ9XyY0zbF-Y3CdVZP8oHSQwabAZjAeHZQ,1143 +torch/include/ATen/ops/ccol_indices_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=WX3Aj0RNJpz1tPdGsplgKmiqpO1N6V_okzh2LpW68_M,1055 +torch/include/ATen/ops/ccol_indices_copy_native.h,sha256=jWiE8EgNtDtJkLewzxo53wHTG9oGkudcAuM5FtGUUKU,830 +torch/include/ATen/ops/ccol_indices_copy_ops.h,sha256=ne8hlbcD2XuXFCA5D21a5KW6KjF3xxaBEYewX1sIOek,1867 +torch/include/ATen/ops/ccol_indices_native.h,sha256=JF974sn-ATcW-hgdihkDhoSgCSjK_P5MX3K5W6Ks2Dc,815 +torch/include/ATen/ops/ccol_indices_ops.h,sha256=at44EkIDqFfngxWzvbo7_3EzRD-tg4qRcdNOXEHaVt4,1235 +torch/include/ATen/ops/cdist.h,sha256=iL5d45RRMRSkOQTRE4ZDwBT6BRNfUsWlpN8VQmaa9W4,1037 +torch/include/ATen/ops/cdist_compositeimplicitautograd_dispatch.h,sha256=pBXsj8yog3cQ9cfkrKLFFqg6HiQ8nj1I5JKrsJ2E5Rg,1104 +torch/include/ATen/ops/cdist_native.h,sha256=flat0EyF91YkuiDS38M5UZZPK8qcwN4TInyrxrVkZ5U,816 +torch/include/ATen/ops/cdist_ops.h,sha256=m4G5nSXG6nGcyTMb5JXQ-ykT5LdHG6Ke0Bo3RH4B1_8,1446 +torch/include/ATen/ops/ceil.h,sha256=MZlrN_eZCy8l01wqQWMtGh-6oTCXJF-JH57tFdSgzIs,1397 +torch/include/ATen/ops/ceil_compositeexplicitautogradnonfunctional_dispatch.h,sha256=ESqG0tWQwMmnZ3VPWGke2DPIYIW8TFHIQlP8CrOzoBI,1091 +torch/include/ATen/ops/ceil_cpu_dispatch.h,sha256=XcPCA7xm67Jgp7aKc8RSuSKvLdXPJdnY81ZfYoBDK6U,1174 +torch/include/ATen/ops/ceil_cuda_dispatch.h,sha256=8sLQ4KG3gKTn2SMs6fR2oKSiryfD4mGiEl97Y6Yr1HM,1176 +torch/include/ATen/ops/ceil_meta.h,sha256=iUeIRF6NOMnJU8tC7mBfd1ptLryj0Ge0YF90mLXaV9c,819 +torch/include/ATen/ops/ceil_meta_dispatch.h,sha256=LS39p9XGcg8ZEtX_HwFbqH8MmXgVeurZJNrfkGNENyk,1176 +torch/include/ATen/ops/ceil_native.h,sha256=8V3OfSrNH2aPRls_WtJn4E8G18pzj6l_KdT_SQ3sptg,1252 +torch/include/ATen/ops/ceil_ops.h,sha256=rH-B9IMGmb8ZTyd-T-Ezxem7XUCacUOY4zukuApKVa8,2282 +torch/include/ATen/ops/celu.h,sha256=YI9cBTvXttj5BnX1b3eRKOS4z0J0QMBWKa4yozJNG3o,1613 +torch/include/ATen/ops/celu_compositeexplicitautograd_dispatch.h,sha256=e6fi2FW8mfJSISx9q9IYcnFXR7xyjNShRgczwIl85lU,1334 +torch/include/ATen/ops/celu_native.h,sha256=4DIKLYcIq-5U7kBZH5FdvS1lToV53FCKiE8IFljyg78,939 +torch/include/ATen/ops/celu_ops.h,sha256=E-MukROShG-br6H3QkH8pqDitFUVRmgaIwbPcksPJ2k,2552 +torch/include/ATen/ops/chain_matmul.h,sha256=zyyGGVzI2eN_iHIAPrpU3cFYApy4PP6r4kVXR1YJFSA,1371 +torch/include/ATen/ops/chain_matmul_compositeimplicitautograd_dispatch.h,sha256=LZDPowO23rjc0c1-zkARFLHnq8TZnmK5YzKp_SPESmY,1193 +torch/include/ATen/ops/chain_matmul_native.h,sha256=rMlxporPAKKMdkMI7ohRLq-MZlvqrJNGDNmdfJRnHLc,820 +torch/include/ATen/ops/chain_matmul_ops.h,sha256=HoBLWIluXSfDr7c508vxt0pbzLxdwcAcPe9rITZ-uzM,1841 +torch/include/ATen/ops/chalf.h,sha256=73gO9KgAAnuO-m_4QZfBXC7EpTagK4ezsyObERuXS4o,756 +torch/include/ATen/ops/chalf_compositeimplicitautograd_dispatch.h,sha256=ffBzHy3md47Touge699tOB8jB1odq_fwGQR7TTOm3CU,1081 +torch/include/ATen/ops/chalf_native.h,sha256=YOYoP1QPha3ctTVzyByWHpYvcMca7HYuA7QsWPJisbo,793 +torch/include/ATen/ops/chalf_ops.h,sha256=QnERIcjkeMe80gWW3UAaIJLJFvGTxyNlaiXZm0qPNYk,1378 +torch/include/ATen/ops/channel_shuffle.h,sha256=nxFwNSgOS_oGczkr7i5tPzbWSMTQWhJsQugHvMw7v-E,3820 +torch/include/ATen/ops/channel_shuffle_compositeexplicitautograd_dispatch.h,sha256=_zPnnmChxjcyqxS_D4pQIQ2G7mjn2ZlPAEPc5-DwjTM,1400 +torch/include/ATen/ops/channel_shuffle_cpu_dispatch.h,sha256=7DXG7HBcAQgWgPV7O0ock0eQEsuXdPhtiwSSGg2GSbU,1089 +torch/include/ATen/ops/channel_shuffle_cuda_dispatch.h,sha256=IazzCupurAWVn-TO-RJsPzer3J2FohryAIf3gh4YhOI,1091 +torch/include/ATen/ops/channel_shuffle_native.h,sha256=T6ybPlxvYtuK6GU_lPCskPxhVVHgTF4jU6izLumjuIU,962 +torch/include/ATen/ops/channel_shuffle_ops.h,sha256=2RZPliQ-ZeEOcizh8KEaDDRfQhfNcydx_3tQzb5ks4Q,1991 +torch/include/ATen/ops/cholesky.h,sha256=Uaij77awWE2Ot4geSe-QcHgyH05pkp9pP3er_EBbHm0,1424 +torch/include/ATen/ops/cholesky_cpu_dispatch.h,sha256=4sqoTMBPLYatr7pJyhRnoA6bCukT0GifU1SyfE0dHSQ,1185 +torch/include/ATen/ops/cholesky_cuda_dispatch.h,sha256=ybDa9JiGC8o1lNcHsRWvA2RIIxrniNSlgCKdmPW6krY,1187 +torch/include/ATen/ops/cholesky_inverse.h,sha256=vQctG1lXwosH6Zue4rG_axx8Dnus5A6tsyuqPRzES8g,1504 +torch/include/ATen/ops/cholesky_inverse_cpu_dispatch.h,sha256=K6-_o3HxbnZ-xZd7qmKhpr_-PKaK-dxONirdojaj38U,1209 +torch/include/ATen/ops/cholesky_inverse_cuda_dispatch.h,sha256=t1QWaKsQLaECeDi9b9XC4dRhAjQ1V4ut6JA-oVDSAm4,1211 +torch/include/ATen/ops/cholesky_inverse_native.h,sha256=vg-HrtoYqPxfNYZ1YKRWMx9mbcwThGQ5PwTZ7DydjbA,858 +torch/include/ATen/ops/cholesky_inverse_ops.h,sha256=_B8IvLKeTQKb3L5hixxtPFCBRj1eoa7nnGaEz5H4yy8,1957 +torch/include/ATen/ops/cholesky_native.h,sha256=cRO2WioemDedhUwnyY1tpwgUqzgZUJ-LvbC_QD_qH0M,842 +torch/include/ATen/ops/cholesky_ops.h,sha256=kHUGK6p30wpjYid1E-arHZMeep63hvJMTXdZ6HLveNc,1909 +torch/include/ATen/ops/cholesky_solve.h,sha256=NxFAUNS0fwuBwiK0l96D5uAFJc6EO-unoGvZL9Rd3jo,1634 +torch/include/ATen/ops/cholesky_solve_compositeexplicitautograd_dispatch.h,sha256=bWQ2HdHF6fm8dU0BeOxtZdTmwuDsWJShRpXkD8zv21g,1328 +torch/include/ATen/ops/cholesky_solve_native.h,sha256=sF3hXLhlwzX1DcCIn4ci52JFuHayrINlQRJKUChGLAM,908 +torch/include/ATen/ops/cholesky_solve_ops.h,sha256=FOc6SIqOTkge-qjztG8h_NowBx3XMhlIBQhI1uoUz04,2123 +torch/include/ATen/ops/choose_qparams_optimized.h,sha256=9gYjgTdh05Ja3Z47oBpaZSsAROZAfoABhRiShk4Zep4,1149 +torch/include/ATen/ops/choose_qparams_optimized_compositeimplicitautograd_dispatch.h,sha256=jzMyOWmFIVMzBYvpHS0UBsVpssmK9IzQdOy5v6OXv88,1126 +torch/include/ATen/ops/choose_qparams_optimized_native.h,sha256=oyMpO6bW5uEQI-YGpGHcqaDFWeZy4-JqyEeFfrmcPh4,838 +torch/include/ATen/ops/choose_qparams_optimized_ops.h,sha256=L_s7Etg6S2ajIJcsnrZHkMf_ZLeKmhipiA_2qk6cZFY,1567 +torch/include/ATen/ops/chunk.h,sha256=di92a3s7psLitFXkeDnjxIeeUUQxbjqpCfho9HHbP44,982 +torch/include/ATen/ops/chunk_compositeimplicitautograd_dispatch.h,sha256=kBhiQa73y2mOFJgygD2kNvVFcO2xQx-TzXRfUW1vRAA,1063 +torch/include/ATen/ops/chunk_native.h,sha256=w1NwgHvt4j-bVWJBQnPz2NDP7a_SPyIQaKJNpNan67E,888 +torch/include/ATen/ops/chunk_ops.h,sha256=I0tHF_LYU3PRK4QQ_XwofsxhrZ7mLUDMQbGuRKG0xpA,1365 +torch/include/ATen/ops/clamp.h,sha256=UjXuzQ0rQ5D9rX0eOACfToNSlFfzc0XIMs23eua1DkM,3208 +torch/include/ATen/ops/clamp_compositeexplicitautogradnonfunctional_dispatch.h,sha256=n6YpO8bwivt-zEz-fIB8mUlqPQe0Y2nO7eJfYO03xLk,1566 +torch/include/ATen/ops/clamp_cpu_dispatch.h,sha256=PfM0xYbc1KvJ_02tJV5di2Z90d468QWCwInaoWNSGAE,2155 +torch/include/ATen/ops/clamp_cuda_dispatch.h,sha256=PQJ_ue1XnHv_apNUTV6haBEirNZbM6HxkgyUejRXnOQ,2157 +torch/include/ATen/ops/clamp_max.h,sha256=o3wVpB2NXwKWEQK2t6eeQ_-3JVdtyzZs8OjF77kNCNA,2549 +torch/include/ATen/ops/clamp_max_compositeexplicitautogradnonfunctional_dispatch.h,sha256=ie0z3Tye2m4vSMwWGngxVCd3y1HYipBORB0Oc75o5b4,1308 +torch/include/ATen/ops/clamp_max_cpu_dispatch.h,sha256=At_nCxGYaphAWyp_w-Tmsk8bJjeXUGcAv3REtTidFyI,1660 +torch/include/ATen/ops/clamp_max_cuda_dispatch.h,sha256=DVRXnKqGD3zERN8HnZPwmMLgy_7MciGlTMpHTM00jQc,1662 +torch/include/ATen/ops/clamp_max_meta.h,sha256=9hHVBEOfmV_ij_ebRX8xIOhMZ7vrBXJFbpJC5fiRJUE,992 +torch/include/ATen/ops/clamp_max_meta_dispatch.h,sha256=EDbmTNOE2EGTzQBXWxnwzhkxnmfUyGfn44FCt6Hay9M,1662 +torch/include/ATen/ops/clamp_max_native.h,sha256=dtVsGAXFhlmUj6Ygzim_D2wFjgcNr7j27e8zSvjN6Ik,1068 +torch/include/ATen/ops/clamp_max_ops.h,sha256=aoyJor9rPU_AAubt8zg1xITFEZ1PQr_2VU5uDlIDlbo,4484 +torch/include/ATen/ops/clamp_meta.h,sha256=Ds3LVlaysfz2ifWHtz9CeVlbtJjKIUTw7V8YxLFCeMk,1044 +torch/include/ATen/ops/clamp_meta_dispatch.h,sha256=0SejF_mlB6RvOOF5fw4FAIE6VVURJ-UqPwyAfdIPOu8,2157 +torch/include/ATen/ops/clamp_min.h,sha256=BnxkOAUPJ22OCQxJXd7JiqIj69_oPRVR100zX_cD7S4,2549 +torch/include/ATen/ops/clamp_min_compositeexplicitautogradnonfunctional_dispatch.h,sha256=YTVWNqV2kSnRehIgJgudxzq0bCXdExG4ygEy5oHphBQ,1308 +torch/include/ATen/ops/clamp_min_cpu_dispatch.h,sha256=TuWQLiy1LK56pDowJMELZGTlKfrrSFncswIM5sEHnd0,1660 +torch/include/ATen/ops/clamp_min_cuda_dispatch.h,sha256=3vXAxTpXxhzYhEBWOlQq60Mhz3DtRBiY5qx22SWHKg0,1662 +torch/include/ATen/ops/clamp_min_meta.h,sha256=U2F4AF2a9goEe0GdBUX98HAJLra1YUcM8qNZd-BdVDg,992 +torch/include/ATen/ops/clamp_min_meta_dispatch.h,sha256=AXd_XLt2rSTQymwAUXpUzQPOdcl9v9qsMovL0TCDIJE,1662 +torch/include/ATen/ops/clamp_min_native.h,sha256=GOGe1C_U2EPdS5vVcbQGXg77kTpYcFP53_tdRXC7vzc,1068 +torch/include/ATen/ops/clamp_min_ops.h,sha256=FL5-taE7AEWGR-yxjBROrNhxE_5pCVFyRXHp1Ftclc0,4484 +torch/include/ATen/ops/clamp_native.h,sha256=mEKETr2TkqT2rEaLlc7uLaVEvELBoI7Dr_P1coUxwU4,1287 +torch/include/ATen/ops/clamp_ops.h,sha256=H3sSF5XmbjkphNtc3my4rYbCGKbySr4YG_5RiFSw0R8,5576 +torch/include/ATen/ops/clip.h,sha256=3V16PBHRjwbL9wzdqltDmelX5wGauKlWQh3O6VUwckw,3183 +torch/include/ATen/ops/clip_compositeimplicitautograd_dispatch.h,sha256=oxTmHj_LAts0BA-AeXK-I5eaVjKHKR7_YVAPifoxRg4,2191 +torch/include/ATen/ops/clip_native.h,sha256=g02MmUoCVfZm9yT_tgU4fFFuhURIkYGc56sl1xanMwE,1594 +torch/include/ATen/ops/clip_ops.h,sha256=BMe1Eug03Rd_tT5LNVHWLUhsYJnGelGggU8BVmpjZtk,5558 +torch/include/ATen/ops/clone.h,sha256=Je3kkQsjxF8s81wb04JH5JdTuHyEyNiEm5WVIF83lwY,1598 +torch/include/ATen/ops/clone_compositeexplicitautograd_dispatch.h,sha256=rsm9snOz_SL9yq2hyPNB5_yAZfy9uubUmtpaQYjo-l0,1349 +torch/include/ATen/ops/clone_native.h,sha256=E4-AIzJAnFDZpb3BjJM_OarNr98sONJCB8zEz9uuG30,1553 +torch/include/ATen/ops/clone_ops.h,sha256=ACo6tfe7mU5hFS10nsTEH-ncIFl72a3yoMfDy7f_BWQ,2132 +torch/include/ATen/ops/coalesce.h,sha256=HUkBjCZQkbHlMqAEYxB10EAA23R78zYeuV1PNzXMmo4,759 +torch/include/ATen/ops/coalesce_compositeimplicitautograd_dispatch.h,sha256=6Fj3vK8f-ZEBSu5coJDVDp_WBAGncjA3MLz8zhwnzI4,1020 +torch/include/ATen/ops/coalesce_native.h,sha256=yNALkZe7lLS0KsWXyhWjZ5QH3cQequU5QqccUw-pkKc,732 +torch/include/ATen/ops/coalesce_ops.h,sha256=Auzn3fDPZT_VNhDZXrCO2RyfKUF9N2PcSAKFdqh3GY0,1223 +torch/include/ATen/ops/col2im.h,sha256=XUy5OcXDjvF4ksnYcAxHnm2j0cyo9-PgE_f92tJAiPY,6097 +torch/include/ATen/ops/col2im_cpu_dispatch.h,sha256=ACKydLEcP4Bs1gr0xyGkYJku9YYXKZh-j8uXG-EUohY,2173 +torch/include/ATen/ops/col2im_cuda_dispatch.h,sha256=8RPo9Y6xqy1jF7b5o179NQfTpjt-eaGUh4DWhz--6Jg,2175 +torch/include/ATen/ops/col2im_native.h,sha256=D2HQeIPCJdCp2sKqGEeXVRfdzre7V_Dq9biCP2JG45w,1490 +torch/include/ATen/ops/col2im_ops.h,sha256=Fg8Tn2LvYSSg3v-p1acri_GpILMVkwPqFWcDCMdcP8Q,2709 +torch/include/ATen/ops/col_indices.h,sha256=UhTewJI5Tpahhah9dPtO7BU67xBGt7LIkK59l4AaPZI,762 +torch/include/ATen/ops/col_indices_compositeexplicitautograd_dispatch.h,sha256=LS3kwnTww5m3Efh1zoVKFlQXwdmEZDfKR7I27Uac150,1023 +torch/include/ATen/ops/col_indices_copy.h,sha256=qbGGfEICE83iwHB8puIyOP42da9aJLGz9LRH_qmd2MI,1381 +torch/include/ATen/ops/col_indices_copy_compositeexplicitautograd_dispatch.h,sha256=KpAD3-aDYpp0EbXjcajvLqRFOFrbiDHLtbp173yN04Q,1141 +torch/include/ATen/ops/col_indices_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=kyvz9dAp3ANmLT_wZ7U8HFop_HMNhWEwTTTOlK0NmJU,1054 +torch/include/ATen/ops/col_indices_copy_native.h,sha256=jG5QInHHTj01b5Czda3_Hmy--j0lcq9EawEm5Mc0GZw,828 +torch/include/ATen/ops/col_indices_copy_ops.h,sha256=uITUMZ_j1lJ0_ae2EU9yhcC6DagGLwH5dMm0PwcWrH4,1861 +torch/include/ATen/ops/col_indices_native.h,sha256=tfghsI3m7QDgmCfVBJW8qLXwmWnaMZduzq_tYDtpKAU,813 +torch/include/ATen/ops/col_indices_ops.h,sha256=j0PeK4q8gFkUj4u-0l1QSlR5Fj1wsXtedcIhUNo04BM,1232 +torch/include/ATen/ops/column_stack.h,sha256=KDwlnOJFAZu7H1oMOPBr0ODH8fSKCmtfwJi6Xqu_EJg,1362 +torch/include/ATen/ops/column_stack_compositeimplicitautograd_dispatch.h,sha256=Vyun0VsVMi824UCKMMajcF6N2T2y8xEl8iYDcWDXQ5E,1190 +torch/include/ATen/ops/column_stack_native.h,sha256=BaW-d9f7JNXtnMfpYwhMdpyTqlrr-tC2dGGevCFHqiY,818 +torch/include/ATen/ops/column_stack_ops.h,sha256=eiVJjA_LdFlQYYxVRpp5SAGb0oZEFOPnjNTCBcAXsaQ,1835 +torch/include/ATen/ops/combinations.h,sha256=ro260zW4yd2SzHmHruOTgoay7DpW9u9K7-fD5GvMVs4,1016 +torch/include/ATen/ops/combinations_compositeimplicitautograd_dispatch.h,sha256=Rw5CyWsTL-m7flEDcRaS8BRQ0JklxENDIwU5V-ZpAbQ,1066 +torch/include/ATen/ops/combinations_native.h,sha256=R9nmXYkuCtUn9glitGGX5MSkU2Ot91vIwov39_aIkLg,778 +torch/include/ATen/ops/combinations_ops.h,sha256=p6GZTECy97kWxlSuyCk6mTecSovhW2AKmWQRJ1ncz5g,1350 +torch/include/ATen/ops/complex.h,sha256=DXkvUGeeVO_Z_Js2XQbFOt_w8LKwWHEF5z789oj_SIQ,1423 +torch/include/ATen/ops/complex_compositeexplicitautograd_dispatch.h,sha256=1dLCA_gDslLar-c3caO9G5ZEsvptzhwAFSpCxdiIq8M,1044 +torch/include/ATen/ops/complex_cpu_dispatch.h,sha256=6B04wdf3hbB0r2ojUWNR9sN5uIibNcYrpJj4Y2LEjkg,1129 +torch/include/ATen/ops/complex_cuda_dispatch.h,sha256=QCWuckNTjNDS0gttroxxLeXtFMLwAXevmTNHJewh_ns,1131 +torch/include/ATen/ops/complex_native.h,sha256=g4fyHkZ3AL7DgNSNl5twLCJevcr7FHYrIg1XG0XJXiQ,860 +torch/include/ATen/ops/complex_ops.h,sha256=XCIxK4uKqqPWgk9A-nhb8lu8zgo1xrjT3ippEfS0_-8,1973 +torch/include/ATen/ops/concat.h,sha256=4v_e0sFmmk7uIoe9W2N-wotSLRUkf0RZaqhLArDe-g4,2080 +torch/include/ATen/ops/concat_compositeimplicitautograd_dispatch.h,sha256=CJlt-qaz3Oz0z8agLvnDfpk7jMb015-DFwF_OnPEsLk,1474 +torch/include/ATen/ops/concat_native.h,sha256=XUHM-P5zogIM1J03CAmsphRkk9WDeVkSasBZaKvD7fc,998 +torch/include/ATen/ops/concat_ops.h,sha256=KUrbZ3dmCW3omeERK2wdHGX1eSpPl6QpTKW9pcjNd4Y,3134 +torch/include/ATen/ops/concatenate.h,sha256=sLzqg5d2Jn1H-tI0GpOw6jYH8es-DBdpmCPCqlh1xck,2175 +torch/include/ATen/ops/concatenate_compositeimplicitautograd_dispatch.h,sha256=MwaIQqoOt7WrfcHLrUU5s54t9M7v86DgrUCEM2upRLM,1504 +torch/include/ATen/ops/concatenate_native.h,sha256=I6OCO3zr5e4sZPkP8xD3Pxoy6fE7xJTsGSn3ixWm-eg,1018 +torch/include/ATen/ops/concatenate_ops.h,sha256=B64nL8t96vzEc9BIQpk30QZDdMjJQKxkTDKmDzAGHkY,3194 +torch/include/ATen/ops/conj.h,sha256=z5HYNIiMQFMMuPuSqQT3hNTA35iCEdiObeJkl8isvQ0,900 +torch/include/ATen/ops/conj_compositeimplicitautograd_dispatch.h,sha256=xaucZb3n9arlmBnnY8PS0G3m-DjQ_jM9QTk-ICKiICQ,1016 +torch/include/ATen/ops/conj_native.h,sha256=lKC1hFYihoj38yKKuTuvZAH1Smr7RK5v_wzRRI7rz2w,728 +torch/include/ATen/ops/conj_ops.h,sha256=dPIJq3gmsnkhqRFOotc2nRHDGMUdRG7MsDv7OznDAps,1211 +torch/include/ATen/ops/conj_physical.h,sha256=UB4Rsu_3y73FI7AFwvtADdzEu1H0pXZ6aX1vVeJAGfU,1514 +torch/include/ATen/ops/conj_physical_compositeexplicitautograd_dispatch.h,sha256=wBzpRJexVfkRRQK6PJ-dAqK3FJsCcXq1BB-WLgy7w98,1022 +torch/include/ATen/ops/conj_physical_compositeimplicitautograd_dispatch.h,sha256=ZFAdnLbq8GILHntlz1E44zUvFS11mk5u8DaeGmp2oyc,1025 +torch/include/ATen/ops/conj_physical_cpu_dispatch.h,sha256=xeWO_OvjgFG6uXC1wAYCCwtfSDooRiI_v96_zX_o3rY,1091 +torch/include/ATen/ops/conj_physical_cuda_dispatch.h,sha256=GOXaMFwmxZoPe-MCpSozemHfBp5ZNVCVhJh0VyOQt3M,1093 +torch/include/ATen/ops/conj_physical_native.h,sha256=GJDM-LZM6olX1S3WgwBcaqbIGxOL9etcgUtedQavEmM,1137 +torch/include/ATen/ops/conj_physical_ops.h,sha256=Kfej-QviSIPW9R16f7dozlD66lCIIphtQxEBTk2HjyA,2363 +torch/include/ATen/ops/constant_pad_nd.h,sha256=tky6JL56A-gbgo0p08GyhUSF_P-aktrLK3wlu88FEmQ,4502 +torch/include/ATen/ops/constant_pad_nd_compositeexplicitautograd_dispatch.h,sha256=9dBNnQvGLW-1W8iIqfjNHf1tv0L8G5Dn1AHkAPQFI-0,1763 +torch/include/ATen/ops/constant_pad_nd_native.h,sha256=IgjF-9RxQY95X5DMQ4d2yXEQYV8av2zFqfrYMpZtQBI,933 +torch/include/ATen/ops/constant_pad_nd_ops.h,sha256=iJqA0wExUBh8R-eRVniRzwZH_F9kYOkg3gM0GM0EHqU,2201 +torch/include/ATen/ops/contiguous.h,sha256=sEXG0CvdIqvTB4SJcgg_LVUyRL_hy4PmR7tyYPDQlao,761 +torch/include/ATen/ops/contiguous_compositeimplicitautograd_dispatch.h,sha256=Um986pl2vq-sZXPZNft5CIPVOk0uZiYKyXQzxExmkPA,1084 +torch/include/ATen/ops/contiguous_native.h,sha256=BC66UB4__Kuarfp-TDKdf49OET07QmJPxj9NlUuUrs4,796 +torch/include/ATen/ops/contiguous_ops.h,sha256=SU_Ieb_PAYowdvOn6gr3jrf36A_c_dJa9jcz-0sXVV8,1360 +torch/include/ATen/ops/conv1d.h,sha256=FpB3TnHXPpjvGvz6mKCcDnzuQXDZHtWwzQmLrPNzzJY,4774 +torch/include/ATen/ops/conv1d_compositeimplicitautograd_dispatch.h,sha256=E1kVxz-w09ZpFgZRC7gDQk8fYOXt1idJpnH8x8wakQ8,1950 +torch/include/ATen/ops/conv1d_native.h,sha256=pVJgyZkymCYvP_cvZhow6Ot5IXrQk8bXMdGTObdI-7c,1250 +torch/include/ATen/ops/conv1d_ops.h,sha256=umiymGU3Y8XrvBdzLpu5E_07LxclbKbhZknidJEjd5E,2931 +torch/include/ATen/ops/conv2d.h,sha256=CKXkJEMnUUPuiqVO4CwHGJbN-1-L1eCoMAefZDz_UP4,4774 +torch/include/ATen/ops/conv2d_compositeimplicitautograd_dispatch.h,sha256=HqsZ03dpQHCBFob6YuHiHWiW5irldJAXo3S4RspeqXE,1950 +torch/include/ATen/ops/conv2d_native.h,sha256=DDiIEflW4T-JigaF-dVM6mNtHu-YQNGmPWMH1-WKAF8,1250 +torch/include/ATen/ops/conv2d_ops.h,sha256=vrRBzu0Iy0kg3zkWxf1APHpZEn5xAk7Nntp-sYfUjQU,2931 +torch/include/ATen/ops/conv3d.h,sha256=e-2yGUt_74wueDE8ypyZ3er--3dxfxyZJ-60478MU-o,4774 +torch/include/ATen/ops/conv3d_compositeimplicitautograd_dispatch.h,sha256=rzC71YCme2QyW4gBsClhLYLSy5fRN7EA3lbSikpRQXs,1950 +torch/include/ATen/ops/conv3d_native.h,sha256=yXo626lnS_W5cPKADvePTtw87q4-Ejg3P6kVJGJ25g4,1250 +torch/include/ATen/ops/conv3d_ops.h,sha256=QBbDlg0mIWC68zezA2tchNdVjkWQIhqS0xpr-9OYd1s,2931 +torch/include/ATen/ops/conv_depthwise3d.h,sha256=xBLhCJAeR4u9tFpFhcPLj6-FnONlqYAt1Tkbl_FOh3w,7547 +torch/include/ATen/ops/conv_depthwise3d_compositeexplicitautograd_dispatch.h,sha256=PFn8ZwTtl5-p1t0srlrT0adDmMAlC87osa393cUTHAA,2056 +torch/include/ATen/ops/conv_depthwise3d_cuda_dispatch.h,sha256=oIvIzaDEozbkqL5gN-2XPYW9I5rL0DUHKXqpbXxsz2M,1419 +torch/include/ATen/ops/conv_depthwise3d_native.h,sha256=nqfOk9kjlW_n2WZNrNM8XsbxKHPHbtqIntfEykq-1k4,1202 +torch/include/ATen/ops/conv_depthwise3d_ops.h,sha256=1uSsEuesUy3mi7aRrvjv7M-DgFKd-1W9SA8VoN1rAQ8,3117 +torch/include/ATen/ops/conv_tbc.h,sha256=6YlWDXf20HAJFZ71ZTgAuWHFX3AOsrd7DhbcL8sRhlU,1674 +torch/include/ATen/ops/conv_tbc_backward.h,sha256=anLSiBIum1LcjCJw2y_w2jX0FoGGkwd_PrHWQ4JWcwI,1157 +torch/include/ATen/ops/conv_tbc_backward_compositeimplicitautograd_dispatch.h,sha256=J-VS2dIXFgdAzkkBI-TYIKE6qz-BI6YtH9w73bJCwpQ,1156 +torch/include/ATen/ops/conv_tbc_backward_native.h,sha256=lC4eZS70oacOuU4ruvttcQat0qFIQosT8bm99PETjpU,868 +torch/include/ATen/ops/conv_tbc_backward_ops.h,sha256=w3uk8PGyiWD7nsGBfhLONWrXR21pcS8VEU6dnCgFZAg,1672 +torch/include/ATen/ops/conv_tbc_compositeexplicitautograd_dispatch.h,sha256=_Ojd5y8COZimt6BdZ3zkOS_nNA-i_8b1H48avSE_r0g,1380 +torch/include/ATen/ops/conv_tbc_native.h,sha256=6SG095g4Gs4K1xEY-SBin3Ep-LLLNhrwfuERYWVE-5c,944 +torch/include/ATen/ops/conv_tbc_ops.h,sha256=XiCJlEdMJaHkU1vccCVQJsn_JBy9uNJOq_fbkffABUE,2249 +torch/include/ATen/ops/conv_transpose1d.h,sha256=JAhJir3ep1UJhFG3LZ5QAOQcUKCtquxGnkALkFBaHPo,3261 +torch/include/ATen/ops/conv_transpose1d_compositeimplicitautograd_dispatch.h,sha256=VBdDHmztns6YRTS7rRUtiSCzokMS2-aXHlzAPPwFG-E,1583 +torch/include/ATen/ops/conv_transpose1d_native.h,sha256=u07kTTj_qQjn36zgYJLoZGoPlxJUVd82HwWkKzjj8aI,1025 +torch/include/ATen/ops/conv_transpose1d_ops.h,sha256=IktNQ2WYCMxL4LNlBZDSBzh0UJcY0y2jGs1sYYHxQaE,1964 +torch/include/ATen/ops/conv_transpose2d.h,sha256=uvcepvf_-rKEnkFNHsp0fMAEn8OaHOLuwEt_q2vd_0s,3297 +torch/include/ATen/ops/conv_transpose2d_compositeimplicitautograd_dispatch.h,sha256=40UtjH50BGmUiNtwXPug-CrrJwIklUNrl9UHig74oos,1583 +torch/include/ATen/ops/conv_transpose2d_native.h,sha256=BdemX3ANVwnMwKqpZRyoKUxFHbv8bNuvWxHCzNxmKas,1025 +torch/include/ATen/ops/conv_transpose2d_ops.h,sha256=OXLGzbUYWL6yMHzrdTQ5bfEpA4dxAq3fL743GdnckWE,1981 +torch/include/ATen/ops/conv_transpose3d.h,sha256=vyMBb7wZLXd1rVyHijWNrcttWiZ178_vscrKmI69q_A,3297 +torch/include/ATen/ops/conv_transpose3d_compositeimplicitautograd_dispatch.h,sha256=JTWuU6fcvfl6wFZ_m6PFWihHTgvs3hIcvxIv6XjH8A4,1583 +torch/include/ATen/ops/conv_transpose3d_native.h,sha256=6Y4J-kElFHC9b-LhJyTOZDEJZNUu8uyVuiINAACXHIw,1025 +torch/include/ATen/ops/conv_transpose3d_ops.h,sha256=XwwUK4P9gUFVU3qKqk3dMHjy07xtScGfoYPQMCZ7fXo,1981 +torch/include/ATen/ops/convolution.h,sha256=T_AT68SB3_vUgd3p9xaF-YLIWzqZ5nqy1OLG-s5xfJE,8340 +torch/include/ATen/ops/convolution_backward.h,sha256=B2ni9MyJiW9OTZtKzR7tdAXDtnUUhMYTkC0G1MUzu7U,11741 +torch/include/ATen/ops/convolution_backward_compositeexplicitautograd_dispatch.h,sha256=nlvEzclraYLJFFH6D6OYFeXqrJdPV2oa68MVOVC15hQ,3568 +torch/include/ATen/ops/convolution_backward_cuda_dispatch.h,sha256=UydXMamLCUDCfix1fivLE82ANm3ofVAa0MlrdJbktIU,1700 +torch/include/ATen/ops/convolution_backward_native.h,sha256=qte5LkqG4oSH7g-idIJwa9QkN55YpnugwJQYCYlRfAg,1521 +torch/include/ATen/ops/convolution_backward_ops.h,sha256=dDOBUtbPTcFSE-BY1C0_IWYPZCMS_OwXk-84qaAS8Mo,4236 +torch/include/ATen/ops/convolution_backward_overrideable.h,sha256=gQJ26cofeCQ5dbAH7_o8oVZZzpsr7VYfsdsPebqwNwA,10938 +torch/include/ATen/ops/convolution_backward_overrideable_compositeexplicitautograd_dispatch.h,sha256=c5J7o6Eu1ftfXXjQ-FcuBIJjsBE6BpJhoydpt_vT3gA,3421 +torch/include/ATen/ops/convolution_backward_overrideable_native.h,sha256=WjMIlhmaN1hdVb6igqyq7s5x5Y5oKkH_74dFInSPP9I,1472 +torch/include/ATen/ops/convolution_backward_overrideable_ops.h,sha256=6KzPByXqTqDZSvawFy6Od8gX0s4Wl3n1NwxyqeEXVUg,4091 +torch/include/ATen/ops/convolution_compositeexplicitautograd_dispatch.h,sha256=4wxazokwjYrBemMdVsseg6JsIoc58kcGpA6cqBegfjc,2757 +torch/include/ATen/ops/convolution_native.h,sha256=4HREAKXNdZe2v_Ht1dB60YKm_snHDWDR6SUyBqzqXZ0,1265 +torch/include/ATen/ops/convolution_ops.h,sha256=GGT5WoKn2TZczrNuUVr9L-n6jHRAx-S0xddAFRfAzvw,3353 +torch/include/ATen/ops/convolution_overrideable.h,sha256=Z_DiL3m_Bp3eBcFPqmDNLymMxtHywMvaUw32RjzpHfQ,8743 +torch/include/ATen/ops/convolution_overrideable_compositeexplicitautograd_dispatch.h,sha256=3woHMh0AGzgT7FiKb6M7cjP-vs9sIJthLFmcMemd_d4,2835 +torch/include/ATen/ops/convolution_overrideable_native.h,sha256=dQosXkrBwVzKIXmgITJNWwNEE6F3S3NSC6rFY_lxNhM,1291 +torch/include/ATen/ops/convolution_overrideable_ops.h,sha256=WrPe-SRsIwV5Dn5IzXFy2ijPQEoYf80A4MTOEaYEDCo,3431 +torch/include/ATen/ops/copy.h,sha256=9IFZrggWuRygYxK_DSlxTHdwkdqiGtPLJNkrw0j5lVA,1570 +torch/include/ATen/ops/copy_compositeexplicitautograd_dispatch.h,sha256=yd4c9qsm49ZfduuiiKCOuag6evx12urQWhjes38lePU,1307 +torch/include/ATen/ops/copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=PiE9IE-N7gy_T3bBlnj2iam2gKwBY68AdtfwReCceV4,1091 +torch/include/ATen/ops/copy_meta_dispatch.h,sha256=9CXIF_9FkwBHGzTEqSC19DSviTx4QpMMTukhNF5O3T8,1023 +torch/include/ATen/ops/copy_native.h,sha256=pAw4pEXEnyPyLWCnkddlH1FWsxn3h-IOy2ozLvR0oZw,1539 +torch/include/ATen/ops/copy_ops.h,sha256=SqoiiThKFhs1-Cuu5IPyBd0BnBpjY2Nknti1PWXith4,2729 +torch/include/ATen/ops/copy_sparse_to_sparse.h,sha256=EsPfiSSI2z0HPiaS0EkuvsYSyiLzLDCjNEmB0Dw3Ns4,2032 +torch/include/ATen/ops/copy_sparse_to_sparse_compositeexplicitautograd_dispatch.h,sha256=oSGqNJnxA3jU4cTLLEzKkieWoi6-2eEF19PPYFKaZC0,1361 +torch/include/ATen/ops/copy_sparse_to_sparse_meta_dispatch.h,sha256=5Y3Vl2EFwH6MlqATX2rKhHVctCoaOkfURmjivNgSfg4,1037 +torch/include/ATen/ops/copy_sparse_to_sparse_native.h,sha256=Yb0mw17GEVjAVTFhkXlzfoPW57ACBqfYjkbkFDDoP78,1035 +torch/include/ATen/ops/copy_sparse_to_sparse_ops.h,sha256=UrJKUc6ySxZLQ4WQPexNwRCR4vJ1smxTBSQbJwgD1wE,2882 +torch/include/ATen/ops/copysign.h,sha256=me1H4Am8APHMzqf5ICqVJKms-ffXw4nNf0kIbfzvpiY,2182 +torch/include/ATen/ops/copysign_compositeexplicitautograd_dispatch.h,sha256=sFzlfsS4RrTYgSn9LBJ2eAUPEFbANmM5lcZp1YSzfrs,1338 +torch/include/ATen/ops/copysign_compositeexplicitautogradnonfunctional_dispatch.h,sha256=8-BnzmjOy6TU_KbXL5zju4t4Sdqzxf88GJX6uJhrEcU,1151 +torch/include/ATen/ops/copysign_cpu_dispatch.h,sha256=wOvjvuKqOj6_6FaRXEpnbr_3rI-1NrxhTLNhwl2yRkc,1294 +torch/include/ATen/ops/copysign_cuda_dispatch.h,sha256=o_FPMuq37qTS1TlZA-I0fF5NDE8vMQhZVULMsopyCJE,1296 +torch/include/ATen/ops/copysign_meta.h,sha256=7EMbc8F9wZ1FCQqbI7xMzb8MlueVGJXkt7afAKQ01Y0,856 +torch/include/ATen/ops/copysign_meta_dispatch.h,sha256=-7RHCxwfC0Rr32etOAx6tjdoSCiPU9unf06IUZbvLI0,1296 +torch/include/ATen/ops/copysign_native.h,sha256=GRfSWimfGAZmxrxMhEezdcR0FartkSZ9v_7CbRN01OE,1156 +torch/include/ATen/ops/copysign_ops.h,sha256=zdWMGeETcznuIDgz8OtzfU-IyHoENPt0z08XFmAi1rw,4542 +torch/include/ATen/ops/corrcoef.h,sha256=0qjbqFk4uQ5FgzxfNnpTr2_YfzaVsIeTI8NeMgXMjc8,899 +torch/include/ATen/ops/corrcoef_compositeimplicitautograd_dispatch.h,sha256=0i-bG2qHZBXnRcmf_R7-BQohGRMost700wsgjzTNuVk,1020 +torch/include/ATen/ops/corrcoef_native.h,sha256=MdueadJ39JBThzKhfUMeCE7gCGM5XTqFI_Fu4p64TdE,732 +torch/include/ATen/ops/corrcoef_ops.h,sha256=zy8DAi7nkPpTtb2f5sEeFn6iFYTkxRCo-AlXBQUf28s,1217 +torch/include/ATen/ops/cos.h,sha256=BHXeo3u6ALuH8dzM7zRDZlGJsGUsHc6OshSHth871Cg,1384 +torch/include/ATen/ops/cos_compositeexplicitautogradnonfunctional_dispatch.h,sha256=Ll50kBkGvgqgl24hIZ5xTHPALioiuXnc8q-lgWyIjWg,1089 +torch/include/ATen/ops/cos_cpu_dispatch.h,sha256=68QbnS7-UCBSOPAMNcVZofvZ1x3qSYnwaHvNxQwVqtY,1170 +torch/include/ATen/ops/cos_cuda_dispatch.h,sha256=wAbf4O9Gl9TUxFndRA-IK1cv3PPocMVZJiIYnj3pzoo,1172 +torch/include/ATen/ops/cos_meta.h,sha256=lazB6zUAyI2CFce3snNR6UUypB6lYrx9P3-m4EaDH2M,818 +torch/include/ATen/ops/cos_meta_dispatch.h,sha256=4jpRTWRwv6SmK0F6exDBc0oLYPX-im5Zq51mo2W-Sgo,1172 +torch/include/ATen/ops/cos_native.h,sha256=aj0-ZwAgwKGtPsN-gP5HetE349YF-PwvW82y2pGXAbM,905 +torch/include/ATen/ops/cos_ops.h,sha256=f5fFhL-FgY5qa0W6PYH7eHqsYawB_s4lV457J9SsLvQ,2273 +torch/include/ATen/ops/cosh.h,sha256=qZu69Tj_PTz4iPbqA2oa-uxM8WB_mXNUk_DbO9gIsEY,1397 +torch/include/ATen/ops/cosh_compositeexplicitautogradnonfunctional_dispatch.h,sha256=SLP7Oa7IR71jJ2JwqaAI3zSMivmUiODLFPUI3nPelEI,1091 +torch/include/ATen/ops/cosh_cpu_dispatch.h,sha256=0Uay4rVvvdOSKXmawx5qGTAHqJ9FLVV1ntCqW_34Aj0,1174 +torch/include/ATen/ops/cosh_cuda_dispatch.h,sha256=F0X6Ly-_2Q24o_KC13Vebq_kHTMeGmIdFd_LMLK3iUA,1176 +torch/include/ATen/ops/cosh_meta.h,sha256=UGgAuh2ebNPHQWZGHGidT_IxgWGB3BIoXP8AUndFkLE,819 +torch/include/ATen/ops/cosh_meta_dispatch.h,sha256=Dk3RySp1Qs4DgArnkBgrJcMFE4uNVwP60JXJhuKlBGo,1176 +torch/include/ATen/ops/cosh_native.h,sha256=dw0IVylLDazt4dU1falh6sUiAw-v9XKxjHk0Iiug1hM,844 +torch/include/ATen/ops/cosh_ops.h,sha256=YKb6TtpeD-WdYmI6CtI1FlSahTzblrKtdudzNm-vW-M,2282 +torch/include/ATen/ops/cosine_embedding_loss.h,sha256=WsHFO6_Xp_raI8dSSpIWFXv73K86qqIjsbtorcWYPPU,1172 +torch/include/ATen/ops/cosine_embedding_loss_compositeimplicitautograd_dispatch.h,sha256=mSH80gavA9CmFwPvsCFwXgxxxW-b6WuWtopR736e0pY,1147 +torch/include/ATen/ops/cosine_embedding_loss_native.h,sha256=bA5uanPyztttUAZuu_kQHr6-O-m7-luR40_uzyeCI98,859 +torch/include/ATen/ops/cosine_embedding_loss_ops.h,sha256=BQCnGAH1BETytucpsr6nchDR6nrRSPm1QsWqpB8gKqc,1563 +torch/include/ATen/ops/cosine_similarity.h,sha256=37E2HMqSTVJCgxsA7_-RnFbYIoA8qheETENxKf5Ry3Y,1038 +torch/include/ATen/ops/cosine_similarity_compositeimplicitautograd_dispatch.h,sha256=5KP-xURniNVMjkIq0tsuZv-VkUgouZRwE4WBGI0OIOo,1083 +torch/include/ATen/ops/cosine_similarity_native.h,sha256=U4EMGswPevu4XGODLx2W1Qfgqbs0GyY6yu1aLxU0b3g,795 +torch/include/ATen/ops/cosine_similarity_ops.h,sha256=Pz5lbF22TgynzdWhrht5IgYct6y65eDsr9GLXQkZiNQ,1410 +torch/include/ATen/ops/count_nonzero.h,sha256=d0w7bunieMNtbp0lzkaDOBEGwPcJcd_v8myRR8VRkGg,2302 +torch/include/ATen/ops/count_nonzero_compositeexplicitautograd_dispatch.h,sha256=7Rlu6hmK_-0ETXzt0wQBe0RXt37eypt4o68JURX6Ia0,1529 +torch/include/ATen/ops/count_nonzero_cpu_dispatch.h,sha256=SsWKGRDePzawMDoAHdKefvCxAsDUC2fvKt2zm-4sKhk,1002 +torch/include/ATen/ops/count_nonzero_cuda_dispatch.h,sha256=Aot9cdQZU_lr-VCsOvbdr3GmqHeXuixRvO4UUKmHiMM,1004 +torch/include/ATen/ops/count_nonzero_native.h,sha256=V0vbET8kcow8J4Z4XsbtvjuuCmbYIBPw6yk6BVwki6c,1188 +torch/include/ATen/ops/count_nonzero_ops.h,sha256=6APJKICqqKebl97mLbq9pz02pw2G3q3Sy1nW9A8IKhc,3388 +torch/include/ATen/ops/cov.h,sha256=vPAA-2SYmIN3QdQXagu4yNKVJzVPLnt343LOkS0DKf0,1098 +torch/include/ATen/ops/cov_compositeimplicitautograd_dispatch.h,sha256=L0TfAbwQ8q46g5PQqOhKRx3MxJm-vS0oRTJAJco4PiI,1135 +torch/include/ATen/ops/cov_native.h,sha256=uvTMkhEtAx5aw3VWZPA8zFGmMylhIpRqcV2dqughjQ8,847 +torch/include/ATen/ops/cov_ops.h,sha256=wKqKIKd01yoh6bIAUXjkyuv3Rn9SXZqWMPex22wIWPg,1576 +torch/include/ATen/ops/cross.h,sha256=BHADy1TIXHnGLOD66PtDynfbo1ObOb_ILEcakBt4OMo,1592 +torch/include/ATen/ops/cross_compositeimplicitautograd_dispatch.h,sha256=-cBQ1nVjOc0ZPfYlhqwL3n2kup-T34TAHEQ6z_dn4Qs,1370 +torch/include/ATen/ops/cross_entropy_loss.h,sha256=ddynqf3sj80UXPUgN7-bXATfpqHBsSRJ15FPltg46Fo,2687 +torch/include/ATen/ops/cross_entropy_loss_compositeimplicitautograd_dispatch.h,sha256=Hnb8T__Ojjjt6Igs4KSo8Kj6Q4ufebe70mmJ52obmss,1443 +torch/include/ATen/ops/cross_entropy_loss_native.h,sha256=eEcoLJeUZmwKNVPu-8gOczEcqWoere8z5L7T8jNMMMI,921 +torch/include/ATen/ops/cross_entropy_loss_ops.h,sha256=CKzht_utb3Zt1CQBk42RQi6l9oz9KOKjo3HidAt7ncI,1723 +torch/include/ATen/ops/cross_native.h,sha256=ope4SGodbjJuFmIZjwzmr3q8XboI-cA9d-0EtIiunys,933 +torch/include/ATen/ops/cross_ops.h,sha256=VayqhwkW5gQMHFLVYymi-6S6b4OjmZM5q7MiMaynyB4,2169 +torch/include/ATen/ops/crow_indices.h,sha256=RZuzgJu8NV_D4320naG0VvM_jJEA73hu2KNvonoEpXg,763 +torch/include/ATen/ops/crow_indices_compositeexplicitautograd_dispatch.h,sha256=PWht7xnhUGSw3mzQ-K2_hRCv89j9TVpthsXkYEWqY2w,1024 +torch/include/ATen/ops/crow_indices_copy.h,sha256=jd5mUmoep5sh5-GWLwSQjDKFuDPkug6i3eYV5XObpww,1391 +torch/include/ATen/ops/crow_indices_copy_compositeexplicitautograd_dispatch.h,sha256=DiOgETwSXBAShC_ID8rvhMwICs88Gdf7ozmjcP0uLIs,1143 +torch/include/ATen/ops/crow_indices_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=xz-nFw_N1MLsjf3PT3SKP7B_AmUCjhI421Ty0uUCjCI,1055 +torch/include/ATen/ops/crow_indices_copy_native.h,sha256=HhbESces5CbHQqYVNKrE9lG-KI3JnBbvyh86E9Iesjk,830 +torch/include/ATen/ops/crow_indices_copy_ops.h,sha256=I8yrMGgpxGOQwEuSf98XJY7wMg033Dm-HwB75wtlGmA,1867 +torch/include/ATen/ops/crow_indices_native.h,sha256=EP6wm-BBTVITZGoensi-Uq0kzCF5aIFsdaO_P9AHx5U,815 +torch/include/ATen/ops/crow_indices_ops.h,sha256=4L8f2oAOgIdZv3GlOsK7YaBwZEyipj8Yhbod6CMjPyE,1235 +torch/include/ATen/ops/ctc_loss.h,sha256=B_h1qP3Cy7TJ-PCwTsT2dMju0mB7do5v9TM1woOCmug,1836 +torch/include/ATen/ops/ctc_loss_compositeimplicitautograd_dispatch.h,sha256=wgQuO0jY9Aj03r8w7CoS2OKrfclyHBWWUadBtc3RMKA,1438 +torch/include/ATen/ops/ctc_loss_native.h,sha256=Ah7xAT4JZDyXuEvFN3Z8i-YrgnhgTkAkSYoy0i9GK1M,1150 +torch/include/ATen/ops/ctc_loss_ops.h,sha256=K09pvc3nrEiAP5xedKaIkpcy1_Eh9jKL3h-jGi-ZT48,2788 +torch/include/ATen/ops/cudnn_affine_grid_generator.h,sha256=qxS-5E1sDi-9xQ6DFCNG4-roAIt0CHsWGZWTDx66CZw,1757 +torch/include/ATen/ops/cudnn_affine_grid_generator_backward.h,sha256=IIwidjfjH-3k0fBHxTUJeX6IRaQZ2QIhByImcL0HnU4,1844 +torch/include/ATen/ops/cudnn_affine_grid_generator_backward_compositeexplicitautograd_dispatch.h,sha256=vkKeJj1-IyQcqUz2E9DSH5gO9jOZWUqPLn1t9ZwGaz8,1269 +torch/include/ATen/ops/cudnn_affine_grid_generator_backward_cuda_dispatch.h,sha256=hk-ssJZpfqR4cyGxPLf1MqRx38sAbmYYdHbIghBb0RQ,1050 +torch/include/ATen/ops/cudnn_affine_grid_generator_backward_native.h,sha256=H8C9TxsJeROesJJ7ZEhKuioDZ_Qcp8E8q4oBcYUswYY,956 +torch/include/ATen/ops/cudnn_affine_grid_generator_backward_ops.h,sha256=7yXOrlMRZjkGrAz2I63ZZUgUTY9e0QNe_0K3hncpEzM,2296 +torch/include/ATen/ops/cudnn_affine_grid_generator_compositeexplicitautograd_dispatch.h,sha256=1HLOOgxvkoaJEGYh8mbi-9GY8pZYgkNsd5e5gpbDKyQ,1253 +torch/include/ATen/ops/cudnn_affine_grid_generator_cuda_dispatch.h,sha256=eFpG6tgTaDq5Esr_KvKZEl0YWqIeOxvebgnlzSt-LOE,1042 +torch/include/ATen/ops/cudnn_affine_grid_generator_native.h,sha256=kWvXFSZE5cRYz9bKVetxtWMZJ0JbZ0XqFAPORde4G1Y,948 +torch/include/ATen/ops/cudnn_affine_grid_generator_ops.h,sha256=UKpG7zlY03h5Esrv1Hu_Q1ETJcwTyZDSlOFemhOEmUs,2242 +torch/include/ATen/ops/cudnn_batch_norm.h,sha256=c4nml8LM5eZnNPaROEAGZfyK39D_mJHjwxgPNDVZKDQ,3277 +torch/include/ATen/ops/cudnn_batch_norm_backward.h,sha256=B7MlxYbauHW5DZVRDfESsNlZ8esRt8SDDcOODubrmJo,3469 +torch/include/ATen/ops/cudnn_batch_norm_backward_compositeexplicitautograd_dispatch.h,sha256=yzySpEs_VsDkbRFX6tPFO6utLsVJ7JEC-yIMszdADYA,1919 +torch/include/ATen/ops/cudnn_batch_norm_backward_cuda_dispatch.h,sha256=viw1pA-IaiW3akgmWzYKC4ckqbY1e6f4i83-PK6Idg4,1332 +torch/include/ATen/ops/cudnn_batch_norm_backward_native.h,sha256=ih9R5zG1pNfA_yjr8tSC4AYmGB_lvAhFNYXGioIvzwQ,1563 +torch/include/ATen/ops/cudnn_batch_norm_backward_ops.h,sha256=RHozn6S92sE4hOw6u0nqC7Z6pEQannh7LBDm8ox7k9Y,4268 +torch/include/ATen/ops/cudnn_batch_norm_cuda_dispatch.h,sha256=1eONKh-tnpRZ45CfOBR84l8qwqElzE95zmh3_nMxKlw,2137 +torch/include/ATen/ops/cudnn_batch_norm_native.h,sha256=NKoxNq9YjXgOQI77f1GglH1yRD_JTtX4YEycpzr3XJY,1456 +torch/include/ATen/ops/cudnn_batch_norm_ops.h,sha256=SEVagF9WREs3GhSeNbHCKJ1eXrOQzl7YUbM40OUgmzw,3955 +torch/include/ATen/ops/cudnn_convolution.h,sha256=OM0kl2IlUCdQp1UTBGrMuCeJHQGRF1k9xdknFDH-JsE,7890 +torch/include/ATen/ops/cudnn_convolution_add_relu.h,sha256=Vzsd9CatvFsFIntpxIRs4ovWOlggrWNc0Y3ZL3AELSE,8469 +torch/include/ATen/ops/cudnn_convolution_add_relu_compositeexplicitautograd_dispatch.h,sha256=lR4_Itws4_cAovSsVXj3Hle9aZ4rkCb9PW7XYkpd-Y8,2304 +torch/include/ATen/ops/cudnn_convolution_add_relu_cuda_dispatch.h,sha256=DKESKHV8F_wgcsQbeWq8p6lmVUGB6r6ZJfQjzL9TtIw,1543 +torch/include/ATen/ops/cudnn_convolution_add_relu_native.h,sha256=9WL0i3Y8HOO-htpEZmjPgiCA34yWaNQ2KONeI2tsVd8,1321 +torch/include/ATen/ops/cudnn_convolution_add_relu_ops.h,sha256=iJyCBEidjokS7w_k1JYljxgdBHVj0pahch3kdh--ous,3511 +torch/include/ATen/ops/cudnn_convolution_cuda_dispatch.h,sha256=ONsQTYmdbG564qqWELM-2qTX3qGnRGiburJx6Js8OMU,2505 +torch/include/ATen/ops/cudnn_convolution_native.h,sha256=GS1yg7BaKzX4p5EFU6eeXsxXridPLQNzgDiRUnRVqDA,1172 +torch/include/ATen/ops/cudnn_convolution_ops.h,sha256=6oWC8M_5hEGtUCMgkTeNDPM0uP8Sn4c_EFjqyxQ0Ew8,3117 +torch/include/ATen/ops/cudnn_convolution_relu.h,sha256=5_pSqRBIx7YBSrREXYJnxvYOyCgQ2hzeXv-o9m3jL_8,7295 +torch/include/ATen/ops/cudnn_convolution_relu_compositeexplicitautograd_dispatch.h,sha256=aKstaYPvziQRw-RoN8CyLULQSvSpfhbsPG1SKTyVu-w,2028 +torch/include/ATen/ops/cudnn_convolution_relu_cuda_dispatch.h,sha256=xcHzaS67d-UWObaIwpywtm2fuz9-8CTLNpBLukJVcBk,1405 +torch/include/ATen/ops/cudnn_convolution_relu_native.h,sha256=2euB-QaPSv_l0hlaBQfelA32UbESfahXJBaXY5j9d5Q,1183 +torch/include/ATen/ops/cudnn_convolution_relu_ops.h,sha256=0P1PLtK6-AWtMCv6IqsxPqiEyXUNP-JU-3bAJpMZ_KA,3063 +torch/include/ATen/ops/cudnn_convolution_transpose.h,sha256=DJY4r-QKnjUxWIpL4CQhpIRj-VyV5N2EWPHmr4x52lg,9106 +torch/include/ATen/ops/cudnn_convolution_transpose_compositeexplicitautograd_dispatch.h,sha256=7ObqRzFhPJ_ALLtE1gJ8I-JHNkrYjS2o8nkcgC6wikk,2228 +torch/include/ATen/ops/cudnn_convolution_transpose_cuda_dispatch.h,sha256=CTYVKHl6FE0Cf_jitF2OKRWhOaHLSQAVf09SdHD1EB4,1505 +torch/include/ATen/ops/cudnn_convolution_transpose_native.h,sha256=V5gpemtkwcfYcfogCadv7J_PGrwX4IhiDfOZc9Jw9TI,1283 +torch/include/ATen/ops/cudnn_convolution_transpose_ops.h,sha256=3XgexstO1s-xy7Dxq7X8LQ_MWuEqPo7lrWjC_LSkchs,3413 +torch/include/ATen/ops/cudnn_grid_sampler.h,sha256=Lc6JCvM5hznRbdLAQIfB8-nUaIYMG85X2zAvsHH9pfM,1540 +torch/include/ATen/ops/cudnn_grid_sampler_backward.h,sha256=B-UN2i5ZSvBUXpy_NyY9ii6LZREOjbMqEvi9DAyMV5o,2045 +torch/include/ATen/ops/cudnn_grid_sampler_backward_compositeexplicitautograd_dispatch.h,sha256=LMu2qZEe3O6-1CpDfnXTp8w6YRQpFibWn4WhPbXj9b0,1371 +torch/include/ATen/ops/cudnn_grid_sampler_backward_cuda_dispatch.h,sha256=zO6G7ZtXGAbLJd6mAFby9ZmweX5DM22NrjrwEdbnyZs,1079 +torch/include/ATen/ops/cudnn_grid_sampler_backward_native.h,sha256=T3DS2ZipefEWGs609-pFifzjqDH3TdHcqGEOZb9ap4c,1036 +torch/include/ATen/ops/cudnn_grid_sampler_backward_ops.h,sha256=qseTid59T9rZRLmSLvO6Tx1rafE3y7bZFO1sAmmOG6k,2573 +torch/include/ATen/ops/cudnn_grid_sampler_compositeexplicitautograd_dispatch.h,sha256=F9LJfrknJEeczFmAo46rExBd0-dhe76QM3HvVlLZouI,1195 +torch/include/ATen/ops/cudnn_grid_sampler_cuda_dispatch.h,sha256=MRAnv5uytQfRxyCMXO2tCjuEO36a-PMLA1RFRKPajkM,1013 +torch/include/ATen/ops/cudnn_grid_sampler_native.h,sha256=ZhL3WUeU1RXO3Fn_sweRJYhaJtEfoMF_DIg2wq0AvAk,890 +torch/include/ATen/ops/cudnn_grid_sampler_ops.h,sha256=E3zLe7WmfhmNmmGc-Y34gJodz8AOkKv1s0w9qdYZh9E,2046 +torch/include/ATen/ops/cudnn_is_acceptable.h,sha256=poqK07lhDhmj2DzjVoE0wm__UjQJePEk6OzOQumq2t0,935 +torch/include/ATen/ops/cudnn_is_acceptable_compositeimplicitautograd_dispatch.h,sha256=h_JyK8XS2h8o2v76O-_Z2feOC2n_FF5bIT7MjpTDrgw,1025 +torch/include/ATen/ops/cudnn_is_acceptable_native.h,sha256=ROICuxcj7oHyAQ-45H_iBdZm9CFv5D5I2UJ5YdM4MdM,737 +torch/include/ATen/ops/cudnn_is_acceptable_ops.h,sha256=_N9AGGY17yLQSKzz4XF05CE1MvHdq8iG7Sap97bm_1U,1230 +torch/include/ATen/ops/cummax.h,sha256=xNek60u6PCDIKIwun6OSsoXzS2hdvBuUqLQv32VrvIQ,2604 +torch/include/ATen/ops/cummax_compositeexplicitautograd_dispatch.h,sha256=s80yG1PVRFVODBszuUhVVccF9fBDI3f4z71ZDi1k8YI,1343 +torch/include/ATen/ops/cummax_compositeimplicitautograd_dispatch.h,sha256=HUw2Nlg5d8De9AlK3X1UcJjekbhSS48s3uZ4I8O6VHQ,1355 +torch/include/ATen/ops/cummax_native.h,sha256=EX8JU35S6qGm-7NE3nQWgFOOSl8ZrDI4s7u8NpM8OpY,1154 +torch/include/ATen/ops/cummax_ops.h,sha256=eOV12t2C5CF7RZIWlpDPOV_702nz5lCYtPcG3Iej854,3740 +torch/include/ATen/ops/cummaxmin_backward.h,sha256=q0AaydzvsTclefcXvylLDRkNLXO6oVAp1sITjNubO5Q,1066 +torch/include/ATen/ops/cummaxmin_backward_compositeimplicitautograd_dispatch.h,sha256=C0GX2WFeO1HG5bGWJtiqzb4-j1o80Ri-p_FedPNvH48,1097 +torch/include/ATen/ops/cummaxmin_backward_native.h,sha256=QORI2zgh1-BLiAFLhTJTnZzT8TxM1-p0k9H-UXd7Xjw,809 +torch/include/ATen/ops/cummaxmin_backward_ops.h,sha256=Jb65S8JKd0otaKmK3-4tyzvezAAiQPsb074Oq7_RqFQ,1469 +torch/include/ATen/ops/cummin.h,sha256=omgTlgkRz0Ei0HuYA24m5Nm6OX5hbEFzOvXq2WWgZk0,2604 +torch/include/ATen/ops/cummin_compositeexplicitautograd_dispatch.h,sha256=64aTbWHfROi9jAvlBp4_hYiG4tWEh5BTcR-4WqVzBl0,1343 +torch/include/ATen/ops/cummin_compositeimplicitautograd_dispatch.h,sha256=P4gIx9UOKGTYVswH8qoG5ezMOCYwxZTZFU-GmhKYTj8,1355 +torch/include/ATen/ops/cummin_native.h,sha256=ziocBbqCy8RnE0m7pceECqoR-ZMwhH77t_k6r1mFKIw,1154 +torch/include/ATen/ops/cummin_ops.h,sha256=QAVRzYbauU6IzhH8a5gkrzC_JTsC8QT4IeFe896IXNo,3740 +torch/include/ATen/ops/cumprod.h,sha256=-UMBZFohCzhbuAqyqF56TrXhOU376C4I2xEL1Nov0k0,2545 +torch/include/ATen/ops/cumprod_backward.h,sha256=KBjrfpKaNuGG5Npm5c4UZhUQScQVe_ocO4e3vL1fT90,1055 +torch/include/ATen/ops/cumprod_backward_compositeimplicitautograd_dispatch.h,sha256=DBkR8KzDXzHkriO3ntXkvZnqHej6PHuOGNpDVb6iPFs,1094 +torch/include/ATen/ops/cumprod_backward_native.h,sha256=IiUsG4O4ABrUWp7sV24j0O1pNlaJe288wAIum8VlNPo,806 +torch/include/ATen/ops/cumprod_backward_ops.h,sha256=BoUg4yUpDoXpHS9hsxkXrWdeb3baxPgdQn7Tgot6wUY,1460 +torch/include/ATen/ops/cumprod_compositeexplicitautogradnonfunctional_dispatch.h,sha256=K7Dr2h-pj8gQ06oCMTyjl61pT3GQ8iK1L18ygaViqMQ,1231 +torch/include/ATen/ops/cumprod_compositeimplicitautograd_dispatch.h,sha256=6BNna1gWmkDW_s82W2YRot5X3cNE4ikZII9_QvEd8PA,1499 +torch/include/ATen/ops/cumprod_cpu_dispatch.h,sha256=j2ThUdvWFBBuXRjCk3QebhDv7ZcCFfP-_XGjIlzDaMc,1439 +torch/include/ATen/ops/cumprod_cuda_dispatch.h,sha256=igJVnpvNugE4nDkOh7RBY_aDdEYhlc_Px3KmUC2Lqm0,1441 +torch/include/ATen/ops/cumprod_meta.h,sha256=Ph2Fu5rq4FV-B79uyVrXi0HIIWD6MfnWUhoe4znyvaY,874 +torch/include/ATen/ops/cumprod_meta_dispatch.h,sha256=FXG-qAiGvdzXpObdB2S9Qn9UdQNBscLsWBLP1cV8N9M,1441 +torch/include/ATen/ops/cumprod_native.h,sha256=95rDMcg3fg0nahEs9SQfVPrsN80p9gS23GMKUnsMCRY,1289 +torch/include/ATen/ops/cumprod_ops.h,sha256=hMFsrotr514_fo502uwrQF6iqxlQNd9Z8LfNlUAY0a8,5111 +torch/include/ATen/ops/cumsum.h,sha256=mrBtYxJFFZLWzTVHxNGeFSeE6CcowiBIZs87PYUL4S0,2526 +torch/include/ATen/ops/cumsum_compositeexplicitautogradnonfunctional_dispatch.h,sha256=As4Nwe_0GgX05iwvzLabtdNPBHtHJuEQQzKaR-zrP8U,1229 +torch/include/ATen/ops/cumsum_compositeimplicitautograd_dispatch.h,sha256=EFZbzczwSqAGQHAd3aEncMlheg5ZSyO9I1T6Zi1Lod0,1495 +torch/include/ATen/ops/cumsum_cpu_dispatch.h,sha256=vu2UZIYr27EWOBByKWsYdj9K1F8n6sKW5V1pmx19Uwk,1435 +torch/include/ATen/ops/cumsum_cuda_dispatch.h,sha256=R0s2fgK3eCJBwO8ebBdreEuD8m0dobmnxpkxntgq-mE,1437 +torch/include/ATen/ops/cumsum_meta.h,sha256=4vSVZtKdalwlGLc3owEnUdk2YNgBRHRys7DHNpIjLC8,873 +torch/include/ATen/ops/cumsum_meta_dispatch.h,sha256=9IfEv-67XlD-v7dmaHBLxQ0Gr6yf6mFG93-GTOC7UU8,1437 +torch/include/ATen/ops/cumsum_native.h,sha256=dE2UQajQABC8PvVBPSn0x2VbnHqbQAeQsaKmRpvzLJE,1283 +torch/include/ATen/ops/cumsum_ops.h,sha256=5NKUPWuwpSnn4mceD1zXHD2wn2CHD-Of7ATpu-AmrEM,5093 +torch/include/ATen/ops/cumulative_trapezoid.h,sha256=ziem09D79D1butfFv8Dd4rrrxUqg1QOftKRbS2IFxuw,1265 +torch/include/ATen/ops/cumulative_trapezoid_compositeimplicitautograd_dispatch.h,sha256=hJLSc1F0xE0LQk8LlNNMCiYDrH0vnGQbACmr4Ak_g00,1173 +torch/include/ATen/ops/cumulative_trapezoid_native.h,sha256=gyy97gUefEHb2J_VQL3tGJpPkSOghFaTUKzxCVoLxic,885 +torch/include/ATen/ops/cumulative_trapezoid_ops.h,sha256=zPV2nS3-C7ytI4KS2CiNVnTU-kikBVsrTr660BKcPOY,2043 +torch/include/ATen/ops/data.h,sha256=TV23nqvF1-IUUNP8Rmp5CcKR_YdrzbPi7AtQaLLjBnY,755 +torch/include/ATen/ops/data_compositeimplicitautograd_dispatch.h,sha256=OHGdDIOt4M8aPru4Tf3UgK9A2bPLMWeDY63rJ4bBxo0,1016 +torch/include/ATen/ops/data_native.h,sha256=LW4mOj4nzjGJNchppy6q01d355x5oGBCLMie-CXKBvw,728 +torch/include/ATen/ops/data_ops.h,sha256=b9RUO92occsbRmvb0XlairjvyCY-wk8ECIQvq5wINJQ,1205 +torch/include/ATen/ops/deg2rad.h,sha256=ZDutqzy9rtUbTTJ_lqfxRw4XTTj5_F4FLgUJPMUZAO8,1436 +torch/include/ATen/ops/deg2rad_compositeexplicitautograd_dispatch.h,sha256=8Uit0Z4HDWkgc-OQowCpChdfJUXjtpDi6NdK5_pPvCg,1230 +torch/include/ATen/ops/deg2rad_native.h,sha256=TYnm5nEVQLaRJ11TOs4SnS7BnctLmGOjAPjQVys4Xuo,1288 +torch/include/ATen/ops/deg2rad_ops.h,sha256=RpoxGAWWtoK8_jw8DrOI91KF9niO7uwLJ7hmupsLv-I,2309 +torch/include/ATen/ops/dense_dim.h,sha256=h5QI8jNXIGVA88k7k5D2oUHuthCG1McLB1P6eAE00Dc,760 +torch/include/ATen/ops/dense_dim_compositeexplicitautograd_dispatch.h,sha256=H-LxjmR3ABztgjTdR_htNeSZe3fjMhyzTlLpUOz3drA,1018 +torch/include/ATen/ops/dense_dim_native.h,sha256=1ZnKfv1v9SnXl__S0ZjtarYR2KpimTnrr0h5rBIJllY,864 +torch/include/ATen/ops/dense_dim_ops.h,sha256=ZL0S4zwUp52mQKjMpojFeNwxP_b7E_bWxzvjNv9h884,1208 +torch/include/ATen/ops/dequantize.h,sha256=urVj_PRq46lUNzGXdu8y9IcZnovkqcw8vhKHMu9N1Fo,1974 +torch/include/ATen/ops/dequantize_compositeexplicitautograd_dispatch.h,sha256=BSNJCJYJNbXCq39AvKkVxtxedSYmZwQw4vbJYy8iqDU,1280 +torch/include/ATen/ops/dequantize_cpu_dispatch.h,sha256=SUHNM2pB13Nk3kI6K81Vfn61-mmBl8PVutFckk0umY8,978 +torch/include/ATen/ops/dequantize_cuda_dispatch.h,sha256=PLGC5IPiaHdh4HI0epknETUmTBTYQP_EQqtVp7Jf3Kk,980 +torch/include/ATen/ops/dequantize_native.h,sha256=6HCXsQcLRuejIf7Vozo1xZt0e8vSMuS9AKJSROkCdME,1078 +torch/include/ATen/ops/dequantize_ops.h,sha256=prcEi9M_4YF_JnBaeG824qsnub4Gw-Vh8tItaCLJikY,3036 +torch/include/ATen/ops/det.h,sha256=jczO8csSP5hHd11SdUiFCJX94uL2GKgZLYTnd3q6pIs,879 +torch/include/ATen/ops/det_compositeimplicitautograd_dispatch.h,sha256=B2uhUQDffTv-bkxIXXZpWk-UKf6vgLlkcAuxpNHadjw,1015 +torch/include/ATen/ops/det_native.h,sha256=-DhbUfDpzsubnx0HjK0_xKS0kK-8Ons9i3lCum9pREU,727 +torch/include/ATen/ops/det_ops.h,sha256=m1XcnujJooJ7cFga14-mv83VieVjDwnOPrSz9dL7mhY,1202 +torch/include/ATen/ops/detach.h,sha256=7WkxgBHIDTHVUYbwXHYNcanAP776PW__GMkds4AM1uA,1039 +torch/include/ATen/ops/detach_compositeexplicitautograd_dispatch.h,sha256=0vTOlltJ85a8L6IqxnwTz4F36xKiLmKOjw7HS8XxZOg,1069 +torch/include/ATen/ops/detach_copy.h,sha256=1Iyoh6pazDN5gNzj1F6oCJvTBY1kshy6sqM0qnj2uA4,1331 +torch/include/ATen/ops/detach_copy_compositeexplicitautograd_dispatch.h,sha256=ICrGZ8XGvGoWEzTfqjyQgXobodtlZ81DIsmJKXI_MX8,1131 +torch/include/ATen/ops/detach_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=SqKzf2xzbYt_R2_4bf-jsxZIIoOfpqHdslVVwqh6L8o,1049 +torch/include/ATen/ops/detach_copy_native.h,sha256=rJjufj_HIzh38Y4eMmK98WEFXjLv7S3Kdy4eniJJI5Y,818 +torch/include/ATen/ops/detach_copy_ops.h,sha256=ZHTi9XtoZfEAto5TX4A_WTQRWFp1AtA12EgCkbb3kNo,1831 +torch/include/ATen/ops/detach_native.h,sha256=leB-3tOPgzMfyqYj4aGZuq7hp2Psz4aUVQhfzFZOJ00,781 +torch/include/ATen/ops/detach_ops.h,sha256=TRFHRQie_ydJaWDVkzXFZrVuSlYK7vwkmIDY4-Gc3PQ,1716 +torch/include/ATen/ops/diag.h,sha256=npmLuxTu6iSN-q1w4T0QLZmIHGF4zry37tB3bDgd9qQ,1397 +torch/include/ATen/ops/diag_compositeimplicitautograd_dispatch.h,sha256=VnMMOs_BI1uTOeu7m7lh5x1mVi7v9Gni7jy3fZyHw_w,1227 +torch/include/ATen/ops/diag_embed.h,sha256=qYt_UU4bidVK-zNgBNq9RiB_ghVi6ONrNLPHuk2jk5I,1649 +torch/include/ATen/ops/diag_embed_compositeexplicitautograd_dispatch.h,sha256=lWUVeAO3kJs06hNiOGTIBftwhy-uWMU41hA_hW9wlw8,1225 +torch/include/ATen/ops/diag_embed_compositeexplicitautogradnonfunctional_dispatch.h,sha256=IBZZGoM1qXtWPAN8OpZDFNX1PgbaW5c2-Mtk2QPnA8o,1100 +torch/include/ATen/ops/diag_embed_native.h,sha256=5epC0Z5oYa7thdrn_OZVoyS-S3Rag79_5CXlS7DcGkY,912 +torch/include/ATen/ops/diag_embed_ops.h,sha256=hxVLWRPTT5lwZi0xKFsM5SJLlZa6mKNeMPLnJus1wSQ,2135 +torch/include/ATen/ops/diag_native.h,sha256=LR16KF71HKv_7sgex2BFoKu3v26FI34V_IK-PiWWRVU,842 +torch/include/ATen/ops/diag_ops.h,sha256=r0Z5JtUofeOuOZKPJVZeBykbZdZI42W7oWCr_dXSna8,1911 +torch/include/ATen/ops/diagflat.h,sha256=Dxb_iNbtMfseol9iZBJRoV1UTYcHMyOrcffWOoGcHwM,939 +torch/include/ATen/ops/diagflat_compositeimplicitautograd_dispatch.h,sha256=P0FVDLPD5l-3Gf3xSB7mQ03-K41Q0zb54tT0k7SG5dY,1038 +torch/include/ATen/ops/diagflat_native.h,sha256=pDg3-n6t4VZAqR2TlWL5fx2kK4RBpR7ANIxJ0I5LvPI,750 +torch/include/ATen/ops/diagflat_ops.h,sha256=aoNV5awRbRyCI2Ok1lwQKjHVUPh94k5y19petTX9k70,1272 +torch/include/ATen/ops/diagonal.h,sha256=6-vDs-uCrpMnS-7oWZ8imYJW_aThLURgP-ujXhg-oEs,1339 +torch/include/ATen/ops/diagonal_backward.h,sha256=R37XNX6jEepjng_SulC4iMUfY8fCgY8mjHXao9bICYU,5466 +torch/include/ATen/ops/diagonal_backward_compositeexplicitautograd_dispatch.h,sha256=LwsJiHRPnjPxXWcy95F1lNBk6mmmmYq7bfXULHsQuqQ,1965 +torch/include/ATen/ops/diagonal_backward_native.h,sha256=bd22EjrPPLJ51zcpz67YtvLO2JgEAeF1UpGaqiI1aFQ,1012 +torch/include/ATen/ops/diagonal_backward_ops.h,sha256=lsq8k7Zr8m9CWv9oYSMP9AynamgyDHk_JvbOK7DFJO8,2421 +torch/include/ATen/ops/diagonal_compositeexplicitautograd_dispatch.h,sha256=QyJQsA5HARvowGz6Rm2oM71NzjmDnrt7wJVxIqzs7xw,1070 +torch/include/ATen/ops/diagonal_compositeimplicitautograd_dispatch.h,sha256=b24IjHUIJpRXlZ_6t5zUEf-k9RCJ-Ob9jUj7vAE7rsI,1094 +torch/include/ATen/ops/diagonal_copy.h,sha256=98BOPZ80hP-N8GN5D9XO3p--leVmeJT3Uec8LOYQqnA,1669 +torch/include/ATen/ops/diagonal_copy_compositeexplicitautograd_dispatch.h,sha256=p1DGiIxdSy75uRfRkcqW-zhnMDqO3Bj_m9vNerBn5Wc,1229 +torch/include/ATen/ops/diagonal_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=Wz83kIAFeFTpV11LuGwxBJ58gSLAMwTe2szGjlxVeEA,1101 +torch/include/ATen/ops/diagonal_copy_native.h,sha256=5V6V3_SAwOYZ5OQXpKkNQoOV5HGIjVoLzZAfmADFMv0,916 +torch/include/ATen/ops/diagonal_copy_ops.h,sha256=Q6jQ2EjDHV9Q32YuryQUrniST1rf3i3lujyM06nyL1g,2149 +torch/include/ATen/ops/diagonal_native.h,sha256=Rc9q1mXHuUWP4crSIlY0Ko98k8LR5qVjziSjKBDIrsQ,912 +torch/include/ATen/ops/diagonal_ops.h,sha256=TgagXCDFfapg2BMJ8UMyW1nown5b0dzmvZWoFzYT_oQ,2164 +torch/include/ATen/ops/diagonal_scatter.h,sha256=m_avua31mmIK4kxco4j3AXu6iXmqpL84iN4EWVZdW_A,1822 +torch/include/ATen/ops/diagonal_scatter_compositeexplicitautograd_dispatch.h,sha256=QDoMJTb076wKchX3cqBwuCRojIHOkRmBpFgifyhqREQ,1283 +torch/include/ATen/ops/diagonal_scatter_compositeexplicitautogradnonfunctional_dispatch.h,sha256=_zmPeLNcYUZ4cZ01acqw5eP44_qqiveJx9YU3nkM8dw,1128 +torch/include/ATen/ops/diagonal_scatter_native.h,sha256=MScxR2seL2a8CklIYTdz-VPgCRs9CTfIAIUnb2JtQFM,970 +torch/include/ATen/ops/diagonal_scatter_ops.h,sha256=J159wcm0Wb_W0EggqN3rvjU5yIrXqPVzK6_pS45NmPE,2327 +torch/include/ATen/ops/diff.h,sha256=G3JPIXwoFJjLgpUi33QMVdJOTmBA_lQk5T2OaHWFsPw,1889 +torch/include/ATen/ops/diff_compositeimplicitautograd_dispatch.h,sha256=EH4Zb8rN_56BwG9DsNeZyYWJfXj2vassCz7XmpTPVLg,1530 +torch/include/ATen/ops/diff_native.h,sha256=zJ0D9Ytoa_08JgZ-1cyZv02MOlBdn1BISAm6gr_oXnk,1041 +torch/include/ATen/ops/diff_ops.h,sha256=P_mHceTuhC5IE5vHS6SWuPQrxCRFQtisNRrGFZNKkTw,2553 +torch/include/ATen/ops/digamma.h,sha256=__YyiHLpeo6QlblwJo4IUD60lcTMbGxko3H2XwLHeKI,1291 +torch/include/ATen/ops/digamma_compositeexplicitautogradnonfunctional_dispatch.h,sha256=G1-lQ6E0FmVzwBgMSqVCIr7m-qV6lRwyVAx0IdGIik8,1097 +torch/include/ATen/ops/digamma_cpu_dispatch.h,sha256=J7Es2jdFZCwQs6_gjnrD5yac_coy376ZaUw6qUEEjsc,1186 +torch/include/ATen/ops/digamma_cuda_dispatch.h,sha256=ugmHMoobUQcb3W6zZEDQ4nAf91FLhiI7YvcS5Te8YL4,1188 +torch/include/ATen/ops/digamma_meta.h,sha256=mqYuU1CysSjg-o9lwrW9xZAf3VrhhcPTgXmOfsmOAo8,822 +torch/include/ATen/ops/digamma_meta_dispatch.h,sha256=M3rPChCNkJ6JjaAMghOc_OHLC9exDerG4809iT1cHsw,1188 +torch/include/ATen/ops/digamma_native.h,sha256=3C0xpjLprAZxmanX1e0cUk15E_29NaA8f1rgmZY8qyM,853 +torch/include/ATen/ops/digamma_ops.h,sha256=z2qiKgEnoXZ81a6BHX5macsYkyUprHoo5DwsPq8QWDo,2309 +torch/include/ATen/ops/dist.h,sha256=RGfDnzA9c06_snD5B5DhHlo0dpEZcyobnZH6_S3kFPM,1517 +torch/include/ATen/ops/dist_compositeexplicitautograd_dispatch.h,sha256=i6QhidUOeNQpn5-eJFRCrOjEZ_lA3zMkon68-9OKCu4,1317 +torch/include/ATen/ops/dist_native.h,sha256=IriwHkiPCd5ZJNnA6ZDn64re-u1W84z2CeKHgtOn_m8,902 +torch/include/ATen/ops/dist_ops.h,sha256=oHqPzPGY-M2GWydMjiWRU4U_p47URTilWMZAihWAVIo,2113 +torch/include/ATen/ops/div.h,sha256=DM_ytex7IWnzl8KuItLoyy2Iff4wpryYEB6ekFpH6Ps,3991 +torch/include/ATen/ops/div_compositeexplicitautograd_dispatch.h,sha256=jqRoRmx5r68_3GDXNgnVNWiZ0Igl5V6KktibSbOLO2c,1868 +torch/include/ATen/ops/div_compositeexplicitautogradnonfunctional_dispatch.h,sha256=whSTYQZxAHeOVeapdR0GCY6mG5CuYtsZt6MZTtnaIr0,1390 +torch/include/ATen/ops/div_cpu_dispatch.h,sha256=310bHR6uRfb7GgZ4y69_-h4RyatMsODeRPzRmPFIgHU,1824 +torch/include/ATen/ops/div_cuda_dispatch.h,sha256=e3YOYIl4SCPQIwGi78HTChuTcwl5En5rPWwwUKzaxV4,1826 +torch/include/ATen/ops/div_meta.h,sha256=j_0xV0dF_uWPUFh9WUV7RJwbhLq09UWc5IF9mP7g8aA,1045 +torch/include/ATen/ops/div_meta_dispatch.h,sha256=fJJ4Lt4auGV1_SrUGQyhIHXk-eB4ZZKitKnAUJtYYcg,1826 +torch/include/ATen/ops/div_native.h,sha256=mhfqiXM_l4P4u9d3om-GpDzznxnxQvGBpt8joKe_ufE,2762 +torch/include/ATen/ops/div_ops.h,sha256=2dfhhisJIVcZYwXf8wR4ZhGI_L-ogD8NL0rV2ge5pP4,9213 +torch/include/ATen/ops/divide.h,sha256=Y9V-QfK_BEnEKZlwJglmf2iWHQ7V_vC1h7Sn4qkL5WI,2890 +torch/include/ATen/ops/divide_compositeimplicitautograd_dispatch.h,sha256=Oa-uiYExQf4TBSs2v6CbHKZNQZsD5i6TrqhSsICYX2M,2304 +torch/include/ATen/ops/divide_native.h,sha256=-FSAo6PLmfpQm69GPFMG58oVjuYhfcm-rLrREW0L2P8,1757 +torch/include/ATen/ops/divide_ops.h,sha256=F-8TYrRsXip1BRhhRVor6gyiBOcm8Urf1w1mOyyAYU4,7759 +torch/include/ATen/ops/dot.h,sha256=hDxawQL2lna5PrlIaufZrCbACF_rcoHJDth90DShQ8g,1401 +torch/include/ATen/ops/dot_compositeexplicitautograd_dispatch.h,sha256=wcw5KQn5pJ72LPBKQXNRWmGgaORWWWsDfA4QRHxqZno,1169 +torch/include/ATen/ops/dot_cpu_dispatch.h,sha256=cjLAj9j4idJZ9iuw7vyhaNVvjgOyPjzMFyvyRU_T_tM,998 +torch/include/ATen/ops/dot_cuda_dispatch.h,sha256=fpqckH--kSA6f0xnufNmbmRjmUWLiTfuFu_WD85g7fA,1000 +torch/include/ATen/ops/dot_native.h,sha256=KqLQjyiLykDN-wb8n6Nuq_yZA1RdoaVJ0tu--Hs14RQ,939 +torch/include/ATen/ops/dot_ops.h,sha256=DHXMBOESq_NdyzU-0UY7jd91vP6PuaEx9LKOHP24G14,1961 +torch/include/ATen/ops/dropout.h,sha256=ffgo8SUCRGpVNc1wGajUUor3J5nsZ2m9mchvT6T2ogI,1149 +torch/include/ATen/ops/dropout_compositeimplicitautograd_dispatch.h,sha256=A62lu5eajcqjz-PvdfrsJrLLQI1urzSB0lQnzsLnWm0,1116 +torch/include/ATen/ops/dropout_native.h,sha256=UCpMFQHq58nA8Tfkw-lyshJSg9Li0qf43OXi1LP33RE,828 +torch/include/ATen/ops/dropout_ops.h,sha256=nBlyQIs8qckruwwQap5zz979xW18ur9vrJoC4RjnVQk,1877 +torch/include/ATen/ops/dsplit.h,sha256=K71kl82VElRd99-JOukwK7SRVpnNmpB_aFGfiiKX5Yg,1193 +torch/include/ATen/ops/dsplit_compositeimplicitautograd_dispatch.h,sha256=-RGb4ceDOGIuKJjEXHXdJzsZZYvx5Ytj7wzlxl72kpc,1145 +torch/include/ATen/ops/dsplit_native.h,sha256=gKwPnQFs_neaSi-DShY2MpSBpvswLhhrm8_V05uzYOM,857 +torch/include/ATen/ops/dsplit_ops.h,sha256=thGZzVGK40bWJCEQXi_mB7XAhsyj_B9pz-DxgJM7D2o,1996 +torch/include/ATen/ops/dstack.h,sha256=tvO9rs5SNNrs0T4AujeqXpZ-TPwrkY4nZ9N_6_LANTI,1302 +torch/include/ATen/ops/dstack_compositeimplicitautograd_dispatch.h,sha256=I8O2hHEFfPmP8xAZAU2ICtXjcSw0JvYK71FZ0CG-B1A,1172 +torch/include/ATen/ops/dstack_native.h,sha256=wgq-TUR8kydVd-srbZWHlTdUPwICQs_3vBt4QQMuHGM,806 +torch/include/ATen/ops/dstack_ops.h,sha256=jE3VRqZZ-N6m2g3eQtpxtIdVQk9kMousI1FlWlj7CPE,1799 +torch/include/ATen/ops/einsum.h,sha256=D3a0HC_yNt_12sMPesuQqdCFX_qI6TouIIjSyJmfCig,1021 +torch/include/ATen/ops/einsum_compositeimplicitautograd_dispatch.h,sha256=pb_pi68lRsZQvqT4hkC2QrNiyA4vrC1EpRYccqHGULY,1089 +torch/include/ATen/ops/einsum_native.h,sha256=S14xJR_nmLjzUYMwCtdzrsI0SIBa0mjB5xHKaMlu1N4,801 +torch/include/ATen/ops/einsum_ops.h,sha256=1YmRg95kg8CaFOn1jISe3ZHgF3IA23rq6OD9o2ASzaQ,1402 +torch/include/ATen/ops/elu.h,sha256=geP02olb1-qY7fAmw56HE35zcyXcOLnI9AUlmhmhJHU,2062 +torch/include/ATen/ops/elu_backward.h,sha256=5nUKmINRGnl8vqHR05Xu4yHQMtZZReAJwKQqXm6--6I,2302 +torch/include/ATen/ops/elu_backward_compositeexplicitautogradnonfunctional_dispatch.h,sha256=BCKv8Rl1OWVDYagC-1Ce1thb3MkztI1mk5O0NXq_waM,1192 +torch/include/ATen/ops/elu_backward_cpu_dispatch.h,sha256=FOA61fDZ73rBKQIqclj8UEH8oV3FLLTjxlnbBCUhx5M,1589 +torch/include/ATen/ops/elu_backward_cuda_dispatch.h,sha256=A15wtBV05y3mNuwdVARSaARNt7Xyb6vIKRAIIL9N594,1591 +torch/include/ATen/ops/elu_backward_meta.h,sha256=cuMqof_dpN44dU6kAG0camgQUCHh-PqgSUum7xknge0,969 +torch/include/ATen/ops/elu_backward_meta_dispatch.h,sha256=HgrJZjt5hf0G0lDNBxESqstcDBYQwAb09Ul9LjY7Cyw,1591 +torch/include/ATen/ops/elu_backward_native.h,sha256=L58MWiCBc1hxBd90tMo11M7syJdSFBgt-hiYOXobBLc,1017 +torch/include/ATen/ops/elu_backward_ops.h,sha256=jOfVQW8jUwDzeVvBumeVBcBg4ltpjW3__dX50X_JeDM,2807 +torch/include/ATen/ops/elu_compositeexplicitautogradnonfunctional_dispatch.h,sha256=baUpx2rkErCKs_oLurmv4GUxlsXX6BL1sxFIJ7fGSho,1269 +torch/include/ATen/ops/elu_cpu_dispatch.h,sha256=y9DShreyq2Vw-O82O5qUCh1BI03Wnbt-6hIlgF9xgIY,1524 +torch/include/ATen/ops/elu_cuda_dispatch.h,sha256=ME9OBP8EdSjqbthwgq06jctUj3_zounYAInQnmhAmq0,1526 +torch/include/ATen/ops/elu_meta.h,sha256=UZgQceU3Qt27H796eHvvYw47hAqprBNGFtJUb_DEsjM,902 +torch/include/ATen/ops/elu_meta_dispatch.h,sha256=6u1fbb1-P9ryRfHAEVTxMnYhra0aBQpcci8lY2Zazog,1526 +torch/include/ATen/ops/elu_native.h,sha256=qm2ltdXeKmStN9l2brxvoc0Q398Oaiq3W3TKY3-kVq8,925 +torch/include/ATen/ops/elu_ops.h,sha256=B2AV3R8ImCvKtQB_N_xiAaIU0pc-kSRtxuVoWu8esCY,3119 +torch/include/ATen/ops/embedding.h,sha256=VXZlgOEHobJWEqmR4MndMdOwj_acjSToAl-8dDkmUKY,5614 +torch/include/ATen/ops/embedding_backward.h,sha256=ZbyfA5bhJwGnCs3I0qY--Y-ygsqMHpMf52BEQ6eUPM4,2445 +torch/include/ATen/ops/embedding_backward_compositeimplicitautograd_dispatch.h,sha256=9oLX0S9dGk-bgqN6DwfBXQwjtfyeozsjT5nvPMyoXww,1327 +torch/include/ATen/ops/embedding_backward_native.h,sha256=cobHiJZ2dlOJ2lPx9OFXXErT5lQJb9eL8tAfmtM_ew8,865 +torch/include/ATen/ops/embedding_backward_ops.h,sha256=XSknOoabtnW_quarg8o8Uc5YUPwU6nfOju3gIJ-JRVQ,1631 +torch/include/ATen/ops/embedding_bag.h,sha256=bvZE-ccv4K2Q5dS6MVyUL6YX0x6wrCfn3x3kF3AKVTs,2208 +torch/include/ATen/ops/embedding_bag_compositeimplicitautograd_dispatch.h,sha256=z2Hlk63FbSyf_et9yE5x2yN3PjW1G2wtEf86UYBmWB4,1625 +torch/include/ATen/ops/embedding_bag_native.h,sha256=_Nxd1dFBAPzB3Fe1pFWITFVD_BtUpLtXMWpMgTmoTts,1337 +torch/include/ATen/ops/embedding_bag_ops.h,sha256=6S9H9Ws95KiDe_Z_ab_lus-_pQ3olNtXAz0bI4vszeM,3515 +torch/include/ATen/ops/embedding_compositeexplicitautograd_dispatch.h,sha256=X9wEeoa3zC3sKdFDFHn7Ktc1qxnPq9VgBD44J7sCqaE,2031 +torch/include/ATen/ops/embedding_dense_backward.h,sha256=V0VD1_9FWwJmZa_BjQqfRdD44WGhZih9K3SEsy7oDu4,6241 +torch/include/ATen/ops/embedding_dense_backward_compositeexplicitautograd_dispatch.h,sha256=ua4FPXRvYb1BJFIZMXjuIq5fSYCQMJrq5yyxTMyJzrE,1788 +torch/include/ATen/ops/embedding_dense_backward_cpu_dispatch.h,sha256=zwa51u0ncbal4FAZsJouJ8cKGSF5si1YcGgrRMkT5nw,1283 +torch/include/ATen/ops/embedding_dense_backward_cuda_dispatch.h,sha256=j-r5ABK_xdDlm1twqGrocOvBiMa2nFr9Ne5puL8qiK8,1285 +torch/include/ATen/ops/embedding_dense_backward_native.h,sha256=xCx4lj1WCt_Z2Ks1nWmD2Pufx9RRKiVmuoUtdQLbpPM,1246 +torch/include/ATen/ops/embedding_dense_backward_ops.h,sha256=9NSiVZo4QX-9F1-DdAZwVsezhi5-uRAwo6bZslqw4X8,2629 +torch/include/ATen/ops/embedding_native.h,sha256=cjL2FfhDAtpYbWUazK9kzTbEVmgkWfIKAgC-lUpGuts,1203 +torch/include/ATen/ops/embedding_ops.h,sha256=iJAQUOuP03GCc3tjvpZ3fwjc_2NNlYYcvBvChA4bzHI,2463 +torch/include/ATen/ops/embedding_renorm.h,sha256=jGEnaPdejB8jSpmVd6QtFHUuv9IRLfq5zqhhDe28yjc,2121 +torch/include/ATen/ops/embedding_renorm_compositeexplicitautograd_dispatch.h,sha256=kt2IrehVKKhjrr9dWCQGVEGJgy-a8wCcjrT8O9SoHhA,1394 +torch/include/ATen/ops/embedding_renorm_cpu_dispatch.h,sha256=OILyb8p8mrUfJiSbU3DHG_doMQSf0SgHfeQJddDb0ok,1044 +torch/include/ATen/ops/embedding_renorm_cuda_dispatch.h,sha256=RGTLkfRRY7F6y_nLAjoP9PzKE1FtWJr_Vt1TcwkwSig,1046 +torch/include/ATen/ops/embedding_renorm_meta_dispatch.h,sha256=eeBiLc_7hoapRnvjc6EogQaO60COpr_1qpHt4swUBXg,1046 +torch/include/ATen/ops/embedding_renorm_native.h,sha256=080IuuA0PMfhi5J-0WNEcl4CihtKNzAO72sZdxMX7Ac,1211 +torch/include/ATen/ops/embedding_renorm_ops.h,sha256=XwwEveXxTvrNz7EGMp4EWYN3D7P5Wd94fCjKI5ZWuVM,3023 +torch/include/ATen/ops/embedding_sparse_backward.h,sha256=jrSdzjOKHcULM1hFOpfIVRrJ2_ueWRJOQz45L2RbvU8,1192 +torch/include/ATen/ops/embedding_sparse_backward_compositeimplicitautograd_dispatch.h,sha256=9pQ4jqFBnXneOWDfRPTKHkzDwNAYYdL7awWbdT_qa_E,1132 +torch/include/ATen/ops/embedding_sparse_backward_native.h,sha256=AE0MzTSqnSWk3zAlE4oxgzXYluvm-ZADy9ks6Ur67EU,844 +torch/include/ATen/ops/embedding_sparse_backward_ops.h,sha256=ibDyI8UpizWRB3HYjf-gQHYxd1WgeuQzrzs-oIaKbZk,1577 +torch/include/ATen/ops/empty.h,sha256=E_sO_rri6_vgvkYqw5oeWrMg3XN45r37Q8L-yx4lxn0,9482 +torch/include/ATen/ops/empty_compositeexplicitautograd_dispatch.h,sha256=oZ8R_jfxK65sS99AlwCCE1nEIwHNO7QzNpLWvpD1flo,1774 +torch/include/ATen/ops/empty_compositeimplicitautograd_dispatch.h,sha256=ku65s8JHL5Ow3Eq8U2jVvRVstMeKVFyhKu7v0YGJEAQ,1510 +torch/include/ATen/ops/empty_cpu_dispatch.h,sha256=6iQ5rpUED09D-jLOu8bqfM1s8hp0bY-4dYGs1ExTQ2M,1718 +torch/include/ATen/ops/empty_cuda_dispatch.h,sha256=6NipKv-tGlF9wZZABIsPVhrQtJFCqNIRzRPYLRxdKuI,1720 +torch/include/ATen/ops/empty_like.h,sha256=dnLoJqk_Olujv8LnpLM_15zZThPdvXu5wmNVjPOT_p0,2475 +torch/include/ATen/ops/empty_like_compositeexplicitautograd_dispatch.h,sha256=JSHN3P1bs6ta2dTb_TlvXnhNMsuZt9GKbnMyMw5UUX8,1646 +torch/include/ATen/ops/empty_like_native.h,sha256=myr7KZbvEauIshBb8LiAIdZua6uSI3-gMipFg7Yao18,2241 +torch/include/ATen/ops/empty_like_ops.h,sha256=vUKmhPn6RopZy2Bo98BlJxctrdvOxX9GXt2fVocj6gs,2655 +torch/include/ATen/ops/empty_meta_dispatch.h,sha256=-46psyLd8P9957SHSpXmFWhEq1JS3_EG55gpz6RpPy4,1720 +torch/include/ATen/ops/empty_native.h,sha256=uNW3rx-w2NXk5skO9JlahinwyFPl7cffE1hJdarDRnc,3846 +torch/include/ATen/ops/empty_ops.h,sha256=mmlimGY-RTfRaXZJAKqK9wLhLYWlBzW6yHnhWrIuvcc,4869 +torch/include/ATen/ops/empty_permuted.h,sha256=tdRLCvKQbDIQ9GTob8i1q8TXDjt_tZB8ulb7MisqO7U,7032 +torch/include/ATen/ops/empty_permuted_compositeexplicitautograd_dispatch.h,sha256=1tmPQnli_yinJV-r-3zJqjq5cwXt1Fs3uGFKVHr7u0U,2192 +torch/include/ATen/ops/empty_permuted_native.h,sha256=1xFuLCm83kiTQSTU3xLRXFnTbhmWcRg7aySoVKN9DyA,1063 +torch/include/ATen/ops/empty_permuted_ops.h,sha256=Yx1pw0EGRJukhgFuex89NyrjNIUMwvPryMoRt2Onq-4,2567 +torch/include/ATen/ops/empty_quantized.h,sha256=W1u-gjSEPeRiwPUE70HYsAkXaIFw59h4xP_GU1NZjIg,2736 +torch/include/ATen/ops/empty_quantized_compositeexplicitautograd_dispatch.h,sha256=YafgEwi-ZJin0TdyrlgkMKpBfu6aQgO6LmrxmkkwF9I,1302 +torch/include/ATen/ops/empty_quantized_native.h,sha256=EsAB1we283m5Eo1DgNrG89KF5ZloS3WoIeBnSEgN7Bo,1146 +torch/include/ATen/ops/empty_quantized_ops.h,sha256=AMPzbmaQufqeQJKC6AbSdkw1Z61UoM3HQCej_0bcYik,2849 +torch/include/ATen/ops/empty_strided.h,sha256=8aqvFYjwEcBdsXVacmcbC8WcCVQqSraI3p02A_6kCo8,6895 +torch/include/ATen/ops/empty_strided_compositeexplicitautograd_dispatch.h,sha256=xhSMpKVmVfiQaNwGIcq7WV3yNAXLQKJd2mRcuEMjV-U,1420 +torch/include/ATen/ops/empty_strided_cpu_dispatch.h,sha256=06o1S6KGVG33CehvBYBu9eT1BoKBYScNv0ArzzybI-k,1628 +torch/include/ATen/ops/empty_strided_cuda_dispatch.h,sha256=ngvPLf8nUvMdTDpE1iF_mS7-kRrULjDlAEvNg5e1X-M,1630 +torch/include/ATen/ops/empty_strided_meta_dispatch.h,sha256=K7IC5qx22Pntiin98KXzfm7tNTbrG5GvCvx9T5DL8HQ,1630 +torch/include/ATen/ops/empty_strided_native.h,sha256=hrdn1rzoZyGehfnzWkk6kQPNbpYMWdSi-P4LaWqpYOY,1800 +torch/include/ATen/ops/empty_strided_ops.h,sha256=bUoaB54xIOOSfO4VKnICAQI3ILwqTOwyUkkLtI9cZEM,2537 +torch/include/ATen/ops/eq.h,sha256=jbiBR_T-cDpsD_icbEZsNdl76sLKZiD83Fj_KQj18Ic,2096 +torch/include/ATen/ops/eq_compositeexplicitautogradnonfunctional_dispatch.h,sha256=_h16vxOSj6JM0iPdBfhjY2g5eaMsVhx3iJ4-3KL5qvk,1288 +torch/include/ATen/ops/eq_cpu_dispatch.h,sha256=p3xdTFcaS2uu3jyvNw6PDDQ_CKrThfqb3rJ0PWNm97M,1620 +torch/include/ATen/ops/eq_cuda_dispatch.h,sha256=YcfuDTYBTe-Hp3ifsK1JtR1QRZbcpZlqGICqTJKWytQ,1622 +torch/include/ATen/ops/eq_meta.h,sha256=ZfxJdGriWEPf5VOGd0VfLWtopp31JMoZBMXg3BnFDbI,989 +torch/include/ATen/ops/eq_meta_dispatch.h,sha256=m-AF4j2HXN6-RJETYIx65S81_kbNroV-4I-QKfx6eek,1622 +torch/include/ATen/ops/eq_native.h,sha256=h9HJF-2Fr053_TtC8GjGw_NdIErC3xqqQeTeQpfqtJI,1639 +torch/include/ATen/ops/eq_ops.h,sha256=YJ0XCXuKoChB6NUDpNW5gDRmOqey8dlRJxsjlattBew,4455 +torch/include/ATen/ops/equal.h,sha256=B1qej1C9ErRx4W4mir8puHicgCT3XMhYSczYO81J1oA,926 +torch/include/ATen/ops/equal_cpu_dispatch.h,sha256=Kg3CwVywunYYUcqiE0sMTyAlIfvnyRSegOb_ejq-kEo,993 +torch/include/ATen/ops/equal_cuda_dispatch.h,sha256=WnEg9gXMy9HzNX_oYdffDqOGlAPLzv7Gn6uQSbZ4Suo,995 +torch/include/ATen/ops/equal_native.h,sha256=4u0z-oBAbVo0uom0BT1tUsNrI3g6hYzDNf2RtkXcPik,918 +torch/include/ATen/ops/equal_ops.h,sha256=OWQeEjGANNFsG2LVJoA0parq-cu2y2zjODl4n9UD4D0,1274 +torch/include/ATen/ops/erf.h,sha256=-Jyqt7S3hLZnbic_e6IpZfj-piJJZXrY1culRJybpJQ,1384 +torch/include/ATen/ops/erf_compositeexplicitautogradnonfunctional_dispatch.h,sha256=aaY4RsKmcDhRjQTQs0w9zjNPv6qFqpxRYNN6IxDptvU,1089 +torch/include/ATen/ops/erf_cpu_dispatch.h,sha256=pcW8HmhwMlLqOCPpxsmZOuNIrzMf_QTazQgHj19zzKs,1170 +torch/include/ATen/ops/erf_cuda_dispatch.h,sha256=wgKacr_pKctv8amK93v334UHHWaXACXOZBYGLLB-F18,1172 +torch/include/ATen/ops/erf_meta.h,sha256=GG8-dyt4ovvx0SOpBNL5I7cVw93ZBveooufTRzt84jc,818 +torch/include/ATen/ops/erf_meta_dispatch.h,sha256=xqqYrV5LfF_eh6FY2OR_6afI6o9teIMZAts5AAuApgQ,1172 +torch/include/ATen/ops/erf_native.h,sha256=-jKnypdbIR7rnGX9Zp4EDhxcz-z36BGsvzbHm22kRiM,1243 +torch/include/ATen/ops/erf_ops.h,sha256=M0CoEgvMBcX80kAjytdJmkkv59q6feHWuVWE_Vr_PoI,2273 +torch/include/ATen/ops/erfc.h,sha256=3fhKgdJE6SHBN74Ge9LVUUa_WjlftLWAvlSLRKZNDNA,1397 +torch/include/ATen/ops/erfc_compositeexplicitautogradnonfunctional_dispatch.h,sha256=p_QN-mNWvtVZQh6pEfIbgX_nW-6mGIj0soUEK9Ig2ro,1091 +torch/include/ATen/ops/erfc_cpu_dispatch.h,sha256=7MqFKcNcp8zalFMN8Qskn-8mzIIiI6IQNAXaMxntCAM,1174 +torch/include/ATen/ops/erfc_cuda_dispatch.h,sha256=TJYzfkTR7Crd0rm7ZjWdEja8GGLp_EUWrjF4nKtxHMY,1176 +torch/include/ATen/ops/erfc_meta.h,sha256=7MRi-D7QH5s4rFHEdjLZYOs0WvTxp94BfXToDSNzgS8,819 +torch/include/ATen/ops/erfc_meta_dispatch.h,sha256=-MIAF7ORvLm00QM75MGflyBr0anj-A-xUkxdPk4OVz0,1176 +torch/include/ATen/ops/erfc_native.h,sha256=vukzl9L6b2yLrCEjp1orpBtu3TjDVO5NEYkUDVOxoTQ,844 +torch/include/ATen/ops/erfc_ops.h,sha256=dGs_VfG_sh0lT0khVc2X8pCrFU9HWkex_6e_aQ7tWqg,2282 +torch/include/ATen/ops/erfinv.h,sha256=XFrToqDxEennZ_A4nBCwjwdgSI19sNJ2FuSF4PDOkfE,1281 +torch/include/ATen/ops/erfinv_compositeexplicitautogradnonfunctional_dispatch.h,sha256=spa_KYP8Us4sENmQpwUdBS9Zx8T8MloytqkyZjWZTYA,1095 +torch/include/ATen/ops/erfinv_cpu_dispatch.h,sha256=eQ-0qRYrh06TYGl33Hj9irVngUjhoIBnDTuwropGGxU,1182 +torch/include/ATen/ops/erfinv_cuda_dispatch.h,sha256=arizfANIM1LTL2IKSNb_bP4-CPqM516v6tF5sJWPrb0,1184 +torch/include/ATen/ops/erfinv_meta.h,sha256=Xq4DfrgcaGXtEbApeKQlLIn_kWfB2x63VxWT7LVgMO4,821 +torch/include/ATen/ops/erfinv_meta_dispatch.h,sha256=2oRmI8jvH_tNQ4-CVa1RgYRfuB9VJdHLetIggkvyxWg,1184 +torch/include/ATen/ops/erfinv_native.h,sha256=i7KumcRxPO-o6fwymkGjYMJxJGln9c_10wSMlGFBq6M,1270 +torch/include/ATen/ops/erfinv_ops.h,sha256=SbPjRYY32oaURpFSk3HoqbQmhHHuR35GuvobiwSYMiA,2300 +torch/include/ATen/ops/exp.h,sha256=DC3Tw7Fm5uilEIeumDm1s2RZOLEHrj_iFuLSbNefE_8,1384 +torch/include/ATen/ops/exp2.h,sha256=W3FGcnwLlqr6NJJFOrOKBlYp82PYKkQnmOYZurehTkc,1397 +torch/include/ATen/ops/exp2_compositeexplicitautogradnonfunctional_dispatch.h,sha256=o50NiBKbX8vfSwSkpUtRIqRsOBh0EK109jpza1-IUcA,1091 +torch/include/ATen/ops/exp2_cpu_dispatch.h,sha256=abYoMbZCXR-1lnszZHf-GGvJiLSw_eOz0k9Wohk1MiM,1174 +torch/include/ATen/ops/exp2_cuda_dispatch.h,sha256=_hGNy4JRC_CzMnFnnUPTLn6zmSfoyk7ulKAVcKxnpFE,1176 +torch/include/ATen/ops/exp2_meta.h,sha256=m8gtBBUgkIkQ1cK4FJ44mx9oNPruOeRXnlaoB26kAWA,819 +torch/include/ATen/ops/exp2_meta_dispatch.h,sha256=pt6cs-uwHTI707A9v09_22pVmmNyQSWnslJC6coMyb4,1176 +torch/include/ATen/ops/exp2_native.h,sha256=7WlENldCopf4GFyv7eCRX-_zDfT3MNaEWcA0JY3h2qI,844 +torch/include/ATen/ops/exp2_ops.h,sha256=5z-tGauNj5uHCel0uYFs6Zex4C2P0mLb0PEDb2wGSZ4,2282 +torch/include/ATen/ops/exp_compositeexplicitautogradnonfunctional_dispatch.h,sha256=KpM3kWXfdW1TTuujUTgis-c98Ze-YUCcVr2WeExCYbg,1089 +torch/include/ATen/ops/exp_cpu_dispatch.h,sha256=Tjpdz2NwhGzA77Mn9DlZdq-TjWVML05JZcPOfnSFHl8,1170 +torch/include/ATen/ops/exp_cuda_dispatch.h,sha256=rjPRw1Zx-Gglf6dT77T66aNJW2yt4l5GeeEto10RD9M,1172 +torch/include/ATen/ops/exp_meta.h,sha256=hmbpqASi6dexagN1P2vkI2OfMppWcolzuhxP7nOfIZQ,818 +torch/include/ATen/ops/exp_meta_dispatch.h,sha256=Vwt198tZdsIJIGKMrMtEMuzHW382JpWqePasNFEu8yw,1172 +torch/include/ATen/ops/exp_native.h,sha256=o4S7V-PU4DYI96hyvJ0KkY0ibEV8i2Hfvv_5ZkgiCA0,841 +torch/include/ATen/ops/exp_ops.h,sha256=cmoOBrkS_1J6bJuRx0vegON4k6cJeo8FfmLoq7Xf2jg,2273 +torch/include/ATen/ops/expand.h,sha256=PezukEin25kZBEXY2tKbl0WvLI3IdYrD3fFrultfHwg,1298 +torch/include/ATen/ops/expand_as.h,sha256=ChCHxBu0I_f237DgEbRZYA_5pWtki-Cx_OPIttdwf-Q,760 +torch/include/ATen/ops/expand_as_compositeimplicitautograd_dispatch.h,sha256=ob0JbBH0eN3_hV1RCXCYDKrrB1zhfa6pQZ5ApsjNjTU,1047 +torch/include/ATen/ops/expand_as_native.h,sha256=MW0wIq_wR6hEtJieGgqozbsEIDz4vadJ_WiY36vSx_Q,759 +torch/include/ATen/ops/expand_as_ops.h,sha256=vM-KWBm9FoEa2Frv-wGv3C2bnGUOLKCXYaxH91orFgc,1312 +torch/include/ATen/ops/expand_compositeexplicitautograd_dispatch.h,sha256=eIYq4nY7QZvYsS3q1QKdxBbALr4PhBfQo8VLB1qxUUc,1169 +torch/include/ATen/ops/expand_copy.h,sha256=jgOt7AwlivhVa8gKcO9qCD3QIuNhuIzoDo8WQSUqDGw,4380 +torch/include/ATen/ops/expand_copy_compositeexplicitautograd_dispatch.h,sha256=YzTyn-w0g6jMkg9QUIJjeGPUiYWoKnVV_30Oe_y9DDQ,1480 +torch/include/ATen/ops/expand_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=0lXoxSKePgFRf_W3yvgDm-85pvldj6wFCoMbOcKWK8A,1205 +torch/include/ATen/ops/expand_copy_native.h,sha256=Lshhf3DWKcEPDbHNVoQxxEcQNJx_ArLPU_QIaP_dSw8,920 +torch/include/ATen/ops/expand_copy_ops.h,sha256=u0cn7LFUFg1H4hEKAH-E-m5TNBa8y65lltLPEi2uSyY,2124 +torch/include/ATen/ops/expand_native.h,sha256=uviKJ_7U7-kOxAkT_1GA0iX2qHwwsIWEdOxSCuZjMEU,773 +torch/include/ATen/ops/expand_ops.h,sha256=dNeK11hk_5eNaU_TplXdMnhMsRi0d5KIaNqUAlvCtr0,1365 +torch/include/ATen/ops/expm1.h,sha256=921qXV22Du8cn9ILwPQkgE-mWpWu-jT1qjmL5aIAzCA,1410 +torch/include/ATen/ops/expm1_compositeexplicitautogradnonfunctional_dispatch.h,sha256=XJKsf7e-R577kGHz084hu1hr9Fsbcm1uYgNaMvKIzAQ,1093 +torch/include/ATen/ops/expm1_cpu_dispatch.h,sha256=oxCmUv1cPWq_taq58ZpKvXCAbKgH7yHtCooYm3yEV-o,1178 +torch/include/ATen/ops/expm1_cuda_dispatch.h,sha256=mE-5U-nqsWPO5BukyZx2W-_dW_aBUJ-P81pTMNemYyo,1180 +torch/include/ATen/ops/expm1_meta.h,sha256=adHkytCmZBxNFqWxUUaVIgyYkr3SaOasjWyTNDYydLE,820 +torch/include/ATen/ops/expm1_meta_dispatch.h,sha256=oEhwLhzasqFzgGi1C9wXLQ_2SFjDJeprT3UspH3PUek,1180 +torch/include/ATen/ops/expm1_native.h,sha256=4XLabeEQ77eh92h4o4s9fgfhxoeq7vTCC8XMh8U9itc,1261 +torch/include/ATen/ops/expm1_ops.h,sha256=hQSO3un2pSI1DvzFBJ949uBvUa234T5_ASfKKaF6NMI,2291 +torch/include/ATen/ops/exponential.h,sha256=OLwz1tMRIyNAQ_Wg3iMZ3cOsVcEgWxosYDCW5n0NKeU,1716 +torch/include/ATen/ops/exponential_compositeexplicitautograd_dispatch.h,sha256=2JGiyMW_TduZm3inMUgXq6yWIvvkon_lRPCBVePMywo,1392 +torch/include/ATen/ops/exponential_cpu_dispatch.h,sha256=Kc2RT6ty52LwMMZwILvYmBUwEy0J8001xFQeC_WOlkc,1049 +torch/include/ATen/ops/exponential_cuda_dispatch.h,sha256=HS-hxBRa1-E6n-z8-Adpn5cEzgmi3-3ihuhRNFPCnOI,1051 +torch/include/ATen/ops/exponential_meta_dispatch.h,sha256=WjauTK8PSgtlf3mwMuAt5SPfVCw9pIcUcODauuR3k1U,1051 +torch/include/ATen/ops/exponential_native.h,sha256=w-2ggg6SMNnqKT0FmKt8huOkKYznDk1rXd5UfjM_bWQ,1076 +torch/include/ATen/ops/exponential_ops.h,sha256=aynzxfKhVSLcVEpOYLhIh5bXY3afU2tGX-zuWrmJ4-c,2933 +torch/include/ATen/ops/eye.h,sha256=yvN9tnXWSxjpZq2umTRF5DIJHXGkbGzONnNiSWDt2Ds,9881 +torch/include/ATen/ops/eye_compositeexplicitautograd_dispatch.h,sha256=YwxF-xhjKV1WLRvRQF7_NYbQTp9i-b0bffZ_QV7nxrQ,2056 +torch/include/ATen/ops/eye_cpu_dispatch.h,sha256=OrZnWPbjBiqa82qIrHrS_YCKSEucuaXYMdQV8bULpzI,1508 +torch/include/ATen/ops/eye_cuda_dispatch.h,sha256=ZUIk0lYNrHpl0xgmx2NCSDDYL9dV2TtuRWQaq33SGAg,1510 +torch/include/ATen/ops/eye_meta_dispatch.h,sha256=mJ-ddSEcIUuRyiJjMeQ71z8WQLjjPzfhOv5eFNKB-fY,1510 +torch/include/ATen/ops/eye_native.h,sha256=3qjHBew7DSKUXihFMsWlIlRtBi9ra-oDY1xMfT-DSYM,1359 +torch/include/ATen/ops/eye_ops.h,sha256=WgmenuNAH2ip3udCtF5chVOHuGXmoTMs-h1xbQO9od0,3844 +torch/include/ATen/ops/fake_quantize_per_channel_affine.h,sha256=PeVPisP3elUtykaZbx00M3xm01AycS81z9Fnr5zjKKI,1224 +torch/include/ATen/ops/fake_quantize_per_channel_affine_cachemask.h,sha256=D2O0dx7Cukpmuul5h7i6OrUwhnwSD2MIL7hcBJCDqKk,2547 +torch/include/ATen/ops/fake_quantize_per_channel_affine_cachemask_backward.h,sha256=LnI91W7oOlfDtsd6K5Mlv4QQk3BIUWZ9g8lBy4DCAVA,1115 +torch/include/ATen/ops/fake_quantize_per_channel_affine_cachemask_backward_compositeimplicitautograd_dispatch.h,sha256=jdjlS_IgLV7IiLS6CzJVg5yVmFXocPgDRKofSiP_FIU,1088 +torch/include/ATen/ops/fake_quantize_per_channel_affine_cachemask_backward_native.h,sha256=1-zBhn4n0FDmCZ3YAVogddgbjgBp0cLuN6W7trh_K9M,800 +torch/include/ATen/ops/fake_quantize_per_channel_affine_cachemask_backward_ops.h,sha256=LZli9OZ8vxXIERdK4E4kPL0Ah-mQgnNTXLc_-YN8z9c,1429 +torch/include/ATen/ops/fake_quantize_per_channel_affine_cachemask_compositeexplicitautograd_dispatch.h,sha256=UwhphtOYbfLX2CelW1IBh4EnjOnEyR-dIXR4Ou8Qp38,1505 +torch/include/ATen/ops/fake_quantize_per_channel_affine_cachemask_cpu_dispatch.h,sha256=3hfbe3Y8Az_t4_sASQwHgUg8Yd43iGEZJhdjA-istRA,1144 +torch/include/ATen/ops/fake_quantize_per_channel_affine_cachemask_cuda_dispatch.h,sha256=wwWUOeNnNg5SBE-KJ9VymmoRuchqro6UnKz0rCiYmSA,1146 +torch/include/ATen/ops/fake_quantize_per_channel_affine_cachemask_native.h,sha256=yZpy2PcC2hHILwWx4_BTZhQ6DHQnpWMBE3RzfmZksCg,1170 +torch/include/ATen/ops/fake_quantize_per_channel_affine_cachemask_ops.h,sha256=QdVnqbPrqO1NUyyLa4QUPwVSAmnYB8tTb94Srd-YF8s,2997 +torch/include/ATen/ops/fake_quantize_per_channel_affine_compositeimplicitautograd_dispatch.h,sha256=CO_4xzd6HXq2C6SAfH5By6OJmoxrxOb7dOTGauq56QA,1153 +torch/include/ATen/ops/fake_quantize_per_channel_affine_native.h,sha256=Yxyu38RSBHgjvPjv2fU2bMi0V3cTW38AHem7ZaLJsLQ,865 +torch/include/ATen/ops/fake_quantize_per_channel_affine_ops.h,sha256=tosCjZgzGyneSPAuvTpW-PetIxEunfPa7UwhzDqY52w,1647 +torch/include/ATen/ops/fake_quantize_per_tensor_affine.h,sha256=yglQ2559s2zf8mxDb6DnxDSj20AXtZwfwCngiF0cPzQ,1602 +torch/include/ATen/ops/fake_quantize_per_tensor_affine_cachemask.h,sha256=_YWL2kvwwND0TPq5KoUqLsUuGANW2HLFhwaET3KwIg0,2366 +torch/include/ATen/ops/fake_quantize_per_tensor_affine_cachemask_backward.h,sha256=R4aEAs5vmG4FmAhqknIIJu9B1ilDxjRtDZ0YjI96c5w,1111 +torch/include/ATen/ops/fake_quantize_per_tensor_affine_cachemask_backward_compositeimplicitautograd_dispatch.h,sha256=WY_f8NPlOyaO270NjTpFTK5d5SEm-aRYcDJG7VPHd8Q,1087 +torch/include/ATen/ops/fake_quantize_per_tensor_affine_cachemask_backward_native.h,sha256=XlFsAxkCXUh29GZybxIlk55oqXPN10wmKNCaVNYEkS0,799 +torch/include/ATen/ops/fake_quantize_per_tensor_affine_cachemask_backward_ops.h,sha256=tAX9NvU4zbLm1jUJgjzPLPw1Onjm3f9i5Rt9cYRAE6M,1426 +torch/include/ATen/ops/fake_quantize_per_tensor_affine_cachemask_compositeexplicitautograd_dispatch.h,sha256=aJxGKx6U62atFKH5aHvKtSydWD5YbB2YWBUdPXlsQu0,1429 +torch/include/ATen/ops/fake_quantize_per_tensor_affine_cachemask_cpu_dispatch.h,sha256=xt97c30q8oLo2XMPT22BENcJ3vPzvnH-GKjHLtrS9eM,1106 +torch/include/ATen/ops/fake_quantize_per_tensor_affine_cachemask_cuda_dispatch.h,sha256=JVIQzZ96Lzpi-f50iuT8vH7D7-ekOjOU5P7IX3wWTJ0,1108 +torch/include/ATen/ops/fake_quantize_per_tensor_affine_cachemask_native.h,sha256=I3rSDY1c4tIFFo6AFzb4ZnBAsazUsmhruf5-N7Fzopg,1094 +torch/include/ATen/ops/fake_quantize_per_tensor_affine_cachemask_ops.h,sha256=jolIWSHPIp96Otyjkxt3XITxRAQpvX0DDPG01Vr2Q60,2751 +torch/include/ATen/ops/fake_quantize_per_tensor_affine_compositeimplicitautograd_dispatch.h,sha256=GQWq-eTUpibA5EZTKtw13KuNkYidU7dXaR2g5Ko28B8,1289 +torch/include/ATen/ops/fake_quantize_per_tensor_affine_native.h,sha256=JBEBVI4-af_-ADdPVDmzEkfTe15hDDZeLG3KwXu3K7Y,1001 +torch/include/ATen/ops/fake_quantize_per_tensor_affine_ops.h,sha256=R35j5L7sJ1AMaVawwjwDp_M1MAS9AFphSC2SYpExYXI,2454 +torch/include/ATen/ops/fbgemm_linear_fp16_weight.h,sha256=rEJWd7iWaoeuNbb31IDvESxaZ_ze2ZPgyGizjvDAqA4,1451 +torch/include/ATen/ops/fbgemm_linear_fp16_weight_compositeimplicitautograd_dispatch.h,sha256=NnxbWuFM_n8flaF5VOtoRU_omvQUbqaWTXd3tq1f6Og,1251 +torch/include/ATen/ops/fbgemm_linear_fp16_weight_fp32_activation.h,sha256=pizXa-j2MbghR0K6Za_-eucQ2xjPRlLGccjnIeWVNVU,1599 +torch/include/ATen/ops/fbgemm_linear_fp16_weight_fp32_activation_compositeimplicitautograd_dispatch.h,sha256=2qHvTxaPDzUmmi3BC2OznzjK7Mf6wc7HpmBWqoOwxX8,1317 +torch/include/ATen/ops/fbgemm_linear_fp16_weight_fp32_activation_native.h,sha256=ALLHF_CWsZ5rABccJNWztgMUckCi0Xda8HfTkXyk2wc,1029 +torch/include/ATen/ops/fbgemm_linear_fp16_weight_fp32_activation_ops.h,sha256=wFHnXSSAfS9d8QMkn63l1zGbxosfgSKt-5UsxBDY9OY,2503 +torch/include/ATen/ops/fbgemm_linear_fp16_weight_native.h,sha256=fKIKK4Ikfjr7OQPxuqSEt9b3EjgPlWUFTiC0JJq1Agg,963 +torch/include/ATen/ops/fbgemm_linear_fp16_weight_ops.h,sha256=jKAw5AFTYNk6j6QfpMOroz1z2wewahT_EtvPev0EAAc,2303 +torch/include/ATen/ops/fbgemm_linear_int8_weight.h,sha256=2SLO1CDjGYvWl3TlPPrNsH5q7PjduZUUNEAWiOHSn_s,1330 +torch/include/ATen/ops/fbgemm_linear_int8_weight_compositeimplicitautograd_dispatch.h,sha256=WTyPo1IuzZbEiGo6txngpU-jMWVRnzIOkHUYrnbBUeA,1220 +torch/include/ATen/ops/fbgemm_linear_int8_weight_fp32_activation.h,sha256=3yrw-E6DlS_AEMsQcEIJdxRr19rZYsT4mn2vwt54BLk,1394 +torch/include/ATen/ops/fbgemm_linear_int8_weight_fp32_activation_compositeimplicitautograd_dispatch.h,sha256=eq6lQUt9oqADBCsCb_FZhepUpuhmFxft1akZiorbArU,1236 +torch/include/ATen/ops/fbgemm_linear_int8_weight_fp32_activation_native.h,sha256=pXBHxCRXh0Dv04wHSSDu2dYQ6pup07KfI2Eb9gb3UoQ,948 +torch/include/ATen/ops/fbgemm_linear_int8_weight_fp32_activation_ops.h,sha256=D4AhBZBISv9YbV95mVFJG0ow467D_0C-nI5KESWwgIw,1913 +torch/include/ATen/ops/fbgemm_linear_int8_weight_native.h,sha256=gP2h6COUhM4enFgI8TPhqcOmH9Zq2mYGxxKMZzfVDd8,932 +torch/include/ATen/ops/fbgemm_linear_int8_weight_ops.h,sha256=NSFL6EZyxesFHNY04vo7bOkgecjjEBYcfk0ZZJChNfE,1865 +torch/include/ATen/ops/fbgemm_linear_quantize_weight.h,sha256=r4NZmsvcL46eoxeVmNbTLSupO2O92kdjta_2RSQ8kUM,1048 +torch/include/ATen/ops/fbgemm_linear_quantize_weight_compositeimplicitautograd_dispatch.h,sha256=jrhuVbpaRgfX7n9Cn4F7ZiUMKMIo35R-okv4S29SPeM,1082 +torch/include/ATen/ops/fbgemm_linear_quantize_weight_native.h,sha256=Y7HhnR60kNBYDX29jtHrKMmwaMA8M8AniZwlGL669-g,794 +torch/include/ATen/ops/fbgemm_linear_quantize_weight_ops.h,sha256=ETt7KOzq-R5BtT2m41ZymB_3JIuPxdZsYOvFYsPxiTo,1425 +torch/include/ATen/ops/fbgemm_pack_gemm_matrix_fp16.h,sha256=ZH7OkWkVCTT0-5fQkHv7jI9ATQqaJ_8TvILfdtgOBYw,982 +torch/include/ATen/ops/fbgemm_pack_gemm_matrix_fp16_compositeimplicitautograd_dispatch.h,sha256=_hB1ElIij5AXi_N4Sy_hZRC5MBD7ndun_fVOPz87gP4,1041 +torch/include/ATen/ops/fbgemm_pack_gemm_matrix_fp16_native.h,sha256=8wpyhAiBln9Taj_sqfvJARfVDU2TTUNt5fb5lPvcauo,753 +torch/include/ATen/ops/fbgemm_pack_gemm_matrix_fp16_ops.h,sha256=vnke88L_XH0eZI4aCt7Gu5J1mpQIy4A7dRwZJJRkOpE,1280 +torch/include/ATen/ops/fbgemm_pack_quantized_matrix.h,sha256=AJ2lH-Vzh9Ye_DXfgV5PbrxOCXIZP2ixXvoYIhppiNA,1234 +torch/include/ATen/ops/fbgemm_pack_quantized_matrix_compositeimplicitautograd_dispatch.h,sha256=kCSvlteZQETsVtytyoGRA63NnS-8Pi9NnHxflgX-9cw,1140 +torch/include/ATen/ops/fbgemm_pack_quantized_matrix_native.h,sha256=1nEER8XyhgNr7VX-hRKWZy15mC9h92XOxqTFY4laQSo,852 +torch/include/ATen/ops/fbgemm_pack_quantized_matrix_ops.h,sha256=P9SAYE65ukiBn2y3JF_X4VqrQvsaUwa7eKghq6kNgVU,1933 +torch/include/ATen/ops/feature_alpha_dropout.h,sha256=IEOzoHvVUT665YiE5OltVEEPAfe0VvXSpr6ePW_hwnM,1247 +torch/include/ATen/ops/feature_alpha_dropout_compositeimplicitautograd_dispatch.h,sha256=7MNUIzUIGo9sxRNW51zRFWz71zKqynUZ1syimBzLjAc,1144 +torch/include/ATen/ops/feature_alpha_dropout_native.h,sha256=wxBM9GcRAQkrxu4mApXJknw__KcTf0-E0bNW2dPmvgE,856 +torch/include/ATen/ops/feature_alpha_dropout_ops.h,sha256=tZG4WA1FEFeRKh9PYfY2CSoBn1Q7_TbE-KMTTt_Q308,1961 +torch/include/ATen/ops/feature_dropout.h,sha256=LtdOsP_y4Wddw1fv60eQWaAt9knJzUrPk1OY143IM_o,1205 +torch/include/ATen/ops/feature_dropout_compositeimplicitautograd_dispatch.h,sha256=F1PqkcJwP3bCsmi7KoSCsQAf63AXEZ0dtLa8uFN2wZg,1132 +torch/include/ATen/ops/feature_dropout_native.h,sha256=lN63OrljGMVRMNqx75hZUHlnag9ksf6en-_gb2SCdn4,844 +torch/include/ATen/ops/feature_dropout_ops.h,sha256=CbEAQ33pnNUJrrNlhI_WtvcxtT83J10ixvUMD50FuBc,1925 +torch/include/ATen/ops/fft_fft.h,sha256=M11Bpu6vaLV4EATPMTVOrKmc2ow6bj7EQP3BHzQ_oWQ,5276 +torch/include/ATen/ops/fft_fft2.h,sha256=0wGgXCjXj1dgDBWaRKal1tURy_KuYNC781_uHMCbCHo,5569 +torch/include/ATen/ops/fft_fft2_compositeimplicitautograd_dispatch.h,sha256=VvqQFq-lPF8DjMk3UWxgvXPy0Wj5r8b9JZ-obTng26M,2108 +torch/include/ATen/ops/fft_fft2_native.h,sha256=DlXa0AHqJ9hFlh8ZgGTyl0aWRNi8U3KYsCa6OgHidlI,1046 +torch/include/ATen/ops/fft_fft2_ops.h,sha256=3H6YGe9ney9ZSc3IEOi0s6_cROL5OmLhs1J8XQgGNrw,2447 +torch/include/ATen/ops/fft_fft_compositeimplicitautograd_dispatch.h,sha256=GKBoWJn3LX6pI8xu03uO3t3LC7WG73XUcggG6H3X6eY,2043 +torch/include/ATen/ops/fft_fft_native.h,sha256=OddNp963aPDRrczthntRUIzSYZ8G_bMbO-KiDrBdwz0,1027 +torch/include/ATen/ops/fft_fft_ops.h,sha256=2dGAHOMeDl7jSYdweA4heUOAyZuUKEinx1dimYmbWsE,2383 +torch/include/ATen/ops/fft_fftfreq.h,sha256=NWlzS0IjAhh8GpcAFQUpilkG7BiKRw_i5b5gjLcvfFg,2018 +torch/include/ATen/ops/fft_fftfreq_compositeexplicitautograd_dispatch.h,sha256=h6v3goHYS8qamyTY5hxLZhkayR8LntViOgxNprp9umA,1416 +torch/include/ATen/ops/fft_fftfreq_native.h,sha256=J0Ii11CbYNVM_unyCRA_w6_QxSKp8aFspiYKsG5XAfs,971 +torch/include/ATen/ops/fft_fftfreq_ops.h,sha256=X7uK1Ndy6eCHNRUjLq8GaCblOYYyVz7Dc92q1o2GUgs,2319 +torch/include/ATen/ops/fft_fftn.h,sha256=UeQOT38Q76hI-5Ew_utnNhk4uTgIItOHt6IDuzK2N7Q,5709 +torch/include/ATen/ops/fft_fftn_compositeimplicitautograd_dispatch.h,sha256=JhEq2CWFST3wpAvyYLp5SZz69By_sMJqa4Q8R7ORX2s,2184 +torch/include/ATen/ops/fft_fftn_native.h,sha256=p0c7bE0iNWEtS4vBIa0BHkCcoKE-7HanIsdgJzBgO9g,1069 +torch/include/ATen/ops/fft_fftn_ops.h,sha256=S9c5O5I3TD_niIx8KO8p4j6Sodrek1oeNDvGnkiEG0Y,2491 +torch/include/ATen/ops/fft_fftshift.h,sha256=yQ_WiuirsiiizCi5okKsFKPcZeqbYe2w7VGrqmjtreg,982 +torch/include/ATen/ops/fft_fftshift_compositeimplicitautograd_dispatch.h,sha256=Y6LA_tyxazzn5yP8ykkFy9oHDXD686CO-XgF3dgTUDw,1068 +torch/include/ATen/ops/fft_fftshift_native.h,sha256=MOa0EAZlLvy7FiwenLfs4c1PMtdf5Cz2tA_NYLmu9jI,780 +torch/include/ATen/ops/fft_fftshift_ops.h,sha256=My5Mjv45q_Auc_lePE-Vw4l6e0uuASnrkpYOxAwgGlM,1330 +torch/include/ATen/ops/fft_hfft.h,sha256=gTfDc8GGlPEeHdDeb2_di2dLfE2M1d1OVLRQ6LNnEzM,5307 +torch/include/ATen/ops/fft_hfft2.h,sha256=uy1oF3Zc4ycrNRgDXqJSaQVFJWa_fG_hl9SYpeJZuXk,5600 +torch/include/ATen/ops/fft_hfft2_compositeimplicitautograd_dispatch.h,sha256=GcOG-F5AlVA03Uu-opJlJDW_Hua8RkXqfVylXBqhDiQ,2114 +torch/include/ATen/ops/fft_hfft2_native.h,sha256=qTENpXwSHQnjhuBL9d4Lv1Ydg4-w7yHJ9le-nAuApJ4,1048 +torch/include/ATen/ops/fft_hfft2_ops.h,sha256=dz_0r8pezT9mTLexp5iWR8VFjDg_So8YP5ZTvluF65k,2453 +torch/include/ATen/ops/fft_hfft_compositeimplicitautograd_dispatch.h,sha256=Yr3snNmW-G92XJftSlhmumUdmXZSk2TXlbUvVEGHz-A,2049 +torch/include/ATen/ops/fft_hfft_native.h,sha256=uQ05CzOpegxwzk7QbaGHVXyNvtwkJ9QBHFwR29zx9-U,1029 +torch/include/ATen/ops/fft_hfft_ops.h,sha256=pBP291CrOQnonQ8o0WZgd98rriqbT-G9jK0zcdKh9lg,2389 +torch/include/ATen/ops/fft_hfftn.h,sha256=yqW73zTcfcuKqAFCxZ-3d0m-cm-K6jVWqdWlmjAZYVk,5740 +torch/include/ATen/ops/fft_hfftn_compositeimplicitautograd_dispatch.h,sha256=oozUau26mclGYm0yL-J5_RKK5KQNyKDnJuK5Sd65KbE,2190 +torch/include/ATen/ops/fft_hfftn_native.h,sha256=zk72mLw0fLEOxKqfPHmLZvnPrIA51UEKMtvrRQp1woY,1071 +torch/include/ATen/ops/fft_hfftn_ops.h,sha256=rD61ulpbfZEAbxE9lRhhsSzp0xiiOTCwWtxcRsrHSas,2497 +torch/include/ATen/ops/fft_ifft.h,sha256=CbpOXQoczX4zacu2GqtHFGFCXFeLZI8RD1h9x33iOiM,5307 +torch/include/ATen/ops/fft_ifft2.h,sha256=B_UaNZEP4ixm0VaCN1yePeAVryTUZXcyuwxzaL2jgdA,5600 +torch/include/ATen/ops/fft_ifft2_compositeimplicitautograd_dispatch.h,sha256=RWkirtkMD5ZhYC0gXpFclnEKw8bC2qaIE0gpmp3X-GY,2114 +torch/include/ATen/ops/fft_ifft2_native.h,sha256=tXygv1YIADTYK9-xbin8XjibW7M62Myet6uE1wde1Ok,1048 +torch/include/ATen/ops/fft_ifft2_ops.h,sha256=Z0OWp9W9p_q5swvflnI5biPsi62cSghPZTien9XBplg,2453 +torch/include/ATen/ops/fft_ifft_compositeimplicitautograd_dispatch.h,sha256=1sqOD_6xaYPhhFPgc8uERKGbPi3WIF0h0L7NkjxXXw0,2049 +torch/include/ATen/ops/fft_ifft_native.h,sha256=Xs-2NrL6Lfy_OTCMETyGSuBsATYfY2CpQE1GWPWOGtE,1029 +torch/include/ATen/ops/fft_ifft_ops.h,sha256=jHOMhQd4W0PvTorj5jEJUSHW2s6PlyAU7BBnYGXGycE,2389 +torch/include/ATen/ops/fft_ifftn.h,sha256=MV2J_BWthgclOzYjGQP0iBQjVJNhUOoXgC1wIhtqwMo,5740 +torch/include/ATen/ops/fft_ifftn_compositeimplicitautograd_dispatch.h,sha256=ylI3iuR3GdhmE7OUP-3vMiLc2xy8qt8Na79CyTGKRlY,2190 +torch/include/ATen/ops/fft_ifftn_native.h,sha256=fh33OfkdYJ61_frIPaQImVbqek7FY8D4a3W0ARC5uRw,1071 +torch/include/ATen/ops/fft_ifftn_ops.h,sha256=_5hcv18jtNgpsKqCaviRENrdMRjs6vNtg61ygHEHAUs,2497 +torch/include/ATen/ops/fft_ifftshift.h,sha256=Ia5BXMcCS0jTGN3PQm35eOxnjwCQYlStRwAdUnSyT50,986 +torch/include/ATen/ops/fft_ifftshift_compositeimplicitautograd_dispatch.h,sha256=psnZTfM0wpG-8FXJ-Ajd8s9pDH7_uM818XGhynoK-hc,1069 +torch/include/ATen/ops/fft_ifftshift_native.h,sha256=n2aP4vhYXVr4OQ4EG70qAx2F0UAOy8G15XimYXg2a_g,781 +torch/include/ATen/ops/fft_ifftshift_ops.h,sha256=gGh28wwcZPah6MfPPCGbKYzMQvm6hfEqpZ5Qg9QwPOM,1333 +torch/include/ATen/ops/fft_ihfft.h,sha256=OSCim3A5EPy74f8ZGWMMB7cWdiSSSvmQ8i3RH8kGkBw,5338 +torch/include/ATen/ops/fft_ihfft2.h,sha256=BpmKJ-bzeumbdNrFSjmJQaAqM8fNNaCjxbWTdumoSTY,5631 +torch/include/ATen/ops/fft_ihfft2_compositeimplicitautograd_dispatch.h,sha256=NN8-Y6NQ47k98G8-1-mIr3DHpUqc8DPyFG5PW740aAE,2120 +torch/include/ATen/ops/fft_ihfft2_native.h,sha256=3JxULIKOLGbPlkT3mOmimmIIlgzeurjRzsg1MBy4Scg,1050 +torch/include/ATen/ops/fft_ihfft2_ops.h,sha256=H_7TwM9v8CddZDHkn2poXz_gQlKRUf_GEi_4n1Js89k,2459 +torch/include/ATen/ops/fft_ihfft_compositeimplicitautograd_dispatch.h,sha256=sI6YpbPpDngZwybOK03ajz72yY_HDOrdmSAipS2je5I,2055 +torch/include/ATen/ops/fft_ihfft_native.h,sha256=kStcTUMX7krIJjKp260Ix7hh67c121L2XVwAB1xBXeY,1031 +torch/include/ATen/ops/fft_ihfft_ops.h,sha256=k_nqM-o8GS7fYTE40xoDwMKuuQWtCLP8Ssr5w6jg9VY,2395 +torch/include/ATen/ops/fft_ihfftn.h,sha256=hhY_ITrEHKw6zWtg5QdueMuoEN-b4u8zbSy4BI2E43w,5771 +torch/include/ATen/ops/fft_ihfftn_compositeimplicitautograd_dispatch.h,sha256=ElvcxXpbHGHOgSaSFF1av_x_RCMxB_1n1Dz2m74Hlp0,2196 +torch/include/ATen/ops/fft_ihfftn_native.h,sha256=tK0B8zcF85H_r5c5Oo-XnBKr-l7-2wtBxdYCPLgWSx8,1073 +torch/include/ATen/ops/fft_ihfftn_ops.h,sha256=t6K6N_ejJj318Ht9oEBBIFw5Q1-4JAZhu2ayFBcWzEo,2503 +torch/include/ATen/ops/fft_irfft.h,sha256=Aug9ws-ifnVir2-p-QDcnv2HX3AZe6ahT8dghIlUAxA,5338 +torch/include/ATen/ops/fft_irfft2.h,sha256=b4DOMevddnkpxUtXtP3YeaEKcxdRB-flFZD3Ac105WE,5631 +torch/include/ATen/ops/fft_irfft2_compositeimplicitautograd_dispatch.h,sha256=0NzWTteqIn9oCPu7ZW0s-9C6dY9zTmWJcImUMwDkxDI,2120 +torch/include/ATen/ops/fft_irfft2_native.h,sha256=TnQiGSfnTlthusoJFtD_TzffgH5t4UGQIYohO7m8d58,1050 +torch/include/ATen/ops/fft_irfft2_ops.h,sha256=y4HRA8aiKneNL30jIm_0ZBExOC_chI_NNffnTZcGfSA,2459 +torch/include/ATen/ops/fft_irfft_compositeimplicitautograd_dispatch.h,sha256=LgUaE8M280ewQ238ImMNsjaXNlYkBy8BUyHKv88FWXc,2055 +torch/include/ATen/ops/fft_irfft_native.h,sha256=ZYZNyw5MFe8VwDmTDZt7y9D5_LoHEgp4gDDibDtCu-4,1031 +torch/include/ATen/ops/fft_irfft_ops.h,sha256=yyS0WTWqrQ3PEyYgm3YVyU1Z0d1hGCcgLeBZjTkzVHU,2395 +torch/include/ATen/ops/fft_irfftn.h,sha256=fWQ8jaKmicIqAjEXC30fXf7P0qz5PwhU_usqEDpiz_Q,5771 +torch/include/ATen/ops/fft_irfftn_compositeimplicitautograd_dispatch.h,sha256=JUbrqKQPxFnIh1S5X5dOL-FOGYdi8qJa8d_83XBBbwY,2196 +torch/include/ATen/ops/fft_irfftn_native.h,sha256=3rEB4LstsS-A4wNbZ6rZm9IlmPoJsLACu4W9nvGWM6E,1073 +torch/include/ATen/ops/fft_irfftn_ops.h,sha256=tqcyE97ohdbQfBv1yxn0DOjaslFmrFpYTEkcJx_zfi0,2503 +torch/include/ATen/ops/fft_rfft.h,sha256=wXupBC0vkiy3byz_UxgGpcfJ49p4wzX0ZutwYwFyTsc,5307 +torch/include/ATen/ops/fft_rfft2.h,sha256=5aL8vROWEYD5FYWKaLT5uyt2DePnMGpCkTPKt5ejnvU,5600 +torch/include/ATen/ops/fft_rfft2_compositeimplicitautograd_dispatch.h,sha256=1fSxwMhyPrzWghUSmCFaREtLYjs0MlSkbmOvplQhD3E,2114 +torch/include/ATen/ops/fft_rfft2_native.h,sha256=KnRTOTNzW8GqHghack_T-f2LA5F6mAfWbRyEVuMaogU,1048 +torch/include/ATen/ops/fft_rfft2_ops.h,sha256=81kX9nrqx0d_agv4AvbuxB6i3ubWUbqk2OWqs9FCSi8,2453 +torch/include/ATen/ops/fft_rfft_compositeimplicitautograd_dispatch.h,sha256=boLg9FJ5a9I2ZISLHmN1eAWIxcZQS9Jeb-5Gr-h3BrY,2049 +torch/include/ATen/ops/fft_rfft_native.h,sha256=yhX8ogoSu1cfodcYXMsNGJEKL6mAG6t4Xy8jOhbpPDc,1029 +torch/include/ATen/ops/fft_rfft_ops.h,sha256=gRsO4HlemDDbRRJXMMsrg0-ei9OLs9v2qpCXOeU8BFs,2389 +torch/include/ATen/ops/fft_rfftfreq.h,sha256=V0wZvl3hHrSJ38A_0OD-R1kHiCZfeN8FlISXNHaky20,2031 +torch/include/ATen/ops/fft_rfftfreq_compositeexplicitautograd_dispatch.h,sha256=86fPq1shdnB9jGLvDkZnTOn3wz-O-XQHCPxMDkrph0M,1420 +torch/include/ATen/ops/fft_rfftfreq_native.h,sha256=9trMZVfdreHMz5oh6EwAQNlF14RAlWu0XmTC7ulbTEA,973 +torch/include/ATen/ops/fft_rfftfreq_ops.h,sha256=mH0kfDrx70NFYBylozAISjXicttZRRqU_CFqsKU8eME,2325 +torch/include/ATen/ops/fft_rfftn.h,sha256=Los8e2Z1JWQXuLJ4YHiXEvETTen6XU8oDx-LMA20py4,5740 +torch/include/ATen/ops/fft_rfftn_compositeimplicitautograd_dispatch.h,sha256=q6d8x-DPk2utIvXzErWwAWHZfEWQdOOIX9yz7fr_dA0,2190 +torch/include/ATen/ops/fft_rfftn_native.h,sha256=g-dG_BIECIrM2j4otNzH64paS7-S3TAcf3fmyaXvfdI,1071 +torch/include/ATen/ops/fft_rfftn_ops.h,sha256=NyIpFN6IuvWLEb8x5cGSWKdI1rIATr8oNzdsVOigJSI,2497 +torch/include/ATen/ops/fill.h,sha256=CmYsDrpGMo3LC8A3qWCDjquXPN3puo1sqmj_exlmWxE,2528 +torch/include/ATen/ops/fill_compositeexplicitautograd_dispatch.h,sha256=SMbE8E7Cur9L5SPnzHDkMXAQ8hmGrFN2cfEJbDW-rUA,1530 +torch/include/ATen/ops/fill_cpu_dispatch.h,sha256=1wxfvPbjfmKG1p-p6TT8P3xDS83j7D0EfCZ2GXU1Bxk,1070 +torch/include/ATen/ops/fill_cuda_dispatch.h,sha256=mdrA6gVYyEgelG8S-td_a3IhKlptb0Co8ofIe6eBpKo,1072 +torch/include/ATen/ops/fill_diagonal.h,sha256=6MOHN0GTTTQmcnt3tLf275O65XOV1MIH94mZIOVn48k,764 +torch/include/ATen/ops/fill_diagonal_compositeimplicitautograd_dispatch.h,sha256=eOL7prkbALjYa1TH2EV00C0JIvg-WIxO-KIOrtmUXq4,1070 +torch/include/ATen/ops/fill_diagonal_native.h,sha256=fo5-lcVXdX2LcokflqCnXhXkrrcgiuOQ9paqL6eRrVM,782 +torch/include/ATen/ops/fill_diagonal_ops.h,sha256=g-mqRusbFaGWt0qGHHkHT2mUqO5Ndu1z5OAShSJ7piI,1377 +torch/include/ATen/ops/fill_meta_dispatch.h,sha256=15gVrQvkc8Cvpm3MSV3oSuKzDh-SYebjWZ-P-ym7F-w,1072 +torch/include/ATen/ops/fill_native.h,sha256=FINbaiTTgMSkz9m_PievKrWX2z-vdOFMr9uOhaMVnmE,1780 +torch/include/ATen/ops/fill_ops.h,sha256=08a4ZKO6VWXusZm89fzd6AhFln0xEhVwLVwGPTIIhcI,4491 +torch/include/ATen/ops/fix.h,sha256=LjhIoTc-Pc11lqgSHnFhdOG8MeMXOC0xhot8PsahYPs,1384 +torch/include/ATen/ops/fix_compositeimplicitautograd_dispatch.h,sha256=Ww9OtVDxfWUgpOcdmHXD3OPLs7RksbZKq9UTE2mn3xk,1214 +torch/include/ATen/ops/fix_native.h,sha256=DUkMUeoWv4Y_zvX6P07csWwKK9NgpwhXGbc1PmuQvaU,850 +torch/include/ATen/ops/fix_ops.h,sha256=L6-wobHT_ndsDPXDNa4S15uycQ5gQKtruC2NHLsi6ms,2273 +torch/include/ATen/ops/flatten.h,sha256=g50AuLO58HKIYSPalb6lTbZvG0lZhX6JhFAuC_3MQck,1894 +torch/include/ATen/ops/flatten_compositeimplicitautograd_dispatch.h,sha256=qjL8cQD86Ti-HIfj7asT6dLP3seAEjbCGdxK4WDQ7SM,1390 +torch/include/ATen/ops/flatten_dense_tensors.h,sha256=hQzF31WjAfioGMzTst8m5Yh5oFpeKTO3_gXx3HZYETY,958 +torch/include/ATen/ops/flatten_dense_tensors_compositeimplicitautograd_dispatch.h,sha256=mwmLr9TQmOa2YUcyrSvtCOpDhXoiz3WmtmLcV0EsoBk,1032 +torch/include/ATen/ops/flatten_dense_tensors_native.h,sha256=baRJPS0D3sDDeiAtG-FLl46Y5e9Sp4-jrnFLeyaEu_s,744 +torch/include/ATen/ops/flatten_dense_tensors_ops.h,sha256=-wk6ErOd0adX6xxzSyjdFaGqdxmpEOUHZQacUUrCCS0,1255 +torch/include/ATen/ops/flatten_native.h,sha256=Hco0dxlohS1AwgCPY_NmzSj0m3nPbVXhEE_1Rn2UvYk,1102 +torch/include/ATen/ops/flatten_ops.h,sha256=hkiJwHh6Fp0TIh--jrUEv4Zg7a-PNpxr5N7fTJSctOk,3574 +torch/include/ATen/ops/flip.h,sha256=2rRZdFRuX7vbvvMxjsg8-EVYifzDso60Rcp7t6nxqNE,1381 +torch/include/ATen/ops/flip_compositeexplicitautograd_dispatch.h,sha256=otnkQYBXa0NOI33GtBMW7JtD41-RDX8JaIMwjxQYrDk,1161 +torch/include/ATen/ops/flip_cpu_dispatch.h,sha256=6BVlvIbh_YM5pGjTHgewv5hG-QDMzxsHaX69N4NIhPo,994 +torch/include/ATen/ops/flip_cuda_dispatch.h,sha256=j3ZoleuxEb3q8S7ZUCWApDgOLmhLkkCnvRj_AgcC7AU,996 +torch/include/ATen/ops/flip_native.h,sha256=5Cfw7aoDe0kaqApnodI4w0eIU6INYofELgwwy_w9fTM,848 +torch/include/ATen/ops/flip_ops.h,sha256=Ytnfwlev3m8eCrDoTt02QeD4ICwb6R7KgOBeM6jjHaE,1935 +torch/include/ATen/ops/fliplr.h,sha256=kVQMLQ7M1sBGTDI-XB-S9z2rnYiVMt9qcuHZ3t01Ryo,891 +torch/include/ATen/ops/fliplr_compositeimplicitautograd_dispatch.h,sha256=1ZXDrZTe_PEYlSKfLQfsS1Ya-418EjrMoSX0VbRaho4,1018 +torch/include/ATen/ops/fliplr_native.h,sha256=rMJyOgWZgN8B-nblfri1vyYCpy7dvidNPe6YwyHdjiE,730 +torch/include/ATen/ops/fliplr_ops.h,sha256=-AE_Av2caiEDa6pMpsglj17cFhGIlrJdxnvR1W4sAN0,1211 +torch/include/ATen/ops/flipud.h,sha256=EU_INCEcxy8U-uv8TNN9nf5KNsJ3Y43eDo0Gsdh0MrQ,891 +torch/include/ATen/ops/flipud_compositeimplicitautograd_dispatch.h,sha256=3j-jfDVZvyoOqh-EyQsZ5V6kXzcNbhsG9_X-at2Gpm4,1018 +torch/include/ATen/ops/flipud_native.h,sha256=4hbi2pH6fdLMEbSSfVqWETvRrGVuErvXrMIAG2aN7yE,730 +torch/include/ATen/ops/flipud_ops.h,sha256=H5M9oEFOLn9b9vwSGYplNthValqHCVq9NCmn42dxcWw,1211 +torch/include/ATen/ops/float_power.h,sha256=p_WfNyBweg7YRlGF20luBXFYm4VJDhJy0Y6CNnoT8aE,3185 +torch/include/ATen/ops/float_power_compositeimplicitautograd_dispatch.h,sha256=3g36PswNAx6RgKDLaVZ5BQTK5E21v5F0eHigQyLxL6A,2073 +torch/include/ATen/ops/float_power_native.h,sha256=CNKKLNUxh57vqzCDX4zBtGrJN86iqZ82XpkcUTlmqpE,1446 +torch/include/ATen/ops/float_power_ops.h,sha256=ylPgKexYH-oXFhNQGj3_5AUSPRtou8oRGjHb_YkJlOc,6106 +torch/include/ATen/ops/floor.h,sha256=jeMqZhwHjHFAxDoRfBWEaPC0TcKTcFT8jeMrtUoq_ug,1410 +torch/include/ATen/ops/floor_compositeexplicitautogradnonfunctional_dispatch.h,sha256=KxcARUIkRIxefK_mieTzzFPE765ud5D_zQicBWxAdzk,1093 +torch/include/ATen/ops/floor_cpu_dispatch.h,sha256=vZD7gChTT-a8EH1fIsbOcuuvqxbyHvbJSi1rVQUwyGI,1178 +torch/include/ATen/ops/floor_cuda_dispatch.h,sha256=RpDy36nL6nYMGswyyKUKTgAEAvsdkzmTVPmGIPTUuRc,1180 +torch/include/ATen/ops/floor_divide.h,sha256=-G13tDwJbvESjQQ3bGAf9P-c1pKS-USjrGwEBaEaZHk,2244 +torch/include/ATen/ops/floor_divide_compositeexplicitautograd_dispatch.h,sha256=JVHa8paW7S8RGEhigBT39u77dfc-AK4DTfXxrejnkoE,1354 +torch/include/ATen/ops/floor_divide_cpu_dispatch.h,sha256=YGvvcwlAyxmCf3UolSOfV_9IyW2srv8aWFztXZO5OnQ,1310 +torch/include/ATen/ops/floor_divide_cuda_dispatch.h,sha256=5W1PuMzmsZOp6mlaHR7bMgiLaqiX4TbN1dJFyR5yK54,1312 +torch/include/ATen/ops/floor_divide_meta_dispatch.h,sha256=K7dTzgvaaCm9ijjhuaYZuj2PF4bXM2KHtWcCcSDGuTk,1005 +torch/include/ATen/ops/floor_divide_native.h,sha256=7tfQOpKTR5IoBSFqwHUsXCB3gc4yjtgIMtjbLb1JzmI,1549 +torch/include/ATen/ops/floor_divide_ops.h,sha256=bhIBBESa_XKcsbbnVj1LHoIVZqJ0QTS-KAVxAmLJuyU,4594 +torch/include/ATen/ops/floor_meta.h,sha256=i86x47d9H7yJsclw1Ti-HE2jVhJMPsfdfH08Gixtzpw,820 +torch/include/ATen/ops/floor_meta_dispatch.h,sha256=puYl619XWp4Ps0IM6Sk_8QKbR6CzA2CnmZrg116SHzc,1180 +torch/include/ATen/ops/floor_native.h,sha256=L19rirdAt1vQNq3RsGaRWw5rMWxBdRh6_K8_uxeVBNk,1261 +torch/include/ATen/ops/floor_ops.h,sha256=-9ZqNwqPXO37mPBu5n35ffp7t6unQJG4hThKjOJ0FMU,2291 +torch/include/ATen/ops/fmax.h,sha256=C8xrycKj0rAkQ87es-fFKDiGCrtik3J1nAJRNysfkzs,1402 +torch/include/ATen/ops/fmax_compositeexplicitautogradnonfunctional_dispatch.h,sha256=CJ4yQK6B8tc8VJHsS0cr4T9K2kCAXnnnXS3yMevzGgs,1068 +torch/include/ATen/ops/fmax_cpu_dispatch.h,sha256=Mj5TBFWU6BdTslprzpiCPrreCmtbT1SFJy2UqIRlNko,1203 +torch/include/ATen/ops/fmax_cuda_dispatch.h,sha256=1_swZzGFZu_YHxzk5MYHG2Nl6Cd5Q_6e5o93bACEklU,1205 +torch/include/ATen/ops/fmax_meta.h,sha256=VQzFhCpOHumFB7J7h6a3yQDQUcvabsjF5jjkoNmgSFo,845 +torch/include/ATen/ops/fmax_meta_dispatch.h,sha256=88I5nqvOuHgZM4s7wBNK30jluZ7tIf-YjiMvPiY8W14,1205 +torch/include/ATen/ops/fmax_native.h,sha256=7Zuy1wo9ieWjUOcqKIBx4poJn3iztBodsSpmIzYYUaQ,870 +torch/include/ATen/ops/fmax_ops.h,sha256=grtHjIIueHpaM77vrwhy-i6VXOFkmzRePcNkgCjfzto,1961 +torch/include/ATen/ops/fmin.h,sha256=LtR-fLULsZd9lKA4ryRFCOToxLuzv2ZjpaxdE1RODbs,1402 +torch/include/ATen/ops/fmin_compositeexplicitautogradnonfunctional_dispatch.h,sha256=-PFMakY72hswvDN7x6rpEuleI_zLy2SvFFuaXLAsDkE,1068 +torch/include/ATen/ops/fmin_cpu_dispatch.h,sha256=RSsjBPS7j0xoAlc3lxKir-zy1tCkBG1IR1I-0P9md3Q,1203 +torch/include/ATen/ops/fmin_cuda_dispatch.h,sha256=PBUqaAsBs6gdczqr4Tv0IXy0NcAuVJVTTmHE8OgOGfQ,1205 +torch/include/ATen/ops/fmin_meta.h,sha256=asGDdC4BJCNclr5liYoPogohKHxW9eqf3yJVZixFzbU,845 +torch/include/ATen/ops/fmin_meta_dispatch.h,sha256=DOztqHYtB_wPICD7KnZbuReubjU3sy5ieecsZ6PpWhs,1205 +torch/include/ATen/ops/fmin_native.h,sha256=WapxsiIYYKqXK1m8pY3-a62LIYsvMYkC7aSGK_kHhcw,870 +torch/include/ATen/ops/fmin_ops.h,sha256=b4LZPNU1-K5_2U5C9ZJr3ObpfFygWBxz_1ONVngawB8,1961 +torch/include/ATen/ops/fmod.h,sha256=OJxMPap8iFBFybff9t5kryaO-lTRXttTAoYfPRttyaE,2134 +torch/include/ATen/ops/fmod_compositeexplicitautograd_dispatch.h,sha256=_bAyJn5u-v39eSmgWTlEsZx50J2ll9IrtYbKdMr7Ve4,1322 +torch/include/ATen/ops/fmod_compositeexplicitautogradnonfunctional_dispatch.h,sha256=RqmMhxykawrRTo-nrCWkUMrj5TVFuxJzQzg6k_TTGMc,1143 +torch/include/ATen/ops/fmod_cpu_dispatch.h,sha256=Lza0K2I5e1p84KQOP53lrcyjUwx1r_feAIipwK05Cv4,1278 +torch/include/ATen/ops/fmod_cuda_dispatch.h,sha256=s3cTmJQC_4n2DR9xlGaVy4-s4vzLKimIx8D-ImjJWPM,1280 +torch/include/ATen/ops/fmod_meta.h,sha256=C1Jpy-wydYgr99CDE0fXxP9iNmRheNY3CXvsAWw10iE,852 +torch/include/ATen/ops/fmod_meta_dispatch.h,sha256=6nX20SaIF9N8vy_VX9ZQbniey4W87tJ0k1-WLw-ffNE,1280 +torch/include/ATen/ops/fmod_native.h,sha256=4fIEEWKrMzfDtfi4df2IIYjbeHQ7R0wmAOjMEhYoKU4,1132 +torch/include/ATen/ops/fmod_ops.h,sha256=iX2alweqSvcLvAqq62fWjrah-wlqfaTBbV-ZfFKkD-8,4491 +torch/include/ATen/ops/frac.h,sha256=qY580vdXLvpcuzvQbieYB-4i9Lbd6jMVSY6o4uqSD5A,1397 +torch/include/ATen/ops/frac_compositeexplicitautogradnonfunctional_dispatch.h,sha256=qsVHJtG7pueSSM9RgwvveigUPOWU1xM-inMzPAMD68c,1091 +torch/include/ATen/ops/frac_cpu_dispatch.h,sha256=sU0VMCJ_gaPO-FlYYxIj4jux4OXk5nX9XIK2O3mEyRI,1174 +torch/include/ATen/ops/frac_cuda_dispatch.h,sha256=t5re6MKQvGtvB08VMd8C28ByXL9gXDV6rKQTOw0tuzA,1176 +torch/include/ATen/ops/frac_meta.h,sha256=RYWiYd5NTHdmBY9uoE5fmgTDiepOSVDP9id6dG69fuU,819 +torch/include/ATen/ops/frac_meta_dispatch.h,sha256=wK11eaXrEGI14x5Yqq8qso6ldJmWE2gTIzJFQCX3kUk,1176 +torch/include/ATen/ops/frac_native.h,sha256=aIR5V8yg_K1pZ6F1y3pJ5uE0qnmgRxEqyoXLbq_Q-F0,1252 +torch/include/ATen/ops/frac_ops.h,sha256=Qt3H4DnwZKE-AxfZJJgapP5JpU5nFLof_u8rF5MR8QU,2282 +torch/include/ATen/ops/fractional_max_pool2d.h,sha256=cxNTlUUqx8QyneQ_C2QI--bHxr5smaJOHak4VAzFHTk,2274 +torch/include/ATen/ops/fractional_max_pool2d_backward.h,sha256=SqwUjv4KyMMlEHjZMfvdubt9HBxaSVsmnEs8eUuv1Ck,2317 +torch/include/ATen/ops/fractional_max_pool2d_backward_compositeexplicitautogradnonfunctional_dispatch.h,sha256=rpaTwPZScDBQR_r9yQr0DPY27AoxlBOovbTpve4FZBU,1186 +torch/include/ATen/ops/fractional_max_pool2d_backward_cpu_dispatch.h,sha256=SYpAqGh2YyEpR-HkhNlkkWSUICwFI3Eu8Ps6TJWEdu4,1571 +torch/include/ATen/ops/fractional_max_pool2d_backward_cuda_dispatch.h,sha256=aB4QDIhPLBRSLrxnzDJUNx_4yY6PuiFHF2OdG2ZWkjM,1573 +torch/include/ATen/ops/fractional_max_pool2d_backward_meta.h,sha256=GThhHLOO1b8mGaEGyOtYnGaLDaNkPvhZnIWbTYEtE64,963 +torch/include/ATen/ops/fractional_max_pool2d_backward_meta_dispatch.h,sha256=tF3BQc3Pxozu662IB6gROAUHMPW0-hffLMKymd1ptTc,1573 +torch/include/ATen/ops/fractional_max_pool2d_backward_native.h,sha256=8Dc6nr3djwjesHHa_V8u-U1oQqxV2BijQZfzUTJ_hrs,1362 +torch/include/ATen/ops/fractional_max_pool2d_backward_ops.h,sha256=HURVUw_JKGc8QFFa8EF7MOoi_GqXzu8KK3bcJkFvkAM,2759 +torch/include/ATen/ops/fractional_max_pool2d_compositeexplicitautogradnonfunctional_dispatch.h,sha256=Vfyaj2bpg5DLXulVAp7pfr7yiRt-ulmf8wNy6nUwXNc,1177 +torch/include/ATen/ops/fractional_max_pool2d_cpu_dispatch.h,sha256=0V-fmkeZH-RDpFZGdyaLkVwHHRsJCOKuptZRCrf89WI,1584 +torch/include/ATen/ops/fractional_max_pool2d_cuda_dispatch.h,sha256=CKZmmpH90_hn8hZ_UiB2mj2UtU1FB9oyaMsE-mbwfEg,1586 +torch/include/ATen/ops/fractional_max_pool2d_meta.h,sha256=Bgr5f2-LrgPvrFR5CMZaH2RFrP_TaHB9vrmfEU34ELA,929 +torch/include/ATen/ops/fractional_max_pool2d_meta_dispatch.h,sha256=PagdMeRMM2tkhaJMGriTXL3MVTMhuD_roMJrWMCpkX8,1586 +torch/include/ATen/ops/fractional_max_pool2d_native.h,sha256=Mt9PbQxk2PwIiEGBDk5-suNTccnKuVMx2Yw6QitWkJw,1323 +torch/include/ATen/ops/fractional_max_pool2d_ops.h,sha256=fw9DKaasKi6l2PGaXmrLoiHfpzIfbzDJQcoMf4lsEko,2773 +torch/include/ATen/ops/fractional_max_pool3d.h,sha256=p0ZIF4OZoYV34lnO1_UPci5s7HGp7h7VRJDQOmGxTnk,2274 +torch/include/ATen/ops/fractional_max_pool3d_backward.h,sha256=_CFhrWIpHXBduLpEVb1XWlhrA0mnzo6-gAfJggi21og,2317 +torch/include/ATen/ops/fractional_max_pool3d_backward_cpu_dispatch.h,sha256=fH1a9hlmo0qyXDwQAYWxK-Ozwd_SpTO1kOse4UiNz7s,1571 +torch/include/ATen/ops/fractional_max_pool3d_backward_cuda_dispatch.h,sha256=XFl-vsQnMLVpeDhRO--AzJhcwwHrE3sDrIdulurmEGo,1573 +torch/include/ATen/ops/fractional_max_pool3d_backward_native.h,sha256=URU5O3duKKLPz3liV-EsY5IWgypU4eyewVpa8ArL4oE,1540 +torch/include/ATen/ops/fractional_max_pool3d_backward_ops.h,sha256=HahbbIEB9on2PBL3aS_JhMd3NZPCSmJ-j1FtzeKYoFo,2759 +torch/include/ATen/ops/fractional_max_pool3d_compositeexplicitautogradnonfunctional_dispatch.h,sha256=mvXd0szGn6Np92Y4GeCqYtnyi6araZHJF0gTYfN9AJM,1177 +torch/include/ATen/ops/fractional_max_pool3d_cpu_dispatch.h,sha256=C6Hx4MhTBY58O_L_eMaMepRMH4ZNbOEdTT52LldCo5o,1584 +torch/include/ATen/ops/fractional_max_pool3d_cuda_dispatch.h,sha256=NwWnlhnKMC3x7yQEJQgObe6u-JNZBuXhqCXKn7w6UG8,1586 +torch/include/ATen/ops/fractional_max_pool3d_meta.h,sha256=uHzdLcs_itpvkm-8Axv1V9Ni8d9RKaMY9lHoWmpd1HI,9861 +torch/include/ATen/ops/fractional_max_pool3d_meta_dispatch.h,sha256=clnwBmvmZ6tCt9iFceJ0lv8xFyoBImN60bC2zJGW_yk,1586 +torch/include/ATen/ops/fractional_max_pool3d_native.h,sha256=jJZjNstcckPWOIX-0Su_Jr7Ue385hk5j0pShh-G-_AY,1593 +torch/include/ATen/ops/fractional_max_pool3d_ops.h,sha256=kUKtr4xY5oeknFc50d8NIgE10iWejSuGP2k9azrIyKQ,2773 +torch/include/ATen/ops/frexp.h,sha256=lsto9Fz9Gce5RkHWxWlVFrVgFF6tck8DGv1rljq0SE4,1622 +torch/include/ATen/ops/frexp_compositeexplicitautograd_dispatch.h,sha256=gkewRnZ-TlaXiFdePQuPkUNctjxs68glpFBG9Fiz-4g,1042 +torch/include/ATen/ops/frexp_cpu_dispatch.h,sha256=uZsXm8jR29ztFjYcZf2IZuy_Umx91ik2h937U5X_g8M,1185 +torch/include/ATen/ops/frexp_cuda_dispatch.h,sha256=DAB94PU4tagA3yOQ7uzuhwMGhev5UoPj3YWkHs8tc1Y,1187 +torch/include/ATen/ops/frexp_native.h,sha256=R2xmWQm9i6MsNwOyLyzrw_eZBsuScIgQfNhOS5jRg6M,886 +torch/include/ATen/ops/frexp_ops.h,sha256=4-DwHjVWJpHZdDQMIOXEBSg4Xrk1Bukn5_xwc9n_dB4,2148 +torch/include/ATen/ops/frobenius_norm.h,sha256=Ljau3LSqZpAOClM4xU0XN58hokwbFGxJH47WLhZ3QwM,1624 +torch/include/ATen/ops/frobenius_norm_compositeimplicitautograd_dispatch.h,sha256=Qrou2XNU8ZQyJDsEwnmOpHJfjvj5ic8JJMKl4Nk5LHk,1316 +torch/include/ATen/ops/frobenius_norm_native.h,sha256=SXauc9EZYRCpU4N7KpgWUuvAosUxSBngI9OmPGj7NbE,900 +torch/include/ATen/ops/frobenius_norm_ops.h,sha256=jiB3kfUvIrnswqUF_PR1EGz0klvn6OQ-g4wgljRBdvw,2110 +torch/include/ATen/ops/from_blob.h,sha256=2aU1uljA--xA1E2lUlY1OwTen3mWY878Q6swjXnx8qE,4408 +torch/include/ATen/ops/from_file.h,sha256=bKqQNCw9ThLSVYi6NPa17nvK8_o1Y1km4P92XQc6TIE,2462 +torch/include/ATen/ops/from_file_compositeexplicitautograd_dispatch.h,sha256=g-J2jY9VRLBVbHsL06rKqkB4jJ8MnnWxW_f3vyuvPJE,1270 +torch/include/ATen/ops/from_file_cpu_dispatch.h,sha256=W33xVoEQr2c8e6G7-4IZ01eywWEads4iAWQZ552oR80,1352 +torch/include/ATen/ops/from_file_native.h,sha256=ytF2a3bDdutQvN4glY23DBoCzTomT-EYrSmNkTvWCMY,1114 +torch/include/ATen/ops/from_file_ops.h,sha256=cSxTyW4huzL-pBY0un9o3B4egw2Vp1qf64BgGoyFf-A,2727 +torch/include/ATen/ops/full.h,sha256=W_KL7PH07h_yCHFMPDIlz_p982ZDDhvDIWD2dikO6Uc,8171 +torch/include/ATen/ops/full_compositeexplicitautograd_dispatch.h,sha256=oZEQbovNU2DNRy7FymH-pRt_43maViEhQlA7RiKLQwA,2800 +torch/include/ATen/ops/full_like.h,sha256=_kjVJ5ccsE9Gj0zHyUDVMpV0CY78_Il9MjfIslic6eM,2710 +torch/include/ATen/ops/full_like_compositeexplicitautograd_dispatch.h,sha256=GMOt6ayOgfcK4CtV0FHYawSaUhU1n5JeUmxo1LoUTN0,1766 +torch/include/ATen/ops/full_like_native.h,sha256=l-CUK1VokH7LWXbacXCizZy4FG2wiscYILZvMEt_ccQ,1146 +torch/include/ATen/ops/full_like_ops.h,sha256=PS9-gP2lqGFuicySJKcThE3ZMa3ENX1IlMGDqMRpGps,2851 +torch/include/ATen/ops/full_native.h,sha256=tvuSZfFsBVPYxv-PJIZL5mpdTZZVEwb2C8kX6C1_XDA,1444 +torch/include/ATen/ops/full_ops.h,sha256=cik1svV1fhpgqELsRW6vLavooCo2h0r6e1ZquPTQBhU,4552 +torch/include/ATen/ops/fused_moving_avg_obs_fake_quant.h,sha256=ZqRhBq4mXANLBZtz2KuAIV2_QtzB-Xlt-YwS3AHBMow,1706 +torch/include/ATen/ops/fused_moving_avg_obs_fake_quant_compositeimplicitautograd_dispatch.h,sha256=qpyMZX0q8jPA7hTwZI-y3XIojUoAbU3UzAr-1_XWbjY,1344 +torch/include/ATen/ops/fused_moving_avg_obs_fake_quant_native.h,sha256=fvXyZM3zFbY58f15vtpVh3-EuJgpRDKd2_CytQzgWjU,1056 +torch/include/ATen/ops/fused_moving_avg_obs_fake_quant_ops.h,sha256=_u3kd5Q0WSt7_BVRH1ovEjmYBITPJYNydRFtydgAoHU,2263 +torch/include/ATen/ops/gather.h,sha256=HoyFKag3EMrGK-ODSeaDl0hccTeeT8JhK10hT7IQ0H4,2682 +torch/include/ATen/ops/gather_backward.h,sha256=vhNYOZXNLn0I-JJZ0toD1CYW7TCAZVF9fO32ZGP8gNM,1094 +torch/include/ATen/ops/gather_backward_compositeimplicitautograd_dispatch.h,sha256=RIjP3JnSvef_v51S3I7RbmIw1m6XbkzMJ-l8dG0UANI,1109 +torch/include/ATen/ops/gather_backward_native.h,sha256=o30n_u-LiFTT8u9Vhr3RciyQxXme77elKGBUGvXebjY,821 +torch/include/ATen/ops/gather_backward_ops.h,sha256=aY4hINjO0WQw3XEXoQte0jhnziR0AbXyRpApZGIPomc,1511 +torch/include/ATen/ops/gather_compositeexplicitautogradnonfunctional_dispatch.h,sha256=eWri3P8Ujanm1cdoCnjxia8VZ0rtjT_Qv7Mg6RMIaCY,1107 +torch/include/ATen/ops/gather_compositeimplicitautograd_dispatch.h,sha256=mNPXnlEtLQkca1ezUK3rN35_n5SN1084YPPTqSKlt2A,1370 +torch/include/ATen/ops/gather_cpu_dispatch.h,sha256=pdk3G3NyqS0ljfRv4T7LGu2ekeEkZUJNAWmJBN5AirA,1314 +torch/include/ATen/ops/gather_cuda_dispatch.h,sha256=rbd2ri9hG86gHYxywmMe4pW1F6VDY1R5rKP3Ntzf0_w,1316 +torch/include/ATen/ops/gather_meta.h,sha256=n_-1fl1QfWcfJG7Ha7I1sR83QUesxW4jtNB2PFhf44o,878 +torch/include/ATen/ops/gather_meta_dispatch.h,sha256=T9x3pcLxQVU31e221aLuWswMc17AJ6M-wYk9iMe1rqI,1316 +torch/include/ATen/ops/gather_native.h,sha256=8zkVxZejNyL99eRrcm_EAQIN-xLbf8GNd1xxxzjdzMU,1167 +torch/include/ATen/ops/gather_ops.h,sha256=QrS-Yz7U0XSLa_l_rsy4TAmcKYhAmqDEl3naORDf_IU,3760 +torch/include/ATen/ops/gcd.h,sha256=dsJg-9nh9KIfD26ioieG0GlQA4fFDZJMH8vxmJvjADs,1572 +torch/include/ATen/ops/gcd_compositeexplicitautogradnonfunctional_dispatch.h,sha256=oum-ltk-OvL0q5wDAQssdewVcvt3Jf46rj4cEHw_B5Y,1141 +torch/include/ATen/ops/gcd_cpu_dispatch.h,sha256=YK7nrMwISnF5m07aNmxgYQ0XDxdbVXAiR73X67EX6pg,1274 +torch/include/ATen/ops/gcd_cuda_dispatch.h,sha256=YHFX1WM-B93lVqieNC8ptr8fjGzPfUOPtFNWWqfFH_g,1276 +torch/include/ATen/ops/gcd_meta.h,sha256=GAs9aVubl_vMTZV_0LVjsYYf2lBRvsc3HCy79uhiBgc,844 +torch/include/ATen/ops/gcd_meta_dispatch.h,sha256=pU93t0zI3ktd2heasFWFwkLiwsZ3HHUNgg-R16AM6no,1276 +torch/include/ATen/ops/gcd_native.h,sha256=YQ6UQjhVSHJHfnnd_BfjB6ogsx9V9R2d6MYbHOlF1MA,867 +torch/include/ATen/ops/gcd_ops.h,sha256=s08wXStZ8sm8pl6oMVzHflZ5I5zT7iYeIce5JRQEuDs,2531 +torch/include/ATen/ops/ge.h,sha256=4htS61aHFxyeVyTApFAgWJOFO11-uEqUSiMwwIFzjIE,2096 +torch/include/ATen/ops/ge_compositeexplicitautogradnonfunctional_dispatch.h,sha256=vNmAOi4mf-a5MVqKnxGC-Tc00ta6QWlhpGjYq6sB_gE,1288 +torch/include/ATen/ops/ge_cpu_dispatch.h,sha256=xbip_u5vJr9F9tFnMT748yBohuPtG3S8ThskqDzoxRQ,1620 +torch/include/ATen/ops/ge_cuda_dispatch.h,sha256=MFLhSA7zXyN8veoR9FPTUI3q0OiwSF8f0LQZFzJVZnI,1622 +torch/include/ATen/ops/ge_meta.h,sha256=fAfB6lqROadWzN2r2lTzK1fZyujjjJXeLaoIamqWGgg,989 +torch/include/ATen/ops/ge_meta_dispatch.h,sha256=Cr8asEW5IqeKgiRRZF-JiqvVd47Er2YYHh2M5jF_Lg8,1622 +torch/include/ATen/ops/ge_native.h,sha256=b7LAzyFNtMrv8sQqnp_KZwzXGUS1IcXmOXm8fSxhSjo,1549 +torch/include/ATen/ops/ge_ops.h,sha256=202W2Q8w1E64PoHu_jg8u-S9QoCnS00ZedbtcPkkGcU,4455 +torch/include/ATen/ops/gelu.h,sha256=vl3Y21MXm1J-df-sllHwcHtPA83d9gtj1muB97J8Q7g,1692 +torch/include/ATen/ops/gelu_backward.h,sha256=YBxYppBY7N9ZXurLcZn_Ji0dyfJeercJTCyGmvGmCuM,1834 +torch/include/ATen/ops/gelu_backward_compositeexplicitautogradnonfunctional_dispatch.h,sha256=8Idi-LFD4qMlVtuQZiVB-IrGwK2CcRFKCfHB9Othp78,1120 +torch/include/ATen/ops/gelu_backward_cpu_dispatch.h,sha256=H9ARpmU4_n1AVt5akEWJbQnc1eZa-1jOhROHawB87t4,1366 +torch/include/ATen/ops/gelu_backward_cuda_dispatch.h,sha256=nOxRijUP-6M9bTBnN2oSiVeOKHKt6Rz07GpDqFPCRe4,1368 +torch/include/ATen/ops/gelu_backward_meta.h,sha256=4RHWdiRlzsQCA0cQ9Lge1qR4f-DiE4v6FLg_3ZkGctA,890 +torch/include/ATen/ops/gelu_backward_meta_dispatch.h,sha256=Ixqp-Mls_KEbiyZPDhyYsjYVUMgvGzZhoFKAztx_OQE,1368 +torch/include/ATen/ops/gelu_backward_native.h,sha256=MM-rIHQUSwnxaT2iEnBZEx63xfWo_QyVNkGsyUHU2bk,1448 +torch/include/ATen/ops/gelu_backward_ops.h,sha256=Y-8dgBy0WiWrNg9mavdz13DoSHezCrcDO4QGFqy1blc,2300 +torch/include/ATen/ops/gelu_compositeexplicitautogradnonfunctional_dispatch.h,sha256=deL4YyKRMLXJn68NNqcq_HROSaioghWGTpHvqvXOgNg,1165 +torch/include/ATen/ops/gelu_cpu_dispatch.h,sha256=meuSCIb_unDFHsI37OwVqytfn4eIfWo96LYY2-pLmfM,1315 +torch/include/ATen/ops/gelu_cuda_dispatch.h,sha256=KU-wjmLNzE3nIdHL5IIgT7p1oiktGufk6Dufkku99EA,1317 +torch/include/ATen/ops/gelu_meta.h,sha256=AqCyPaeBZNyao5LrSca2hRVWHuHbbo032346AdsPUbI,849 +torch/include/ATen/ops/gelu_meta_dispatch.h,sha256=FSUWNU62DTEJ5hzCvEEmFZGJZFD2Dzk-lRGbUwtpl90,1317 +torch/include/ATen/ops/gelu_native.h,sha256=wMSEfMwO4_1839qER50KUy8ZKUv4A5Nh1iTpfKFWoxQ,1654 +torch/include/ATen/ops/gelu_ops.h,sha256=zqy2KdqC6XSc2RySVb2mXlWEFPDjGGVl8F_qyg7hzO0,2594 +torch/include/ATen/ops/geometric.h,sha256=v-NdFjyWYWsDemX-jxI-GvoZknYeSOccGec2DG4UKvo,1650 +torch/include/ATen/ops/geometric_compositeexplicitautograd_dispatch.h,sha256=jzHhEsFd2wexc4_aIcMUc4natsMyXo3-NzLvh3PQ0Yk,1370 +torch/include/ATen/ops/geometric_cpu_dispatch.h,sha256=p8VfEpw-FOc6FXnzwiH5tLRQvTpwiKbcUYDf0Kz2g5I,1041 +torch/include/ATen/ops/geometric_cuda_dispatch.h,sha256=YvAXhmiYbpz4fh-jdrLk4EYhmqbxKge8qYSgp9QYnaw,1043 +torch/include/ATen/ops/geometric_meta_dispatch.h,sha256=IqeOw2Vyr7JK3YjG2vIE56O6AuELZSjtYx1o8mepSYk,1043 +torch/include/ATen/ops/geometric_native.h,sha256=wKAgHccAmE7iCxQjDMHrTpF6n_b9t6wO_BWa2zyjIzg,1054 +torch/include/ATen/ops/geometric_ops.h,sha256=4z9ZC0JG-Hw-4OS_PXk4edpTinIXgecYP56LyLOLCUc,2873 +torch/include/ATen/ops/geqrf.h,sha256=6ZAaK9W5gnqMT9-I2Fdl9-JLJrsbV0LUzKgrlZ-zoSc,1464 +torch/include/ATen/ops/geqrf_cpu_dispatch.h,sha256=IsUEeLjkD00l83l8vyZaZs8oZA6Ip25LbrOajqnnnVw,1239 +torch/include/ATen/ops/geqrf_cuda_dispatch.h,sha256=0nm5aDSkk3AAAL8FNP0gyDb3XOCUfKTUMDM5rOPMJ9U,1241 +torch/include/ATen/ops/geqrf_native.h,sha256=yB-UfHfTqHoeJw269yOhunxLYbA6_0cy6O8S41uS2nE,874 +torch/include/ATen/ops/geqrf_ops.h,sha256=0yW4k4sox_n0uGhnU45NgXemLoJ4MnX-4VZWJZsTVZ0,2041 +torch/include/ATen/ops/ger.h,sha256=aiCGNNheihEpYD_ixYKdBJXsD4TZGaIdqhpnBdKkGNM,1383 +torch/include/ATen/ops/ger_compositeimplicitautograd_dispatch.h,sha256=k2Ba7OG0dhYHYu3IAgHQB3WJyv2TmefGdxzutyWgsLQ,1241 +torch/include/ATen/ops/ger_native.h,sha256=fNB_f1Oml7qe0qB9yU3xYrkChJWt-gVBCvW9rMgxi8c,852 +torch/include/ATen/ops/ger_ops.h,sha256=1Sbhv-ZOGTHWPG0GkkRoud1josXU5xgE8CIUivXF-Ag,1949 +torch/include/ATen/ops/glu.h,sha256=xn0SzjqWKMSRqOXgkEXZkztH6YBsVXshaT3shsjVnyQ,1347 +torch/include/ATen/ops/glu_backward.h,sha256=FDTTv0J9QqlFWqKyBW8kPRwEOBWNSjTp9Ayr47yaWjo,1687 +torch/include/ATen/ops/glu_backward_cpu_dispatch.h,sha256=ZIm8KMmVGqMso3kn4ucINZT-2nzTUdlueJGkx_-9e3o,1298 +torch/include/ATen/ops/glu_backward_cuda_dispatch.h,sha256=mEvAf08XBZ3gmCg0RQLwh5aVQBy1P0Hvifa-SmFsbKA,1300 +torch/include/ATen/ops/glu_backward_jvp.h,sha256=AA_MOKMZATomnaCmwl_-gvhfvFpHdYbXTKZKCFZzNFk,2044 +torch/include/ATen/ops/glu_backward_jvp_compositeexplicitautograd_dispatch.h,sha256=AVJNiZgQ7gp6nbhx1ILkJPrPCsy_1-DdPOc1Z-Tlca0,1379 +torch/include/ATen/ops/glu_backward_jvp_cpu_dispatch.h,sha256=w_tDy61KI-6nWWXtphNOqHUcfkd0hla4kUFgmh5yKsU,1103 +torch/include/ATen/ops/glu_backward_jvp_cuda_dispatch.h,sha256=s2sT-xSUKiK2e6UQIptp0pRsLQGDKwYwDv0SitEOmaw,1105 +torch/include/ATen/ops/glu_backward_jvp_native.h,sha256=iMM04n5Kdh0mmlZTb_rox4cSxUO3gJoAjhSjGwuzqAU,1066 +torch/include/ATen/ops/glu_backward_jvp_ops.h,sha256=EqE0X-U2NgSzR6L2MV9IdChg4FPiaVIHjdQkyRhmIqk,2649 +torch/include/ATen/ops/glu_backward_native.h,sha256=XaSHWK6I6N5Q47po4eEY3jj1J11F0u2snLXmuJmYFYs,1176 +torch/include/ATen/ops/glu_backward_ops.h,sha256=udmCrV_gTqRNDaflJyzextzYl9LgskM9Cvh_pOtB-bE,2175 +torch/include/ATen/ops/glu_compositeexplicitautogradnonfunctional_dispatch.h,sha256=Yz7Mrf3IHsvsiO5NT6_DmVJBS1JU398e4vYXZYn6jUQ,1057 +torch/include/ATen/ops/glu_cpu_dispatch.h,sha256=qi_gH8FERbPmwq8KvZz8ob4OWtT_XuB5ZnOSEYPjFIA,1167 +torch/include/ATen/ops/glu_cuda_dispatch.h,sha256=qfT23KGaitJ2Vh11Fu5ozJHlaja7J_Acz5WrtYeovnw,1169 +torch/include/ATen/ops/glu_jvp.h,sha256=RSiGu2RjyHuSW4hDqYLmpkZDQrRj3EhyWu7H8frmF50,1582 +torch/include/ATen/ops/glu_jvp_compositeexplicitautograd_dispatch.h,sha256=YlOVRhc2-P9vV-EzvVHbl1316AGHx9BcbmhAvLhIpf4,1237 +torch/include/ATen/ops/glu_jvp_cpu_dispatch.h,sha256=8SnhMSnKuLy4Z8tbliRzHhTy4Ievwl-YcXS28CaeL-Y,1032 +torch/include/ATen/ops/glu_jvp_cuda_dispatch.h,sha256=aLTW1uPTxdicNR4svAd0I93v1w0og7qc8OH73NK2Q_s,1034 +torch/include/ATen/ops/glu_jvp_native.h,sha256=MeRS6rff1ToGTBWRe1E4ise6oy4RQsZWTP459cZV9Z0,924 +torch/include/ATen/ops/glu_jvp_ops.h,sha256=C8dsRFQ2rGbvhpDBmdr6oC3eReP8LFYW3Ws1eEToLw0,2191 +torch/include/ATen/ops/glu_meta.h,sha256=Ok6PBNZYx3hOC9dqFgZogvhNADAei90MVASTOKUaufw,831 +torch/include/ATen/ops/glu_meta_dispatch.h,sha256=AFOk0jhFDlkAE6h4NT_lJRnmvJIJmImjNls6grPf35s,1169 +torch/include/ATen/ops/glu_native.h,sha256=ZXDHHkGOYagfi644sIYWcXZuDGiLufip_1Hq5iHTR-M,854 +torch/include/ATen/ops/glu_ops.h,sha256=yh0Fh4Wb1-nt-Q27EP5CraohK0njCIN0DOTPmOpwLvo,1877 +torch/include/ATen/ops/gradient.h,sha256=9hh831UQ5KfvlOURZ6l4NjhzCiHST0yoiYOitDG6V64,3126 +torch/include/ATen/ops/gradient_compositeimplicitautograd_dispatch.h,sha256=nYcD48S_G7LNvQL1jMrFkaloxsWl4vgNs8SORDKUudI,2038 +torch/include/ATen/ops/gradient_native.h,sha256=nUnhXOeZz9y9ATk94XY_Wl6FWhpU8r9LuRu3y_3eEIk,1750 +torch/include/ATen/ops/gradient_ops.h,sha256=lTSLz2M9MBBGm56StlK6gU0UX8wMQA-Klp4fEvJJlo8,6526 +torch/include/ATen/ops/greater.h,sha256=qzqSySHLDwlyQhs3XrLFo06ps-WXx25DC9gP-BTPuY0,2191 +torch/include/ATen/ops/greater_compositeimplicitautograd_dispatch.h,sha256=sDCDMOnWIaAG3MWPb4whbh9CQDeiUS4NCK-t-hQkH2U,1704 +torch/include/ATen/ops/greater_equal.h,sha256=FWtJKJRjXKhC99ZS7fTmT3P08XOe0SZBXdsEMx6XFtQ,2305 +torch/include/ATen/ops/greater_equal_compositeimplicitautograd_dispatch.h,sha256=wf_64kCUUS1oa_dDclA6qk7LyXi6_a27DKmPcC8A7sc,1752 +torch/include/ATen/ops/greater_equal_native.h,sha256=Sszs-lNJkw1SUpjn9jua7bMjV1Nduif3TgrY-1GraBQ,1240 +torch/include/ATen/ops/greater_equal_ops.h,sha256=qmq2Ka_uYDqy-XL2MBoEcHLoPUFqvcEyG7kjg8zrzDE,4653 +torch/include/ATen/ops/greater_native.h,sha256=8GxNQvriWPABq6B1OM12x60CI-cmrLitz2p9aTwZpgM,1204 +torch/include/ATen/ops/greater_ops.h,sha256=C4M5YqFs43Ju2Ay7ePW4LK3YueOgapSNKHZxIPzdH_M,4545 +torch/include/ATen/ops/grid_sampler.h,sha256=LD9Ok2tqYoC5UPndDsTDnRyZO7kV0SBPDrD31jMgsjc,1143 +torch/include/ATen/ops/grid_sampler_2d.h,sha256=KFT1UlwovtC6NUTMgFGd6XW-uK61yiVhfaGbPiNa6ZE,2055 +torch/include/ATen/ops/grid_sampler_2d_backward.h,sha256=9Lv8qDvd8Bs1N60DP9_jKZvlQ8NQIof29CwCVoFCK4E,2751 +torch/include/ATen/ops/grid_sampler_2d_backward_compositeexplicitautograd_dispatch.h,sha256=KRIKJ-bn2negsyXTkrx2OTMTIC2vVayJTMxzsUKP7FM,1575 +torch/include/ATen/ops/grid_sampler_2d_backward_cpu_dispatch.h,sha256=ovSy72TICQtbm61xcM1qIfr9cVf3F5dE00hytTmNzvQ,1179 +torch/include/ATen/ops/grid_sampler_2d_backward_cuda_dispatch.h,sha256=14EWRnAqnJUSnSNCVETcvb_go7vLowutSLnF-OUHvck,1181 +torch/include/ATen/ops/grid_sampler_2d_backward_native.h,sha256=gLn0Lob5L-hqhBCE2d-lVwku7nzqQ5lxQX2dgCawl9A,1508 +torch/include/ATen/ops/grid_sampler_2d_backward_ops.h,sha256=XHs90TkJr7_mbgbHChSBBI_sdavYysNiinLwJoLQwns,3215 +torch/include/ATen/ops/grid_sampler_2d_compositeexplicitautograd_dispatch.h,sha256=ljQBVSmyOCZTAYennI08xroLp26C6On8ocqUOJzZzPk,1331 +torch/include/ATen/ops/grid_sampler_2d_cpu_dispatch.h,sha256=7zxZD2jMAtfveSPa3epi4WnqFjH9tps2CwNuxq7rZXA,1079 +torch/include/ATen/ops/grid_sampler_2d_cuda_dispatch.h,sha256=NCfAlqdXkjOpw9ISeIEtjz-KbpOqBBzb04zO_1xX2lw,1081 +torch/include/ATen/ops/grid_sampler_2d_native.h,sha256=5gFDR7dx3Yvh0PO9C9R5IkHztXGyF0MsxQpojsPhJJA,1186 +torch/include/ATen/ops/grid_sampler_2d_ops.h,sha256=_NmGwc4slgnnObZbBLVeD6w6gJuyxlmDwKW-F9iyxsw,2479 +torch/include/ATen/ops/grid_sampler_3d.h,sha256=sDeCvln2qf4qu3bQEvwZh5wXBx_k00eCNIB51dj3DvQ,2055 +torch/include/ATen/ops/grid_sampler_3d_backward.h,sha256=0XcBmRklJYsctj6awz7xdSxt_4X1hPtu4NkJWDzIu78,2751 +torch/include/ATen/ops/grid_sampler_3d_backward_compositeexplicitautograd_dispatch.h,sha256=7Erkhvn7LJQSSmR7qOXhc6BxdNxzAyOCO46qh5OW3Es,1575 +torch/include/ATen/ops/grid_sampler_3d_backward_cpu_dispatch.h,sha256=dtRsgau5lqKu-7Z69N88k09DmVFtWq4t50ux_gk-Aeo,1179 +torch/include/ATen/ops/grid_sampler_3d_backward_cuda_dispatch.h,sha256=LYe6znNZcaEPH9BpN3_kvjBIQlWRRpVtDq28nlMtrQQ,1181 +torch/include/ATen/ops/grid_sampler_3d_backward_native.h,sha256=D4VyUGxZiSmozgbbWbcALARzDytjejRYHsW4oI7rlgI,1508 +torch/include/ATen/ops/grid_sampler_3d_backward_ops.h,sha256=JdK9XZFKywFz2ze3HKYPLAxw9VsD0HgwkkOr8z0BnnE,3215 +torch/include/ATen/ops/grid_sampler_3d_compositeexplicitautograd_dispatch.h,sha256=HeB1Ca2MKf_Oqvpmdtu8EYmphTTBjQ3ehkCZ25rezbY,1331 +torch/include/ATen/ops/grid_sampler_3d_cpu_dispatch.h,sha256=FeM8WVIFus_5un3A9iGLu4NYclnRBHW8Oan-_MdbRZE,1079 +torch/include/ATen/ops/grid_sampler_3d_cuda_dispatch.h,sha256=XJlepHkCgPp-8UDDDlVKMRmWbazDy5nj3BZ1W-aPwbE,1081 +torch/include/ATen/ops/grid_sampler_3d_native.h,sha256=hFch_qdpZRmdh7cSux82tpjuGnutBQF-ct1EpF-XBQY,1186 +torch/include/ATen/ops/grid_sampler_3d_ops.h,sha256=3NHrNc3GrHZj2SZWggPDYVJn69oPEzvfnO3dcBuVizc,2479 +torch/include/ATen/ops/grid_sampler_compositeimplicitautograd_dispatch.h,sha256=OVVInODeVkoinPvRhmfEGPhdm0MkglexEBmBo7XBHSc,1120 +torch/include/ATen/ops/grid_sampler_native.h,sha256=uc3jYmBAyf4Wnw43hqNSYGX3f0S7YWu1ZjMZNh1Wimw,832 +torch/include/ATen/ops/grid_sampler_ops.h,sha256=WQy9BjniNDggIcitPQYXxRxrzUvjSLnp8rWUK-AOqNc,1541 +torch/include/ATen/ops/group_norm.h,sha256=Md9aGrPMKZJxgZ6O4Cmbi4XnvFEIV7aZeFxzsGREL0Q,1209 +torch/include/ATen/ops/group_norm_compositeimplicitautograd_dispatch.h,sha256=lxV6G2liF6LMf1yOhMbqTspk-dGXlAq5fP0y04HfDI0,1178 +torch/include/ATen/ops/group_norm_native.h,sha256=_Uo0D_CATGofe4S-iq_mqjd3969iBH_YGcPqOtkzq0c,890 +torch/include/ATen/ops/group_norm_ops.h,sha256=gKvbxsHXoQj_O7QZf4IVWH8juswLLQ5bzRvNxWBIkyQ,1697 +torch/include/ATen/ops/gru.h,sha256=K5NeoaUxqLzFQZQzG2Xeh0_evEmjwUxlzLktEdUtKkg,1826 +torch/include/ATen/ops/gru_cell.h,sha256=v2dgfe5obQ4tHFCo27x5XsjlBXQYVCwd6qBp8dVdz68,1168 +torch/include/ATen/ops/gru_cell_compositeimplicitautograd_dispatch.h,sha256=GULA8vDuuN9ZgBPDtOJP3x7gYMRHZJoitcLodWUYP3A,1184 +torch/include/ATen/ops/gru_cell_native.h,sha256=6ijjmxKg2vi4tfAxpBDLpsgMI9v2igfzSuL2_Ho3oBs,896 +torch/include/ATen/ops/gru_cell_ops.h,sha256=onqMGqg1LXKYYDNIv_4ayhhAEV489qhltn78iWE2kaE,1743 +torch/include/ATen/ops/gru_compositeimplicitautograd_dispatch.h,sha256=h_6VkDT1dhwlgOmg_rN4AJlVLstpnhzhVkHXeGko5d8,1429 +torch/include/ATen/ops/gru_native.h,sha256=XD2FpZ6--_yx-aE9wMnHuLNVfK2g0zqvVk5QiKXGh3I,1141 +torch/include/ATen/ops/gru_ops.h,sha256=W-YdrUAbeT9JAF2c8dLkOeleDdOQKvep9J226KpOQ84,2943 +torch/include/ATen/ops/gt.h,sha256=CmCWKASvzFZ9M1VJovX8uH34Q526vStvj7hDpVWMZgo,2096 +torch/include/ATen/ops/gt_compositeexplicitautogradnonfunctional_dispatch.h,sha256=NSZDdJ_G1bGiNn3pe-YYUbwWx5zI86lf7-mWW-fn-SE,1288 +torch/include/ATen/ops/gt_cpu_dispatch.h,sha256=lMFDI_bII8HyfD9cY6VX1JIyXO7hHxaK1jJkRpx329c,1620 +torch/include/ATen/ops/gt_cuda_dispatch.h,sha256=d3D8iRz0SM8oSCihqvy3EPh6s1_0oeYyD9knOA_qYVU,1622 +torch/include/ATen/ops/gt_meta.h,sha256=bjIYECmoBhmaMKTls3_ljcpWmBuvurLZiFbvqLndtek,989 +torch/include/ATen/ops/gt_meta_dispatch.h,sha256=_LF7A-xng55zcgEHKFP2_HAWTE5ZY7Iuyl53rLm-w7c,1622 +torch/include/ATen/ops/gt_native.h,sha256=ACWqY-pW4dQ3dasiX2NnvQvPvwMO9xaJ53--v4E-Eh0,1549 +torch/include/ATen/ops/gt_ops.h,sha256=2pB6HoSEhQ0RMXjEhDShDBlX1mrkl0civmeJEuJXdfw,4455 +torch/include/ATen/ops/hamming_window.h,sha256=FyyJIGMLRb0NL4nCw42h2DdpqAGteTTlP4mzLrSlvmU,7292 +torch/include/ATen/ops/hamming_window_compositeexplicitautograd_dispatch.h,sha256=EBQPtI7JcWXfDpF6NHCTA095VvsQgwtgCRGIkv-qwLw,3164 +torch/include/ATen/ops/hamming_window_native.h,sha256=oaRl9aVs9pZm1iBJj3cKw3b4l47ZEx1rcksszVTZUqU,2096 +torch/include/ATen/ops/hamming_window_ops.h,sha256=6axxbCRGscGsuapARD1v4xHb2Jz5h2uw55f6nALGnp0,8030 +torch/include/ATen/ops/hann_window.h,sha256=3CQtp35kyUTx8q_F9KeKJpuq_xVZqbD5yNr3k8VOl4k,3571 +torch/include/ATen/ops/hann_window_compositeexplicitautograd_dispatch.h,sha256=M1TLXUuEciKp4-0K562sGpOG6nQvUx0vtBI_MEZK-hU,1928 +torch/include/ATen/ops/hann_window_native.h,sha256=Qsluvu6NvnYd0NkMQJ36QlRYYYDFeKmFV8QhY7w2na8,1305 +torch/include/ATen/ops/hann_window_ops.h,sha256=ClgbvDRxSz05StaGb6GECqzYTGJG8ZdRL05Qm9Jtdy8,4062 +torch/include/ATen/ops/hardshrink.h,sha256=v4AkR70pPWqzOCN8pt9DX2dLyD4KoO9-8_H_UFloU4I,1482 +torch/include/ATen/ops/hardshrink_backward.h,sha256=p3DL3FVmb-ua_7YSraqXUGNvaW6HdCRC8H0y6l5ZpUQ,1790 +torch/include/ATen/ops/hardshrink_backward_compositeexplicitautogradnonfunctional_dispatch.h,sha256=I9qcMLH-e9Kb-s9sxK2uru8CsAVWUx30BV50Mh35vUY,1112 +torch/include/ATen/ops/hardshrink_backward_cpu_dispatch.h,sha256=X9QDbS8L03BSI0oa_y-TFEUrALfym3ch3cTSWHdTm_g,1349 +torch/include/ATen/ops/hardshrink_backward_cuda_dispatch.h,sha256=0Kg3R8hd1Yizq2fa0Yjjm1j4AxZa74sh2JkNOinMWJs,1351 +torch/include/ATen/ops/hardshrink_backward_meta.h,sha256=1PfH8EQsbe3KqDn-vskQuSV9bAyiwW6r8hARZRXoeX4,889 +torch/include/ATen/ops/hardshrink_backward_meta_dispatch.h,sha256=KSzzTmveGAsorNNOB-oDFLMr9OxmM8XoVdG2Fq7pW0E,1351 +torch/include/ATen/ops/hardshrink_backward_native.h,sha256=AhuOadw4gl7-6_LlpdHp4TLbxft1EoGRqeo13mTcT0g,951 +torch/include/ATen/ops/hardshrink_backward_ops.h,sha256=0cbS2qO66bPfhJnzmYRLa-W7QcagR0hArQrE4wCeGIU,2283 +torch/include/ATen/ops/hardshrink_compositeexplicitautogradnonfunctional_dispatch.h,sha256=P3Q_Ju7TDpOPJTqKJDkAgRiWapwgqvUVsZa6tpbqGSM,1078 +torch/include/ATen/ops/hardshrink_cpu_dispatch.h,sha256=ZcNTVnbczXeP2HiOuR_JZdJMJ7zV79JJABaCR-ZnRF4,1229 +torch/include/ATen/ops/hardshrink_cuda_dispatch.h,sha256=n8au5-nwnKrQnv8RoJLRhTb-qTo-4aynVDPn-19LwUA,1231 +torch/include/ATen/ops/hardshrink_meta.h,sha256=zyKrCYPogrTpLd5ZueUm2U46TPtWLb6M3mfMBgCWRF8,851 +torch/include/ATen/ops/hardshrink_meta_dispatch.h,sha256=_DhDjqnuKEwdzWnPZfEdinPOQ3aB_bM-4yFNSZaudz8,1231 +torch/include/ATen/ops/hardshrink_native.h,sha256=0yNAMTnSz0sCob1mdHjwoeai0N07khAcBwECpncwsUM,888 +torch/include/ATen/ops/hardshrink_ops.h,sha256=WUzSkoeSpr27j3SrAHcGXXGAUMGZM8wb3g-FNoFf5dE,2005 +torch/include/ATen/ops/hardsigmoid.h,sha256=brGWlSoNJ9FGBbvh8V-WLZDDaIgu5DKwprCDmVFm1jc,1488 +torch/include/ATen/ops/hardsigmoid_backward.h,sha256=X3Wagbgdt2lSSN7i-CdsDY3AvN4ZtDP-CV_2w0T_iL4,1686 +torch/include/ATen/ops/hardsigmoid_backward_compositeexplicitautogradnonfunctional_dispatch.h,sha256=qluB9yj4ThqAkpe6MeczqcpZjOrkAMQnVHY9m0bXHG4,1090 +torch/include/ATen/ops/hardsigmoid_backward_cpu_dispatch.h,sha256=hTMduBEVsEW8pBV6Gwa0NkXt1SZQHeU8QQlal0JBH6Y,1283 +torch/include/ATen/ops/hardsigmoid_backward_cuda_dispatch.h,sha256=PAXvzFC3ydQQ-uCNB1qLP8vGSu8jJupN7_XgnMPXbXU,1285 +torch/include/ATen/ops/hardsigmoid_backward_meta.h,sha256=o6buS1fDFRYWLxwJUd-E-3vJKYuAiKR94cIVoFNP6Q8,867 +torch/include/ATen/ops/hardsigmoid_backward_meta_dispatch.h,sha256=ao6zS2EQFNkk8WY8jo-PULEpKT0dvIyn5DAuBoGnB6o,1285 +torch/include/ATen/ops/hardsigmoid_backward_native.h,sha256=5h2m6JbX4oXG930D2ZMUyJKalHVvDZoas8H8vyULBr0,931 +torch/include/ATen/ops/hardsigmoid_backward_ops.h,sha256=_w_zQos8l7nLKs3ZhFXY9OvpWhU2HCbLRC-nK9cBOrw,2135 +torch/include/ATen/ops/hardsigmoid_compositeexplicitautogradnonfunctional_dispatch.h,sha256=uJpvTur1T6EnTaXyetF_ZBViT6eGWGcYCV04wQhtvbU,1105 +torch/include/ATen/ops/hardsigmoid_cpu_dispatch.h,sha256=x69Rk2-jGgjyhZaCaYDhPs5jZOvx0b8Ts3p19y_RBNI,1202 +torch/include/ATen/ops/hardsigmoid_cuda_dispatch.h,sha256=pXw3--3Fg91280E_qeWb6azJ1hyrweYcuukW_DAyg44,1204 +torch/include/ATen/ops/hardsigmoid_meta.h,sha256=0AxhGV39dK8dV8CELTGTA0AHxz655gkCO6iF32ONMqs,826 +torch/include/ATen/ops/hardsigmoid_meta_dispatch.h,sha256=S4LJUEpOBb0Lq1MLYRVjjOnZa4RsHLETO6ErJ6MYgaA,1204 +torch/include/ATen/ops/hardsigmoid_native.h,sha256=Yhj06Bd0NqZzQetCgd3Zn4O2gftz3izt61E_h6VgfNc,1035 +torch/include/ATen/ops/hardsigmoid_ops.h,sha256=nIBmfiMLJrIBJzlIt89ZC0MMJmF2w9eEi2mMye4EGwE,2345 +torch/include/ATen/ops/hardswish.h,sha256=NPdkaxJnLdXrETxx2fBQX5OnU_0S2qGFdHA0LCqEObc,1462 +torch/include/ATen/ops/hardswish_backward.h,sha256=F6J4C7OlRIbDjOnuuE5UJ8YXmbyaxWm2tDVg1HvkiDs,1596 +torch/include/ATen/ops/hardswish_backward_compositeexplicitautograd_dispatch.h,sha256=8tuWr39kiTWe3wdcMjXvILHqpdl1L3Qke0wPVZ1ZYKs,1209 +torch/include/ATen/ops/hardswish_backward_cpu_dispatch.h,sha256=_YVgkurVjT3Y2lPgkQ2NqymLKIEgEJE81tAh_J8VJBM,1018 +torch/include/ATen/ops/hardswish_backward_cuda_dispatch.h,sha256=udWkDTXwXGsZoQ6YfABnD3cHKJb1VI5oPfd9PsF5rzQ,1020 +torch/include/ATen/ops/hardswish_backward_native.h,sha256=n-H0PPZYyd4TWl-7YwhnNmYqUmD_3UHgEIDPGFjklIc,896 +torch/include/ATen/ops/hardswish_backward_ops.h,sha256=96LUi3Y6HM9X_HT1o_Y-Fmh7fVWjgKmgzlISx5BAilI,2081 +torch/include/ATen/ops/hardswish_cpu_dispatch.h,sha256=L48BaSexR4UQMbno6As1lft5DRf8Q4lAMk83ZXmrU1A,1194 +torch/include/ATen/ops/hardswish_cuda_dispatch.h,sha256=ox8utXQY3pXoeCEAMXdVf6jLM_3Rrs2v6K8xv7YJGgk,1196 +torch/include/ATen/ops/hardswish_meta_dispatch.h,sha256=81KVnWt6VqCOHNs9S1rlMMXgsIrNMpFrNbz8z0Lml2o,976 +torch/include/ATen/ops/hardswish_native.h,sha256=MzFXLh3k-boA_Wym8j5qtnNwH6OKsathU5Z7UDtbxhQ,868 +torch/include/ATen/ops/hardswish_ops.h,sha256=HCzdXInIg9ei4WhwwC6hTq2v0myYNiPnPdDrWYQCQHE,2327 +torch/include/ATen/ops/hardtanh.h,sha256=5rmBGsJC8zoAkynQxTfn5nc03bn0oAR5mPcnyW9_PUU,1908 +torch/include/ATen/ops/hardtanh_backward.h,sha256=Kz64IMoPLNp9EEonAP8N0vGjaXiyHlaN-oEO2XHXhMw,1974 +torch/include/ATen/ops/hardtanh_backward_cpu_dispatch.h,sha256=2Xrp4AK41iEA1jKvO5qyn5fVpy1WHUfRWpQ1U9FaI_s,1442 +torch/include/ATen/ops/hardtanh_backward_cuda_dispatch.h,sha256=ZjHrYw7iJOIFKIs2DPuhIBbdaZEMpdFsUlT0tyJOiiU,1444 +torch/include/ATen/ops/hardtanh_backward_native.h,sha256=uy80hqPZkoirL2SjgwQDeVmbQB-Wo2V8s_b9LHu8MLc,1013 +torch/include/ATen/ops/hardtanh_backward_ops.h,sha256=IDNN8AnLNnmR7_CHqEuviAqvgrhi5U-Mz7fxNAM4Yuo,2485 +torch/include/ATen/ops/hardtanh_cpu_dispatch.h,sha256=zO3URwZcWv4XyM4QsxPNqHrAih2EuCHs-GlyhSvP0Vw,1429 +torch/include/ATen/ops/hardtanh_cuda_dispatch.h,sha256=W9k31RCJohNIeEZDI0e6sMEZ2CH8CgWYAM_glAtYboU,1431 +torch/include/ATen/ops/hardtanh_meta_dispatch.h,sha256=tsJCqg01OXhqqRG9kmu5_mmvDDGKyRV45pr9W4BSPuc,1036 +torch/include/ATen/ops/hardtanh_native.h,sha256=pFL0LakwmvhAFO7sGAKiYH9uA5kRzcG9AeS7F3_9ZKM,1452 +torch/include/ATen/ops/hardtanh_ops.h,sha256=FcpiSvBIGhhV54OBSN3x3AAJjx-yfVU0xHRARweHOK8,2885 +torch/include/ATen/ops/hash_tensor.h,sha256=_K4GSgr0ODEiMh4GMFLeW2owM-NRo4fhC0keJRGU_2w,1704 +torch/include/ATen/ops/hash_tensor_compositeexplicitautogradnonfunctional_dispatch.h,sha256=MqDuhbX4RaVYeHO7LgC7OpuOO2v925RejDd0BuLSKYA,1109 +torch/include/ATen/ops/hash_tensor_cpu_dispatch.h,sha256=FCA-al2SwDsuPLI-PrdDEjqhUht2ry5tLebE39L78gE,1315 +torch/include/ATen/ops/hash_tensor_cuda_dispatch.h,sha256=JAjQoyC32yC-RIeMxKdRC8xSKs01JD8VjqguRQK7Ja0,1317 +torch/include/ATen/ops/hash_tensor_meta.h,sha256=2MWgy_rO0XR1LeE4j12FLFCBZJeUUL0aR0xQp6bMzNw,875 +torch/include/ATen/ops/hash_tensor_meta_dispatch.h,sha256=Hnp7ON7_tV9RASK_j_5E5dEWZT8p82Xk2UtHNw6UujA,1317 +torch/include/ATen/ops/hash_tensor_native.h,sha256=V8qQURPUIIUhRH33kNQBCguJ8WvSubLbTluEUhCIWCM,914 +torch/include/ATen/ops/hash_tensor_ops.h,sha256=zLlQSJSaE1GgMnoYESOhHoU8hoGgrIpQcSWKGjEwNUE,2188 +torch/include/ATen/ops/heaviside.h,sha256=TXM03TPE2h_EfIMsfzPnFgl5XPTxy84XUUiM4X9eEx0,1461 +torch/include/ATen/ops/heaviside_compositeexplicitautogradnonfunctional_dispatch.h,sha256=c4algCWF9CNAZONHoUIIP1c5cO6jqpbqKx3j_D1MZOw,1155 +torch/include/ATen/ops/heaviside_cpu_dispatch.h,sha256=QGlf3kg5No0qcI64dVycjcg3pZl1uR1xknBjb1wya6g,1302 +torch/include/ATen/ops/heaviside_cuda_dispatch.h,sha256=6mLKuAZm5I70niFPB2-hDuocuF_BgqlwV35p7uo-tDk,1304 +torch/include/ATen/ops/heaviside_meta.h,sha256=Pr8gCF6nhjYmeyHXc_-9vO6hOG3-o5ukuN2U2wZz-UI,851 +torch/include/ATen/ops/heaviside_meta_dispatch.h,sha256=peVOKxrFNDG48JtzTv6MZrzbO6ygmSLE-inqDbMm9fs,1304 +torch/include/ATen/ops/heaviside_native.h,sha256=uuIlBXYGmy_eQK3Z3xdMhsCu0KEv2EvL7DCDvR2tgPk,886 +torch/include/ATen/ops/heaviside_ops.h,sha256=EixNKEMB3zUxCf_gIXxMV9vvcTTEushbLBuFHS2oxoY,2594 +torch/include/ATen/ops/hinge_embedding_loss.h,sha256=_Kawd8P0i12m5HQx9iRRDA0NvWRJ79xyIISdiCYUyfE,1112 +torch/include/ATen/ops/hinge_embedding_loss_compositeimplicitautograd_dispatch.h,sha256=Xv9X7yRwKQY26ZAvgqzQ2aYM2eF3gPnb_fKe55a4Kzw,1117 +torch/include/ATen/ops/hinge_embedding_loss_native.h,sha256=EoQ7EUDr1Vu5A8HJMimkH54GsjKsbjDicnPjXexLmkQ,829 +torch/include/ATen/ops/hinge_embedding_loss_ops.h,sha256=DdQ6rRnYLHCZar4jV4Xm5m8IvjD-flP-MOVXRKf5wrc,1465 +torch/include/ATen/ops/histc.h,sha256=LdQcPudL0z9WLrekyWU5CrB1DACJvOFqvh5pe7aZbfM,1647 +torch/include/ATen/ops/histc_cpu_dispatch.h,sha256=3NQFjnAH51yWXZzUS8oNXdqwioScqWDYr7kUpSBUZ5Y,1330 +torch/include/ATen/ops/histc_cuda_dispatch.h,sha256=DLzOiDUyznsDIfv8G78IczxTpfLBULMQltq9SFbxWnc,1332 +torch/include/ATen/ops/histc_native.h,sha256=I1dQ-0oPklqqJkoDaBn1G3pqhzwAXDeUdgYFr5dVzgc,1232 +torch/include/ATen/ops/histc_ops.h,sha256=VX1uIOarE6DBY9TprVXtQ5UmToVM7y3XRhWJcgq0uTM,2225 +torch/include/ATen/ops/histogram.h,sha256=vkrSfGhiv1ArjerlM7hFskf-onWjArTVFaARrElBXAQ,3770 +torch/include/ATen/ops/histogram_cpu_dispatch.h,sha256=C4ThtlN9QObPuHOo2M_WGXB49_kSPRGrXCccEjTWOEg,2292 +torch/include/ATen/ops/histogram_native.h,sha256=mc5bJ-TWXkfPuCZNMvEjeVPkWf_E-4Y1MxlmNdATr7c,1543 +torch/include/ATen/ops/histogram_ops.h,sha256=sKFyJ2Dcku75kEZTjZP3ch993dfEOoal1EbskgAmypw,5007 +torch/include/ATen/ops/histogramdd.h,sha256=rOVwTMrfQ5XXTNLr7hotG5DQuVrV0Li76o_txoh26lA,2213 +torch/include/ATen/ops/histogramdd_compositeimplicitautograd_dispatch.h,sha256=wyFoT-gG_BZo2dlYYo3spLX49NXaJZSvgYAJkysfEYI,1699 +torch/include/ATen/ops/histogramdd_native.h,sha256=jLM7bzMKckl6hJvhw0ndJYRVQCygPIqVxyQFZsqHCuU,1411 +torch/include/ATen/ops/histogramdd_ops.h,sha256=R1MLGSvVi4jeaZPAfqDZYd4OdEceW8L9i2Okf8MjOn0,4013 +torch/include/ATen/ops/hsplit.h,sha256=Mlvg3xhYQVUXea_iUc-NOwaapbw77Jrt4f1QNkmVvwM,1193 +torch/include/ATen/ops/hsplit_compositeimplicitautograd_dispatch.h,sha256=uWtCOsxhkkIK76VYFomSbOhMnYW_XP7EwhtVFNO6QW4,1145 +torch/include/ATen/ops/hsplit_native.h,sha256=0yatecVih8I6n2TYNAyaA0xpJT1gIUrYe76LcQRvCT4,857 +torch/include/ATen/ops/hsplit_ops.h,sha256=O5J5ncjApdn1pSvWw504Egex2BNyu65YK_0i5GlN88g,1996 +torch/include/ATen/ops/hspmm.h,sha256=DprT2f7mcA2TB0dUj-l5G3oG_kbkeW5ZILwHUTeXuj8,1403 +torch/include/ATen/ops/hspmm_native.h,sha256=df_HGep2ajOKN2N-UFCGySP8Z8bjk3RX1t_MqWyyxgA,1082 +torch/include/ATen/ops/hspmm_ops.h,sha256=sayAxG2HdU8CSo_JK7u0o67oQUYnO6muOCehBVShemU,1961 +torch/include/ATen/ops/hstack.h,sha256=eJUcmXDPA7vqdQ7W3DOCFkByI5K0sDhEvlUlF7cEeEY,1302 +torch/include/ATen/ops/hstack_compositeimplicitautograd_dispatch.h,sha256=WteoJOs6qqr1IVYK_XnGAd09GKLkMfnmwGQHqzwoKd0,1172 +torch/include/ATen/ops/hstack_native.h,sha256=b-EUGlkrPtoBpRrAlbOTpZlSxjhl27YjqjbYXPKrgiA,806 +torch/include/ATen/ops/hstack_ops.h,sha256=qwxIOi_nuIw-EiAm3UdAvbHmg053DP1w8esyvZJSnlY,1799 +torch/include/ATen/ops/huber_loss.h,sha256=xuS_FrxHsefkpAy0T4JI1zuRbI0aOCtuUovE-8Hz0Fs,1783 +torch/include/ATen/ops/huber_loss_backward.h,sha256=tByeJ-n6vEsGLj7_tVYzICda7yswkuDMyADv3IBtVbA,2035 +torch/include/ATen/ops/huber_loss_backward_compositeexplicitautograd_dispatch.h,sha256=w7-u4rSO8MCq9-6ZUYMAtge0bQMjSAxMxKjCKl00bfY,1123 +torch/include/ATen/ops/huber_loss_backward_cpu_dispatch.h,sha256=V0lZElxOBAVdlRhiOTcm-G2UmdO2VbQTyK14CS3m-GA,1301 +torch/include/ATen/ops/huber_loss_backward_cuda_dispatch.h,sha256=LvATj2EzgSmHki_eSM61dn3HRGVUkIMs-qPfYESWjPY,1303 +torch/include/ATen/ops/huber_loss_backward_native.h,sha256=qTi5r3kUpZpgqB9vJ9t7acUbrOTmYQHb6fspdtzrRcU,1025 +torch/include/ATen/ops/huber_loss_backward_ops.h,sha256=H9TuUDadZPvckCgLUM4Wl-zfNF6Uo_oAat2gJKbH3JQ,2508 +torch/include/ATen/ops/huber_loss_cpu_dispatch.h,sha256=9YMqjOvBln1BtfPcQi-aSZap0h__5zT0Ucn5eNNlA2o,1371 +torch/include/ATen/ops/huber_loss_cuda_dispatch.h,sha256=f2t9RJ2awh7zbuSY6umX_YLZn_Sh01p6O7KncwaJuQI,1373 +torch/include/ATen/ops/huber_loss_native.h,sha256=6-4iN6CvQJnvZnVpRnz7uAnuwVrH-o6UbMFQhlFbYNE,960 +torch/include/ATen/ops/huber_loss_ops.h,sha256=ercboX9fOr2Yx08ce3xhl2tR7QU1IN-_iXoHElXVgHM,2243 +torch/include/ATen/ops/hypot.h,sha256=5iYlUAxQ2Zt73k0WuiSm30VNENUr0AYAVXJXa9da7TQ,1412 +torch/include/ATen/ops/hypot_compositeexplicitautogradnonfunctional_dispatch.h,sha256=K_6T-1CIyiYGrgGYK8_PdBCHhRIpBobe8pAYGafUMrc,1145 +torch/include/ATen/ops/hypot_cpu_dispatch.h,sha256=7HrOioVBGgCt-sPEJwbVSH6JckExCVUETQUKNx6vpGw,1282 +torch/include/ATen/ops/hypot_cuda_dispatch.h,sha256=KJb-6w1R4PvF3uXbHCus486X-qPcKXxtz0OLOtmd_fI,1284 +torch/include/ATen/ops/hypot_meta.h,sha256=KC6TtMhXm2Pqa4gQdaLtggrmhmf3-yH3yonQR-f5Za0,846 +torch/include/ATen/ops/hypot_meta_dispatch.h,sha256=EWNVRRAaWolzV1giKH86II3WhBBJF7YITw9_QB92GSA,1284 +torch/include/ATen/ops/hypot_native.h,sha256=yuJpaBkuaonG--6q5CZl6Uayv7uju6FNKYgiLmKwcTw,873 +torch/include/ATen/ops/hypot_ops.h,sha256=Q_e801uV1XQ13hhWU2hilMn0qlJUI0k7xyV27PydXIc,2549 +torch/include/ATen/ops/i0.h,sha256=T308xBS1wjB9K2ToInJxKKuiLg9XsBx0O11oYwoR9oU,1371 +torch/include/ATen/ops/i0_compositeexplicitautogradnonfunctional_dispatch.h,sha256=_Foe9ReQfNB-9e0lCBD5ETjO52mbMFT5kuRbRBGzSrw,1087 +torch/include/ATen/ops/i0_cpu_dispatch.h,sha256=QdV1ZOv885ouzdDR49LHHE5w7soGzfVzqu6yPH7W9SA,1166 +torch/include/ATen/ops/i0_cuda_dispatch.h,sha256=QTG2-hCydLIWXLpOaTTRuBwYd_9aySwEYIZBE0_yer4,1168 +torch/include/ATen/ops/i0_meta.h,sha256=vtqfBzUpUf78Iq9ld7QuJnsVkfFpTz3ejg8pwM12A68,817 +torch/include/ATen/ops/i0_meta_dispatch.h,sha256=wmvTwEIDLHTN30hVhlb10vQPH01o-J3sEn0Kj57UiOw,1168 +torch/include/ATen/ops/i0_native.h,sha256=85ouRhxa1L79w1WhYpG_FsYpNNrYMrI3QK-RKgZWZxQ,838 +torch/include/ATen/ops/i0_ops.h,sha256=wkVudm7WUExUpKAvrdjAIafKB8rI2sgZlUGVbj9XFGU,2264 +torch/include/ATen/ops/igamma.h,sha256=st-BaNICd7J466iGqtXudFTbOZVup9nht46aNLIyzrM,1422 +torch/include/ATen/ops/igamma_compositeexplicitautogradnonfunctional_dispatch.h,sha256=dIg5allbrVYb8KjUtkIEh2pJ-2_Hwqmlu0SGEzGQIvw,1147 +torch/include/ATen/ops/igamma_cpu_dispatch.h,sha256=XIKq35mDfWRPJaVaAn8951UHuHO97WLGf_4wMmPNI58,1286 +torch/include/ATen/ops/igamma_cuda_dispatch.h,sha256=mEFj2OyIq2pP1XeyAb6eMBClIUDrSy6EP9zsOQGICGY,1288 +torch/include/ATen/ops/igamma_meta.h,sha256=X2EIw4iTtlNlzneM1z-jgy1-pUc9GB8nSVHxAqQ_RIg,847 +torch/include/ATen/ops/igamma_meta_dispatch.h,sha256=xWPYQr1HANT8cVLarzRQmUkrDt24xxmii5_1iIqepYk,1288 +torch/include/ATen/ops/igamma_native.h,sha256=XMblXiG9VQulfksc0YqxIUlc_Z0QzWRioTJBXzhBaUc,876 +torch/include/ATen/ops/igamma_ops.h,sha256=xRlr6FgAOtUxKMauMMfwaxMycecNHkDJsiw9u1166ko,2558 +torch/include/ATen/ops/igammac.h,sha256=tsdDcPjfq57i5aIaPZRSUiNRegjdMI7MtWnvdGrEM3I,1432 +torch/include/ATen/ops/igammac_compositeexplicitautogradnonfunctional_dispatch.h,sha256=8D80aYXXuQz7BoZ5vJyJtAyGUBPoapzpUFyRqYBEWiY,1149 +torch/include/ATen/ops/igammac_cpu_dispatch.h,sha256=dgMYmRnMYDaUVQIXKwGLUd9okMTS_oelXl1qOWj7j3o,1290 +torch/include/ATen/ops/igammac_cuda_dispatch.h,sha256=8gSJnFxGgHAfFAAOmEelH8iX8aKtzB78e9NH-JdHflI,1292 +torch/include/ATen/ops/igammac_meta.h,sha256=dfACs6_XYbhf0jNRo-oZk_Bb9_Lu1efXP8MEIZDF8KU,848 +torch/include/ATen/ops/igammac_meta_dispatch.h,sha256=Y0H23tNOs3fLKDho1qmxvJrqMJaytNRqplKeZ_scQ8A,1292 +torch/include/ATen/ops/igammac_native.h,sha256=QzogQqr8kTcBc8TXvUU7-RUim4sf606CzzehPNwwJds,879 +torch/include/ATen/ops/igammac_ops.h,sha256=ARAh0VHU2m2G4LpBXGJRGNkwLFk7q0b-n_qNV_aLZeA,2567 +torch/include/ATen/ops/im2col.h,sha256=YlDUTDLoz2ZBKGl_lC46ral5zaaW17pqC9UTpKTEPug,1917 +torch/include/ATen/ops/im2col_cpu_dispatch.h,sha256=uOJ22eXzcIHH07RKU0m9CXDhduXH3Q70ULeIBOPenS0,1443 +torch/include/ATen/ops/im2col_cuda_dispatch.h,sha256=fhvxSuBrl5d5pOQlT7tpmnrRAJg6cRj7lUQexSx-NO4,1445 +torch/include/ATen/ops/im2col_native.h,sha256=ePgBbkJNl730DBnNJLCqw8elpcy9CRER-hBLuUX1BGc,1374 +torch/include/ATen/ops/im2col_ops.h,sha256=ua99MTF4_a3rc6UEhyp9ObxNoAuR_pbgATSbMQUVlBw,2489 +torch/include/ATen/ops/imag.h,sha256=yFZjfMxPblNPb9HlmZFIrTa-3XCMUX6dHJ2DbkB_8L0,889 +torch/include/ATen/ops/imag_compositeimplicitautograd_dispatch.h,sha256=SxQ-Wyw8WPQzptOBMIlPwXYIMZaFNPZLh4cK4ITrjp0,1016 +torch/include/ATen/ops/imag_native.h,sha256=WXorn8w1rdDP3XkJB848Apkh9rOrPzJj2Cg2PHjaIXs,728 +torch/include/ATen/ops/imag_ops.h,sha256=HElfQDb9uXvnYsH1XBoRnuPjMXKftZVrmKoSlXLcgLY,1211 +torch/include/ATen/ops/index.h,sha256=ruhPu8n7JyeaFk421zcfKupeioQd9FiOUv5By8f5mac,1565 +torch/include/ATen/ops/index_add.h,sha256=ZgtlPdPxvHtO5SQYW_wdcH5pzBsXfgdZ3du6WcH3Fc4,2183 +torch/include/ATen/ops/index_add_compositeexplicitautogradnonfunctional_dispatch.h,sha256=z9BTErtRCGf-rYCAaTs4VbEJF23IY-0LJPuLNXNCIVY,1289 +torch/include/ATen/ops/index_add_compositeimplicitautograd_dispatch.h,sha256=mBhbVWXroKcxrrZRDEFCGGrqXFaUh8iVWOMvYU2yiGg,1119 +torch/include/ATen/ops/index_add_cpu_dispatch.h,sha256=2F4JpX2QZjRsOI1JTmtaWXSJ81UbZ4INd03JaQlR_6g,1568 +torch/include/ATen/ops/index_add_cuda_dispatch.h,sha256=Tui8AsWwqVONrg3sor30TT9HKJ2ijGRzjDlFwb7tdb0,1570 +torch/include/ATen/ops/index_add_meta.h,sha256=DQBoGG5Y0wfzpXygggb_vAdLf0zT-eYjOTwv971Z8yU,1358 +torch/include/ATen/ops/index_add_meta_dispatch.h,sha256=YcuZ2okuVdtOVShtA6pC3f4ZuvMfCT70TnLdUIP1xqg,1570 +torch/include/ATen/ops/index_add_native.h,sha256=uKn99o38xbqpo7bz4faI7iivPwyj5mRRYADwu8oLzgI,1354 +torch/include/ATen/ops/index_add_ops.h,sha256=ki6nGowWvapAWS-D-6J-CqBJLntrNDb1llqnPTw8yWw,4112 +torch/include/ATen/ops/index_compositeexplicitautogradnonfunctional_dispatch.h,sha256=ZV_DNR4d_ncrtDwB4RYYw1SimIxzje_0B4ktoZ_S-aY,1099 +torch/include/ATen/ops/index_copy.h,sha256=LqoYqVMVtJAuGimQRhGK_qTrCvRbtPLSmUADntRo0bc,1988 +torch/include/ATen/ops/index_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=Bae7fhjweIgjzIZLkFynMrGpwni2JadYu4wspwOq4vo,1235 +torch/include/ATen/ops/index_copy_compositeimplicitautograd_dispatch.h,sha256=7cdaGi5MIuqxqEZO0HVwoTidcJmwTJ4d3DKFZ1U6ZN8,1217 +torch/include/ATen/ops/index_copy_cpu_dispatch.h,sha256=bE1T6LKEhVBpeBxVioeXMy6KnvhhtjuwGWw5Tweqk3w,1462 +torch/include/ATen/ops/index_copy_cuda_dispatch.h,sha256=ZhQFZ0qKg4h2K7zGCsFbiMq6-b4-4fcMSrx4m8CliGE,1464 +torch/include/ATen/ops/index_copy_meta.h,sha256=YWuC5O3xUPp38-j_0LjReV7VdkFWa6f6XZjIwnhRGuo,1333 +torch/include/ATen/ops/index_copy_meta_dispatch.h,sha256=lBnai1XrXcLEBNwD1rB13GFfW1YQRtY26mA6fgWYnfY,1464 +torch/include/ATen/ops/index_copy_native.h,sha256=4Iq-6mnRqfiDdqgP3G0W9nhK7OxQr4f-T6aCFx0HesI,1181 +torch/include/ATen/ops/index_copy_ops.h,sha256=tr0zwWTqD4xG0Z2x_Xuxm9ChV6U6Lw2VbkwkM6Q3Wjc,4532 +torch/include/ATen/ops/index_cpu_dispatch.h,sha256=RX6W_Jj268ioEBNpscHjqnK5srueJTkiCK8qw9XgZ4k,1296 +torch/include/ATen/ops/index_cuda_dispatch.h,sha256=LlS5NdMJKzo7u3C_dhihdlpLHI7rin7sHK0lD2a41S8,1298 +torch/include/ATen/ops/index_fill.h,sha256=NqFKcxAylfrv_gEriv2XQ35MAiDa4qcnbob0dHKKgDc,3352 +torch/include/ATen/ops/index_fill_compositeexplicitautograd_dispatch.h,sha256=Dcyf5OE5no45rVa-wSKjiQKjpEF47fy9eDLzHShCsG4,1800 +torch/include/ATen/ops/index_fill_compositeimplicitautograd_dispatch.h,sha256=8xu8vsMBY5K-3LioE8MT1_hg5Zh-YCTB_XI6HfvYy_A,1466 +torch/include/ATen/ops/index_fill_cpu_dispatch.h,sha256=0DpqbB7yHf_ophHYJhNxeuiqoQtdRG87rxwtW1lk62E,1160 +torch/include/ATen/ops/index_fill_cuda_dispatch.h,sha256=pgayRlrQ_f3zHnL4tB7yl4EPVAS-ReO1rTnJ2qEUWN0,1162 +torch/include/ATen/ops/index_fill_meta_dispatch.h,sha256=jEj5x-xgAGmEg3CRIBlrcXaorGVctBk_PBRBGHpMSxA,1162 +torch/include/ATen/ops/index_fill_native.h,sha256=uu1nCP2DlrQC7hZWUeoyDNHrv2DPv93SrZEG-hytOf0,1980 +torch/include/ATen/ops/index_fill_ops.h,sha256=JpcJJK6rF4_0k1isJdIvzB4lw6YvhHowAoSvvWnlyOo,8601 +torch/include/ATen/ops/index_meta.h,sha256=5S_h461qMH4jxskr3Fq_tAhItYCbriTDeA8Z-bFsaEQ,1724 +torch/include/ATen/ops/index_meta_dispatch.h,sha256=XrwxDDDRynUi1n8ta0AaYNqHhr1oduDbL21k4ytb2t4,1298 +torch/include/ATen/ops/index_native.h,sha256=09Lmtqaqa085HGjGWdW8AWGAoMN6DScig4af2Qx7lVs,1017 +torch/include/ATen/ops/index_ops.h,sha256=bwyezNPt29E34-RsJEJaZ8gsYxpPH_0DB36ytz_xz5w,2194 +torch/include/ATen/ops/index_put.h,sha256=Ks-6-jJ2eEoIAMJuwQSMfYCQ2BD-scLrmO2oEJuj3hI,2224 +torch/include/ATen/ops/index_put_compositeexplicitautograd_dispatch.h,sha256=mB5eByzJoPYsqozpQdwRznS7nQDjMRbvVBXCdb55LlU,1656 +torch/include/ATen/ops/index_put_native.h,sha256=oxXCba3BBaIXCVie-cbReO9NUREKQxYdyCs8Sy3IEJw,1180 +torch/include/ATen/ops/index_put_ops.h,sha256=hMUbiJ6pgrcc9G4wvOAbxUR1aFm729E_SzTBqjpvcik,3320 +torch/include/ATen/ops/index_reduce.h,sha256=qamOHdKOCypJx9Q9mG0CFV0MYBFRyhNT3OZ9qG6jdb0,2032 +torch/include/ATen/ops/index_reduce_compositeexplicitautogradnonfunctional_dispatch.h,sha256=TwWtHcnGfcnEVTeeYSj-X58QCKxW4-vKFw_70vQfBc8,1337 +torch/include/ATen/ops/index_reduce_cpu_dispatch.h,sha256=OwK25FXCWKylR0Q7nnM2s3smGdtwmx7pjD8nUq_-LF8,1661 +torch/include/ATen/ops/index_reduce_cuda_dispatch.h,sha256=9B3tVtyEAIKQG6BX12fsfWkvjBat_F8WLuVe1qkadRs,1663 +torch/include/ATen/ops/index_reduce_meta.h,sha256=yNr1Q1yztfsj21p-uf7536-OLQG_xiZaHn-vTfbnmYI,1379 +torch/include/ATen/ops/index_reduce_meta_dispatch.h,sha256=f0PHMzb771qSC1a-Mpe-4vqvJuODpN8LN58EmXrsWYw,1663 +torch/include/ATen/ops/index_reduce_native.h,sha256=93nmh87vvzHNLo0w0jXX8I_b6Yz9YfAuuyqWHwSFlZc,1250 +torch/include/ATen/ops/index_reduce_ops.h,sha256=bbqTJ0RXFEHFX8303ac8e0raRGNP4YKM9mQFhSXsSKg,3461 +torch/include/ATen/ops/index_select.h,sha256=FiMwDIdXzfSAzdDfnnSYHAJOaqZH8Qg4pdvMVlGWnOo,2436 +torch/include/ATen/ops/index_select_backward.h,sha256=slOc28DdgfNC_ubjBAmKz8yPjdS-jmQbQyrHWULP2-w,2102 +torch/include/ATen/ops/index_select_backward_compositeimplicitautograd_dispatch.h,sha256=jLGWp0uhJCSVaT2Dr9O-Eb69R6HVB4y1ghSepfMboYk,1247 +torch/include/ATen/ops/index_select_backward_native.h,sha256=gffJaodvfLdw70boye5nj0NQfgp5ddCdix0Hf5kcWI8,823 +torch/include/ATen/ops/index_select_backward_ops.h,sha256=8ME8cNRChaXiYNEv59CQ7-f8iPzfTOLas9IEI8IXsH4,1492 +torch/include/ATen/ops/index_select_compositeimplicitautograd_dispatch.h,sha256=rcy84dSmOJx15-QEvjVkrOv8XqDSe5fafG4lYF7aRso,1322 +torch/include/ATen/ops/index_select_cpu_dispatch.h,sha256=S7WsUdWsPKFvV4ZqB8rgCt_s5VoXXqlvTGadHgLZ8EY,1266 +torch/include/ATen/ops/index_select_cuda_dispatch.h,sha256=daEAg9AsS9_4NWm-lDsIppklprjd0l0_WURns5eAw28,1268 +torch/include/ATen/ops/index_select_native.h,sha256=G-_P1tWs31OBVpHYNF8dX2JWenAE3bK-8E1FuxPKUV0,1819 +torch/include/ATen/ops/index_select_ops.h,sha256=vi3v3gXx9WQ9G6RGymp3_66dKED2zZqBP8Qp5e8-ZaE,3562 +torch/include/ATen/ops/indices.h,sha256=biiLfebFduEOWdRsTTQD2akmfFG9VaEQkYMJaB0BFGM,758 +torch/include/ATen/ops/indices_compositeexplicitautograd_dispatch.h,sha256=GpSLJ6mt8tofwWsMxD2B3_4eE1qmLzWKQQywRVXrGxc,1019 +torch/include/ATen/ops/indices_copy.h,sha256=_p8Qd4y6N1_LMJnpHoDqe6K1xgdOC17PBkmNHcvjFms,1341 +torch/include/ATen/ops/indices_copy_compositeexplicitautograd_dispatch.h,sha256=oG5_Mhjt7Pc1hO8cMaCv_TF9jF8q_xRxkiYdnLJ4cs0,1133 +torch/include/ATen/ops/indices_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=oUW-_Gg9sZICspCkDSGLWgXrpORttFhhkykL7E9ejTg,1050 +torch/include/ATen/ops/indices_copy_native.h,sha256=Jhrp4gw8IkIbBSYiCA72FjEDgurR-O55c00rCo3dZps,820 +torch/include/ATen/ops/indices_copy_ops.h,sha256=BX1WBcoe3Q09d8AiiTwewazDEUnR0fNW8GKLcipvXxw,1837 +torch/include/ATen/ops/indices_native.h,sha256=bQmbcba8oUdpMoQM1qhnLTj1uwcM0nAxXRLPsfVGma0,801 +torch/include/ATen/ops/indices_ops.h,sha256=2twPl1-5RUgcCS5G-7XOgwBJoNNRb0Q0WGj98BM-On8,1220 +torch/include/ATen/ops/infinitely_differentiable_gelu_backward.h,sha256=6CL9ib1hNQQstISRcupwbnz1Kb53D-hIe8uR4X2Hn9U,1067 +torch/include/ATen/ops/infinitely_differentiable_gelu_backward_compositeimplicitautograd_dispatch.h,sha256=P0swEBGplvXoxxCPjL4J402pAfL6iwPoGpo2FrBsQxw,1076 +torch/include/ATen/ops/infinitely_differentiable_gelu_backward_native.h,sha256=Q6Xy5dnCV9Ey-5P0vnjC8Z6ayRZ_aAVluCrM1yGxMHE,788 +torch/include/ATen/ops/infinitely_differentiable_gelu_backward_ops.h,sha256=1ej29AVmtzPcIK2KqYr02DeEVjnw215g8q7tcMoacdA,1393 +torch/include/ATen/ops/inner.h,sha256=6VRopWehatz55WV_ppIbtt1CdsaK56oJ3pQpdnlojNo,1412 +torch/include/ATen/ops/inner_compositeimplicitautograd_dispatch.h,sha256=xQifvGdPeEXR5dQyZzdc7z6MfMJq_k8Qn4Lm0WpEi6M,1250 +torch/include/ATen/ops/inner_native.h,sha256=3lz0YaoHG9Cq4LwZvlSyNdQZFA5oCuTdm-OpezMcN2o,858 +torch/include/ATen/ops/inner_ops.h,sha256=WVHK0JxecEEYBCiq3tHrbrZ4eUORBh31ZnNXS1g-HVU,1967 +torch/include/ATen/ops/instance_norm.h,sha256=V1tCUnvCqvoSUY18d1pyWHT5svNsELNipScxmjCyy44,1408 +torch/include/ATen/ops/instance_norm_compositeimplicitautograd_dispatch.h,sha256=u3rK6Q5D0koH9sDa14e_qE84teW3luBNOl8jxw9YC-A,1282 +torch/include/ATen/ops/instance_norm_native.h,sha256=70-KXX4cnVxleoMFw3yMG1sktxtfIrO8QrhHVtsOgTo,994 +torch/include/ATen/ops/instance_norm_ops.h,sha256=IYdXEjZohxdjpnMDzxn-nc6lQgGyqJzlZAqUeZDoocE,2065 +torch/include/ATen/ops/int_repr.h,sha256=ycMZZTaTzKFhkPObOnDrFzauNruY1VxCBJ4_KWH-ijg,1301 +torch/include/ATen/ops/int_repr_compositeexplicitautograd_dispatch.h,sha256=fIIwBnoGsN5y1Lhg_8R90GgTBSFKrTocroCzS4z89iY,1125 +torch/include/ATen/ops/int_repr_native.h,sha256=EUKLTh4zazD3MuOy4IzYPz0e141Y4g1ryASQvggv8HM,897 +torch/include/ATen/ops/int_repr_ops.h,sha256=0uupzEn212-x-NvvVhYjQnvK9QP8v1_3aYZJFPujVAQ,1813 +torch/include/ATen/ops/inverse.h,sha256=pRWZUdhSC8wuz0E8rujCAznVF9RRRGcHtjHKJLz0PdU,1291 +torch/include/ATen/ops/inverse_compositeimplicitautograd_dispatch.h,sha256=sa_HVkfj9FO-zSrIGwXs-PReI11tSTFfKUW4aXemRgY,1178 +torch/include/ATen/ops/inverse_native.h,sha256=PH9-A5moRWzDHPcMU3uLx5KR15Zhh5oixC9hLwKu1_o,810 +torch/include/ATen/ops/inverse_ops.h,sha256=F3OKmZrWLuu7IeCtPZvXWvqFjVkpHsEdulCDQONj3AA,1807 +torch/include/ATen/ops/is_coalesced.h,sha256=ZW1-5Et3yx3yR42xodhOWhSHBf9u9xsx8_21e7gR2gA,763 +torch/include/ATen/ops/is_coalesced_compositeexplicitautograd_dispatch.h,sha256=hUlIkuWnqTJQhVbUDdNjY5jTT-MTBvaxFsKyP0OSipk,1018 +torch/include/ATen/ops/is_coalesced_native.h,sha256=l3N5JaXgAqKZQw4xe-Ei1Q7dTaRCWDjJfzyu0HVQaeo,799 +torch/include/ATen/ops/is_coalesced_ops.h,sha256=6mhh4K0KKdQEQdYlTG81pVx5L54FsyGqcv8AoQclrDw,1209 +torch/include/ATen/ops/is_complex.h,sha256=xI4aDfwm0GBVP-RjfC8VJETrSS1aMa1hWgH3i3lGGt4,910 +torch/include/ATen/ops/is_complex_compositeimplicitautograd_dispatch.h,sha256=QjufQ2YdaNIIpSfVy8q1PCdPXTiYKrHJnXl66JIJXSo,1016 +torch/include/ATen/ops/is_complex_native.h,sha256=K0z1XMOTkS1dnoPlj9KLX8WBHf0slUJ0y5SnzCgKrpw,728 +torch/include/ATen/ops/is_complex_ops.h,sha256=Rh8ByZgdXyF0GUP74ZKDa1B82HNFq8D4He6x5FxODp8,1203 +torch/include/ATen/ops/is_conj.h,sha256=YwTCcx5souEsObQYIFNDtdvbzaQbFc4DR_e8z1rw_e4,898 +torch/include/ATen/ops/is_conj_compositeimplicitautograd_dispatch.h,sha256=jj6s52CvUa2vzY8QP-aAzTCtCCenqw_IfCqtOSQKNbs,1013 +torch/include/ATen/ops/is_conj_native.h,sha256=j7u5Rb8BGwYcdsF9s8utwE4gxjg4v8igJj1_bJrzaZA,725 +torch/include/ATen/ops/is_conj_ops.h,sha256=VfXZw3JdCfKItAhvFEFLqoakVcYZ9BxWZLYqqaD-XhU,1194 +torch/include/ATen/ops/is_distributed.h,sha256=imL-wiVkVCUHTGLBaJY39k1jnnUmdmn_xuVHe_BvXtc,915 +torch/include/ATen/ops/is_distributed_compositeimplicitautograd_dispatch.h,sha256=61V8EBwrJcd2h3csREc6vFPc_Y2CTfIFgkgmobEcrA4,1020 +torch/include/ATen/ops/is_distributed_native.h,sha256=mXFsndnWH3Q2eqkuKEIHGkT3PBXYnznwoVUNFcjIM2s,732 +torch/include/ATen/ops/is_distributed_ops.h,sha256=2tPcfGq5kkcBz3j8D1wv3hnoLYrpDPbKT27vAhsmJK0,1215 +torch/include/ATen/ops/is_floating_point.h,sha256=4IADbedwoa2UqqHiQeEQUL2uFFU-MUEME2QPMhivF1k,938 +torch/include/ATen/ops/is_floating_point_compositeimplicitautograd_dispatch.h,sha256=H59X-DeBoOABV4H6mqpXGnyXVAsxrZ-r1wqebXfhaG4,1023 +torch/include/ATen/ops/is_floating_point_native.h,sha256=yYLKOKzHOrFyPwuOXJi1TuzDcbH-ADjJ3gH0yc93Q_0,735 +torch/include/ATen/ops/is_floating_point_ops.h,sha256=C2s13gNQvqiM6hJiJ07rYwqMRRZKL75YX0o2UutF7Z8,1224 +torch/include/ATen/ops/is_inference.h,sha256=MrBFh043o5hdUsAtcM0NRa5uMb6JDy-mh4iCu4TlKHU,918 +torch/include/ATen/ops/is_inference_compositeimplicitautograd_dispatch.h,sha256=-6wpdSiNuSlOn8e8_GU7NztI15BJrqXvw_U6HVrCraE,1018 +torch/include/ATen/ops/is_inference_native.h,sha256=raRGdsoG9cXjOhou_72jDySWuYgvuOa9LEazG760ekE,730 +torch/include/ATen/ops/is_inference_ops.h,sha256=_1MgjhX7cIwaxuapmIDft_bT1M1AyVfnHwSo8ezJKWk,1209 +torch/include/ATen/ops/is_leaf.h,sha256=6p9jCL1uRs_CR0zyAvD0sNQ-p9VSV0ndQWnK_2ikYfk,758 +torch/include/ATen/ops/is_leaf_compositeimplicitautograd_dispatch.h,sha256=Hkn_EvMg2BcCzh8zvq87y-cC7FzvTyo4sPsiQMsOSvg,1013 +torch/include/ATen/ops/is_leaf_native.h,sha256=gPGiIQPdnneaHuU-dv6PKdOTh0lyjTs9GwFrJC14nrc,725 +torch/include/ATen/ops/is_leaf_ops.h,sha256=A2BFI1ADvX3VxxFRP8C9--vgkm0_BnG0RMSVcBjUdXI,1194 +torch/include/ATen/ops/is_neg.h,sha256=2NqwBkbwXrU_u3JxxYA9TesF2_E52hM6QhwoTl1sPEE,894 +torch/include/ATen/ops/is_neg_compositeimplicitautograd_dispatch.h,sha256=p2wU9Nuzx-3XJ-2Lh_CCTKdDN4RPWcwk-73akS3batg,1012 +torch/include/ATen/ops/is_neg_native.h,sha256=nV9-jkWR_jB9zqUZlW2f0Lm-y4lstQMl1pVmrWJi0vw,724 +torch/include/ATen/ops/is_neg_ops.h,sha256=Lj-KPMw9zkqyspOJH2maU7D4v9MDWNl8CfEYpU59BIc,1191 +torch/include/ATen/ops/is_nonzero.h,sha256=du320jUzSUkWBI59XkWtRENJnqAfjvYXK-s2TWuLO8c,899 +torch/include/ATen/ops/is_nonzero_compositeimplicitautograd_dispatch.h,sha256=YPhPhFiHvnixH4F2ZxHCGLSqhO0eaKK30NSHZq8XDrU,1016 +torch/include/ATen/ops/is_nonzero_native.h,sha256=fA9ymsxDYnv3bmYoUMj45W3yTi2lQ4MoNeBf2gsGzm0,728 +torch/include/ATen/ops/is_nonzero_ops.h,sha256=akpknsqDvhur33b7DYwMh2QsD_aeqix6lfVXt6T5HpQ,1203 +torch/include/ATen/ops/is_pinned.h,sha256=RFCwbemUy4l5PqvKtJZyjB42LtOaEvSo9WMQNaKHhuc,760 +torch/include/ATen/ops/is_pinned_compositeexplicitautograd_dispatch.h,sha256=mEirh2dRfyF7Y7cVxTq-CqiKsAclQQ2cq4ir7G9i2U8,1066 +torch/include/ATen/ops/is_pinned_native.h,sha256=EoZbd05jbb4Ly-BNV00lBF_IiAeccF2SzCQQCpJHGIc,1011 +torch/include/ATen/ops/is_pinned_ops.h,sha256=8r601Z8R2ohjtOXRJrcsmHx0hiufqlD6GjoPWFQiS3o,1322 +torch/include/ATen/ops/is_same_size.h,sha256=YY6JTmKvWO4vRcmqywTOhKd1yEQ82IKWutIKXEkJyhg,954 +torch/include/ATen/ops/is_same_size_compositeexplicitautograd_dispatch.h,sha256=4yVtWXLhSiNxmB-ZMbj6_jf6WHfbhcpf9Rz6nhARD5E,1044 +torch/include/ATen/ops/is_same_size_native.h,sha256=IgDqoTbfvWejDdZhPaPE1bHCtbt6AQzB5p20Jz6-EkE,843 +torch/include/ATen/ops/is_same_size_ops.h,sha256=ublGvFsLWwlhVA09TaL84h_eGcpG413qRfQ4O2GDXyk,1295 +torch/include/ATen/ops/is_set_to.h,sha256=-52DcqLN9voUTp2BcCDm6gYrjzlCbBRq1ZYVzqEF40M,760 +torch/include/ATen/ops/is_set_to_cpu_dispatch.h,sha256=_l_1fXjCdi-Bv1R426pp2bqKhQSCyEle_3fkrKKgAT0,998 +torch/include/ATen/ops/is_set_to_cuda_dispatch.h,sha256=vL6qgiFhkYwg9Sc21o4HKK9fIRiDq3CMpvJNTdXB29E,1000 +torch/include/ATen/ops/is_set_to_native.h,sha256=VcC0hPObWRnbl1HI7DrbjrCGmCjdWDadPp3YWpa4GKk,754 +torch/include/ATen/ops/is_set_to_ops.h,sha256=C2vPudmTX__mrja4NovmyJXjJ9iFxq80fehzM1TBIxE,1289 +torch/include/ATen/ops/is_signed.h,sha256=tcQ35vAA00pLtgAdgqkpbrHyS8gnRmwWU_jiG3Xus5Y,906 +torch/include/ATen/ops/is_signed_compositeimplicitautograd_dispatch.h,sha256=sgJXH_giAQDghHd8wrsmMfI2WF4pwk9lNIu99p_Ayho,1015 +torch/include/ATen/ops/is_signed_native.h,sha256=2pdzOvBDzuV0muVIwbYhYvhq2p6LUJeEAkBQByLJqk4,727 +torch/include/ATen/ops/is_signed_ops.h,sha256=2CSJ_2wRsX-VDHoERaYVy-ZmWCONG3JY05gOqoNBOaI,1200 +torch/include/ATen/ops/is_vulkan_available.h,sha256=mFdqi6hWCHywLPZarfzpqGtewj3LDxIlBcs83i_KrXI,897 +torch/include/ATen/ops/is_vulkan_available_compositeimplicitautograd_dispatch.h,sha256=tVfzrVDeJ0ZF317z4WyUUWuHUq-gu50Y9-DReBL7oss,1002 +torch/include/ATen/ops/is_vulkan_available_native.h,sha256=XgHjC0aiYvMBQmlkGPEThqaRIbj1z0jlPtGvxQoljVw,714 +torch/include/ATen/ops/is_vulkan_available_ops.h,sha256=PIsTRqyHVjFIUhxKdkkTpgQAvij8FvSl0u_EAPwK8Nc,1153 +torch/include/ATen/ops/isclose.h,sha256=-8PBlEtOMJEJOjkAbsxbIg9oEWXeELkjpv6b9iDa2DA,1083 +torch/include/ATen/ops/isclose_compositeimplicitautograd_dispatch.h,sha256=Rld3SOMcLpjog3VPgNI2Oc7WCYjJdGC5WvpG4IyUMH8,1105 +torch/include/ATen/ops/isclose_native.h,sha256=Rshvo3tkn7ojoINHclQOIbYVq9m3t-i2la2YfL9OpA8,817 +torch/include/ATen/ops/isclose_ops.h,sha256=ivRXVQ4o1feQR5ChrobS6zk9S2htBsAYOzNEsYL8YD4,1464 +torch/include/ATen/ops/isfinite.h,sha256=5ToWsv0-Q-_5EChjF9Eeo-cb79RbjbG3oGY24R8R54I,899 +torch/include/ATen/ops/isfinite_compositeimplicitautograd_dispatch.h,sha256=GZiqnUJSOFcdIyuHt0r6YzcV5Bllx1uLdLdMjonh6a0,1020 +torch/include/ATen/ops/isfinite_native.h,sha256=_u-MSvWeA8nF0Jk-_MZmf85GSjFjpC-jGQYQ0ayWIYI,732 +torch/include/ATen/ops/isfinite_ops.h,sha256=vaZ-U87s4wAkB63r8zwQWIqdRiyYwnRFXiOp39cL7kU,1217 +torch/include/ATen/ops/isin.h,sha256=WhazdlD_Opdn7LuG4A09qTWcZlO-XfCEyVTItdSRXDE,4246 +torch/include/ATen/ops/isin_compositeexplicitautogradnonfunctional_dispatch.h,sha256=Qe13jK0y2LvbuO2G-sAH7XbcIltKxbnsJvfMKu_KIQE,1393 +torch/include/ATen/ops/isin_cpu_dispatch.h,sha256=lsT6oOW3z6kmqL5xtPsNRHjFnjzwHHrpV7p7ygmDTQs,2240 +torch/include/ATen/ops/isin_cuda_dispatch.h,sha256=SVubfGLawoH2ppQVDuZVRP05OMYFw3DyreMAm8uPH6I,2242 +torch/include/ATen/ops/isin_meta.h,sha256=fbztCmAgpbgUoxooa5MU6YVS0BbxjIIJlDn0ldMoxMQ,1288 +torch/include/ATen/ops/isin_meta_dispatch.h,sha256=D5ktQImj-v5Hd7-lDFv1deZmvty-sqff66SI_bkIIuo,2242 +torch/include/ATen/ops/isin_native.h,sha256=xB-rEmOmPEjUHnSEP_WCg3RXHORzaOypd_hzwegecb0,1413 +torch/include/ATen/ops/isin_ops.h,sha256=rfm5pWfeuu9hFdUnIutfMl_XmuhyRF_VXsvliZADHWI,5661 +torch/include/ATen/ops/isinf.h,sha256=gypDpC03jA1B4vik9uXFcWd6Uc42CbXRv2LlPHJoWt4,1271 +torch/include/ATen/ops/isinf_compositeexplicitautograd_dispatch.h,sha256=bKqdE6Vai3sIcM0CcfNHkR_6EANwEl38ZOhrJU8yDGc,1172 +torch/include/ATen/ops/isinf_native.h,sha256=TI-grvT35kUJe1hWMmb7XXsvrasd92TZ1_qjzoV_SIc,1061 +torch/include/ATen/ops/isinf_ops.h,sha256=HuWOPetJp37DYsCR60zkssPOeEiE8McCUO2xQvdlqhI,1795 +torch/include/ATen/ops/isnan.h,sha256=77TyLPRerfi28Mfbz7ACkrNvx7Sg87c0lwghJ8iSQpo,1271 +torch/include/ATen/ops/isnan_compositeexplicitautograd_dispatch.h,sha256=AwqiUdjPi7-aruCVfPahUaYe1hIKIRaku5godcXPMRw,1119 +torch/include/ATen/ops/isnan_cpu_dispatch.h,sha256=HVJtU8n3sKIjGr9OQghjM6lU9Z23ek-bNTIEgBKagVU,973 +torch/include/ATen/ops/isnan_cuda_dispatch.h,sha256=vctyu7gU3TY_2JQWYu8FpMCz-CEmh1Cp9HaYrlSAW0k,975 +torch/include/ATen/ops/isnan_native.h,sha256=WsDMzgMMIzxGCDKUE4bLAHq2x9U04vdTUMtrF5qnZL4,996 +torch/include/ATen/ops/isnan_ops.h,sha256=XdC1BkfY6aRhRnQeNxFUGojZafWgsCPLT8Uf-Ibg734,1795 +torch/include/ATen/ops/isneginf.h,sha256=iof4In0F0j-c-1_Xw-Kd3w7pjUIfiO7yNK40Rh4vSoE,1301 +torch/include/ATen/ops/isneginf_compositeexplicitautogradnonfunctional_dispatch.h,sha256=QReQGn0CbxrgaB7o_0v2lSN-PzxSuc1J8ILeeCZkhko,1046 +torch/include/ATen/ops/isneginf_cpu_dispatch.h,sha256=-2QaPawkZP2C31pkXogocXs8tJZ5HIExgoulDvZo5ks,1137 +torch/include/ATen/ops/isneginf_cuda_dispatch.h,sha256=e9Xsl_tsFmQHxCcKtKSPdhbXFSXtVLwSeLL4AlqNpFc,1139 +torch/include/ATen/ops/isneginf_meta.h,sha256=N5qQE5KonmrbHTh9hHxjAPceG7FU8obggG7zEaCh230,823 +torch/include/ATen/ops/isneginf_meta_dispatch.h,sha256=4Dx6mrypjgCIqfRd48sL1cdipVgA5NCfMlgNgqAMEdo,1139 +torch/include/ATen/ops/isneginf_native.h,sha256=1UagMP1SQ01JycJa6oKi8EA4Iocawh2Xlh5YkSJFteI,1233 +torch/include/ATen/ops/isneginf_ops.h,sha256=ei81kyj0f0fIe5KvTjdcJKyFZIkKN_GmzWb0O-igO7M,1813 +torch/include/ATen/ops/isposinf.h,sha256=WLRNW7GNpOR0DyC9ciFiA7YuQfrgQE1634q69c4fJKE,1301 +torch/include/ATen/ops/isposinf_compositeexplicitautogradnonfunctional_dispatch.h,sha256=pPubQ6FYnJ3i_teq9IguUtx8Znb9U95vBGR9-NejlB0,1046 +torch/include/ATen/ops/isposinf_cpu_dispatch.h,sha256=WzV1F_przwXLoEPvWjlz55gads9NLRxvhjXZ_K9wo_I,1137 +torch/include/ATen/ops/isposinf_cuda_dispatch.h,sha256=BptRc-BkZbX2kHsOt5EQqOapZsVl1zmjT7rFynWAKt0,1139 +torch/include/ATen/ops/isposinf_meta.h,sha256=Wbt43lJCcs_ICXWt646GlBkaMj5eJAhFJPAXK9DiyIE,823 +torch/include/ATen/ops/isposinf_meta_dispatch.h,sha256=MRlwyYcBnX6hBgNGQ_7NHkP7iy9lYQFsIaeZB0CEWYM,1139 +torch/include/ATen/ops/isposinf_native.h,sha256=fSWxoxXKNPGGYwfvse_3qQd-dVDAR4qAgFaIMnUqhKo,1233 +torch/include/ATen/ops/isposinf_ops.h,sha256=hp8P_SA6voqbfw6g4LApS7r99ZFyytRoccXrVT-JoTs,1813 +torch/include/ATen/ops/isreal.h,sha256=bGTe-VSHg9TftSCKJtiVjsFrvT2sEgoRrp6LM2FzcvM,891 +torch/include/ATen/ops/isreal_compositeimplicitautograd_dispatch.h,sha256=Jc353OyqBXgmJLYR8IUyw6IWVyIS2UFgnnVX3mJE3zA,1018 +torch/include/ATen/ops/isreal_native.h,sha256=ptkmkB4sShi0e7AagNjvClwYbMHUPHGhPDDz6mErQGA,730 +torch/include/ATen/ops/isreal_ops.h,sha256=5uby9MgEcYx71TAjx7CvWjT3Lai9A8zY4fvMDf9myFc,1211 +torch/include/ATen/ops/istft.h,sha256=Yzjv3QVopjdAt_LowWswshpTDlamT9L5y9bHDfgU24U,1492 +torch/include/ATen/ops/istft_compositeimplicitautograd_dispatch.h,sha256=9Tgl-nGsoUCxkHi8-VZbpdXTB28LZWyFaDI11XuXlqc,1346 +torch/include/ATen/ops/istft_native.h,sha256=MfJ1rPM5bgvL9iMACSA2iz1r8w_PY975VkOmRQuZOBs,1058 +torch/include/ATen/ops/istft_ops.h,sha256=PRxhyMKBPsJoht904kHDJvf3JOE1Vwc1UipHAe24r10,2054 +torch/include/ATen/ops/item.h,sha256=M_CBOXGPchUuvPzFYsD9vuEZWbSuz2Yz3MTjJP12g_o,755 +torch/include/ATen/ops/item_compositeimplicitautograd_dispatch.h,sha256=fU__fqXJsjSZ3HH9vdcEtRedSPJAEStwRwMy2uwjEOs,1016 +torch/include/ATen/ops/item_native.h,sha256=4cjkD8rHfcJVhL8a2GnyYOoA8lXJHGjZthYsHIPr0qc,728 +torch/include/ATen/ops/item_ops.h,sha256=vtZU6i98N49S9LvT761jg5601yg5_axXBufL-LBm_sI,1205 +torch/include/ATen/ops/kaiser_window.h,sha256=isilAV00c5MRgJC2VG1mN5sU4IPYtgqfELXT_ci1CE8,5258 +torch/include/ATen/ops/kaiser_window_compositeexplicitautograd_dispatch.h,sha256=7wg_rjpQCyD8YQFWsSGSPvwmKYqIoG9I8XNWhvcuPac,2516 +torch/include/ATen/ops/kaiser_window_native.h,sha256=sg6GGF0y2guMwldtdB7FcMcMaEo8L-4QfuBCBgc1nBQ,1673 +torch/include/ATen/ops/kaiser_window_ops.h,sha256=TeSIVHxwedxYocx9-wkk9t5g7INbJ3zjrlpeFKN0s_w,5919 +torch/include/ATen/ops/kl_div.h,sha256=83hIlDx7C9fFDZCcfa4OaE8tdEm08nPO6LBLTqlGR_M,1072 +torch/include/ATen/ops/kl_div_compositeimplicitautograd_dispatch.h,sha256=zxBof7Nf3LHnWwrJT_dD9PjnE9rNn5XTUZBsM7QZBXM,1107 +torch/include/ATen/ops/kl_div_native.h,sha256=cjKgIbUNHO_EAl12r4jzmEIR3AfgLAlkK5OxVF0z6Vw,819 +torch/include/ATen/ops/kl_div_ops.h,sha256=a6zf7oZSAU2a47zBWwslq7Dg8dNKph8-uJ8koYxyv1M,1433 +torch/include/ATen/ops/kron.h,sha256=kGIVCkAc6abFhxEUOVWjRq1c_6Pcib3xNF5vgeXymm4,1402 +torch/include/ATen/ops/kron_compositeimplicitautograd_dispatch.h,sha256=XV6Iwbadg4M0_rgZh8ExX4L23OKBfRFiiVq32CT2wI4,1247 +torch/include/ATen/ops/kron_native.h,sha256=9h3bqZZqoKLBKk0N7Yq5r1AxPhB67mGS8DXF6H-3pT0,856 +torch/include/ATen/ops/kron_ops.h,sha256=-YgQbZfQp2vvuCB6BcHFAFBIK11Hfxkp2FHlXYhHYao,1961 +torch/include/ATen/ops/kthvalue.h,sha256=ws_ihJD0AU2UjLSSFHY6akceyssMkje5sEyzonBhNZ0,9610 +torch/include/ATen/ops/kthvalue_compositeexplicitautograd_dispatch.h,sha256=bdHYW7tMi3O0HdKwF6-9G37cnB5qj_V7tjKiPjQa1Z4,1231 +torch/include/ATen/ops/kthvalue_compositeimplicitautograd_dispatch.h,sha256=8FrB7d28o1PKm9W_fAf5-9KbIGWU5d6cl3jmDFNgnRw,1965 +torch/include/ATen/ops/kthvalue_cpu_dispatch.h,sha256=WZVenAAr02TXBwC5sBBkJE3GbJL7-_firfsc6WRN9Aw,1642 +torch/include/ATen/ops/kthvalue_cuda_dispatch.h,sha256=Da2qPRZxqN8OZ3xS_kh1Y-9LQR1wRJ2GPSdFR6nK7wU,1644 +torch/include/ATen/ops/kthvalue_native.h,sha256=02RBJcs0AH5y_GYUh69GatE2zXwcuGtPdcRy_69adSQ,1456 +torch/include/ATen/ops/kthvalue_ops.h,sha256=B8rUwMGSNULR6zCwpXzVDn6uJBhyagdCaFkmfpAyml8,4207 +torch/include/ATen/ops/l1_loss.h,sha256=k1a9jf8A0YzQgXdpluFd0O4EqdfU2As-eknk0BkWPHk,1015 +torch/include/ATen/ops/l1_loss_compositeimplicitautograd_dispatch.h,sha256=AJymPUvlIR9MqtkSSNmnBKROoCRuweUa0F0UVKvqUdY,1085 +torch/include/ATen/ops/l1_loss_native.h,sha256=xyUtLW6_QQsdggIV_nhcmF_Pj1tqjXWh_z3Xmn5hB7k,797 +torch/include/ATen/ops/l1_loss_ops.h,sha256=qv0S-bGah_B1cU7oPah8XTK-c__YwAheKsmOKW7LCC8,1370 +torch/include/ATen/ops/layer_norm.h,sha256=qVPK32H5XXf_JjhxsW4DmAzqIFEZ_ZsX133huSLVf4U,2631 +torch/include/ATen/ops/layer_norm_compositeimplicitautograd_dispatch.h,sha256=jI01jMp18uguzxhw3LifyDkgrpBhS7qQ28Na4p6Ljjc,1429 +torch/include/ATen/ops/layer_norm_native.h,sha256=mnvTtwXqu1xB1HSXdj1I2FJPPXjUyHxnsvIrlbg9Z78,914 +torch/include/ATen/ops/layer_norm_ops.h,sha256=Xy7bSxRDT9m1fQrBtD4uwyziOMWfe7y1_K7DwtpT16w,1753 +torch/include/ATen/ops/lcm.h,sha256=4vThhCCCFB0tx2r6-tvPP49HXMdrJmlvd5BvSbI_E2k,1572 +torch/include/ATen/ops/lcm_compositeexplicitautogradnonfunctional_dispatch.h,sha256=3dujOiSGprHvzvMstZdM4wIKAYKKuQ-m8zEUkbzobog,1141 +torch/include/ATen/ops/lcm_cpu_dispatch.h,sha256=eKKeVSnNRjLDImX0rpK8hTYkFzI7Bb5ZfzT7n0jYY3A,1274 +torch/include/ATen/ops/lcm_cuda_dispatch.h,sha256=cENvljCsOCi2BgBcnjgKjzZGiKr5gpRWrXKqbcok88c,1276 +torch/include/ATen/ops/lcm_meta.h,sha256=5-fPw3Pgip9aa6zU-H3ke42xNGdmAz--9OGisNRcha0,844 +torch/include/ATen/ops/lcm_meta_dispatch.h,sha256=srquQgSVi-NxvdsW1LnMzmgtt2Ubjr-LMny8YhleJYM,1276 +torch/include/ATen/ops/lcm_native.h,sha256=ljxcPeT1HmO5qmweFB9lufXTP6NG_0uOwwGIXdfboXI,867 +torch/include/ATen/ops/lcm_ops.h,sha256=FU9_QoC_vG-FXaKBxkUcv2SmwNalCX24vP6XUJPGFFs,2531 +torch/include/ATen/ops/ldexp.h,sha256=SqGIh2-eKtyWRlm-QfPI7yl3noMYe8cTjy3a0ZE6YTE,1612 +torch/include/ATen/ops/ldexp_compositeimplicitautograd_dispatch.h,sha256=6qhTTdPxXInGidIvqxVIpdVkYPS7EK1wsPOo-BGl2TQ,1326 +torch/include/ATen/ops/ldexp_native.h,sha256=8X_ttcVRv3r3JTpp3m_JdYvi6UUkT6-0D8ypAuji6WU,934 +torch/include/ATen/ops/ldexp_ops.h,sha256=Fcae5btGXCVQ-aYkdfUFScWUHpXy_z4luYTRewvy29k,2569 +torch/include/ATen/ops/le.h,sha256=19VZOqVVuWxuKBwioVNIVpWeL7HI_0fNmO_enauTTvs,2096 +torch/include/ATen/ops/le_compositeexplicitautogradnonfunctional_dispatch.h,sha256=WSQI30NcgnnDYsBmmdBYaa0qdGq7hEZ2XH9PIvVm3RU,1288 +torch/include/ATen/ops/le_cpu_dispatch.h,sha256=ESdwdZ3dR2FS4sD9JYnUGjh3zhxUG_ynCPIJ-9sPW6w,1620 +torch/include/ATen/ops/le_cuda_dispatch.h,sha256=zq2_YhS10bXpTb7o3XOvDdTUvxnetTVf-JBKAzNN0is,1622 +torch/include/ATen/ops/le_meta.h,sha256=9sSCUK1F71kS4jHyOwwn7oMk-UhZguRKBHoGO05iwvQ,989 +torch/include/ATen/ops/le_meta_dispatch.h,sha256=IOQmMLQohyiMFEdUcw03fFAlUwgZ3Yk0IH3cyGW5FkM,1622 +torch/include/ATen/ops/le_native.h,sha256=nRxwPXb-WqrQFwoHNFZ_hqiTTqfJ-cVqBPfLYDtctEk,1459 +torch/include/ATen/ops/le_ops.h,sha256=ZMz2UPN6CtD4weuREmGUFjrsmZFowczPflwuw94e_FU,4455 +torch/include/ATen/ops/leaky_relu.h,sha256=-CLGc7m1qfcfpvDdtFRLDm7qUsf7OOHdp6UHu3onKFo,1806 +torch/include/ATen/ops/leaky_relu_backward.h,sha256=gZf4_ZyUhppyzlqBu-tFD45mz46BYBLKA27HISIBPoA,2072 +torch/include/ATen/ops/leaky_relu_backward_compositeexplicitautogradnonfunctional_dispatch.h,sha256=r6aY2_i1WLNMMUuK6_Y4hXKzSTLasOdKt4zAQ3oyP20,1145 +torch/include/ATen/ops/leaky_relu_backward_cpu_dispatch.h,sha256=hI3h3YAGs3XuW7oXyTubFwBqnFa6JE5RNuPrnCEGFD8,1448 +torch/include/ATen/ops/leaky_relu_backward_cuda_dispatch.h,sha256=vqre75Zx7jRUvG8cg1mHGhbwA50AmoNuJ5QftbMnfZI,1450 +torch/include/ATen/ops/leaky_relu_backward_meta.h,sha256=-NZNhWUdiS1eDHXWd4ZCDFDH04W_7QFBAXr87tAX3u8,922 +torch/include/ATen/ops/leaky_relu_backward_meta_dispatch.h,sha256=XEoRZ1Ah3rleU0AS2uJDkU-ELg3V2-4GQv77ijnpB4w,1450 +torch/include/ATen/ops/leaky_relu_backward_native.h,sha256=P9eNYOd-Jhtw5sZBi4pbTqPQjWM6GQKkuaPBkfWMZ7c,984 +torch/include/ATen/ops/leaky_relu_backward_ops.h,sha256=ZQLlgoUVr2-9c6mzru1hB0sPtWpwsKL5UBvl8QzB0Fo,2493 +torch/include/ATen/ops/leaky_relu_compositeexplicitautogradnonfunctional_dispatch.h,sha256=oTTwf3vV_rlfRVs6vqgveLPJ9UPvtM2_Axu6IKk-XsM,1183 +torch/include/ATen/ops/leaky_relu_cpu_dispatch.h,sha256=PVYVcXH0vmGIebh7pni8H69p1BoDB7ojYC88sAitCVw,1353 +torch/include/ATen/ops/leaky_relu_cuda_dispatch.h,sha256=2gDaaoN0VFGtuXUdq9xehwaMWWe9DuAITOrCKSL1YiM,1355 +torch/include/ATen/ops/leaky_relu_meta.h,sha256=8geIt0FuoZ_2Xs2ZNMdJr4apgtf4VGCbEPFomrSk7bA,860 +torch/include/ATen/ops/leaky_relu_meta_dispatch.h,sha256=_JaiWSEnfjscrGVN23NJc5sJ1j6DUSyViOtETKBxF4U,1355 +torch/include/ATen/ops/leaky_relu_native.h,sha256=H23MHGgMYV3cFkA7W1HVH8cAi6Xr6Yj3geORjK0rYEg,1249 +torch/include/ATen/ops/leaky_relu_ops.h,sha256=Ac0ctgrObbYc3jAADZei4CCIHNdQJaBffyEd0gJOqXc,2690 +torch/include/ATen/ops/lerp.h,sha256=cV1A3CgmYqbIxUBW6j7qf_AHb60f8mK-DQ5HCzeRV2I,2398 +torch/include/ATen/ops/lerp_compositeexplicitautogradnonfunctional_dispatch.h,sha256=tbwm2obIQWAM_mqcKMOw4uVjgk7daIvtlKFmWXZ2MHg,1396 +torch/include/ATen/ops/lerp_cpu_dispatch.h,sha256=j0dcjawLFY1Cn0qZWWZ8o3nB42Fa2THm2VvkvEESsUI,1836 +torch/include/ATen/ops/lerp_cuda_dispatch.h,sha256=VeWnSEjz4ezKT70LvY_9YCgGowLXA6XvR5X9U4fIWHo,1838 +torch/include/ATen/ops/lerp_meta.h,sha256=FWska9KUKFzIcLfW7nShwiKmkQjW5tL196GxQb_QfUg,1043 +torch/include/ATen/ops/lerp_meta_dispatch.h,sha256=ZjL6XVFv0pQTzQTBlTPMMdtUbqE002ZHRBJJEiZj5OM,1838 +torch/include/ATen/ops/lerp_native.h,sha256=2B-Qh3h5JSwM5znXFtez_DOOZjNtFl9xwQpQW7214ZA,1103 +torch/include/ATen/ops/lerp_ops.h,sha256=vlztqvQSgLaVewjEby7Ry0FFPGiS0-K_ehNAbFVWKdE,4989 +torch/include/ATen/ops/less.h,sha256=TaK3EUbj54zdC6t5fEKctgzBl4syqn0A2P_PoKFr1ds,2134 +torch/include/ATen/ops/less_compositeimplicitautograd_dispatch.h,sha256=daH3ip2_gyq5VLdE_UskyunU04o6XEFZbVr04E1ob84,1680 +torch/include/ATen/ops/less_equal.h,sha256=yJBNuQ2UY6t2pCDVSN8Vmw-2FP1F50qEHHLPbzv4vf4,2248 +torch/include/ATen/ops/less_equal_compositeimplicitautograd_dispatch.h,sha256=ShkgZRScfhJgLSs5uHQPVc5azAAdzqITZV9kmzMhDTQ,1728 +torch/include/ATen/ops/less_equal_native.h,sha256=zr9b49YifeXmmdTjF3yIMZg-lvnRClPzZBneiCUDmU8,1222 +torch/include/ATen/ops/less_equal_ops.h,sha256=IJjNdOIJbN49mbSoo00PVio8hp0KlO41JVCi4r1C0t8,4599 +torch/include/ATen/ops/less_native.h,sha256=4r3FR6IRUXdRtsgi37yF8cyvSVnG9eLQjKdaXPmcskA,1186 +torch/include/ATen/ops/less_ops.h,sha256=KgbZ94sD8_7MLN7mxFwj_7Z-zwWTd3UcavGgPYMsPs4,4491 +torch/include/ATen/ops/lgamma.h,sha256=AvNeL1aLSbccWnwoTaOWG1wSZy20Q2yMhXwR0DvLLrQ,1281 +torch/include/ATen/ops/lgamma_compositeexplicitautogradnonfunctional_dispatch.h,sha256=fs_JZBCBJfDMBuDjtLcmBS8Wa0yX6hThZ5Vm21sTmV4,1095 +torch/include/ATen/ops/lgamma_cpu_dispatch.h,sha256=zT_rfENZynhi80uTsSezmONosqKulvCxUcjE5ctUD4A,1182 +torch/include/ATen/ops/lgamma_cuda_dispatch.h,sha256=IkOFjnafoj6Tw9wCfguphdAn6L3dyD3UhNrzqaMWEJM,1184 +torch/include/ATen/ops/lgamma_meta.h,sha256=MQ44SPZgk1x1G1mZxS7KDt4rePmZ46KBxS0JZwMnu7I,821 +torch/include/ATen/ops/lgamma_meta_dispatch.h,sha256=CimaogXH3Yd3d2-J4eBfo3GVntPJA7WVgT-6qCDjFQ0,1184 +torch/include/ATen/ops/lgamma_native.h,sha256=hpsGgP8cYDAXUBR1CkajzAe1Zsf0sKlUHiIZ2ctsFWo,850 +torch/include/ATen/ops/lgamma_ops.h,sha256=vzjaqK6UdW3uSxZ75IVattiTYJ84CIUr-uNHUwtUSHI,2300 +torch/include/ATen/ops/lift.h,sha256=lmY_MR-QmdqfcxtzuQrSvmQ5WgZbuzTV5tBMb0cll8s,1261 +torch/include/ATen/ops/lift_compositeexplicitautograd_dispatch.h,sha256=a_onejlEgkMEhPoN1okFy6-odh39wP-2M-7Zf6BISeE,1169 +torch/include/ATen/ops/lift_fresh.h,sha256=od7cAqJbhdrShvmOPiYF55vFWhcVHKwaVhE5zdvW6ZM,913 +torch/include/ATen/ops/lift_fresh_compositeexplicitautograd_dispatch.h,sha256=4RHH_A_PHR8pUF-FAKeTRhtCgjwGmaD1komeePICyF4,1022 +torch/include/ATen/ops/lift_fresh_copy.h,sha256=I-NX-JmAVvUbTb2nqekp2ePTfmeKXGwuJjaW21i5dks,1371 +torch/include/ATen/ops/lift_fresh_copy_compositeexplicitautograd_dispatch.h,sha256=R9PtKEeb_4YPfSE9_IUpEZvFvcRlI1-oa_HYqtYuBP4,1139 +torch/include/ATen/ops/lift_fresh_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=XUCNNl5fEbVM5JkgHaO3LggULTUeqNMRcjeZnwAndWo,1053 +torch/include/ATen/ops/lift_fresh_copy_native.h,sha256=SeFk8VKnHQy2uYpRoFXHX85skS91wm4EE7973ZFMvEY,826 +torch/include/ATen/ops/lift_fresh_copy_ops.h,sha256=c6owk1ZThAwX817C443bW3K8YrRK4o0VzMoZjWBhO8s,1855 +torch/include/ATen/ops/lift_fresh_native.h,sha256=m2p0jxvIHFSzhQw-kqbqH-efyYMhZyytY-HGmOFnm88,734 +torch/include/ATen/ops/lift_fresh_ops.h,sha256=ATFEMUKzTc267tpBs_MnUtqxoqkXPQu0ryy5FYgE1Do,1229 +torch/include/ATen/ops/lift_native.h,sha256=wn7cGshZrMEBJTDC-KERf9bKp_AUTsmqkQHkZhC7G2I,804 +torch/include/ATen/ops/lift_ops.h,sha256=AikcYovQ71v93GeX4einlF9HYEWw3fI8v6RdeNqSBC4,1789 +torch/include/ATen/ops/linalg_cholesky.h,sha256=x2zwvMMkQ74N2YJrMp1h47S1rFgpD3FB-i8V1jiGd08,1497 +torch/include/ATen/ops/linalg_cholesky_compositeimplicitautograd_dispatch.h,sha256=LMDISHf4MZn8uscele95Z0Xw2sm85S_BYuhSLK_aVyk,1250 +torch/include/ATen/ops/linalg_cholesky_ex.h,sha256=660E56_DFGHmvbzYvBS1r22D2eooSADJnQll-jbqLFY,1915 +torch/include/ATen/ops/linalg_cholesky_ex_compositeexplicitautogradnonfunctional_dispatch.h,sha256=uyD3dRPDXzKPgwLxUVoBNMzbqAaUCluyH_JVxpfqsUk,1124 +torch/include/ATen/ops/linalg_cholesky_ex_cpu_dispatch.h,sha256=WyrhGxEdJ8Vs5vNaTroswiem7anacRyqFsT15qyVWmA,1397 +torch/include/ATen/ops/linalg_cholesky_ex_cuda_dispatch.h,sha256=uv_dPKUBOhXV9ipX5-AoCKLSovHNB9_GMpEPgbT00ME,1399 +torch/include/ATen/ops/linalg_cholesky_ex_meta.h,sha256=aogo9AD55KY1d0nzb-wXYO3ZULg9bqzSfA09H66jyZ4,864 +torch/include/ATen/ops/linalg_cholesky_ex_meta_dispatch.h,sha256=A-SeRYJ8OKryvZi4D_dW0cfm2IEhk8tKT-VXxIAWT-g,1399 +torch/include/ATen/ops/linalg_cholesky_ex_native.h,sha256=kbVierApm4ykLBN-1dq7VBlUtCVouKJ_lU9vNVP6dUQ,940 +torch/include/ATen/ops/linalg_cholesky_ex_ops.h,sha256=UWg7OO9Qq-6ip_aVHBvF5QM73HhSTsELWHriDxmsA7g,2361 +torch/include/ATen/ops/linalg_cholesky_native.h,sha256=Rjz1xOS_dGlqRGaxttRBlvJq_yUjJQDiryhfV3PUoE8,856 +torch/include/ATen/ops/linalg_cholesky_ops.h,sha256=0ibWvh2RPlVi7RyMRJ13mtcU5M-2MSLSPZzZt_WalgI,1954 +torch/include/ATen/ops/linalg_cond.h,sha256=zGdqpDlj8BNXjHwXiK8gF-Mz3EQuweJA8eMuri0tb88,2231 +torch/include/ATen/ops/linalg_cond_compositeimplicitautograd_dispatch.h,sha256=3_GyYscnwGetxAr6-T5NBnbCh9fnJSArX-W9eGZ8bPI,1623 +torch/include/ATen/ops/linalg_cond_native.h,sha256=ewDMhWJUUb5uO21sFw7ZsvtFEig_Sfq6ma6EcO4yEyw,1093 +torch/include/ATen/ops/linalg_cond_ops.h,sha256=k02o--ursXip0jZj-5kOICrFXsImL7l5xntF4xadGwk,3378 +torch/include/ATen/ops/linalg_cross.h,sha256=BbmgQx0LzzSvYANpDkbFadBZY-9Ox7JR5gRs9Oa9XWA,1581 +torch/include/ATen/ops/linalg_cross_compositeexplicitautogradnonfunctional_dispatch.h,sha256=xt98a9At8gD2JkkQJfpcJlYd21mw8eJ3v7g-j7-CMcY,1092 +torch/include/ATen/ops/linalg_cross_cpu_dispatch.h,sha256=-8dgrBXaUh5aDEnNRF_oBYxloIaSNng7R-bjoOGvA4I,1272 +torch/include/ATen/ops/linalg_cross_cuda_dispatch.h,sha256=rkY-sP_r8FWL0gvrY2q-4KeMxLE-oOW2QIgsHQOH4m4,1274 +torch/include/ATen/ops/linalg_cross_meta.h,sha256=R-Ld2d4O9bSk9_RXniR1VvyOKgsTzCt9WCb0JFzBpK8,866 +torch/include/ATen/ops/linalg_cross_meta_dispatch.h,sha256=0Zo0GtBYRYqL3oYCSYgpQI0pd_AbWSMy78sp0frtWPo,1274 +torch/include/ATen/ops/linalg_cross_native.h,sha256=lr9JliLKilkv8uRHTBTAmwt0-CzDderS5ug4eagC6VM,1020 +torch/include/ATen/ops/linalg_cross_ops.h,sha256=Et4fJoTSuBZDXS5H9zsJVtcUMwo4WnOf4LbQ4Vtukko,2106 +torch/include/ATen/ops/linalg_det.h,sha256=qOK9s0G_CQoyJUZ85TnBLysPVUqyzkDD6iUpdCT-fnQ,1294 +torch/include/ATen/ops/linalg_det_compositeimplicitautograd_dispatch.h,sha256=mE314h14Oj4dg4T6k69saIUyfvGCLom4VgpaVQB8vg4,1178 +torch/include/ATen/ops/linalg_det_native.h,sha256=nTJzSpZexmzHdPdMsj-xl9sGon6bBRPGxB2z7LdH9_g,810 +torch/include/ATen/ops/linalg_det_ops.h,sha256=KBEZsoISoHT5ybUkzaT9fDt47yRYOcG-C1OYEDxkzAU,1807 +torch/include/ATen/ops/linalg_diagonal.h,sha256=wKXG2ajQJG6SmQPZUHng63UFEMU61zGiS302fdzQMZo,1039 +torch/include/ATen/ops/linalg_diagonal_compositeimplicitautograd_dispatch.h,sha256=eCSgUovp3SN85fxFJaq7mYRbRouM8YHfgH4OcfHluJY,1076 +torch/include/ATen/ops/linalg_diagonal_native.h,sha256=pWV1suH6pSeTEXv4BfBsIxzBzU5wwkSi4-Wr_O0odeE,788 +torch/include/ATen/ops/linalg_diagonal_ops.h,sha256=Ry15c7gyN9b1EPM-0yZngaixLvHL0o38xGqeGIKtNhc,1393 +torch/include/ATen/ops/linalg_eig.h,sha256=jaBjrOkEfvjMLvDormk8NGAm41nRAEiw9pKj8QzgReI,1693 +torch/include/ATen/ops/linalg_eig_cpu_dispatch.h,sha256=VG0p-dx3oQOitdXiZrd9ZDxroLod4dnnAGiTd2kZiA4,1292 +torch/include/ATen/ops/linalg_eig_cuda_dispatch.h,sha256=h8vsyYjznpcFbLXB6-O3b0WeJY_QdwR-ooc1SzNhnuQ,1294 +torch/include/ATen/ops/linalg_eig_native.h,sha256=nIo1ReBx0tMiMjzlKRnbDAdLxR64OtTYRepdqvEE8lU,903 +torch/include/ATen/ops/linalg_eig_ops.h,sha256=v6tM3JQcGHsxpzJaO-M0GXoX1Xm1pqrP4HA_gYB_6sU,2172 +torch/include/ATen/ops/linalg_eigh.h,sha256=NBxfedX7HJWbeWdBU5DqSE_euNcqxhriE0nQVOLihgA,1802 +torch/include/ATen/ops/linalg_eigh_compositeimplicitautograd_dispatch.h,sha256=QWKJfNgbZHJYtOhbwjjtN6FRExRCq8cp6YGtSO5Fhaw,1398 +torch/include/ATen/ops/linalg_eigh_native.h,sha256=ZxqLYU12YUJYizF1NrxBHT5QOKRtM7KsWlSDEXpnzck,946 +torch/include/ATen/ops/linalg_eigh_ops.h,sha256=CcP4ynUIivnPkxmiig4lZjwErfuPtvSLwZ2oq1A3ljw,2323 +torch/include/ATen/ops/linalg_eigvals.h,sha256=1IkJDMb9dHcHy0-IOoV77TMKS1NfXt6ZFpwbjQOlFrw,1361 +torch/include/ATen/ops/linalg_eigvals_compositeimplicitautograd_dispatch.h,sha256=XoYonDKjvxPUHb2TuW4nsgIuegIRKCEpPA-YwyII4Hs,1026 +torch/include/ATen/ops/linalg_eigvals_cpu_dispatch.h,sha256=mTtZO6JlXXDPwIXaOzWbiyv3qHvprrsojF_ZJyunWbE,1093 +torch/include/ATen/ops/linalg_eigvals_cuda_dispatch.h,sha256=ekzpzUEHwrzThPMKZ0AB2_gwHROim6xvHyl7XcbyzGs,1095 +torch/include/ATen/ops/linalg_eigvals_native.h,sha256=ohHvZ06lKIpLcX1YLmDwys88UJjz9K3DwEEEspKTdcM,824 +torch/include/ATen/ops/linalg_eigvals_ops.h,sha256=yAHMkUQRb85BUYmrv_RaA_dMzC3yVATfXPYTlIB0Rp4,1849 +torch/include/ATen/ops/linalg_eigvalsh.h,sha256=jqVwJXVQAcWVR7cORErnsVI9iiPuFf8NynZSeRDx12s,1508 +torch/include/ATen/ops/linalg_eigvalsh_compositeimplicitautograd_dispatch.h,sha256=7f4qG5c3NfkbJNrtooeqjdjAWrr-EnKIlfx011Wzh_o,1279 +torch/include/ATen/ops/linalg_eigvalsh_native.h,sha256=NJusBBvCGAU_PZwH3Z_wVCkdq6a7TgYsos_WaUP_JVg,876 +torch/include/ATen/ops/linalg_eigvalsh_ops.h,sha256=K7YFYF0Qr1YsFWgCLqgLN8pP_1yAct6YKczovCSOh-g,2015 +torch/include/ATen/ops/linalg_householder_product.h,sha256=_YQRA0JQcCGhB4jQ0UnPtE-m_YZwGLudZUEwlyvADCQ,1613 +torch/include/ATen/ops/linalg_householder_product_cpu_dispatch.h,sha256=Y3TJaqf0h8Q6B7YnOPcn8CzyrOfQd49QV57eLjzRSzg,1266 +torch/include/ATen/ops/linalg_householder_product_cuda_dispatch.h,sha256=tyoiewXg9sp2qOjMQXOa4vqGfd7XGMPe6_LBnapuotM,1268 +torch/include/ATen/ops/linalg_householder_product_native.h,sha256=9bAjC4_sOxUF-eT91KfJtkgaTZ0L6MuL4kVxVdohJYI,898 +torch/include/ATen/ops/linalg_householder_product_ops.h,sha256=wMCzogDmFH9kjJvt5vzo4A6W8Q-Yem7gyBeaC7BtAPA,2087 +torch/include/ATen/ops/linalg_inv.h,sha256=9PUeK0zgGfDG9f-nKo8A2Wxphg7xjtVZTVkGGCkGVTM,1294 +torch/include/ATen/ops/linalg_inv_compositeimplicitautograd_dispatch.h,sha256=LstNcxPDx2Z6cuQLXVWCX7W1BG17VrxazcCsWQx0s8k,1178 +torch/include/ATen/ops/linalg_inv_ex.h,sha256=Xfue3sdq82mJTE5R6lzb18WVT0FOU4cKxu6fvFz1I5w,1793 +torch/include/ATen/ops/linalg_inv_ex_compositeexplicitautogradnonfunctional_dispatch.h,sha256=yjymCW-QdMSxSBOk4AepXkSHoIgyfOQnlll-Q-17H1s,1098 +torch/include/ATen/ops/linalg_inv_ex_cpu_dispatch.h,sha256=dXmY7mwsvfWMAe-mFvA91ufplaCuIbQe9YRfAC3_4EA,1337 +torch/include/ATen/ops/linalg_inv_ex_cuda_dispatch.h,sha256=KeeSs7xa2AGbpDZKcrTU3KCmOhIEee78eBed3SyHeQw,1339 +torch/include/ATen/ops/linalg_inv_ex_meta.h,sha256=w8BfQSfy0hDvQ8QcGdvig64mxn9rpjHxP2BR4uHpsOg,844 +torch/include/ATen/ops/linalg_inv_ex_meta_dispatch.h,sha256=abX504tv_-z3s6cYtZLqSgfFHXY8ok3sYOPEApiREkU,1339 +torch/include/ATen/ops/linalg_inv_ex_native.h,sha256=gFVCRLMrsllOp6vnA6nwhDiwnEh7Yn85fkV7oUBymmM,916 +torch/include/ATen/ops/linalg_inv_ex_ops.h,sha256=vbG2bmvSK7Zfw_RgNo4YbvpDMhQ93gfIBJDqv288vJg,2265 +torch/include/ATen/ops/linalg_inv_native.h,sha256=nrfTfn7Q1zFyHo50pg-kicygmC47FsOFpKPuZpZsKDY,810 +torch/include/ATen/ops/linalg_inv_ops.h,sha256=RVm98LlBc0ItgQ_JHveKBPwX7jm7vvoYyazpx4R6Qfw,1807 +torch/include/ATen/ops/linalg_ldl_factor.h,sha256=EzrfKYeOzJzeBfcG8tStlV3eUSEalOJSVf6iwon6Mx4,1790 +torch/include/ATen/ops/linalg_ldl_factor_compositeimplicitautograd_dispatch.h,sha256=dnUji-9watS2s40fCSf7uyxzF9Qj-CbF_erWzwQVAtE,1387 +torch/include/ATen/ops/linalg_ldl_factor_ex.h,sha256=E0JQO1G42QfQF4MXdKQx3YffYZLZWEDBQLPR8Kj3FZ4,2174 +torch/include/ATen/ops/linalg_ldl_factor_ex_compositeexplicitautogradnonfunctional_dispatch.h,sha256=AwCTPCD-AVZIpxQGkMHVpi04jK9-nCukuW-sW25KPmI,1141 +torch/include/ATen/ops/linalg_ldl_factor_ex_cpu_dispatch.h,sha256=8W8js6HFdHKPPXA5xbHSUzu-XBKwgg7XDzQ9UmtHrAk,1496 +torch/include/ATen/ops/linalg_ldl_factor_ex_cuda_dispatch.h,sha256=c3Zus3yVBoVz_RJRtFJoA_aKVzzDOJUyVBhCkuJtDw0,1498 +torch/include/ATen/ops/linalg_ldl_factor_ex_meta.h,sha256=qWKY_-QeCakfQsSnb0I-YuuNb-3JVhp2v63NyLvCvt4,870 +torch/include/ATen/ops/linalg_ldl_factor_ex_meta_dispatch.h,sha256=mpjY4aZQ8EjBPYavL05r1AzaNR-DXvOMy5DtvU4IL5w,1498 +torch/include/ATen/ops/linalg_ldl_factor_ex_native.h,sha256=gOwCZMo-OJfs7dgYSsYs41O6yv_oJ2hfc-8xd5cSAlg,978 +torch/include/ATen/ops/linalg_ldl_factor_ex_ops.h,sha256=CPzuGRUzKFjz92TO-sqjwC4LMDsWu3IKZnuRRaweD28,2589 +torch/include/ATen/ops/linalg_ldl_factor_native.h,sha256=_CV7CynjnQ7rCiFo0i0roM4-wNeHY_QlXJfaPud9UMU,940 +torch/include/ATen/ops/linalg_ldl_factor_ops.h,sha256=i5piUdrVQTCQbSS_w6qkOXPubV8mqbq4oeGp4CpjBTk,2262 +torch/include/ATen/ops/linalg_ldl_solve.h,sha256=Z7_SISkO0sw0G2SY5XEvmIAydaNKz8f2iaFMjKt1Fu4,1780 +torch/include/ATen/ops/linalg_ldl_solve_compositeexplicitautogradnonfunctional_dispatch.h,sha256=Zo0HfLwVZCAx-86f1jMQuIYLmeA1TaRza0s-gFNpq98,1123 +torch/include/ATen/ops/linalg_ldl_solve_cpu_dispatch.h,sha256=eKVhnapxsYIIjvQbB2CAGhmR5K98PihMWocLg0Wd6wA,1362 +torch/include/ATen/ops/linalg_ldl_solve_cuda_dispatch.h,sha256=TZij5CTle16QLNRcLFNX_MjLrpqsR-OONf6jQ3qKMqU,1364 +torch/include/ATen/ops/linalg_ldl_solve_meta.h,sha256=vHrPcz1qtglcguq-c7pCMLX0ZnyxUnvosqWaOblpig4,894 +torch/include/ATen/ops/linalg_ldl_solve_meta_dispatch.h,sha256=jmJ7AooOk3MTO3cJJsbol5pYU3zvgr6RX4RzTyQGOVo,1364 +torch/include/ATen/ops/linalg_ldl_solve_native.h,sha256=fzR_UhEPiVaarKrxYscyJxWGRA32M8lPXZuO76tjNNc,943 +torch/include/ATen/ops/linalg_ldl_solve_ops.h,sha256=TYInDRUnvnZIC5IXefj0rx6jttCNMZ09B2je9ccTzHw,2298 +torch/include/ATen/ops/linalg_lstsq.h,sha256=eY4mZrc_PyJwdFT-D1T5n-zQiDGx9xmMs3oxBcwpP-o,2637 +torch/include/ATen/ops/linalg_lstsq_compositeexplicitautograd_dispatch.h,sha256=B491D3aN6MFFogIspibuGTQbqzr0OGWLH8is4ORUBSQ,1196 +torch/include/ATen/ops/linalg_lstsq_cpu_dispatch.h,sha256=ZCslv7V9EZ30Db7c9eWqSFCNBE4c_PFnpPtovqmqxdY,1571 +torch/include/ATen/ops/linalg_lstsq_cuda_dispatch.h,sha256=_sCwbXjfWwI_FYckj8xaKPzT1YRGlljEKeWZhQE7_0k,1573 +torch/include/ATen/ops/linalg_lstsq_native.h,sha256=vx2Zvdp1evPIfD1rNpFT8cI7wa254916IUURVknu4ZY,1218 +torch/include/ATen/ops/linalg_lstsq_ops.h,sha256=UWW9eLKVG2mzUWy4QmV6526ADkBYtrv6u7S7tv--vxE,3188 +torch/include/ATen/ops/linalg_lu.h,sha256=Ox2sr3s_BwLU6L1PWsNs5PHn-wscZhT6ONynY9SVtdQ,1729 +torch/include/ATen/ops/linalg_lu_compositeexplicitautogradnonfunctional_dispatch.h,sha256=Tq4lVIBJLeV7q6mjQIc46s30oXlxKZCBj0s7h1M3U-s,1097 +torch/include/ATen/ops/linalg_lu_cpu_dispatch.h,sha256=ayco25_68R37zckSxHNJ-CsRQZBjyL5N-4-KSe2XkPw,1353 +torch/include/ATen/ops/linalg_lu_cuda_dispatch.h,sha256=WZG78J8v6u_Aaq1_Mzjo_dHYLTsRy0S_wmNcm2l2bNI,1355 +torch/include/ATen/ops/linalg_lu_factor.h,sha256=7ZD9WZHPN9ZXS9Sr_kBWGcgAmKv0hLAkbQwkukHaIuk,1712 +torch/include/ATen/ops/linalg_lu_factor_compositeimplicitautograd_dispatch.h,sha256=KFVa1qke9OCtvMJaKyopeUsw6K0q0_6lmDyiw5mrN9M,1361 +torch/include/ATen/ops/linalg_lu_factor_ex.h,sha256=y51x13dmX2afQoWE5qZ9A-YEg2C0bhXxvs30FsKVyO8,2096 +torch/include/ATen/ops/linalg_lu_factor_ex_compositeexplicitautogradnonfunctional_dispatch.h,sha256=QL4qz14k-9TP090aKKj1mufOdhmwKqbtlZnZGax_RG0,1132 +torch/include/ATen/ops/linalg_lu_factor_ex_cpu_dispatch.h,sha256=9j7hoizb5y3qZceZEa_waJs54gHx1C7xyHzJ4wBKr1Y,1470 +torch/include/ATen/ops/linalg_lu_factor_ex_cuda_dispatch.h,sha256=fIPD1N0nRKmOHIEZd-tRn6muw6e2jhv5PcD2kOc1aOQ,1472 +torch/include/ATen/ops/linalg_lu_factor_ex_meta.h,sha256=2SSMymduI4Pbj-1aB6xaOfNDZCpco10dYV-PBi6-ZJc,862 +torch/include/ATen/ops/linalg_lu_factor_ex_meta_dispatch.h,sha256=0_GZk_Y9IZHemr3xihAyX1yTC_vjj3SxeXB-4KgN3Z0,1472 +torch/include/ATen/ops/linalg_lu_factor_ex_native.h,sha256=_ArtkrzB2B8YYm_XwWvGqbHjLrraNu1-i__51HtPfIw,968 +torch/include/ATen/ops/linalg_lu_factor_ex_ops.h,sha256=2JxIPt4ZoAxtjOo4EjcpzVpSrIPqDIpoeqjjHVrPKew,2539 +torch/include/ATen/ops/linalg_lu_factor_native.h,sha256=XiDD3sEhizMJR9uKhni6Kvx1u6dypaypS-L9lRct5oo,923 +torch/include/ATen/ops/linalg_lu_factor_ops.h,sha256=5Lm4G-J8d6IEdm8xtu-bCIJE4Yuqt--8kboJBlZpbqs,2212 +torch/include/ATen/ops/linalg_lu_meta.h,sha256=zQJlysRbWPPFF__tlnFnl9kkmW5WBGv2SbyRBFklzhM,833 +torch/include/ATen/ops/linalg_lu_meta_dispatch.h,sha256=teAv6JQ3QiWoUY6rzWKwAXXs5HwzLFl_J1Z2y_lHrPo,1355 +torch/include/ATen/ops/linalg_lu_native.h,sha256=1l3QXIiwLNyRVduX7_ujPAkp-hnGMk7yXZab8RQBdh0,910 +torch/include/ATen/ops/linalg_lu_ops.h,sha256=46LiBQx1CmdoKV-ll82UMuiuzHWaH-lfgDwzCbxsBO4,2296 +torch/include/ATen/ops/linalg_lu_solve.h,sha256=s1_0al2-sDQ7ZmDj6vPk2MIF-J1iLu7OCbwTpSlfYII,1861 +torch/include/ATen/ops/linalg_lu_solve_compositeexplicitautogradnonfunctional_dispatch.h,sha256=v7y6QWty3XAkrZMN_nepVlDnGKntB2kKehqeGcgwBCU,1136 +torch/include/ATen/ops/linalg_lu_solve_cpu_dispatch.h,sha256=FtLX1ZAmhK_4pz1mnYdSyvhA_Gr43G8INhn4XcxDRqE,1396 +torch/include/ATen/ops/linalg_lu_solve_cuda_dispatch.h,sha256=kvAOyYE9MZqy1E347QKHBVyfJyoipJbdgc_nbF6PcJA,1398 +torch/include/ATen/ops/linalg_lu_solve_meta.h,sha256=JS3ZLUUNAIMFeP_T6AU4hzqwj0WyKlbiEjUpRQlnWcI,902 +torch/include/ATen/ops/linalg_lu_solve_meta_dispatch.h,sha256=MOpZJy2-nh3WaFLsh2QxoIdA2nKAtF8DdX-IIialTt8,1398 +torch/include/ATen/ops/linalg_lu_solve_native.h,sha256=_umB08vNaOgmvAyfCOYp1KSQK78NRWa8QEIlTS70gc0,949 +torch/include/ATen/ops/linalg_lu_solve_ops.h,sha256=89z2Ns2hVyUQzBV6QQUoxMDAG_rOPDh5ARH0sa18EKQ,2368 +torch/include/ATen/ops/linalg_matmul.h,sha256=eOYG8-QlmbI_uaE6SGqhenBLKDmX9Q9f4Ce0vAXlJio,1492 +torch/include/ATen/ops/linalg_matmul_compositeimplicitautograd_dispatch.h,sha256=kzYfzY65To2KgFilD5_gD4nVdvU81WfQhCSki-Yfltg,1274 +torch/include/ATen/ops/linalg_matmul_native.h,sha256=UXufPQrmjThziUKEtvx9lXNG2I0r4gp1ZxrQ4VXTQdU,874 +torch/include/ATen/ops/linalg_matmul_ops.h,sha256=XPY_relY5iZw7nDkuYZFqOv9IxZvLSR7ZiPORaE-5g4,2015 +torch/include/ATen/ops/linalg_matrix_exp.h,sha256=xXa4s2RxaJLxYJGa8TQvp11CeH6ThBjqTRuw0GIs2Io,1391 +torch/include/ATen/ops/linalg_matrix_exp_compositeexplicitautograd_dispatch.h,sha256=QRezsk1kM8wswEnsxWzcgqwMWBlggLtu1QIQJpjWcsQ,1143 +torch/include/ATen/ops/linalg_matrix_exp_cpu_dispatch.h,sha256=jetPXq9tvVH4WTrepAt9jvzeXvcrS-_LlnXb5wpzarU,985 +torch/include/ATen/ops/linalg_matrix_exp_cuda_dispatch.h,sha256=1hf255FmbFLjMl2JSZUmaQKAZwbNw2n5jXUQb6XFNLA,987 +torch/include/ATen/ops/linalg_matrix_exp_native.h,sha256=a-RGdUhRZXmEJ7i-mtZTo03NqRs3v2SbUNb9rWQVmwo,830 +torch/include/ATen/ops/linalg_matrix_exp_ops.h,sha256=CuzE6x655TUQHb6rHK23MWx6A3VNkol9aFYGH5D1NJY,1867 +torch/include/ATen/ops/linalg_matrix_norm.h,sha256=ICvhd6q6AJ4apbyzUoWgO-b3tnATPu29nhDJY3pa6b4,3413 +torch/include/ATen/ops/linalg_matrix_norm_compositeimplicitautograd_dispatch.h,sha256=z5DGd6RezpXzK8uo3SKIQO_tVWWm2FZQH2q_PLN4fpI,2168 +torch/include/ATen/ops/linalg_matrix_norm_native.h,sha256=v_V6AOtwH3Jdb7Ixxb_t2forVGbC1mE4Oa_RgsEGfBc,1440 +torch/include/ATen/ops/linalg_matrix_norm_ops.h,sha256=ehm8hiuWzIMJpllNWmyVvaayp-QVDVSLISiO0jmxrNY,4470 +torch/include/ATen/ops/linalg_matrix_power.h,sha256=UE6UvgBroiH8qT0BoSMJmCDqItymllHQ2KqxyqJzWnE,1474 +torch/include/ATen/ops/linalg_matrix_power_compositeimplicitautograd_dispatch.h,sha256=A5Zs98TOmZh2msBLhlxsm09U9J5-olKVyva7oJ8e5sc,1247 +torch/include/ATen/ops/linalg_matrix_power_native.h,sha256=VwZlIwFeyqH2ROab7KuAJC4hLF7q0sNZi81e7ZPvEZw,856 +torch/include/ATen/ops/linalg_matrix_power_ops.h,sha256=S9FYF2bcdHikNOcmF7anNWasIK-crgp8vqdL3th1HZI,1955 +torch/include/ATen/ops/linalg_matrix_rank.h,sha256=fHKhs-LorBMnPveQCT74RrDW9LIw3BAp_GoFtuBxD5w,5169 +torch/include/ATen/ops/linalg_matrix_rank_compositeimplicitautograd_dispatch.h,sha256=J3S1rCeAGL0kmob6mbyddfhueroVLgDSzm3kIZBWVqA,2750 +torch/include/ATen/ops/linalg_matrix_rank_native.h,sha256=Voe1sNBuYYihdIL8YIrtiSW0abvKhTaUttX0U93MFAA,1852 +torch/include/ATen/ops/linalg_matrix_rank_ops.h,sha256=VXWDoNbJATQx8h3Ip697D-CA59pgZRcbCEbi-RBPKyA,7336 +torch/include/ATen/ops/linalg_multi_dot.h,sha256=p5BCH44cK8ELNiec5_5yxqS1DkUw5vxGLKXQNf-xAHw,1402 +torch/include/ATen/ops/linalg_multi_dot_compositeimplicitautograd_dispatch.h,sha256=qiA2kx_ccqIyVnS2VCYLJWQ8NBa3InKYrYtyKfNm81Q,1202 +torch/include/ATen/ops/linalg_multi_dot_native.h,sha256=xDnloi3IcF_ut5X5tEOrcrNTWlB3Ld156rNMmLHbBug,826 +torch/include/ATen/ops/linalg_multi_dot_ops.h,sha256=YEwkVAY3pGETxszliueBS1DnRxxDVpIpgaeDwiFy1Jo,1859 +torch/include/ATen/ops/linalg_norm.h,sha256=INu8d_T6WFiAqx0Nu8XFZwXY6QWQ7RRMlO63-4xsqBY,3419 +torch/include/ATen/ops/linalg_norm_compositeimplicitautograd_dispatch.h,sha256=djX0meLaJeEgX3Vc9mU-PjnPJV4J2GmyCbkZtdYKPqc,2271 +torch/include/ATen/ops/linalg_norm_native.h,sha256=Qxg47-0c6o-0Enorar2HNnuswbW0BH46SDO_5Aeh8Pc,1501 +torch/include/ATen/ops/linalg_norm_ops.h,sha256=qfBoUdh0FCphEq4LQbyiS7ZJjKt39PG7buyLrWqw4xM,4580 +torch/include/ATen/ops/linalg_pinv.h,sha256=gBjCw4aUu-O9BMHvAsFmu3G2wVueKVGcZGJ0T-lXZpo,4940 +torch/include/ATen/ops/linalg_pinv_compositeexplicitautograd_dispatch.h,sha256=j83aplXZMtVlMrMVMSXHyFWv3IqF_qlHgnQPJloYlc8,1343 +torch/include/ATen/ops/linalg_pinv_compositeexplicitautogradnonfunctional_dispatch.h,sha256=hImXM_P3Dd7r3HXHUm8Wzqh-l4SEId7batxFDv85SJQ,1161 +torch/include/ATen/ops/linalg_pinv_compositeimplicitautograd_dispatch.h,sha256=1Xm7rzihAQJVokNf7pX4XD42YQQYNLuU30su1cFTTVE,2122 +torch/include/ATen/ops/linalg_pinv_native.h,sha256=mOZUTRApqEuHS1QeZf2NoPCf2E3a2foZcbQvjmhoLU0,1800 +torch/include/ATen/ops/linalg_pinv_ops.h,sha256=jEwnEHDNalnZJzQl1VIMKS6wQkzSPXI2vaD3lCi4nr0,7192 +torch/include/ATen/ops/linalg_qr.h,sha256=IH9kK8F0E7p09s28JPf03SgiRDTIoEXI9C4OQAdUxgQ,1634 +torch/include/ATen/ops/linalg_qr_compositeexplicitautogradnonfunctional_dispatch.h,sha256=-pHxs2ZtnyA-9Sj8Bii637c2_XRszVIPdiUYFKyEgdU,1102 +torch/include/ATen/ops/linalg_qr_cpu_dispatch.h,sha256=pmMyWWRMpFqDaE9ICBB5ztmS81oG9-FGdLiDZSqPTaI,1327 +torch/include/ATen/ops/linalg_qr_cuda_dispatch.h,sha256=oQs7_EPm2OhmCsaAqTxxmpxoH_LzHazTyT7kia_UD9Q,1329 +torch/include/ATen/ops/linalg_qr_meta.h,sha256=nHSyUEM8110G2goBuN-iZ6r8UiNR-wBEOUiedr14wnA,844 +torch/include/ATen/ops/linalg_qr_meta_dispatch.h,sha256=Gus9Cts7sDp73V7FeL0cZhkEqKkm-jTHMz-d4Do8z9E,1329 +torch/include/ATen/ops/linalg_qr_native.h,sha256=ry61jq-f_KBYg9gltrJLkSNdizqONALvxM7P4VLUZ1k,899 +torch/include/ATen/ops/linalg_qr_ops.h,sha256=wzy9NVttrcs_wNKitpQsAY5_C8Ab4mNJGFwLVSigTBA,2211 +torch/include/ATen/ops/linalg_slogdet.h,sha256=XO4kgsyj0-0HJkJN-0KSkAbQ9cxppi_d5KjBHHsfKw0,1616 +torch/include/ATen/ops/linalg_slogdet_compositeimplicitautograd_dispatch.h,sha256=NN65qjD1tDmbQI3mJvGs0hOBlMFuxLl8OHY5Eeft5d4,1319 +torch/include/ATen/ops/linalg_slogdet_native.h,sha256=M4vdriYbYCcjojReIOkvH5P8k0cvGS2a2OZ30F2yxJY,895 +torch/include/ATen/ops/linalg_slogdet_ops.h,sha256=5fDrKWdRfRMY18TpJel4sEFNR24rSNdQy9YspdwIZrI,2128 +torch/include/ATen/ops/linalg_solve.h,sha256=sUOUj_9oPI-PY58G75x8GWOjASVUwip5oxwrdHqWU_8,1531 +torch/include/ATen/ops/linalg_solve_compositeimplicitautograd_dispatch.h,sha256=3LU0jn8OooVJ3uKXSczqG7PJ1s-hQya-WHAQwXlAkk0,1293 +torch/include/ATen/ops/linalg_solve_ex.h,sha256=gUkvsKLqO1EO1XgmhrCAMju7NT4cbE4AUTp5vCwYUoM,2002 +torch/include/ATen/ops/linalg_solve_ex_compositeimplicitautograd_dispatch.h,sha256=bcGxED3HeyJNQ2J8epnmsk1c8vPSemCoGAdzyVGH1WE,1494 +torch/include/ATen/ops/linalg_solve_ex_native.h,sha256=YPRTBgzu-9ZQEccObZfzrJuoO-9mT3vKJdT9DcPGJsU,1009 +torch/include/ATen/ops/linalg_solve_ex_ops.h,sha256=DXTGw_jrSiGm-lrKaIul9sJuvAMnraIXabxe0vFo1yM,2496 +torch/include/ATen/ops/linalg_solve_native.h,sha256=HUJfU8CstRWvhKu2zQJ5R4C84xnO9rWfSUHM4vswnHs,885 +torch/include/ATen/ops/linalg_solve_ops.h,sha256=5FADMlo6TYZT9dGO_4805y8vgzJ9-1Mm440Af5wmtFo,2058 +torch/include/ATen/ops/linalg_solve_triangular.h,sha256=JzFF64F-6VrHIepTJlZTHY4GrrWnz2kQX66wtEeu09c,1956 +torch/include/ATen/ops/linalg_solve_triangular_cpu_dispatch.h,sha256=JEBt6K0WNu4YW4h0yQIsaLDYIr94ekZ3fKTSzZMk2Hg,1399 +torch/include/ATen/ops/linalg_solve_triangular_cuda_dispatch.h,sha256=aAktMfLDxFse-f2aWYHGtxqASEItPGtPU9TuPyoT7UM,1401 +torch/include/ATen/ops/linalg_solve_triangular_native.h,sha256=c3bWQyFFyAFcRjL0bAHoe7jyPLe32k16T_sv4nndMYQ,983 +torch/include/ATen/ops/linalg_solve_triangular_ops.h,sha256=ZAlFA_ivtqSIeDk2RgcPkJE4-fB8kOxhq7MeirZqWUc,2370 +torch/include/ATen/ops/linalg_svd.h,sha256=CidG3-IJrXcLQPgi2-t_YaZ8qQJJ65FROJz5ud3y9HI,2046 +torch/include/ATen/ops/linalg_svd_compositeimplicitautograd_dispatch.h,sha256=_EDo0ux1ze03tcyrc2K8fEbYYvZKmmAv6m2u25M46ms,1582 +torch/include/ATen/ops/linalg_svd_native.h,sha256=mOMa98wfy9Xq4s44Ao-FG_C9htaEjAPMoDd7D5Rgrxk,1061 +torch/include/ATen/ops/linalg_svd_ops.h,sha256=Uv2nw3Rspc3oqMZfM8_FEvwY7PtF6lpTdIxkojuJ8gc,2623 +torch/include/ATen/ops/linalg_svdvals.h,sha256=S0AFo3h6AhdEXCeHdhZ42FxugMY6KBl7jtGn8pZdhfw,1571 +torch/include/ATen/ops/linalg_svdvals_compositeimplicitautograd_dispatch.h,sha256=Mgux0yIJjerTMtzcJ814vyvxymvyeITJ6KTB4u39wVY,1346 +torch/include/ATen/ops/linalg_svdvals_native.h,sha256=AKYe99jOnVZeCZc333JZrT48FFy96wpA569Y_OugxbE,917 +torch/include/ATen/ops/linalg_svdvals_ops.h,sha256=jQlGE87mPqGk-_jVOCaHIbCm58cA46MAKuKJFSzklgk,2108 +torch/include/ATen/ops/linalg_tensorinv.h,sha256=PThoNEJjzHGnjw5I6C-XccrgpMFEELXXGPbwDOCPH20,1472 +torch/include/ATen/ops/linalg_tensorinv_compositeimplicitautograd_dispatch.h,sha256=QhWibJvDLyBfd4qA28NKk5umE-iR792cKFEFtLbrn6E,1248 +torch/include/ATen/ops/linalg_tensorinv_native.h,sha256=oeZOezZ1d9X5m_KlusAuhilxXR0QyljgT2sN1tsoAJ4,856 +torch/include/ATen/ops/linalg_tensorinv_ops.h,sha256=zmvYevJ_1O4pVgbDvnCM7gU-3dbBUOlnAijxWlLPjqU,1953 +torch/include/ATen/ops/linalg_tensorsolve.h,sha256=oRTz-l08ExGr_K57BEa0vHsNeGG-LcFri8Hj_OHCBB0,1734 +torch/include/ATen/ops/linalg_tensorsolve_compositeimplicitautograd_dispatch.h,sha256=6OKTucGsojuwtMlMAIIyPojiA9ECRiKf1-Yi6eMZG0o,1409 +torch/include/ATen/ops/linalg_tensorsolve_native.h,sha256=fk8xoByzegrJCLbVYRSmA3mfi0vPSrcc9WuQ3FhAxVg,959 +torch/include/ATen/ops/linalg_tensorsolve_ops.h,sha256=QdoyVipbqJhvPRpUNf1RbPGYn6qR80TqfVcw_o8vBGM,2251 +torch/include/ATen/ops/linalg_vander.h,sha256=RW-7ePVWoNSJ5PozO8h8iBUp0Y8LPaiPPLEXBI0tlBI,1840 +torch/include/ATen/ops/linalg_vander_compositeimplicitautograd_dispatch.h,sha256=woFTLPNBQmRVvkkeoeTzT3-5uAnhNGkGgdy-UbnuKTY,1177 +torch/include/ATen/ops/linalg_vander_native.h,sha256=atoJuiM2bAJ8fOBHzUmxIhGL-z7WnWXeNzVjS-ubRrU,788 +torch/include/ATen/ops/linalg_vander_ops.h,sha256=Kixnr_Bq9TL7cSfBdmnuFQfn7phMrHXZX5oGrubTKDg,1336 +torch/include/ATen/ops/linalg_vecdot.h,sha256=zkjF6Tieo07wla-4Z1xRyJ6mZBuTjqLgKRFmkqW6WcY,1528 +torch/include/ATen/ops/linalg_vecdot_compositeimplicitautograd_dispatch.h,sha256=4jAn2-6RtA94O64tB91XkksEFKY0L4Ut-SL0EeOFn9g,1298 +torch/include/ATen/ops/linalg_vecdot_native.h,sha256=3fPm8ubqoX-3gBH0o_8YLH47tkC150uPcv64hiB78RQ,889 +torch/include/ATen/ops/linalg_vecdot_ops.h,sha256=egLqi5iLfcW78erbzWsK405bddpzLMmHAFe996emisU,2070 +torch/include/ATen/ops/linalg_vector_norm.h,sha256=Dix3RyQ-1gRkFV2KhNjZKQpzqUaWBWRF-9F-M9ImGxw,2104 +torch/include/ATen/ops/linalg_vector_norm_compositeexplicitautogradnonfunctional_dispatch.h,sha256=o4BycAW0E8tM-TrBSdNsgYWe7wi0Zp-qwORyke0owdM,1200 +torch/include/ATen/ops/linalg_vector_norm_cpu_dispatch.h,sha256=F06vJc6SBYGF3_LbKlbR-U2NZIIrhWwoBx2KTdHNjfQ,1561 +torch/include/ATen/ops/linalg_vector_norm_cuda_dispatch.h,sha256=DeF-8Qh8mf0XKPZaD7CXo0K4HJzibnzPt_69skj-uik,1563 +torch/include/ATen/ops/linalg_vector_norm_meta.h,sha256=ZjZ6-e2CIuMO6PzDhKefYoQi4oP69NVRORi27QRAl5c,939 +torch/include/ATen/ops/linalg_vector_norm_meta_dispatch.h,sha256=CzOlrzt3tB3XD1H8w0ERW5vegGsI-A5KegDkk2A6D8o,1563 +torch/include/ATen/ops/linalg_vector_norm_native.h,sha256=H_gHPDhI8rrJAKsfoQl-7x_Oc__QO3n_rc0VvYmN_ug,992 +torch/include/ATen/ops/linalg_vector_norm_ops.h,sha256=ehT6-r6FW3vu-Aok7YLNDcGxBSwajiTzW-SoCPhT8BA,2620 +torch/include/ATen/ops/linear.h,sha256=01NokxKu32cxtcMGbjYmlFkzme3PWvCnLNZiCoxkyME,1647 +torch/include/ATen/ops/linear_backward.h,sha256=TicG3L8MI7vLcRyjr7x50_Z2T9GyWZG7aI60caiNWOU,2280 +torch/include/ATen/ops/linear_backward_compositeexplicitautograd_dispatch.h,sha256=H-Eu6Ft5dzxlkOvy25Jg540UHnapKK51EqtUQD3xQKc,1483 +torch/include/ATen/ops/linear_backward_native.h,sha256=kxFDMmtqwnTr7iCUkVGK98G_gJ-7VD_Ys_riaMZJqgg,1134 +torch/include/ATen/ops/linear_backward_ops.h,sha256=eUS9SWQ3SjgiDF5IgyxSoQW3_waxtXMQC34muJPsJ58,2876 +torch/include/ATen/ops/linear_compositeexplicitautograd_dispatch.h,sha256=e58pUTv6ng4qvxUfbFHJ8NaeeXXAtlW5mT5PNdAytl4,1264 +torch/include/ATen/ops/linear_compositeimplicitautograd_dispatch.h,sha256=_TA-g4WbvagtJcXO10D0Z4HaEsK--wnpew1n4FWpJ6E,1091 +torch/include/ATen/ops/linear_native.h,sha256=FJdzdwYLF3XyFiWNJUT91UhnXaczVUcKwbczvgLIJu4,1085 +torch/include/ATen/ops/linear_ops.h,sha256=TNKnjv89VAemh4VL4Lm_sV5Wzabc318StGONbhHLqYo,2265 +torch/include/ATen/ops/linspace.h,sha256=BjrAfCrVYYRPXZg54Ax8-FRkqvvyQym0yrmdffZ4KSs,7130 +torch/include/ATen/ops/linspace_compositeexplicitautograd_dispatch.h,sha256=rAyH894irmhtzNcNcWzcjXpmWjEmfwpE8pbsLW55glo,3155 +torch/include/ATen/ops/linspace_cpu_dispatch.h,sha256=ecsxyxSojt-uO_HAdeqgEDN1D_XxXbIV_RXQx5bIdqI,1161 +torch/include/ATen/ops/linspace_cuda_dispatch.h,sha256=iYJWAcuTUZ2FcOPhfak1qXfktf_maQKFdrgW_t77PiA,1163 +torch/include/ATen/ops/linspace_meta_dispatch.h,sha256=Y4-rZ7EqCL6Z8ILzIP3F-q2K5LJbEV7Fw-0ta9VUWgc,1163 +torch/include/ATen/ops/linspace_native.h,sha256=qp1DUTgf4KUxE1P03pUKgY49E-H3g0pAYRrE7gN6Mxc,2293 +torch/include/ATen/ops/linspace_ops.h,sha256=O4MzxVxSQwJcVnzanBn9gj2B05-ObeInQye4wg_HxWM,8416 +torch/include/ATen/ops/log.h,sha256=xOQaF50tq9lcrCmH4Iezr9Kr3JAb97F5_U0SIpJQHqM,1384 +torch/include/ATen/ops/log10.h,sha256=xryDeKUv0QNiJSy_cJtbl_0FYskLAv975IScBqGoCoI,1410 +torch/include/ATen/ops/log10_compositeexplicitautogradnonfunctional_dispatch.h,sha256=qkkqkBU48LN26KruF22zWeghO3Rogaua_9ULnXB0s9A,1093 +torch/include/ATen/ops/log10_cpu_dispatch.h,sha256=mkNZWZsAT1kCIi0MkXbsZ2Q1XU7mR9VXscNgA6lYDoo,1178 +torch/include/ATen/ops/log10_cuda_dispatch.h,sha256=PAdt6UUCFcqogXnE6i05JLGH5xMpIbF0MnYe59fo1HI,1180 +torch/include/ATen/ops/log10_meta.h,sha256=4LIY7g43NNA1e2WfwVZH7UJ8TabNy_UIAm4BH4ZYCws,820 +torch/include/ATen/ops/log10_meta_dispatch.h,sha256=NlEefBvTdHBwyK-oUARwFZ7QVd0ysRwTuP9Gn4k-oro,1180 +torch/include/ATen/ops/log10_native.h,sha256=MJKOcod__cxaAmd2JpyrzXNwu5kzI9yH2X-tnOSqUOA,847 +torch/include/ATen/ops/log10_ops.h,sha256=BUejzlx8zbqNhCQvWYsxH4wydyj7JUcUqyzpyKpTzt0,2291 +torch/include/ATen/ops/log1p.h,sha256=OG2kPlZlVEhZHiE_fN4S2tONFJyB0KuRATbYN-gCcgA,1410 +torch/include/ATen/ops/log1p_compositeexplicitautogradnonfunctional_dispatch.h,sha256=aa38aHhxPV2nntvQV92r3FkRXc-UJbjGJXWxx-ncSxk,1093 +torch/include/ATen/ops/log1p_cpu_dispatch.h,sha256=MjaXv2WalOgfiP4QungEnD_63_945CZQsCp5sjPDbSI,1178 +torch/include/ATen/ops/log1p_cuda_dispatch.h,sha256=d1qSIy_FVDhYK8kOTuzg2laXOuVTh_JCTi71SiqEX0I,1180 +torch/include/ATen/ops/log1p_meta.h,sha256=vviGLx641ST0YzpoIDcYsRiiEu0JX3jx7vRKgXbssBU,820 +torch/include/ATen/ops/log1p_meta_dispatch.h,sha256=17Sj8Bc8Xv4VvZ2ILmhKidfrm7IpYPqWZFA6yMZHEoQ,1180 +torch/include/ATen/ops/log1p_native.h,sha256=dDrZEZpCtZCwGng_GCKs46VdmfAZE_vH8FcmNhy1f_w,1261 +torch/include/ATen/ops/log1p_ops.h,sha256=kfZm2qspmY-5YLLxLZMXxHovyIVvq8eSAevcChMi6xo,2291 +torch/include/ATen/ops/log2.h,sha256=ZsUCAC7Yg2u6glmX7m-BJ-X5J72XX0tGnAFnFB5zJgc,1397 +torch/include/ATen/ops/log2_compositeexplicitautogradnonfunctional_dispatch.h,sha256=nK5nvLJ0Gry9P6VWStGGRcWQquvrIxlqG7hpj41L748,1091 +torch/include/ATen/ops/log2_cpu_dispatch.h,sha256=uQof6NP-SS_yRQwZBqQc6Z6UR4EV8iILc7G-dBOkFHc,1174 +torch/include/ATen/ops/log2_cuda_dispatch.h,sha256=OUyzi3_I4ZdjFuzXGreORuwih3OXy8efssRn1-Uz5c0,1176 +torch/include/ATen/ops/log2_meta.h,sha256=NwOlwUGSMgyyR_fbcF5lNStLUUycMnTnZy4_r5fwclk,819 +torch/include/ATen/ops/log2_meta_dispatch.h,sha256=-mn18o1vbJF2mWu1AnDBldzC9k7q38QwsdaVEGAus0E,1176 +torch/include/ATen/ops/log2_native.h,sha256=QYS0_A6U9hHTAOB5sZpONdQzQRnEh4QhA5yC5eRZQw8,844 +torch/include/ATen/ops/log2_ops.h,sha256=RN65vluzw9xI2MFtIosJHmPDxAOs-k-p3LvyR4nMUFk,2282 +torch/include/ATen/ops/log_compositeexplicitautogradnonfunctional_dispatch.h,sha256=zawq8hY1L3QuF7G4KL7SXA88VGWA-7fx8z1_fy8MJ-w,1089 +torch/include/ATen/ops/log_cpu_dispatch.h,sha256=fnLB3WJHkN8-27Ca6-NDf3CFqI7mL2-Es0WOY_B0E3M,1170 +torch/include/ATen/ops/log_cuda_dispatch.h,sha256=ZUC-UzXJziTuBICEueFvHfaud3nN5WzPY_PAuDCRiV0,1172 +torch/include/ATen/ops/log_meta.h,sha256=c-pI2Ni5Zc2twOwAo8csq84GSdaJ0QxQ-9aIb86hGls,818 +torch/include/ATen/ops/log_meta_dispatch.h,sha256=qmMW14zAGzjcQb750Rji2dy7C1lEdGE-yC3JxXWib7U,1172 +torch/include/ATen/ops/log_native.h,sha256=CkQiyOgWfrNIdEwMOPWwoYm3FYOLbHklSyd73N3qF_A,841 +torch/include/ATen/ops/log_normal.h,sha256=7MYdqRD2ks9mxwuCzlEGZHbb4TZvmx6ngIw1v3S_vzY,1791 +torch/include/ATen/ops/log_normal_compositeexplicitautograd_dispatch.h,sha256=xcfQNYzJlZkUGfGXqQyhsenc3ACPBwi8SCT98vYLZeQ,1426 +torch/include/ATen/ops/log_normal_cpu_dispatch.h,sha256=HqJnk6grZmcU7YL1cuiQctsgy6ks7N1pj32YjEyrpVM,1061 +torch/include/ATen/ops/log_normal_cuda_dispatch.h,sha256=wylWaji9QReD9PbjajHB-yICpOFKObmNcsEoSCv0Alo,1063 +torch/include/ATen/ops/log_normal_meta_dispatch.h,sha256=EC3fxPiksSCkiUd9o09GWnGOMFRAZTwpcsIL2aHc8Vs,1063 +torch/include/ATen/ops/log_normal_native.h,sha256=ahg-_k9aYRzJ4vd_4zslgmZTMUPmgAjKjtARjxU1Wkc,1110 +torch/include/ATen/ops/log_normal_ops.h,sha256=IpzBUdapLU0rOHJbdYaboTZ6ZptPpQSRNBouuDic_0k,3050 +torch/include/ATen/ops/log_ops.h,sha256=uaEkHCLFuu4ioZqF7PTlP3aZY-OBRq6GZrOAHj1iBls,2273 +torch/include/ATen/ops/log_sigmoid.h,sha256=tVpIKd73NIWqD4WFU2SFd4lp6GmUMdpjcloSniL9bTg,1331 +torch/include/ATen/ops/log_sigmoid_backward.h,sha256=5AxC2EmORABYo5zlXFO8XExJiJ2iMD4W6M5MnFmFZcE,1836 +torch/include/ATen/ops/log_sigmoid_backward_cpu_dispatch.h,sha256=yq_N4Kh9f-Hh-ZyOazRlSBooIh9dAc83fZp4YUb_Mt8,1364 +torch/include/ATen/ops/log_sigmoid_backward_cuda_dispatch.h,sha256=g_us_wU6_cseacHJ3sFkitMbjgNYRyzjqbJUHy770Ko,1366 +torch/include/ATen/ops/log_sigmoid_backward_native.h,sha256=OnL7aSMp4vlMAOxRo-Kfru4ztbjVHYpudt5RKTxoMLc,1264 +torch/include/ATen/ops/log_sigmoid_backward_ops.h,sha256=AO9wm-Ebyj9nyqliZHIDO48FF5qU3aZzZuC7wgKIUOA,2313 +torch/include/ATen/ops/log_sigmoid_compositeimplicitautograd_dispatch.h,sha256=2-zUIbNN1BEWZOB82kS6eFkhkWCKK1zMsOxtLBEgqKA,1190 +torch/include/ATen/ops/log_sigmoid_forward.h,sha256=_gnULzh92JXHEARxbVfmwtTvdi9KWKtG01gbUDEmz6A,1668 +torch/include/ATen/ops/log_sigmoid_forward_cpu_dispatch.h,sha256=yv12S1BJqsaW5Dk9VGbQhWUutgpV6A-LMxInOvBSnfQ,1297 +torch/include/ATen/ops/log_sigmoid_forward_cuda_dispatch.h,sha256=WdjG0Y_VPCkQD58wXcr4uOFXHGzykjdRc6iHMw7nIAI,1299 +torch/include/ATen/ops/log_sigmoid_forward_native.h,sha256=uZs8jJh4isJq70gcNjOoF52L0CHoF4xAb40dXIRZJSM,1162 +torch/include/ATen/ops/log_sigmoid_forward_ops.h,sha256=K_XnvihHFQ-aOsc4nR6PXMeFVvHs93RIRF4UNskHES8,2166 +torch/include/ATen/ops/log_sigmoid_native.h,sha256=HV3C-nCOCAj37EZTFWn72fXz6cSOVUC_rWcjudv3FVM,818 +torch/include/ATen/ops/log_sigmoid_ops.h,sha256=mRyB4WkSGivY20MVGHgPh4aAULcAKFlrvcVPtTCpJ3s,1831 +torch/include/ATen/ops/log_softmax.h,sha256=NWcOTaYoowJWETz-OjaMfoDf1fJfxRqY2ZfJVvc6SMs,1965 +torch/include/ATen/ops/log_softmax_compositeexplicitautograd_dispatch.h,sha256=rLrrXZUUVt1mWYuls5uw_Z9RDm0u3cD2lIXzby1mU0Y,1250 +torch/include/ATen/ops/log_softmax_compositeimplicitautograd_dispatch.h,sha256=fhZiHcucjudl__eb151V74yfgbZL8x_XWpWZHSzNg44,1220 +torch/include/ATen/ops/log_softmax_native.h,sha256=QuHrs3QaCyT7CiKBjlRaCVbj3X0UpbjVzxnqtqIPIBU,1067 +torch/include/ATen/ops/log_softmax_ops.h,sha256=6kv1Hs7kekXNsBQCZVHXMAoh4_CKFguzfAd9LJgBQ0I,2948 +torch/include/ATen/ops/logaddexp.h,sha256=Y23kfc0RhyR8cai_JsadKidS5bp6hAm3_Ac_9zDPkvo,1452 +torch/include/ATen/ops/logaddexp2.h,sha256=KjwZji3NwDB2tR3W0Kaxe0frkMQ-TPTFmVLPNxXxNzI,1462 +torch/include/ATen/ops/logaddexp2_compositeexplicitautogradnonfunctional_dispatch.h,sha256=EaLUi41_axPiHd000OopXD6iYHkWUDIcYHKxhYj7fGY,1074 +torch/include/ATen/ops/logaddexp2_cpu_dispatch.h,sha256=G04mFynA5zME8xlybq10pYzb2jnrNV2ornDT6rgcBpc,1221 +torch/include/ATen/ops/logaddexp2_cuda_dispatch.h,sha256=3UdZTRjoamcAfQb0-8_b7zNO1GSqoOL8gFe_Np5u1cY,1223 +torch/include/ATen/ops/logaddexp2_meta.h,sha256=i2HyOPegYvVizWcEDCTt_u9n0eg_rvW5R31cfCRK1Ks,851 +torch/include/ATen/ops/logaddexp2_meta_dispatch.h,sha256=Ib0YXv2uCXdBVI1s6PLOg3VgS5C-uuy0pDtawjY-yds,1223 +torch/include/ATen/ops/logaddexp2_native.h,sha256=cxMMc0-hNa2RDQaUvBnLqk-Xs4xFsPK0HMtVcy6uulI,888 +torch/include/ATen/ops/logaddexp2_ops.h,sha256=r4VqUdZSZOVjfnVE1AKMNU0QUuL4s1Uhm9_o6Fbx_SM,1997 +torch/include/ATen/ops/logaddexp_compositeexplicitautogradnonfunctional_dispatch.h,sha256=vUOyXE6CcAB_xCQdVzIED5KKCBNL0Ju9C9dRUQ04Aj8,1073 +torch/include/ATen/ops/logaddexp_cpu_dispatch.h,sha256=Eg5PnJ4Aaa9vXQIAJ0o5SuCUmIDbiEUQJ_3IIqSYdok,1218 +torch/include/ATen/ops/logaddexp_cuda_dispatch.h,sha256=M0YdN8nDynFuhGoSEXkCmJy44IaETALR6PcieefLfDY,1220 +torch/include/ATen/ops/logaddexp_meta.h,sha256=reW3tJD45oPKBCDql38j3TsNBoAo-ffoHk1Oa8dMwD8,850 +torch/include/ATen/ops/logaddexp_meta_dispatch.h,sha256=dryZqZMD_SzE3uMF8aejRvZolCN0W7T9CrdIphHyadM,1220 +torch/include/ATen/ops/logaddexp_native.h,sha256=BbCD3W3B0-bQG-SRCQtmublLZnCwtSkSuMFUrOshESk,885 +torch/include/ATen/ops/logaddexp_ops.h,sha256=Dc2Gy_EAUGzTV0QYwxTE9-x1Qa_B-RXed7O-zT27Hws,1991 +torch/include/ATen/ops/logcumsumexp.h,sha256=DwjeITmT-NmoRrI7x6Hx3nYAkm49afn9mNRSaDJh0nU,2154 +torch/include/ATen/ops/logcumsumexp_compositeexplicitautograd_dispatch.h,sha256=ImURomyp9ubZsRe0xarU7Gw6y4qymFxtmJ6Of3iHImU,1232 +torch/include/ATen/ops/logcumsumexp_compositeimplicitautograd_dispatch.h,sha256=Mzx3lbL33xZ0DdLmDzpxAk10e_niKn-wKhbkimwaYkI,1244 +torch/include/ATen/ops/logcumsumexp_native.h,sha256=kAl-xZn1GF3s6Ezq5eQzFKCQ-55OYphU1BRACB9ewfw,1024 +torch/include/ATen/ops/logcumsumexp_ops.h,sha256=DKCI2I09a7wBdnyXE7KvZKkIyzY9eB5bchFI1jMbUCM,3218 +torch/include/ATen/ops/logdet.h,sha256=diUYhDXqTDjqOEgB5X892AXTqPf9sVz2g-nIrpv5XIU,891 +torch/include/ATen/ops/logdet_compositeimplicitautograd_dispatch.h,sha256=-XAH5Ayc1S1rHJwzB2G3D-jZ430HoRTbCkL1n6fHGVE,1018 +torch/include/ATen/ops/logdet_native.h,sha256=OvgfbgSbGdUeBN02pu35DFQAsvrLIaFhm2GdUiSm5jg,730 +torch/include/ATen/ops/logdet_ops.h,sha256=D_7lXSDkbmrfaltIFapPGWqR-hui2jUHl7GsoUylAB8,1211 +torch/include/ATen/ops/logical_and.h,sha256=oE5sRLTXqACgwoWBbxkxsfyeHnJXAxoUsDJT_kqtOQk,1472 +torch/include/ATen/ops/logical_and_compositeexplicitautograd_dispatch.h,sha256=-ap6pSytHxAZOfWT-XzvpJpN2wOUIrdGEjltZ1nqLqM,1131 +torch/include/ATen/ops/logical_and_cpu_dispatch.h,sha256=47tcL1vx1A0FAkwssZSj_R3tAHBAO4PfIuGryWLnjug,1139 +torch/include/ATen/ops/logical_and_cuda_dispatch.h,sha256=d1E6se5-fvbfxyIMhs3xKbBiIjMEIXRB3NhH25ROaec,1141 +torch/include/ATen/ops/logical_and_native.h,sha256=QSE7EjoZ0ExfYN_1clQn6daqYwZcK_Vh5xbmV2jC_mI,952 +torch/include/ATen/ops/logical_and_ops.h,sha256=VwuoqFUW0FunjlWd6Eoww4o8o5Un6tM4Aqzxo-kQ7HE,2603 +torch/include/ATen/ops/logical_not.h,sha256=GBdu7OodZwXyH63pgarjjeYyh8WtMydf48-tECE3Yv0,1331 +torch/include/ATen/ops/logical_not_compositeexplicitautograd_dispatch.h,sha256=i66uZ3cf3D8aCC-ZTD5c6F3k5DvSqxDfULKqBF8r3P0,1079 +torch/include/ATen/ops/logical_not_cpu_dispatch.h,sha256=8Zlgk1tND-AtMAzbYt7VXkp0jRFdG7J3C447PSWql_g,1087 +torch/include/ATen/ops/logical_not_cuda_dispatch.h,sha256=vO8Bse_bBA6rGfIXQQ2BG4iQrWaqO7JoJfDhQf8o19s,1089 +torch/include/ATen/ops/logical_not_native.h,sha256=rd3DYC22BGoowBmbtHiXAgDGQuVNXK7lgIhxhm8gAjE,1015 +torch/include/ATen/ops/logical_not_ops.h,sha256=AkLvfs8EVfmrnUfoDkQ82GIgSjOPBVjuB4rhcx4hNp4,2345 +torch/include/ATen/ops/logical_or.h,sha256=0Ho-YmstSA4Q0GtdqL-BNbiYfuHgZorBkvEk6WIW9UY,1462 +torch/include/ATen/ops/logical_or_compositeexplicitautograd_dispatch.h,sha256=3nWr8pcF_hPjd1-n65-AG_j7_NqIepZl8hWmyvQ01G8,1129 +torch/include/ATen/ops/logical_or_cpu_dispatch.h,sha256=3XstS9SpRsKJuK0LqzoBTAEMQyd5gBT1eo-1wjdm_rU,1137 +torch/include/ATen/ops/logical_or_cuda_dispatch.h,sha256=SZsKMRpZoFJcq2GZlRLaxy1k2Llvwpt608FA57QIgIU,1139 +torch/include/ATen/ops/logical_or_native.h,sha256=8WfC05fxpX2EuVNBBBpWlJ0j-wymLxTpxC1JweYG5S8,949 +torch/include/ATen/ops/logical_or_ops.h,sha256=ioTtybEg5NkT22K0DzLaJYMNV64VTcgjimW-0mgGv-I,2594 +torch/include/ATen/ops/logical_xor.h,sha256=CXdQxCrTEMnxUlE8RA93715We4Id-9NZ24B4wp8JO1U,1472 +torch/include/ATen/ops/logical_xor_compositeexplicitautograd_dispatch.h,sha256=GUv4fv2Xnt1Z6SbK5pgZRSQzwETK-bR34MCkSPZP2rk,1131 +torch/include/ATen/ops/logical_xor_cpu_dispatch.h,sha256=X6BtNUAyK-m6GOhFzjiwiUicHQnzpTmuxN--seWHKrs,1139 +torch/include/ATen/ops/logical_xor_cuda_dispatch.h,sha256=vZbd3ADpAYjcj4HP3ZFdy6Yc3ESWf0H0QxM5jrM6xPA,1141 +torch/include/ATen/ops/logical_xor_native.h,sha256=1uvTjT_q0DOFeeqR-AgOGfBVjV5nBipiV8ypBUxiZiU,952 +torch/include/ATen/ops/logical_xor_ops.h,sha256=Qqypf8jFj67tubYNZAua1wn6oW7lZohGwZ0vMwev3OM,2603 +torch/include/ATen/ops/logit.h,sha256=Ya3qHmsYy_OX5twva9sTNpFcrrGGMZpTsXg_tVgsTTs,1659 +torch/include/ATen/ops/logit_backward.h,sha256=NMoU12-Tw-XziicLqWfJ3F4wwp_1uG9PdJ8fYBOMJQ8,1809 +torch/include/ATen/ops/logit_backward_compositeexplicitautogradnonfunctional_dispatch.h,sha256=S0FI3VQ1qWU1XvWu5HiL9nMRHwo1hTk-ZgiybXmHMG0,1128 +torch/include/ATen/ops/logit_backward_cpu_dispatch.h,sha256=joDDCtCW-Cok28YwckZx_bfxtFO3fNc0jd3yfc_Hhig,1382 +torch/include/ATen/ops/logit_backward_cuda_dispatch.h,sha256=VHxTok09L8JtelQHq4yY0hY7n6u4Iw20Vz-1koVJxPw,1384 +torch/include/ATen/ops/logit_backward_meta.h,sha256=xmlACX-lpM7_I6fHbqEDVWeqXvFilAzR7t5p4jvl2C8,890 +torch/include/ATen/ops/logit_backward_meta_dispatch.h,sha256=0mhXLbSgSq4Iq3lFzrmVXM4gEs91MnP-OzUDp5z6YTc,1384 +torch/include/ATen/ops/logit_backward_native.h,sha256=9ncuT0W0PIMVnFwCy2QyHEmHP5APvU-zhJaUGM3nJ7A,942 +torch/include/ATen/ops/logit_backward_ops.h,sha256=E4ibf5FOu3JchDuBiWuxUXNcVzimjiE18TX4XY-DjB8,2299 +torch/include/ATen/ops/logit_cpu_dispatch.h,sha256=Px9fLWzg908fJHurvJmlSZaPTnOAPdogryOOMp3qcms,1339 +torch/include/ATen/ops/logit_cuda_dispatch.h,sha256=PiDG8Dj7lASH51KKuOuamr94-POT4J742UTbZbV3JjA,1341 +torch/include/ATen/ops/logit_meta_dispatch.h,sha256=DW5CU2-g0nAS2sRx9asRkViHLKGu15BTV5ZEY64VJkI,1016 +torch/include/ATen/ops/logit_native.h,sha256=lAsyt4rp34A4QvW9JwSrbdMIqQG-CXc_JZBGs8Mw4HE,973 +torch/include/ATen/ops/logit_ops.h,sha256=Rlz34du2wCxNHVXgMNomT6jj2860ik6yoLsdhXqo_Bs,2591 +torch/include/ATen/ops/logspace.h,sha256=i4wqGhOhK8bepCr1uErG8T_2cWMSyc4BBPnxvnWMfPs,7746 +torch/include/ATen/ops/logspace_compositeexplicitautograd_dispatch.h,sha256=r9cf7Zmdsdzy61-mo9qKQExkWo1qXE95U9JHKbwkhQw,3372 +torch/include/ATen/ops/logspace_cpu_dispatch.h,sha256=eg58ehs1Da6YoWoDN37ByZnhKP7n92STIoXJG-BMz08,1192 +torch/include/ATen/ops/logspace_cuda_dispatch.h,sha256=W26u2y7qcGAajB_JCKaoRD-IFKVCagzVcIs1ihQ7xEE,1194 +torch/include/ATen/ops/logspace_meta_dispatch.h,sha256=p3ISKkvaODPme-4JiaEGWNZI1nm9caGnTX3ZqPMSq34,1194 +torch/include/ATen/ops/logspace_native.h,sha256=Ie7eZy96iyE7boinKgMjfKJriZcTvmtMh2-dPlZRunQ,2430 +torch/include/ATen/ops/logspace_ops.h,sha256=K15L8st9R2uRhiIr2z305XoOby4haqNsc0ukrUlFtgM,8824 +torch/include/ATen/ops/logsumexp.h,sha256=bWYKMa8IY0X2mJBRi4tK03K6DXIKSwUHTlG49MveqUo,2421 +torch/include/ATen/ops/logsumexp_compositeexplicitautograd_dispatch.h,sha256=fdxdeJb5GBSk5RzDEeZlA8B9BA7Mk1u_PXFFYn2JkcU,1062 +torch/include/ATen/ops/logsumexp_compositeexplicitautogradnonfunctional_dispatch.h,sha256=0dBxOOGT9MZ4xPbeCggbXbKzIuMAqbXfXH5bRQKp7VU,1229 +torch/include/ATen/ops/logsumexp_compositeimplicitautograd_dispatch.h,sha256=62Dl-pwDNMJAU6qoqIqiQTqAFslFiQgZO-xqKr2tF6w,1301 +torch/include/ATen/ops/logsumexp_native.h,sha256=YiPAf73pqPllJJnoEoGc5Zdrxo15DIZtzduIgaXKlsU,1104 +torch/include/ATen/ops/logsumexp_ops.h,sha256=CFv6i2aJqSwoN9ztLh30xiyiGwwbx4YdcA06ZPTomkQ,3470 +torch/include/ATen/ops/lshift.h,sha256=RDWWXhX-4pvyqB6tnF1e91V4bNd1Acqkp3ZM-Z1Kvms,2244 +torch/include/ATen/ops/lshift_compositeexplicitautograd_dispatch.h,sha256=xfEwuM5w3MrqHP-24tJvDwgm_32HoBimYDy8kVfYBuI,1398 +torch/include/ATen/ops/lshift_cpu_dispatch.h,sha256=AJdR9AJbOqOJi7XPdvfUzPDGl4-LMFZ-CmpWWRZUOYo,1250 +torch/include/ATen/ops/lshift_cuda_dispatch.h,sha256=_VtjUtAbtfQOwsKToJB9Z6yBBzJ3zGCkz8eqwbbf1Kc,1252 +torch/include/ATen/ops/lshift_meta_dispatch.h,sha256=fHcInyTf_S7qmmTDYen43KQBkhrGoJvJNOdKZ_nRe3U,1084 +torch/include/ATen/ops/lshift_native.h,sha256=GnfuVfDpmlVLB_GdXO_5X8PvnrT6KmpBqijJjfvV8Gk,1236 +torch/include/ATen/ops/lshift_ops.h,sha256=ExSeUk_d7EoqKRPjrPDsz7A6W3C6czi5vXLtMDfI1Gs,4599 +torch/include/ATen/ops/lstm.h,sha256=npSUDH9EE88Tb45L0k1qjAa5NHFfH2RSuiFF5pRVECQ,1867 +torch/include/ATen/ops/lstm_cell.h,sha256=9ChhGCyLelrwsuysnDQRXfMa7c2-ccAcpkqbH7I1EII,1205 +torch/include/ATen/ops/lstm_cell_compositeimplicitautograd_dispatch.h,sha256=x9Jum4tHatBrTYcpOjvKcPD07wKG78jXG-pbem9QT3U,1206 +torch/include/ATen/ops/lstm_cell_native.h,sha256=qZsF9RM6SH_V3-nNpOjCBtfHiXiz1qm2fb-tY0QGuqU,918 +torch/include/ATen/ops/lstm_cell_ops.h,sha256=Ri-TRhMoB0bVDdDJeBR2uvzJrWUJ4CvKSzCuk0kcF4c,1821 +torch/include/ATen/ops/lstm_compositeimplicitautograd_dispatch.h,sha256=oo1bsfEuBqdy5Xdw8mf-WqpkZaGO5tuO4RcjXfqDoro,1445 +torch/include/ATen/ops/lstm_mps_backward.h,sha256=nq72DjKGxZ-m7Uscrn_C1Eo9uLWp3zFiVYVQSlr6g94,3929 +torch/include/ATen/ops/lstm_mps_backward_compositeexplicitautograd_dispatch.h,sha256=S7mc68XXvZuqszph4aR_aVKPXXqxpPDuJuzvj3ioKfM,1967 +torch/include/ATen/ops/lstm_mps_backward_native.h,sha256=Wlag0V4q0C_u6eEwlKToBo6HVDJrBQo3GEkGIOAiiEk,1177 +torch/include/ATen/ops/lstm_mps_backward_ops.h,sha256=MEalpRoQvChUtS9wdMlx5D4umvciq4Rm6QsfcB_2eBs,4688 +torch/include/ATen/ops/lstm_native.h,sha256=JJ1efTBefLuAICX2t0CqMOF-UyKU8lRaiW2PD65yGKc,1157 +torch/include/ATen/ops/lstm_ops.h,sha256=9cUtntGblA0Lfk6XMkp6adhPD5XqFI7kRX3gNPWg1kY,3011 +torch/include/ATen/ops/lt.h,sha256=pJM_QUThaUSVrMwYAiWvP-hvpCZwBwi0_o15X4OLdFc,2096 +torch/include/ATen/ops/lt_compositeexplicitautogradnonfunctional_dispatch.h,sha256=0ql3-9FWLwNopQf502-k391RocBo62upxdmYTh1lrM0,1288 +torch/include/ATen/ops/lt_cpu_dispatch.h,sha256=Gkayne__OEdU-jOP2_Qj0HzgNPwfkK6Hm_QDk_sFryQ,1620 +torch/include/ATen/ops/lt_cuda_dispatch.h,sha256=JVjXzeuGAJnRxAxnojF2XRg3kXKWSCGo65cHHsec8vU,1622 +torch/include/ATen/ops/lt_meta.h,sha256=tLPOYvSg5YXSet2D-MKkmqkVRIgV3jnVoF6NDcJISfE,989 +torch/include/ATen/ops/lt_meta_dispatch.h,sha256=P0d_sAgOfKDAger7m_1dYvw5-BlljzGpqOkZGPoA-Fg,1622 +torch/include/ATen/ops/lt_native.h,sha256=u8FZvO_Oz7sj3-SxkV1H5_ggoKb1-XjwfNOG2qz78WQ,1459 +torch/include/ATen/ops/lt_ops.h,sha256=QpVL1mJUMd3HclW1dzIE3o_MLOBJzyUdgPjlS4WVw8k,4455 +torch/include/ATen/ops/lu_solve.h,sha256=gUMqtLx25YQdMV_TYceuOI31LZ3X08l5urnieFbckj4,1637 +torch/include/ATen/ops/lu_solve_compositeimplicitautograd_dispatch.h,sha256=NiRiMBRYPIlFRtu2iPtjqUPECt6qMQjynjIktLecwKk,1355 +torch/include/ATen/ops/lu_solve_native.h,sha256=HEthPORZztgozQYyxQQgYmvMgFYM05vnxx2FR6AiRTM,928 +torch/include/ATen/ops/lu_solve_ops.h,sha256=5CiFj94sZeb7yyTtRGTdmuH6bDwROReuAvqbCGQHtso,2193 +torch/include/ATen/ops/lu_unpack.h,sha256=sf9UQ9XXv6OECLmAZCdANrSwCpER9AU3rapkKfyqYB0,2201 +torch/include/ATen/ops/lu_unpack_compositeexplicitautogradnonfunctional_dispatch.h,sha256=c0m1UHGkOIpgqENEwrJ2DAPySp0aEcP1_9sdtV2mvOY,1164 +torch/include/ATen/ops/lu_unpack_cpu_dispatch.h,sha256=UjFauGJ1LEh-1DUzBCBho03FN9XZM4uPL9QziahKmwA,1549 +torch/include/ATen/ops/lu_unpack_cuda_dispatch.h,sha256=-4hA4j37aCfZWWdPkZwNhxyEt-8y05bXsSicyeZ88vw,1551 +torch/include/ATen/ops/lu_unpack_meta.h,sha256=lW8JM5YQAkeZvANUEadeJJ-oVRk2_FoSamer5Xj3Ab8,895 +torch/include/ATen/ops/lu_unpack_meta_dispatch.h,sha256=nlVYF2pvH3HaLoImdzGdH3Wp_BhHs2nUlJ_DeBq2N3s,1551 +torch/include/ATen/ops/lu_unpack_native.h,sha256=Cul8PAQB06yLf4kK4QbpGsOLCsCKfwUcWqH8EKCA4oI,972 +torch/include/ATen/ops/lu_unpack_ops.h,sha256=YKpNT47IfgZneVIfWkuzBB4qH259_8tguWBFJtIyIu8,2703 +torch/include/ATen/ops/mH.h,sha256=pbNrcfKRz-DtptslD6_oOhJh2dQ5_zJP9f1TxcbtwcE,753 +torch/include/ATen/ops/mH_compositeimplicitautograd_dispatch.h,sha256=5c7p1m62IDlFqSdC-EL-1DJYg3QO6d6mRKcOdWGwcYs,1014 +torch/include/ATen/ops/mH_native.h,sha256=grLNKNYYBR6simKgZ_OgIR03IycJfmB05YYQRfOpKaA,726 +torch/include/ATen/ops/mH_ops.h,sha256=DzFMYyTHKnfMWAoprPBlwTkTSap-CNMmwA-a7bXPuoU,1205 +torch/include/ATen/ops/mT.h,sha256=asgp9Kiafnhz0RwllEkh2US0r-y7kxtQfR8WNjcG0-w,753 +torch/include/ATen/ops/mT_compositeimplicitautograd_dispatch.h,sha256=0pOR0xayTRUR4ah9abHsQ9E8-P71Udq0ZjMhueyKPZ8,1014 +torch/include/ATen/ops/mT_native.h,sha256=G62vhGJK_48ZVkW1uArLuBD2IjsdzUIuZS_V342y1K0,726 +torch/include/ATen/ops/mT_ops.h,sha256=G9gruuYoK9zVidxmZIktforSmwMJGdgTkacUUf22M9g,1205 +torch/include/ATen/ops/margin_ranking_loss.h,sha256=PFLMchhpdbTzDMXkLVD8oi8tyGc-WaSOd4YXxn5TwVg,1164 +torch/include/ATen/ops/margin_ranking_loss_compositeimplicitautograd_dispatch.h,sha256=_-8nLE6Hx_cIGR1rCD67voOMYmep-s3Nr9V6g6f3hsk,1145 +torch/include/ATen/ops/margin_ranking_loss_native.h,sha256=d1WrPBpG_A0Lj9uuzEGjIx6FYHOffTfNkms1kHZp32k,857 +torch/include/ATen/ops/margin_ranking_loss_ops.h,sha256=gK-5f3inySwwtdGgjxiFf5KrZfKww-BfCqVt73t2vcA,1557 +torch/include/ATen/ops/masked_fill.h,sha256=orT5D32DYTLYqOPvh037zzMDUwLj0QvPNQLx_KQAjaQ,2531 +torch/include/ATen/ops/masked_fill_compositeexplicitautograd_dispatch.h,sha256=JOPu-_EcrDfa4WROicheidtzasK15rKeEHGMi8RxJZ0,1722 +torch/include/ATen/ops/masked_fill_cpu_dispatch.h,sha256=PiQxtYy71JJWagCkfWRI-DuAjCjI0ezG4wvU_hxfk2k,1134 +torch/include/ATen/ops/masked_fill_cuda_dispatch.h,sha256=ZuhxwuLPH46NygQwFnRa6_EBCoVOJJZ3-mn5atykTeo,1136 +torch/include/ATen/ops/masked_fill_meta_dispatch.h,sha256=o9tTd4hsl8qOKlA5aaWUUGeIpCaR2y6QMZynrKyCdjU,1136 +torch/include/ATen/ops/masked_fill_native.h,sha256=gGVcfz43gSuLsAFr5mNcjtlAGQh-7K7lrE1YOHxg1VQ,2233 +torch/include/ATen/ops/masked_fill_ops.h,sha256=8iEbhJTqeLCTswUGNpFB7HJePwdTYMip9xsXTOYikoo,5115 +torch/include/ATen/ops/masked_scatter.h,sha256=a9U2m2OIIhvA3gZTrUHWzMKyDMKp1OushwVL6-Y_KyE,1643 +torch/include/ATen/ops/masked_scatter_backward.h,sha256=7sN_0PMkcnXlQFlY16zKzCPa-g7ZvQ3_B8W7flMV22c,2044 +torch/include/ATen/ops/masked_scatter_backward_compositeexplicitautograd_dispatch.h,sha256=yLAVLFUAzozW97x7RpoAiD-SUxj20A4D-IaM5mS4uh0,1227 +torch/include/ATen/ops/masked_scatter_backward_native.h,sha256=PM8ZAvzFXjEuS7ZPjP4NuzEd7K5fbUkfRpNKmX_69Ws,813 +torch/include/ATen/ops/masked_scatter_backward_ops.h,sha256=ZFIWw7eIDsz7EHFgkXXW5BbQPVYnb0oPGuJzyKJ8l4o,1457 +torch/include/ATen/ops/masked_scatter_compositeexplicitautograd_dispatch.h,sha256=Fs9RcwUfI7nij7Yl6TPtXjsaIfBppxCDpQI0whYygs4,1355 +torch/include/ATen/ops/masked_scatter_cpu_dispatch.h,sha256=74enrbznF6YmkbMJc3uVuEMOgq7hrRMDufsQQs-B89E,1031 +torch/include/ATen/ops/masked_scatter_cuda_dispatch.h,sha256=ywRIoNAQ6WHmUm5XdHikKKGQgk50ooaJq5nORaqO188,1033 +torch/include/ATen/ops/masked_scatter_meta_dispatch.h,sha256=eglldQYSep8hKmPwy3r49fS_bTzgqbot1f-jS1AIqUI,1033 +torch/include/ATen/ops/masked_scatter_native.h,sha256=RD0R9pqIpzfNY_IUPu4ilMtIvxuNLpn9gJgAzkYqC9s,1159 +torch/include/ATen/ops/masked_scatter_ops.h,sha256=zR_uyGmrNBoclDVhOOczAqkmvSyunWaKYsx4MA_jx5M,2888 +torch/include/ATen/ops/masked_select.h,sha256=35nj-D4EHuABztDY3A2jq0meqZxh6BROXY1_Yadc5oE,1483 +torch/include/ATen/ops/masked_select_backward.h,sha256=Rn1ubEOG7XpYhgA9GGVCk31RJA2bAIEX4jIvHD-mPpM,1046 +torch/include/ATen/ops/masked_select_backward_compositeimplicitautograd_dispatch.h,sha256=kAYmFlfvkQC3w7byIJXLuKYayV-q2a0yorrMX6JJers,1085 +torch/include/ATen/ops/masked_select_backward_native.h,sha256=yJnZ8KsWdHwn9TG_cM7Tzcd-1-zniIKKj5SubCraEc4,797 +torch/include/ATen/ops/masked_select_backward_ops.h,sha256=SqZLGB0h1AXNltai_muPXsVmnDJ4rUP2jHgtVn43Ikw,1428 +torch/include/ATen/ops/masked_select_cpu_dispatch.h,sha256=CVOrGgxffjmefDE4ol_cbs0WVjQymCTFlnfzC5BXcIs,1227 +torch/include/ATen/ops/masked_select_cuda_dispatch.h,sha256=tputscIuPHtyViFhoUY0i7LIbkfpSRjOlSZ7GMmIgJQ,1229 +torch/include/ATen/ops/masked_select_native.h,sha256=kl28b0787rMCrLFBg1pdptB-xp3B9hMDtSMZla6nw7E,1086 +torch/include/ATen/ops/masked_select_ops.h,sha256=6JxuLlGclmcjBkpU37azlpm-3Onh2sldEB4xpaKrbuA,2009 +torch/include/ATen/ops/matmul.h,sha256=jaovUb9XTwqKE27kbctsdJD0gqmAzIJZBasYMp0gPAw,1422 +torch/include/ATen/ops/matmul_backward.h,sha256=ullOJa7sUxUo2jxR1MVlt8Cm9x19Zgof9nyhQjKuzuQ,1992 +torch/include/ATen/ops/matmul_backward_compositeexplicitautograd_dispatch.h,sha256=zjWedAfyxYniZthVD21CtctrVy7nPSriYAN_OobwrlU,1389 +torch/include/ATen/ops/matmul_backward_native.h,sha256=nNmp-C5gxNU7xMfkpuASxuOIH_uAwbKJUq6QNaIv5CQ,1061 +torch/include/ATen/ops/matmul_backward_ops.h,sha256=2nKXYY2acX_eQ7xX-r3wLkG-Vni9Obpuk4fGJwmEKAQ,2625 +torch/include/ATen/ops/matmul_compositeimplicitautograd_dispatch.h,sha256=Q5RMaHujLUx5jnNrv0t9E-Cs23SBFWZozSiFjvFrAyg,1253 +torch/include/ATen/ops/matmul_native.h,sha256=Zz9dnwdj3Uwio5KhA3KhRnQdqHGYtHiSbFHr_7qxBQo,1058 +torch/include/ATen/ops/matmul_ops.h,sha256=UwYR5wSUYHT6IAcgrpAreyoIjBOBb72Bd4P8LDRf5r8,1973 +torch/include/ATen/ops/matrix_H.h,sha256=sZ73InVoI6GVyw7j-twzKeJTL97Gv5qSghZAps97PLA,759 +torch/include/ATen/ops/matrix_H_compositeimplicitautograd_dispatch.h,sha256=JPmH-207ngk4S-UHHR25ePZyzDh6XHpGuVWHhYWKZVg,1020 +torch/include/ATen/ops/matrix_H_native.h,sha256=ARYclGs5nIcEvL8YJ4lo1Buw28Ls4H2RdOv92yD8Zyw,732 +torch/include/ATen/ops/matrix_H_ops.h,sha256=fmyA9eNELzU30vgLZNdgVD3jWAUkVyGOCszpxh1SI7A,1223 +torch/include/ATen/ops/matrix_exp.h,sha256=IrzitVtO0-BND4KUrFOvCq8_Knex_3EAdCeiCqKMyfY,907 +torch/include/ATen/ops/matrix_exp_backward.h,sha256=YrGWftbIT2b5dIiKfrpRfZAiSXxM8MtBGGy4UVOwGd8,987 +torch/include/ATen/ops/matrix_exp_backward_compositeimplicitautograd_dispatch.h,sha256=cUZHMzZN2wCjwrfPc-OadcSORBXJ3-QstLtIKdkvS7E,1056 +torch/include/ATen/ops/matrix_exp_backward_native.h,sha256=iR-evb-MdJb2m8qjJ-Tgvu-SAuBtFqANn8LnRd_sKRQ,768 +torch/include/ATen/ops/matrix_exp_backward_ops.h,sha256=n6GP8TRN8cJaiZ-v4Phmc736aUIuNLowspayB_FQR1I,1333 +torch/include/ATen/ops/matrix_exp_compositeimplicitautograd_dispatch.h,sha256=4BtDf0tsCCvsbvo5OV5X3lPaefvaNna3yq_Ss8wSuSw,1022 +torch/include/ATen/ops/matrix_exp_native.h,sha256=tXFiZgSZWGJL_pXmMN4NmCtbq7n-_wffVqWW8bSIgpE,734 +torch/include/ATen/ops/matrix_exp_ops.h,sha256=IowmHVhsp9I5Y_EyxObyGYuQeN_e5UjHmAi_7urG4ew,1223 +torch/include/ATen/ops/matrix_power.h,sha256=jh5c8AoNqfTsA4pT_bh-FXd2RJU4iQTthmUi0Mm4mzc,1404 +torch/include/ATen/ops/matrix_power_compositeimplicitautograd_dispatch.h,sha256=KylM42hSOfvhT8ubTXCqFzOL8HcMaQJ_72S0ODedcd4,1226 +torch/include/ATen/ops/matrix_power_native.h,sha256=f9blx8Wi0WJVRgZ4mntZZ6Pk7nz0Q_E4ee1hrXG2le4,842 +torch/include/ATen/ops/matrix_power_ops.h,sha256=-oxUv7NCbE62rMAXBr6ow-C2QCpje87cccjY-LyPk5I,1913 +torch/include/ATen/ops/max.h,sha256=u6W-s70uWyYj5XCHSogMJXAKJnaLPR3gCVawinI7AOo,4038 +torch/include/ATen/ops/max_compositeexplicitautogradnonfunctional_dispatch.h,sha256=HXAIBO5ZdfZ-NErR0BDkLAowo3MIanL3FkNR0Li9J_A,1099 +torch/include/ATen/ops/max_compositeimplicitautograd_dispatch.h,sha256=MWm7p7t5tS4e8-l3xC_n775KvuYLhZ6bxAeUfdxT-CI,1680 +torch/include/ATen/ops/max_cpu_dispatch.h,sha256=5eqgzJt7R4bFmmsHH325G0r2VSWpg_YQzXpxJEoZSaQ,1546 +torch/include/ATen/ops/max_cuda_dispatch.h,sha256=47h3noNEiY9uY_gZduq0P0Jv2S_OHNWQcH-aYgKd6KI,1548 +torch/include/ATen/ops/max_meta.h,sha256=BNDgonEkZb_vWkzEq7PnTm9a7qpMbEIXEKA4LZ3Bs9M,1291 +torch/include/ATen/ops/max_meta_dispatch.h,sha256=8PIbjPimZqMXco05kwJkH57gH-GPESaB-vYIFnRVJMw,1346 +torch/include/ATen/ops/max_native.h,sha256=58jeM65cL9sUxeWhhOCRT8qK0_TyILCfcz6mqmcfmR0,1750 +torch/include/ATen/ops/max_ops.h,sha256=kilNHwJo9Q5R-Q7Dm5G6naIXKeI6c3pNY1Z83ywHfw4,6306 +torch/include/ATen/ops/max_pool1d.h,sha256=3nLsOLETqlqJHxeayvmmEo7M9G6eQW46kMp9AyxsVxE,1188 +torch/include/ATen/ops/max_pool1d_compositeimplicitautograd_dispatch.h,sha256=Owf8WVpvZsd6SZx-K8LtitQzbFPfP3x4AxVA5WUWnP8,1155 +torch/include/ATen/ops/max_pool1d_native.h,sha256=PIlVY8KDWNiTtwDT1RrJ-Z1hygsq6W6DIEDYvvXcdOU,867 +torch/include/ATen/ops/max_pool1d_ops.h,sha256=HDcdY2PyLvDhF14kR-px9cCTgh8yANh4fJq45f5RODU,1634 +torch/include/ATen/ops/max_pool1d_with_indices.h,sha256=Tp0jZ0OcxG3IjVyobYp6KvcZoD76R_k_RUcskzAbuSA,1275 +torch/include/ATen/ops/max_pool1d_with_indices_compositeimplicitautograd_dispatch.h,sha256=J4DwKwdv8lDc_UQN2CIUCe6BeEk0RgkGCowCZs-Tpi8,1193 +torch/include/ATen/ops/max_pool1d_with_indices_native.h,sha256=SpLGau3sXnn92j7aZ7blLbQ7GLhPM3dzNmY3nO30vAA,905 +torch/include/ATen/ops/max_pool1d_with_indices_ops.h,sha256=tkZs4MuIebTLJ-w1HUFLVfFqGkwVxZvB3X63D6Cta3Q,1758 +torch/include/ATen/ops/max_pool2d.h,sha256=73-9YM7nwbkayq09YNV1lTWLIe8abeWFNYWldNZOr6k,1188 +torch/include/ATen/ops/max_pool2d_backward.h,sha256=HOeg3hpbmfYolMD7Z_7eH_rHzbedMVnz_I3EV5-G-Us,2436 +torch/include/ATen/ops/max_pool2d_backward_compositeexplicitautograd_dispatch.h,sha256=7aFxvT8NWsyoOSje32j0Qjp2BvYRB583zInkYNPWIFA,1464 +torch/include/ATen/ops/max_pool2d_backward_native.h,sha256=lDGs7P8EAQje5FoajByzdOQsRurBYis060R2RjQB10g,919 +torch/include/ATen/ops/max_pool2d_backward_ops.h,sha256=v_1jOxKJEyL70E_lGOri-42XLY8WHjxrb1us1iduAPA,2909 +torch/include/ATen/ops/max_pool2d_compositeimplicitautograd_dispatch.h,sha256=4bRNk_juojizScxd8SSSYrMtp_R4S231zdVWE8GvVgU,1155 +torch/include/ATen/ops/max_pool2d_native.h,sha256=F9EUWLoNlKvNEMxiTKQCjFPKEedoy6gBz-I39DXBVt0,867 +torch/include/ATen/ops/max_pool2d_ops.h,sha256=_Qnsd_7AQNZNL5SPzC9S0u2ntaDZDeG3IruAGNTKsQs,1634 +torch/include/ATen/ops/max_pool2d_with_indices.h,sha256=wJ_eYaqc9gkjm8KOFWjc4nlZG0yykKBgBL5YrF5WA8w,2500 +torch/include/ATen/ops/max_pool2d_with_indices_backward.h,sha256=p3siom_wNOWepDPBXYxuD2q1fKF6LSlLuU5YuxV1W9g,2730 +torch/include/ATen/ops/max_pool2d_with_indices_backward_compositeexplicitautogradnonfunctional_dispatch.h,sha256=3EQunEvLzt83_Mo9wuoTg11wBWMTSj4AysdKDy9TgQc,1250 +torch/include/ATen/ops/max_pool2d_with_indices_backward_cpu_dispatch.h,sha256=n0Qk3hxtHaigNSCh0Gc-cX3fsPUALgCiEWGFSNphA74,1763 +torch/include/ATen/ops/max_pool2d_with_indices_backward_cuda_dispatch.h,sha256=C4VeX5BS7hQprkWg3e8m7tIUZJvpCHr8TGhsFU9e0Xw,1765 +torch/include/ATen/ops/max_pool2d_with_indices_backward_meta.h,sha256=1H63oFP4OxZPMUaXcvBZn1ne2kzKQWvsSYNK54JruvI,1027 +torch/include/ATen/ops/max_pool2d_with_indices_backward_meta_dispatch.h,sha256=KlHDoAP_PPOhUBRFlXWU5IlCxQLQDloYnhDIg9JcwfI,1765 +torch/include/ATen/ops/max_pool2d_with_indices_backward_native.h,sha256=0cLzUSly6lHWsQewAdDZPwHv5VmpgE24z5FXyCrQrZI,1504 +torch/include/ATen/ops/max_pool2d_with_indices_backward_ops.h,sha256=7-QLg3POJ2k9gW9pYrxoxgOm1dApJdV98jFWSqPRRGw,3187 +torch/include/ATen/ops/max_pool2d_with_indices_compositeexplicitautogradnonfunctional_dispatch.h,sha256=fRT-3r6eZWGGrB3wTqldhlfYjQzylGwRgbvmgT5-hpg,1219 +torch/include/ATen/ops/max_pool2d_with_indices_cpu_dispatch.h,sha256=7bNB-17Ht8XSHAwI1bVVIACEUGy35qJpi1_ZWZL9TM4,1691 +torch/include/ATen/ops/max_pool2d_with_indices_cuda_dispatch.h,sha256=bax5HkuBGFlPKpwLSk6PjRHoIzGkT7gTnw3zPXmXOqc,1693 +torch/include/ATen/ops/max_pool2d_with_indices_meta.h,sha256=K-dBuTS5cjtPfm0exSzqbhED72MZ9UDcbHT-Uymp7GY,958 +torch/include/ATen/ops/max_pool2d_with_indices_meta_dispatch.h,sha256=BVXVjT4iuhk-b5UyH22LYBLGmi01iLgAlbj9pg_4gng,1693 +torch/include/ATen/ops/max_pool2d_with_indices_native.h,sha256=71QmJhhxp_LBOXYk3NHvNX6tewGGlxuoCDterf0PAjc,1381 +torch/include/ATen/ops/max_pool2d_with_indices_ops.h,sha256=UJ-qIvjbH03fo3D05uMjkoj_edto82xV0pIp7aG8uxw,2983 +torch/include/ATen/ops/max_pool3d.h,sha256=gWR3wqBoVSV5JTE4zo8qHQ_8tcCSa9YsfKOGGmWoqf0,1188 +torch/include/ATen/ops/max_pool3d_compositeimplicitautograd_dispatch.h,sha256=uWPnZeRFJCRvisbsPGmVA_MM36OHxRUARFTaWooAcxU,1155 +torch/include/ATen/ops/max_pool3d_native.h,sha256=zwc6Kjp7HG2YfbCk6FL8t7ddJ1glXQcOt_aREmansVI,867 +torch/include/ATen/ops/max_pool3d_ops.h,sha256=MyQ9hSsLCk_bOrZmfphMceF1sCO41SCuQH_FBlXePwM,1634 +torch/include/ATen/ops/max_pool3d_with_indices.h,sha256=bbRLAlAWoOemhxBjvJAA6yKVEt4JjvP7gTPB9oN2ULM,2500 +torch/include/ATen/ops/max_pool3d_with_indices_backward.h,sha256=eT533Cy4gRumLT5B4HbZoZ9Y8unad6tU9b-Bu78XAT8,2730 +torch/include/ATen/ops/max_pool3d_with_indices_backward_cpu_dispatch.h,sha256=XDYGz30WNKWS4IHAzQsgh5mWFWCjAtLJs1BNyuMVLf8,1763 +torch/include/ATen/ops/max_pool3d_with_indices_backward_cuda_dispatch.h,sha256=vRwyLOQtrbJXPV2o8NWKXrRVS6NrsFKvB1JOCM5y7gA,1765 +torch/include/ATen/ops/max_pool3d_with_indices_backward_native.h,sha256=h354nw1axCC7D4mjmN7aVQaA3cDND52aIKW0CilX7QU,1796 +torch/include/ATen/ops/max_pool3d_with_indices_backward_ops.h,sha256=sjgnQZt-grP561wvS9woaJ8irMck6ERjDmuQwG-B5SQ,3187 +torch/include/ATen/ops/max_pool3d_with_indices_cpu_dispatch.h,sha256=IXn52oYMyeg2jTnpT7dbfMKR21rnyCImAsrDZOcOAOc,1691 +torch/include/ATen/ops/max_pool3d_with_indices_cuda_dispatch.h,sha256=hkXwUEl7iI9etz5kMSMuUkmhbxdJrm6WtjQ6nQFiw1M,1693 +torch/include/ATen/ops/max_pool3d_with_indices_native.h,sha256=fZDueaRIdMVuNSttagl4eCUBIOPRE3yVCW42GpipEiM,1680 +torch/include/ATen/ops/max_pool3d_with_indices_ops.h,sha256=XAtkzJTtnbXmMGkyh0zexvRJ_f6ExcB8iYl6JGZB290,2983 +torch/include/ATen/ops/max_unpool2d.h,sha256=SXqQHj_pfv8qhMqfdvC4_ugC6dzdQVJ84MUz9HhgT48,4687 +torch/include/ATen/ops/max_unpool2d_cpu_dispatch.h,sha256=kFQZz9kAjLOaAPAZvkrRHCW8QToKLGQKlnErtReyxZU,1753 +torch/include/ATen/ops/max_unpool2d_cuda_dispatch.h,sha256=cnEIQEG4PmJQtJd1rsagUC-QNzZoZyaAob62xOhu0aw,1755 +torch/include/ATen/ops/max_unpool2d_native.h,sha256=RMDXXGJUZ7TJ-xtvMgXWXOKJZZdP8FuAhppC1wYjJ6Q,1254 +torch/include/ATen/ops/max_unpool2d_ops.h,sha256=o4Mr5UYs9sCNU9cXNPWzMNEbhlgZu_ktyhPlSL3T5AM,2241 +torch/include/ATen/ops/max_unpool3d.h,sha256=VfwcR-ZKW3i81SNiV8c5kIFybRG-ZW1LDVfiMWkpKFE,5665 +torch/include/ATen/ops/max_unpool3d_cpu_dispatch.h,sha256=o2SA5rvkgBRyoYOeoQFMwtXjW8sFKBN65R-eAOIk2ek,2047 +torch/include/ATen/ops/max_unpool3d_cuda_dispatch.h,sha256=uQoqVl7msihpXZ4KC4_2o6fv8kOn3fWamV39jboB1_Q,2049 +torch/include/ATen/ops/max_unpool3d_native.h,sha256=IZ7PFVKVBmMqDe2yagvU4LkmVTnBD4IJYGhb0VrJzPE,1450 +torch/include/ATen/ops/max_unpool3d_ops.h,sha256=gLtHwsWUnr2dNVOIxcDDKGJGvAFRKWi6s3R0-3_rBuo,2567 +torch/include/ATen/ops/maximum.h,sha256=zT515n3Qi4kj6tSiLH8DMN5hWsLANZttowF3GxaO1Js,1432 +torch/include/ATen/ops/maximum_compositeexplicitautogradnonfunctional_dispatch.h,sha256=4flFPhuJ9-ev43Hm6d_oU4jC6c1IzKjoSd5Yl_JMfNU,1071 +torch/include/ATen/ops/maximum_cpu_dispatch.h,sha256=8TAv6qXCmqcxHNHQrDLzcCqWF0dMqxZPyN7t-E763eo,1212 +torch/include/ATen/ops/maximum_cuda_dispatch.h,sha256=1kw9IfbFRVgQlmE2XT6FonYyyp4xfeB9zGpUCgo1O7w,1214 +torch/include/ATen/ops/maximum_meta.h,sha256=OQssgHUq5hhgOZP-Fold8yuif3_5Q90zCvxC8WFo_uI,848 +torch/include/ATen/ops/maximum_meta_dispatch.h,sha256=iVnmEUJwht-AQ1nhTnyq65uKHzqfvcIABznPC_mHBpc,1214 +torch/include/ATen/ops/maximum_native.h,sha256=jPnmvvnlaxQdnHcJG1evFw7gliZdtJrIdg_BLr8wCkM,879 +torch/include/ATen/ops/maximum_ops.h,sha256=M7mjEkAzeqiRQ2rYhvx5k0Y4trrGzWHcdYcOJoYIY9U,1979 +torch/include/ATen/ops/mean.h,sha256=M3XzIkrNYLjyqaLcnqM9lePTKEVeG3UFPSwCHDPC9dc,3629 +torch/include/ATen/ops/mean_compositeexplicitautograd_dispatch.h,sha256=kONrR20k3MH6fuRoctEvnhCCDzYvoeF0DmrKhdM0jRI,1316 +torch/include/ATen/ops/mean_compositeexplicitautogradnonfunctional_dispatch.h,sha256=PTi35X_c5u6Ufv808yBTPyQq3cb_FigOAv7Bd1kXuAI,1145 +torch/include/ATen/ops/mean_compositeimplicitautograd_dispatch.h,sha256=nlvGAcXdxh6YZ-eUZwGhd4rFyusCiqCPUsCo_NPShNU,1433 +torch/include/ATen/ops/mean_cpu_dispatch.h,sha256=Wexg4e0TlQsSCgKLDs08EjWV682boy6u5d0Xvx6WJbE,1413 +torch/include/ATen/ops/mean_cuda_dispatch.h,sha256=ZAAwc7aSRD_meR_sT3D8yzOFxF-FhcPMflHuIzp0fyk,1415 +torch/include/ATen/ops/mean_meta.h,sha256=cVslIWJxSriwnjCQ8pi3tNaYC6gPhl8dP68ggE5B5zk,905 +torch/include/ATen/ops/mean_meta_dispatch.h,sha256=C4KAHwNCxwZbMJLaKii2r4tn_jglUcWAW0i08tLGIzU,1415 +torch/include/ATen/ops/mean_native.h,sha256=BsA6hVwfBogM3KdUdhb88e0V8-Ez1VvCnPagzE0QEuw,1795 +torch/include/ATen/ops/mean_ops.h,sha256=oQiKOVLKFEwKhRWrnZ1Lc65KZbNI9cPUuK5HUsPtG9g,5398 +torch/include/ATen/ops/median.h,sha256=-CpiD6nMX9An_sNDwZ-Eqj2uCM8iRNVAHjr09QCFQXE,3471 +torch/include/ATen/ops/median_compositeexplicitautograd_dispatch.h,sha256=TI_cc_DVPuPHPcM0OnmGt1yZUIwIt8YkpfYfkCZz-IY,1233 +torch/include/ATen/ops/median_compositeimplicitautograd_dispatch.h,sha256=sLFHsWid9Ja80-AujVohrOw8TXIqC8PblhCPD1vohsI,1409 +torch/include/ATen/ops/median_cpu_dispatch.h,sha256=hlYLTs9fsev6FhdQ_4TbjWCZKCR05_Yg6oIpNKYZ3ME,1295 +torch/include/ATen/ops/median_cuda_dispatch.h,sha256=1qEEeIs8xcWESIdEKkYEk3lVH2LhUejoMhFb2T2OTC8,1297 +torch/include/ATen/ops/median_native.h,sha256=mnKsszWgai55f99JzhFBUX_KpDxYcSliAUXZMIZeZLc,1583 +torch/include/ATen/ops/median_ops.h,sha256=pylvwOb-SfpxwF3pe4VkIkXJPwLiETHv_BwIPqh_9O0,5099 +torch/include/ATen/ops/meshgrid.h,sha256=1ltTaB7X83B4AEsR6imhOHMJSzg_frPMqgNQCEzbQ3g,1160 +torch/include/ATen/ops/meshgrid_compositeimplicitautograd_dispatch.h,sha256=HxALCti4vu7xjxQt-ZOw3rgvMUO1kYOElv3A7DIKO8M,1131 +torch/include/ATen/ops/meshgrid_native.h,sha256=LBo7w0u98i3b7Lez9p6l_5stVlmyjqozMECwFulp6bc,843 +torch/include/ATen/ops/meshgrid_ops.h,sha256=1f1FUppy8pFB_V9LTzPl4omXhz7W1zRwrxB_Ov2ktFc,1930 +torch/include/ATen/ops/min.h,sha256=cpQaPcuKLF49h-qZbcaL83Zl5Vs73NrRoYeqLkbSta8,4050 +torch/include/ATen/ops/min_compositeexplicitautogradnonfunctional_dispatch.h,sha256=qyB7Evfb7kH0qzYBPggbSLSYYzh5mBYWfN2vTlRavuE,1099 +torch/include/ATen/ops/min_compositeimplicitautograd_dispatch.h,sha256=k_92397f52BLK-eYf1AFKqV7dKRiEyAJVLYjK7jex6A,1682 +torch/include/ATen/ops/min_cpu_dispatch.h,sha256=Gws1QIdqhoEhHohdeUJfIIJZ7_W6wNUAqdSYJJWC3aM,1548 +torch/include/ATen/ops/min_cuda_dispatch.h,sha256=uGwQzJQZOD43VrYLsrcdyWBlNRPjqSzPJCQ1Zj_fN-M,1550 +torch/include/ATen/ops/min_meta.h,sha256=L7c2brEm4cYFh4twYgUbGGwpyPSrmtB0qfzMR0tsJbU,1291 +torch/include/ATen/ops/min_meta_dispatch.h,sha256=Gx5ifqW6UYhdbvNaAROn7uTitXGrn6PJYyL9bbcEZmI,1348 +torch/include/ATen/ops/min_native.h,sha256=o-SyJHCO-j7xrNsXHcBi1HptilupVD5cTOsbc6dLT68,1752 +torch/include/ATen/ops/min_ops.h,sha256=WuJV8gZXdE239MPWCjsN9kKnOHREbOUofDrOskNSICE,6312 +torch/include/ATen/ops/minimum.h,sha256=FUDt-lh6oFoSDYPj1iAXt9sLE8Tbw15X9djlvu4nTyA,1432 +torch/include/ATen/ops/minimum_compositeexplicitautogradnonfunctional_dispatch.h,sha256=mB-yGMQp0Hcn6Bc7qYvgekts81y9jC-_m1ji_QmvU7Y,1071 +torch/include/ATen/ops/minimum_cpu_dispatch.h,sha256=3PHqMoGnakLvjSxPT2nSyVFk60XeL3I1PZHBttblF7U,1212 +torch/include/ATen/ops/minimum_cuda_dispatch.h,sha256=UycuTLvdhR0yBFccCvyujK-4RyK6pi9yfvJdi47bk9I,1214 +torch/include/ATen/ops/minimum_meta.h,sha256=7G43dicDfmmT7_vpOelCnfB93-EnL75tFUC7fu5vfRU,848 +torch/include/ATen/ops/minimum_meta_dispatch.h,sha256=DL-1qyViExwJqCumuADsyDpIcUlXr4rsalR3MtbadfA,1214 +torch/include/ATen/ops/minimum_native.h,sha256=VtLsZ2TFJlzItjCO0JJFNzopkUbFD2_Wgt-sEwePb7Q,879 +torch/include/ATen/ops/minimum_ops.h,sha256=wxxlHeTRW7dEzAmQOJyf-rZzPrqAL8SnRLjGOOoobjg,1979 +torch/include/ATen/ops/miopen_batch_norm.h,sha256=DzyIq51M_3hkcQ1OM_rRvbUdH8RO8oC-xatNRbCL9AU,3134 +torch/include/ATen/ops/miopen_batch_norm_backward.h,sha256=3yDrXJGrJ7knlKoeJWAJGkjgO7f6QXkIDDmvZt54PTY,3275 +torch/include/ATen/ops/miopen_batch_norm_backward_compositeexplicitautograd_dispatch.h,sha256=96k4AY0M1CvRNRIa02hOjCn69tXjTHxyfiQaZpRKLvo,1855 +torch/include/ATen/ops/miopen_batch_norm_backward_cuda_dispatch.h,sha256=pO6zsV44b4eCxlWbAzx5E4_KoKJ3vfekfOyvFPIfwJs,1300 +torch/include/ATen/ops/miopen_batch_norm_backward_native.h,sha256=BBkH9I9wCSsaXEUExxh8AvH0jetqr5MIdWxsEHskhro,1499 +torch/include/ATen/ops/miopen_batch_norm_backward_ops.h,sha256=WaFU082P-coTiq6fnzyA3iezG4qFY2m9zGG77BHh9W8,4060 +torch/include/ATen/ops/miopen_batch_norm_compositeexplicitautograd_dispatch.h,sha256=rXefiC1_CAOnPW5S2r3LAEzRYG1WADt-jkF9HwifNvo,1771 +torch/include/ATen/ops/miopen_batch_norm_cuda_dispatch.h,sha256=8eOzvAf3888L7tq9Gzrn2wefADtHv8FyVw6XpxfNfjY,1258 +torch/include/ATen/ops/miopen_batch_norm_native.h,sha256=FJc31fcwy8OKBiqQ0knk2HuymsbdztO_rvNdg-5pIWc,1415 +torch/include/ATen/ops/miopen_batch_norm_ops.h,sha256=DobfZ0Tu_CkFVQBLr1mxMhiy4WdMpxuy2NmMPRsJlh0,3800 +torch/include/ATen/ops/miopen_convolution.h,sha256=vjoINAGOchonGjck1FZKRpJFUYRz4xUFBsv5G9d4b80,8131 +torch/include/ATen/ops/miopen_convolution_add_relu.h,sha256=F0y251lqFpkSQqef62fejd0fADpCGO5ZKBx-p4-QKHw,3226 +torch/include/ATen/ops/miopen_convolution_add_relu_cuda_dispatch.h,sha256=bu5l12qrnHxIQVwNveklWAoBAo03dppr-7nyemlB8wM,1545 +torch/include/ATen/ops/miopen_convolution_add_relu_native.h,sha256=gpPtRnqa0sH34uJ_M_uCSg6hm15hViZwGFwJpvJPZkU,976 +torch/include/ATen/ops/miopen_convolution_add_relu_ops.h,sha256=seInneUD30AZD3gHY01ukWrXIsyfmaA8L-FuUfppcDE,2069 +torch/include/ATen/ops/miopen_convolution_compositeexplicitautograd_dispatch.h,sha256=lPwmtmEHqU3aVSYlLsTpwQEwbNt2hZU25ABprebKKCo,2156 +torch/include/ATen/ops/miopen_convolution_cuda_dispatch.h,sha256=1HVsX8rlHcDcqVP_7KHpM2uu8bJICXQKWoGOlg5RZII,1469 +torch/include/ATen/ops/miopen_convolution_native.h,sha256=muxW44VLb-MeR-SXgECLJEU-LdXQpHM7DvJQhSButyE,1247 +torch/include/ATen/ops/miopen_convolution_ops.h,sha256=wNEFCcc4tyCAx_lWcIXiDWxiWMWKgp_fuUrLnzyu1lE,3279 +torch/include/ATen/ops/miopen_convolution_relu.h,sha256=ZmSOqx-_t7rIjCkWBBTJDbpbByfXkDCeP2i74ZVEB-4,2832 +torch/include/ATen/ops/miopen_convolution_relu_cuda_dispatch.h,sha256=dweI5j-729KqjFBMzvU6C0I8hRMEBWBy_MQP-zAS03k,1407 +torch/include/ATen/ops/miopen_convolution_relu_native.h,sha256=g4vie8NZArMRsAPoAYFt4lvGZ-tajxyc8ySJf6ETe7Y,907 +torch/include/ATen/ops/miopen_convolution_relu_ops.h,sha256=6pWF6RDYmS9-uxdWvjw8jRlfLDs-2qfNI699kIhcEPI,1845 +torch/include/ATen/ops/miopen_convolution_transpose.h,sha256=YDtjkwR_s7KHHQbj3isZwUzUwkwoOkm6nL35t_xtlV8,9347 +torch/include/ATen/ops/miopen_convolution_transpose_compositeexplicitautograd_dispatch.h,sha256=eYIHDkImHd-OHjf8zEtMIdwTeVyV4hq0z_Wsu6JiQt4,2332 +torch/include/ATen/ops/miopen_convolution_transpose_cuda_dispatch.h,sha256=iKQTuQMhQEdqdfslvCpsIzfDXKxcO2uMoXALoIeE9Ws,1557 +torch/include/ATen/ops/miopen_convolution_transpose_native.h,sha256=J9phkFMTErsYNOWG81I87uWBYtxXZyTB9ov9zveonjY,1335 +torch/include/ATen/ops/miopen_convolution_transpose_ops.h,sha256=Yvsp-RkddHerw5uNhoy8vyOHsYXPehBaDDjos8jwYW4,3575 +torch/include/ATen/ops/miopen_depthwise_convolution.h,sha256=z4zSRFUpNSv2s9cWEzxzhCgX79-aZ670McIPZsFhdgw,8441 +torch/include/ATen/ops/miopen_depthwise_convolution_compositeexplicitautograd_dispatch.h,sha256=1Kgn6-PIhsoXkDB5TXE8Itp3qaZBf9wRiwoF1h1S_E4,2196 +torch/include/ATen/ops/miopen_depthwise_convolution_cuda_dispatch.h,sha256=9DpqV4lwcaMN5eQ_V0RWrJm1DwlYb_KQx5FbceSe1e4,1489 +torch/include/ATen/ops/miopen_depthwise_convolution_native.h,sha256=TdogTUSlfr4N7EZfpzgneSH7UVftQOmpp7Oaoq-jS34,1267 +torch/include/ATen/ops/miopen_depthwise_convolution_ops.h,sha256=qiJwgD-5YiFL3NCsYbqh7FYJxBFflB-TCF_Pbes0hos,3339 +torch/include/ATen/ops/miopen_rnn.h,sha256=BV3xDqKXPpUpsVqkp9Iwv6rF_cxXVufO_LkRdr9Ae-c,3964 +torch/include/ATen/ops/miopen_rnn_backward.h,sha256=zfGDCwt7FjFUgZ3dfUhkYzDUhBte-KBIxHRDjF5sC6c,5086 +torch/include/ATen/ops/miopen_rnn_backward_compositeexplicitautograd_dispatch.h,sha256=uLUpCNO2POWiLhKPezkl3M56qmdG1Bzru6MdAowaX2U,2393 +torch/include/ATen/ops/miopen_rnn_backward_cuda_dispatch.h,sha256=5FF8zP9_dtYcDRPMUtQ5ZlS_b3AFrw55KXIa9mnXYv8,1622 +torch/include/ATen/ops/miopen_rnn_backward_native.h,sha256=blqOkjdqVyyBhhXMQLTfEaMUFZpE7kOkTozpNGVpAMc,2090 +torch/include/ATen/ops/miopen_rnn_backward_ops.h,sha256=lno9-oinrU5jZBY-vqSC6GeJLW6zis3XCSkHwFeX05Q,6001 +torch/include/ATen/ops/miopen_rnn_compositeexplicitautograd_dispatch.h,sha256=CY8RbdBm-kZILZUbTfozNnihIPqdWbNuMtjdp95SQFA,2039 +torch/include/ATen/ops/miopen_rnn_cuda_dispatch.h,sha256=A-dCGCveAi_2BouFnROF1uIXAsaP-oxoprLqYiCChS8,1350 +torch/include/ATen/ops/miopen_rnn_native.h,sha256=dsPfWLw9OurpYZ8YkPeLWUXbIGk7WtGVbOmf1wfrnPc,1641 +torch/include/ATen/ops/miopen_rnn_ops.h,sha256=WO9BMnhKxvr2Qt7-6OsgiyM6T33tTZ9IUQugDRHogio,4608 +torch/include/ATen/ops/mish.h,sha256=AFjehP8XrwGy8WKYdbziRBQ60Ncia0qB64XsfQpN9Gw,1397 +torch/include/ATen/ops/mish_backward.h,sha256=oazQNMN-gWnv-0Q_yHWd78lrwqeV0GhcvZCJ8q9PLp8,984 +torch/include/ATen/ops/mish_backward_compositeimplicitautograd_dispatch.h,sha256=6UTmKYnWd8vGflhzzvoeboxLsAvia9ruf90SF3hlfg8,1057 +torch/include/ATen/ops/mish_backward_cpu_dispatch.h,sha256=zxh0po5wcWMfIbKAuqSjY1mAXLmKzJRqwGC-Mp81-Dc,1013 +torch/include/ATen/ops/mish_backward_cuda_dispatch.h,sha256=57F_iF1FtW6fnutPijCTzlfqWYHphv6fiIpO9o5BAvk,1015 +torch/include/ATen/ops/mish_backward_native.h,sha256=tkq9H10HLcBUS4VUfFt37tymSdUI8y3bqgblB1uQG7U,867 +torch/include/ATen/ops/mish_backward_ops.h,sha256=ONPY7WZadEAeyIKY_RAi_oReVWhFQKDiQPDpIJB7tZE,1336 +torch/include/ATen/ops/mish_compositeexplicitautogradnonfunctional_dispatch.h,sha256=RxMl1vUDxTwFc2ZV5YVCNQYPhX2_PPMle2Mn5s35EF8,1091 +torch/include/ATen/ops/mish_cpu_dispatch.h,sha256=630vF_vnjCAZvghVjOoGupknZRAJigMVse4idBc6fXI,1174 +torch/include/ATen/ops/mish_cuda_dispatch.h,sha256=hGPq3lVyfahqnfmRtosdkVMn3JeTFGffDVs5fWKX-Dg,1176 +torch/include/ATen/ops/mish_meta.h,sha256=lvJ_U-U9AP5A75rq3IY5MlFGDY3HI_P2j5BgAd6qXG8,819 +torch/include/ATen/ops/mish_meta_dispatch.h,sha256=ByUkAEkUbVfDpf3Vzpdt73oOeVjKih7XqM2edYQ9IdE,1176 +torch/include/ATen/ops/mish_native.h,sha256=1fryZdZzRlotHDfMaUEDGcRFcFWhpcfht6jPVv2U874,844 +torch/include/ATen/ops/mish_ops.h,sha256=2ThhdTYtU8Waljdw8Lu5rxoOppjWy0MBWav3Ugsjgeg,2282 +torch/include/ATen/ops/mkldnn_adaptive_avg_pool2d.h,sha256=OiItyJQkLXpYwzV0Z36fhIZKdsp0ah0cVlc3oSeVlVA,1667 +torch/include/ATen/ops/mkldnn_adaptive_avg_pool2d_backward.h,sha256=KGy2UoFkafW_HiVdiC7Zimv6XYGi1TpFcqHq9nU4jvQ,1766 +torch/include/ATen/ops/mkldnn_adaptive_avg_pool2d_backward_compositeexplicitautograd_dispatch.h,sha256=Bev411GqygfeQ9aCzGS562-oTYa7944R_gLt0aGl2WM,1243 +torch/include/ATen/ops/mkldnn_adaptive_avg_pool2d_backward_native.h,sha256=inVq12MBAeuvAlVZ6FSMVfu_RDOmYvc_uPU-oIK0Sko,930 +torch/include/ATen/ops/mkldnn_adaptive_avg_pool2d_backward_ops.h,sha256=RepvNEOE21bnny-bPJOKhFEAs22KX9Qqu6P4BPg2jf8,2183 +torch/include/ATen/ops/mkldnn_adaptive_avg_pool2d_native.h,sha256=-N6Fuga_L1PvnQiCYlSxn3M-JUnIe2FyHJ-Tb3i0xw4,906 +torch/include/ATen/ops/mkldnn_adaptive_avg_pool2d_ops.h,sha256=okUu1qwLD6H-Gp6mK8L1so4CQv_vJN6doIEH_AV6pnk,2111 +torch/include/ATen/ops/mkldnn_convolution.h,sha256=pIzmpo745a8fcMCEbNwiJm3MTCh1hYHsm45ukK8weAM,7171 +torch/include/ATen/ops/mkldnn_convolution_compositeexplicitautograd_dispatch.h,sha256=HhkZadR3zIsJq3gEdBAL-p-tgKgwFNouBH2CWslNLFI,2487 +torch/include/ATen/ops/mkldnn_convolution_native.h,sha256=jMTdW5qKqbDaD_FHR-5hXb6685MxmW4dJPhjVeYmkVI,1175 +torch/include/ATen/ops/mkldnn_convolution_ops.h,sha256=t89eTIbf15QKipz7_loD4bNrdpT74CK-uyu1QQkaMTw,3039 +torch/include/ATen/ops/mkldnn_linear.h,sha256=UiM5a86XJt1Ot63bRKeQCo0cnEUbW7Iuelh7Ugz-CAc,1708 +torch/include/ATen/ops/mkldnn_linear_backward.h,sha256=cJ9Y07b1178QxQaEOWOhshOhVUIPFbUcm5lOIPNuiuk,2350 +torch/include/ATen/ops/mkldnn_linear_backward_compositeexplicitautograd_dispatch.h,sha256=3Yzy_I744W-26cxZ4yNiUXo2lSvQvOC04eTuYXX1pfA,1497 +torch/include/ATen/ops/mkldnn_linear_backward_input.h,sha256=3Xcp-aDoKyQ1kMWOKzlWrLTX2g7gBsV0LD3RclxYBqY,1888 +torch/include/ATen/ops/mkldnn_linear_backward_input_compositeexplicitautograd_dispatch.h,sha256=kvUTeh7owlnWP8i9R1MQIR_bHtO_wtNdz1L7TIhQY-I,1289 +torch/include/ATen/ops/mkldnn_linear_backward_input_native.h,sha256=plcBsrmnt728jmzYItaThBI1coLwIpLuE_9RoHXH1mQ,976 +torch/include/ATen/ops/mkldnn_linear_backward_input_ops.h,sha256=fi5QTmYklcRXSw8xN9xcP9xS1RjFKrZs6HqGITOf7T8,2335 +torch/include/ATen/ops/mkldnn_linear_backward_native.h,sha256=whQoWTcVfM74ULBrKr64eTwRSMLpJDIfNjKb7Vz_SCo,1141 +torch/include/ATen/ops/mkldnn_linear_backward_ops.h,sha256=xo_LFk3xoEQA5B0umrPspLRiz-nos7I7aclanXRcdIg,2918 +torch/include/ATen/ops/mkldnn_linear_backward_weights.h,sha256=izqEOKt_f-NmHVlCXW1XgK67Fy2g5R6ZhTEKlISxG6c,2238 +torch/include/ATen/ops/mkldnn_linear_backward_weights_compositeexplicitautograd_dispatch.h,sha256=MnJpoOPV_4s7qiyKUF7O2wIC-30t0stazGCjtSJiHp8,1421 +torch/include/ATen/ops/mkldnn_linear_backward_weights_native.h,sha256=hG2ejd5PYL_HIur_5dO5NCsnkSfNkGZ8AxTkwcGmcm8,1086 +torch/include/ATen/ops/mkldnn_linear_backward_weights_ops.h,sha256=DaKBbwTViHdci2X6H1YbiqYNxjJ8RbCSpY5q7HZe5LM,2715 +torch/include/ATen/ops/mkldnn_linear_compositeexplicitautograd_dispatch.h,sha256=kTPQD0X28lzN7o66r11O_ION_rhcMx9zEiZNTJJuY1M,1276 +torch/include/ATen/ops/mkldnn_linear_native.h,sha256=RLAmNgG_uENDJ_RmfVXjKoqnrH6nE1L3y5F5cvrLb2A,963 +torch/include/ATen/ops/mkldnn_linear_ops.h,sha256=N3Xpcx4bljhcupDc2qFdMnBwZjGUO1-MeT78gaBamBk,2301 +torch/include/ATen/ops/mkldnn_max_pool2d.h,sha256=fNgCUQg7ULU50vnCnVqNIomoUzjbmXl__3-xW4RjuEA,2221 +torch/include/ATen/ops/mkldnn_max_pool2d_backward.h,sha256=53HX_XRwFfb0GCZINWIR5GPzpvI5GS0w43MQWHfEmT8,2665 +torch/include/ATen/ops/mkldnn_max_pool2d_backward_compositeexplicitautograd_dispatch.h,sha256=HhVf22eibCb626ro9LDAH3qtoh1xviyqmeEiBxSjH2s,1534 +torch/include/ATen/ops/mkldnn_max_pool2d_backward_native.h,sha256=ruNDMgY1Ea2q2j38DQl5wZE03pVW9051J4c_RVQlwzE,1221 +torch/include/ATen/ops/mkldnn_max_pool2d_backward_ops.h,sha256=NMVMqNgBTG-MCfVjqWhUak0fsmv2JoVnLWV4pBBtyB8,3135 +torch/include/ATen/ops/mkldnn_max_pool2d_compositeexplicitautograd_dispatch.h,sha256=qOqArPvdIBU1u9fotY3cNKV1d5m5irMGCf_wZl9Qr2g,1396 +torch/include/ATen/ops/mkldnn_max_pool2d_native.h,sha256=Xmn9-8UskhsdtG5P8AUTGykOtIa0ti9B92zHBxx6svI,1083 +torch/include/ATen/ops/mkldnn_max_pool2d_ops.h,sha256=3kffAJ09pk_bQJf_-hRxRiJfEuO2xS6p8prJ8M-kFYI,2689 +torch/include/ATen/ops/mkldnn_max_pool3d.h,sha256=ao7vjFT9PzCO-Vdg4rQIUyzOwZ9hXuIalLVMyS0XWds,2221 +torch/include/ATen/ops/mkldnn_max_pool3d_backward.h,sha256=EPHk_OTMyPHZbaUYtMaF15mM1ZQc2owByXRJpNbLxzU,2665 +torch/include/ATen/ops/mkldnn_max_pool3d_backward_compositeexplicitautograd_dispatch.h,sha256=mbQDgWhRUs4X6vYRhq7iHMYpU4dC06g6qvOA8k7jZOw,1534 +torch/include/ATen/ops/mkldnn_max_pool3d_backward_native.h,sha256=3RVD3zo8L0-RbDMvHizjHgo_vRJUCqjA1GRg-F2qqsc,1221 +torch/include/ATen/ops/mkldnn_max_pool3d_backward_ops.h,sha256=Up52WC47eV5BL4SISUm9CATSjCXxyc7cAWCVgGW3GYQ,3135 +torch/include/ATen/ops/mkldnn_max_pool3d_compositeexplicitautograd_dispatch.h,sha256=-IfwNPIIoYSRWtMeRA2QfzegD-9m5vnWc0Fvk2wp-w4,1396 +torch/include/ATen/ops/mkldnn_max_pool3d_native.h,sha256=rqHag1R7l0YGdqDI8o9cj5rq5LrwGri9QfbgSTTmp_I,1083 +torch/include/ATen/ops/mkldnn_max_pool3d_ops.h,sha256=YPAkfEPUJKqdqzwIG7ZdJDo3AmAedN1uFUPiuy0hI9Y,2689 +torch/include/ATen/ops/mkldnn_reorder_conv2d_weight.h,sha256=fVwB0JWSJESu6XhZNw6qQfAehXyQw4e9Ds6_-DVTMxA,8019 +torch/include/ATen/ops/mkldnn_reorder_conv2d_weight_compositeexplicitautograd_dispatch.h,sha256=meQ4Sp8H4y9_y-vxEe0r9pvrG8STS4EAsLt7DMSGuFE,2011 +torch/include/ATen/ops/mkldnn_reorder_conv2d_weight_native.h,sha256=5QMuRkxBh49EydtkSEj_-Bio1OYoM3qFexDWHzCg-Rg,1155 +torch/include/ATen/ops/mkldnn_reorder_conv2d_weight_ops.h,sha256=j2lxKZol50uzH0Z7v5X5FNbR6_V2XgOFxAPwj9XalyY,2939 +torch/include/ATen/ops/mkldnn_reorder_conv3d_weight.h,sha256=C1l7JStT2V26C0cCgGmVC_0V8BnZPOJokR1UW6mcwr4,8019 +torch/include/ATen/ops/mkldnn_reorder_conv3d_weight_compositeexplicitautograd_dispatch.h,sha256=sqchHmDYYowUUREpxPtvdJFL-upuEj8NoabFHOcU46I,2011 +torch/include/ATen/ops/mkldnn_reorder_conv3d_weight_native.h,sha256=j5bvlXT9O-6sh-yIcaL394gCS3ZFR9a7IzEt4xTambo,1155 +torch/include/ATen/ops/mkldnn_reorder_conv3d_weight_ops.h,sha256=PsQ6HMj_uBqtUOOu4xLfn3mp9RkhOLQiaLfspdyxRH8,2939 +torch/include/ATen/ops/mkldnn_rnn_layer.h,sha256=wGploXOeZ6vPc_0S5YUiTxTs7buQ8QxThMjiMpnz9KI,4009 +torch/include/ATen/ops/mkldnn_rnn_layer_backward.h,sha256=cJUWpRoPXWPdNFmbOOrl0O4tb472A12DVVhWfpEcsaU,5833 +torch/include/ATen/ops/mkldnn_rnn_layer_backward_compositeexplicitautograd_dispatch.h,sha256=p8HQltvfWMF7-sTlxAJETLq0-DjWXa7Dsdu_lfbuvA0,2719 +torch/include/ATen/ops/mkldnn_rnn_layer_backward_cpu_dispatch.h,sha256=yCHGaeZT94CRjIDg_XriGHKWkYNanwzngUZHMco75ws,1646 +torch/include/ATen/ops/mkldnn_rnn_layer_backward_native.h,sha256=TIDqXj0LwGAg1KqYP_IlBAkRP7EnHsCbfMFJ27d9NDM,2279 +torch/include/ATen/ops/mkldnn_rnn_layer_backward_ops.h,sha256=Ot6BYMP6RGYpB0y31LdKKFSWBkp1bCeeJzgHTZ5K6dU,6728 +torch/include/ATen/ops/mkldnn_rnn_layer_compositeexplicitautograd_dispatch.h,sha256=OxME3sMYUcTJpf5jdvLflrSajkdKDoObkKHqyegiJds,2015 +torch/include/ATen/ops/mkldnn_rnn_layer_cpu_dispatch.h,sha256=GS_3o9m7W9VP3jZG2Be9DK156BPIXRyszLL7bo-5xNw,1357 +torch/include/ATen/ops/mkldnn_rnn_layer_native.h,sha256=LhohnHmsehGFnqdd5NTYqfm4heTgsZPteThbd5VT254,1638 +torch/include/ATen/ops/mkldnn_rnn_layer_ops.h,sha256=7EKfwpETw9JMidSN_3u5Xkw_foMBUFPyp4iYw0VWrbc,4591 +torch/include/ATen/ops/mm.h,sha256=3gNlWwyefOpkbyUgTZKoHB6S5_mAZwutJ5fp334sHdc,2207 +torch/include/ATen/ops/mm_compositeexplicitautogradnonfunctional_dispatch.h,sha256=_MUXd_6IczxzeMOszOY0SItU3wsVwZkUPOtKvkckOrE,1065 +torch/include/ATen/ops/mm_cpu_dispatch.h,sha256=E1VTfGRHoiGA7E2iwW9jmhBxv73CufYRFxqEZO0vXVc,1194 +torch/include/ATen/ops/mm_cuda_dispatch.h,sha256=iIkQ6zOSmo7KgRLdt6sFaL9qvbYluS8ZcRq4u4_eK-0,1548 +torch/include/ATen/ops/mm_meta.h,sha256=3eB7FnXI07W3vtgPCWR8LJbrmjXYFVWMZ2y8YMiCMFQ,842 +torch/include/ATen/ops/mm_meta_dispatch.h,sha256=eKK-VTqzq3n1yuISj8NlRiEblX0-g6yYTMUTMaAjaMo,1196 +torch/include/ATen/ops/mm_native.h,sha256=cr4QHsey_2OvORLJyOtK93q66XFFYHYlvcxOsfHUCa4,1668 +torch/include/ATen/ops/mm_ops.h,sha256=SysbA_e3XcMy8NxS3ja3LHkFQ1NSqwEwd-q46dXLXbo,3390 +torch/include/ATen/ops/mode.h,sha256=K0r37tfo88C9N7MS95ZKKusaBABu6wUvisNH-zFcouw,2875 +torch/include/ATen/ops/mode_compositeexplicitautograd_dispatch.h,sha256=-FdiEkK6Xejmz39XPsA21HbUncnuflaV_c-a1oM_Lkw,1284 +torch/include/ATen/ops/mode_compositeimplicitautograd_dispatch.h,sha256=tqrqnENPxHuFSa--VvVL686kXXJ9_oteJiXFo1Nn7AA,1403 +torch/include/ATen/ops/mode_cpu_dispatch.h,sha256=7BzFAZ5jENU5rwlGINI0U7hcDS67GDrF3C16w70D62o,1033 +torch/include/ATen/ops/mode_cuda_dispatch.h,sha256=I6zdftYd9saNZLaUEmA8hOkoJ9aiVapbFYAqz1XiXlM,1035 +torch/include/ATen/ops/mode_native.h,sha256=RT0DGNc4coq-H5R_cdHlXh21Nes0P9hYXCugmzjQqmI,1217 +torch/include/ATen/ops/mode_ops.h,sha256=t4LoES896Rj2UH88eIu2MhaMPyJfDPxrqQy3fHxgs8g,3947 +torch/include/ATen/ops/moveaxis.h,sha256=fbQy1NErRcQmsqxP6jlnxPPFuW0bT-JDI6Xlba1enNo,1270 +torch/include/ATen/ops/moveaxis_compositeimplicitautograd_dispatch.h,sha256=oALMgumCd1Utd5uQNYiJkNYyN7Xg7D6pqJzJ6FIyJG8,1166 +torch/include/ATen/ops/moveaxis_native.h,sha256=Rh0Rgl31ziUhSP_dm-D1FwFwHWzCv67lV0IdGsBkAaU,878 +torch/include/ATen/ops/moveaxis_ops.h,sha256=UX-3CtHhkBFbCAhm01o--SPaGohLglOitnmNrGeq3L4,2063 +torch/include/ATen/ops/movedim.h,sha256=ElS6Y9ZTZB9Z2I-lf8OD0q1zIyxgYQHOnTU5VYfUk34,1263 +torch/include/ATen/ops/movedim_compositeimplicitautograd_dispatch.h,sha256=YNdI1Qtu_bMb5B_B18IzMybgfuaU1wKQH-2477ETnoM,1164 +torch/include/ATen/ops/movedim_native.h,sha256=8irGWfcmRuCxodVwVfhdbdCfhlYLwwti3YuJuJnojXE,876 +torch/include/ATen/ops/movedim_ops.h,sha256=nsHVJU7dm7b0SVbReuHdq3Sfm_GqwE6f2ko07J8JE2g,2057 +torch/include/ATen/ops/mps_convolution_backward.h,sha256=ILVW6FoagQq9pk34CsUGhC4C0gyu0h9uz6Ae2Au02mU,9207 +torch/include/ATen/ops/mps_convolution_backward_compositeexplicitautograd_dispatch.h,sha256=amGbfVKGH_mLcmKN4R2GPZ1C4NELV4oj-PYx-sOocCk,2448 +torch/include/ATen/ops/mps_convolution_backward_native.h,sha256=lJjtscC8hACvHQ7SJ0672UHoXBeh8Fi4pabq-IZCYYw,1058 +torch/include/ATen/ops/mps_convolution_backward_ops.h,sha256=Gvx5GoBoL0SicHjCQat4yzDd46jd--tbh9O8KZAzfDI,3648 +torch/include/ATen/ops/mps_convolution_transpose_backward.h,sha256=8QkQuKhkLcBK_-DFg1RUjvh0zjQKGQFDebxUYfsbwH4,9943 +torch/include/ATen/ops/mps_convolution_transpose_backward_compositeexplicitautograd_dispatch.h,sha256=-pthlgSODIFkPj79UlPXXMRYN0NQ3BMfKSkFlNCFyK0,2496 +torch/include/ATen/ops/mps_convolution_transpose_backward_native.h,sha256=GuM9pOUMyLIs2Q7OTvgmx4VAVpQ9yHkviYF-emb-low,1072 +torch/include/ATen/ops/mps_convolution_transpose_backward_ops.h,sha256=JjPIwJQNbg9lY14m1BDmHi5z5JjULPTKidnV1HeJr-k,3783 +torch/include/ATen/ops/mse_loss.h,sha256=d3zyA-zWvT5r8_Obc7or1234nxnrrAJDb7Ea4al2_TQ,1641 +torch/include/ATen/ops/mse_loss_backward.h,sha256=NVivTBkXJdidUr_xqCXXP5SCIIz0HJdHXhqGc8PVcCc,1941 +torch/include/ATen/ops/mse_loss_backward_cpu_dispatch.h,sha256=ebajBXon_udoiNayYNZ3p0cN_KWrvUchrXhpghY0BHA,1412 +torch/include/ATen/ops/mse_loss_backward_cuda_dispatch.h,sha256=DdKdbBrWwQaQw93x92Et3zBIIZEf0tkrGgGz7IfXySA,1414 +torch/include/ATen/ops/mse_loss_backward_native.h,sha256=okIkz67pz_mWVoIBCF-LMmnsUObLPHooqPf9BankCUk,993 +torch/include/ATen/ops/mse_loss_backward_ops.h,sha256=WZ0O3LggZbxqFR06P_kXMg2YLvVMkwe0nnNGbBZW7MA,2419 +torch/include/ATen/ops/mse_loss_compositeexplicitautogradnonfunctional_dispatch.h,sha256=hbBPDxztvKYcZdKCEl-pJJjH9Hf5rcBFQFwJRVCrpCA,1112 +torch/include/ATen/ops/mse_loss_cpu_dispatch.h,sha256=6s3t4cg5mmsiZNa28QwHNZRzsWX_ckwydJKzdJmATTY,1315 +torch/include/ATen/ops/mse_loss_cuda_dispatch.h,sha256=PsTQSwQTq_F2IAqw4hAszQ_AN6ctpLzoVTMHoR6202E,1317 +torch/include/ATen/ops/mse_loss_meta.h,sha256=C8ZhXv5IYxm5m9MQHktQbbXPho9ozjcdS37ah49biMs,869 +torch/include/ATen/ops/mse_loss_meta_dispatch.h,sha256=UhdxJ4Je1IoM4_G52jWpE89UwquiT9afR3F8mde8wwc,1317 +torch/include/ATen/ops/mse_loss_native.h,sha256=YznOoXHkG8guJ576fRAUMCXav_mpG-AIFdsvdXQ4Sic,902 +torch/include/ATen/ops/mse_loss_ops.h,sha256=JpykFUJmAhS89WSlaLx4kIcm6UTzd0srKwPs7CZwTng,2125 +torch/include/ATen/ops/msort.h,sha256=R592S5elfhm5sm3LM-Ym4RJbmUmXZpnVHflq1bd0ho8,1271 +torch/include/ATen/ops/msort_compositeimplicitautograd_dispatch.h,sha256=mOzWk66yCjthOLUDBZ-i9fMDW9yXVQXDSY-0CKzfw4E,1172 +torch/include/ATen/ops/msort_native.h,sha256=toLQqY21bbV_-VJXFpMZNAtmN0CuhzuhiBKYuTIxWGQ,806 +torch/include/ATen/ops/msort_ops.h,sha256=EO5GAjX9CsRVCP7hZ9UDKhnUXPC-2Mz19WLmuJRL31A,1795 +torch/include/ATen/ops/mul.h,sha256=TZrRwMayTY6in94-ahIX4mbX3pcVI6liiqLZCME1L2w,2087 +torch/include/ATen/ops/mul_compositeexplicitautograd_dispatch.h,sha256=uLldtxYv7j97v18gB3YN493P5158pyvQ-2b8zQkciYs,1318 +torch/include/ATen/ops/mul_compositeexplicitautogradnonfunctional_dispatch.h,sha256=AiX2Jrqfzzx9O0pK5B4-2rH7v9xT9fhiyBF9165VToQ,1141 +torch/include/ATen/ops/mul_cpu_dispatch.h,sha256=6oyNCIxgTRYBXKEBDcwCRptSXUxxYfKZtm4LQD0Y5ws,1274 +torch/include/ATen/ops/mul_cuda_dispatch.h,sha256=Ha6FThK3eHVax9shiTb23M4uSfyT5z45hRvBhJikbek,1276 +torch/include/ATen/ops/mul_meta.h,sha256=a7uN2fgODrWiJKGAKOQiNjWeecyHeyET7dneTJRa0Qs,851 +torch/include/ATen/ops/mul_meta_dispatch.h,sha256=qzRm7kDSkrVTlxLCnW59qaXEtYtUxLTjITrunuzGGXc,1276 +torch/include/ATen/ops/mul_native.h,sha256=K_RpZO2msxl445HwfQs3DAvox5oTBhwXyCxwqRTZ_p8,2738 +torch/include/ATen/ops/mul_ops.h,sha256=qpqda27m5uZCWIJ0BWeILqyN6aJ6UshoMxi8-BEqnDg,4452 +torch/include/ATen/ops/multi_margin_loss.h,sha256=zAzeoHQ6x1C6B3eR8pGA14gNagPun9Emg5DxSGcRTcc,2231 +torch/include/ATen/ops/multi_margin_loss_backward.h,sha256=FtBhkrO0_EqNyqcs3OTn6L9pHf-5PvwgdEpfCUGodrc,2566 +torch/include/ATen/ops/multi_margin_loss_backward_cpu_dispatch.h,sha256=qJWmxPBhZv_8xep8KUlVu_Q-cb0aX6SZvowp9oxyD1U,1764 +torch/include/ATen/ops/multi_margin_loss_backward_cuda_dispatch.h,sha256=NXJUzr1RV5P_acKjWIj9NxmrQhezXnl1h9rCEx_mPd8,1766 +torch/include/ATen/ops/multi_margin_loss_backward_native.h,sha256=0EDRGdU4awnD9q7-5BB9gJzNnqlDLs9yoh1p4c2k6D8,1782 +torch/include/ATen/ops/multi_margin_loss_backward_ops.h,sha256=O0tSVWVWWu9PASH9k36yzpCM1GmaCnp5UdNkgFIVZXw,3101 +torch/include/ATen/ops/multi_margin_loss_cpu_dispatch.h,sha256=Dgflnkt7O25XqWjpPySBqP-4A0cXco4jm7-zFSFhHms,1635 +torch/include/ATen/ops/multi_margin_loss_cuda_dispatch.h,sha256=_BYLFxzYACB7TdtPX7oLosEYuE5iSykV7-k7Ktbjm08,1637 +torch/include/ATen/ops/multi_margin_loss_native.h,sha256=gGPXZYEu9m0ZUnX3SBaeZci1mynFLxCRhBjjlvRY9-4,1612 +torch/include/ATen/ops/multi_margin_loss_ops.h,sha256=ChKiNLCwCD2uFo1oqXBVdln9rQIHEtCdRlUunBF1oJg,2805 +torch/include/ATen/ops/multilabel_margin_loss.h,sha256=WNfTo7hf2gqNzwKw35RG29_tftWP_HzCQMdVI3OYw38,1781 +torch/include/ATen/ops/multilabel_margin_loss_backward.h,sha256=hFto8jPx8i_q6HxE8MUA2dW04ZEM7kFDgv9XyMiKygw,2258 +torch/include/ATen/ops/multilabel_margin_loss_backward_cpu_dispatch.h,sha256=wwSj0wSG79lTipGiY0hPhXmhK2bru7Z3k2bPGOHV8Aw,1544 +torch/include/ATen/ops/multilabel_margin_loss_backward_cuda_dispatch.h,sha256=2Y3lNW2kPka02S0DMC4wgcUXuBVCUHdqZywtoHXsdQE,1546 +torch/include/ATen/ops/multilabel_margin_loss_backward_native.h,sha256=fYxqS1rBi8YqZfenbF-OF0tE0TfHxN7qcCt3io87MyM,1504 +torch/include/ATen/ops/multilabel_margin_loss_backward_ops.h,sha256=8QqxxS2IowTgWMIkzDiBoJj04XA-H-fzxV-KqTOaJaw,2699 +torch/include/ATen/ops/multilabel_margin_loss_compositeimplicitautograd_dispatch.h,sha256=cL8fTJkEPKN8uHaQofRsH1k3OlQiJsI9LrgrLXf3A_o,1401 +torch/include/ATen/ops/multilabel_margin_loss_forward.h,sha256=r9d3GsLRUPIRki9n6u3xjqzbwJHyJGxEJbkAOBOGERY,2084 +torch/include/ATen/ops/multilabel_margin_loss_forward_cpu_dispatch.h,sha256=e8Zf_U3W6Sn6YZZ7tSh8MMYy_WxE_Um1IZf6ZDN03-0,1474 +torch/include/ATen/ops/multilabel_margin_loss_forward_cuda_dispatch.h,sha256=v8PslDRuNIVBrBNl03IOHmn8QhHGm4FfIM2mFlWveSM,1476 +torch/include/ATen/ops/multilabel_margin_loss_forward_native.h,sha256=XYxRT66GEfQPjjbBEIxslKXDrEm2MGAm5B4XYZVfUFY,1396 +torch/include/ATen/ops/multilabel_margin_loss_forward_ops.h,sha256=ezfZOZzgCnHBedA8vqW1xxUa9Y0-JLW8B7plDUx6Wg4,2546 +torch/include/ATen/ops/multilabel_margin_loss_native.h,sha256=TqzMIPglGvX_BKlbnromzyoIy8NqxqGmvQHlM5ndl_E,952 +torch/include/ATen/ops/multilabel_margin_loss_ops.h,sha256=Odq5_5tZlfKn1FJG-th3mg4goOKNTeImWWMF5pH4Cjk,2209 +torch/include/ATen/ops/multinomial.h,sha256=yvGZ3Wfvx-LNB3W8L9-5u5eyjSQ5BzQpLLFa205MKrE,5334 +torch/include/ATen/ops/multinomial_cpu_dispatch.h,sha256=cBhHKfdfaGhCIt-EjI1DT4ae154qRvGaAUj9lPwy_WI,1975 +torch/include/ATen/ops/multinomial_cuda_dispatch.h,sha256=Y4xIh2j0CsQ7yhArjERsDsFVXu4dcFKlryACsEvVj0U,1977 +torch/include/ATen/ops/multinomial_native.h,sha256=q1EGnmrsM6gOX7h5qM-rNptb477UMAVz5oYbHxzoBw4,1001 +torch/include/ATen/ops/multinomial_ops.h,sha256=RtShwTYLoVTcg_9rkW51h57cJL8sJynVRpSa9pNAwWc,2418 +torch/include/ATen/ops/multiply.h,sha256=u8mzBJ5Y9R3MET5lkEibB_MP2iG73DcjivoHlspktQw,1658 +torch/include/ATen/ops/multiply_compositeimplicitautograd_dispatch.h,sha256=GSLt3bpNDxmaMsnHZH4CZhHTW9MyyUdkzFBfrsuD3aE,1499 +torch/include/ATen/ops/multiply_native.h,sha256=v6rewbsVV-JL7sZjykUMcDvAIQnD_6ET2oAQyFUm-YY,1104 +torch/include/ATen/ops/multiply_ops.h,sha256=p5HiVpqSsFWuJHmvbqVr4MxwpZdllJZxvXeGpF2qpTg,3839 +torch/include/ATen/ops/mv.h,sha256=X5lykqbK0XT2Z85XK8U02Ay4h6qHYqY3uKX3gB96vzs,1364 +torch/include/ATen/ops/mv_compositeexplicitautograd_dispatch.h,sha256=BXYidWGL-TNbaMqTT1u4EBPI32vylMdZ7wZVLcsTvko,1235 +torch/include/ATen/ops/mv_native.h,sha256=OfOjmJbxiJqxu0JGLfVarAuelBgw9C20VodUFB3nhgo,929 +torch/include/ATen/ops/mv_ops.h,sha256=51P5nk0LLnKoVXGffMFaNiz0FVb_JhQojRYDIoXT_J8,1937 +torch/include/ATen/ops/mvlgamma.h,sha256=m6JOUnsBe4QKCDIsGsKlyp5UawEym_DSjfGRfENX-0Y,1364 +torch/include/ATen/ops/mvlgamma_compositeexplicitautograd_dispatch.h,sha256=GeeB4-qTTs3kSrXH5VqpHJJ2HEy7P3VIoNBCVzocBX8,1095 +torch/include/ATen/ops/mvlgamma_cpu_dispatch.h,sha256=o2rq5NmL0mJvZhzHJ6m3xNuZa8Uo8M1Ur_tJtnQ_6TI,1103 +torch/include/ATen/ops/mvlgamma_cuda_dispatch.h,sha256=rLiquDuthXbayEo3J9zhwcE4eBF2LnqqVeUrNnlPpX0,1105 +torch/include/ATen/ops/mvlgamma_native.h,sha256=ywyVxp8jv8SekLF2dsQnnbNP9gfQHcKTmrM1dpLgNs0,898 +torch/include/ATen/ops/mvlgamma_ops.h,sha256=SXURNS8K5isyJSCqiZZJrTw2JcvN0ni-wendKK8Y-fY,2432 +torch/include/ATen/ops/nan_to_num.h,sha256=MPSKQINhS8_B0jQck-66UhFTp3nOQp94rILzEygMxBw,2294 +torch/include/ATen/ops/nan_to_num_compositeexplicitautograd_dispatch.h,sha256=R4PKDMtv1LVDuHnUARlMWuH15UPh3SixT2tzZCSRsuA,1353 +torch/include/ATen/ops/nan_to_num_cpu_dispatch.h,sha256=4qOBMWh7zintG-vOen7HkpVSaV2OKECVDUEQ219TEHc,1316 +torch/include/ATen/ops/nan_to_num_cuda_dispatch.h,sha256=XHJ8w5f12wdTTUBxPqPPP-b78WxDRwc6L2hX0sVJ-18,1318 +torch/include/ATen/ops/nan_to_num_native.h,sha256=u8sucp0X8lQ7hnrAAKVnpugMobhVCpQ7MOSd_W9aaf0,1825 +torch/include/ATen/ops/nan_to_num_ops.h,sha256=WpftTchVJLbDXSUSJVRCri0qPERPbTs1x1-tgpcGBtA,3290 +torch/include/ATen/ops/nanmean.h,sha256=-JVLwwWhWP1yOhrqJCRAzH-15A7FTqndtuHmnQ1UQDE,1861 +torch/include/ATen/ops/nanmean_compositeimplicitautograd_dispatch.h,sha256=9Y1VMhVvEFFr9zfVNGk4w74SBr6sn6ExicUq4fiQbDg,1496 +torch/include/ATen/ops/nanmean_native.h,sha256=g0eHuBY2qam-D3O07mm0OWDzWQhV076PzBcw_J5m9Lg,1010 +torch/include/ATen/ops/nanmean_ops.h,sha256=gIePLM1Z9BTiywnmpk2k0bQ3vgGEtlTFOXC2coD0yWY,2390 +torch/include/ATen/ops/nanmedian.h,sha256=ISIhvgJmblN-3LJAWTCRxsyTjkufx2a7UpUxyce8XD4,3555 +torch/include/ATen/ops/nanmedian_compositeexplicitautograd_dispatch.h,sha256=1zGv1Zk2NM-4UI14Yl1jX7C-6MoBE37MlkZVRGqOU_Q,1242 +torch/include/ATen/ops/nanmedian_compositeimplicitautograd_dispatch.h,sha256=1c6RG5O7Oa31FBnTzwZLjKE0Li-HX5shhAVTyZOghuI,1418 +torch/include/ATen/ops/nanmedian_cpu_dispatch.h,sha256=9gb-4bWyN5MFMflxSj05m8_6_T1HmsAKBukOUsm9Lpw,1304 +torch/include/ATen/ops/nanmedian_cuda_dispatch.h,sha256=wCuL0EdBMWFjx0WcfQ3fpi5sAav43Q-eAcBU4t-KeP0,1306 +torch/include/ATen/ops/nanmedian_native.h,sha256=gAgOtslf6DblxztciLz7qaVRMvwgSi5PkwuM1CNHzpI,1607 +torch/include/ATen/ops/nanmedian_ops.h,sha256=wzk9sATnW8XUVkBDxxgjD-RyCi9LtiCkYb9NMMnxvVU,5153 +torch/include/ATen/ops/nanquantile.h,sha256=f5NBFtj_EfyLbL7-mK43lrRcWY10cE2O63HiIRMbZ-g,3248 +torch/include/ATen/ops/nanquantile_compositeimplicitautograd_dispatch.h,sha256=Pz830ni4hTtpT-FLXiBqzIUOeinF2g_CKEtE0DqcLoU,2088 +torch/include/ATen/ops/nanquantile_native.h,sha256=MJNMphCjf5I8S_EWrKzVWIyZnkXwL2pbYPgvl26JZHg,1388 +torch/include/ATen/ops/nanquantile_ops.h,sha256=tHuI4Aj676CrB9ovOv0ZiDzLAu0NX4UntD_TtCHpcpI,4280 +torch/include/ATen/ops/nansum.h,sha256=Le-a87c-7MTQzve36XxzZvULVqKSHtCsJ5fxjIims1A,1851 +torch/include/ATen/ops/nansum_cpu_dispatch.h,sha256=qaNgMG6w3CVYSdlICbrB_KvRYNivfduMdjzuHYb1hEc,1449 +torch/include/ATen/ops/nansum_cuda_dispatch.h,sha256=pBHoKGkarU8RtlgFOVVbTvkhVOoVs8xzkzEiFo5r-qc,1451 +torch/include/ATen/ops/nansum_native.h,sha256=jnP2Wa0OIpnQMQfbDEwzdBeA1gmrU9J2byCeHjN-87A,1008 +torch/include/ATen/ops/nansum_ops.h,sha256=l6PwBLAa2MJ83EEuPhuurIAFrY77fFTKb8BCV-ztNXk,2384 +torch/include/ATen/ops/narrow.h,sha256=tuPziGHNvbVggBDD_R2drMWatAj8NieDTfntd2SRedc,2892 +torch/include/ATen/ops/narrow_compositeimplicitautograd_dispatch.h,sha256=D0mlQLjVH8CQk6aYRXFqQ20W66qdIqcVIizSs1ngVJM,1404 +torch/include/ATen/ops/narrow_copy.h,sha256=IwqGzoGV5yFBz28doHMLvk22YWkeB4Gu8iOCQKWLCHk,4338 +torch/include/ATen/ops/narrow_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=TjYOqzvt_fEejTu3SaiZKI52mNryhBT4QzZIe445kB0,1211 +torch/include/ATen/ops/narrow_copy_cpu_dispatch.h,sha256=amjkFzLO1lz7sigD2tmN0WNW6_VPkLLVIbQDMqXwUw0,1681 +torch/include/ATen/ops/narrow_copy_native.h,sha256=XMmRZtyirmLUUOrlSpe9CE6yPMeM469k7t6ltUdbIfk,1160 +torch/include/ATen/ops/narrow_copy_ops.h,sha256=jjUhA5tpoxF7Quqcyo4DkhcQK5UmqQEZuCU967abvQs,2185 +torch/include/ATen/ops/narrow_native.h,sha256=pZnXu6F69N2fBKtevRgAe2vIxzVJG_7KclFwmtqvbyA,1036 +torch/include/ATen/ops/narrow_ops.h,sha256=K5PuDOQxlSQjieSPovjSP1uEsN3Yws6tKwCGr3WotUI,2118 +torch/include/ATen/ops/native_batch_norm.h,sha256=XUgIXrw1RoKY3vx35RZIwGvZpXusT4D399Vnu9KhM8M,3056 +torch/include/ATen/ops/native_batch_norm_backward.h,sha256=pucNYvGdf9x5SJ72wKSW8bfN0kGc0HB2Hs-DUGWRjOE,3590 +torch/include/ATen/ops/native_batch_norm_backward_compositeexplicitautograd_dispatch.h,sha256=LhkCiqvo6E4mImXqvrpH7ZtojM9kccVKEhINFWUNzIM,1973 +torch/include/ATen/ops/native_batch_norm_backward_cpu_dispatch.h,sha256=RcS2pqc3Kr1dazG2uLkx7r5M7xPzUkkMtcnKWbhJktI,1357 +torch/include/ATen/ops/native_batch_norm_backward_cuda_dispatch.h,sha256=g8eBrQ81B97joeVOptxD9XM7CGOPIT8qV30VDOXnKMc,1359 +torch/include/ATen/ops/native_batch_norm_backward_native.h,sha256=5_LkJ_t8x6En2KvGn5aS2zx_pTIOs75_e6729wbrusU,2486 +torch/include/ATen/ops/native_batch_norm_backward_ops.h,sha256=GUY7V6JVOCmd8SSvHRmLKhWTOGRYQDs87P8AO1Cuw4A,4446 +torch/include/ATen/ops/native_batch_norm_cpu_dispatch.h,sha256=_NVyNLSH2Ift5Dr5582qLMvdRy9bhdaCdKXFXsnwo5I,2070 +torch/include/ATen/ops/native_batch_norm_cuda_dispatch.h,sha256=7F4Bk-SMY5kSDvp05k7IEjImDzypOz5tqdWg0OG2ZmA,2072 +torch/include/ATen/ops/native_batch_norm_native.h,sha256=aoOAbODrWN0-rlWrfddua7Wz0vvED4HXEtvhQEDTsMw,2477 +torch/include/ATen/ops/native_batch_norm_ops.h,sha256=X7udntMza0uIr23VXtNcILRPdLMDrFmXXqwiN6tzWMg,3805 +torch/include/ATen/ops/native_channel_shuffle.h,sha256=KzCSZyniWqrSsNMTdGfByce8K9JgLY7WhxNPcD0pMtc,1735 +torch/include/ATen/ops/native_channel_shuffle_compositeimplicitautograd_dispatch.h,sha256=9Xh4jBZmd6E0OBeRSLDZ37ZhKibq22mRBRD7Gt-7buQ,1147 +torch/include/ATen/ops/native_channel_shuffle_cpu_dispatch.h,sha256=dKAC3JYJ9q5FwUTGOyCmTV5duzDIvOoZM_rIn2YqHHc,1103 +torch/include/ATen/ops/native_channel_shuffle_native.h,sha256=LIQO13Xn_htgZOHy1KHEdJJ_6CnIEe3NJdGI3Lh4LOU,843 +torch/include/ATen/ops/native_channel_shuffle_ops.h,sha256=qnDguQrATE0aiHSOR1tiLNM4wVCXJPMctNCy5TKTs68,1327 +torch/include/ATen/ops/native_dropout.h,sha256=vRtZxe8ojAtMMDCV4LcQjPfP8ZypmCfhAtMe3lX4b_k,1790 +torch/include/ATen/ops/native_dropout_backward.h,sha256=GSHGwW3U4mw8Vai0US3oXiDOgO6nkx0UfuTp0xyGvew,1748 +torch/include/ATen/ops/native_dropout_backward_compositeexplicitautograd_dispatch.h,sha256=mPyJ2bGcfRahWboVQ4PuW1RDSU6KCH7IWQTiFiaHmmI,1247 +torch/include/ATen/ops/native_dropout_backward_cpu_dispatch.h,sha256=jt9SR67LMZFNfc2JIVcrOeWcGR8vpbWGovaE965joZM,1037 +torch/include/ATen/ops/native_dropout_backward_cuda_dispatch.h,sha256=jrDqigpz8h1pqAB13KKddu5FsqeKgtIvDIXBWr5ug-A,1039 +torch/include/ATen/ops/native_dropout_backward_native.h,sha256=tuwhBnk7fDrLBq9eIslnKkmNOvUAn3oDB5-GMqYCd2U,1056 +torch/include/ATen/ops/native_dropout_backward_ops.h,sha256=jy1Bfvp9usroxSyM4WVSZUdu0FUSijoERNSFu-P8k0o,2209 +torch/include/ATen/ops/native_dropout_compositeexplicitautograd_dispatch.h,sha256=cW1XJ_vsyVIfY6cMk-PVAQwkl-PWDJx8IMb4QLdV4zM,1311 +torch/include/ATen/ops/native_dropout_cpu_dispatch.h,sha256=vHGXLLMd63nUYGLYI5_og9mrlPqCk4iDh7KqdCCcKX8,1047 +torch/include/ATen/ops/native_dropout_cuda_dispatch.h,sha256=YBDcHuWeBgTwcmd4g1MtjgL2-jkpOIL7JLS5XAGGDfE,1049 +torch/include/ATen/ops/native_dropout_native.h,sha256=Zk0P4LfqwJYmtFDr6oMDFp0POfwgOFNGLM8dib-GprE,1246 +torch/include/ATen/ops/native_dropout_ops.h,sha256=7wUJF9w9LAS0EzuSPbm9Z2HICZXw4klTTXGMoZQUb2Q,2369 +torch/include/ATen/ops/native_group_norm.h,sha256=7Dv2tYVuhWdWP8XbWeTls3NT7_4HW7y7Q_s5Lp2PZ2M,7466 +torch/include/ATen/ops/native_group_norm_backward.h,sha256=0K6VC4WDzHiueA7fq7pBQMa9X9huRQq7ZCx-k3F7zmA,8975 +torch/include/ATen/ops/native_group_norm_backward_compositeexplicitautograd_dispatch.h,sha256=L7cyjYzKqo5z2fJdL9t7CuGZDxgUyp_YtezTj-g6Tb4,2544 +torch/include/ATen/ops/native_group_norm_backward_cpu_dispatch.h,sha256=rC0SorxLN8--x-yGwrKF_TAHiniPKNxIZHoIPd7wSlg,1575 +torch/include/ATen/ops/native_group_norm_backward_cuda_dispatch.h,sha256=Dua1HplB0jVW6brQG0E_e8u7W9DIXwy5pZSR0YJusy4,1577 +torch/include/ATen/ops/native_group_norm_backward_native.h,sha256=XLEUw9MN42ZFOlniHyzHQQf2qtfhJcg1f48aVGlxOCs,1398 +torch/include/ATen/ops/native_group_norm_backward_ops.h,sha256=0LqN48ShBI9Jj7m5-Qww4PIIt4TGNWYhxBIqqc7oUg4,3796 +torch/include/ATen/ops/native_group_norm_compositeexplicitautograd_dispatch.h,sha256=o5PD18tXtO_shBUaAZlDSClpkbj7Hd-E-c7I_nWpJ2Y,2791 +torch/include/ATen/ops/native_group_norm_cpu_dispatch.h,sha256=ni4C5QGUWcIBg_ivqiTUwqd5vkOFPRagzeU2UTu4uL0,1439 +torch/include/ATen/ops/native_group_norm_cuda_dispatch.h,sha256=iwHv89VEkK55zgCDB9yoAWLRpnL5S9zW0VQsx_9IMhk,1441 +torch/include/ATen/ops/native_group_norm_native.h,sha256=yvXkzMk4OoLKV0dqYWqT4PVkS-op3SKIKlgRvcArNis,1510 +torch/include/ATen/ops/native_group_norm_ops.h,sha256=wYzSuV5XSXDasQyasalXJtAnis4cFVZNncaMj1OIpGM,3354 +torch/include/ATen/ops/native_layer_norm.h,sha256=RngddZoFs1Am2SlzoPjbteqLqZuplYCf20-vBgTtk6U,7286 +torch/include/ATen/ops/native_layer_norm_backward.h,sha256=ESHIilI2Bk2QCeyid48ef4f1wncUWzxeKY1w0vC5JXQ,9455 +torch/include/ATen/ops/native_layer_norm_backward_compositeexplicitautograd_dispatch.h,sha256=harJcPHECBPNEGAuVXvdUbfakSyxsw1ZaL6V345xZpI,2632 +torch/include/ATen/ops/native_layer_norm_backward_cpu_dispatch.h,sha256=BSWs45sTtz8k5LUT-6ciWwBf5VpeKXefKaKEgXekrOk,1619 +torch/include/ATen/ops/native_layer_norm_backward_cuda_dispatch.h,sha256=2B3QtvismkQFb2kjxRJybBcdpJGT3NiZl3RP6M2R87U,1621 +torch/include/ATen/ops/native_layer_norm_backward_native.h,sha256=s-0NgBzl23wiY2D_Isj22KojrxGcZ7DPPm8DPQ88h84,2125 +torch/include/ATen/ops/native_layer_norm_backward_ops.h,sha256=u2aoVn7s-csznVdfxumDmZxDrP-sk99bFYseRUigUig,3884 +torch/include/ATen/ops/native_layer_norm_compositeexplicitautograd_dispatch.h,sha256=Gv6S46OolGSlhSw4SMoVD8yt0txehrxWqXuAqNhU4Gg,2671 +torch/include/ATen/ops/native_layer_norm_cpu_dispatch.h,sha256=IF72vS4T2v16qCBsSWG1FsevKusABWQ4jKENZjiPY5o,1399 +torch/include/ATen/ops/native_layer_norm_cuda_dispatch.h,sha256=YzrvBXZ40HJSwLH2q0XiJLjXV6JCyirWFiX_sa6fqUk,1401 +torch/include/ATen/ops/native_layer_norm_native.h,sha256=-aPAmyEZPpDlfW5WcLDq_4pCuh9bnnBni64opcS9DEw,1924 +torch/include/ATen/ops/native_layer_norm_ops.h,sha256=yvV9yx6aP5P0cBvw3M7Fo566ZZramn59D8VZycRRDDw,3172 +torch/include/ATen/ops/native_norm.h,sha256=NmEcCyc71ydiFy1gZRImOUNB88NPiPPtRp5xVc4aXwk,2715 +torch/include/ATen/ops/native_norm_compositeexplicitautograd_dispatch.h,sha256=gVJRjs55h9DUjt1ZsHYvtyEf9OK_RF-JnZSJWSjvrM8,1570 +torch/include/ATen/ops/native_norm_native.h,sha256=Z5mssLD42nSd-4pTM53U7NZCgI683FHeDWoBOKCdvyg,1252 +torch/include/ATen/ops/native_norm_ops.h,sha256=w7HE1Qo-TOPIcFjqqNmowEOItPnrvrY-4w0FAP6BSkQ,3972 +torch/include/ATen/ops/ne.h,sha256=-DdzR1To3wcnzjWk71AD5gXbGGsbiqwSzBeducMFZQk,2096 +torch/include/ATen/ops/ne_compositeexplicitautogradnonfunctional_dispatch.h,sha256=HPaKzP9g-5lPN4YCJDcrA4Nlo5dwWXtl0CmFzxdMyEs,1288 +torch/include/ATen/ops/ne_cpu_dispatch.h,sha256=DoK7b4q2wTo3VIzT5MDA1zIVXLq-pd-nlc-aTLq5p5w,1620 +torch/include/ATen/ops/ne_cuda_dispatch.h,sha256=KeZkxA4X-5uLA5llipDn9dzgY0_CXhHuBF6zEjtwZ2c,1622 +torch/include/ATen/ops/ne_meta.h,sha256=vi02e6F5EIBfBBM1hprGjzkmFYWyydJ84RZvZQcLxo8,989 +torch/include/ATen/ops/ne_meta_dispatch.h,sha256=ElrVXrJagst6mxw4gHAwYXpERTC0eWda908NCEommb0,1622 +torch/include/ATen/ops/ne_native.h,sha256=l8QcQikr_q6Z4XelASLloRheKJH8m1q43m9gbX77-Z0,1459 +torch/include/ATen/ops/ne_ops.h,sha256=QlQ-L6e4pew1Z0OZHW5tV5Vd1121AM8mgnGOKiRDQdM,4455 +torch/include/ATen/ops/neg.h,sha256=3dil3e93bYN1znPwnJcqO_b4Peu4wlLkQ8GupsBgXLg,1384 +torch/include/ATen/ops/neg_compositeexplicitautogradnonfunctional_dispatch.h,sha256=QKZyMJQouMIyjcrLfVbW0vCY79b6Fd1BMN63doqjOj8,1089 +torch/include/ATen/ops/neg_cpu_dispatch.h,sha256=hVkvXUwRKuGzVIxHtdx2NsUn7ZmLNyqaF4KqpqmCruY,1170 +torch/include/ATen/ops/neg_cuda_dispatch.h,sha256=6ykp4X0Fl0oMxoiyxORWZVCt3GjztdWJ5GMRGP2Jc0M,1172 +torch/include/ATen/ops/neg_meta.h,sha256=57nq1B29KTXV2XD3RxU7dei3e10Va_X11WBeK-1LQjU,818 +torch/include/ATen/ops/neg_meta_dispatch.h,sha256=DoHY3wKyUrOYLrxC1xypYFYhNxMk_ztuy82J6HhZxvc,1172 +torch/include/ATen/ops/neg_native.h,sha256=JV7eREAa3hMs2RlTkwIM8rYTzjokJPAXMicr1SDnNmM,1368 +torch/include/ATen/ops/neg_ops.h,sha256=hvRtHi2LAVleZ5nOC1m6Mb9XIXh4yo2FNYih1ypJWkw,2273 +torch/include/ATen/ops/negative.h,sha256=8Oug72iYvfRcQuDGOKu5bhBOAzCE4pjV4GxLJw0KSRE,1449 +torch/include/ATen/ops/negative_compositeimplicitautograd_dispatch.h,sha256=agjot52602rW0eBazmt6PnGfzapX05YhdxAEtDb-F20,1234 +torch/include/ATen/ops/negative_native.h,sha256=ldt_g8Rtmyuxt4F4aAJ7cywNdKFh_7MhixuNZr_8jU8,865 +torch/include/ATen/ops/negative_ops.h,sha256=xxg6662VE6dSvnyLTaW2xAfrLbU-T9Y5rRE7nr31GFI,2318 +torch/include/ATen/ops/nested_to_padded_tensor.h,sha256=9MigTsKd9zLcSJvor8X4vzkgRhHh-HowWPcbvfeJJwU,1089 +torch/include/ATen/ops/nested_to_padded_tensor_compositeimplicitautograd_dispatch.h,sha256=B01U5BmlHOcvRzMpx3ou91HkfUIHbe4s_oxMqtjnwTU,1103 +torch/include/ATen/ops/nested_to_padded_tensor_native.h,sha256=EMWQlBojardN6cqNN_rZRcVM0Tz7GFTejEvh5hZbJKE,815 +torch/include/ATen/ops/nested_to_padded_tensor_ops.h,sha256=StRExLhgnm7MaQFTpOkcqQCv_AL_s3lBzRznzoitvxY,1441 +torch/include/ATen/ops/new_empty.h,sha256=UiSxVfxrKLKmN3PVd4zKMNFgOQ_rqziGUk0RhvPKh0M,4589 +torch/include/ATen/ops/new_empty_compositeexplicitautograd_dispatch.h,sha256=xOTBvta-cgz_rqYN7b_p0ICF_TxpJRnDzdStyaBjD8s,2088 +torch/include/ATen/ops/new_empty_native.h,sha256=5q3d43fyXuBo8GMv-gIP_G1oGA2oeNR2QNIZJ37qnMY,1037 +torch/include/ATen/ops/new_empty_ops.h,sha256=L_hnffy4GHwE0WfB60wUwWUPMcqnFts2KkCn4lKK3kM,2491 +torch/include/ATen/ops/new_empty_strided.h,sha256=Z1527DKyNyM1SARoC4BSyigjFDQxiBQxM735eehdOz4,5453 +torch/include/ATen/ops/new_empty_strided_compositeexplicitautograd_dispatch.h,sha256=D7_L84y0YmVCk-NLb7nxXU1D1UXQKttOOGM4wwXifnM,1536 +torch/include/ATen/ops/new_empty_strided_compositeexplicitautogradnonfunctional_dispatch.h,sha256=_jRCpvWQ0erhDCUzI6W5Qxad9xfLOx6HJ_VtdNKCclU,1814 +torch/include/ATen/ops/new_empty_strided_native.h,sha256=uG55t8f2jXqnPB4CMyf99Hw1O9oONHKYR0MIAy3K864,1109 +torch/include/ATen/ops/new_empty_strided_ops.h,sha256=PTmQ3eRrhhoSXwdubya7bNLJYPkfZp9yD2BsuwtF4Og,2727 +torch/include/ATen/ops/new_full.h,sha256=JPCK3LhVB2xej1K61CqCgca2Jr30l-Fpdqu_MQEd4W8,5152 +torch/include/ATen/ops/new_full_compositeexplicitautograd_dispatch.h,sha256=wokdK2NxHVo5lQWW810YkxpgR7WMVOMR-IUCIOE0phA,2328 +torch/include/ATen/ops/new_full_native.h,sha256=UUNJocjpxhhAkUtFWr43dcPT-Lhghm80hpyY0QfXc_I,1086 +torch/include/ATen/ops/new_full_ops.h,sha256=4rOLCQmEU3NhhU8oaHpht5OJYfsUxXzxgPqOT_8mwSw,2687 +torch/include/ATen/ops/new_ones.h,sha256=J0OLEZJMBU8Z61SxNoBcThNfJ0CbdIW-Bpdhq3gqki8,4560 +torch/include/ATen/ops/new_ones_compositeexplicitautograd_dispatch.h,sha256=snVoFVkayeE3O9VTx9Q9t0LNy4YFemtxmpJPVe8xqmM,2080 +torch/include/ATen/ops/new_ones_native.h,sha256=nggNLllVKJIO54JFgPyYBz7A2GR7Tke7VommY7NxZ1k,1024 +torch/include/ATen/ops/new_ones_ops.h,sha256=H1Ap5v0zRaopmBasWy1aZRsWG1NdSk3GxEaH3xWFmBc,2485 +torch/include/ATen/ops/new_zeros.h,sha256=AO_RrsVoT8m6th_-P_nEO7TLno_D3Bw0cvW2Amy6wJk,4589 +torch/include/ATen/ops/new_zeros_compositeexplicitautograd_dispatch.h,sha256=Vm6wDPLdJpQ5_080UJWMXPfruElK9Zi_CZRU8eQHodo,2088 +torch/include/ATen/ops/new_zeros_native.h,sha256=YA8SmTDS5Aw3GYOu7DSsbtx8Wu_15wx7IMM3K81z3tM,1026 +torch/include/ATen/ops/new_zeros_ops.h,sha256=cr7vaGPIm_01hN9NxyW9T52Tn9TM7B0IZqjYUnUPTWA,2491 +torch/include/ATen/ops/nextafter.h,sha256=-TblIa9sAkmMrIH07FumvBgni-eYY1rS2yLkVWXFCO4,1452 +torch/include/ATen/ops/nextafter_compositeexplicitautogradnonfunctional_dispatch.h,sha256=CqlDNXL3s0xWbeHpWRnQYw6n4jWPL35aiAtpzqQHtnw,1153 +torch/include/ATen/ops/nextafter_cpu_dispatch.h,sha256=_9AQ9leL9FwtC6_RIkZN148aKPLGdfbC-YGt_qRwd7c,1298 +torch/include/ATen/ops/nextafter_cuda_dispatch.h,sha256=mLsfFLwWS102x7BB439S16n34AP7g12iCKpVY8pCod0,1300 +torch/include/ATen/ops/nextafter_meta.h,sha256=xuWLppoQXGI27BFIeInsk-J-1VLl8EKyIffHEbXCca0,850 +torch/include/ATen/ops/nextafter_meta_dispatch.h,sha256=K1oQxUp-7-_2BOnPnDYr-tXSSQzUBe6bfQO1EA-4Xjo,1300 +torch/include/ATen/ops/nextafter_native.h,sha256=Qx4IZw_tAf7cZUM10MRusRG80CbMZU0iZxIQrjG9iqQ,885 +torch/include/ATen/ops/nextafter_ops.h,sha256=p59BwVz8Fyp9iUaK3W4zUgcjdQWBNmTKAzbdMlGPHyI,2585 +torch/include/ATen/ops/nll_loss.h,sha256=Eh2wlGFDgU1czBhePODMcYtHt5Hn66k9UDEoh4EdjsQ,5777 +torch/include/ATen/ops/nll_loss2d.h,sha256=hv1ov3XmTex5-V66gysrONmfDsBL7pFBmk3CgqPCBCI,5839 +torch/include/ATen/ops/nll_loss2d_backward.h,sha256=tfHW2Q6IdqdsU62Z5_4d-9vE4H7yw9cEQixkL6S38TY,7378 +torch/include/ATen/ops/nll_loss2d_backward_cpu_dispatch.h,sha256=LLSPFElfKtTdSj0jmY9h_KavQLG7yuvU3Qf4_mFkNZ4,2543 +torch/include/ATen/ops/nll_loss2d_backward_cuda_dispatch.h,sha256=a3OgFiSNm25AGITfttM0DoAdUm_oEWOMhGxaxH7hjrE,2545 +torch/include/ATen/ops/nll_loss2d_backward_native.h,sha256=2hDdI1qkBxcizGsxvSGGsCFmZCKiJFdvA_LudGhWwRc,1732 +torch/include/ATen/ops/nll_loss2d_backward_ops.h,sha256=4ut3Fk3y8gWxaFMyFeSJy9EIuMSfHc0uSh6Gcxe80AE,3099 +torch/include/ATen/ops/nll_loss2d_compositeimplicitautograd_dispatch.h,sha256=-Ao-XeVoPaI0VX8L26yBYfdruti516SNFeq8OA9L0wM,2227 +torch/include/ATen/ops/nll_loss2d_forward.h,sha256=b7pJLGZmQI_6wwJr2ZeKvyIhqb-Bo-SmFHiQ6aMjjew,6729 +torch/include/ATen/ops/nll_loss2d_forward_cpu_dispatch.h,sha256=OJBAxo5dXQrlb7BmG4NfCFZ40Gti7g7-ReUGIKYOzVU,2397 +torch/include/ATen/ops/nll_loss2d_forward_cuda_dispatch.h,sha256=e6f819-h_Hw9f2pxWg0TyrRBlKncj-uPESZWH1RN_ZI,2399 +torch/include/ATen/ops/nll_loss2d_forward_native.h,sha256=J2JTuC3PVSC5MYGQ2_5jH3DYPaOrDj6HLqgLe0H1FFw,1618 +torch/include/ATen/ops/nll_loss2d_forward_ops.h,sha256=y_pUpQe32hfrO6ho1FdK01ZZAw7syVPNmelmBIrBjnE,2940 +torch/include/ATen/ops/nll_loss2d_native.h,sha256=CmBsNyPXCY5lg02NcEwRaMq-yVa-ZQhZGSpb8yeKDXk,1079 +torch/include/ATen/ops/nll_loss2d_ops.h,sha256=RwtIuO3O8xqbzfDdHLxp20NIbTvTs2cUecvMkw0yRTU,2611 +torch/include/ATen/ops/nll_loss_backward.h,sha256=6ehcxwFbbZZo_AMiLwottcix32UIGg1y3SfD_rzHzkI,7316 +torch/include/ATen/ops/nll_loss_backward_compositeexplicitautogradnonfunctional_dispatch.h,sha256=U-tbjWgkvoWMJ8TtcNd_aUsTdffbgDuUFFqJ3KaMSG4,1485 +torch/include/ATen/ops/nll_loss_backward_cpu_dispatch.h,sha256=n8F8w36MpzcTheQbfzcCAIrM95XnORr06Nvy3zO6bY4,2531 +torch/include/ATen/ops/nll_loss_backward_cuda_dispatch.h,sha256=XkkLWKJs_Ai-M7gbdy8zvT5Q4nFMboNuauwmUC3exSk,2533 +torch/include/ATen/ops/nll_loss_backward_meta.h,sha256=W6hjRyONtqptasAonOE2uf4dW0VKKqPl442zHWGk_4g,995 +torch/include/ATen/ops/nll_loss_backward_meta_dispatch.h,sha256=BADsEwi0ZRGeEwJjiVKlKYbYO6ZbB8NDgglbkYUViKM,2533 +torch/include/ATen/ops/nll_loss_backward_native.h,sha256=EhRGO42dPRbuhgo-hRol6SB57OX2Bgw_U67URlpD73o,1395 +torch/include/ATen/ops/nll_loss_backward_ops.h,sha256=RFOLfAi0pl7qFh81NEp-erLW24pfUit-0XdNzxnHYHI,3087 +torch/include/ATen/ops/nll_loss_compositeimplicitautograd_dispatch.h,sha256=0m16YPlIckHH5kJaO5Ox44mWeNRJr8Kwi5ob79e8WBY,2215 +torch/include/ATen/ops/nll_loss_forward.h,sha256=65Mv2fysKAeynCm64upMcuTVL2nu864JVcINk2kZlak,6667 +torch/include/ATen/ops/nll_loss_forward_compositeexplicitautogradnonfunctional_dispatch.h,sha256=8s8oNWzpYA9gOthksx4kDck7aIF6fwztb1ZHJ6Xu86E,1403 +torch/include/ATen/ops/nll_loss_forward_cpu_dispatch.h,sha256=qrjsNekoUDZG6WwPBrhPfMGwghGfQ9yoIOjEixixXJg,2385 +torch/include/ATen/ops/nll_loss_forward_cuda_dispatch.h,sha256=uol3mOU5iOBl5J-PK7eRAD9S3L-lHyPyEvuqblKar3A,2387 +torch/include/ATen/ops/nll_loss_forward_meta.h,sha256=2ZnRaukgVnOPU9GObu_o6O5fZ5XOLNBfvyoqfIyd4ow,929 +torch/include/ATen/ops/nll_loss_forward_meta_dispatch.h,sha256=C497g9x9nVIdVMPYGLKA7I4jtm5gowu9C9hlA5AUTgI,2387 +torch/include/ATen/ops/nll_loss_forward_native.h,sha256=z4g2_bimglUW7JcrbPrHvJ1_bFAlr-zS3GluAS_O0tM,1318 +torch/include/ATen/ops/nll_loss_forward_ops.h,sha256=zvdDJhijxbRzLtELepLrcYyWNS7rrEjJDcAsmh-xJzM,2928 +torch/include/ATen/ops/nll_loss_native.h,sha256=Nqkdacz598yRVl6ORucTIljHbTK0AShFLVdXm-NhiW4,1075 +torch/include/ATen/ops/nll_loss_nd.h,sha256=nc2oGZGxx_m3sjuXvteHhQ6hYmrtc8LKGgAOPPCkctI,2376 +torch/include/ATen/ops/nll_loss_nd_compositeimplicitautograd_dispatch.h,sha256=MJ80xvsCHxI0gnbKddLIq4ZnsY-GkGwwgG_ggs0i3Zo,1373 +torch/include/ATen/ops/nll_loss_nd_native.h,sha256=J5MyTLIgAGDek7eToZpPQx7MpH8pn5qymRvM5gkK-zw,886 +torch/include/ATen/ops/nll_loss_nd_ops.h,sha256=_65h8l1sc3aYwkedTUgKPvSmANass22xfLrXUAE0OnA,1619 +torch/include/ATen/ops/nll_loss_ops.h,sha256=uEAvyzxh7IIpKOo3WvcWoU0l7UEL5qVHx-64_CARvBc,2599 +torch/include/ATen/ops/nonzero.h,sha256=ysYJ5d6QrJY0rDdWgy8wVgykPLLK0e5CcakBdyB0pko,1291 +torch/include/ATen/ops/nonzero_cpu_dispatch.h,sha256=wCdSTwF5T2xedb1J24bVixd7LefZ6AyRN9vak-jGzUg,1134 +torch/include/ATen/ops/nonzero_cuda_dispatch.h,sha256=0eFxM-bOyLWHyYK9eWT8S0m9rD6baPFA3IYAY2F4mh8,1136 +torch/include/ATen/ops/nonzero_native.h,sha256=yxQ2ql_VknxsnQcJFKRIqc26wuc0iNiUbV7e3KNUpZg,962 +torch/include/ATen/ops/nonzero_numpy.h,sha256=fUSQKqON8495ueRHDw-A_MhGkdQMJCwnOc_MYxBlDHA,936 +torch/include/ATen/ops/nonzero_numpy_compositeimplicitautograd_dispatch.h,sha256=_Wh8rlMiWAJ-OkAn0r2tW1B6Kn_oUI8sMuoUho5wJ4o,1040 +torch/include/ATen/ops/nonzero_numpy_native.h,sha256=W5GHvlWkvnA10lbm7dy7zrE3Dd4wBfEDf7N4Hu8PadY,752 +torch/include/ATen/ops/nonzero_numpy_ops.h,sha256=Ef-Mf9PYa3iFU_rJTsJQgoD--odaa1E_CBQbBVVmS2w,1279 +torch/include/ATen/ops/nonzero_ops.h,sha256=Krm-E4Xzq1EYX39aGU_V2yW06SQ6RXhVZkO_ebcZ1VM,1807 +torch/include/ATen/ops/nonzero_static.h,sha256=C75Toksa3S0iRwBf9CM9n5L5AtJAJjWW2r1OJGyE928,4257 +torch/include/ATen/ops/nonzero_static_cpu_dispatch.h,sha256=CYqoWnNE1O1CGUtYgKup6PO8vSP4fAGf3lBm-dupCw4,1639 +torch/include/ATen/ops/nonzero_static_cuda_dispatch.h,sha256=3H28CXLAYVNpgNpUch_dLEOBWwXKNhbt_Ll1U2no-JU,1641 +torch/include/ATen/ops/nonzero_static_native.h,sha256=EvFNaBExDso_SQT7tkDr4lcOTXH_DVRjRNBCUbY6t2E,1132 +torch/include/ATen/ops/nonzero_static_ops.h,sha256=WCUf3ImI-rDUpy4rfMLvL-aSLHTnWXZtEzmIwpBDwuE,2112 +torch/include/ATen/ops/norm.h,sha256=5tatF-Kg2GNeL9zA3AnjguexQZhmWQIXvGnbQWXMrPw,6516 +torch/include/ATen/ops/norm_compositeexplicitautograd_dispatch.h,sha256=xqzeGOMtHBfiKn3wIp7rvG8jp-MpRRXs7TU3jS5IkZo,1627 +torch/include/ATen/ops/norm_compositeexplicitautogradnonfunctional_dispatch.h,sha256=3JKsNt_7X8ux7dSqqTEMPuh-9vH8QlfIKs1aoMn-xnE,1270 +torch/include/ATen/ops/norm_compositeimplicitautograd_dispatch.h,sha256=aenIraO0p-7zp9tldlBMwqDBJpY69Njf6OVbmn9HmVQ,1896 +torch/include/ATen/ops/norm_cpu_dispatch.h,sha256=LgN0McgHf_6bzB2u6uHOnGv1ah40xrB8ZdiZLh9LZBY,1852 +torch/include/ATen/ops/norm_cuda_dispatch.h,sha256=rAFtAGElwqki2OiJb2asKKwgAwz1l2jbjoP1qTK2wEs,1854 +torch/include/ATen/ops/norm_except_dim.h,sha256=35bSg2rX8OIMvvuLo6vyRSwKnLKZ099NKSuCAC_rl_4,980 +torch/include/ATen/ops/norm_except_dim_compositeimplicitautograd_dispatch.h,sha256=Z_IAQ-Cj2aNGHGz30vg3ctp4gYcizsjgbT_21dS5E1o,1054 +torch/include/ATen/ops/norm_except_dim_native.h,sha256=qujaPdGjvf8DBRqJTxj79FtxkW8SmnsRPhSa1ImC9YI,766 +torch/include/ATen/ops/norm_except_dim_ops.h,sha256=JX8m-36vd_Xgk92QfC9vxOAdX9OWPkOivEzngKN4yr4,1321 +torch/include/ATen/ops/norm_meta.h,sha256=3OBPCJ6S5yWI0qE9fcm6TXzzeIDnCem1SXkVb7cXw_k,1103 +torch/include/ATen/ops/norm_meta_dispatch.h,sha256=zl1Huec01S-uNhlfj5_vZ71t8rOqRy8fL7jxNsmrFxo,1854 +torch/include/ATen/ops/norm_native.h,sha256=uUwnklId78ipnCBrRhk8zctPPTDs1nRUd20MyZK-tq8,2512 +torch/include/ATen/ops/norm_ops.h,sha256=SB3pJ1tpv7Ya-wLUFFJ4XVs9SZ1ogUTsnUHpl7IxhXU,10504 +torch/include/ATen/ops/normal.h,sha256=wkYf5hdo-VrjhO66g3kHnTu644sZk8oPxxsXzq18QQg,11915 +torch/include/ATen/ops/normal_compositeexplicitautograd_dispatch.h,sha256=hMReygAhIkZH7A3f7Dua6IJ-Q8Oq3E1GC7SRlBszYHI,2921 +torch/include/ATen/ops/normal_cpu_dispatch.h,sha256=RTaM3OHZ5v4TUjLhIGIlaRlVZh8jR8SQjDnA7toHaWg,2306 +torch/include/ATen/ops/normal_cuda_dispatch.h,sha256=hH7zjJTN14P9HMEDPYPtl-OO4_J6pA0IgnbJUZJBqZA,2308 +torch/include/ATen/ops/normal_meta_dispatch.h,sha256=pJ1LMXAEJjz3e8Pg9fSrP3_zWmhcO1erT6L1j69yPVE,2308 +torch/include/ATen/ops/normal_native.h,sha256=nbYl4zEHBkI9leCmqzREc0hP5rULthXRIAb6lbNecTI,3587 +torch/include/ATen/ops/normal_ops.h,sha256=YzA_97ITiVltXJVBa25hS6Pt-hJqvMwwoVrorybo7-s,9888 +torch/include/ATen/ops/not_equal.h,sha256=46rGJui3-kGy_OYmbURITdHsiW9621Aikoh4V1_YkmY,2229 +torch/include/ATen/ops/not_equal_compositeimplicitautograd_dispatch.h,sha256=c9a6mmiEZbgdSpgtbxzwNIATQP5ONSITT-akpvDUiSE,1720 +torch/include/ATen/ops/not_equal_native.h,sha256=s3itfrPp3hKOjBWjWII9-VggE7nxLfnDAORJwQ9WeQo,1216 +torch/include/ATen/ops/not_equal_ops.h,sha256=I-_K8wBN4m4rVhYRByEm8R_ehuHpSCep46lriNkeUIk,4581 +torch/include/ATen/ops/nuclear_norm.h,sha256=VNkWZmqmBZiPEuTHAMJlctWYXR5whhzMtnIcoN3TLMM,2340 +torch/include/ATen/ops/nuclear_norm_compositeimplicitautograd_dispatch.h,sha256=e6v8IqQTUU5woGQ-DlD-Qc6nmWlsbecajbCBQWW6myc,1593 +torch/include/ATen/ops/nuclear_norm_native.h,sha256=pe37nwIvfGzR9Omdl_HLeCl3RjsHZhLtG4V56Wx2aSI,1074 +torch/include/ATen/ops/nuclear_norm_ops.h,sha256=83jT_oJjjYFZ4uT0eYegJEoRtZgGIk9CNwWWZs91bA4,3344 +torch/include/ATen/ops/numpy_T.h,sha256=32PcuB7WnL62gX0HBE1-5nBWHxCMWuYbU3LAHXZgXyk,758 +torch/include/ATen/ops/numpy_T_compositeimplicitautograd_dispatch.h,sha256=Pv83dKFQ96GgSO9O-dC8zeX90xRZwj5VU_BOl3zSgs0,1019 +torch/include/ATen/ops/numpy_T_native.h,sha256=1JjT7rDgNqehTMlbmFtA0WZCKwgWPZnMuXBqnzLUYR4,731 +torch/include/ATen/ops/numpy_T_ops.h,sha256=hUtDgK-fnM2g_vu-grneQHERiSXCiKV-UxxzjAsKFSw,1220 +torch/include/ATen/ops/one_hot.h,sha256=G557pLCY1UF3S4DntHrQ5iTFO-S1RLESiKKObPdmelw,952 +torch/include/ATen/ops/one_hot_compositeimplicitautograd_dispatch.h,sha256=MkTITT2rvxCjx7CJgcLkqXzCdC-aSYCcDXK12hFPVHM,1043 +torch/include/ATen/ops/one_hot_native.h,sha256=dhrhm1td1sqyj-H8v-g37DlzZ1lf6dWOtH0TGXIim0g,755 +torch/include/ATen/ops/one_hot_ops.h,sha256=0g6hYLhvPvq13oA-Nqg6ngqeDN-T70fGSm3ALe8D9YE,1285 +torch/include/ATen/ops/ones.h,sha256=W_g22DwoMDQ8yNcEAYcUv6DXn2JgTQtYeEvH1qM5V94,7083 +torch/include/ATen/ops/ones_compositeexplicitautograd_dispatch.h,sha256=bcSohEEpEy1V9CHcPLGhQuMisyHX3z3dYAIpgqM7hL8,2428 +torch/include/ATen/ops/ones_like.h,sha256=65po7sEMvdbiZD9nBi4gnq61JaK9mu_310T7-5oN1gQ,2462 +torch/include/ATen/ops/ones_like_compositeexplicitautograd_dispatch.h,sha256=FRsNhP7kllx7X6xwHFxoXDwvahwfhV77yIESTbgusqI,1642 +torch/include/ATen/ops/ones_like_native.h,sha256=ga7jIKFXUX1eqWOdJ9uPvmaYeDjmCMVBZzo1iQnY544,1084 +torch/include/ATen/ops/ones_like_ops.h,sha256=PfK109IN9n1F6DYtWTPA5pKDJEtp_efyVRzEjQXwRDk,2649 +torch/include/ATen/ops/ones_native.h,sha256=HtIyUUspwQSg26Vy8q8f-YEg5CrYOALfyXmU9Whp7oM,1320 +torch/include/ATen/ops/ones_ops.h,sha256=i94zNKxsqQtLOSqiofYVWJDgHKzaGO0kUAN2ZR9HU9E,4148 +torch/include/ATen/ops/or.h,sha256=wEbGL_7iJQ3LyZpFvyXJWb3hsocq34iKEDGlwmJ7l_o,1144 +torch/include/ATen/ops/or_compositeimplicitautograd_dispatch.h,sha256=dWCpHwpRVFMabWAlCBRK1h-A2ouBdvjCh0Ft4GZ2ClM,1278 +torch/include/ATen/ops/or_native.h,sha256=cQ8L_VYxWkgN52P03bKe6-CGdwj_YBsUIKoaTXfb284,990 +torch/include/ATen/ops/or_ops.h,sha256=30lZvc6fitKLpwgplZEc-fsZ0m_pwA0mtvKA_WAkyv4,3133 +torch/include/ATen/ops/orgqr.h,sha256=_kgKEfoZqGKEpRsbqsOyFG_JH6qSvOPhyiW_iOpyiLs,1421 +torch/include/ATen/ops/orgqr_compositeimplicitautograd_dispatch.h,sha256=DnaoWNhTh0ess9dYIMAPAFyq5ckOVkCKwbuSljXGbhI,1253 +torch/include/ATen/ops/orgqr_native.h,sha256=qdmmLM50RmgcxE0C0tTOn0GhDAupY9Q2thoASCrEc6o,860 +torch/include/ATen/ops/orgqr_ops.h,sha256=uBj1UWLK13j1hDC11DP8TZ8ec_M5VFcJXdPafVei-xg,1973 +torch/include/ATen/ops/ormqr.h,sha256=pGd-p5wEcmMR9Kl5Cqqby1WApBo0ngRD_Sf-EqMYRiA,1839 +torch/include/ATen/ops/ormqr_cpu_dispatch.h,sha256=gnSCAjNid_Bp6K2QMSdvBBiRxp4GEPIPrl0M5yZx60g,1393 +torch/include/ATen/ops/ormqr_cuda_dispatch.h,sha256=xP3oHdel9gPmAZ3kMNZziGqzJFo1-6DXAbkQV4jQ1QI,1395 +torch/include/ATen/ops/ormqr_native.h,sha256=alRGzVKLWzNDmwgLxOjphebjq-LvmXZKwxMyezQmbeE,979 +torch/include/ATen/ops/ormqr_ops.h,sha256=FrmoBlDTz8h8BuTuxPh77KechsoAX-v9A2YRx4jj4RA,2359 +torch/include/ATen/ops/outer.h,sha256=lwZApKb_eLqz6Q3oRMtBnQn9CdcDrqheK5mjfw9yPY4,1403 +torch/include/ATen/ops/outer_compositeimplicitautograd_dispatch.h,sha256=vm1KAYvuhjAMGNiGGpuh6nKrp7WIhXR1tzxpQdJeQM4,1247 +torch/include/ATen/ops/outer_native.h,sha256=Y_3kwwRs1la_4cLm6EZ5TfTef7GwYLtgsC5L_-jPEfc,856 +torch/include/ATen/ops/outer_ops.h,sha256=W-585u8uC4AapAs-Gn61_vN5vm31L_rEAr3pbo6hIpo,1961 +torch/include/ATen/ops/output_nr.h,sha256=Qh4E28AaxT7dPXJ85KP-iGp9PIsmw6BfwqCArG3fBGA,760 +torch/include/ATen/ops/output_nr_compositeimplicitautograd_dispatch.h,sha256=UdpJISwTc4233OyFr3eeRwHujCAg5w6kvENi1lkcjMM,1018 +torch/include/ATen/ops/output_nr_native.h,sha256=G7JHbr5l9ho9Bh3NZ3aS8PD6_DIEHMpoxEbnViUzfmY,730 +torch/include/ATen/ops/output_nr_ops.h,sha256=QTcEcdaOf2O6rUkF5n67O2WyFVi1P9lTsBgv1BZrPcs,1208 +torch/include/ATen/ops/pad.h,sha256=x12iCHoGpQF8TydCXZrE3R8jMUVaxnBlU7cJWSsD9Ws,2036 +torch/include/ATen/ops/pad_compositeimplicitautograd_dispatch.h,sha256=SSC5us6Z9D0wXhTxZDjMU5RNAzJXLBb7iLgVna-PlBE,1279 +torch/include/ATen/ops/pad_native.h,sha256=OUY8EBQoFD792LKHSvbwxaKa15D1fNmbIIVjA07Btg4,839 +torch/include/ATen/ops/pad_ops.h,sha256=-oFcHxD7Esw_4xy_ZP_dcqXkjYwbHxtQjI-0UvChf2k,1480 +torch/include/ATen/ops/pad_sequence.h,sha256=KylRCD1P9tCM41-4_i5bL_I2_I6paYzgf6NrRPIc4X4,1134 +torch/include/ATen/ops/pad_sequence_compositeimplicitautograd_dispatch.h,sha256=ldIyjPXz5f4L5Hy1WcnLX-ivA0uRLp4mljl2MRMMTRo,1114 +torch/include/ATen/ops/pad_sequence_native.h,sha256=j5nMc02Rh9sKhL2meN7AZZ0qMjbkS3STCWUteg_3NM8,826 +torch/include/ATen/ops/pad_sequence_ops.h,sha256=kJMRW6YMTB1ZALIVvEmsJwtmVy7-FAwjfLKRymlj2bU,1485 +torch/include/ATen/ops/pairwise_distance.h,sha256=LwNs-fuATmgAxZgHg2lo7nOsRl_xLaPlNGWfAmi1A1M,1082 +torch/include/ATen/ops/pairwise_distance_compositeimplicitautograd_dispatch.h,sha256=9Ca5HKvuSz01zCiFSik3MA8A9M5lBMIEeOwOeAaN9v4,1100 +torch/include/ATen/ops/pairwise_distance_native.h,sha256=HcociC6WWIZbbawY0WYUTNif4G6gc9JQUKiqp_sL-Cc,812 +torch/include/ATen/ops/pairwise_distance_ops.h,sha256=uMbfQQuLz7KI2pzt4tRdZ-ryGTI01r7FZDRSp44V7Z0,1457 +torch/include/ATen/ops/pdist.h,sha256=dD8ZU0Ee2h8FiB9xo5AvnHnr0rI-ckHxaci6eVkvxws,913 +torch/include/ATen/ops/pdist_compositeimplicitautograd_dispatch.h,sha256=eS3GeRxyjlaM4bBc0cmFwQ-L7u61GVTSNEQvhBjcJxs,1029 +torch/include/ATen/ops/pdist_native.h,sha256=tPQIZmKuiPax2Gpy6DknEZchsVHAFe_ivFWZ5yWaRUI,741 +torch/include/ATen/ops/pdist_ops.h,sha256=hl98K9tMth4ixw9nWXSEdwE8huBcC3kiCxWrFpTdjR0,1247 +torch/include/ATen/ops/permute.h,sha256=ZWyQUTnuu1qiPs3H036jYXcgjhJlGNEaaDPkPB8_8PY,941 +torch/include/ATen/ops/permute_compositeexplicitautograd_dispatch.h,sha256=5B-SH_D-nq4rlLYnS8WF8qDkvRbq8pytlQoIlqFMzV0,1041 +torch/include/ATen/ops/permute_copy.h,sha256=Ia321sUCvMi0WSHBq4etdjrQ1MMSbWS_upPLXkeom64,1461 +torch/include/ATen/ops/permute_copy_compositeexplicitautograd_dispatch.h,sha256=YdDg3DKHc5Pfhq8q1zrDSbg-jphY9yY-H6l7BX9uTL4,1177 +torch/include/ATen/ops/permute_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=9Dx9MCSR9a4fews9rdzRBK1oVCap-AL_l0o5_nPszy8,1072 +torch/include/ATen/ops/permute_copy_native.h,sha256=nG1UwTZQYOM0ZxdaCzYYRgp_m3wfB8iaTu7hwUUnP8c,864 +torch/include/ATen/ops/permute_copy_ops.h,sha256=9h2dMXRmfP4mF20v64FdDcbvRTI2YlSr7J1gxH_zq0s,1983 +torch/include/ATen/ops/permute_native.h,sha256=YN2K44AhN2B799YS23MEykktktlZhh1TQEq6m59eWCw,841 +torch/include/ATen/ops/permute_ops.h,sha256=aCjn1K4Y4GKEHWACWIDrFWlbYfHhcElkOK-RCZtPrYc,1293 +torch/include/ATen/ops/pin_memory.h,sha256=m-iQal92NcI7l6icfTfOBPBhaKVwHStutoVUSutEBI4,761 +torch/include/ATen/ops/pin_memory_compositeimplicitautograd_dispatch.h,sha256=I0DqFATtVQ8hR3ugq07fjqSEyf79xyWLgRAuM5U3ciE,1073 +torch/include/ATen/ops/pin_memory_native.h,sha256=35VkVuEljLoSWYqsVAWieLuW0odmC8RrbEFPoMpBPEI,785 +torch/include/ATen/ops/pin_memory_ops.h,sha256=KyU4ieqwAoRrbO3gSX59ah-JJ0zLOL4Ha1FeuxOi9mA,1351 +torch/include/ATen/ops/pinverse.h,sha256=fGcxnWh-hAQJOQwVeRgtcOkatt8AK28R3T1Vt_lsC7s,945 +torch/include/ATen/ops/pinverse_compositeimplicitautograd_dispatch.h,sha256=oqZCmG7bp8UZlEI0YZ_1gz3bRnI52jlrvOaTGKpG1kY,1040 +torch/include/ATen/ops/pinverse_native.h,sha256=ReZC8u40pfr5BHqxX4jVcd-ON3XGkt5fXmAbx9HJq2c,752 +torch/include/ATen/ops/pinverse_ops.h,sha256=lZ3vBriEXftZgXf660MmOA69XSERE_gN98oBb7XaxkQ,1272 +torch/include/ATen/ops/pixel_shuffle.h,sha256=ejKZdtcIDd9tLZlboJsDLKqXQcynS7U5j0eA9RJvNUY,1531 +torch/include/ATen/ops/pixel_shuffle_compositeexplicitautograd_dispatch.h,sha256=S7DC1zmaKpTiBRJOegN88D3UBewRgKBZ4L_x3NVzulw,1183 +torch/include/ATen/ops/pixel_shuffle_compositeexplicitautogradnonfunctional_dispatch.h,sha256=JfZQBrraEp2Vdr0CcuYPRViZ-lYJchGAKbpo2zrOTAg,1075 +torch/include/ATen/ops/pixel_shuffle_cpu_dispatch.h,sha256=SlKVkKIuKa8jGWOoDLnGbjQA2mKe022T5yw_EvACe_w,1005 +torch/include/ATen/ops/pixel_shuffle_native.h,sha256=ZQxeEzBz7z9tnCXsMxuNXv2dtsObmxrbTcNiaSU8pOQ,964 +torch/include/ATen/ops/pixel_shuffle_ops.h,sha256=wuEfBzTwjjf1ZlEWbF8roXLidJ7lsN4T2s8jds8x4ws,1997 +torch/include/ATen/ops/pixel_unshuffle.h,sha256=xmjgeTFjGetuyVGSBV5brLeWRxACilEXbM55spkJvr8,1569 +torch/include/ATen/ops/pixel_unshuffle_compositeexplicitautograd_dispatch.h,sha256=5xBbUDPtX6lLAnG5QaJR9uUjHXcH_1xNaudLfTFb9Wg,1191 +torch/include/ATen/ops/pixel_unshuffle_compositeexplicitautogradnonfunctional_dispatch.h,sha256=2m-mlFy51O12WjhngoxbycfDWuM2cH3BEsZhhO36erM,1079 +torch/include/ATen/ops/pixel_unshuffle_cpu_dispatch.h,sha256=DHgDfhmZ0PUqqe4RqFAx8RpgM8-HXhgcgj4xZNB1n5Y,1009 +torch/include/ATen/ops/pixel_unshuffle_native.h,sha256=oDHVRRKOKKKWCIt0uALzDy0DGJ5pOi5frp-P9reDfWI,976 +torch/include/ATen/ops/pixel_unshuffle_ops.h,sha256=laVhiKWL91sz_nMff4xXljVg3dvYY8IeseXkpLQvNjs,2021 +torch/include/ATen/ops/poisson.h,sha256=AyVek-ij1xNMT9a9gUyQUoyvkGzhmHHNBT9Q0EBqFLw,1561 +torch/include/ATen/ops/poisson_compositeexplicitautograd_dispatch.h,sha256=giBT2SV-N5P33J3vNwThSlNTINe9TGWaIAsC_XDTRC0,1222 +torch/include/ATen/ops/poisson_cpu_dispatch.h,sha256=y0d3Jb4SOCUV5h-HN5pbARqb2vIk6M9slt2MmBdl_tU,1032 +torch/include/ATen/ops/poisson_cuda_dispatch.h,sha256=OdeJuLd5ml7cXSAuTcMhoFqSdTWei07HvY2Us8f5tmo,1034 +torch/include/ATen/ops/poisson_native.h,sha256=ic7tTHq7bgHilkfQzHURCff5Zhw_WbO2zhbQj4oyPME,1036 +torch/include/ATen/ops/poisson_nll_loss.h,sha256=HksHExpx5JmGBYBcOn1zWKyzqnxTx3YEuOXXOz3YY8A,1128 +torch/include/ATen/ops/poisson_nll_loss_compositeimplicitautograd_dispatch.h,sha256=0SlpWtXrli-3drB73FPD_8Wv5TaKlGSXQs2ahkdAHbY,1114 +torch/include/ATen/ops/poisson_nll_loss_native.h,sha256=0hkcCb32MF0gnA2A_O-M2wSAyNv9VUKde2PhblQfvyw,826 +torch/include/ATen/ops/poisson_nll_loss_ops.h,sha256=mr6YHsfVWWT6aPoMooV3DDpRCgiqC1j5PCjgHl1D7q4,1531 +torch/include/ATen/ops/poisson_ops.h,sha256=fs0y73ogeDIqjpInglErUu87M0mex9hPA-c7rPiwju8,2093 +torch/include/ATen/ops/polar.h,sha256=59nwGgeNPIvJ0x3_djeP2Px-1mHrlpyTuUv7CZLcN3o,1403 +torch/include/ATen/ops/polar_compositeexplicitautograd_dispatch.h,sha256=8jC9x-50uJzs4RlQYTTyFI5GqmB1euAJsBFviP46aKw,1042 +torch/include/ATen/ops/polar_cpu_dispatch.h,sha256=HJPL7YAIEvTamcN4zE_CY5mMamLuBAEQtdkvSnP2Pi8,1125 +torch/include/ATen/ops/polar_cuda_dispatch.h,sha256=uQpP6S5i6jmY0_MUenlQsd2o17qbAmlwXuCQRcmTlWI,1127 +torch/include/ATen/ops/polar_native.h,sha256=PEz-OBSeFuiw1jx5AtblKBAZ2f8meYUHoIMEJTa7EVI,856 +torch/include/ATen/ops/polar_ops.h,sha256=g6fpYt16-ercG4hBhs3iWCSQV2QJbJMmJU7ypF90jTo,1961 +torch/include/ATen/ops/polygamma.h,sha256=-3ikoI7C6MD1aOysM7Eg3ciKQVVDJil5BBvrQSAgrME,1374 +torch/include/ATen/ops/polygamma_compositeexplicitautograd_dispatch.h,sha256=ATyYl5quZzXVmMHddMycxu24v6q1ilz6lgcH2YeDZr8,1029 +torch/include/ATen/ops/polygamma_compositeexplicitautogradnonfunctional_dispatch.h,sha256=FRgHWy67jyCpxRL5eQxPoT4sEAo1OLw0t5fyw7j04_c,1058 +torch/include/ATen/ops/polygamma_cpu_dispatch.h,sha256=fPQ7AR0Mhj8hgT3fUnce-yzrjhvT4AQS1deAkvVXdxw,1173 +torch/include/ATen/ops/polygamma_cuda_dispatch.h,sha256=qhFeGZ0lh4FsTDApAZNrLH53-Iw3_1XkxjUtZl0Vy70,1175 +torch/include/ATen/ops/polygamma_meta.h,sha256=dWzsOLaB2VHnnRmqoP6YfnaOY0o7CJuYw1rFjmZ0M5Q,835 +torch/include/ATen/ops/polygamma_meta_dispatch.h,sha256=Jepz4eowtRhljOQqo8qdoJR1QNSVk7Bt33mhEzZ6Fi8,1175 +torch/include/ATen/ops/polygamma_native.h,sha256=DuBh1KOv1nZAtvYFvl3ZtWn-TnNvNvHX3Ndqo4-hFYM,935 +torch/include/ATen/ops/polygamma_ops.h,sha256=PcoteqJd5A6x0Rsj_1Aajnuf7x3bEokXrWkX0rRkRgM,2441 +torch/include/ATen/ops/positive.h,sha256=Mu66OlqZj3X8Fjlj8X0VfTWnZkzWfQBe-6O1EYAHh8g,905 +torch/include/ATen/ops/positive_compositeimplicitautograd_dispatch.h,sha256=QGsRJWN5RhpOrKn1jnHFQnC6wzW4k9CbiSulfubPbj0,1020 +torch/include/ATen/ops/positive_native.h,sha256=hkiqdyQTI31dieW0rysixXq2-LeJnVYn7E5ZKU4boYM,732 +torch/include/ATen/ops/positive_ops.h,sha256=isaCy0KrT9J4uhltWqTJAPQFPxS6PVrfMAhQO81x9F0,1223 +torch/include/ATen/ops/pow.h,sha256=-EK328jhUomchm4GJz8g-lKw2AONa01SQvo9b_O0HXM,2961 +torch/include/ATen/ops/pow_compositeexplicitautogradnonfunctional_dispatch.h,sha256=nljLUc8gm-mxAzjoArePxFZ_1pC97m0XAwXmbyodLgw,1384 +torch/include/ATen/ops/pow_cpu_dispatch.h,sha256=ArgZui8B6sIA5oigxgmsvRU3eZVqfHtaV4p4rn7KmWo,1941 +torch/include/ATen/ops/pow_cuda_dispatch.h,sha256=fqH9JOOy9E5S3UiGAvf5B8tyTh67Fz_dxlg4wzn3ENM,1943 +torch/include/ATen/ops/pow_meta.h,sha256=DGxa8NeFcOfZMxDtSVJVD3jcAQAldAC7mRnkQSiWX3c,1154 +torch/include/ATen/ops/pow_meta_dispatch.h,sha256=OfUX0PQZOMAK1kcpFgCZ9Mtb6aksFaiwG0EXpcUaGHU,1943 +torch/include/ATen/ops/pow_native.h,sha256=I4_ogEWBQmWgIr8gz6xcKS2X5l-IHQdlVJlu0eP5IE0,1480 +torch/include/ATen/ops/pow_ops.h,sha256=yXOFN_7rgdtJcR9a3sv003I5ifbaAz-sAOkrAuUWgAE,5914 +torch/include/ATen/ops/prelu.h,sha256=TJ-kYkNkD_T7VzAySkx7gE5O3rfPUfrPQOn_neOuTXg,937 +torch/include/ATen/ops/prelu_compositeimplicitautograd_dispatch.h,sha256=WKV2r00u93ai8fCd38QsPzg4b5n5wMMPpmxzMXNG01M,1044 +torch/include/ATen/ops/prelu_native.h,sha256=0NBrld2TiiRUTivI5ijBy-cRI2EqSZNmrmFU0paivyg,756 +torch/include/ATen/ops/prelu_ops.h,sha256=3sXLxty2j3z60eIx_i_PoP1RKZlWIiofLunih73JtKM,1297 +torch/include/ATen/ops/prod.h,sha256=pYSiMEQ3BTDvCsqsz_-SAQ_VCE8lHKBKQnhVA3Lq-is,3560 +torch/include/ATen/ops/prod_compositeexplicitautograd_dispatch.h,sha256=jHIedNnCNCGj4Z4SVFipP9ik6kv7FjpnKLHFKGbQx2Y,1210 +torch/include/ATen/ops/prod_compositeexplicitautogradnonfunctional_dispatch.h,sha256=XGARH5XY2QagoAuQ0-vyae-Ji4p4vAR7kOCCYnY6OUA,1129 +torch/include/ATen/ops/prod_compositeimplicitautograd_dispatch.h,sha256=X_ABSbuV7Nm16kQNjWFhaG7KT4aNtIdrX5a4StYpwYs,1421 +torch/include/ATen/ops/prod_cpu_dispatch.h,sha256=fgnYuoD44QvJhTYIe3eJEbuQhGwmgfzrhwPOKWH9HrU,1471 +torch/include/ATen/ops/prod_cuda_dispatch.h,sha256=DmsR0vXUVOuhwxqSBxA_ooTMfaK2asLzvIgo4WM232E,1473 +torch/include/ATen/ops/prod_meta.h,sha256=7VOwKynXEdDYYQ52QslmexZjK9YMCiJrbUfQiiT8NGI,893 +torch/include/ATen/ops/prod_meta_dispatch.h,sha256=t5SZZU0jGkzxTL8hbtKh5Er9vQJen8JC6vael0AGwTA,1367 +torch/include/ATen/ops/prod_native.h,sha256=G1DKLXvmTOATl9eyB9vuA2BdasqmlI7DariPgW71bao,1428 +torch/include/ATen/ops/prod_ops.h,sha256=0Z1tRhWneaq0r99tJJCtVLf9oR3k0rTDdFqxqBLEJL0,5282 +torch/include/ATen/ops/promote_types.h,sha256=yY5J_y9-UDUVg8AOwSjiwBDGk5hgDE-JavgC76jnEiI,977 +torch/include/ATen/ops/promote_types_compositeimplicitautograd_dispatch.h,sha256=Arja6ix0IM_1Ky4cOYBq6FVReHhYa9j0qFg7g8h2bpk,1048 +torch/include/ATen/ops/promote_types_native.h,sha256=HKlBJqK7kookmuQO9vRLxiZb0fr9gEaxmw9lIVxcChQ,760 +torch/include/ATen/ops/promote_types_ops.h,sha256=5AtQQLqc9Whd8GGIpyoc9XsZ4X683vzN835rcZwP0yw,1321 +torch/include/ATen/ops/put.h,sha256=zKxCVw0WuiIJjmPoavVgDbOZEXltqlVr4BWb9tu-hio,1710 +torch/include/ATen/ops/put_compositeexplicitautograd_dispatch.h,sha256=2GFpgaKRAgLzybNMzLnYQ_WpukiljfYr225tc_nE-Bk,1388 +torch/include/ATen/ops/put_cpu_dispatch.h,sha256=AaAzeeYizV4QcCcQNkLj2FqllfIUk5VTlbRmIgXQVi0,1044 +torch/include/ATen/ops/put_cuda_dispatch.h,sha256=DrVD92DdMWmTY2GcKw9V1w5f_Sjsl-rOA4vSuxFF-g8,1046 +torch/include/ATen/ops/put_meta_dispatch.h,sha256=M-jUHofnB-CI49NOTKfmQxz2vjDQJGhfWRxuNUyEJVs,1046 +torch/include/ATen/ops/put_native.h,sha256=OjL_Ozw2av95qgHF1aRfyLj-iMrYinDJ969jmqWlzFg,1072 +torch/include/ATen/ops/put_ops.h,sha256=Xk3ZLM2f8WFluntexeEMJz0WgkCx2S6taNEX8tfHJ3U,2987 +torch/include/ATen/ops/q_per_channel_axis.h,sha256=tYmmRertATakSQ9hD0NCmrW1CJFDu3HNG87ejkqfQpg,933 +torch/include/ATen/ops/q_per_channel_axis_native.h,sha256=f8rqlsUs7RTqUg8bdZTRoL9RV0LtmDgh1OJuiQo8NgM,739 +torch/include/ATen/ops/q_per_channel_axis_ops.h,sha256=pLhS6kbovOUGcBtfg3lqUD-Ugz5NthS5d7wCslKtUec,1235 +torch/include/ATen/ops/q_per_channel_scales.h,sha256=-T265OFu7YwezrloNbyJTrTHXPO7mUXiFiyyNuHrBiM,1421 +torch/include/ATen/ops/q_per_channel_scales_compositeexplicitautograd_dispatch.h,sha256=z_bZB6-nBgom99A-USUFqdOatep1B1jgPhpi2nvPALs,1149 +torch/include/ATen/ops/q_per_channel_scales_native.h,sha256=E5Vczsy39kBk1ZNCYtsoL4DeldjeBkgeNUhzu4TPKUE,836 +torch/include/ATen/ops/q_per_channel_scales_ops.h,sha256=o9qMF9Yq5W8CjsILpC_xY7szEKkWOj5j5iQ7Ef3CjDQ,1885 +torch/include/ATen/ops/q_per_channel_zero_points.h,sha256=xHCcn_bGZ2_YVnjRvL-Cogw6uWFnMoDtC_cGvBSUI3k,1471 +torch/include/ATen/ops/q_per_channel_zero_points_compositeexplicitautograd_dispatch.h,sha256=JDxc3roywf2B4blrB1jaCBATSM6uPllYPU_yRb9v1qw,1159 +torch/include/ATen/ops/q_per_channel_zero_points_native.h,sha256=7f7m6gecEdHNK0nQ-TyBN8AyXwKuZXqLRq4jpLNK6Wo,846 +torch/include/ATen/ops/q_per_channel_zero_points_ops.h,sha256=tqAAxJkMirXR2Xs3mKs2Knex_9ghHri7f874XtWgpJE,1915 +torch/include/ATen/ops/q_scale.h,sha256=1WggPLvpVzf5OYqrqh2nBsRDbq4FMn1H90YNGObIHAI,890 +torch/include/ATen/ops/q_scale_native.h,sha256=Q27fWRo48tf2NhBOYCqXXokNRpAI0xhUgys-P4dHvRY,733 +torch/include/ATen/ops/q_scale_ops.h,sha256=0J-KBz3FzFk572hu2XWKm_E298eC_myyss_Zo0U5vm4,1201 +torch/include/ATen/ops/q_zero_point.h,sha256=vBfIWKFuQayfrECh7jDFjqyCRfm2KielCAMksdjorGk,909 +torch/include/ATen/ops/q_zero_point_native.h,sha256=7B--Bv75JI_LuWHoDIUxAH64If8KUlUWBcRxWol2hJ4,739 +torch/include/ATen/ops/q_zero_point_ops.h,sha256=RJG0IdLFtyI78ImD19zkfxI0Y_UbP2BSYaFBZ9KW_1w,1217 +torch/include/ATen/ops/qr.h,sha256=mCt0cKsXHRusEDxGRr8wvtB5lrLmUoT5fItqpTC5CpE,1525 +torch/include/ATen/ops/qr_compositeimplicitautograd_dispatch.h,sha256=zWs4CYrAxqFkIpDSxsPcDPMvyv6NcU1EjryPbulso0I,1313 +torch/include/ATen/ops/qr_native.h,sha256=GCy2id16vZSRa1p4ZtW9J2Ig5fF4vjZf_Nkls1FqQv0,893 +torch/include/ATen/ops/qr_ops.h,sha256=iKD_9MJtqDyLkqBeZ79YVXBABH9n6qeHf6MWbi0DgEI,2101 +torch/include/ATen/ops/qscheme.h,sha256=qcrePpz_LIFeYvz4JYdodUaorRagEgJgCUSjDu25Gg8,758 +torch/include/ATen/ops/qscheme_native.h,sha256=SP2sqF4szvKIHYX4TXbTcHXBDdsln61BIt_XBe_djMs,738 +torch/include/ATen/ops/qscheme_ops.h,sha256=x-z57214V3Ban8AUYHvV2mNbY9btFN05qDY4gBwAK7c,1218 +torch/include/ATen/ops/quantile.h,sha256=s6m5pSEXB6R8AJg18UMVW2eXawwuwj27_sDrPon3-Q0,3191 +torch/include/ATen/ops/quantile_compositeimplicitautograd_dispatch.h,sha256=jdbRH7Dwb_bd5V9hlOeImfGB14hndR1LHSSk4m0WVSw,2070 +torch/include/ATen/ops/quantile_native.h,sha256=wdI-OpgxXzH-xqC9AVB9dMmdMX5W0gZh9fTst_A59Uc,1376 +torch/include/ATen/ops/quantile_ops.h,sha256=Oy7PlxJUK-eUXLOAnU9MvHqPjNUt_c_oF-UfvRzKoHs,4244 +torch/include/ATen/ops/quantize_per_channel.h,sha256=WkuQCnJuDOOs4BmgJMLsQk_Ex5bY5w60YHKs4hnT3Do,1997 +torch/include/ATen/ops/quantize_per_channel_compositeexplicitautograd_dispatch.h,sha256=qQvHSUOuGiavBC-9iC1mWW5FwwrBoCLtjO0_cUlSSGM,1339 +torch/include/ATen/ops/quantize_per_channel_cpu_dispatch.h,sha256=CbP2HmOAy-BZJMi9eo6gpwDaGGYNJZKWHarAYkVgJcc,1083 +torch/include/ATen/ops/quantize_per_channel_cuda_dispatch.h,sha256=WP3Gw_P3OZsAqDSxmYBEeOnplwmGF-g_PR5Sz5iwNvo,1085 +torch/include/ATen/ops/quantize_per_channel_native.h,sha256=tPlLsPG6noHvkeBoC0B97llxAgJYQB5UbWZu3KubZ3s,1026 +torch/include/ATen/ops/quantize_per_channel_ops.h,sha256=fZoP1IKOPh9OMXq6GuOPf9ejI9uP6PhVl81jGKWWoec,2521 +torch/include/ATen/ops/quantize_per_tensor.h,sha256=34mT0kVQ1JnapUS61DJq-uYQab0tQWydyF4LArMwMYM,4188 +torch/include/ATen/ops/quantize_per_tensor_compositeexplicitautograd_dispatch.h,sha256=T6j9LfbP9VXbuHkfuFuL9vG97uMovGA_hE2urK9K0BA,1931 +torch/include/ATen/ops/quantize_per_tensor_cpu_dispatch.h,sha256=Uu-tbhTQNnuUcgrgcgIIWcN4dfiap_hUTavhPcFWGNQ,1351 +torch/include/ATen/ops/quantize_per_tensor_cuda_dispatch.h,sha256=hiY6FAhmHLPETKxsL7_wR-Z8CGq3zaR89X4EsKTJAT4,1191 +torch/include/ATen/ops/quantize_per_tensor_dynamic.h,sha256=Zt8SdrwOVmrgmVL1sfNB_9VWDBkQTdoDw8ShRhGkJjY,1788 +torch/include/ATen/ops/quantize_per_tensor_dynamic_compositeexplicitautograd_dispatch.h,sha256=HmjSm2p6Ddv9oMM8_4C-7YFvDDZg7-IGy517mm1Pp7k,1245 +torch/include/ATen/ops/quantize_per_tensor_dynamic_cpu_dispatch.h,sha256=qq0AH2mKj5Vn8MaPfs51FRIWCbxbsPgxJo4drDSyc7w,1036 +torch/include/ATen/ops/quantize_per_tensor_dynamic_cuda_dispatch.h,sha256=qWO5oerFtBm33iFtCZ2WQ0B89r9TTGWZO3zW7PiatHM,1038 +torch/include/ATen/ops/quantize_per_tensor_dynamic_native.h,sha256=WJ7lt_Hf8USh63iLtAp7YrZZMoDPBgRMDJUk8g0g5hY,932 +torch/include/ATen/ops/quantize_per_tensor_dynamic_ops.h,sha256=ZHjRfSmQFUEJlwOKGmN_C8SRS3JtetbtG2MjaZyzWKY,2209 +torch/include/ATen/ops/quantize_per_tensor_native.h,sha256=--AnfYaBoBXKJlYlVnVghxzTn058ZQDE_U0zKFBqq8k,1636 +torch/include/ATen/ops/quantize_per_tensor_ops.h,sha256=qWdPhurwMFX7yGfE4_mbh0JpkIIdBa9GGM0KHqrVF-k,5828 +torch/include/ATen/ops/quantized_batch_norm.h,sha256=Re9Hjr6PLCg_ymAZ_oHEI_RA8oKGo1Bp0ESdsprarMc,2531 +torch/include/ATen/ops/quantized_batch_norm_compositeexplicitautograd_dispatch.h,sha256=EY8ZuhILv9_i9PZTu2Jv639KiMibAD8kWp3psKPBkS0,1541 +torch/include/ATen/ops/quantized_batch_norm_native.h,sha256=AYd2nnzy6w8Jx4hoDtermw6O7LCJUy8tgFpp9zsNKVY,1228 +torch/include/ATen/ops/quantized_batch_norm_ops.h,sha256=U6jCfgRrK90aQh0SeXz_xTpTScOEQ2ThczQm4xY0ZMw,3167 +torch/include/ATen/ops/quantized_gru_cell.h,sha256=8ISaZ1OYgDObb2MSq5rsGI-69vbB3a-cWOo--cT67LQ,1676 +torch/include/ATen/ops/quantized_gru_cell_compositeimplicitautograd_dispatch.h,sha256=inhkG_wQnqgQ0ENC82U787h78mjhkbCZSqCxKGdpp6U,1410 +torch/include/ATen/ops/quantized_gru_cell_native.h,sha256=dGkcKSYwVdr3Bsvmp5U5iYJJl4pH8q97QlfXxjA0Gxo,1122 +torch/include/ATen/ops/quantized_gru_cell_ops.h,sha256=bSk8YkuU5wy8JAVDkyCm9ZOR9-bvjsmxCxfQYeHROZU,2491 +torch/include/ATen/ops/quantized_lstm_cell.h,sha256=j2NYTrMBolo_FqzY_lWnepWrX4cSi8QD5jqCyrNIqHM,1713 +torch/include/ATen/ops/quantized_lstm_cell_compositeimplicitautograd_dispatch.h,sha256=QyGEzK8m2VWlcmCDj5DJzyT2mdSOibzk6P3RwTRUVbc,1432 +torch/include/ATen/ops/quantized_lstm_cell_native.h,sha256=T7B7MUP9Hn9pSO0ByVV435idnp3QXbDlNKqRFwmKkAI,1144 +torch/include/ATen/ops/quantized_lstm_cell_ops.h,sha256=B4T9AQvpTv6Tc5g-kVyQ5HgMDeSZ_9TEmt2fjpa_ZqU,2569 +torch/include/ATen/ops/quantized_max_pool1d.h,sha256=GEwGRhrOwBbdodISt4HD8eSH0edViDNGM_yW4wtbBx0,2251 +torch/include/ATen/ops/quantized_max_pool1d_compositeexplicitautograd_dispatch.h,sha256=A07VGjkfwp7xAhVci5x03iVnfVCunf3wqAoFIhxlMpI,1402 +torch/include/ATen/ops/quantized_max_pool1d_native.h,sha256=HK392qLIUpe26ee_RXalccEenbusO2kl8TFxAel8V24,1089 +torch/include/ATen/ops/quantized_max_pool1d_ops.h,sha256=3nuPSb-TZBKFDdjXwl0c9vpJagvhz1vGAdo31wAetls,2707 +torch/include/ATen/ops/quantized_max_pool2d.h,sha256=n7Cw1nFwh0WTxGN5qXJFRvwtLWdIxZqD0716BrcwwVs,2251 +torch/include/ATen/ops/quantized_max_pool2d_compositeexplicitautograd_dispatch.h,sha256=1Ea3qbbHJ-FISD_PYCnTGCJNkw2-ySXciHjVVApPkho,1402 +torch/include/ATen/ops/quantized_max_pool2d_native.h,sha256=tWicl9hnkZ3lXOSHi2wpgAf6iHgB1XE02UEwTQozduI,1296 +torch/include/ATen/ops/quantized_max_pool2d_ops.h,sha256=1tbBoarO2v8UzDbjb9vJ8jbuYFkOWIzjI16dEfuUw6E,2707 +torch/include/ATen/ops/quantized_max_pool3d.h,sha256=SSEbwvl8pS4IaKXZKKmKrnhlf8BXRG0dSeyFN_WgOZo,2251 +torch/include/ATen/ops/quantized_max_pool3d_compositeexplicitautograd_dispatch.h,sha256=ALRVG5vck8nIrNpWrhYtbcXgD20U-mmhAO8T6sdNcVA,1402 +torch/include/ATen/ops/quantized_max_pool3d_native.h,sha256=fEQVDh31mm_JouOd9CqCYWV_9BPc4GZ-quoKuUYhVqg,1089 +torch/include/ATen/ops/quantized_max_pool3d_ops.h,sha256=9LLe7DDVeTUKGsa4mpSkL-ZM9mGNYU3DzoJLdwg9znM,2707 +torch/include/ATen/ops/quantized_rnn_relu_cell.h,sha256=rtqOVAZc1gYada_24zATRm7e_3C7yYU4PGHYguBRcp4,1696 +torch/include/ATen/ops/quantized_rnn_relu_cell_compositeimplicitautograd_dispatch.h,sha256=HjwjPjX80DSmtz6_iYjLB1xA8pwEKeD9pclOGZjLd4M,1415 +torch/include/ATen/ops/quantized_rnn_relu_cell_native.h,sha256=uQVATTp_Twcm76vKglNu7dVU5Spdb9M6yr1Rb4bFC44,1127 +torch/include/ATen/ops/quantized_rnn_relu_cell_ops.h,sha256=VpevJOyReHyE4-um0Nm9LCjng9tsnzovO8KdAf5wy6g,2506 +torch/include/ATen/ops/quantized_rnn_tanh_cell.h,sha256=zxN3OwhGY48MJqpaHdpt4PTb31Dnqp1GkPcOcH6QVZM,1696 +torch/include/ATen/ops/quantized_rnn_tanh_cell_compositeimplicitautograd_dispatch.h,sha256=JhXqJjT8JQnielLh15vQOXTtZ4epL4YeSnI5OckxWFk,1415 +torch/include/ATen/ops/quantized_rnn_tanh_cell_native.h,sha256=7kWFjiDJHPBbc0--3kWTfj88aJB02riZOKjUECdUQWw,1127 +torch/include/ATen/ops/quantized_rnn_tanh_cell_ops.h,sha256=BQBhu6OKofQ-HJATJhVQ-v-mzqWAultISlxCTR3jb_I,2506 +torch/include/ATen/ops/rad2deg.h,sha256=L20HGM_cphhO_glBxFJlHMucSwBjK5mNsfFKIrxsdIg,1436 +torch/include/ATen/ops/rad2deg_compositeexplicitautograd_dispatch.h,sha256=3o0DspkJr7-95oR08TysYEWhkltVTU0Peup0hGdbRA0,1230 +torch/include/ATen/ops/rad2deg_native.h,sha256=FONDrgrUReE-UKb82F9QzNUzzLBDvUQ6EWOsVzD-gUU,1288 +torch/include/ATen/ops/rad2deg_ops.h,sha256=D_UDLDxHI0i9q0-ClarEjV3fffayYJL2OYJr_lGHH3U,2309 +torch/include/ATen/ops/rand.h,sha256=zHCjxsoVWVtSTtEt0XGR6itYNSa-pe7zmpNfAxpbFXQ,25018 +torch/include/ATen/ops/rand_compositeexplicitautograd_dispatch.h,sha256=uRCJlSl2K-tBt8dJv8WCVAtifm2tr-TVAP20C1MeLNM,5328 +torch/include/ATen/ops/rand_compositeimplicitautograd_dispatch.h,sha256=XOf4FXZWAbTzlUzB7cskBVUO_kEpRoAbqKa4NJHKv4U,1448 +torch/include/ATen/ops/rand_like.h,sha256=30z_hfw4t-yuh9iOHMGhHdIRVh5o9_-y_k_-a2e2RW8,4545 +torch/include/ATen/ops/rand_like_compositeexplicitautograd_dispatch.h,sha256=CvN0dq9YBvH6nUxFxlmRwmhEM0a1G-jiEQcUxr3H0ZQ,2488 +torch/include/ATen/ops/rand_like_native.h,sha256=HT1gOkkv_I0a7Bw8Bnq_-Y6ItReGxDTJiQ6nHoUbaUY,1586 +torch/include/ATen/ops/rand_like_ops.h,sha256=iSJJNV3bo6L95OOlMbuQS64lyPyaHWfcGUwzGO0xSXs,4922 +torch/include/ATen/ops/rand_native.h,sha256=23lfmNilug7y-WH9sXgBuVghF0ThTqp0_jZW4EgcnL4,2169 +torch/include/ATen/ops/rand_ops.h,sha256=gymq5wORTLIScd5fO8kMDNxKIkQHhJYD3kB4azoIG9k,8346 +torch/include/ATen/ops/randint.h,sha256=njWb3PkPu81pzt887dvG3XW-DT4AlHNPcjCvXz443BM,26261 +torch/include/ATen/ops/randint_compositeexplicitautograd_dispatch.h,sha256=vwKaTEFxcnvddIxK70wozO8bUsuJjazMa6yk2zFmOFY,6076 +torch/include/ATen/ops/randint_like.h,sha256=Zw_Vxq7aWmWJ9TvohMCmSUEKT2th60gkChh0KfgfNPY,37484 +torch/include/ATen/ops/randint_like_compositeexplicitautograd_dispatch.h,sha256=fONL8wew8dwgBwAzQHEq02udoQSfrzoIYtG2Way030s,9768 +torch/include/ATen/ops/randint_like_native.h,sha256=Hkr1PAIv-kmenkiuqmEGSbf1O5ThaBPfyCqLZm2BaZw,3792 +torch/include/ATen/ops/randint_like_ops.h,sha256=g2x8YQ8Of013u6o5pomIRbqj4mV1idUX0eD8NeP6Y1c,14718 +torch/include/ATen/ops/randint_native.h,sha256=_9fXPK6KxvBkYw692glbOoaJU1RBjjtYAM65UB3tgpk,2148 +torch/include/ATen/ops/randint_ops.h,sha256=NqJbnqsvSDhE21wK77NcrOF4wzYmypsWHptPd_fcR4M,8568 +torch/include/ATen/ops/randn.h,sha256=YW2rOBbSn-y3ze22aip8QgsSmPrn9OKLKSB5O0YiPWw,25179 +torch/include/ATen/ops/randn_compositeexplicitautograd_dispatch.h,sha256=k_EK7MSjVD7IsTVrzGSsJZzcsmRQh1Q8PReR8xthfxY,5036 +torch/include/ATen/ops/randn_compositeimplicitautograd_dispatch.h,sha256=1VYIrrAHNebbAnXhTKgSFOOzXlOoIosEeM_FrLtgNMk,1772 +torch/include/ATen/ops/randn_like.h,sha256=Bye3xG69AGctJD_t7_PzlYw-pqeCc2M10gpJrucG_AQ,4570 +torch/include/ATen/ops/randn_like_compositeexplicitautograd_dispatch.h,sha256=jqF_nztvdBs8m1hOoNbMIiqI7mxhxHFRy8sZX7tIYOw,2496 +torch/include/ATen/ops/randn_like_compositeimplicitautogradnestedtensor_dispatch.h,sha256=hMw9z46joIOu_8W6Y1_UDw-FOjzP4e0Y_5IiX7kM6cI,1880 +torch/include/ATen/ops/randn_like_native.h,sha256=gNfG4KdGjhnrtEf5SAeBiubZybXyfVGnlWL8sQDtpKY,1590 +torch/include/ATen/ops/randn_like_ops.h,sha256=467VLa2wSHK1s5eTsKY1F8vVveWUxK3VSmsJKmSfY6E,4934 +torch/include/ATen/ops/randn_native.h,sha256=WUJ3PU-lUMGvLdyXUQ1ih2WBu4N3puONoSiF06Dn_0Y,2177 +torch/include/ATen/ops/randn_ops.h,sha256=iLDYCcvpaa3KSYc_K52Aesh-BF1PhtsQJlKQR26F0Vk,8370 +torch/include/ATen/ops/random.h,sha256=4FaCZPsIRPxvaSP6BFBi2rYYQvgCBQXEzHUvDxyQgIE,3486 +torch/include/ATen/ops/random_compositeexplicitautograd_dispatch.h,sha256=RQARzbrmjpSbGq3ib7KJ0_49yrdbesOOKdkE86uHSmY,2230 +torch/include/ATen/ops/random_cpu_dispatch.h,sha256=5y06dYxMprv45Tg-Kl9suUtdQKD9TNo1ypAFXbxVEEw,1299 +torch/include/ATen/ops/random_cuda_dispatch.h,sha256=HQn61lwk7EluM2Z6rjylHyw6anPQSzZ5ronaozuefvA,1301 +torch/include/ATen/ops/random_meta_dispatch.h,sha256=mMiibvwYr8fUAoOjwrgZWGHm93ADVrWCuTjfHbC7hjI,1301 +torch/include/ATen/ops/random_native.h,sha256=it_BC0AlkZolxUUFDUC1odw0jUzQM8GtLHV5G2BjrKg,2260 +torch/include/ATen/ops/random_ops.h,sha256=Xqn52y11O6ku4NeEHbo4Tv8MoyoZ02GXN6Ivx9KKbQ4,7394 +torch/include/ATen/ops/randperm.h,sha256=glg9AJ3ylTt-pF6t0UBwdjYccM0cL_sVOM4xT8bq38E,11222 +torch/include/ATen/ops/randperm_compositeexplicitautograd_dispatch.h,sha256=y8aHVtjduxYUUjxN30RqfNShWOO_gONRU0Ih-8SYRJY,2528 +torch/include/ATen/ops/randperm_cpu_dispatch.h,sha256=CcsZ6VtbBGPvQLacoJpXYrVXkq31BKKegwEZ8yO9iRQ,1376 +torch/include/ATen/ops/randperm_cuda_dispatch.h,sha256=QJFO2xE4S14tv3dWY1-5PZHwwO0BnhC0BQG4UQYHpcU,1378 +torch/include/ATen/ops/randperm_native.h,sha256=n40UpAUEqfRjX_ERSgRyT8PcCtwwxn7KPUSvJ765A3s,1407 +torch/include/ATen/ops/randperm_ops.h,sha256=E5OPegkLeLj8SfKq5FMlgGbnL05-kMLH5B46VZxJ4n8,4122 +torch/include/ATen/ops/range.h,sha256=9jRvfb8oVPjUmarWv2-MwFkkQfUrZiw2B0G6k0F2P7o,3647 +torch/include/ATen/ops/range_compositeexplicitautograd_dispatch.h,sha256=fti55kETwhtEhgdNFUg6-qg8LdMXrBPtSeEIzzBF5bA,1883 +torch/include/ATen/ops/range_cpu_dispatch.h,sha256=NgaZ6eDxMoGvcMbTu8AOqhgXWo2y8n_Az88YySObO0U,1175 +torch/include/ATen/ops/range_cuda_dispatch.h,sha256=D1RSUE1eeOT0Z3gFgdpHzgSaBpPNGkbV_lAqr9Js4QU,1177 +torch/include/ATen/ops/range_meta_dispatch.h,sha256=ONjT2hjR5t6jpv1gQHWhO2Tl5x47ZOVBHabhw30HwDE,1177 +torch/include/ATen/ops/range_native.h,sha256=JowoZgl4hPVAnthjug-c7kzXhyxYDqmLTNfGlBmnJDE,1542 +torch/include/ATen/ops/range_ops.h,sha256=5jWNaXTdww0V-68Tit-7fYNq4MaQK7zJAn_HtEsDoFk,4390 +torch/include/ATen/ops/ravel.h,sha256=Us73mVpadnS2DLxLyr_dM9xEkReX8whvTchohGWoEfI,893 +torch/include/ATen/ops/ravel_compositeimplicitautograd_dispatch.h,sha256=AC0K5pnZnU2vsFpHbeXwalZGpbzvTPrSMNMQRb6BNSM,1017 +torch/include/ATen/ops/ravel_native.h,sha256=eAwJ7usg91zpuHC5DZugKJKEG6Yq3095MBcKclfDM3g,729 +torch/include/ATen/ops/ravel_ops.h,sha256=QJe1iqrrX9mfUm9J0RO8mlyF391AzjqV6Dwox0RhJAU,1214 +torch/include/ATen/ops/real.h,sha256=m0C_rkM1UXEnQIPUDJNALKA-JshQphvqg_ePzmbz0ok,889 +torch/include/ATen/ops/real_compositeimplicitautograd_dispatch.h,sha256=rCcPKi6vWpwyZzllVskusj328A7fJPZ2fDWMzD7IOEw,1016 +torch/include/ATen/ops/real_native.h,sha256=1trlUHuin7b5xra45F4tKGv0yd6lkfri3KmEfHoHKi8,728 +torch/include/ATen/ops/real_ops.h,sha256=uSC3nf7sYq8TzgRdU7tZOWMXDvkX_GXHRHu2M2GN8KU,1211 +torch/include/ATen/ops/reciprocal.h,sha256=-jPdvliiLlx75gZjTXlxE1cgJGzd7uHwaJztSt2uKQY,1475 +torch/include/ATen/ops/reciprocal_compositeexplicitautogradnonfunctional_dispatch.h,sha256=MzlFb7uHD_H2hvkP36WTwOeP4KhlqSReNipxxKkEook,1103 +torch/include/ATen/ops/reciprocal_cpu_dispatch.h,sha256=884lW1jzF7CnpFMGCjjWv3LNhoX_aPBNbCNndYJtoTc,1198 +torch/include/ATen/ops/reciprocal_cuda_dispatch.h,sha256=DVAjuichl9gnssKsfWiKIf9j1boRPAojCxXGc6IvQzI,1200 +torch/include/ATen/ops/reciprocal_meta.h,sha256=Lec4KaLukDNry0qos2trLid9M2ktfWOqmJiv7p-o18w,825 +torch/include/ATen/ops/reciprocal_meta_dispatch.h,sha256=Ckqjj75BMxtx9YUibhR2fqybidHIm-RopIxakiczAYk,1200 +torch/include/ATen/ops/reciprocal_native.h,sha256=0XFprc6k6yhPWw2BlDPJ3_rjQ2PNbwDAGIpULZ0zOhY,862 +torch/include/ATen/ops/reciprocal_ops.h,sha256=qcX9FWoThII9ldlSbMcKmms_LRrfRUYJC64Skl0VPcA,2336 +torch/include/ATen/ops/record_stream.h,sha256=RIphFBPfEIjMJvONie68kSEHYP6Kw9ecpzGsF4MHrXY,764 +torch/include/ATen/ops/record_stream_cuda_dispatch.h,sha256=8bjzIFiPwQP-wQcK4VjOV_nmeWozPVV4W1fStlmmT2M,985 +torch/include/ATen/ops/record_stream_native.h,sha256=1hwm6nRo6gwRXqb_96AdOdWBtyO0Sy_We-pDb_g96vY,744 +torch/include/ATen/ops/record_stream_ops.h,sha256=LGYJDo0kliPFdM-Rqdyd__hPI35vTr49u8ei_qSUlgk,1246 +torch/include/ATen/ops/refine_names.h,sha256=sf-67YC6sUgVAg7x_DZ0esEvcUKJQ68YsyiCTfjEgvs,763 +torch/include/ATen/ops/refine_names_compositeimplicitautograd_dispatch.h,sha256=ARFmA7K2LRy9I4vXnSDrdPIP5RqMBvGf0zzjqZMaoP0,1047 +torch/include/ATen/ops/refine_names_native.h,sha256=qwI21kukpYJEiSEjWbCyOkxhH-ncOKZiMEUjybF74_M,759 +torch/include/ATen/ops/refine_names_ops.h,sha256=UzqH3C_r4xOrr9JPAtz9CX_X_mLGeq1ywyEssN4lmbQ,1315 +torch/include/ATen/ops/reflection_pad1d.h,sha256=UY80qaP1xwTwjnTzCbyJlzP80PenYTeEVMgAQJ2-7hM,4151 +torch/include/ATen/ops/reflection_pad1d_backward.h,sha256=l_ePIfxYV_9pSp5LZdOn6e9p-K7T07cM5le4f02jdM0,5314 +torch/include/ATen/ops/reflection_pad1d_backward_compositeexplicitautogradnonfunctional_dispatch.h,sha256=GhYCZL8SysRsZuyOLG0JCeQBjqrGmqMZFZSjnNCPXAA,1261 +torch/include/ATen/ops/reflection_pad1d_backward_cpu_dispatch.h,sha256=KEEVFzJvAZpp5pl_0OxQKWJ-ImpZhRHwUArtOyJV2bQ,1859 +torch/include/ATen/ops/reflection_pad1d_backward_cuda_dispatch.h,sha256=ZMPaRICpZcX5vQ2w3Q5cJxXovmYu75HOoVMilyYOON8,1861 +torch/include/ATen/ops/reflection_pad1d_backward_meta.h,sha256=HfZKDgWXyER7MSi-zWZs5MCiPSlr9iZd67HMpOeJr3k,903 +torch/include/ATen/ops/reflection_pad1d_backward_meta_dispatch.h,sha256=-qrCLdT1ByDqg3ep310A2cmL-y_VtHc58MLctuiiUwc,1861 +torch/include/ATen/ops/reflection_pad1d_backward_native.h,sha256=v4GA8PqAwxNvhhmAAmJmKxAn0qlBLpmFP5o_btw_Czc,1235 +torch/include/ATen/ops/reflection_pad1d_backward_ops.h,sha256=C-Ot0cNPNt731FYDBlGyYFqz_PAA-lJOYLU_bcAtasU,2361 +torch/include/ATen/ops/reflection_pad1d_compositeexplicitautogradnonfunctional_dispatch.h,sha256=Y3HT-6Bl8eno5h7t4mmJpx7sYBmI4MJqckzwHh2WwWM,1179 +torch/include/ATen/ops/reflection_pad1d_cpu_dispatch.h,sha256=dmhfwd8xYTgFlPdvXssBPFiSa2PyAqcxwvbSqZzTsPg,1585 +torch/include/ATen/ops/reflection_pad1d_cuda_dispatch.h,sha256=W-98_P50XzYFfIRx9e56e6I7sa8hPnZKi06p-1p4TO0,1587 +torch/include/ATen/ops/reflection_pad1d_meta.h,sha256=NrvYNVehvn2rINRc-ruhBsjWqv-VMHi4GZttwDzNvNg,862 +torch/include/ATen/ops/reflection_pad1d_meta_dispatch.h,sha256=Cv-E_PFMykunJOg9uAm06A5P-j_W6jjFOuMv0AD3pQ8,1587 +torch/include/ATen/ops/reflection_pad1d_native.h,sha256=1Tq0P9chLbvTfXY8NUTCj1GF3s70XvcqRbWM8niAIAk,1239 +torch/include/ATen/ops/reflection_pad1d_ops.h,sha256=mw1r3HxWJ8vRDaq47s7IjFL_5HOxGoDeom-QPeuBw2k,2057 +torch/include/ATen/ops/reflection_pad2d.h,sha256=U2BRBYRegUdF68QuSKXuYMImup7W1rpEUYL3K3rAnHw,4151 +torch/include/ATen/ops/reflection_pad2d_backward.h,sha256=Bt0OJNNkuezIEjx8TRqFmcoVtvQR01X2gGicQrNxnQA,5314 +torch/include/ATen/ops/reflection_pad2d_backward_cpu_dispatch.h,sha256=pNJcHalJIeC8dMO1avdOn8V_l4yRdj88rB0n_KBT-c4,1859 +torch/include/ATen/ops/reflection_pad2d_backward_cuda_dispatch.h,sha256=NLhnKGeptuWQHOz28zr8esQEW_Cr7CU0jEJbFPPCOZA,1861 +torch/include/ATen/ops/reflection_pad2d_backward_native.h,sha256=Kb54ajQxtyrF8DQyXw1jkHYs68l44yT8BuCU1jfG84k,1276 +torch/include/ATen/ops/reflection_pad2d_backward_ops.h,sha256=KlqPoRnuoo0wqoUJyA-Z8nxDrbZyaKVIymyj3V6z20o,2361 +torch/include/ATen/ops/reflection_pad2d_cpu_dispatch.h,sha256=QlzzQ90f5NZevfBtPakBCJ_Xjnins5CeqlqZh9wUuoQ,1585 +torch/include/ATen/ops/reflection_pad2d_cuda_dispatch.h,sha256=429oLBFEnPJ_szzCa4HqO7mq-XIbq3Q90FO98Epd-Fk,1587 +torch/include/ATen/ops/reflection_pad2d_native.h,sha256=6WnpsEvizH8uJTHRJ22doRG2krJbERDIFnDv6S0gWbg,1201 +torch/include/ATen/ops/reflection_pad2d_ops.h,sha256=3wQ4XITmP_quFNIijmfJIXM1sVA59JAVsxOzgUGu4vc,2057 +torch/include/ATen/ops/reflection_pad3d.h,sha256=vcv1E1zsthf-Cl8inuyzbQh7y2QeOmWQ3SNVQ4jdZQw,4151 +torch/include/ATen/ops/reflection_pad3d_backward.h,sha256=2_x1myub93IM9lkKd1-Iee_GMbaJsxXiNqlEGFi-o_4,5314 +torch/include/ATen/ops/reflection_pad3d_backward_compositeexplicitautogradnonfunctional_dispatch.h,sha256=2SIEA00zT0m4Wou2NODQAsjQHp_SR1w6A6eZWFUk-1A,1261 +torch/include/ATen/ops/reflection_pad3d_backward_cpu_dispatch.h,sha256=9ZtGHIQF9UZ8Z2tlVlLaMAxVZD_jlY626savtIYWAsk,1859 +torch/include/ATen/ops/reflection_pad3d_backward_cuda_dispatch.h,sha256=9lxLgRM5r31_jSMzE7OEtjDkB66EyZYTm4gaXdqDfqw,1861 +torch/include/ATen/ops/reflection_pad3d_backward_meta.h,sha256=5WDCmDFE-DcReKo6EQvv7_fFPi1l85ayObZyUWs6Cvs,903 +torch/include/ATen/ops/reflection_pad3d_backward_meta_dispatch.h,sha256=octYefl8wyWJTLYppgLCvifFttsVTnGBEC57kPpUEdU,1861 +torch/include/ATen/ops/reflection_pad3d_backward_native.h,sha256=WvVpG4NWP0LAykxK3LmSODOI3qGLYlPsXl2md2BNdeo,1235 +torch/include/ATen/ops/reflection_pad3d_backward_ops.h,sha256=zozrXunXGe8dcJkZccp8MmmMeVolQHR2JyjWtSRiMoQ,2361 +torch/include/ATen/ops/reflection_pad3d_compositeexplicitautogradnonfunctional_dispatch.h,sha256=aEKFUkbofzrEEOrprIQ86Au9hHwu8B0yTqHz6dhageM,1179 +torch/include/ATen/ops/reflection_pad3d_cpu_dispatch.h,sha256=W23FfB5owb-t2-alhkZ5DsrEB0MfRFLfqN4EqquUZXQ,1585 +torch/include/ATen/ops/reflection_pad3d_cuda_dispatch.h,sha256=IiNHvHicpEu8C_FJNQXrzHb2EMEzjeOhpL7LaWHnD08,1587 +torch/include/ATen/ops/reflection_pad3d_meta.h,sha256=Tbc3adBTs32m_HsQbEmyr5CtN4jNHl88OpAoHWpk-10,862 +torch/include/ATen/ops/reflection_pad3d_meta_dispatch.h,sha256=wOnhEYo9ZRnHwRw06pRKGYNfaK8Tv4J6b7SfAxNe9Do,1587 +torch/include/ATen/ops/reflection_pad3d_native.h,sha256=Ew3mEzMDoMkyh1mQT_p4ClHNFkbrEq-TwgqkoIya4J0,1112 +torch/include/ATen/ops/reflection_pad3d_ops.h,sha256=VPAS7x6khaZsrlqsDYwSiLpJ17mvXh1oBFKn4tru80Q,2057 +torch/include/ATen/ops/relu.h,sha256=M3Ode7artRDDTJwUeP9z0Y7vuic5Bn-5B7XPDxeozG4,1397 +torch/include/ATen/ops/relu6.h,sha256=ICGrAtEkkJq-pTGwPKXwXXhaAoCAcVdgfKP8DBaIQUI,1026 +torch/include/ATen/ops/relu6_compositeimplicitautograd_dispatch.h,sha256=EbYthn2TW62VG-_1Jxn2M9QrFDiPCv97xqk8PbQhcHA,1067 +torch/include/ATen/ops/relu6_native.h,sha256=ugDbunXLVeeYsmMEhE2Ud8AE_82blKXS59JT4JwjG64,779 +torch/include/ATen/ops/relu6_ops.h,sha256=5iT80HKY2kHHZ2oIsA8v8vpXYBdy-hoG_DYZ4rr9E2c,1704 +torch/include/ATen/ops/relu_compositeexplicitautograd_dispatch.h,sha256=cC0-1b2VlMWkpFmygY8D_6reYLz8zBFsWG87sS8Cc7A,1117 +torch/include/ATen/ops/relu_cpu_dispatch.h,sha256=Qb49RqVhCTNvYT3ZLhrubXoTe9H7BzH5QXxXdUoGASQ,1021 +torch/include/ATen/ops/relu_cuda_dispatch.h,sha256=pucxk11bsv6dE1lSMY4LLcNLQzzBlZm2g5QvzS7coO4,1023 +torch/include/ATen/ops/relu_meta_dispatch.h,sha256=xRDQYzYoXHu1QT1uXCKU8QBLRMY9l-LUYQdo_cdQCtk,971 +torch/include/ATen/ops/relu_native.h,sha256=oU2xN_7HRLREco2-tF5P1Ke_1UIP4zkoi83rwepV7sE,1593 +torch/include/ATen/ops/relu_ops.h,sha256=DxhQlofLOB1ibY4VFqHroBkh990x0YUJOzOw1KYqHt8,2282 +torch/include/ATen/ops/remainder.h,sha256=Osj0cmtCbG9_xjdA0Ea05djtjQtCqIqwdGMvBgTpIeA,3006 +torch/include/ATen/ops/remainder_compositeexplicitautograd_dispatch.h,sha256=f7qvcs7gqzV7SJAtoroztt3vY28spb9RvfJhK7boqVA,1557 +torch/include/ATen/ops/remainder_compositeexplicitautogradnonfunctional_dispatch.h,sha256=b8GiBfPhw-i-M4lqSEhj6Rk1kurCUp3ReqVk6rNO_l0,1153 +torch/include/ATen/ops/remainder_cpu_dispatch.h,sha256=8gsBJAMsOZsYbC5W-SIfPSiXXHOI-lp8fA0Lxko-F8U,1381 +torch/include/ATen/ops/remainder_cuda_dispatch.h,sha256=1BaJazlSaoBWqeX7onZpZBpiNE0JXkWh0qVTuYmfrAc,1383 +torch/include/ATen/ops/remainder_meta.h,sha256=6Z_ncBROTEATuHdn3NOZREIk7costpBZo_GJVz8WdQw,857 +torch/include/ATen/ops/remainder_meta_dispatch.h,sha256=Rw0QVtedtDa3RNVwFUqohTNJYutFnGEnD4toZrPMITU,1300 +torch/include/ATen/ops/remainder_native.h,sha256=m9IlMYru23jQPFB4oC5otTHGGvpprGOlxpGFHQF_r7g,1366 +torch/include/ATen/ops/remainder_ops.h,sha256=1zDq8kbwdkTk9tOAhhtTk6QbbiP-XpdQsASuhwlwvMo,5944 +torch/include/ATen/ops/rename.h,sha256=g0mwlwiGwpvsXzd4htrYeKhMW8zieeoglU62zn0JeLU,757 +torch/include/ATen/ops/rename_compositeimplicitautograd_dispatch.h,sha256=Im_kTstnUc9eOiK3GlDYSHXhZMqqXkNQ6zXVZ0Sb65Q,1149 +torch/include/ATen/ops/rename_native.h,sha256=WbcAfMw1LzfVjxi0eW8i9lhsyZm3wzLfCngslDr17YA,861 +torch/include/ATen/ops/rename_ops.h,sha256=40j68r-kGNb7Qy1BIOPYPwj7Gf677Mw1YG4NPZAwhtc,1980 +torch/include/ATen/ops/renorm.h,sha256=iVTnx6dEppCbuP10wa4yu-F4ZLQ03aXRerV4SEBXNNw,1626 +torch/include/ATen/ops/renorm_compositeexplicitautogradnonfunctional_dispatch.h,sha256=eBFw2KmDCM8MhgwMklqnqOTRLvvHLR7fygVGDrMR8yo,1221 +torch/include/ATen/ops/renorm_cpu_dispatch.h,sha256=Q34m2YPI2fwe0vvH7sw4ct5HsCJBxgSvPEKHBBN_ZYw,1434 +torch/include/ATen/ops/renorm_cuda_dispatch.h,sha256=JNc-OZogwv61mKLJEwaZ237zpUJ9xe7Vh-sSJ6WnbM8,1436 +torch/include/ATen/ops/renorm_meta.h,sha256=SuPJShyv9iubL3yXxNhrNfdogFrjQL1LhF0HWZbl3eM,884 +torch/include/ATen/ops/renorm_meta_dispatch.h,sha256=M9L9XchacR90S91h9CJ93WwttKC_TpMCHO4krZEcKqo,1436 +torch/include/ATen/ops/renorm_native.h,sha256=gPXoREEzazMNB0Yj63y5QcQop7Qaclekz_fhgq_KU-g,913 +torch/include/ATen/ops/renorm_ops.h,sha256=l0n_35vl_Nh_0Z8w0nWxmoA_YwS4T9qbQWSbAh5c4-Q,2930 +torch/include/ATen/ops/repeat.h,sha256=YYm-DhJ_s26M5-w_FbF0oafvhEegOI8VMH9oqZCbNSk,3426 +torch/include/ATen/ops/repeat_compositeexplicitautograd_dispatch.h,sha256=PugdJDXjwh-4gHRkyn-J1ahorV8kc3YwxbrJ6ZOI-v0,1569 +torch/include/ATen/ops/repeat_interleave.h,sha256=Y-4qkS3MMNsGpSnZ4bLt4R5FDuTeMpK1ppEOz8PmuBA,8532 +torch/include/ATen/ops/repeat_interleave_compositeexplicitautograd_dispatch.h,sha256=EtEDxoHAP6q01p8VAyHx5XRzsh9ueo36219v_9ziwII,1538 +torch/include/ATen/ops/repeat_interleave_compositeimplicitautograd_dispatch.h,sha256=ZsyN3yZkPLg2GnR_qF9u8b3jxhAS752bvG54-d5Y7I0,1732 +torch/include/ATen/ops/repeat_interleave_cpu_dispatch.h,sha256=shAe6RFMhoFaCY9Xv5wHxvAhkT1VX-JbvNDPIm8vA7I,1173 +torch/include/ATen/ops/repeat_interleave_cuda_dispatch.h,sha256=yorsUGfSYSBJej10a4hbmllPv5a1-nCk8otaSYC0Ado,1175 +torch/include/ATen/ops/repeat_interleave_native.h,sha256=-Yl0xyzyqzPMN-acziJ9jmD4PUTjx_akkHsQwJ6imTI,1472 +torch/include/ATen/ops/repeat_interleave_ops.h,sha256=iKDfyew8-Ujy-HcIbsyomZ7ESI6pNQ3TScMywdGjK34,3987 +torch/include/ATen/ops/repeat_native.h,sha256=VNKlb3YGWgZpyHAj6cEJLXofU94obelDdw2K-Bp5JZk,869 +torch/include/ATen/ops/repeat_ops.h,sha256=_InN0wG9mFg54N1wraWlHODJcxR-Ut7kl8cvpN_bEnA,1995 +torch/include/ATen/ops/replication_pad1d.h,sha256=Cwwr5gTh7z_vO1S8VrmsuhHt1IErOJN-esgl55p2ML8,4182 +torch/include/ATen/ops/replication_pad1d_backward.h,sha256=Sog_edg4WD0M3KGBGov--52l9aNyeX_VqGzEvelMLwc,5345 +torch/include/ATen/ops/replication_pad1d_backward_compositeexplicitautogradnonfunctional_dispatch.h,sha256=ptIHUmH-yJIfW2e2hh36zD1davS_sXX-sPclDErSj_0,1263 +torch/include/ATen/ops/replication_pad1d_backward_cpu_dispatch.h,sha256=aKJrgYCMFXNpCDbq8N5y9ritvnfj1o9p9ZQ_ouu7f10,1865 +torch/include/ATen/ops/replication_pad1d_backward_cuda_dispatch.h,sha256=mN-qmRr3cAuPD4waigfdpyjkSTd3tBzJO0xyuRBUyYI,1867 +torch/include/ATen/ops/replication_pad1d_backward_meta.h,sha256=D-aHDcGfrkMnfrRSBI1FGCpxhKp85hpKMg_drn6IYNQ,904 +torch/include/ATen/ops/replication_pad1d_backward_meta_dispatch.h,sha256=mLR6otC481JtqHcJ40W98U0IdDQlyAXKr3B_tetuSn4,1867 +torch/include/ATen/ops/replication_pad1d_backward_native.h,sha256=ojNbOUubaj-hmrVF5xx0XKY43oa2QzYdkuqO15n35Ok,1240 +torch/include/ATen/ops/replication_pad1d_backward_ops.h,sha256=WOUl6RE2fUjCO5UqRxgLWW9QSaWboGc7d234WisbuLo,2367 +torch/include/ATen/ops/replication_pad1d_compositeexplicitautogradnonfunctional_dispatch.h,sha256=_sg7u1j6ORuRstakmnogDMQCKqbpf6PSF4Pl3_xKHSQ,1181 +torch/include/ATen/ops/replication_pad1d_cpu_dispatch.h,sha256=s0uH7ECJUBJVPN7DKz2Z7HAHK62qn8qJh91dXkxyF08,1591 +torch/include/ATen/ops/replication_pad1d_cuda_dispatch.h,sha256=hfJsQXlPy_uYizytPiJAm_u6KRma0N52OMxkXtkIgX8,1593 +torch/include/ATen/ops/replication_pad1d_meta.h,sha256=LbHofGuZTUhPrNbUN0SouXhlEs6oeKUYH2LfdD37qNA,863 +torch/include/ATen/ops/replication_pad1d_meta_dispatch.h,sha256=N2RC2miI99rOtgYEUdPyUvFDGPsiokvVBul5GbiqGLk,1593 +torch/include/ATen/ops/replication_pad1d_native.h,sha256=Hu2sj4UXDLX1gY-uiDB1wfVxpzTXquuhDk_OOAUJ7o0,1117 +torch/include/ATen/ops/replication_pad1d_ops.h,sha256=u-1lNbPLVpEmS9Xl83bmFiPhih_9e1GbFTQ2G8PIhYk,2063 +torch/include/ATen/ops/replication_pad2d.h,sha256=j-SSJ4Co5-s8jfGCJVoPPF74PYrxg8FLfNzVgd8Qpho,4182 +torch/include/ATen/ops/replication_pad2d_backward.h,sha256=eMFa6-htInS6xdgFvthcDlkqQkhTyU0xdVllVjpg3H0,5345 +torch/include/ATen/ops/replication_pad2d_backward_cpu_dispatch.h,sha256=pMkRopxXrFVDzY2k5t13uvUZfZmb61KgdZiypMrLvHk,1865 +torch/include/ATen/ops/replication_pad2d_backward_cuda_dispatch.h,sha256=Ro8fxz3Kjpto5hkY9KTa4KXN5l9rx-ZZ3rupR11ivmY,1867 +torch/include/ATen/ops/replication_pad2d_backward_native.h,sha256=78qaewhRA62UU6_r_UnovcXOCdnkYMmXuRqj5Wrk06s,1280 +torch/include/ATen/ops/replication_pad2d_backward_ops.h,sha256=QvaIkBT1o1G1qu_uGU6Zc84aMIKr18yBsH9C01aNc9A,2367 +torch/include/ATen/ops/replication_pad2d_compositeexplicitautogradnonfunctional_dispatch.h,sha256=6ZGMXo1s7QCVxgCqQlNgPsEMYZeoTl_cWSyQkyIJsyA,1181 +torch/include/ATen/ops/replication_pad2d_cpu_dispatch.h,sha256=IOb1LrLtTR9xpkLblAJwymYRIOCJFF7cUrdupn9gZgQ,1591 +torch/include/ATen/ops/replication_pad2d_cuda_dispatch.h,sha256=nIOrAOck57QzDRYox84FLcJR0p_iPWMpQ2meGQiCOBw,1593 +torch/include/ATen/ops/replication_pad2d_meta.h,sha256=HXnrb9UY0UTBQVM4dIZH4WBD9EHOUdA7XLLMv2gmUz8,863 +torch/include/ATen/ops/replication_pad2d_meta_dispatch.h,sha256=LYKHPDh8ZTHI4a3LdcGn9AS6D-l9_TsHPdmQue-78pA,1593 +torch/include/ATen/ops/replication_pad2d_native.h,sha256=D_tAYx7prU2vov8QqKdzkovxZpanVNUF-OcWCQdX4BU,1117 +torch/include/ATen/ops/replication_pad2d_ops.h,sha256=-HeNAHmbzIaGMe850EvzYTHE4T8gy0KuW94c9Rd8pKI,2063 +torch/include/ATen/ops/replication_pad3d.h,sha256=9Myy1sd0Ss5uhCbMRyYzEboEiWhcmzNgDD4LT-mBM1I,4182 +torch/include/ATen/ops/replication_pad3d_backward.h,sha256=QL0tSpeBNIdIuF6Y0fa_lASmmsjsYnhKRV0PVnCUZKE,5345 +torch/include/ATen/ops/replication_pad3d_backward_cpu_dispatch.h,sha256=kESHBTy6QmdNspXp9gXz-dvtbCyCpDqCQjVjwTOE_Xc,1865 +torch/include/ATen/ops/replication_pad3d_backward_cuda_dispatch.h,sha256=pdMrLi4PG-uwoMf1l_amc-48jemiPTj81SOn8drlkrw,1867 +torch/include/ATen/ops/replication_pad3d_backward_native.h,sha256=g3VedJAwiddBH0gzEruWx6t9U0-Fb7LAxzSM_0Www2k,1280 +torch/include/ATen/ops/replication_pad3d_backward_ops.h,sha256=soIB8cO5lGaJ40ZgK_IznBlyNUordqRoDUgUu3PCjBQ,2367 +torch/include/ATen/ops/replication_pad3d_compositeexplicitautogradnonfunctional_dispatch.h,sha256=KTBVCkRZRdU716CPOZDlrkihHntPQSZZ-VOQs2qx_Bc,1181 +torch/include/ATen/ops/replication_pad3d_cpu_dispatch.h,sha256=VOAZ6H-eFE5cnkYAkoth8OCBB_on_W2f20DK_6IKECs,1591 +torch/include/ATen/ops/replication_pad3d_cuda_dispatch.h,sha256=0Lid9SfKQrp3v-t1yE8fZ_W8eVo_URlCezWPKJOVdoY,1593 +torch/include/ATen/ops/replication_pad3d_meta.h,sha256=DrvZTdrbcwjLdghvk91yc4GKbYVTu5QJaj_WAgy4F-0,863 +torch/include/ATen/ops/replication_pad3d_meta_dispatch.h,sha256=jZ3CXGKCFnjCeDJDjW4kpYcSxJMmUZ-nO-rohuvsbTA,1593 +torch/include/ATen/ops/replication_pad3d_native.h,sha256=iNTK6Kb9ieuCPauTpy2XL3wrX8jqC3nwdM8qZRn6pmk,1117 +torch/include/ATen/ops/replication_pad3d_ops.h,sha256=h2IX1Stq3tUdVJVlDmy2Ohv70EtHIuPPZiXAwwIdFpI,2063 +torch/include/ATen/ops/requires_grad.h,sha256=iFzT1FldNNBKBzludNNejfGosc0lzv9YwmIzn9kp2y0,764 +torch/include/ATen/ops/requires_grad_compositeimplicitautograd_dispatch.h,sha256=qpBzni24u10t6eWB8pr6BiXwnVSH3VkhLCBpMF5xkH8,1047 +torch/include/ATen/ops/requires_grad_native.h,sha256=61peM-jUV1s8fnwW5-dexOp26T3pzTrqdYTOblB8cw0,759 +torch/include/ATen/ops/requires_grad_ops.h,sha256=RpnooLnkLyku83_od4jMsoeqb4f_0cBPkrBfvJkbas4,1302 +torch/include/ATen/ops/reshape.h,sha256=BFPfub9tIH_UvNfI2Xa9M7vSnIKis5aOSYGagW-i07Y,1660 +torch/include/ATen/ops/reshape_as.h,sha256=DyGu6KKfYZvSfk7pTmKSKCb_2Nzf1wsYU4STx56gnRk,761 +torch/include/ATen/ops/reshape_as_compositeimplicitautograd_dispatch.h,sha256=j60g1mY6selAp2GEywCligywln4mX81FSS-rOorA59A,1048 +torch/include/ATen/ops/reshape_as_compositeimplicitautogradnestedtensor_dispatch.h,sha256=HVZk13u_G59WiO8A6VQHYtfNSWGUQRy8bJOb_DYyS9k,1072 +torch/include/ATen/ops/reshape_as_native.h,sha256=-2G3gv7vc5iWNGpXsoSL6ji-hLvMgXsyL6PxxJeHdVA,851 +torch/include/ATen/ops/reshape_as_ops.h,sha256=jN_y295lfb9P4x_FqYcPRMFpYjpESJ4xOESDhluvkpU,1315 +torch/include/ATen/ops/reshape_compositeimplicitautograd_dispatch.h,sha256=o3mwg7Q83CjaBB5j5GstvmonxCr4fOR8Jiz2r5iahF8,1131 +torch/include/ATen/ops/reshape_compositeimplicitautogradnestedtensor_dispatch.h,sha256=DTOxteltG44ExFj1M14Fhg0PkqzSOKlwIvNET474ba8,1155 +torch/include/ATen/ops/reshape_native.h,sha256=uvmBO9ee0wTP5egkqawAgEiiIYpc9Kbdve6I4IWoFP8,861 +torch/include/ATen/ops/reshape_ops.h,sha256=wwnp5E3vhULEg872z7mVOcbvAd3Al4YBztROjdUIREg,1311 +torch/include/ATen/ops/resize.h,sha256=IYWBHzf7PLdQ_wCeEIPuCH5PwLYnJNLkmA8N88TARQ0,5597 +torch/include/ATen/ops/resize_as.h,sha256=xamaWvIy-wwV1DZdmPECPFyezAN6lA81U8XgE_Dn3P8,2213 +torch/include/ATen/ops/resize_as_compositeexplicitautograd_dispatch.h,sha256=3mgsgd8Mtnt9TRAkS_-Ps0GIFYBX8p_k0JxS4TVMIrg,1647 +torch/include/ATen/ops/resize_as_native.h,sha256=sAGg-38LAahm5nCb37WZuMTedvMX0NjCY9LTYHWiOtY,1168 +torch/include/ATen/ops/resize_as_ops.h,sha256=jwl7hsDw3suTcTHvT65bOv-2D3D7SJyekIa1hgSJ_5k,3227 +torch/include/ATen/ops/resize_as_sparse.h,sha256=M18TmIwKH7-oPvmWBcBLdDe4-mP7nbEZZ25IAqmm2BM,1861 +torch/include/ATen/ops/resize_as_sparse_compositeexplicitautograd_dispatch.h,sha256=0wGvXBB0qLc-jaiQMrN0MJKKh38WyYErTsJiNrpgm5w,1328 +torch/include/ATen/ops/resize_as_sparse_meta_dispatch.h,sha256=kmEBxHWIW5pGQSiyH99RxSZWcbnN5vnF1JzqTIzyNFQ,1028 +torch/include/ATen/ops/resize_as_sparse_native.h,sha256=yCAnsL6Ip1bw_54pvNDvALeqxoGsoIndHCFlUxzsLrs,1129 +torch/include/ATen/ops/resize_as_sparse_ops.h,sha256=o2QWVMV_tzrk7reFnpKJJq0Dyh-gsfXeg7wP6Eayw_U,2783 +torch/include/ATen/ops/resize_compositeexplicitautograd_dispatch.h,sha256=wHQiylJRlA3iFcCxep4HlvZnnEc13Lxi3vtrtrbHC1U,1953 +torch/include/ATen/ops/resize_cpu_dispatch.h,sha256=H1lLuHJ9Axfc2vaT1LwLn5_0ouV3D_ff1IqMwBSXF34,1229 +torch/include/ATen/ops/resize_cuda_dispatch.h,sha256=MaC2QglQnPogkHx2fkeSYD2LeMCT7o1Mm_OZICes6cM,1231 +torch/include/ATen/ops/resize_meta_dispatch.h,sha256=nPcAMuZrV8bxIwPtyEN8lnS2kF1msjAEd9suelYjMFI,1231 +torch/include/ATen/ops/resize_native.h,sha256=oppUtU3hm5OC9gCoiCMgpDR4NEJxwq4kR8xCHODdar4,1785 +torch/include/ATen/ops/resize_ops.h,sha256=DFHPGOw2Md-c1xWrfdPMIcIfRq6osG0kfyoEyGHrBIw,3143 +torch/include/ATen/ops/resolve_conj.h,sha256=pZtPlWnWRIbY8W-7LCBdfLbe_sTs-Bo8KsKyjp2_uKc,921 +torch/include/ATen/ops/resolve_conj_compositeimplicitautograd_dispatch.h,sha256=MMWJp6bkyNCnSl8beG7msh9bueBVklGsW3s8fIkXQFw,1024 +torch/include/ATen/ops/resolve_conj_native.h,sha256=scu8vXMMNhYOyHvKRB5HK2oowzOOh2SoS71jCo7AtCw,736 +torch/include/ATen/ops/resolve_conj_ops.h,sha256=WNfXTJeGcOYue_QDzUz5EZaps7ed5O08SzR1wVWm67w,1235 +torch/include/ATen/ops/resolve_neg.h,sha256=9UrAcYJ5Aqk-N3a_pRN0GDU_8fyATM1LyWT7IM_dDyo,917 +torch/include/ATen/ops/resolve_neg_compositeimplicitautograd_dispatch.h,sha256=vMcqr1afLV42uFe_dT1SX1BVLdd3yA7I7Hsq9QPVkHE,1023 +torch/include/ATen/ops/resolve_neg_native.h,sha256=tyQGWZmAnkl8KI7bdKtrol10brhZ_LpAAGg0PN1KKZ0,735 +torch/include/ATen/ops/resolve_neg_ops.h,sha256=p-s6jTrwrCdaHs3CLZX2AqAjAqtrDD_VvDxk30NG18U,1232 +torch/include/ATen/ops/result_type.h,sha256=3in95uv0aS1mYcr59Cwnsr0mhxPshdDR9WqGN57QvMg,1701 +torch/include/ATen/ops/result_type_compositeimplicitautograd_dispatch.h,sha256=vxGsMgAasADhF1SGQlAJDMSZA48UmdFxErNn56u7KWk,1332 +torch/include/ATen/ops/result_type_native.h,sha256=UMIeRIFjJLjuBE4c_f3BJxiZl00lSfadXDxp0ql2BOc,1044 +torch/include/ATen/ops/result_type_ops.h,sha256=WcXMZ86xsqfnLoZp4ndfKEW64AKrop5u3HZh6KqE5CE,3337 +torch/include/ATen/ops/retain_grad.h,sha256=bUNZdCHtNiwc-z-dw5xsHy8G3vPB7JMIo5AOQt4IOBY,762 +torch/include/ATen/ops/retain_grad_compositeimplicitautograd_dispatch.h,sha256=4K4BImGp96Lihs7BA32LkVKIFKfcgQHIdMXmA-5zuNc,1011 +torch/include/ATen/ops/retain_grad_native.h,sha256=96yVKd7RmXZLe7G_b52YchMTiEDCQmknNbAEh7raJ2I,723 +torch/include/ATen/ops/retain_grad_ops.h,sha256=GhFUc4kf8X2UO_5tQxBeeHeh-WoKRBGJrQEWb4ZgLi0,1190 +torch/include/ATen/ops/retains_grad.h,sha256=5BkCy3-WJP2_U_c8cWOEJlUHjCvt9CzJJoMmQSt_fno,763 +torch/include/ATen/ops/retains_grad_compositeimplicitautograd_dispatch.h,sha256=ZRoDPXbg-uJRZMQ6WpvW_DSLLiHe4yk8RJGOFiT8zEE,1018 +torch/include/ATen/ops/retains_grad_native.h,sha256=hb-WUlpilDpbV1YIOEvArLprzHaKglof0WkX9PAo5sw,730 +torch/include/ATen/ops/retains_grad_ops.h,sha256=V_SQL20VIOniAonJ5l-IluUsFw2r23EVy8I90Oh1YG4,1209 +torch/include/ATen/ops/rms_norm.h,sha256=xJQba4oZBg-DWe7WRJ1f4jW_fqgdDGntvmap-BUF8rc,2271 +torch/include/ATen/ops/rms_norm_compositeimplicitautograd_dispatch.h,sha256=b8SYQoMbJd7sAo8mPdTWc7hbJdVCIVv_tMe8NzpxZZY,1339 +torch/include/ATen/ops/rms_norm_native.h,sha256=-JNHx8yW9UgXOio0PInQcoe6kAjdZBuplaySltW1Vn8,869 +torch/include/ATen/ops/rms_norm_ops.h,sha256=7bCTm0b043x4416xi5mI0s5zVYdmtvhStOLskTTS0us,1590 +torch/include/ATen/ops/rnn_relu.h,sha256=QEwxcBWyy6jWgWgwJMM9iRS1af0lcL7QSTKPXjO4IBU,1861 +torch/include/ATen/ops/rnn_relu_cell.h,sha256=m2yH1O2fDnqCVtf0mIUt47I1ymuvvu07MCulmFZewec,1188 +torch/include/ATen/ops/rnn_relu_cell_compositeimplicitautograd_dispatch.h,sha256=HinWxB7fWsAmQ9q2ydL9LDUmIefTXlBWbsOYuSehX-Y,1189 +torch/include/ATen/ops/rnn_relu_cell_native.h,sha256=9tzEeeaTW5EdDefnrthG6D6dq2xlmusSo0dNNZ1yLUM,901 +torch/include/ATen/ops/rnn_relu_cell_ops.h,sha256=1pR-1h8NaRY99OV9wYFTEGMGkUoydlr-oxt0h03Wykc,1758 +torch/include/ATen/ops/rnn_relu_compositeimplicitautograd_dispatch.h,sha256=TQrk-NR5CG-FU-SNlYZ0r0epL0VC4ZB-X7ZX8MPWiM8,1439 +torch/include/ATen/ops/rnn_relu_native.h,sha256=O6OcVbUzxbAEgY0PcmNcG1F5mRab6C-dM6H45eI5R2c,1151 +torch/include/ATen/ops/rnn_relu_ops.h,sha256=Wj3AbagwQNpv344CwEUp95syFEldV00LaPi7gPemGCI,2973 +torch/include/ATen/ops/rnn_tanh.h,sha256=GQnk-5thc9RdtoST57kLlV3o5HYZVJ_xon0mrNN0Fm0,1861 +torch/include/ATen/ops/rnn_tanh_cell.h,sha256=DoD4LDfI5C95r33lHQ36YSDEbqcOel0mNacaYJtQB28,1188 +torch/include/ATen/ops/rnn_tanh_cell_compositeimplicitautograd_dispatch.h,sha256=Mu9nq6TFukphH6uQMph1-cKgTGpc7qJFDLrKMa5Uzgs,1189 +torch/include/ATen/ops/rnn_tanh_cell_native.h,sha256=mKZ2mwWX8-6DVdR_hnIMjPvhsJXmXiKK0BAF3pAY-go,901 +torch/include/ATen/ops/rnn_tanh_cell_ops.h,sha256=L_jDi_0p8Y2CcYg6eUveLWoHUTiJkMsUMqNR2mSJf9o,1758 +torch/include/ATen/ops/rnn_tanh_compositeimplicitautograd_dispatch.h,sha256=S7pqJVofnSkzdoC-pN5B1zElBUMLSQQdnOWN93ZZvww,1439 +torch/include/ATen/ops/rnn_tanh_native.h,sha256=1uWu_uDUskwUF1W9m7M-kQX5qNmTe9eeV2h6Axw8NI0,1151 +torch/include/ATen/ops/rnn_tanh_ops.h,sha256=6eaas8njrf4ooq9cCUqurt8Fpw26fudKnRrwZZawv4E,2973 +torch/include/ATen/ops/roll.h,sha256=Y5QhgZvOxlvx4u9Hi-KPgLmax2qCKt6mO0KlU-U8Vj8,4205 +torch/include/ATen/ops/roll_compositeexplicitautograd_dispatch.h,sha256=lXipB92Mg4riTG1_vXgMb14_tv_js1a3Antu0Aw5G5E,1482 +torch/include/ATen/ops/roll_cpu_dispatch.h,sha256=YVrguTeonBDLSvVixTaSajS-b9eZbsz15908AWn6os4,1133 +torch/include/ATen/ops/roll_cuda_dispatch.h,sha256=EX1-bNw6GhCaeZqibckT2xpbBgwunfowqzeLr_pGb5k,1135 +torch/include/ATen/ops/roll_native.h,sha256=eks9eTtMlvMlpmE_T1gs6wfWm8PyMTUaMrHPoNmSiO8,1016 +torch/include/ATen/ops/roll_ops.h,sha256=vP_G10mPReE77cpEpUE_y6msmHX-xDj9neHSzyh1nOI,2133 +torch/include/ATen/ops/rot90.h,sha256=m_0rYw6u0QxttASHHds_GEjtcGHq7x8Ho0jRFcSlDX8,1494 +torch/include/ATen/ops/rot90_compositeexplicitautograd_dispatch.h,sha256=pz3FgSORR4LO07R0ELZQ3Cv4XYamZttaFkhXA88dF18,1287 +torch/include/ATen/ops/rot90_native.h,sha256=WufEaaZDE7bgw5qnZismipAghFY-zog_2DzCJ3oxO-4,880 +torch/include/ATen/ops/rot90_ops.h,sha256=4gT7zNK_a5qH3WOGo0h6wwKPYfhzB7Ntf6H8l-zSSz8,2033 +torch/include/ATen/ops/round.h,sha256=ghp7jbFWm-Y7wav-ZBZNOq95EgUAiZMpMrp3Hv1y1BI,2311 +torch/include/ATen/ops/round_compositeexplicitautogradnonfunctional_dispatch.h,sha256=Tu4Zl9DIWzGI_ztyt1j2yM6br_KIqqKWX7GSO4i6UJ4,1232 +torch/include/ATen/ops/round_cpu_dispatch.h,sha256=tMkOcMxju_dDaFdbJW1EWXR11auZHTaeCkvuceCtnfs,1508 +torch/include/ATen/ops/round_cuda_dispatch.h,sha256=0pzUNDYaNiL_w6o3MddOMqmo1onwXwdkD765bFSmANA,1510 +torch/include/ATen/ops/round_meta.h,sha256=T5eY_el-mxFZ8Vn2ZtO7IUiZb_NzjrEM6cOSOSGuh9A,956 +torch/include/ATen/ops/round_meta_dispatch.h,sha256=otEmONNKe41ZrBz-Dz8bwzYtjAbljw0unDWxrYODoIY,1510 +torch/include/ATen/ops/round_native.h,sha256=kjQSMNYB90LPkt8ArmPqpV5Q68Zpy9bM6D96HFQgNTM,1436 +torch/include/ATen/ops/round_ops.h,sha256=b6Izjd81rSRPBzJgJDv9QSS0LXegndLwDe_vDCJ8Ce0,4133 +torch/include/ATen/ops/row_indices.h,sha256=o9nZn0NvcMqpha-mVkSSFQdCjYSYEO1C-I0xwqiz02U,762 +torch/include/ATen/ops/row_indices_compositeexplicitautograd_dispatch.h,sha256=mtV3jVdtuO9axQOfyeLiy3Au9QIe_jl1iimzHp7JaF8,1023 +torch/include/ATen/ops/row_indices_copy.h,sha256=tb2QHVhgwWbze6HsImcA58qUsxFIkCrkq_ln3ucOtZw,1381 +torch/include/ATen/ops/row_indices_copy_compositeexplicitautograd_dispatch.h,sha256=-Ew0ig5VhEkc_yYjQ7s8TgYd-54Uh_iZZHSCAqYskQw,1141 +torch/include/ATen/ops/row_indices_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=veNw2jtcIlGpDwoX29vr_pW107ChnThpQPe0gzDrjTY,1054 +torch/include/ATen/ops/row_indices_copy_native.h,sha256=fEdIiytcms4CWzKthLPmKbUi_etE0CrpyRrOwm5I-gg,828 +torch/include/ATen/ops/row_indices_copy_ops.h,sha256=1xb1uDlmJyZ_CV9eeg_THDuh4IZ_96Roe-wJmjMWIEs,1861 +torch/include/ATen/ops/row_indices_native.h,sha256=R8dRIhV-lr2seMEWjXNZynBxTGkDm-ZakAy4eN8LPM4,813 +torch/include/ATen/ops/row_indices_ops.h,sha256=iQHlckPo28PSy1Ly4nI3MrCAQL4WBXsiJLNYylN0IC0,1232 +torch/include/ATen/ops/row_stack.h,sha256=kahBlM4-q49wxRz99mVKn2LbDm-q-aGrP_q1isDOxSw,1332 +torch/include/ATen/ops/row_stack_compositeimplicitautograd_dispatch.h,sha256=D72AykzujZss5C2Ufhj5pWUzXuPAdYO0BlWGmO8gpS4,1181 +torch/include/ATen/ops/row_stack_native.h,sha256=dSsMLMxRIbmvVeX33oFT7Ibu1OVEXW4fK3-evmrZg1Q,812 +torch/include/ATen/ops/row_stack_ops.h,sha256=1VxWuN0TRse0lG3olG1jxstxOesdKqeb6q6ulEKx9N4,1817 +torch/include/ATen/ops/rrelu.h,sha256=bmqBOt7onCiqT-jJMOlDRaGZSLwmUw5eOjvkGVmS3Q8,1608 +torch/include/ATen/ops/rrelu_compositeimplicitautograd_dispatch.h,sha256=OMGTnlclDSiT25pyd63aS7dCaIqDZ7crdnFEQhkaPBk,1377 +torch/include/ATen/ops/rrelu_native.h,sha256=xDrAzGdJGd2BMx5qgZMaBDNYj-6VF1N9qHV7_wrX-_c,1089 +torch/include/ATen/ops/rrelu_ops.h,sha256=Q7PmJDYM-ZAnNZ61T_Ye5tGbBDovGW7D1MiYLBU611k,2498 +torch/include/ATen/ops/rrelu_with_noise.h,sha256=K3n5q1eXTQniw0MA3h6yIpmZNEkejKDznV6Q-oe2llU,3432 +torch/include/ATen/ops/rrelu_with_noise_backward.h,sha256=aSKgzR4QSAj9arm4aevxRGeUZ9BidID3G5Bqtjg2uS4,2383 +torch/include/ATen/ops/rrelu_with_noise_backward_compositeexplicitautograd_dispatch.h,sha256=wl4evcR0LIk12O4OdsoKJrT6LKg10lBZU6rN09vQmG4,1670 +torch/include/ATen/ops/rrelu_with_noise_backward_native.h,sha256=cwl7MgEcztpDjf3BfD5meAwXSfTkL-KyDTIVrhpEyXY,1138 +torch/include/ATen/ops/rrelu_with_noise_backward_ops.h,sha256=pGlPN34EfFSjtDK5pQQjABz7M2FI0xWUw6bAHSqD7eY,2879 +torch/include/ATen/ops/rrelu_with_noise_compositeexplicitautograd_dispatch.h,sha256=ZAoQgJua52TFwVXkkJ3ftELM30NRSFAGNxi-V_4WTaI,1245 +torch/include/ATen/ops/rrelu_with_noise_cpu_dispatch.h,sha256=GRwXfGnQTHJwQ79aj2bAm-mk58eCMZSFMKwxvVqUfBk,1876 +torch/include/ATen/ops/rrelu_with_noise_cuda_dispatch.h,sha256=ptBOwhoYw24F0GvgPVtLoqeHj80CZG2LUKHAEot40yY,1878 +torch/include/ATen/ops/rrelu_with_noise_meta_dispatch.h,sha256=zc8JPzRWVS1JkKjyFHBoJqwvFGtlzweiH7GmtM7m4mo,1158 +torch/include/ATen/ops/rrelu_with_noise_native.h,sha256=YHn8WQ_ZZysGw9Zq9pyjm_KBN-y4HjDx6roxUpg7UGU,2368 +torch/include/ATen/ops/rrelu_with_noise_ops.h,sha256=2jng3KR15CsuF46_jRONyE5BesNXudh6I23W_kum2Uo,4938 +torch/include/ATen/ops/rshift.h,sha256=qgsM7uK6gUvmCleprWnI_BrGeobjfViMBTqdKDFF7mM,2244 +torch/include/ATen/ops/rshift_compositeexplicitautograd_dispatch.h,sha256=0pTXVKXMTK-sFdHkvh1V7jlM3BKh39AgLwispQMN_ZU,1398 +torch/include/ATen/ops/rshift_cpu_dispatch.h,sha256=KNyNENoUSFPfXprgo2mgwU6RS71LMaTsCOvGk2cLwls,1250 +torch/include/ATen/ops/rshift_cuda_dispatch.h,sha256=zYQm2xOyZ1eE9HwhPbVsJ54Y-3lbFw3SiuuGR7tvzJw,1252 +torch/include/ATen/ops/rshift_meta_dispatch.h,sha256=hq5LEIdT8yPOTEGq7bu5xVZO17GO-PF2JAT2B1zqkIM,1084 +torch/include/ATen/ops/rshift_native.h,sha256=0hBLz_e1qVx8YYuZ3c9tO9Ey3laBDZYIvmbgAaQ1UD8,1236 +torch/include/ATen/ops/rshift_ops.h,sha256=p-dePtjLTXw3-ioSq1NbQp42nT9LL_vZ2e8JSxHtpEk,4599 +torch/include/ATen/ops/rsqrt.h,sha256=OQFow5aN1yF6srkgYkDSWWpGEVcI7-uxi268AFIILRU,1410 +torch/include/ATen/ops/rsqrt_compositeexplicitautogradnonfunctional_dispatch.h,sha256=UiHL4fE5ezjXaTuOAWDxAqw-x4srIQ6ppdr_2X00D-8,1093 +torch/include/ATen/ops/rsqrt_cpu_dispatch.h,sha256=F6Zx-gU1GmJ-2as9JNgN1RUPyIs9BE0Yor_3miY0xjw,1178 +torch/include/ATen/ops/rsqrt_cuda_dispatch.h,sha256=2Na13kIC_KOGHPLtBxKL0cxSBRDgsxmf0i2nNcCEWa0,1180 +torch/include/ATen/ops/rsqrt_meta.h,sha256=msSUjsSMNzMEfZH_GKynmUNPEEHMY0nFBBhQ527sZZ0,820 +torch/include/ATen/ops/rsqrt_meta_dispatch.h,sha256=MiXXXnAS36rqNIoO4Lt51_gpDfawZWGjnSt-my6Qh64,1180 +torch/include/ATen/ops/rsqrt_native.h,sha256=4UOMKgClGpukdqxafE-JeBz3wa03BdgkuDlI01n7_aQ,847 +torch/include/ATen/ops/rsqrt_ops.h,sha256=_rdRzTuj4kE9WygHNeDX7LRr5KJb4_dYnURaGssfxJs,2291 +torch/include/ATen/ops/rsub.h,sha256=IbYZi_ubsf6FH1i804LEOOKmt7yvcZOnKwoJZcBKLY8,2439 +torch/include/ATen/ops/rsub_compositeexplicitautograd_dispatch.h,sha256=kVIxMNqzlUNAkV1X-2n6WW_aInOB7KVgbiOLiPPcIUg,1588 +torch/include/ATen/ops/rsub_cpu_dispatch.h,sha256=WQp_YNNrsLUY_2mNrfy2V8eoFvAV18AQ2nJztOUOiAk,1026 +torch/include/ATen/ops/rsub_cuda_dispatch.h,sha256=ag2judvZL_iuuzMcxenZF8pCg6g8KkuB3Mf50ZcYKso,1028 +torch/include/ATen/ops/rsub_native.h,sha256=vaigEO2IFHNl9du9eE1g7CSgkVcwLz_bT9JT5-ddKW0,1158 +torch/include/ATen/ops/rsub_ops.h,sha256=1hjUvdhgmehU8O8mqYV_vwYJyz8PXqcfDPma4RpLzPw,3648 +torch/include/ATen/ops/scalar_tensor.h,sha256=OG5uP7JLZye0yZIpHiPKqXNQNxwhyrc-njGV_SebmsY,1988 +torch/include/ATen/ops/scalar_tensor_compositeexplicitautograd_dispatch.h,sha256=NEEwV6P3W7QDmCDNEcV3Pu1eEa_0GcQS-oS8GD6MQwA,1420 +torch/include/ATen/ops/scalar_tensor_native.h,sha256=8Vb3HPzGeMNycXG3KovDQg2ZNheVixBR0l5Ivq79kDA,973 +torch/include/ATen/ops/scalar_tensor_ops.h,sha256=6-fhFAPbBk_VMVGcIgSx0aGSfdRbMmVDpRnkVCEhK_s,2321 +torch/include/ATen/ops/scaled_dot_product_attention.h,sha256=waNWxgRDuKZlPXiraeJqlUSVWNR4CE6HPiLy3pWp8fM,1397 +torch/include/ATen/ops/scaled_dot_product_attention_compositeimplicitautograd_dispatch.h,sha256=m1QUiPPEAAuJ8fJa4G74wRM96nRJtHGQXqjElJVLJdM,1254 +torch/include/ATen/ops/scaled_dot_product_attention_native.h,sha256=-L6xIvtJGKSTlfbQ-_NCkxKS75urLu77cXNyqwQLco0,966 +torch/include/ATen/ops/scaled_dot_product_attention_ops.h,sha256=ufGybKU04q7S5f4s0RswWHnt-ii3Hw0iCkgx2iiwYLY,1898 +torch/include/ATen/ops/scatter.h,sha256=sdzIICo2_j-JGIKGGeTpYdLkqf39kLyb9HkIbM6Amu8,5345 +torch/include/ATen/ops/scatter_add.h,sha256=dSZMGL9-hg9SDbmM4xs7eJzGBgNyh_0q3WXdsbi6tKs,1965 +torch/include/ATen/ops/scatter_add_compositeexplicitautogradnonfunctional_dispatch.h,sha256=5QyA_y1ln2sUIYJSdEbZQdI4tg-E5fFYgBfzr0knB28,1231 +torch/include/ATen/ops/scatter_add_compositeimplicitautograd_dispatch.h,sha256=pBJk34oXQO0dzY7T9W51br_nCMVcXaZQS1_XvXixaTo,1090 +torch/include/ATen/ops/scatter_add_cpu_dispatch.h,sha256=X7irNUJK6RBdC206W5o-pB9E1PsNR36xBmjLdFi0z7E,1454 +torch/include/ATen/ops/scatter_add_cuda_dispatch.h,sha256=aQScy9LFhdAPcrOjjv1FEPhhF1qCdCKxgI4mSyhOFRs,1456 +torch/include/ATen/ops/scatter_add_meta.h,sha256=cr-h3LflBxtjom5ugQ-SrVsgEliCdDGN2CsULqLz_jk,889 +torch/include/ATen/ops/scatter_add_meta_dispatch.h,sha256=KIASOmQRROY77Asek8YviiEP_t7zLQLg5Or9Gu8VS-g,1456 +torch/include/ATen/ops/scatter_add_native.h,sha256=tPTsOea8SUAqp_edIoIxsNT4BdkPIwp51FN1bZuulno,1050 +torch/include/ATen/ops/scatter_add_ops.h,sha256=FWJbuhcaW5Jqn4a1d2UN2XVbMnFiNXKhNDd2grO1IZE,3739 +torch/include/ATen/ops/scatter_compositeexplicitautogradnonfunctional_dispatch.h,sha256=guN5dRoEwYDMXLAfNzG3S9PfLjlpcDHEqMaw9qrLyP4,2030 +torch/include/ATen/ops/scatter_compositeimplicitautograd_dispatch.h,sha256=EDVn0F0AKgz1zhn7bsabLu3KqytEkKk3hRWqBKHeQrU,1210 +torch/include/ATen/ops/scatter_cpu_dispatch.h,sha256=Y-XCrhhA6_ylmW20J6kXU8_jWV_fifxLx_XQll68s4Y,3208 +torch/include/ATen/ops/scatter_cuda_dispatch.h,sha256=ptJgXfz2dRr7KHv4CV4un3x2CFNo1S89uJXbSOA5edw,3210 +torch/include/ATen/ops/scatter_meta.h,sha256=7-4b5p9SohXf3RNiPewk1bzcDZgnNY0UvHKOppOC-08,1491 +torch/include/ATen/ops/scatter_meta_dispatch.h,sha256=3gB9rZ8AXoUMcuVj6NXBcdB9b7lodZz9lcxzC1WnLD8,3210 +torch/include/ATen/ops/scatter_native.h,sha256=I9iSeph4xJWDXrfOPRTR0p1LtK0qeVCV08SucLHmk-Q,1894 +torch/include/ATen/ops/scatter_ops.h,sha256=9IANj8Bb0-cHRHOGIPUa4d1xkDxtaUbQj4XJMtnR2xg,11953 +torch/include/ATen/ops/scatter_reduce.h,sha256=P-qfQKnAe65txT9YYrmLvOgbkCDT7dWOj7OE1g0zg4I,2049 +torch/include/ATen/ops/scatter_reduce_compositeexplicitautogradnonfunctional_dispatch.h,sha256=x01ccrTho4U1MrLcMYKny2QfECBNbVrh7YBVZ-N9vjY,1335 +torch/include/ATen/ops/scatter_reduce_cpu_dispatch.h,sha256=0-cysGg9b3TwwYTCeauwbAXJJWFo9UjUXwKvfE1QnEE,1657 +torch/include/ATen/ops/scatter_reduce_cuda_dispatch.h,sha256=WvvmrBH0tbxbpLvuc1RzhhPH9v-WoQJvuqCDGBHN5wo,1659 +torch/include/ATen/ops/scatter_reduce_meta.h,sha256=LpqD2aXtxtd1J2ixFlFIG-1PKMmBkQNVsJ0Yfb-yBmY,940 +torch/include/ATen/ops/scatter_reduce_meta_dispatch.h,sha256=W5sJQVT7t4x-hAc_iKGwLe7RLW_US5s9JbuBEIEl67E,1659 +torch/include/ATen/ops/scatter_reduce_native.h,sha256=uYOl2oVbcR8-xo84rhrkoENo4xfx9L45iU_zSM0ot3Y,985 +torch/include/ATen/ops/scatter_reduce_ops.h,sha256=1wOgqs-MKtFuuA85TpyGL6_1WVleuqAYk3D3TQS5UAk,3486 +torch/include/ATen/ops/searchsorted.h,sha256=qJGnimAqzADjhFBSgxsRJledjno2u9WN82hbuW-q1BA,3918 +torch/include/ATen/ops/searchsorted_cpu_dispatch.h,sha256=T97oFww58m-OXUlIM7uaI7qv_aoPrR_TYVtUoQoxn-4,2386 +torch/include/ATen/ops/searchsorted_cuda_dispatch.h,sha256=10EBjqxA5a_0kR88yGRiKzIlMrlzu5sMLHB2uAVauD0,2388 +torch/include/ATen/ops/searchsorted_native.h,sha256=6SLQb-IVU4qv0_WLfUZnURCVYjquRgvcaqrq_KsFik8,2592 +torch/include/ATen/ops/searchsorted_ops.h,sha256=3kymaFbHoUBaSBCWySg0X7hv0zfuR6tTSFQ7NTvs968,5055 +torch/include/ATen/ops/segment_reduce.h,sha256=Yfyvw55KNGD1tkizeu4VZfMMfnMenjjcLqWXTZEmetk,2691 +torch/include/ATen/ops/segment_reduce_compositeexplicitautograd_dispatch.h,sha256=3ydRv6-fP1P6jGGFJBwgRedGM5pD0CDqeSMPAmlKt-c,1633 +torch/include/ATen/ops/segment_reduce_cpu_dispatch.h,sha256=13ol0tPxvXoHOpjJGOrv19nWbu8L5iXYWALF1xBx1ZU,1246 +torch/include/ATen/ops/segment_reduce_cuda_dispatch.h,sha256=3DdKpRlDliNNJTSlli0bKf-JXkybxhtQMli4OzMncNU,1248 +torch/include/ATen/ops/segment_reduce_native.h,sha256=yRJSHwAb512BW7hwPCWUuqQTKy6a5q7uEd4bi0JesB8,1327 +torch/include/ATen/ops/segment_reduce_ops.h,sha256=RoJVJZiDCl5woNaVpPzoN96Rc4Hwn30jBDtTSYAu6YU,3404 +torch/include/ATen/ops/select.h,sha256=4NDeO7llMICBO0ErO2swMT1dXwcRypTbdNwMx_VRAVo,1900 +torch/include/ATen/ops/select_backward.h,sha256=cci8wzIzE612qTyx51S-i9iBXmfiIabaGRLzli7-2LQ,5086 +torch/include/ATen/ops/select_backward_compositeexplicitautograd_dispatch.h,sha256=qiRlEyCwlxoiWePtVX8wXWfFofL5xSw9l6R7_XdCNaI,1600 +torch/include/ATen/ops/select_backward_compositeexplicitautogradnonfunctional_dispatch.h,sha256=bo2r3jXA7T0W8xoPFnoExLzQi0Auf5AJA12avIxiQQg,1259 +torch/include/ATen/ops/select_backward_native.h,sha256=r4PKzswJB3QMYVVjnC_4HqNXTKtnZ6_0NVhob5k20Fw,984 +torch/include/ATen/ops/select_backward_ops.h,sha256=cA9rrppl0G2Zt4jzgm4IzR1MDJa0S8Y3sz2qdsl6ggM,2333 +torch/include/ATen/ops/select_compositeexplicitautograd_dispatch.h,sha256=CAriz-Wukhboa005Sfq88-VvfH0tx0t7BAxScrHEVaw,1139 +torch/include/ATen/ops/select_compositeimplicitautograd_dispatch.h,sha256=ryAQThoipuBYg2vOfc-jzJ-mOV-kx6QpdM5qHf5oGew,1050 +torch/include/ATen/ops/select_copy.h,sha256=JyqOVVZm0cavwhKgWZsxh9IO1nNg4VSpJSA115O2IgI,4008 +torch/include/ATen/ops/select_copy_compositeexplicitautograd_dispatch.h,sha256=mWQmENydby4TzvZ1N6Ex5eICLfBd1xlycLDUItAO_94,1432 +torch/include/ATen/ops/select_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=ccRmau6MIaPbC51GEzDV88h0AtX2W9kuXJ2fklK_8Dc,1175 +torch/include/ATen/ops/select_copy_native.h,sha256=mxgkE48Do2VvXPUlbBH2VYd1j5mK5-vSiqKZ5bQGCA8,998 +torch/include/ATen/ops/select_copy_ops.h,sha256=JogO8p6_WduqfmP6xYMNabbVSsd-FXHAqG8uZ5dqIZg,2072 +torch/include/ATen/ops/select_native.h,sha256=GY1e4nDfXUWJ0GXNX-PcFYX8e9WRJNYMmGReG3KMi3Q,1037 +torch/include/ATen/ops/select_ops.h,sha256=M4STX5Y_8_pZYksjzEZWJCvQrPmR3uwLS-18dghBFRw,1976 +torch/include/ATen/ops/select_scatter.h,sha256=MrfI6oY9dVBUpXXU5QQLCje6C1lIcu_5abqT9CEhD-s,4449 +torch/include/ATen/ops/select_scatter_compositeexplicitautograd_dispatch.h,sha256=iTgT4fnr8dLTPKuSoivNDKOmqyLppKjTtoiznQyUu5w,1540 +torch/include/ATen/ops/select_scatter_compositeexplicitautogradnonfunctional_dispatch.h,sha256=LverrgwrzZMwqGJFH8UbKWauyxMaKVjR8BxPZMHjpFQ,1229 +torch/include/ATen/ops/select_scatter_native.h,sha256=T0FhLnC4OBmDaCUv4yk8xpsSJEfDVxfulmDn7VFlAek,950 +torch/include/ATen/ops/select_scatter_ops.h,sha256=s0gb8NqCH54P0wjpuPtmssRNMmaobAoipSbc_RkOknA,2227 +torch/include/ATen/ops/selu.h,sha256=ITghWDoBQ0vNIfM9nNc9_2TOXm0TPiLVjy4mhPPXX-w,1019 +torch/include/ATen/ops/selu_compositeimplicitautograd_dispatch.h,sha256=6gtCF172XP9dT1GnJ1A2D86Qlenm-TKtYwBSHrWWMmI,1065 +torch/include/ATen/ops/selu_native.h,sha256=fpiZZm6VxLKIQKxIlIXjWOJ7IiH3dLN9U47s4SWLmlM,777 +torch/include/ATen/ops/selu_ops.h,sha256=VNhMqvGJzPtkVtZVHjjXUVK_Nwrb4ssYGr5sgOiC0NE,1698 +torch/include/ATen/ops/set.h,sha256=_qV0ht3c1durpm9fSaDU_3S772ue-Kj5Jljt-Rtp1cU,9464 +torch/include/ATen/ops/set_compositeexplicitautograd_dispatch.h,sha256=9yomqD2b979Bo_uFmFxfv8MbRaYIHd70vhPWDgcU5ZQ,2724 +torch/include/ATen/ops/set_compositeimplicitautograd_dispatch.h,sha256=czaR2sRMEhrINebzvDiK50UDESWdtrRuzeCRwzI6pzU,1279 +torch/include/ATen/ops/set_cpu_dispatch.h,sha256=eAwk6b3skUvO9iJNcbeee6W5GwP93tzWg6Sqx3Q31fo,1412 +torch/include/ATen/ops/set_cuda_dispatch.h,sha256=rIXh27UjeR8VY2qym57p1fkdAUr0WHSLF5JE5Wnp29s,1414 +torch/include/ATen/ops/set_data.h,sha256=Zg11Enb8IekJV53Ci3a4iVLEwOkjT88xeRgLVgBdE3c,759 +torch/include/ATen/ops/set_data_compositeimplicitautograd_dispatch.h,sha256=Bwj-q11Y3fou0GuTETplXF4gC-yhcOJGuU6wanVXK8k,1037 +torch/include/ATen/ops/set_data_native.h,sha256=V85wfKgmMB6O5PXded7OW6hFL2Rycko_O71fDfI_X7c,749 +torch/include/ATen/ops/set_data_ops.h,sha256=dGdEs3cjwKAqdqeAf7M_fXJyEd6y-V9O7qHnHg6NV1M,1276 +torch/include/ATen/ops/set_meta_dispatch.h,sha256=RHyyh5XyHYoSOC7cFhrmeLVoI141jHzTZ_kGiNd1UME,1414 +torch/include/ATen/ops/set_native.h,sha256=JLpKJJpwJ59-A4rUtmEfj-1Xz-aC27DJPTiYv25LnZA,2668 +torch/include/ATen/ops/set_ops.h,sha256=Uk30BQHMCfVq2HmYSIY3YF2YZ9P9eHiHzNhOht55F9I,9938 +torch/include/ATen/ops/sgn.h,sha256=kI6oR1iPTFNCY0ytOgSu4dn06C0ikMp_MVhsWSvRBco,1251 +torch/include/ATen/ops/sgn_compositeexplicitautogradnonfunctional_dispatch.h,sha256=1TObnSBX3qT5dUptHoUXXP3VJszaggpyL7kEF06jZtU,1089 +torch/include/ATen/ops/sgn_cpu_dispatch.h,sha256=7tUfCjhN2aSAyvvuK6fimSVAOpjA0Z4hxZumJsEHbgs,1170 +torch/include/ATen/ops/sgn_cuda_dispatch.h,sha256=ZC17B79tEvNFWdp-1dIcBY620WMcYOxde9HPhDn1K3Q,1172 +torch/include/ATen/ops/sgn_meta.h,sha256=3v8kBuKKtLjcuSFRxBoX1GLjbNcDhD_TTKU-wsL4S4E,818 +torch/include/ATen/ops/sgn_meta_dispatch.h,sha256=3fqrjwCr3QJw8-qgTksL3KUsfG-0R_-yyIflCO1FP5M,1172 +torch/include/ATen/ops/sgn_native.h,sha256=eFs7GLEH00cRgnesHp4alyc2I7_4dYNiMyGSsjZCsmg,1368 +torch/include/ATen/ops/sgn_ops.h,sha256=uJ35vi2kPGZHPr7Zijsl3sNMCJzryCCYpc5H9zPfKvk,2273 +torch/include/ATen/ops/sigmoid.h,sha256=SP35S1-8mE6rellGA63DV4rlaaRjvEWcCZY3ZMRQI5w,1436 +torch/include/ATen/ops/sigmoid_backward.h,sha256=YkZuVSkqxLqmvWEqhJeu6XJmb8EnOtx3QRAoETKYofo,1664 +torch/include/ATen/ops/sigmoid_backward_compositeexplicitautogradnonfunctional_dispatch.h,sha256=5URGXYFbUjtr7vBzO6FJs_vxzWcHkcmG0KNNNAAfCjA,1088 +torch/include/ATen/ops/sigmoid_backward_cpu_dispatch.h,sha256=vfip83mtbtU6AGKa7dyh63CNYgQHSO37Upvi2d7xIy8,1277 +torch/include/ATen/ops/sigmoid_backward_cuda_dispatch.h,sha256=mV8F5s0GKYeh0Ec6WQIbBJwFae9Rq6fzWrFjU8xSX58,1279 +torch/include/ATen/ops/sigmoid_backward_meta.h,sha256=vamPqk9RH5Oak3b-df8qn9U_K5piC2fGV8W8IvokxRY,865 +torch/include/ATen/ops/sigmoid_backward_meta_dispatch.h,sha256=y2vfQ1HFlEYyF15M-LHxMIGEd1oDFAJMH56jmRFAR6I,1279 +torch/include/ATen/ops/sigmoid_backward_native.h,sha256=7N1vDAB-dTGTDxvi7FpHZn8_OAP4YrdrW80iPhdrhG4,921 +torch/include/ATen/ops/sigmoid_backward_ops.h,sha256=J7EHByjZEKEeIsR9YInQi38LJJ6UG7i6OfHMqnIsZ4Y,2123 +torch/include/ATen/ops/sigmoid_compositeexplicitautogradnonfunctional_dispatch.h,sha256=ircFvP3RbayrEdzzGJdj4isQC23LAH8uwBXNIwg7jSY,1097 +torch/include/ATen/ops/sigmoid_cpu_dispatch.h,sha256=uaMyqYr9JlH_IfkxrspT8jnJ-OVbGBKq_vzLCvZQW9I,1186 +torch/include/ATen/ops/sigmoid_cuda_dispatch.h,sha256=jbvBcLX-LB7czGp-dsc2hWTsGaKnWHGZ_uEy1sHWBno,1188 +torch/include/ATen/ops/sigmoid_meta.h,sha256=8SIac2c0v2xgH4po4wwEHNsgnWqTfSHHNAuYZidRxjk,822 +torch/include/ATen/ops/sigmoid_meta_dispatch.h,sha256=Kr5wm70cOY81sZIkCFmZo_RjaDDqUkvi0sMpLOK4Qv8,1188 +torch/include/ATen/ops/sigmoid_native.h,sha256=EPPFWLxMsbulfwgzI6f-OlnWA8jSy_bPo8gCvS-XFjs,1043 +torch/include/ATen/ops/sigmoid_ops.h,sha256=YMmoS_8uX_2NoYZJ4v2R_5vrZsOzrCTOKE29waccmDM,2309 +torch/include/ATen/ops/sign.h,sha256=zLFbcn3EpuP4EOceElsn7uBz4ywjCz4EJWk-WYbrNic,1261 +torch/include/ATen/ops/sign_compositeexplicitautogradnonfunctional_dispatch.h,sha256=u5_Tb2wgdJ-C-sV5BFAgNQfUczgODEyXahPQhxBLIYw,1091 +torch/include/ATen/ops/sign_cpu_dispatch.h,sha256=iDAbHMqmYggcQ1KZj_DR-4WkgDqOcJk-jyhnjVVrEws,1174 +torch/include/ATen/ops/sign_cuda_dispatch.h,sha256=06dl16Gr9zFlRtGGYGeWShdymHEGHUtamk6cx-cuCjc,1176 +torch/include/ATen/ops/sign_meta.h,sha256=a30zithYb093NjF5Pz0OHllx4usPxeWKrm4IPSgqWt4,819 +torch/include/ATen/ops/sign_meta_dispatch.h,sha256=qSV8Gel4hdVFhVal3JBLuWkGjTA8mjuRbvUf9CXIQ6E,1176 +torch/include/ATen/ops/sign_native.h,sha256=8tE4gCWZM7qoTbZ-c2krE4yL9a0SM89No3vebyi3F2w,1252 +torch/include/ATen/ops/sign_ops.h,sha256=8ZYl8YDO8ez6jpH538cwcTk4CFdsv2fEpBufQJy_C3s,2282 +torch/include/ATen/ops/signbit.h,sha256=8raUbE9A3BSRJ1i91JumIYD8wnNqKsalZvAJISz8Ewc,1291 +torch/include/ATen/ops/signbit_compositeexplicitautogradnonfunctional_dispatch.h,sha256=dKG0zQYQNc-gO1mp9pQSPaE5pB1GSQWxbW2vHAEvLLk,1045 +torch/include/ATen/ops/signbit_cpu_dispatch.h,sha256=ghacY1-BhVYCzdqth8Pd9Rp2h7IbWhaPlXC4EdwdkQg,1134 +torch/include/ATen/ops/signbit_cuda_dispatch.h,sha256=n-hXRnEcBB4D8ZsmkCR2obOslV5X9XpUDObYx0d8yIY,1136 +torch/include/ATen/ops/signbit_meta.h,sha256=z1DB1eigJJgdsalJngbGiWQ1j5GEQR7rkVCw_VcSKRY,822 +torch/include/ATen/ops/signbit_meta_dispatch.h,sha256=XreuC_tXOtOxF35Kj9p1M_ZxSwkciN3VixF8FEzzePk,1136 +torch/include/ATen/ops/signbit_native.h,sha256=lbVBTjMgal7sDsWmxHsfA2cxfwRyTYmJMJAXqkKdH3I,1157 +torch/include/ATen/ops/signbit_ops.h,sha256=o6yV8bSrInlsFurvNs-4i2l4blVYNKN1I7dIEL2jCUM,1807 +torch/include/ATen/ops/silu.h,sha256=1ucL0i4qRjjU0EcV1Jebc10looOuoj0NtGdeqbbi9X8,1397 +torch/include/ATen/ops/silu_backward.h,sha256=5MjcViFALzdxwZ19Tz0etmOC5C63uakz-vTjB3oPtTg,1616 +torch/include/ATen/ops/silu_backward_compositeexplicitautogradnonfunctional_dispatch.h,sha256=MP0iPaXAmhRYKNEClxJ68u1zihsLs4U3qvfuCMYVTZE,1083 +torch/include/ATen/ops/silu_backward_compositeimplicitautograd_dispatch.h,sha256=uXCIoxGDuqVQRkHtamFdqZ5SASD36cPXTNoR68HwC1c,1057 +torch/include/ATen/ops/silu_backward_cpu_dispatch.h,sha256=hSk2vnrP-7FZnWaN5HwwpVilpHL1GKzAfLVMhP-8Sv8,1262 +torch/include/ATen/ops/silu_backward_cuda_dispatch.h,sha256=WW31UOYV-SvGSDTDRBREnjpSQnuQcR3hN-KE5MOEdqs,1264 +torch/include/ATen/ops/silu_backward_meta.h,sha256=Igtb9j_htA0cAiY78vRKc9504ZWL4rVirWXJkvZ-Lpc,860 +torch/include/ATen/ops/silu_backward_meta_dispatch.h,sha256=yv0qMaKhtyzKfb25pSCwwrCAqQxQzK7GFZ-TrPfxyj8,1264 +torch/include/ATen/ops/silu_backward_native.h,sha256=I2QaNP-pcT7itvu3RHRtmM8vcDbdFfNzsCXKCctyjwM,1108 +torch/include/ATen/ops/silu_backward_ops.h,sha256=pvoDjdylieWb14IdwhPZNFEZBLnkSogPu2IEml82Tns,2093 +torch/include/ATen/ops/silu_compositeexplicitautogradnonfunctional_dispatch.h,sha256=oIErYPa3AcRltGRKOeD957NGfUcPKHUjobCRn83yjYI,1091 +torch/include/ATen/ops/silu_cpu_dispatch.h,sha256=CR0lHgiTUIoIaKbFcBbIZjid8MPVghctLameXKtnNRg,1174 +torch/include/ATen/ops/silu_cuda_dispatch.h,sha256=oDfWNaebBAHaZLZr0trZb1fkKUXo2nSLpGw-_mDzrC0,1176 +torch/include/ATen/ops/silu_meta.h,sha256=MLkU3umju5GEIjiRvxfWyNjdiumdDka8aQq_2dCvDzs,819 +torch/include/ATen/ops/silu_meta_dispatch.h,sha256=53NEmZGzUUAcLKWJU_EYs2LW9xb0y1ua3ZeO2-xZSww,1176 +torch/include/ATen/ops/silu_native.h,sha256=qsvgPSg_Bo0jiIKvkZkMVtkkRfiilz54fscc8Ra6W5Y,971 +torch/include/ATen/ops/silu_ops.h,sha256=Hu17I0HyVv8hwpYXH5goasMa_swSnHwsZBv1OVhu_JU,2282 +torch/include/ATen/ops/sin.h,sha256=VYOnRrwlpzHP6xcD7uUFyMSbZp59nyEZ-1ffZJ96nqc,1384 +torch/include/ATen/ops/sin_compositeexplicitautogradnonfunctional_dispatch.h,sha256=my9QX9Z0GJfSw6Xw7SWHcUTYnrGcMvBE3-rKDnBNYno,1089 +torch/include/ATen/ops/sin_cpu_dispatch.h,sha256=CqBqUhuEbzir-8zZn2ittMKzg_C5ZdYdH3pDVDYsrj8,1170 +torch/include/ATen/ops/sin_cuda_dispatch.h,sha256=QdcgB7HLsRXnhfvj9bldaChoJQGMtV5YV5nkRrdqE0Q,1172 +torch/include/ATen/ops/sin_meta.h,sha256=h2k4PBLyLEaFfNnu4pFC4KvdKjq-b7fRHPnEYjSCaRM,818 +torch/include/ATen/ops/sin_meta_dispatch.h,sha256=bt00eNUqL72JRlh1GjxhnaA84NV7qDqX3NCM6m8nUuk,1172 +torch/include/ATen/ops/sin_native.h,sha256=QDG03Vdp1XpJf6nXO8COvnEm-OJWlMGlwk5ETRzYfjs,1307 +torch/include/ATen/ops/sin_ops.h,sha256=YbcZLqGv3LB_ha9iWdbT1vKvnZQTt3xk4FvvtjPjqDw,2273 +torch/include/ATen/ops/sinc.h,sha256=gH9yZTjoDcWJVNiig2cu2b1Oa601fsFb4LB7SiZXcMs,1397 +torch/include/ATen/ops/sinc_compositeexplicitautogradnonfunctional_dispatch.h,sha256=a0V7eutuY0WYLPqvm3SZumQzzJMG5mq991RYJoi5fnI,1091 +torch/include/ATen/ops/sinc_cpu_dispatch.h,sha256=FqWcZU8S_9w4P_aD4wWNZnvIn-r5TNVfJRg9_uAXyRE,1174 +torch/include/ATen/ops/sinc_cuda_dispatch.h,sha256=Q2G6re58qKB5Jjab2aOlxm-HHqRfpBkWqmgjH9ZnbGg,1176 +torch/include/ATen/ops/sinc_meta.h,sha256=j9PY7loM_Nq7YCm8cBROx73OKduh5rkX4r6jrrdfutY,819 +torch/include/ATen/ops/sinc_meta_dispatch.h,sha256=XcvMLSoKHE_bF6K_6QeIMoI84mNHs8-MGPKw-p413Ag,1176 +torch/include/ATen/ops/sinc_native.h,sha256=O6CyE7AEOqrP5qPLy0zHtvIwxoxMwLtMKDJE0_epAmQ,844 +torch/include/ATen/ops/sinc_ops.h,sha256=cREVeGspVDvP2pEingUp_uKwnAtCJVCn1_2spDvEYz4,2282 +torch/include/ATen/ops/sinh.h,sha256=JaBiBLWfTNW9ymS_YhLn2otw8DZziUkmqFnRrD37we8,1397 +torch/include/ATen/ops/sinh_compositeexplicitautogradnonfunctional_dispatch.h,sha256=F2lmt1N9UdgHiJ9g3CCQL1rvCV7w2hawN3ZijklOaIA,1091 +torch/include/ATen/ops/sinh_cpu_dispatch.h,sha256=Vc8OM0gMxhCOnPLJ_BiScfIoR6bZgWWOddo9DkIbTo0,1174 +torch/include/ATen/ops/sinh_cuda_dispatch.h,sha256=gnXdbzuNB30NiU22rTVMjRcJeY4c68RG63NGtAn0KN0,1176 +torch/include/ATen/ops/sinh_meta.h,sha256=EdjpUvQdtsjsPQb-efPAC14oL8BiOGdw8YcQXhkd0hw,819 +torch/include/ATen/ops/sinh_meta_dispatch.h,sha256=V4YQ_gr9S2v-SuwDe6nuvSP92YVhLz6VztHoV9sanqo,1176 +torch/include/ATen/ops/sinh_native.h,sha256=GQnPzrnjsWmHDq7hh89T3jRaHzawpeDWqcCawXUddA0,1252 +torch/include/ATen/ops/sinh_ops.h,sha256=WlRPU9UJXG4pjuxCY9Ja4Dl5Cu9qC3GOWyryIlhp8KE,2282 +torch/include/ATen/ops/size.h,sha256=VYkVzP-wQGpe1B_40VDtkWRpudg1Jgcs1ZbrJe9_5Wo,1097 +torch/include/ATen/ops/size_compositeimplicitautograd_dispatch.h,sha256=bmRy-OVh4YR3bjBt0z7-Oe0GfDwEaW2SppJoKQTmCj0,1092 +torch/include/ATen/ops/size_native.h,sha256=nm8d1ID3ZrB0ljZVMFV-k5hXlz7DjyE0iVAejedca_o,804 +torch/include/ATen/ops/size_ops.h,sha256=QLx9pZDU7hUG4-XLDrcHsNY9Bb_kTRiJuSt3xXcMYcU,1813 +torch/include/ATen/ops/slice.h,sha256=X3WJmttO7XXf7ua4AaCgRSE8FIl_GMA5ptFR8RLvvPk,2492 +torch/include/ATen/ops/slice_backward.h,sha256=GpdqDAgKSp54FTTBi8HRiuFvGGwSVdv2CnqV7JEoTgE,5709 +torch/include/ATen/ops/slice_backward_compositeexplicitautograd_dispatch.h,sha256=RpGYSUzCKh07LstQtjoGxfxNLyv3C0NkWdGK0sgMScg,2049 +torch/include/ATen/ops/slice_backward_native.h,sha256=KY3r9Z7wjQxxIus--_TT479reZ-aaZS38G1WWZb7dC8,1029 +torch/include/ATen/ops/slice_backward_ops.h,sha256=QbhELvlTKKXG3df5jTKW3XZSezthuX-elMDq4inpOc4,2569 +torch/include/ATen/ops/slice_compositeexplicitautograd_dispatch.h,sha256=8jjPzsvgjt_oHadl1LbNE6vI478sy7PjMCBbK-E8FLg,1335 +torch/include/ATen/ops/slice_copy.h,sha256=nxFp0KSYh9Ka8uzX0UaLnHo1hENaou-4CzJJ1lCDeRc,6325 +torch/include/ATen/ops/slice_copy_compositeexplicitautograd_dispatch.h,sha256=0gYggcdX4SCLlWeTx-GaHWvnz-HaqsnTQVmig8Ix2zg,1756 +torch/include/ATen/ops/slice_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=94wkloCmIt-De3qh4ldU2YG8BhblhwTfM1Xz3aF0wkI,1371 +torch/include/ATen/ops/slice_copy_native.h,sha256=tgvL13FGp9soWzh-Kw9ovvaeb00rjXal309VeJs7tnU,1080 +torch/include/ATen/ops/slice_copy_ops.h,sha256=jXcClfPIo6i1EumEyqFpeD1_CvBE1nbL78bHJ4gZR9c,2562 +torch/include/ATen/ops/slice_inverse.h,sha256=gN3zDtQEohd7f_qVDiS_Q0imhOJYOYmFFRTNKZFuIPE,2678 +torch/include/ATen/ops/slice_inverse_compositeexplicitautograd_dispatch.h,sha256=1psWKg-U8ecGPszm2urUWasfj88GHc5jpwtYjjdQggs,1399 +torch/include/ATen/ops/slice_inverse_native.h,sha256=EpyMQfrnx3hPvj7qnVLdhKOjK5aimsIHZLrAbuBrqGE,903 +torch/include/ATen/ops/slice_inverse_ops.h,sha256=DHAPiBUvL8T5jB16VSVXe8U86CSXqVptykL3X9SjxZ8,1666 +torch/include/ATen/ops/slice_native.h,sha256=qnDEVIbZH9TXgYUH9lnqJwgdnr0F6vgvFQlyTQfBEgY,852 +torch/include/ATen/ops/slice_ops.h,sha256=RAN3IqSjVMNBRRCEqNGfBccOp6CN0bLJXQH24k8UQCI,1582 +torch/include/ATen/ops/slice_scatter.h,sha256=SlpeXRVfbj2xgUVW_9YwvvyTkD-UIBOckl9C5rg0c8o,6712 +torch/include/ATen/ops/slice_scatter_compositeexplicitautograd_dispatch.h,sha256=OvWSqk5oo8H-rj4RgTKLXsN-kflm4FmUOp2c-XKjv74,1864 +torch/include/ATen/ops/slice_scatter_compositeexplicitautogradnonfunctional_dispatch.h,sha256=aUOOtrX4K7KQa4C4b01CEPu_-CIusJMSqO2wHCapDoU,1425 +torch/include/ATen/ops/slice_scatter_native.h,sha256=JSEqPhVSsF1NPe-53VOzh7yXYaXZtitplPd5TZUN42U,1101 +torch/include/ATen/ops/slice_scatter_ops.h,sha256=zW4jt_cZAGF2CQBZvBXnBoPOq-AK9P6kJxxG-yv3S7Q,2699 +torch/include/ATen/ops/slogdet.h,sha256=u9oduL3X6cpCcMxZalrbv2_S0_58oasXE8uxJaCxG0w,1573 +torch/include/ATen/ops/slogdet_compositeimplicitautograd_dispatch.h,sha256=Kb4VUK4gDwVMEoix36rvOEYSyt6dXkuoZ6IfcAYB_Ws,1307 +torch/include/ATen/ops/slogdet_native.h,sha256=7Y9Izwd6biFtIvvxDcXNr2TrkaFRM4fjqtnHxKBgxCU,887 +torch/include/ATen/ops/slogdet_ops.h,sha256=pKpMExaaBcY03iw0BQtx3DOWh8UgQp0HoAFKvJf1an0,2104 +torch/include/ATen/ops/slow_conv3d.h,sha256=OZoNbrkN_gL182n9MyhFFMuv3t9GXx2ZNju9UsdcDG4,6874 +torch/include/ATen/ops/slow_conv3d_compositeimplicitautograd_dispatch.h,sha256=H0Z08mDe2Jkgwn4PnaQ1ie-Z2wciDc6ECK0BvGPfQ40,2435 +torch/include/ATen/ops/slow_conv3d_forward.h,sha256=VrQQ6n4Hq3aCh4ZpgLuQZZNl5MfswzX_tNOFJbTyhxk,7004 +torch/include/ATen/ops/slow_conv3d_forward_cpu_dispatch.h,sha256=gZqnu5dFJXoy4EUBipdZMjMpDGUoVrXTh-8mz5JJ_Lk,2371 +torch/include/ATen/ops/slow_conv3d_forward_native.h,sha256=FNTkZWQwM16huCCTrtDaKmQIn93nEUGG1GKyFMti5rw,1139 +torch/include/ATen/ops/slow_conv3d_forward_ops.h,sha256=U928nbkJMrwniysQqsBIM2gjKbPHv0ipWsk0QJHAr3g,2951 +torch/include/ATen/ops/slow_conv3d_native.h,sha256=fSxIZv3A-zCossM_6m0It9k37avz6ND-1wzLuE2VzcM,1119 +torch/include/ATen/ops/slow_conv3d_ops.h,sha256=Tc10lplvojHfysDv67205tskm9LJVDGiODuEZ0f_ZGs,2903 +torch/include/ATen/ops/slow_conv_dilated2d.h,sha256=2xGzI6_LY_sG5g61-zG03h2dijWv_BmihzFVegVyzos,7934 +torch/include/ATen/ops/slow_conv_dilated2d_compositeexplicitautograd_dispatch.h,sha256=eW0V1iuUNwGhDlO3CJ-vEP81hkWZlWLaGHBDGtVdd8M,2125 +torch/include/ATen/ops/slow_conv_dilated2d_cpu_dispatch.h,sha256=bcu8OP8ZxzG99WtcymLHOMz-BLmG3t3SEZCT85hqJq0,1480 +torch/include/ATen/ops/slow_conv_dilated2d_cuda_dispatch.h,sha256=-fU1Pd3GUbBQTi4Ol1yn5is461DcbYj4ugrSpche0AA,1482 +torch/include/ATen/ops/slow_conv_dilated2d_native.h,sha256=vhFalh5Lb62KV2v5xPOkttPkp9h-MqqOMeTyxL1NdFM,1470 +torch/include/ATen/ops/slow_conv_dilated2d_ops.h,sha256=folH8I1PfOrJbYO_R0tz_q6IsQAWUYOwKcOrA6EyQJo,3157 +torch/include/ATen/ops/slow_conv_dilated3d.h,sha256=vEsBA0Fg_xnOK-illpUiGIZwb2cNUh4fYVhpPEaMvt8,7934 +torch/include/ATen/ops/slow_conv_dilated3d_compositeexplicitautograd_dispatch.h,sha256=kwYOH6GDrl-sc_vqKmdqhTxN5qV7qygO_JvDZCUt2K4,2125 +torch/include/ATen/ops/slow_conv_dilated3d_cpu_dispatch.h,sha256=1bp9ypNUL-Lz0SvZOW6TEaWN7__iEoRVXyu4sK3srZg,1480 +torch/include/ATen/ops/slow_conv_dilated3d_cuda_dispatch.h,sha256=uyv01ofzOANsiQiaQ1rc6vmO56KET_jQ-sLtOlXAMCU,1482 +torch/include/ATen/ops/slow_conv_dilated3d_native.h,sha256=NrkBD1o6Ga4YaYVxz8nOuTN8lbj7ovR3YCfD-cO8S64,1470 +torch/include/ATen/ops/slow_conv_dilated3d_ops.h,sha256=jd4tLqH0kfHRC_6lNtyp2P8dQ_clYhSAD1OjCnwlqPQ,3157 +torch/include/ATen/ops/slow_conv_transpose2d.h,sha256=SVs973WWW6Q-h2bZNlkdUOmEgSn-Fsv8-gHN_fWLaxI,8988 +torch/include/ATen/ops/slow_conv_transpose2d_compositeexplicitautogradnonfunctional_dispatch.h,sha256=J1hOvGYXsLzKzDdnzdoP8YKMeKcn-N6XPDTGVCAsYDw,1639 +torch/include/ATen/ops/slow_conv_transpose2d_cpu_dispatch.h,sha256=K9yn_pb8AyIiSMAsc8BL1HaH9-ykjApc-tYndujko9M,2891 +torch/include/ATen/ops/slow_conv_transpose2d_cuda_dispatch.h,sha256=eVWBLJgSkrSMgEhXPhPxV8pfQO3buuS9gbun4_bt4RY,2893 +torch/include/ATen/ops/slow_conv_transpose2d_meta.h,sha256=iX0YK83sD5p9ellF_a3jB8cJUGmGNsIlmh9puoHznhw,1057 +torch/include/ATen/ops/slow_conv_transpose2d_meta_dispatch.h,sha256=TRonKVL6lXb8gM9sGg4hgkkqJC9lPlhL6MdMq6EMmIw,2893 +torch/include/ATen/ops/slow_conv_transpose2d_native.h,sha256=7rBuN9bebLF8-WCXYJYzx5ftVENwpgA05BrBxCNtlBc,1531 +torch/include/ATen/ops/slow_conv_transpose2d_ops.h,sha256=VIFrXgHwfughWbtaRcsYsLTU2F5j0nOU5CYYjVN1zTs,3411 +torch/include/ATen/ops/slow_conv_transpose3d.h,sha256=RXYwCSccUHOx7McihEqSi2p8uaJbuLWf0LRqpPGhIDI,8988 +torch/include/ATen/ops/slow_conv_transpose3d_cpu_dispatch.h,sha256=Px24CcNxo_HBbsmLK7GQsgfRPmchN2F8oGKjq7-gzhU,2891 +torch/include/ATen/ops/slow_conv_transpose3d_cuda_dispatch.h,sha256=5ynb_SdN9KQjAekTz_nkNiCUuIO0A8W4b_xkw7yXti8,2893 +torch/include/ATen/ops/slow_conv_transpose3d_native.h,sha256=z-T_X56A0kJb-uXuIhqLQcjCzCO0ppUz2Devwgty960,1860 +torch/include/ATen/ops/slow_conv_transpose3d_ops.h,sha256=sZK3QG9km8Cst30-IhMH_yqG4X8M5z02zNlRkQZVD04,3411 +torch/include/ATen/ops/smm.h,sha256=Dui1ezudAT1W44Zs94M6FR8WQSsUywfTHoB-SM12Ngs,923 +torch/include/ATen/ops/smm_compositeimplicitautograd_dispatch.h,sha256=XlRdtT8yCOJSm4CyMIop1P7VgaaO9r1CDwgJRQklqx0,1040 +torch/include/ATen/ops/smm_native.h,sha256=tDrFVit4KTnZYr635CttAd2qWgDT7xmNKTgcJCJRcHU,752 +torch/include/ATen/ops/smm_ops.h,sha256=14swLIWERBM6NAMQwdFomyahG24FM-9Gq8cILWRn6e4,1285 +torch/include/ATen/ops/smooth_l1_loss.h,sha256=JOGdfN3B-1z2e_8zEfZZeKjcUiiPr1b2ZNgSAqpWq-w,1814 +torch/include/ATen/ops/smooth_l1_loss_backward.h,sha256=eufX-PHT1sCRCKTunVX1ue7GPdtg5yx2DLsTulUwQNQ,2094 +torch/include/ATen/ops/smooth_l1_loss_backward_compositeexplicitautograd_dispatch.h,sha256=y9A5ksE8lf08yZymzdncwLCvf7vFh8fyIXH2FRKt2kw,1126 +torch/include/ATen/ops/smooth_l1_loss_backward_cpu_dispatch.h,sha256=a0e_9YvepTOINLcAtsok59lpIBJS-c0Z_XWwbKIPNpc,1307 +torch/include/ATen/ops/smooth_l1_loss_backward_cuda_dispatch.h,sha256=JSOTJUpMwZra6xCRFUJjTONZ4hwXcvTr5HNPliNh2yQ,1309 +torch/include/ATen/ops/smooth_l1_loss_backward_native.h,sha256=r3GY4U4CwQSermAUBn6RaYMmpaGvjpUfwy_31syy_9Y,1031 +torch/include/ATen/ops/smooth_l1_loss_backward_ops.h,sha256=eoLzKkTLqzw9IZdH0xcx5lVzFOPSzF-Dy1JRzl35mnY,2547 +torch/include/ATen/ops/smooth_l1_loss_compositeexplicitautogradnonfunctional_dispatch.h,sha256=-L04JUEMe6wsMHRv241ZJhaXwtaqBIr0Co-r5y8QsnY,1135 +torch/include/ATen/ops/smooth_l1_loss_cpu_dispatch.h,sha256=3c3QzHrOx9JvJJLsYRfqDIHG8i44gob57PvwepgKd1Y,1380 +torch/include/ATen/ops/smooth_l1_loss_cuda_dispatch.h,sha256=yI-Nd_JKwbQlyDZ51YOwKks64pnWxpakipmbuikXr68,1382 +torch/include/ATen/ops/smooth_l1_loss_meta.h,sha256=C6n1qKgEkn6cgUDfPk-_Erz0X3SQ9PcPtCksogfkPnA,888 +torch/include/ATen/ops/smooth_l1_loss_meta_dispatch.h,sha256=K8Q-lz04zW-1-eaKDvPq09NEZ4vnf4rowvJUZRvQWD4,1382 +torch/include/ATen/ops/smooth_l1_loss_native.h,sha256=adYdv1CprSjGEQ1fx48TPw7lqeMefBapxcWkG5rJOqc,933 +torch/include/ATen/ops/smooth_l1_loss_ops.h,sha256=qhrgdXZ9O0BicOx_VB_s3Q7thBMU_6s-0e40tKz5rXk,2261 +torch/include/ATen/ops/soft_margin_loss.h,sha256=CZAe8fC7c_mJnnGzXWvwqbbOmOWpz0p01-t4UUJQ1Kk,1721 +torch/include/ATen/ops/soft_margin_loss_backward.h,sha256=eeA8hZ0h3t54Gxp_VmLAkDDflVSJwl47vYApIF-idEc,2021 +torch/include/ATen/ops/soft_margin_loss_backward_compositeexplicitautograd_dispatch.h,sha256=3OaYNQflmlW96u_ZciQxXY8BXkYwXI3e--1eog6m1bo,1480 +torch/include/ATen/ops/soft_margin_loss_backward_native.h,sha256=SxPOek224M2BJLXoHNSxuPett-ASRlUIXKQ2taczb0k,1009 +torch/include/ATen/ops/soft_margin_loss_backward_ops.h,sha256=hyUZAyh77FP-AFp_8-I0id_zBWcZgZ4YrkvdPUCGhW8,2467 +torch/include/ATen/ops/soft_margin_loss_compositeexplicitautograd_dispatch.h,sha256=Js7yrTmAHxFSFCZxPyuoneQl9P3WJ8fomyCd_vJT86c,1383 +torch/include/ATen/ops/soft_margin_loss_native.h,sha256=iCUdsYRPTNMxsHC75KKEEMqTPIuwssgtzBTVlsWdQo0,940 +torch/include/ATen/ops/soft_margin_loss_ops.h,sha256=mDRg8Vc3Ic01gguVIEqVOX56VjCvY6DxMEz3t87i3-M,2173 +torch/include/ATen/ops/softmax.h,sha256=iNGYNDc8FbuD5VuP2ddBwwiiYBy1Xp0f8verRnkJgX0,1913 +torch/include/ATen/ops/softmax_compositeexplicitautograd_dispatch.h,sha256=46O1w5mWQI4WfjyXW_LaSSslPtX5rSHGqLpCKv-GaiU,1242 +torch/include/ATen/ops/softmax_compositeimplicitautograd_dispatch.h,sha256=CfuMA4IKcrU3-5stoOf43c58a_C5FHYz-cRhLWK_dI8,1212 +torch/include/ATen/ops/softmax_native.h,sha256=eyNTsogd-qWw_ZcAmFUxsI22Yi4ow2-BQ1MnKu-f2eg,1055 +torch/include/ATen/ops/softmax_ops.h,sha256=sRuPE3LIlxD0Owgn50vsqMjP1-LgLRTaSEvq3a0Sm48,2912 +torch/include/ATen/ops/softplus.h,sha256=WQIQXvBbDhRlo4u65s-jYwyECshKvU81Fml1iQiaJEY,1635 +torch/include/ATen/ops/softplus_backward.h,sha256=9As8u9ZqK__KD8_pIVdcex9fQBS1Zi7JqEoVOex6W7k,1965 +torch/include/ATen/ops/softplus_backward_compositeexplicitautogradnonfunctional_dispatch.h,sha256=LQ8WcPOKD4cD44gqWEFcje3oXCIECs4KFxcBTiShShE,1142 +torch/include/ATen/ops/softplus_backward_cpu_dispatch.h,sha256=Zt4pnDVgwBxakHTojjHGKjL4grPdqwffo6IqcklUfhU,1439 +torch/include/ATen/ops/softplus_backward_cuda_dispatch.h,sha256=U9oL4QJOGoGgLIOdyTtHfhsufaYSwZiYuoyVYZa5548,1441 +torch/include/ATen/ops/softplus_backward_meta.h,sha256=6PbJJT2bgTZiBQto4lXwCs_MUwGsJGRqLgH7Z5e-Ef4,919 +torch/include/ATen/ops/softplus_backward_meta_dispatch.h,sha256=ux1k-QqXJKovpHEt6a-BPrwubeHmgw9ed5GBNh1cIbU,1441 +torch/include/ATen/ops/softplus_backward_native.h,sha256=k_o_c8uao-4x1zfiQfuryDAhD905XQa9hpiN7YkpRE4,977 +torch/include/ATen/ops/softplus_backward_ops.h,sha256=Zl7idp0GUkxgm3WMX_xiWX1YTgoO7FFn9xjb_SXbgPI,2479 +torch/include/ATen/ops/softplus_compositeexplicitautogradnonfunctional_dispatch.h,sha256=9mDOyaBcDTyZfiemmw16ypp4H00RgZGGJv1juV98F3k,1106 +torch/include/ATen/ops/softplus_cpu_dispatch.h,sha256=FwPzQNvjcJx-PETQgnAW8Zml0UBv0bh46oyRgD2q6w4,1312 +torch/include/ATen/ops/softplus_cuda_dispatch.h,sha256=Q7fMWJhIUxPDapjCZ3CuNh2nnwkYChGboYY-Xcz4p_4,1314 +torch/include/ATen/ops/softplus_meta.h,sha256=jbv4pH2VEBB6pAPungWbj6b55x-_XMIu2caz8fR1jGE,878 +torch/include/ATen/ops/softplus_meta_dispatch.h,sha256=yivAyKcxg0IEvF9y6JhdhvN17dzUEdVacrzLhThaexs,1314 +torch/include/ATen/ops/softplus_native.h,sha256=xfZVTk3RXxANJJhqrrApwtt9rd1OKkVQIvI6kS786ms,911 +torch/include/ATen/ops/softplus_ops.h,sha256=qMnql2vSo5vo9PFFEokiHdk1ldro-eWTeFMZ3119bIQ,2185 +torch/include/ATen/ops/softshrink.h,sha256=C9bDTHTegZaDVevI-vAfwJ_TLYGBHvIt7i_kRymLeXA,1482 +torch/include/ATen/ops/softshrink_backward.h,sha256=5GRklJt08Migh6qcpLSbNUqoO54fvnkK3remBjvZtUY,1817 +torch/include/ATen/ops/softshrink_backward_compositeexplicitautogradnonfunctional_dispatch.h,sha256=bqsdxPOTcEVD4175ZG5qW9VCt6JC15X-dDcH-Ca8Oog,1115 +torch/include/ATen/ops/softshrink_backward_cpu_dispatch.h,sha256=gi9MA86VSsCuFJFMYi4eiwnAOT_n4xoXKx7Mw8y9Upw,1358 +torch/include/ATen/ops/softshrink_backward_cuda_dispatch.h,sha256=nFUNjr5hu2C5ShxXYseOJrLMCICzVr1SCaoRhUguPLE,1360 +torch/include/ATen/ops/softshrink_backward_meta.h,sha256=8EgIn4GdwK7CVVhBiqDm6NAp8qIfljHPiW-TIdk2MuU,892 +torch/include/ATen/ops/softshrink_backward_meta_dispatch.h,sha256=JrsiIYyR5mHtn8OvF5-qXRMocv6OCrDNi99yj_Jo1GE,1360 +torch/include/ATen/ops/softshrink_backward_native.h,sha256=E4MDvgfsjcwcMibfyxvQNiAvXuvp0FYl31KszEae6v4,954 +torch/include/ATen/ops/softshrink_backward_ops.h,sha256=SFQ7HDNOLe60i3gZneAF6nh74tfqwFPr4jDqOYuNINQ,2301 +torch/include/ATen/ops/softshrink_compositeexplicitautogradnonfunctional_dispatch.h,sha256=iBM_HHMHQiPW4p3oEtXXaPpceftMHk7vjBrkfD46DM0,1078 +torch/include/ATen/ops/softshrink_cpu_dispatch.h,sha256=DoVo-tzk7JlQsifxjhiOkF901xBtikSoibEgoz2KA7w,1229 +torch/include/ATen/ops/softshrink_cuda_dispatch.h,sha256=P9IX9CrgoMv1m0nSYl8ACTyjF8OoRbtE2qYxLBa2k68,1231 +torch/include/ATen/ops/softshrink_meta.h,sha256=AEGQC0SvrnRCD5E_TFvQsWbU3t0tVBDZzkprl-tjReQ,851 +torch/include/ATen/ops/softshrink_meta_dispatch.h,sha256=tnlenm1In7uWQtjMZvbBOd77ur7Xrf10-FR7163Z7VE,1231 +torch/include/ATen/ops/softshrink_native.h,sha256=2pANYqaGxU4zr6TKP6YcbQrcnr7BtC6qUey3_wFiAck,888 +torch/include/ATen/ops/softshrink_ops.h,sha256=91weszDfgIxUG3wn70b48P4FKnVtx54vD8QsCbKPN4U,2005 +torch/include/ATen/ops/sort.h,sha256=ESA8JESHU_BCLflxZ0MtDH7I3yq6IbJqfjkx6uHzd00,5530 +torch/include/ATen/ops/sort_compositeexplicitautograd_dispatch.h,sha256=8Xx7fUNc--WuE4piimGTB331SOZTOR7vGiAvlkajakA,1406 +torch/include/ATen/ops/sort_compositeexplicitautogradnonfunctional_dispatch.h,sha256=ivpaf11vy5Bf1NoFrBeci8DW0H3lsvF6UFzuiIV3Nn4,1136 +torch/include/ATen/ops/sort_compositeimplicitautograd_dispatch.h,sha256=31H-pvXwx19p3b7pxU6B0DC6h9b1O42ja9Injltfyu8,1950 +torch/include/ATen/ops/sort_cpu_dispatch.h,sha256=rF9nyrcKpw0PPWumEMFTqc35NwaWJghNK4-9b4uKXDI,1452 +torch/include/ATen/ops/sort_cuda_dispatch.h,sha256=u9l87r60ejdIphyGWwXgVvoNZyRAEnAfthBq475wOlE,1454 +torch/include/ATen/ops/sort_meta.h,sha256=2Il2d2Mj1wVlJaQzGfcvjzYRO6pI5IvLkMeE8noY6KU,886 +torch/include/ATen/ops/sort_meta_dispatch.h,sha256=d6jio7spm_vOSB4nIvBjN71NXoN1moaLEiLU4vRmAjc,1454 +torch/include/ATen/ops/sort_native.h,sha256=4uWKXRcWDOs0sI36fqS70tAghg2iWU1lcvZvfvFSyg4,2008 +torch/include/ATen/ops/sort_ops.h,sha256=aGbkEvPafv6mwviIEKxWSJ9LSt-s__m4Y3F2QpY0ZgQ,7750 +torch/include/ATen/ops/sparse_bsc_tensor.h,sha256=Fq0Q5dPjRDVWVUvh2JjgvfUOzS9r6NUiUBD4Pq6V40A,3247 +torch/include/ATen/ops/sparse_bsc_tensor_compositeimplicitautograd_dispatch.h,sha256=e8f6GdRY7Oh4PQ-v2Fe7rJuGxmMZz8zZTrRQBv0WnTw,1880 +torch/include/ATen/ops/sparse_bsc_tensor_native.h,sha256=IsYVUPPf-2MDqOP7jrFI7Tmtawr0XV1GykGWtXZChcU,1276 +torch/include/ATen/ops/sparse_bsc_tensor_ops.h,sha256=VfWF4b2sIJRnw_UPjGs0d5QGCA_aNu3RGneTgjOG1mg,3381 +torch/include/ATen/ops/sparse_bsr_tensor.h,sha256=1vPZQdI5qudigZklILkvKGty_PgtvuxMQmpv56cxAhk,3247 +torch/include/ATen/ops/sparse_bsr_tensor_compositeimplicitautograd_dispatch.h,sha256=5fTZhnMAAz60Ih0Lna0iVcZ4QzjB6Gb81YQ-ALy_QTc,1880 +torch/include/ATen/ops/sparse_bsr_tensor_native.h,sha256=EhqWdef8wDUPF-XP9C-Q2Cuybyh89tSTJiGUeUezZmc,1276 +torch/include/ATen/ops/sparse_bsr_tensor_ops.h,sha256=hoM9Bic1cevjUsERjCabCvAAxTHf2JZwU5qnSL_rxQg,3381 +torch/include/ATen/ops/sparse_compressed_tensor.h,sha256=5QTL5V4WctniLTXYBiw-gtQJV8qRgLCYPfF2eez7Z0A,7224 +torch/include/ATen/ops/sparse_compressed_tensor_compositeexplicitautograd_dispatch.h,sha256=48KUixU8BXcDw2mAYtabEbDusE63-09-OBf2SnmEOtw,2472 +torch/include/ATen/ops/sparse_compressed_tensor_native.h,sha256=TEtoaO_V6UoMuNuKW3Qb-bdKdI_4EpEGaauFF8sWGu4,1306 +torch/include/ATen/ops/sparse_compressed_tensor_ops.h,sha256=6vpQ90aBC29ZtTdpBVAzE1mMQmqYyy19tPKGtYZRQWU,3498 +torch/include/ATen/ops/sparse_coo_tensor.h,sha256=cjDkL0aEKrNzzBd_KzXMVlBH3XS2GryDR85LLUNdxrQ,4535 +torch/include/ATen/ops/sparse_coo_tensor_compositeexplicitautograd_dispatch.h,sha256=FlSOVJCBBrWtjtlxhjwWQYbTN5VkmYKjoqYzaChmbHs,1433 +torch/include/ATen/ops/sparse_coo_tensor_compositeimplicitautograd_dispatch.h,sha256=cCCF-yLpuwa-V8dwSilqE_TjvthfAtcC1rwkBmIcH9M,1912 +torch/include/ATen/ops/sparse_coo_tensor_native.h,sha256=UXWH223UfzGtuJVVTOFYPCkWt8eYj9kIKV37jvBsvoQ,1614 +torch/include/ATen/ops/sparse_coo_tensor_ops.h,sha256=XpFMmYyR4qvIVh63VFSf7zVvpCfUe2DZTqlRx9VzMCY,5001 +torch/include/ATen/ops/sparse_csc_tensor.h,sha256=f3_js_8uoVbtDaxRtTzPWSLRzpMgpzjeENPpS_uvUcI,3247 +torch/include/ATen/ops/sparse_csc_tensor_compositeimplicitautograd_dispatch.h,sha256=j6KpXBjMBO4Upp7j9Z3JeAHOEGBnoG_6jvUF7a2_FpI,1880 +torch/include/ATen/ops/sparse_csc_tensor_native.h,sha256=H_0c5twzqVfwswcBVgQJ_NKggrhehFm_FOKkEyucChw,1276 +torch/include/ATen/ops/sparse_csc_tensor_ops.h,sha256=yM2g-NHHkMkebFXxTv43mfZ4HiNGkrW8CXaXRLUyHD8,3381 +torch/include/ATen/ops/sparse_csr_tensor.h,sha256=-Yh3gwqcjTcQVTlvwFafYcrE8GfVrWo3auTSQ2eRujk,3247 +torch/include/ATen/ops/sparse_csr_tensor_compositeimplicitautograd_dispatch.h,sha256=3CxhedXXEzGJF8ZTVxqwfFABmmsHea_h2ej1PqIh8xo,1880 +torch/include/ATen/ops/sparse_csr_tensor_native.h,sha256=P8G6aSqmi6fN-HZypmvazbyQn7_6VJXEDhAiFd3pH2s,1276 +torch/include/ATen/ops/sparse_csr_tensor_ops.h,sha256=ikJq-toeMTKrP0Yk9FVsKYCSSUSST4_TKueeP5FwosU,3381 +torch/include/ATen/ops/sparse_dim.h,sha256=GUvojgxOi9n7IQ8Wi7UkGt6-Vy3q7VZGQ1Gt3UmDM9k,761 +torch/include/ATen/ops/sparse_dim_compositeexplicitautograd_dispatch.h,sha256=iH0LCbBzWZb2tkGAz38GnpTgyWHNynjM5ad804GB8OU,1019 +torch/include/ATen/ops/sparse_dim_native.h,sha256=1Ht7WFWJlQouChzvR-tpHdYwpSrT6mm3SgYHRDLil-4,867 +torch/include/ATen/ops/sparse_dim_ops.h,sha256=gw79EMAX-HUG6Uv6NJqoZlRe8L6fdcc1O8CfF9EbWOY,1211 +torch/include/ATen/ops/sparse_mask.h,sha256=jZaxKGZqNzClx9hM1bkoG2s5RrBdJQhoKxbwYE2YUoQ,1269 +torch/include/ATen/ops/sparse_mask_compositeexplicitautograd_dispatch.h,sha256=55Y4UopDswrn4kWu6-2pASWEj-gumemWVMbGRTn7ekI,1181 +torch/include/ATen/ops/sparse_mask_native.h,sha256=eWPWLddFWPP4iE4hVzAH7UdIsjfN9sn2iPTCmR06Gk8,970 +torch/include/ATen/ops/sparse_mask_ops.h,sha256=Z9MV78AADtPk8-KYNxA7j0uotThmpnSg2VYzfjjpLbg,1997 +torch/include/ATen/ops/sparse_resize.h,sha256=bz1iI69PZNC89k5Ul7BwyLh8LRB1kczqG-9momSDgHI,1774 +torch/include/ATen/ops/sparse_resize_and_clear.h,sha256=f0Vy0hPeSo-NqjQjLoZL9bvwwqQn7BmM7CSKeA8oytw,1874 +torch/include/ATen/ops/sparse_resize_and_clear_compositeexplicitautograd_dispatch.h,sha256=WEMQ-GAMCq6Q1sR0xufvpL6rgD8eV7s9sYlhQvS-pJQ,1433 +torch/include/ATen/ops/sparse_resize_and_clear_meta_dispatch.h,sha256=ikbGTRc-SyOBmlYHFtbGeq8YcBkErfoxVwuVyG1sYks,1063 +torch/include/ATen/ops/sparse_resize_and_clear_native.h,sha256=1mGBXIXhnLk2gFwwT079F1Kjy7WUQQK4XOhwfTBbbXU,1117 +torch/include/ATen/ops/sparse_resize_and_clear_ops.h,sha256=up0xhBcF7J0hiyXoqTw_81mp9rKG2UE0Zh4IwCzi8UI,3125 +torch/include/ATen/ops/sparse_resize_compositeexplicitautograd_dispatch.h,sha256=BuIKFbO0XExqms6fNDLhZEKw2pN6gY6yegkV6awfdRU,1403 +torch/include/ATen/ops/sparse_resize_meta_dispatch.h,sha256=l0OXu6u-LnLweEeVji8E6J0rT6spqX0VqB0q7_NuiTA,1053 +torch/include/ATen/ops/sparse_resize_native.h,sha256=T9U2eEtUQg1oyaezslYuG1gwPyCv7-0PJj4MA-tlYbU,1087 +torch/include/ATen/ops/sparse_resize_ops.h,sha256=brrwab60RKJet_ZWIioSgYtmiGS757zEgesQqBKYioo,3035 +torch/include/ATen/ops/sparse_sampled_addmm.h,sha256=QAR_bQg-IN3V7WiLaAh9spJZjWgkzjD8cU1kDpJ2rz0,1981 +torch/include/ATen/ops/sparse_sampled_addmm_native.h,sha256=OpOTKN_7ZhOm8ZVBPk7nE_THrb-Pip66TGwT0c6maAc,1470 +torch/include/ATen/ops/sparse_sampled_addmm_ops.h,sha256=8W-K5jXUeghvwqy-_fUhaK3qPFEH0EuCIYqPFgmyfsQ,2566 +torch/include/ATen/ops/special_airy_ai.h,sha256=MKkP6VJEU4iFHFjposTGGlKu7LCD8Np59-bskHFFwuI,1344 +torch/include/ATen/ops/special_airy_ai_compositeexplicitautogradnonfunctional_dispatch.h,sha256=-7G3ug6FYHXseEgf8P60d3r4hbqULhdh4fe5kh6lYLE,1050 +torch/include/ATen/ops/special_airy_ai_cpu_dispatch.h,sha256=sa-UrcPW1OkJNcpvsazihoJH0V57xypf-jBAi8SGrGI,1149 +torch/include/ATen/ops/special_airy_ai_cuda_dispatch.h,sha256=TD-g4V8Q8qdcZNo2rh1ehEB3QVA7HgAfNUQA5dpvFrc,1151 +torch/include/ATen/ops/special_airy_ai_meta.h,sha256=sUmRfedCbiCVHeuyAG18AVwK5OggeeGRzIXfkEmROCw,827 +torch/include/ATen/ops/special_airy_ai_meta_dispatch.h,sha256=pJnE5QeYLKSEOyHYHYrQ3AlEhzoO9Om_mICEKB3hqCI,1151 +torch/include/ATen/ops/special_airy_ai_native.h,sha256=AF6HaJucbem1_Ke-ltgZNAL0gmA_e9yEzjxsayHFyMs,874 +torch/include/ATen/ops/special_airy_ai_ops.h,sha256=10MxwI2KYSeBIaeSo0DD0UUu0bsBhls1b_cL_gdeOKg,1837 +torch/include/ATen/ops/special_bessel_j0.h,sha256=cY7uADPldNTI3uLCYE8C9orzXvuRiqfpZxm4K56uv9g,1391 +torch/include/ATen/ops/special_bessel_j0_compositeexplicitautogradnonfunctional_dispatch.h,sha256=HIJDQ_TVxHKQ-4GFnDPkMjR03LtzfXbQ3vZTZEqHD90,1055 +torch/include/ATen/ops/special_bessel_j0_cpu_dispatch.h,sha256=6qL6BLh_BRu1cV_OoG1a8P_651ruCAJj7NEwONhuX_k,1164 +torch/include/ATen/ops/special_bessel_j0_cuda_dispatch.h,sha256=IwGeBMGBpWVHg_lHt_Y6zhKw_3BaH6TQXtKCl8B_hnI,1166 +torch/include/ATen/ops/special_bessel_j0_meta.h,sha256=IbpcQ8vd1PvtJbeGDJAs9_CWYgrkJuunXdhiIXG9LVs,832 +torch/include/ATen/ops/special_bessel_j0_meta_dispatch.h,sha256=rMj_YaFJCeRaNFBG8eE095I_QfZYUicteaMwpNvLJqY,1166 +torch/include/ATen/ops/special_bessel_j0_native.h,sha256=_3lUH5OTltPTBmqaHfoRtgJyz6pcD0Cu1l4WzWW9DiY,883 +torch/include/ATen/ops/special_bessel_j0_ops.h,sha256=yCLyfSfnWVrkjXmm7JfPTjF8eQdusLXUIl_5MsiR01M,1867 +torch/include/ATen/ops/special_bessel_j1.h,sha256=nVrhWo9tZ2LeAQ70ffygC3chiz3W-UXGTMMt_DoL37s,1391 +torch/include/ATen/ops/special_bessel_j1_compositeexplicitautogradnonfunctional_dispatch.h,sha256=7MEMk4haPBys3RRxygKoxsZC8cpAamzNDkROlNjn3MY,1055 +torch/include/ATen/ops/special_bessel_j1_cpu_dispatch.h,sha256=8vQMh612vheyQP3rt9LC3hTFtieNPplBsvKhGEK_wTc,1164 +torch/include/ATen/ops/special_bessel_j1_cuda_dispatch.h,sha256=D6aWFlKew1y9-SbVKnfilVYe2G3bjlifKk1OQl-hTj0,1166 +torch/include/ATen/ops/special_bessel_j1_meta.h,sha256=KvBfYUmDK005GRvpqmvxXURg25y3TFjPsL1O3sOW894,832 +torch/include/ATen/ops/special_bessel_j1_meta_dispatch.h,sha256=w_PCyg1v9J6j4TiNLuGFSUZ51Vai8dIYlRM_jCkBvyQ,1166 +torch/include/ATen/ops/special_bessel_j1_native.h,sha256=siQYFLzHqHaKH2uYCuXPVf1v_pGHYJB_pibnqgR8lPU,883 +torch/include/ATen/ops/special_bessel_j1_ops.h,sha256=crKMbapmMiBb1-qmEoMuYYlJWmxPkRlNwsArYw70Bng,1867 +torch/include/ATen/ops/special_bessel_y0.h,sha256=SmTm_yx9QYAxjtq_4iczvFLGMEGUXI-O0FTgO42pUv8,1391 +torch/include/ATen/ops/special_bessel_y0_compositeexplicitautogradnonfunctional_dispatch.h,sha256=w35AhLsOmXvfkCebPmtHiiGOsUo-IhotKwYA-jxstKA,1055 +torch/include/ATen/ops/special_bessel_y0_cpu_dispatch.h,sha256=ickI7Kqy82X31ISx14wv2g9MP6ZGhmKL5a87Sm8QE18,1164 +torch/include/ATen/ops/special_bessel_y0_cuda_dispatch.h,sha256=q4SgZymb03Pd5ecz20hJO1bTDN5pEg3B3H08B3NzgEc,1166 +torch/include/ATen/ops/special_bessel_y0_meta.h,sha256=BSwyOGNAaXLVDiUv5LHFHTlB734hy1WPDzkwDAFIdyc,832 +torch/include/ATen/ops/special_bessel_y0_meta_dispatch.h,sha256=jqRF-zM8B4RiMIC1ODKcuA7QE4q5YBRLqRG5XEl61po,1166 +torch/include/ATen/ops/special_bessel_y0_native.h,sha256=gBxl6iFgYp6uj1RH5I3xaeYOoJAKoQqz5IIQpK3Egi8,883 +torch/include/ATen/ops/special_bessel_y0_ops.h,sha256=s66Fr0lhZ6CfE-Ka-ROmQ4qsfEKeop00ZEbDnMhcpcI,1867 +torch/include/ATen/ops/special_bessel_y1.h,sha256=0PBbb0eMuooE_M7YaOPuPBpeaAfd8vTQ3jRkZ7TCrJU,1391 +torch/include/ATen/ops/special_bessel_y1_compositeexplicitautogradnonfunctional_dispatch.h,sha256=AoWAHK0WCK7Ns3OcwF61dGjTBZU0xQbCfXn3sBshAVc,1055 +torch/include/ATen/ops/special_bessel_y1_cpu_dispatch.h,sha256=fP8NP8yaL3pO_-NRGNNm02yK5kSURwAwmeOooibzLXY,1164 +torch/include/ATen/ops/special_bessel_y1_cuda_dispatch.h,sha256=EmWRwwYmJISV9rO9JREOFdQpJKeTtLr66-2fn8jWsFw,1166 +torch/include/ATen/ops/special_bessel_y1_meta.h,sha256=RuyvQGHmMXkDaZlSXZIlAukCsFuePn5wL7YQWEeeSYE,832 +torch/include/ATen/ops/special_bessel_y1_meta_dispatch.h,sha256=2NTcNGJODqG0lUbSyyNqYZXtAvF7WjbPhTBMrb56yAg,1166 +torch/include/ATen/ops/special_bessel_y1_native.h,sha256=5xEs4HoS_dDjU-yHR63qKcaUAnd5mH9_HBQ0ZhrHCqI,883 +torch/include/ATen/ops/special_bessel_y1_ops.h,sha256=lDIiNDqfNjlVD24Gzytqzq6ks8RAam0oe2NR9L8Z1Lg,1867 +torch/include/ATen/ops/special_chebyshev_polynomial_t.h,sha256=iJGF4l99S8Urp06GTtce3lwSDZX8Jj18R08VXBWhpE0,3345 +torch/include/ATen/ops/special_chebyshev_polynomial_t_compositeexplicitautograd_dispatch.h,sha256=CMWRtks5CwTapR2nAyka1rrj-5s0-vrtfz4CdM0oABU,1644 +torch/include/ATen/ops/special_chebyshev_polynomial_t_compositeexplicitautogradnonfunctional_dispatch.h,sha256=Bmq0VrGdwio8dZGLdtByZcVDl2GNeSPz61p66vIp2tI,1087 +torch/include/ATen/ops/special_chebyshev_polynomial_t_cpu_dispatch.h,sha256=eo2T020-_H2Ek824jblyj4B57JqQJ_SzCWgz0UGPLiI,1260 +torch/include/ATen/ops/special_chebyshev_polynomial_t_cuda_dispatch.h,sha256=2n-MRqFfvjR4O4_Xor5KzvIszpJrgysdxkSOe3YlkD4,1262 +torch/include/ATen/ops/special_chebyshev_polynomial_t_meta.h,sha256=FPPWmsHFYQgDMM4fWpd-rFwPONlgVKW3uIZKV7WP75E,864 +torch/include/ATen/ops/special_chebyshev_polynomial_t_meta_dispatch.h,sha256=G8CpwZ9WH_CbQEgdNFyw_wmW4WtnlwkKCbfRA1tot7A,1262 +torch/include/ATen/ops/special_chebyshev_polynomial_t_native.h,sha256=kpgpZx6RkIf7cHkZ69SMkygKbb9mKEuMmqPnp_-h1MQ,1377 +torch/include/ATen/ops/special_chebyshev_polynomial_t_ops.h,sha256=spsBX-QUpZCMDuWGP20bprmbWsS5t3gHPcBscxUTR-4,4909 +torch/include/ATen/ops/special_chebyshev_polynomial_u.h,sha256=_LJaTeQhRUBaAoK9pNF7wns8rIitcn49PWqde4vIpdk,3345 +torch/include/ATen/ops/special_chebyshev_polynomial_u_compositeexplicitautograd_dispatch.h,sha256=KOHk9UHSNaQOOR4Ryzb2jixdl1mgICS6I89ekfAHxY0,1644 +torch/include/ATen/ops/special_chebyshev_polynomial_u_compositeexplicitautogradnonfunctional_dispatch.h,sha256=0BDs0Mm1RoqSSZldsN9P5Q7lIzfCDmK4KH7LY7ra8EU,1087 +torch/include/ATen/ops/special_chebyshev_polynomial_u_cpu_dispatch.h,sha256=chx-U_NRh_mloUaOW1qN9D4kXD0HTzYw-kdZzPlPyfM,1260 +torch/include/ATen/ops/special_chebyshev_polynomial_u_cuda_dispatch.h,sha256=0VSdEVxNAdk7HB-A714mozml-qtZ_51myydxTXudWVM,1262 +torch/include/ATen/ops/special_chebyshev_polynomial_u_meta.h,sha256=TGOqS3FKLG4Vif_r_D_w7c_8QtgB8o89zvxo6CPenbw,864 +torch/include/ATen/ops/special_chebyshev_polynomial_u_meta_dispatch.h,sha256=hCecgooNwQgrJp2YfibkeRYH7ING33ybLI1SLB0fOH8,1262 +torch/include/ATen/ops/special_chebyshev_polynomial_u_native.h,sha256=_LwdIr0IWI0KfEQB9wonDevxQbxXr6DRB8VFX_e-u0I,1377 +torch/include/ATen/ops/special_chebyshev_polynomial_u_ops.h,sha256=4DdlYHI2-DjgcE5K7KVvg1hYIxj6zi1IUrt_YaoayI4,4909 +torch/include/ATen/ops/special_chebyshev_polynomial_v.h,sha256=91vb59p9yLOKzhsukhKnkFhRk5Df5rtZL-6OvM6f0tE,3345 +torch/include/ATen/ops/special_chebyshev_polynomial_v_compositeexplicitautograd_dispatch.h,sha256=ttyA0gAEONgzWWs0F1AbImF290mwayU-5ieBoKnC0i0,1644 +torch/include/ATen/ops/special_chebyshev_polynomial_v_compositeexplicitautogradnonfunctional_dispatch.h,sha256=6G6Xa0eZKnfZy2FJNHdB6bpJFI9jC9WABYxTefl-liU,1087 +torch/include/ATen/ops/special_chebyshev_polynomial_v_cpu_dispatch.h,sha256=v2b9fl6B-VQIZVSjpwnZYnoYgvTF_-OL2NoQEtkQDv0,1260 +torch/include/ATen/ops/special_chebyshev_polynomial_v_cuda_dispatch.h,sha256=btPy-fatG8R6ybQEAU2uLerQjFtY8b9nh5LXKZ8IJlE,1262 +torch/include/ATen/ops/special_chebyshev_polynomial_v_meta.h,sha256=oi1pEYpPL_VpaTx0a1JlZh1UBcSn77DhOnEELJ0n5nM,864 +torch/include/ATen/ops/special_chebyshev_polynomial_v_meta_dispatch.h,sha256=h13wIrsCL_pt37YfBwq0jNyhDlNTbYLmR9Godh1vvf4,1262 +torch/include/ATen/ops/special_chebyshev_polynomial_v_native.h,sha256=mWSEAWqIHXOSg7nh-l53Xw8qwUlt5QDHzva4xQPhvCc,1377 +torch/include/ATen/ops/special_chebyshev_polynomial_v_ops.h,sha256=u0CYvF7eELw7eb5ANWnRe_JLacS_3OAOG404OOfUG0A,4909 +torch/include/ATen/ops/special_chebyshev_polynomial_w.h,sha256=vQ7ypfNy-yQhzbrpAGxSWA5-maTLR66RLjlvZ_rOyg0,3345 +torch/include/ATen/ops/special_chebyshev_polynomial_w_compositeexplicitautograd_dispatch.h,sha256=0s1D99p5-PVxVdU3DywLSnQt44wXisrYhCOYd4UaRTE,1644 +torch/include/ATen/ops/special_chebyshev_polynomial_w_compositeexplicitautogradnonfunctional_dispatch.h,sha256=NAzztlUcGLfdfVnN3Tbif9Pqz7EpBTrsJLzsLgzuF5s,1087 +torch/include/ATen/ops/special_chebyshev_polynomial_w_cpu_dispatch.h,sha256=sDHtOKJhoeC4ipgLe51V8YfeWL8bsWa3wrVLuST1uds,1260 +torch/include/ATen/ops/special_chebyshev_polynomial_w_cuda_dispatch.h,sha256=YaYUbG6Bn__zFCVC_1DciuyAcHf4qdkF9M68sPDhyTE,1262 +torch/include/ATen/ops/special_chebyshev_polynomial_w_meta.h,sha256=WO2H2QN4UVuYehuFEbAAt0fck2VV4KMu5smBmLhwW0E,864 +torch/include/ATen/ops/special_chebyshev_polynomial_w_meta_dispatch.h,sha256=fHuWQYnPFPp6P4HZgcbfURgYtIODBLoNKCFEzFF9nbQ,1262 +torch/include/ATen/ops/special_chebyshev_polynomial_w_native.h,sha256=ez7ESxhZfbbvubQmb1UQMdMblupq78iYn4O0_9SJu-M,1377 +torch/include/ATen/ops/special_chebyshev_polynomial_w_ops.h,sha256=HSdSOCjrJr5jHqJDeHGthKiiBna3lk5gid8rWLw27qc,4909 +torch/include/ATen/ops/special_digamma.h,sha256=9IJO14dA23fjx-JjlQWLEgAJy6LaYJJ7FQVU09QPg4A,1371 +torch/include/ATen/ops/special_digamma_compositeimplicitautograd_dispatch.h,sha256=4CuO5JDdCwqjq8xRfcNnpno08uyuoArqvShdeAOSklo,1202 +torch/include/ATen/ops/special_digamma_native.h,sha256=kgf2-xl0f0i_nbdlEU0iRKgwH-0l1HuGR330VIJBWso,826 +torch/include/ATen/ops/special_digamma_ops.h,sha256=ekbnyGkNy4pj9HO_wWzRx9Txp_BzZ_nzi_3y6mlq1S4,1855 +torch/include/ATen/ops/special_entr.h,sha256=RXPAAE9uYwxy-UJocNQCWLLc9atFtJVO3W2T9mf_3f4,1341 +torch/include/ATen/ops/special_entr_compositeexplicitautogradnonfunctional_dispatch.h,sha256=knUtBKaUL3jgFe8VKdhtqadvBESqolJ7cSWZYol8d10,1050 +torch/include/ATen/ops/special_entr_cpu_dispatch.h,sha256=bGXo7Ya-ymChtAEcH_Tep-GsGdxqgNS8YXv1AG0M94I,1149 +torch/include/ATen/ops/special_entr_cuda_dispatch.h,sha256=_AVglvrj-gf7TWtAWwVZsXBjxTArP1v158B2TZ4fMsk,1151 +torch/include/ATen/ops/special_entr_meta.h,sha256=wBqjCkTvuIB-TAqXalSb_2wGmTAEiXfrjI8xakvdFqc,827 +torch/include/ATen/ops/special_entr_meta_dispatch.h,sha256=_r-uhmQ4PRZTDPlkgszC90cFvjsPn7mGC_9lVPMClFs,1151 +torch/include/ATen/ops/special_entr_native.h,sha256=0HzQxu5DaiVcwGQcpdeags8RfvbnDsKWnicadCO_QVM,868 +torch/include/ATen/ops/special_entr_ops.h,sha256=PiVB22Vof6Vd70QSzSePmyCLWhysEKQU_tnMpaIkbvk,1837 +torch/include/ATen/ops/special_erf.h,sha256=6ahoHHfgVYsJP4ZGm63Ho0Os8up1znPnk2YpMGMFpuY,1331 +torch/include/ATen/ops/special_erf_compositeimplicitautograd_dispatch.h,sha256=h_bYrWWNMg7_241ad2NZb_y7Ln2TLL_f9zTFdsNUhUw,1190 +torch/include/ATen/ops/special_erf_native.h,sha256=Cjg0Tb1VfnDty0YBy9s7gw0jxq8DpXPqGyvW6EwPDuA,818 +torch/include/ATen/ops/special_erf_ops.h,sha256=hLz2KLgKijNjhSEws118zNS2YT3eqwwcWT4ubnOrxgk,1831 +torch/include/ATen/ops/special_erfc.h,sha256=MVlB88tp5SSSttvm5TQKm3a8rn5k3WGXLUt1pnrlbnI,1341 +torch/include/ATen/ops/special_erfc_compositeimplicitautograd_dispatch.h,sha256=37Lk32_Q6tBZ8ZPxUGk3dO4cV8Ys2gIxOeTgYdKYcYA,1193 +torch/include/ATen/ops/special_erfc_native.h,sha256=NFP0XORc10VRACdJMgXm6bVYPgngrqHjvzO8kUcKiu0,820 +torch/include/ATen/ops/special_erfc_ops.h,sha256=PZKxoYNF1Wv1_vo2LRTJOL7SNYGiNPXQo25tUHsDlBo,1837 +torch/include/ATen/ops/special_erfcx.h,sha256=45fWlZW2faNHPKXRAWwpQ0Ur77sY45NyYC1ul6tEt7w,1351 +torch/include/ATen/ops/special_erfcx_compositeexplicitautogradnonfunctional_dispatch.h,sha256=Yv9ss35FvKIafiJxl8f-7CIoEARS5hQdfovaEztRTho,1051 +torch/include/ATen/ops/special_erfcx_cpu_dispatch.h,sha256=pvT9oVRajlxj7xyXpqFw_XmyfHeNUgoRXEqS_YD3rwM,1152 +torch/include/ATen/ops/special_erfcx_cuda_dispatch.h,sha256=ePdPBCLtPLd9MVaXceOYMAJcY0L6cZnNP48GN5LJs-Q,1154 +torch/include/ATen/ops/special_erfcx_meta.h,sha256=ChdzGzHgGQYG7Sz-k2VjbIx3UtpOQ3SBtKYizWQwYk0,828 +torch/include/ATen/ops/special_erfcx_meta_dispatch.h,sha256=8urEMFpSBgIXw0FaFboczc_vz6IprXBOwP0qD6_Pj5I,1154 +torch/include/ATen/ops/special_erfcx_native.h,sha256=Uh1nffGM6CwIUAEboudSMC2XGzh9WPPhbuo5LWtYybQ,871 +torch/include/ATen/ops/special_erfcx_ops.h,sha256=NF6B2cH7iAeei9wg9DYSacT60kNTdGe4Hf5NAswGnrA,1843 +torch/include/ATen/ops/special_erfinv.h,sha256=L2pSvMBg0m6tXuQ9hEEY-NL8IM1cpBau5NKOm7Yt0a0,1361 +torch/include/ATen/ops/special_erfinv_compositeimplicitautograd_dispatch.h,sha256=1gGaBYei-MK-ev5MsnyafoRSpU3vDeVXj6Sr8otNhPI,1199 +torch/include/ATen/ops/special_erfinv_native.h,sha256=ZZkxIDlrvSqIc7SZS2YKSjsnPGjJPivRYeI_MmSwaks,824 +torch/include/ATen/ops/special_erfinv_ops.h,sha256=LaGbcWJ7CMbeg5ZVqAIMA6MU6Gvc6i3-EEiBHIiqBCs,1849 +torch/include/ATen/ops/special_exp2.h,sha256=D0DhA2YQUqSNQqtlMl2oN44ske7fwCwbhQOKYtkMUFQ,1341 +torch/include/ATen/ops/special_exp2_compositeimplicitautograd_dispatch.h,sha256=8wjnmWcfzFRetLhRnCT2_9o5NRHiKDbi6HvKJDvg4N0,1193 +torch/include/ATen/ops/special_exp2_native.h,sha256=OQCoRcLfVHT07wVAZbZhyEN7oPLmDHiHOT6wpHLHyKQ,820 +torch/include/ATen/ops/special_exp2_ops.h,sha256=31MAdisy6DXWqIl2JN_HDUOTJVAjD13pFjMKXRSE3kg,1837 +torch/include/ATen/ops/special_expit.h,sha256=IfAeCldygOH2FBAFRgfvDhucQBYfcX0qWobtqY7dX2w,1351 +torch/include/ATen/ops/special_expit_compositeimplicitautograd_dispatch.h,sha256=GZ1IKb-EED6Htf5FqrPq-y6TVSBTy3jCAuywLAAYIMc,1196 +torch/include/ATen/ops/special_expit_native.h,sha256=VYjTdnRAoF48b05TV4tYn9ZnUF7nNEab22vuTJFq_sE,822 +torch/include/ATen/ops/special_expit_ops.h,sha256=NPV4sSVF010UxdJFgqU5olskTFuofJwjUkDz1rBxeHE,1843 +torch/include/ATen/ops/special_expm1.h,sha256=dInqsPU1Kyy5aj-32n96F07T14RJaHbMEImcKovOVVo,1351 +torch/include/ATen/ops/special_expm1_compositeimplicitautograd_dispatch.h,sha256=cqRJMp8nKMWCMJfMLW-BugIXP2_gYe_Fhd_sA0il-yU,1196 +torch/include/ATen/ops/special_expm1_native.h,sha256=tak2dFsNCadHVg3bZZ7FbnMW2VfqkdsigPmvICsNioo,822 +torch/include/ATen/ops/special_expm1_ops.h,sha256=xyqoNipDGNlYFymWoe6T6oC8rqGS6ImTlmcVwRxmh1s,1843 +torch/include/ATen/ops/special_gammainc.h,sha256=__o3k6dr-78wbXqejnCBWHQNx8h4gPcP3Wye0PEAUsQ,1522 +torch/include/ATen/ops/special_gammainc_compositeimplicitautograd_dispatch.h,sha256=9hMxf7TTAllEV1TlCouWvgHssP-KmoIOcnjYfArDeoU,1283 +torch/include/ATen/ops/special_gammainc_native.h,sha256=PuV1vZKpTgSxD6QPF6UhO7mpW6ifjWoZs3Q_tHJ3XZE,880 +torch/include/ATen/ops/special_gammainc_ops.h,sha256=pKoAX30_vcVhWjdZ0GbizFHoClBwUTzA5ToRWXVF2Fg,2033 +torch/include/ATen/ops/special_gammaincc.h,sha256=WpUl5Q3REdKvyukcwfg875csnXeOAjRtEySkx5ctl0k,1532 +torch/include/ATen/ops/special_gammaincc_compositeimplicitautograd_dispatch.h,sha256=X3onM9dOzUkb2XIhW8WfeXvnKwx0lAWDPHuhba9xlOI,1286 +torch/include/ATen/ops/special_gammaincc_native.h,sha256=uID8FzXSVHOE4ARBXCGtJv3Bcd1dvBiiXn8mLjXPrtk,882 +torch/include/ATen/ops/special_gammaincc_ops.h,sha256=3gLk5c5mGMVKhjeg0_TSOnMQ5FYza_0Tw3xmB2oXPKo,2039 +torch/include/ATen/ops/special_gammaln.h,sha256=DgU7Gs_u8yTomOfanFbOSjEPPfCPVALTCK4BZyTP1M4,1371 +torch/include/ATen/ops/special_gammaln_compositeimplicitautograd_dispatch.h,sha256=JuBT08-gBvUxQS0jkaxDu9WBgEX9YbEZJN0sObuhU14,1202 +torch/include/ATen/ops/special_gammaln_native.h,sha256=UxjjIJOOdbx88Yrl9nQyd0mdMvx-GGUk1tYZHwOAvH8,826 +torch/include/ATen/ops/special_gammaln_ops.h,sha256=mjU0VPWENCLHfRQxea-E7NAAd-DYdWrpyBO4XLi4ly0,1855 +torch/include/ATen/ops/special_hermite_polynomial_h.h,sha256=1NcmEnYt7W87F02aTb-W6dMbl_f8Ee371ffTBAB7Wa4,3289 +torch/include/ATen/ops/special_hermite_polynomial_h_compositeexplicitautograd_dispatch.h,sha256=cFds92tXmhWqwRhtJSTwRYNLMRmO-QfetMiydZlvazU,1632 +torch/include/ATen/ops/special_hermite_polynomial_h_compositeexplicitautogradnonfunctional_dispatch.h,sha256=HwIIwovuYv2jywNU4I6uJ-LOiXpJPxoaXYRn8abyhpY,1085 +torch/include/ATen/ops/special_hermite_polynomial_h_cpu_dispatch.h,sha256=9YN5hMQ2lkY3KiYP3ToUchuVZDK3UTf85MKxRDNu2sg,1254 +torch/include/ATen/ops/special_hermite_polynomial_h_cuda_dispatch.h,sha256=JIVcIsBYUnkyzwGl6qf7xYl6MK0Qd1VUNidvnSsbf6E,1256 +torch/include/ATen/ops/special_hermite_polynomial_h_meta.h,sha256=laM2E7R2zuw-IYj0HpOvS6N7kOZtX4zAujxbnNyi0EU,862 +torch/include/ATen/ops/special_hermite_polynomial_h_meta_dispatch.h,sha256=RF5oPI6jtmudoPVwYhL2DRo4jDdoEN7M7l6ZOF47Vck,1256 +torch/include/ATen/ops/special_hermite_polynomial_h_native.h,sha256=0gCHnV2iFGDuCelDUEZiIpLIdwiMhU1elq2KYWaLROo,1363 +torch/include/ATen/ops/special_hermite_polynomial_h_ops.h,sha256=jegH2yawZXiXoaQj1seWQDYrmh0WXS1jm6zsvLQ-OrI,4873 +torch/include/ATen/ops/special_hermite_polynomial_he.h,sha256=46rcDhsEvNR0jH0cbhyWYHJI9w5S8jR5taDv830rV_I,3317 +torch/include/ATen/ops/special_hermite_polynomial_he_compositeexplicitautograd_dispatch.h,sha256=JzgfiQf3R48UNUP1HoirMIlbCl_4125mqte-dJnCy1Q,1638 +torch/include/ATen/ops/special_hermite_polynomial_he_compositeexplicitautogradnonfunctional_dispatch.h,sha256=dgWcI8LCfw34FGsDBoiNaJJ-5IcUqv4zD-wlQqWEt0E,1086 +torch/include/ATen/ops/special_hermite_polynomial_he_cpu_dispatch.h,sha256=pS5w3_VAR3_7RPS8_nrV71hAZ6g5GSpwBGbCDQB3DMs,1257 +torch/include/ATen/ops/special_hermite_polynomial_he_cuda_dispatch.h,sha256=kjlAmbgG7LnND8GldBD6u9-UmjIun6RvwwgOXuYrpCc,1259 +torch/include/ATen/ops/special_hermite_polynomial_he_meta.h,sha256=oA8GWkZK93PKJ9QWgO1tC7ER1r1CZoDcsqGr1phVJ9k,863 +torch/include/ATen/ops/special_hermite_polynomial_he_meta_dispatch.h,sha256=jzQcA_qmq-mhz8dO-GUtLOrzKsgqO_UcX3DKPkk8pps,1259 +torch/include/ATen/ops/special_hermite_polynomial_he_native.h,sha256=JohrF2JLG3acHHMzOFGKIo1_a5DL04t2Q2Tp5xaz4lE,1370 +torch/include/ATen/ops/special_hermite_polynomial_he_ops.h,sha256=xgUZrso2yg2rCUqagiDSemof1B99ctX9BpHQV0vWr8k,4891 +torch/include/ATen/ops/special_i0.h,sha256=V8tw2tchIuEULXe0-eUbBSDpZXzxRiV9l2EU9GwU0dE,1321 +torch/include/ATen/ops/special_i0_compositeimplicitautograd_dispatch.h,sha256=3n55QHcEK9bGMLjEHjSVv8V2h_sAVDumKo3rPaEax5o,1187 +torch/include/ATen/ops/special_i0_native.h,sha256=5abiuijh7_P0oyFiXWZBOihUZ3vvWD2bjo8mTFEA4wc,816 +torch/include/ATen/ops/special_i0_ops.h,sha256=7-vH2Zn11RKKv8mC1-xxKIxFvsy1Dy-qQcgKfiXAzh0,1825 +torch/include/ATen/ops/special_i0e.h,sha256=AiDmRthvu28UkJ0uhGemNw039NQR9-HiINojgXUqWH0,1331 +torch/include/ATen/ops/special_i0e_compositeexplicitautogradnonfunctional_dispatch.h,sha256=3VrisaWO3mBL0fxjkqtcOAc7cs-Okwrhn6xgSaCORE0,1049 +torch/include/ATen/ops/special_i0e_cpu_dispatch.h,sha256=GxfnZlWwmNQPQeiXQQS8DD7_huUMoQ2R-bh52uuHXbA,1146 +torch/include/ATen/ops/special_i0e_cuda_dispatch.h,sha256=J5JkIaLlmUprurVjNnfhyg6uMMxmJ_o_jLWm7oyJaSU,1148 +torch/include/ATen/ops/special_i0e_meta.h,sha256=0ExsHhz9Fj-jFueA2lELSakT2bhTuFDjhVEwfUJpqZQ,826 +torch/include/ATen/ops/special_i0e_meta_dispatch.h,sha256=xuX65J-6Chc1qSh-34w2mpj7m2y9cmwDJVItIxCzesc,1148 +torch/include/ATen/ops/special_i0e_native.h,sha256=ptlotzB-Vc3z1xFHPqXAckuZ_mzOuiFk5QXwjCFLzdY,865 +torch/include/ATen/ops/special_i0e_ops.h,sha256=gveA6iHza7QALWZdZMOdl-H1axSyWDVKKWVX2R_Gkx8,1831 +torch/include/ATen/ops/special_i1.h,sha256=dWPvLqcPNANXxEZNr-JY_IKZ0r38aOPXPCNhkuhhDx0,1321 +torch/include/ATen/ops/special_i1_compositeexplicitautogradnonfunctional_dispatch.h,sha256=mrt6tRPObeVF63ubo-KZ69AZKBVWkuH-O24Uk14cD7Y,1048 +torch/include/ATen/ops/special_i1_cpu_dispatch.h,sha256=Y0wgEAJ4hvwEKVCVyv_xWaERHzvuylMER_WtI6vMTE0,1143 +torch/include/ATen/ops/special_i1_cuda_dispatch.h,sha256=m84PlCbbrlpf-3ChcQw9vZtmzufJJoCFNzwkYIpfceM,1145 +torch/include/ATen/ops/special_i1_meta.h,sha256=PU1wCD1BF47vsuIdtXczfrPv2aUpSEBr23i_ef0BrXI,825 +torch/include/ATen/ops/special_i1_meta_dispatch.h,sha256=Bjnpp5U9UiAODTkNfP1-xQ1EvMNbqbnbHWQbvFKYnVo,1145 +torch/include/ATen/ops/special_i1_native.h,sha256=NRjnBeA-UryUnTOZtgYTF0Q4ObEoYyOJAzY9OIRrkq4,862 +torch/include/ATen/ops/special_i1_ops.h,sha256=WXASfh66RmlI8GyeD3hXSgVNATgEfDeubOg64iQlaQI,1825 +torch/include/ATen/ops/special_i1e.h,sha256=zn4Tli6lsMaAm5R0Y53cp447QfP-Z1RRsAZDrvBWCsg,1331 +torch/include/ATen/ops/special_i1e_compositeexplicitautogradnonfunctional_dispatch.h,sha256=BqEOEMu8q64I2yD7LQF2PGUNioRq3lXqjoMHPVMyEBY,1049 +torch/include/ATen/ops/special_i1e_cpu_dispatch.h,sha256=ceBZ37IDl4vchgou6Uj1h2RPl8VKKMXIs0Idw2FQlUw,1146 +torch/include/ATen/ops/special_i1e_cuda_dispatch.h,sha256=k61rhKBWQb8XUujD_LLyDgKcaJHh2bNu1My-D47iZjk,1148 +torch/include/ATen/ops/special_i1e_meta.h,sha256=cV0GwP6QTlVIB_h3VusBJqsE4k-BXxEaHKJKTjNWBCI,826 +torch/include/ATen/ops/special_i1e_meta_dispatch.h,sha256=uVYSQsf-K4Wt4llywZfO1sOixWqszA_I83qqpVwwoqk,1148 +torch/include/ATen/ops/special_i1e_native.h,sha256=vNDtzED4QN7Y43gNq4OU66LQjsIcYWhw3zzL_M9n-Pw,865 +torch/include/ATen/ops/special_i1e_ops.h,sha256=qtyK-ZSeuvVxmILE1RFetSpnCLH_zTVkWOAcZufdPaU,1831 +torch/include/ATen/ops/special_laguerre_polynomial_l.h,sha256=d3qDQmFVD4NiwGpe2VHZu1f4GgeGNU1ebFW5V1-hHG4,3317 +torch/include/ATen/ops/special_laguerre_polynomial_l_compositeexplicitautograd_dispatch.h,sha256=zQa9y6C3lwWXXlrfc-vtIISa0p7HnfILyox9ITSYnvI,1638 +torch/include/ATen/ops/special_laguerre_polynomial_l_compositeexplicitautogradnonfunctional_dispatch.h,sha256=YRwNru4kV_zBgbxdiqJLTwQkdyjJD2drJR_PGivcneA,1086 +torch/include/ATen/ops/special_laguerre_polynomial_l_cpu_dispatch.h,sha256=TtzDW7eUPeLIfpbE2BDExH7h2HgfnQG2rFTlESs5VzY,1257 +torch/include/ATen/ops/special_laguerre_polynomial_l_cuda_dispatch.h,sha256=AsEF7pujBT2EyIg026177YUg5vsiIsfYpMz60tbjLcI,1259 +torch/include/ATen/ops/special_laguerre_polynomial_l_meta.h,sha256=cPV4gb9h11sEhaNqMgHvUJpzUmNtQMERLGfEVllpwo0,863 +torch/include/ATen/ops/special_laguerre_polynomial_l_meta_dispatch.h,sha256=hYAaJxNUztIQAvtQrC_r-3NUoQCpsMvVQKwoBaok-4g,1259 +torch/include/ATen/ops/special_laguerre_polynomial_l_native.h,sha256=9OgmPzBHY3dLkoXAzZsXTYThGs6hGBswHuZhswq-imE,1370 +torch/include/ATen/ops/special_laguerre_polynomial_l_ops.h,sha256=Whwoe1elsEIF11L8FHyCea3a316uWL_xfaDJs2s0eFA,4891 +torch/include/ATen/ops/special_legendre_polynomial_p.h,sha256=wzi2qKGHy3zT1Rvw54QCUc0IIY_ERim55eXySATJizs,3317 +torch/include/ATen/ops/special_legendre_polynomial_p_compositeexplicitautograd_dispatch.h,sha256=Vj0qNn2yK5a85WiguTBC9_DQsh9fNE0kRrYQwXaDQiM,1638 +torch/include/ATen/ops/special_legendre_polynomial_p_compositeexplicitautogradnonfunctional_dispatch.h,sha256=zQn1sTcWMqgwcA2B1EroYjdYXkmFkbuAnzQksEPyXJI,1086 +torch/include/ATen/ops/special_legendre_polynomial_p_cpu_dispatch.h,sha256=oW1fsBQmec4oQINts47Kd9-o6u73zvvl7Ri0nhkgHEw,1257 +torch/include/ATen/ops/special_legendre_polynomial_p_cuda_dispatch.h,sha256=GZxWhCAJDDYWDiKakhSHXda3tvasNIhEQ6DqIPPnACE,1259 +torch/include/ATen/ops/special_legendre_polynomial_p_meta.h,sha256=dcgTa9JH6Lq8W-FZtpAWNv5nuGixKPwhl5R5ekk3K60,863 +torch/include/ATen/ops/special_legendre_polynomial_p_meta_dispatch.h,sha256=Zc6J-UVkbZxBgzvCrlBJ06ZZWtaSSgsIdpSYZYTFmAI,1259 +torch/include/ATen/ops/special_legendre_polynomial_p_native.h,sha256=-L4lBwhaYdTC_XU-n8KdYoQUnCjRM-sbzbSZyZq3sfM,1370 +torch/include/ATen/ops/special_legendre_polynomial_p_ops.h,sha256=Z5LNX6Vc2y9nbAxepUAXxnmZf0EgSzVvUPwkhOjbz9A,4891 +torch/include/ATen/ops/special_log1p.h,sha256=LPDXi2sQG8TPR_yN9SqU03RNqlbMPXG6C-0xxnuj7yc,1351 +torch/include/ATen/ops/special_log1p_compositeimplicitautograd_dispatch.h,sha256=Q-LTYFipCB19V1MOGxmYDHPqS4o1ZYbAeS0NClW4LtU,1196 +torch/include/ATen/ops/special_log1p_native.h,sha256=N6wzYMzGfga4iN7JT9XMQpai5GqToK81wJeOC_MJYPo,822 +torch/include/ATen/ops/special_log1p_ops.h,sha256=UBu24OIQdUJssex3NHCv89cbVW1PibAnlXqhCyJ1szM,1843 +torch/include/ATen/ops/special_log_ndtr.h,sha256=XR1el6-ZDMs3EHkt3mRQT4VOB58hEBmhsTInGQ6pteQ,1381 +torch/include/ATen/ops/special_log_ndtr_compositeexplicitautogradnonfunctional_dispatch.h,sha256=Cb6-4Q8srZvKfKO7dd5eMrprniAdjMNFIrXoxyWbMDY,1054 +torch/include/ATen/ops/special_log_ndtr_cpu_dispatch.h,sha256=0B29Mq593nEQSQO9cRDjSHDYLXnJDcdkKv8cTAjldL8,1161 +torch/include/ATen/ops/special_log_ndtr_cuda_dispatch.h,sha256=LyRmaZ-gHZfFQL5Ic8bGBXRWWX1gG1SqV9GdyrUWCPM,1163 +torch/include/ATen/ops/special_log_ndtr_meta.h,sha256=LCNGFzhV8GoLJfw0SF5q-BVTQDaMiiZ3SEe5n37jf84,831 +torch/include/ATen/ops/special_log_ndtr_meta_dispatch.h,sha256=ATZOolnKmlYQNhenxRpD79_MtkwK3dsK57hzwns27hU,1163 +torch/include/ATen/ops/special_log_ndtr_native.h,sha256=4aI5f1hpDS_CICKlpJPx1GEDQkLR4yxeTG9a7YtHZyY,880 +torch/include/ATen/ops/special_log_ndtr_ops.h,sha256=B7Za6IEfmGfoK1sZHJR1zjarb0uBNWMgxQQUb7qNxwI,1861 +torch/include/ATen/ops/special_log_softmax.h,sha256=vr-KtHqKWHfhnYdaaA4ebVvAGCEcufCRDkKKWGPk26w,1058 +torch/include/ATen/ops/special_log_softmax_compositeimplicitautograd_dispatch.h,sha256=5QPmA_MAk8jPxLQJa9ukDxRf1mN_97u4cRmAwvt-Xzw,1098 +torch/include/ATen/ops/special_log_softmax_native.h,sha256=UtpvAU0SmzIPYd3EQDSIzJRU4n06yfXbsm7jSML04Fo,810 +torch/include/ATen/ops/special_log_softmax_ops.h,sha256=j0O-9aUTYCQL0bQlyGGBdWbukAU-rquC6s85QWkH2mM,1432 +torch/include/ATen/ops/special_logit.h,sha256=gpYJ0ahwOwnb7o1lIc_ouvD5lC7wf5WeqGTv3aSqXWw,1534 +torch/include/ATen/ops/special_logit_compositeimplicitautograd_dispatch.h,sha256=HY7VaQ-yErMjHLHtW9X5w1gExhkXqXuRQenepXLdb0w,1313 +torch/include/ATen/ops/special_logit_native.h,sha256=OpLB3EcTobPPvvF2LfEEOH7vshqr5gRS1Uf6iPmkIG0,895 +torch/include/ATen/ops/special_logit_ops.h,sha256=gwqQnm_wGQteN38TO1ud6f7XE7pr09hhCUhXzv5AvpY,2043 +torch/include/ATen/ops/special_logsumexp.h,sha256=wIufsM4U3zr00vKAt5UzNpKFxnE3-klgLz7LRzCK4vE,1646 +torch/include/ATen/ops/special_logsumexp_compositeimplicitautograd_dispatch.h,sha256=WOjfZnAfdgKygIcPw4Vjo-8cSwxOuT81YWzC1cAy0JY,1325 +torch/include/ATen/ops/special_logsumexp_native.h,sha256=K1TJKA-YX-3EiR0DMKqTxT-kXIuKwkjtFu2k2JjC0Qo,906 +torch/include/ATen/ops/special_logsumexp_ops.h,sha256=ZPuJ59IX93_RRn2x94J2QlBlCmgqbcgULlOKP5U6Xc8,2117 +torch/include/ATen/ops/special_modified_bessel_i0.h,sha256=knoeapUhorXt-clWZTWSxGQAQNa_XeFz_TvJp2l8xdA,1481 +torch/include/ATen/ops/special_modified_bessel_i0_compositeexplicitautogradnonfunctional_dispatch.h,sha256=zN5sbALb8wtJO5uH8_vhfoOazkeCZRH83ExIrlf35sE,1064 +torch/include/ATen/ops/special_modified_bessel_i0_cpu_dispatch.h,sha256=OFoN8Jn2hEmbQtHxIshi2_oWQCqhohJdStcyu6SSDDM,1191 +torch/include/ATen/ops/special_modified_bessel_i0_cuda_dispatch.h,sha256=bfAgVIY-Fi3AF2E6M9iHTO2uaJBoiaIjr_LIcZAOtOA,1193 +torch/include/ATen/ops/special_modified_bessel_i0_meta.h,sha256=CCzP7Zk68Ap_5MMWNrlVOJ66pQBzSDLLZKlHm2EOWsI,841 +torch/include/ATen/ops/special_modified_bessel_i0_meta_dispatch.h,sha256=BSPF5owQRqjZ0z7xV9mBZg3QjiZcBQzwmHmHFYnwTwY,1193 +torch/include/ATen/ops/special_modified_bessel_i0_native.h,sha256=Ln4J-88nEPZHjcZFRIxchk3L7v7DUqyUb8Y_AZKFI6c,910 +torch/include/ATen/ops/special_modified_bessel_i0_ops.h,sha256=Ywdb-YXrqtferIyt5TIanWNKEdyak4g0NdbgH_h43uI,1921 +torch/include/ATen/ops/special_modified_bessel_i1.h,sha256=LYNc8-LLpZMkKiHq9WyTD2RkWZLx6kdbzHe8SRa956M,1481 +torch/include/ATen/ops/special_modified_bessel_i1_compositeexplicitautogradnonfunctional_dispatch.h,sha256=edVq2hBXhza-n_CY65P6XurYwd4i5FqLTQmcnNB2PMw,1064 +torch/include/ATen/ops/special_modified_bessel_i1_cpu_dispatch.h,sha256=700lq2SYTuB9__dI2JBdNpNPMFqdBkddWEbt_kbr7dU,1191 +torch/include/ATen/ops/special_modified_bessel_i1_cuda_dispatch.h,sha256=1X2WFpfQUrHo2DuJ6ZEykJfIKwEXiFTdZnzRM1Pk5d0,1193 +torch/include/ATen/ops/special_modified_bessel_i1_meta.h,sha256=m-kw-FW7K2nJXHpR1f8z8nu1_4TzJM01IyCfNQOOcYA,841 +torch/include/ATen/ops/special_modified_bessel_i1_meta_dispatch.h,sha256=xv7lWaPMJMDHRHEHY-cDsNOvF24b_bhkncsvIg4ShJU,1193 +torch/include/ATen/ops/special_modified_bessel_i1_native.h,sha256=vtha295SK-CFPY2KV9P6rjaJUkQiDklqQLm5MopMCho,910 +torch/include/ATen/ops/special_modified_bessel_i1_ops.h,sha256=cFTDzpIYQD-svJB1P_7zVuq2pwUw6ZKfM8eKUEJrt20,1921 +torch/include/ATen/ops/special_modified_bessel_k0.h,sha256=w3DZNj4M2QXWytNNhdbhiGzvxLXS_HKWrftC-PBwJIU,1481 +torch/include/ATen/ops/special_modified_bessel_k0_compositeexplicitautogradnonfunctional_dispatch.h,sha256=-YR4C87jsSDyzHVfWcVVBkCMQHE-e83qc6Hfa9DpmLY,1064 +torch/include/ATen/ops/special_modified_bessel_k0_cpu_dispatch.h,sha256=jul6H6LZuQh0zRiIykd20XPRkID8f-yXiYJfS0U4Lq8,1191 +torch/include/ATen/ops/special_modified_bessel_k0_cuda_dispatch.h,sha256=4BhmrN79HBpfcaT4nhUuDx62R_l7KJ24bjXuEDAhVVE,1193 +torch/include/ATen/ops/special_modified_bessel_k0_meta.h,sha256=djU-vyM0PaGUQKqm0iauAQ24S666LwxvOxR2T5XHGkU,841 +torch/include/ATen/ops/special_modified_bessel_k0_meta_dispatch.h,sha256=4xmjPpiHA82rC8v1V9rR5SbZoXDLjSZXIUhVUmEIy0s,1193 +torch/include/ATen/ops/special_modified_bessel_k0_native.h,sha256=RweHONzDneJRDmzTYHCA776LRSmDGKe3KzGuLHt4WEg,910 +torch/include/ATen/ops/special_modified_bessel_k0_ops.h,sha256=9gEKY_KhiEh4qROOWzU4hU2QWxNlMQSXJQ7jMW6I4Mo,1921 +torch/include/ATen/ops/special_modified_bessel_k1.h,sha256=WHGLvxJNqlUsdFumKWQWmkSjHKM3V0KcoP90_2akjLc,1481 +torch/include/ATen/ops/special_modified_bessel_k1_compositeexplicitautogradnonfunctional_dispatch.h,sha256=Ke0JlqZASX_3fQtiRYEDC2LIuHn8t4LC-dnZR9sJnOQ,1064 +torch/include/ATen/ops/special_modified_bessel_k1_cpu_dispatch.h,sha256=1xVFdxaV_AaRuCdL53ihEYl0Nx7aHZFbUk9-PrOwJ04,1191 +torch/include/ATen/ops/special_modified_bessel_k1_cuda_dispatch.h,sha256=lL2r5k57gBhN4jDG8m2_LCfZ9l04_4EM2hhOjn6G250,1193 +torch/include/ATen/ops/special_modified_bessel_k1_meta.h,sha256=rFNnu4hAJf5Rhr1bjzHfKMS2OOa-N0Ah1E0sVOuoOMM,841 +torch/include/ATen/ops/special_modified_bessel_k1_meta_dispatch.h,sha256=bb7IKKRR0Fy2IoDalCLWeDngB5fnW1fjCcmjP5K8D8E,1193 +torch/include/ATen/ops/special_modified_bessel_k1_native.h,sha256=lOP2I55dypMpYcOmoFiTULxK6ibd7TRLqCBheYUA8dY,910 +torch/include/ATen/ops/special_modified_bessel_k1_ops.h,sha256=2aPnRmz4tco0_cmOS9bm_79t6fmsUlwh1UoVYG32tPY,1921 +torch/include/ATen/ops/special_multigammaln.h,sha256=5-oT_sOI3A7RLJ8Zs0bcXaOVhwbVkkkVEG5UWao4EjI,1484 +torch/include/ATen/ops/special_multigammaln_compositeimplicitautograd_dispatch.h,sha256=uld9uDo49UCpDyagZG4mlxK7FVpzSufj5yMyNmO07Zc,1250 +torch/include/ATen/ops/special_multigammaln_native.h,sha256=4WzSysSSJoc7iDSYo2V39XBmAqNcz2ExUkgoO4AeZHQ,858 +torch/include/ATen/ops/special_multigammaln_ops.h,sha256=wN8q-OLlqTGc3gtRngZoryH7e7syZB0MluHdDFgqJPc,1961 +torch/include/ATen/ops/special_ndtr.h,sha256=TwOvt_h2VXF6RjM3lOKXFWnd_XK_ixdcou7CZ1WlQ7g,1341 +torch/include/ATen/ops/special_ndtr_compositeimplicitautograd_dispatch.h,sha256=4AzhWFvzzCDurhkl7qT1t-Lv6FEJNzFPTkmPXhtgKuo,1193 +torch/include/ATen/ops/special_ndtr_native.h,sha256=7n6ckBQlZNBQgQevT_2HAXsOmkeeIaLX24M6meFZMiU,820 +torch/include/ATen/ops/special_ndtr_ops.h,sha256=ECbZKHayF9gUav_65OuRSsFcetu4zAX6SNDQAwoKOxs,1837 +torch/include/ATen/ops/special_ndtri.h,sha256=7eEf4wXf32gnqanUZNI0GQLtY4giTgVTTZwJ8E6YK1g,1351 +torch/include/ATen/ops/special_ndtri_compositeexplicitautogradnonfunctional_dispatch.h,sha256=wS2tqh0_aNn5bENe4jR-_Gh_eVfYztArjuNhkciBwj0,1051 +torch/include/ATen/ops/special_ndtri_cpu_dispatch.h,sha256=5fwmcmLEIIHmnZYrcuYBAw8ia8hK466mIcbwdazM5SQ,1152 +torch/include/ATen/ops/special_ndtri_cuda_dispatch.h,sha256=Hs3kGUiEWB2dr6IkKCI5CtNhFg6wxhH21iWK8RTro7o,1154 +torch/include/ATen/ops/special_ndtri_meta.h,sha256=rbewT1A25RjrO7iwl49Q83K7xEtzQllwHJZ8_SLoXq0,828 +torch/include/ATen/ops/special_ndtri_meta_dispatch.h,sha256=rxpurJZ1RQig6W7UIfLwsCmPxlK4wODsI58zatIt34k,1154 +torch/include/ATen/ops/special_ndtri_native.h,sha256=q40c0r_GWdrWUY3HK2Af8o-H7n1lU0NP6p8EAlzvosU,871 +torch/include/ATen/ops/special_ndtri_ops.h,sha256=qqwHxNYaohm8p0TZsRGrOU0rojVd6n6SBCPgXkXWPs4,1843 +torch/include/ATen/ops/special_polygamma.h,sha256=1lPSFppARN3icGVkuNu0m4789zo0DbdX39iXb8OZl88,1454 +torch/include/ATen/ops/special_polygamma_compositeimplicitautograd_dispatch.h,sha256=PeFmbLr--44xjBVcOMqDn6JdeZQf8OJpceSkVXNFcM0,1241 +torch/include/ATen/ops/special_polygamma_native.h,sha256=XPvf-qqb7m2n5MrIrCKQ4BUGjT7EAjlmYHxv_yWPElg,852 +torch/include/ATen/ops/special_polygamma_ops.h,sha256=o2NQYtpB24-ax8lxWt79o4WYHNdqIM7-sOBn43DIqXg,1943 +torch/include/ATen/ops/special_psi.h,sha256=z5maXOO47rGifdAj0CUITXd4lrWtsB8nEtBZqttXR7s,1331 +torch/include/ATen/ops/special_psi_compositeimplicitautograd_dispatch.h,sha256=UL-f5ArY0GTW192qCaf6ODiz-suZpe41wGwBD4RzFsI,1190 +torch/include/ATen/ops/special_psi_native.h,sha256=H972O_EYK50jv1DCS8bg3oAKTpZsJU9HoLsXGBMtYn8,818 +torch/include/ATen/ops/special_psi_ops.h,sha256=hEbXrboP7tMtyv2fqu9L6oscumkw8oCMLyED_pynmZk,1831 +torch/include/ATen/ops/special_round.h,sha256=LSeWpi2zt6i1d5Y_bxyxwkYdKAiimyMuXWjNef2qpTc,1490 +torch/include/ATen/ops/special_round_compositeimplicitautograd_dispatch.h,sha256=P9DIwiDJLamjrbWHwlV49mWbgCLZ0ruXtBl7AGLqweg,1254 +torch/include/ATen/ops/special_round_native.h,sha256=rdEGjONdqI0_jYbctuOdJuSV2JR7QI6leBN9jfTcpCQ,860 +torch/include/ATen/ops/special_round_ops.h,sha256=aGe4qpLO-gPxwFgBSGc363mmApE7DEaFb9zER4fcpHc,1968 +torch/include/ATen/ops/special_scaled_modified_bessel_k0.h,sha256=4ZnaANlB9QM_8w_6tq6OBqTRHWVuiLFInEWKnr0mAQo,1524 +torch/include/ATen/ops/special_scaled_modified_bessel_k0_compositeexplicitautogradnonfunctional_dispatch.h,sha256=D9kguWQ80eEXykSlnGbt7Lw0dZBU3HiTGH8sK9ehme0,1068 +torch/include/ATen/ops/special_scaled_modified_bessel_k0_cpu_dispatch.h,sha256=JgAuDaa9SCTxTJr_SGPNh9seUzRXiMbd4-CVPTMeK_4,1203 +torch/include/ATen/ops/special_scaled_modified_bessel_k0_cuda_dispatch.h,sha256=Jf9eyp8Km9DDpE00ZZGV-iYJJG9pmBgwdxiUa4uGKvU,1205 +torch/include/ATen/ops/special_scaled_modified_bessel_k0_meta.h,sha256=04t1_VYCB4AvbwCdE-HENJ3OKyg0SLKXjFZg3Qz0nsI,845 +torch/include/ATen/ops/special_scaled_modified_bessel_k0_meta_dispatch.h,sha256=1yqdbYu7kAg9p8ZO5WZVBagOIBhWlEHkRMjUwiycdpA,1205 +torch/include/ATen/ops/special_scaled_modified_bessel_k0_native.h,sha256=QVyqiyEvsVKzWCARohDRKZEJq46-0RwmIjy5LV7tfQk,928 +torch/include/ATen/ops/special_scaled_modified_bessel_k0_ops.h,sha256=Yz1gVR8-_r3jS-nvs9ysquOcdOjF51jGYQ9XJiR9CxQ,1945 +torch/include/ATen/ops/special_scaled_modified_bessel_k1.h,sha256=0DppqITfQEDPVBH3iHhRt5J7YYh38AEcJ24VHlS_KpA,1524 +torch/include/ATen/ops/special_scaled_modified_bessel_k1_compositeexplicitautogradnonfunctional_dispatch.h,sha256=0Bwg7ihJNPfAg6xuXW3HRSP1llDm-UWM3o8TlYWcsDI,1068 +torch/include/ATen/ops/special_scaled_modified_bessel_k1_cpu_dispatch.h,sha256=wRWzuki8KAGIsNDkIe6tC0Mq2sirhrau8nU3donxxDo,1203 +torch/include/ATen/ops/special_scaled_modified_bessel_k1_cuda_dispatch.h,sha256=91sqdZEwpJeaZD5_cAJ_VFMUts-SYpvk43ilGsKPleg,1205 +torch/include/ATen/ops/special_scaled_modified_bessel_k1_meta.h,sha256=cGzZ3rl2BD13c6_i_-1GV4i_vahIMk6rvzrQciR04xs,845 +torch/include/ATen/ops/special_scaled_modified_bessel_k1_meta_dispatch.h,sha256=f670AxWiy5hJAnPnB-YvfHK3XTmy7WX1Ch1sl3l3ba8,1205 +torch/include/ATen/ops/special_scaled_modified_bessel_k1_native.h,sha256=O08EcyUqzMRqvk_2mJQQ-TcFXHQs_ACsJHGqrIJbSdY,928 +torch/include/ATen/ops/special_scaled_modified_bessel_k1_ops.h,sha256=X25S02XWxL6zQg56Z7TisEppmyFQMe7P_gqR5lDioB4,1945 +torch/include/ATen/ops/special_shifted_chebyshev_polynomial_t.h,sha256=ljKCNRxW188l5nUbaFQcNmNJi7rfQDZWWgEsugQlSsk,3569 +torch/include/ATen/ops/special_shifted_chebyshev_polynomial_t_compositeexplicitautograd_dispatch.h,sha256=hT-urNAhc23HedzYvTPvNMe6FV6nGewVVCknfnxCGR4,1692 +torch/include/ATen/ops/special_shifted_chebyshev_polynomial_t_compositeexplicitautogradnonfunctional_dispatch.h,sha256=FBcQ2_MAkTQ4GxVK-Jpm2dcGCRJLATmkJyiFBU6Z3aY,1095 +torch/include/ATen/ops/special_shifted_chebyshev_polynomial_t_cpu_dispatch.h,sha256=kYNe0g_QyqQ0ZRiASlgcBbiB7Ral9aDKiD0xBYoVgmU,1284 +torch/include/ATen/ops/special_shifted_chebyshev_polynomial_t_cuda_dispatch.h,sha256=7qMHGP8PAOV7kGB3JUOBlUFFE6Ayz0AfoHPvdtmfE1M,1286 +torch/include/ATen/ops/special_shifted_chebyshev_polynomial_t_meta.h,sha256=8vLjnKRVT97Ex69AeXEGLZUGfFBRCE7hoIvyORj38RY,872 +torch/include/ATen/ops/special_shifted_chebyshev_polynomial_t_meta_dispatch.h,sha256=2nNtiOioNw79gFBXNCzqnFDQvq6ZRyrJ7LfOR3b0s90,1286 +torch/include/ATen/ops/special_shifted_chebyshev_polynomial_t_native.h,sha256=qQKQbMOjZElascXKM15L1C8fAaejVB3IV30VnG19xIA,1433 +torch/include/ATen/ops/special_shifted_chebyshev_polynomial_t_ops.h,sha256=twC2i7DUv5FC1RrGtFkOggMKOxq7JAS6ZJax6JIJZhI,5053 +torch/include/ATen/ops/special_shifted_chebyshev_polynomial_u.h,sha256=ju6vHaM7VPDOTJk6W506jeIBuRf0iktOt06XQ5IY7kM,3569 +torch/include/ATen/ops/special_shifted_chebyshev_polynomial_u_compositeexplicitautograd_dispatch.h,sha256=erSZLuGNebN7EzySC8-VYxVbHQf93WJvH_d7T5iOu_c,1692 +torch/include/ATen/ops/special_shifted_chebyshev_polynomial_u_compositeexplicitautogradnonfunctional_dispatch.h,sha256=RoB8FFeH-J3XZNvTTsglRqsDADPDLIq5GDzGuM_gzGo,1095 +torch/include/ATen/ops/special_shifted_chebyshev_polynomial_u_cpu_dispatch.h,sha256=g8_Z6krJVJQNstTNJNijF3GQdKZARo1WTguxB_CDwng,1284 +torch/include/ATen/ops/special_shifted_chebyshev_polynomial_u_cuda_dispatch.h,sha256=yWso1KUiwqNI59jAQ8v1duvDoZ03ZWzPNRvhKT-hkfg,1286 +torch/include/ATen/ops/special_shifted_chebyshev_polynomial_u_meta.h,sha256=simmZuiwwJoYRmz3h1SIORzzETDoiO-fmm_n8OmPPAw,872 +torch/include/ATen/ops/special_shifted_chebyshev_polynomial_u_meta_dispatch.h,sha256=sXj6lMy5fBtEPfCgGcHRYMqTirdhtHTfmvFyzOSLPxs,1286 +torch/include/ATen/ops/special_shifted_chebyshev_polynomial_u_native.h,sha256=v8fP-RASCpne0Szoh-3yUDZw6SXjBljSXckN76QiOtQ,1433 +torch/include/ATen/ops/special_shifted_chebyshev_polynomial_u_ops.h,sha256=6GiH4BZR6aykUCXz6aA1A4mqwx11remD88j7uwvJTMk,5053 +torch/include/ATen/ops/special_shifted_chebyshev_polynomial_v.h,sha256=T1Uc9ohsRc6kHXLMUJa9SmfPo6uZYdrVojcZTwkexjY,3569 +torch/include/ATen/ops/special_shifted_chebyshev_polynomial_v_compositeexplicitautograd_dispatch.h,sha256=XcD7eBiPzVfk9r6EBHMlXC5faZ8EohXgzn4TfCIv1l4,1692 +torch/include/ATen/ops/special_shifted_chebyshev_polynomial_v_compositeexplicitautogradnonfunctional_dispatch.h,sha256=rJChMcBy3YoQWsh7gh8hvfmHHh1ahHmfhR6eHn-md9M,1095 +torch/include/ATen/ops/special_shifted_chebyshev_polynomial_v_cpu_dispatch.h,sha256=fu155XJiSAWEEeAWNRdo5roPIOQwdB-b63FJY_3Xo9Y,1284 +torch/include/ATen/ops/special_shifted_chebyshev_polynomial_v_cuda_dispatch.h,sha256=gj5Z3y1VlGxaVDd0PDpptN-DVKrSQKkm7hWtueactmE,1286 +torch/include/ATen/ops/special_shifted_chebyshev_polynomial_v_meta.h,sha256=rP2jkzYcfocz1SEoXn8Pt2lkM1-Th0q7k7Nzl6cJdaE,872 +torch/include/ATen/ops/special_shifted_chebyshev_polynomial_v_meta_dispatch.h,sha256=aQQX7nojyf0ZmsOJDUxf6dFum41iv4KXWqMS4gpH0zE,1286 +torch/include/ATen/ops/special_shifted_chebyshev_polynomial_v_native.h,sha256=O4S0TrTPXCMPsIxkDiE34l53YoHDtT2vwIbCdqhFpZM,1433 +torch/include/ATen/ops/special_shifted_chebyshev_polynomial_v_ops.h,sha256=zGGnAYj3zMz-vhTzespj_kHofk5fbE9NxSoWBaO38Do,5053 +torch/include/ATen/ops/special_shifted_chebyshev_polynomial_w.h,sha256=ff062I2wZpyX52CxO-pkYpTzw2Peie82O5KqpBVJS8c,3569 +torch/include/ATen/ops/special_shifted_chebyshev_polynomial_w_compositeexplicitautograd_dispatch.h,sha256=DApDCH3UpaMJsyQuwryYyy1NDa221YHOdUOgdMRxaJY,1692 +torch/include/ATen/ops/special_shifted_chebyshev_polynomial_w_compositeexplicitautogradnonfunctional_dispatch.h,sha256=7n2brL__o-6WS5_SensRHYt_TxGeConmwwjgKg4zIZE,1095 +torch/include/ATen/ops/special_shifted_chebyshev_polynomial_w_cpu_dispatch.h,sha256=7cc7E6xiCRB3cVxZ3hyX01fIX81BiVsoHax4Vxx4rmE,1284 +torch/include/ATen/ops/special_shifted_chebyshev_polynomial_w_cuda_dispatch.h,sha256=xuIeusRTrGasn34S6vTrGP4dbq9QYrEw-mX6GO9_XQc,1286 +torch/include/ATen/ops/special_shifted_chebyshev_polynomial_w_meta.h,sha256=Rxu3uSszXcJKusEPc3vxX4Dd9-AVi0x1LrZud9GGOws,872 +torch/include/ATen/ops/special_shifted_chebyshev_polynomial_w_meta_dispatch.h,sha256=y6AmcVGU1cxrOz0iUh7L7oNW8cBfUo4HEgEOW04j03M,1286 +torch/include/ATen/ops/special_shifted_chebyshev_polynomial_w_native.h,sha256=uGZMGpKB_brZE0CK2YUriaCRS_uYT8O-92nAmCYqSe0,1433 +torch/include/ATen/ops/special_shifted_chebyshev_polynomial_w_ops.h,sha256=RTMWrVt-MOKVVt-9QeUlLNNgYX_abQx7w0sW7WMjEFw,5053 +torch/include/ATen/ops/special_sinc.h,sha256=dOxn27pAuQVLCHW1SJRhk1HJ6hBWs_5WT_zZQP9gNFM,1341 +torch/include/ATen/ops/special_sinc_compositeimplicitautograd_dispatch.h,sha256=75w5kc3uR8KfGxppEBOqgT7K9PEyU9X6AMsHARzgKC4,1193 +torch/include/ATen/ops/special_sinc_native.h,sha256=3mvrXOhGYB6Ar3lV_sWbxPXt-hQM8WQdN00KiW4Xuss,820 +torch/include/ATen/ops/special_sinc_ops.h,sha256=cSC2g_mGiFif25xqeaM1yRs02TWoJTgoLEqWE1V4NLM,1837 +torch/include/ATen/ops/special_softmax.h,sha256=6Qy2obWyDMKmaSWh9N5syX_PN2kgh_-3Kf2nH9NMFM4,1039 +torch/include/ATen/ops/special_softmax_compositeimplicitautograd_dispatch.h,sha256=0mrweuUJko9utkNIE8OzM6L1sDE5KKeY2H4FBQJ7ejM,1094 +torch/include/ATen/ops/special_softmax_native.h,sha256=BxuGqwf1hSQTFLkJ7YBAMYt_gS7F6g0z_ahXCK4lCvc,806 +torch/include/ATen/ops/special_softmax_ops.h,sha256=V98P9CgFRDrFSnixv9hjSuKa7-ivJKvr3YhM94d909o,1417 +torch/include/ATen/ops/special_spherical_bessel_j0.h,sha256=scTpjGJChq4LQH4ubXAOFMBnT6iKzuRX_btYCikyiEE,1464 +torch/include/ATen/ops/special_spherical_bessel_j0_compositeexplicitautogradnonfunctional_dispatch.h,sha256=n1mUx9qXkEFPLwz-pY-ovV0LgJw5JiIwEnejoVhbfGk,1062 +torch/include/ATen/ops/special_spherical_bessel_j0_cpu_dispatch.h,sha256=NODpgKK53LjDW3cDcvjYwlqxPdVBJbBP12dJUlFe1o0,1185 +torch/include/ATen/ops/special_spherical_bessel_j0_cuda_dispatch.h,sha256=3lOLvfVHp9hEGbFYVebfSqXN2RFMBye-Uj3FJHW9Kbw,1187 +torch/include/ATen/ops/special_spherical_bessel_j0_meta.h,sha256=3EyGu4mbyQVBNQa-PkjrxqKyRcbvgSaKztpCwpZScW4,839 +torch/include/ATen/ops/special_spherical_bessel_j0_meta_dispatch.h,sha256=s1x2F0hDZ9NmSi5Kce4hqw4F3OeOew2Zpsyj21zEZ30,1187 +torch/include/ATen/ops/special_spherical_bessel_j0_native.h,sha256=az0P7BJ_srVRHHjfSK5xvbH_7JfHshU87Zlwxw3J6_w,910 +torch/include/ATen/ops/special_spherical_bessel_j0_ops.h,sha256=u4_SBV8IIPTBY2OuJL5pHsH_AueDbN0sHwkCh12Kvdo,1909 +torch/include/ATen/ops/special_xlog1py.h,sha256=QXHUqpho2S9qj5VClFkgKWaliN2_xHSRW3ouCfNfH84,3156 +torch/include/ATen/ops/special_xlog1py_compositeexplicitautograd_dispatch.h,sha256=9kXNHPGFW6QPtOyeqO2WO-SM-d2navaInKr6y-_90iU,1596 +torch/include/ATen/ops/special_xlog1py_compositeexplicitautogradnonfunctional_dispatch.h,sha256=fcgMuHBAkbu1AEWo4zhPnj1zilnRoRfn7T81OdwRZRg,1079 +torch/include/ATen/ops/special_xlog1py_cpu_dispatch.h,sha256=xKxT92Kg9oTC9mp6gEj2Ia5Rx-OYjA4lWtBOj_E9T4U,1236 +torch/include/ATen/ops/special_xlog1py_cuda_dispatch.h,sha256=J4ivdy1aINjOTHKjoY8GNFcJmV5UpwKe53Ujzktu5QM,1238 +torch/include/ATen/ops/special_xlog1py_meta.h,sha256=KSW_Fz5ntUbbWNZfRtJk24aukTiAX3DkFxFNWVCdbXM,856 +torch/include/ATen/ops/special_xlog1py_meta_dispatch.h,sha256=DLf72TaQKCe069MpA-RMkLLnk2JfXOzRWIoWwACxjTQ,1238 +torch/include/ATen/ops/special_xlog1py_native.h,sha256=7I3bFhzwzIXngHFpLSmgJKTLxLyG1PQWuYom3o_Zevo,1307 +torch/include/ATen/ops/special_xlog1py_ops.h,sha256=b6nFz4fQJXlEhK7VHnQGBlTE0_mP4dMekTbXDHba-rw,4807 +torch/include/ATen/ops/special_xlogy.h,sha256=_NkYG7wNcU94VglkRRZylm38keDjpPH_P1IIU96gEJc,3100 +torch/include/ATen/ops/special_xlogy_compositeimplicitautograd_dispatch.h,sha256=3jH_FojbOq6DtlE5lIpLea3dcUxRT2aoo01NkQoKX6U,1894 +torch/include/ATen/ops/special_xlogy_native.h,sha256=zDnl0dVk9R-hOZxbng4CLymi3nKvJ2lcsMZ5riWsWe8,1270 +torch/include/ATen/ops/special_xlogy_ops.h,sha256=70D6zPiUYT6YdDVVDXMDLHE2Jpdj-4J8LeOiG007q30,4771 +torch/include/ATen/ops/special_zeta.h,sha256=GAN2VCvs76HQN1A5Actk366tjvh8G2GzVzf5Kqr49EA,3072 +torch/include/ATen/ops/special_zeta_compositeexplicitautograd_dispatch.h,sha256=fcjmQTDPjOOUQ-I59FSzCI9GtY4o39LMoGTsnED9wvI,1578 +torch/include/ATen/ops/special_zeta_compositeexplicitautogradnonfunctional_dispatch.h,sha256=raEWaxWLaFFex2wJE1NwZU3oV-YFEtydxr-FV5TrTqU,1076 +torch/include/ATen/ops/special_zeta_cpu_dispatch.h,sha256=AcdCL3lAfGsTXZeoXTBfsbinHFQ2U8cwqGO-BVGwvsk,1227 +torch/include/ATen/ops/special_zeta_cuda_dispatch.h,sha256=GfP7--qjelRQzl3Dny9FcOygD0uhEAm8U32ogSdpWjs,1229 +torch/include/ATen/ops/special_zeta_meta.h,sha256=UTxC2DpPoIdoxxsSugIxJwxRBN3dviPN2tHhDD8V0OY,853 +torch/include/ATen/ops/special_zeta_meta_dispatch.h,sha256=LDzTFXcEXSpfAZrMQ7fDnnWuTU4xRRi8P-AueDculEI,1229 +torch/include/ATen/ops/special_zeta_native.h,sha256=mvlzamNCD1AsMquw0L4-UrnLl0IhEhV8jU9dAVptnO8,1286 +torch/include/ATen/ops/special_zeta_ops.h,sha256=ghtOSy01hilA7BoAeAfLy7NK26oxMm6sFmCXEvvCgSY,4753 +torch/include/ATen/ops/split.h,sha256=h5J5YN-6o8LcLUmncFHcDpfiuzyAngeyOIlIClI1g7w,2963 +torch/include/ATen/ops/split_compositeexplicitautograd_dispatch.h,sha256=MncTnMHOMD8wa3XnKCNSeSuiYF4lItTm5aSIgvjpE-E,1181 +torch/include/ATen/ops/split_compositeimplicitautograd_dispatch.h,sha256=xP5zeap10kz2sSHFLfj70bI_aKbhqtGfrtamMcZDYxo,1197 +torch/include/ATen/ops/split_copy.h,sha256=T1d_ziTAqDnfBvHukgeWH8NIBcIgJlItMr0GHwJ0e_M,4201 +torch/include/ATen/ops/split_copy_compositeexplicitautograd_dispatch.h,sha256=gLkjnJtvIgSJajFHwzRzL64lSxKNnx16hLdgdq6XSIA,1428 +torch/include/ATen/ops/split_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=LEb8v_K8qSzv7oDTPcjWpMxFkiffvea0pTH-_4Xa9oE,1217 +torch/include/ATen/ops/split_copy_native.h,sha256=JgOOj-cNRBT41m5tqLnV_BC-8JOnUH0z_RRTKMAd7KQ,918 +torch/include/ATen/ops/split_copy_ops.h,sha256=y0BIomWBnL_ZLMz5F8lzCFiLdGwvflPF-vM87EY_s1I,2141 +torch/include/ATen/ops/split_native.h,sha256=M-8204CbYMMty0O5Xl9Aq0gUXtiFBNtmEZvX4qdP1UE,901 +torch/include/ATen/ops/split_ops.h,sha256=S7hFWxOs5imD6jB2m2X5Kgw9h71BGsmmJO8arRX6Ezg,2136 +torch/include/ATen/ops/split_with_sizes.h,sha256=1rDs3gjWNK924zsgpO5RpQUcb0cbwjy7Y40Q_wZbw9k,1995 +torch/include/ATen/ops/split_with_sizes_compositeexplicitautograd_dispatch.h,sha256=_Q3dRajwCooY93QH0UAGeqO9ceut9_-QzK2KtZ8AtQU,1221 +torch/include/ATen/ops/split_with_sizes_copy.h,sha256=K_pUUDGP_7rZgK-DeYCW-w7wNxAA8uGgkDrfxFrXz_A,4710 +torch/include/ATen/ops/split_with_sizes_copy_compositeexplicitautograd_dispatch.h,sha256=Ad1oZ19zNZrfioXk1-v6_PeqLy_Mtf-nnpvIQBJQh8o,1508 +torch/include/ATen/ops/split_with_sizes_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=L9uJk97OK3OvRibglcpQ7i5yn3rdLQTsmJsbOfeiqyk,1257 +torch/include/ATen/ops/split_with_sizes_copy_cuda_dispatch.h,sha256=QZROOLbq2U5Ek4ceGkKlHlEfSMPfLhkl6qcy7p6zX-8,1466 +torch/include/ATen/ops/split_with_sizes_copy_native.h,sha256=M8ttUaXpkR2CtuTKAIn1VTmkPqk-odK5QDAnpVA7ao4,1078 +torch/include/ATen/ops/split_with_sizes_copy_ops.h,sha256=NJe6o-MdJX1_iqlSRKmvyhRFK6OE0H5Lsg2PfgQBh9g,2224 +torch/include/ATen/ops/split_with_sizes_native.h,sha256=xqY1T_Z5nhj29HtYCj1bELvjmKP0M-O3QxyT4EfiGeU,929 +torch/include/ATen/ops/split_with_sizes_ops.h,sha256=LRoERWxGmxLOZonierXl-g2P-1wsULymSvfy3Ymi_TI,1454 +torch/include/ATen/ops/sqrt.h,sha256=XHOet260Go_8JBKbHvsAmSvVO8VYY0R-U7f-pQlfb7U,1397 +torch/include/ATen/ops/sqrt_compositeexplicitautogradnonfunctional_dispatch.h,sha256=uQGaFwBmDDOgAO2SYg66pCnD_GXHt4ggTYh5ywNphR0,1091 +torch/include/ATen/ops/sqrt_cpu_dispatch.h,sha256=Fjy3pPCURmAFmAkWN3cm__ae41FJk5S1Yc1ToCqTkio,1174 +torch/include/ATen/ops/sqrt_cuda_dispatch.h,sha256=ypIukgmtYEFqQPBZ3Rr7XYp9wR3UNdtUaMdok92W7vQ,1176 +torch/include/ATen/ops/sqrt_meta.h,sha256=903aTi2X5JhJN9H2DbHxHH3rq7iUoR8W9qWSmTrfcNo,819 +torch/include/ATen/ops/sqrt_meta_dispatch.h,sha256=qGLw8iJGQ7_9a2Rxw37al70Kh0fSFlINCVYQGMTKtiY,1176 +torch/include/ATen/ops/sqrt_native.h,sha256=_fnb5p5W8TeN3EHSMDeL3BvUlbvYaApZSbbPxaxbcbY,1317 +torch/include/ATen/ops/sqrt_ops.h,sha256=kpPjUDtHcGFVCngSvVx1TJ3LkIf4tJkopYpcCyQ-aPI,2282 +torch/include/ATen/ops/square.h,sha256=e4KvE34EgrDnOnTd6m9EfNbsN9EKtBEMV_-Z0AwFwNM,1423 +torch/include/ATen/ops/square_compositeimplicitautograd_dispatch.h,sha256=xo0-A41iPUchBZ6E1Jk3qQuzVypJs2pQmMZHup0_Xzs,1226 +torch/include/ATen/ops/square_native.h,sha256=lKsznyzKFd9EbQjzR8Ge2RkYTPK7YqttZ1Psp9uPq5I,859 +torch/include/ATen/ops/square_ops.h,sha256=dJQh2m70S1BraIARQ4IcsDQHUh1tcJehact_DyEoWEA,2300 +torch/include/ATen/ops/squeeze.h,sha256=g3gXbhI_caJqHdx3Au6NHOKNySusUnawN104FuUJ5Ls,1466 +torch/include/ATen/ops/squeeze_compositeexplicitautograd_dispatch.h,sha256=ZSb1yOyzqe5O_D35hGbhCsDNYuUUqn0DXRMSAkiI2C4,1353 +torch/include/ATen/ops/squeeze_compositeimplicitautograd_dispatch.h,sha256=JVHvTW-l-udf6fAuRXEMJTTFnExQg1fC_iTpfDG6Xbs,1105 +torch/include/ATen/ops/squeeze_copy.h,sha256=IKc8Z-e94OyS-YqJ-q4u0MakENZ2Kb58c3Jr2hv4_ZY,2745 +torch/include/ATen/ops/squeeze_copy_compositeexplicitautograd_dispatch.h,sha256=7nDV0C-X_qZkEhNEWYl2sAjoIxqrSGnbmpdRWm6omeY,1539 +torch/include/ATen/ops/squeeze_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=ZsKfXMl5q6az4lo7xuMbL8J8XTZhNehfHjyM3AiTjNA,1204 +torch/include/ATen/ops/squeeze_copy_native.h,sha256=ICFWFY5LWrqAgt4taqvLKW91IxCekEhhFVucCwDlb2o,1194 +torch/include/ATen/ops/squeeze_copy_ops.h,sha256=0hEkbhzOho930mXLaR3ahNFgiSE4bbcyZWpomRDeSd8,4369 +torch/include/ATen/ops/squeeze_native.h,sha256=zH47J6V4oltQD24ko5toAMF3Gv2LjTXxpmS6eKN8Z14,1663 +torch/include/ATen/ops/squeeze_ops.h,sha256=sM6XFSX9RmWSc_-FUr4yxRGxqS9mA5t-opf6al_hXCI,5199 +torch/include/ATen/ops/sspaddmm.h,sha256=GCf00WUgI5klLqG9v4biTgi7xQgcRMmMjnh5XNtRom0,1861 +torch/include/ATen/ops/sspaddmm_compositeimplicitautograd_dispatch.h,sha256=Gqt36TJVgrsynX4Bu5jhgrpCoIcXDfD7y5BJw6UCAqA,1125 +torch/include/ATen/ops/sspaddmm_cpu_dispatch.h,sha256=V718TF-MF5Z2R6ABWt6L91UDLoyoQ26geGbvu6cmg8s,1287 +torch/include/ATen/ops/sspaddmm_cuda_dispatch.h,sha256=WSt5AH5f5s0zcN-pvdG-d5-F4NkGB0VOWgz-t3VCazU,1289 +torch/include/ATen/ops/sspaddmm_native.h,sha256=fX2tMqiLDgc0JecPQVJqqvhaPFN2h_mtWYSnpi1pGEc,1603 +torch/include/ATen/ops/sspaddmm_ops.h,sha256=qEu8LzxebW-oNipAhSdLtDtLJejE45P_eEkVejICDyU,2494 +torch/include/ATen/ops/stack.h,sha256=aMZdsxNT_JVDmSOHo8hmkcJGOnpOj091zDnkf_X4Cfs,1383 +torch/include/ATen/ops/stack_compositeexplicitautograd_dispatch.h,sha256=ZvwP0AOFPMgNQaNxuwQZXYpa6xPEq6HNJc8YD81w4_g,1212 +torch/include/ATen/ops/stack_native.h,sha256=6A10LdJLtHKKarlThokYrAWVHNPK7o6hJwgpGHNmTKw,832 +torch/include/ATen/ops/stack_ops.h,sha256=gn4mp0uSj5_0qhMZoPXDCVhvU_KapoUfdT9OLY25og8,1885 +torch/include/ATen/ops/std.h,sha256=Sn5EBPoguw5p7unsLVcSd-2D1bjvxp8N-_IA6G9QKDk,5125 +torch/include/ATen/ops/std_compositeimplicitautograd_dispatch.h,sha256=vh-g1_c14sj0iLWYrqSbLBoow8M5uyorqz5le_UdyiU,2275 +torch/include/ATen/ops/std_cpu_dispatch.h,sha256=rOfugf4oSD9EcGLjyNQJ8RVW-HKh8WyyBQAKbr4EL8M,1467 +torch/include/ATen/ops/std_cuda_dispatch.h,sha256=yrOm16B3Kzeg_zSI60BHl37n-dDsWcpnuo6JuyR_6fE,1469 +torch/include/ATen/ops/std_mean.h,sha256=OLB9DRQvFCmebTSoTVdF_ebcwZYNfh8NIaObTzhPAmE,3471 +torch/include/ATen/ops/std_mean_compositeexplicitautograd_dispatch.h,sha256=MGcesqjaQ_c87syWBMhvYTE26nxIV-8fOEQKS8iuN44,1437 +torch/include/ATen/ops/std_mean_compositeimplicitautograd_dispatch.h,sha256=BblMcekBck5mtdvUcXZPNT3J4W934QxfS05MZwmAIRI,1527 +torch/include/ATen/ops/std_mean_cpu_dispatch.h,sha256=_rbTV-XV9by8EEazPrj_t_0P-1sIIrtOVpJ7PUxQfEU,1128 +torch/include/ATen/ops/std_mean_cuda_dispatch.h,sha256=dGs3PuoL2P6U_B0oQiOs5KUOr7KjYk8c5HSOSSMxA2Y,1130 +torch/include/ATen/ops/std_mean_native.h,sha256=iSULCV6JEz-Bt0jGz8RA2_NLIc8qyRD0lHnyy88B-Nc,1691 +torch/include/ATen/ops/std_mean_ops.h,sha256=oN5hV1aMzT93kGWGdks0y7a69VdvWl0UJm6kh43wg9A,5950 +torch/include/ATen/ops/std_native.h,sha256=W4VuPglZYrMxCUVgCSiEmnvaXIfAWhEC0ndrSrTlk1k,2266 +torch/include/ATen/ops/std_ops.h,sha256=2mjyC0TWbl2mfA3In0vJx1hc8vTe2m7DUQvbrs7w87A,7758 +torch/include/ATen/ops/stft.h,sha256=pUAXR5Z9uP9mfVWWuM2zXVYu4kX66kjOWW0RIZ6fEKo,2326 +torch/include/ATen/ops/stft_compositeimplicitautograd_dispatch.h,sha256=fq-SB2m1ZGwvor63KYlNYaUpOmdt-ka16-0riYisvcs,1770 +torch/include/ATen/ops/stft_native.h,sha256=xPgk-E3809JgwkfSLVYg5CTZLxtae7BTyCnBpGTb4SY,1521 +torch/include/ATen/ops/stft_ops.h,sha256=AO0RvgR5c_Uj9E2qv6Bgb9RX09AM7oa4TkkyK8n-Sf0,3599 +torch/include/ATen/ops/stride.h,sha256=sInTcrRrdIimjiCjUtzDIhlTCSfzu6_sXBED-u_VbVo,1111 +torch/include/ATen/ops/stride_compositeimplicitautograd_dispatch.h,sha256=ZFVhKk4rHIj2XHrd_U1d0zhGPEcjSK_HX8fInlhRSAQ,1096 +torch/include/ATen/ops/stride_native.h,sha256=Q7fwpCln3h4T-GapAHqDP2i8tVvpA9nei7x265bY1Tc,808 +torch/include/ATen/ops/stride_ops.h,sha256=jrkWUwA5907rbqMhhVbutYeWfBvBqSK_7KUJMLXyFlU,1825 +torch/include/ATen/ops/sub.h,sha256=MYqpBoJLT6QWdCXNB-soiiYtjcoMpuMjuYDht_fuFQ8,2392 +torch/include/ATen/ops/sub_compositeexplicitautograd_dispatch.h,sha256=f8GQBnN6cbZTLfhmkvqs78JiUfgN5TUnFiMelG9M25A,1428 +torch/include/ATen/ops/sub_compositeexplicitautogradnonfunctional_dispatch.h,sha256=tSjvcBgF5VHlZo6mbEdM-tKUum6YSLhG3wJg-fJ-Uag,1197 +torch/include/ATen/ops/sub_cpu_dispatch.h,sha256=wlywFWikE1X9FAEVaocFH4deo6I857FfFOoKSmk0AKc,1384 +torch/include/ATen/ops/sub_cuda_dispatch.h,sha256=3_CQhhSPJB8Xtxl32zVdmPLWNPcnaSbaO28m4BBxl58,1386 +torch/include/ATen/ops/sub_meta.h,sha256=QWUlFb4sqT61UPmwMyuIfVQbrfDC2OnLLZ_mWuBtv1g,877 +torch/include/ATen/ops/sub_meta_dispatch.h,sha256=gEke6lfMhGgzXCmUirOAVAYw3nuBOEsdASP0_aAVzzs,1386 +torch/include/ATen/ops/sub_native.h,sha256=g-aT-d_XtN9_3eygYLCyvCTF3ZFYk936RqNlbbE_Hrs,1837 +torch/include/ATen/ops/sub_ops.h,sha256=TZPEReaPghV7_6Zk-V3pMCRR_TR5sgXVhSH5KhA0_cs,4986 +torch/include/ATen/ops/subtract.h,sha256=Q45eKrr1fKZAxjez13K74pSMaQVzco5Y4PDww9jCPHw,1863 +torch/include/ATen/ops/subtract_compositeimplicitautograd_dispatch.h,sha256=Fln9p4a7kdCr8BIq2Jv_ejV2U_kemdIMgEv3yHvZmrI,1665 +torch/include/ATen/ops/subtract_native.h,sha256=SXUK8e_f5VMfHFm0DwiTfUN0ViNiuIt2GsdAnIhN7OE,1242 +torch/include/ATen/ops/subtract_ops.h,sha256=MLfovAPIBCPyMlCUxXO7O7i-ehB05M7IBdOpezPRUuc,4285 +torch/include/ATen/ops/sum.h,sha256=2HWkcxc0bZOHg4P8SMRm4pXqCNUNio8k-G_85pFVtzY,3661 +torch/include/ATen/ops/sum_compositeexplicitautograd_dispatch.h,sha256=Zqeei8aGYMkjMdGYlzIj2a_8LLXe3Y4TNiOpBvNGCbk,1313 +torch/include/ATen/ops/sum_compositeexplicitautogradnonfunctional_dispatch.h,sha256=6OMDNRMBC_1bdtDFzODgwkObyGRUC4m88xaMPRHjZXA,1144 +torch/include/ATen/ops/sum_compositeimplicitautograd_dispatch.h,sha256=_cHp8x4eMmzDEBrfK9XMDLQnuKMHH-miW4BJFmUqVrY,1430 +torch/include/ATen/ops/sum_cpu_dispatch.h,sha256=tnvEV4VVVjQvFS2Y8B7u17g2G8zSLbUhe3dFvYJ1quY,1410 +torch/include/ATen/ops/sum_cuda_dispatch.h,sha256=HTtoGmZhrv1YuW2EFhTViJYX3AFtIpLZoXjlI2yN9Mk,1412 +torch/include/ATen/ops/sum_meta.h,sha256=Wiq_jbANgPZv7XqhNrCZPfcAbW8p6ae3i2bxz-B0mY8,912 +torch/include/ATen/ops/sum_meta_dispatch.h,sha256=kuoLlkGprcuL23_1S7q32G6SwsdNC5YoK0tq8LQkiIw,1412 +torch/include/ATen/ops/sum_native.h,sha256=pm8BdxAUUBy85R6c3IhkG94YgCL3vIRWPjoM0DKhmUA,2179 +torch/include/ATen/ops/sum_ops.h,sha256=hoBVoK1v5BP2ej5EttPnTHRij-XWyERO8dNnD7Bfkfg,5446 +torch/include/ATen/ops/sum_to_size.h,sha256=LodmqMNMI_iyxirxS661UHUDbgcwUgNd5ee4stDg9BQ,1261 +torch/include/ATen/ops/sum_to_size_compositeimplicitautograd_dispatch.h,sha256=jr0I3ZTISd2BSrRxpisHDYrSw-TfpyeNt-AqT8JyI7k,1137 +torch/include/ATen/ops/sum_to_size_native.h,sha256=fMQvE6pcoo60o4GG2mK-pVKHUAbpdIbj7FL1cEXy-6E,768 +torch/include/ATen/ops/sum_to_size_ops.h,sha256=MpgsrwhZGkGR0t82hvmLWx2OyShelBCxwmX0d7mKdFA,1314 +torch/include/ATen/ops/svd.h,sha256=ZmGkzEtE2hejqYdbyzFBwfXWGcfSVDiZ4RPDHkC9Z2U,1839 +torch/include/ATen/ops/svd_compositeimplicitautograd_dispatch.h,sha256=86lNN8QpkMUKK4ywF4lTbcilYohIoU3zjJY3PO1MDtw,1446 +torch/include/ATen/ops/svd_native.h,sha256=29sB2pVpERq3myRjUcxcQsQGdr9zjIBFq6CfPIHLJ5c,974 +torch/include/ATen/ops/svd_ops.h,sha256=ShDjnRQF7WjasPTQdUZ2kxmkV2E1tgJ-wXKkMv3qkow,2387 +torch/include/ATen/ops/swapaxes.h,sha256=29t8aYD9AadJpL94IIqTAbeLCtMiD0CpdM9Qz-CYreM,971 +torch/include/ATen/ops/swapaxes_compositeimplicitautograd_dispatch.h,sha256=hB1PurvK8WFYBgDQGSAJYFq58jIPRo-stsWi4VcMQnY,1133 +torch/include/ATen/ops/swapaxes_native.h,sha256=F80B2j2UN0lh7Wz49aqG8XrQRjZ7O-7FTZ7IJq1k9ds,845 +torch/include/ATen/ops/swapaxes_ops.h,sha256=0WvJ4_MIi3tSxw7FqV6XHIiAy5aAZf3TTO82hXy0V20,1928 +torch/include/ATen/ops/swapdims.h,sha256=1kYVp-XKCe_sdPfkoW5mBgh-I3WuzRytJlK6ctolnlw,965 +torch/include/ATen/ops/swapdims_compositeimplicitautograd_dispatch.h,sha256=V997x7yfEy5GAgLmlEWpmCy2GZr8C3qxPgpa3pldPq0,1129 +torch/include/ATen/ops/swapdims_native.h,sha256=5oK3MGVh6NzNMr8OyLolHAhKWV-wAJbXrAzDjvpGfHc,841 +torch/include/ATen/ops/swapdims_ops.h,sha256=nOzW_mchJnSlWG0zziJb0xqgGqHTBj0Tzi6qJVFUw4s,1916 +torch/include/ATen/ops/sym_constrain_range.h,sha256=920VqtO_BcyYZBTg9lFKZDlBe-RvK5PDMhL0Ba6bieo,1066 +torch/include/ATen/ops/sym_constrain_range_compositeexplicitautograd_dispatch.h,sha256=TvCSeIOQyBnbOIBTssN9TaRzOQU-It_r0SfUM3-Wt3o,1115 +torch/include/ATen/ops/sym_constrain_range_for_size.h,sha256=22zDubFHrdSL9v8EH0CXfhpLhYrxmx3GCDZmbhG0STY,1102 +torch/include/ATen/ops/sym_constrain_range_for_size_compositeexplicitautograd_dispatch.h,sha256=hcZ-2ee1dcMBOJYP6p4nAmysKvGxbL_1ympEzo0SEE4,1124 +torch/include/ATen/ops/sym_constrain_range_for_size_native.h,sha256=V9Pu25AdeESmbhN5X_Sk61QlmEsPHveq86Trl6UX-8o,836 +torch/include/ATen/ops/sym_constrain_range_for_size_ops.h,sha256=6Vp1eZJOedqk7QXKg1-UH1QB59M-HHSQyA6NOX6zCJ8,1460 +torch/include/ATen/ops/sym_constrain_range_native.h,sha256=nhPlVm12i5YGm5Tn8y__6TqwvMGDfgl3snli34V7SCw,827 +torch/include/ATen/ops/sym_constrain_range_ops.h,sha256=xx-2cHXUgNvFb1UX_xACI572JLqDO3hWMazv9wpsePU,1433 +torch/include/ATen/ops/sym_is_contiguous.h,sha256=545hxC-VtPox5g4DivnSCriq5LqfQwK1i6NuoVL4Urg,1072 +torch/include/ATen/ops/sym_is_contiguous_compositeimplicitautograd_dispatch.h,sha256=EtqpN5fJ44t_34qhmGV-C0Q1JeA_DBIeazqCKsRW_OQ,1093 +torch/include/ATen/ops/sym_is_contiguous_native.h,sha256=3RShIYGXpoNhpAQl1Zoe28DfJQ8zcHqpIaIwjQUDlsA,805 +torch/include/ATen/ops/sym_is_contiguous_ops.h,sha256=71V5VljVovxsHPIJ8TLXgT9fG_IZm2waAuajYfdQUkU,1379 +torch/include/ATen/ops/sym_numel.h,sha256=U7TIu_SZShOaHN_U0CHLIjLNPjab3dbBLluJhIZ-AMw,915 +torch/include/ATen/ops/sym_numel_compositeimplicitautograd_dispatch.h,sha256=WJtd4KNS4NlRaE_Mf0OKqoEiDwBsSk-_M1wdDvp6MDE,1022 +torch/include/ATen/ops/sym_numel_native.h,sha256=uWIG12AsDJhTVvdtD_dBf3312hpWVAE5WKSH7Fd0wCw,734 +torch/include/ATen/ops/sym_numel_ops.h,sha256=Amr4Dm9Vyd1aj_hA43G3oEJPB_S9v9X4KdpQHhnibq8,1223 +torch/include/ATen/ops/sym_size.h,sha256=YMBukl2X2EejU3pBn0vq8SBP_RZJf9xaHZxFj4BH2sE,946 +torch/include/ATen/ops/sym_size_compositeimplicitautograd_dispatch.h,sha256=vbLHrJfuxmDBvetS4XZ0PAJveyv5dKl_C5Qz-5elcVY,1034 +torch/include/ATen/ops/sym_size_native.h,sha256=edxQty447HlHRaNToij0mdamySiHpHOIRaxKEwPSorU,746 +torch/include/ATen/ops/sym_size_ops.h,sha256=EdhRVhPryJC_WzSDkzQ0Ey2FIuCmKst9EwFKDbnlDXY,1275 +torch/include/ATen/ops/sym_storage_offset.h,sha256=ErnY_L9r4RDI7JVm-vbNfh24IcPr9KRAFV3Q-DSXc9g,951 +torch/include/ATen/ops/sym_storage_offset_compositeimplicitautograd_dispatch.h,sha256=E6cKLs_DkINY2sQ7QOQEZLDsH3_g2zykHyIIR-GWTHk,1031 +torch/include/ATen/ops/sym_storage_offset_native.h,sha256=3cr2k0TMkIsXHRH0bUpGD5F6JTrCQjg0iEysW4j3MqQ,743 +torch/include/ATen/ops/sym_storage_offset_ops.h,sha256=rnQF8QUvu3D6iHbsD7UvCvLFQsU8ZlAtnVi_UHCEdGs,1250 +torch/include/ATen/ops/sym_stride.h,sha256=tuCUaUTJ3sIRmH1EHh5cOkp9mKlO_Y35JuVp4gQ38SU,954 +torch/include/ATen/ops/sym_stride_compositeimplicitautograd_dispatch.h,sha256=jYCNOtxkAX8QMBEWhaNhJ2L84392g_3-DDLuyv6v0Ik,1036 +torch/include/ATen/ops/sym_stride_native.h,sha256=oiBaRgEY-s-uEXhvmQCGeyjYTzAaXLuVwsn9jNHE7Y0,748 +torch/include/ATen/ops/sym_stride_ops.h,sha256=niaNctuWgckNaqbYcNKZepDU-dV_i00ZibxxBjPOjZY,1281 +torch/include/ATen/ops/t.h,sha256=u9g5X1-el2ibTTDSTEEWH8a5U7aoLdD9Cazdok_vtFc,877 +torch/include/ATen/ops/t_compositeexplicitautograd_dispatch.h,sha256=HGXpPcJ8yoJIbS8RXC669bcIkQDeKD80eT4irFyJQHI,1059 +torch/include/ATen/ops/t_copy.h,sha256=7JteRF2KvB6-IYXJv9cce4ThAbdZXuhV5VqDOWVlrA4,1281 +torch/include/ATen/ops/t_copy_compositeexplicitautograd_dispatch.h,sha256=m-nVK9W2tzdV9yjvZ7VIISNtTZpcDbFSL-nLz3uyRUA,1121 +torch/include/ATen/ops/t_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=SkPqxSVglOra5Q-HrMBxMRkx8HTe6le1rc_YRG2NAjk,1044 +torch/include/ATen/ops/t_copy_native.h,sha256=qgQDpbr__9ImbYmJTadCNgdN7_S2TtqRZHRdKkuXlD0,808 +torch/include/ATen/ops/t_copy_ops.h,sha256=iHF3QUMZ9_okqOLGirzFBEHOpXYbaDy473l5lkblOgc,1801 +torch/include/ATen/ops/t_native.h,sha256=Npm4nLUEvm-88NgmL1BaTVZ95i5SQDvukPAhQbtZlRY,771 +torch/include/ATen/ops/t_ops.h,sha256=XXWy-LxZUlJF70KheMCktUoIJrT9TqhHRph-9hEFvOM,1686 +torch/include/ATen/ops/take.h,sha256=h9GX0DT2urGGw2U86S0Mw556saj3tlVAkSsTtP4Won0,1402 +torch/include/ATen/ops/take_along_dim.h,sha256=XOHQnR2X8oeOETCx_bM6flt64BixVLjhzbX72xhiJaI,1700 +torch/include/ATen/ops/take_along_dim_compositeimplicitautograd_dispatch.h,sha256=Gfq5Pm4N_K6TazsL81p6LGq-MT14H_Ywbl4ewL_OV3M,1403 +torch/include/ATen/ops/take_along_dim_native.h,sha256=_uspp1VN-9qn0Ijv4x_Het0ndOdCONiPIA7BeEsEgGI,955 +torch/include/ATen/ops/take_along_dim_ops.h,sha256=0EaGtFKQaK9GVN6nJMkBd67BwfwHUi9RTTMbaWUgZgA,2235 +torch/include/ATen/ops/take_cpu_dispatch.h,sha256=7FWXQJj4mjC5DDzvCcyFWIrKRILuFTnJIzg5HCIDWYU,1203 +torch/include/ATen/ops/take_cuda_dispatch.h,sha256=W7pCDCHcS0Zeqwk0U0ZEtQO3S4TGrclVP-jpOjPiPvs,1205 +torch/include/ATen/ops/take_native.h,sha256=PtbTYdgmS0DmEMgiQDkfCIG9ZvEeZ6Tkmk4SIYBK7TE,856 +torch/include/ATen/ops/take_ops.h,sha256=eUuVYWUGMPVcDXv91rDuCGo1CbSL54xkQ93NR6hmtCw,1961 +torch/include/ATen/ops/tan.h,sha256=Qg8l1Z-sIoWsg7ZVx93-RgtyNRlZ_-V5kV7y3vOAdSo,1384 +torch/include/ATen/ops/tan_compositeexplicitautogradnonfunctional_dispatch.h,sha256=w4l5wEuQHx4oK9UYiCKkhhvljve0ZQJTukuJ8u4it1I,1089 +torch/include/ATen/ops/tan_cpu_dispatch.h,sha256=trzZfZn-aDVkyhVio_K0AKNJR8KEULZzks0eBhQY-gY,1170 +torch/include/ATen/ops/tan_cuda_dispatch.h,sha256=cV7wjgxx4DrJjIAH9MP7R6Z48DVU6zcYSrd3iEjIlrA,1172 +torch/include/ATen/ops/tan_meta.h,sha256=lhLoE-k21uIROQU6KgNiSfx6sEiPYmELsqqKSbP8Cis,818 +torch/include/ATen/ops/tan_meta_dispatch.h,sha256=yZY_4gYPtWeSF2ScksoS-7-R006Oy1e_IWdauAHMEO8,1172 +torch/include/ATen/ops/tan_native.h,sha256=Hs6jUWODlLEQGErWtVVAywRsxHXxT62xbiCoRzHhhCY,1243 +torch/include/ATen/ops/tan_ops.h,sha256=UqayTHgIMHv66ZTJ1Jgm9rqZ4BrAEU4yfc2EKXJnHdw,2273 +torch/include/ATen/ops/tanh.h,sha256=kYp_0mwFqISveSTqRtTKYBfRdqVaG5ocIldAaU6HQkg,1397 +torch/include/ATen/ops/tanh_backward.h,sha256=ezRTu-KK2nhpBGZ7GicCvGZZjUktKxWZ7ny3yKiaJak,1634 +torch/include/ATen/ops/tanh_backward_compositeexplicitautogradnonfunctional_dispatch.h,sha256=gJVoxe-WXmZeREyVz-QfYCERYWAivd2YdiNb-PqvR5g,1085 +torch/include/ATen/ops/tanh_backward_cpu_dispatch.h,sha256=e-mpAqy1J4hfXuf2vOJKuvAbnRqNZP4qJu8c_hfvLbw,1268 +torch/include/ATen/ops/tanh_backward_cuda_dispatch.h,sha256=nufDEwmP5T_896-UkyO4dVCW679J0Q6BiHUDMae2G9w,1270 +torch/include/ATen/ops/tanh_backward_meta.h,sha256=TAXzJe2rbGsOtSbf5XTKFoSHTnVlglT80tKmvJIgVPE,862 +torch/include/ATen/ops/tanh_backward_meta_dispatch.h,sha256=yJf7-YwZXPFeDJe_Bz3PHMLL0HPAYDy3KhypxUY8WPI,1270 +torch/include/ATen/ops/tanh_backward_native.h,sha256=DUJO-_IQirCBHVwmL1M0SKTyR_vRPvWD7FeZrfkOwVo,912 +torch/include/ATen/ops/tanh_backward_ops.h,sha256=BS3ybMiHGVtkPfYFZ0CjO__3IRbW9MXs0zfb01XUMOM,2105 +torch/include/ATen/ops/tanh_compositeexplicitautogradnonfunctional_dispatch.h,sha256=aqKJ1EwOsNGD36l-9LXJXkUnPuRN3TC8eb38yjJHkbQ,1091 +torch/include/ATen/ops/tanh_cpu_dispatch.h,sha256=2SsHyPlvZlX4-mIwk-6USAQKZWgeSfLQ_xTFHK2N1L4,1174 +torch/include/ATen/ops/tanh_cuda_dispatch.h,sha256=hKlzb5VLTVOu6BQ7iQMr6dC5EV-WHFbrKkCJA--vSZ8,1176 +torch/include/ATen/ops/tanh_meta.h,sha256=hkBWNzudzO0DCxSe9tnMWdKkOaSGaHYNFpgUjmmEaIA,819 +torch/include/ATen/ops/tanh_meta_dispatch.h,sha256=ykbeNysj288-4T20qVbMWKqs7T-ttRkV3pFyGNytRjc,1176 +torch/include/ATen/ops/tanh_native.h,sha256=kueQZXBZYfIHkwT8DXIsVow6iDGYDhYaAyecTk0u8wU,1560 +torch/include/ATen/ops/tanh_ops.h,sha256=7UuSsFu0a67RTSALWkV_L1uK1zWWxzKYf1oYDc_ZEXc,2282 +torch/include/ATen/ops/tensor.h,sha256=bCjxWtrcaqT6yjX9fpCSrf8rjUqUPYy-GyFTcJATMZ8,1885 +torch/include/ATen/ops/tensor_split.h,sha256=efT_6_tZiIzuLhijUBrGBAIzGkeFy3AWC0_ji_iCVb0,3460 +torch/include/ATen/ops/tensor_split_compositeimplicitautograd_dispatch.h,sha256=z7Nj8nXQB2YdKOkxakeSAtLLLVJyjauhXgqj5bYLlUw,1569 +torch/include/ATen/ops/tensor_split_native.h,sha256=k28PvuZEpNl3WEazefvMr_fe4BZP0n0V2Of13lXfNcY,1075 +torch/include/ATen/ops/tensor_split_ops.h,sha256=sYJ_EBA-YWX-oQzGW_1F8XSU0HvG6KhXoeQUSTTmY7A,3026 +torch/include/ATen/ops/tensordot.h,sha256=QPBJ_4TojGG5yd0p4N-MHzRiLmmbVLCRdrneu5-SAzM,1791 +torch/include/ATen/ops/tensordot_compositeimplicitautograd_dispatch.h,sha256=tAuEPyNR5kz_zRUhD2tgienUrhF59yhVOsN-ukwJsEo,1427 +torch/include/ATen/ops/tensordot_native.h,sha256=VwWQpfG0Ed3MlG4d1tnbl4wECAlwZ4a2wY5VJyTJ6Q8,976 +torch/include/ATen/ops/tensordot_ops.h,sha256=kbv4o4q_OKRIKxIunsKAs6c1prBwj4bbuD8_n1o7wW0,2349 +torch/include/ATen/ops/thnn_conv2d.h,sha256=I6YSsJNiruV2dYqPhLaRmcb4RkYboe-rSoGAW1D7Sqg,6874 +torch/include/ATen/ops/thnn_conv2d_compositeimplicitautograd_dispatch.h,sha256=a2rbACf0HJVGCfxfmDeAKMr9IjcTBwDSH8KysBwxAt4,2435 +torch/include/ATen/ops/thnn_conv2d_native.h,sha256=daD5ULTl-Nz2ftBRfic8sMaBTh5n7IIajxjZ7KXK9uk,1119 +torch/include/ATen/ops/thnn_conv2d_ops.h,sha256=OkQbjfqI4nUo-3eyGqa6SV8I4iKv3H9rTtynvlWDgLE,2903 +torch/include/ATen/ops/threshold.h,sha256=sAc16VXqsKz9I28SSH19oEVP2L_YZ1midyk-hq9_7t0,1886 +torch/include/ATen/ops/threshold_backward.h,sha256=DNi6T1wdRP38VeX0DlU4YfVhNtsgATfyshtynOlkXHM,1843 +torch/include/ATen/ops/threshold_backward_compositeexplicitautogradnonfunctional_dispatch.h,sha256=N8Pm9v2Yqvy4bA8Kq6Dg7lf0abc-HDCnjV7CmZZpy9I,1118 +torch/include/ATen/ops/threshold_backward_cpu_dispatch.h,sha256=u57AxRobSuYCdoRkgMFDtVu35g9w63sshTpTsDauDmI,1367 +torch/include/ATen/ops/threshold_backward_cuda_dispatch.h,sha256=j4KfV8-UwIgMVJqVLpmczXkBdCbiaYp7jCZpd0Jw0P0,1369 +torch/include/ATen/ops/threshold_backward_meta.h,sha256=6J4aA7eeiPrJ4f61hZp7axEzRP8gYCDLHgszmtfq6eA,895 +torch/include/ATen/ops/threshold_backward_meta_dispatch.h,sha256=EvDNFutPr3Q8m2vACRHh08kM3voarQ70AInP6CAxQmA,1369 +torch/include/ATen/ops/threshold_backward_native.h,sha256=xIfOi-zOnZfD2m3bUQ9RQGwLp65OlBM5Qt7CviWDkZI,1845 +torch/include/ATen/ops/threshold_backward_ops.h,sha256=nt6VB43rGB7Sqq5WdVXO1cGVHNay6mSzhITohPmQlao,2319 +torch/include/ATen/ops/threshold_compositeexplicitautogradnonfunctional_dispatch.h,sha256=u_TGVLSgM00QuS3dX7or-r6ioFl_EME2RYoHqzFxAJA,1213 +torch/include/ATen/ops/threshold_cpu_dispatch.h,sha256=MDKpKlo2S5MlKBI06NM9Z-8sClebfx4l-I3k751sCfM,1418 +torch/include/ATen/ops/threshold_cuda_dispatch.h,sha256=jH50Z8yjlC3826l4ey52VkGCHjbJUSgjLZlxEHIq32Q,1420 +torch/include/ATen/ops/threshold_meta.h,sha256=GlsZ8nQLei8OHJVb5wDJOT5OrcA-ZvlOXVAXZZN2TW8,880 +torch/include/ATen/ops/threshold_meta_dispatch.h,sha256=No_lE_Wzu9U-tuplhJJfHaDj2V24xOxmIJSHd6Rl3yU,1420 +torch/include/ATen/ops/threshold_native.h,sha256=0e-KNb9oVqqsI1jsuR0UItVc6hsmtZXO0N9qLUzjubY,1042 +torch/include/ATen/ops/threshold_ops.h,sha256=B9Gw65He73UbJoWuxNsjbsQo_TuMIT9bi-daG5xIWIM,2879 +torch/include/ATen/ops/tile.h,sha256=GL5i3V9uVv8n0DRi5wMZAdmybXdupU5TE3b6mRIioQw,1605 +torch/include/ATen/ops/tile_compositeimplicitautograd_dispatch.h,sha256=EMeOEP8hHt3rmptFkE2CpFe0BM0BfaWeR_FNCTEMHQM,1123 +torch/include/ATen/ops/tile_native.h,sha256=j6v1wvEv0nqUwUJmMgYiXmrtw3MH6pKoi8wR4pEiTk8,761 +torch/include/ATen/ops/tile_ops.h,sha256=tll5NeidjQL9VeIZnMjXkHxtHXJZwHLuptuMlMl0hzQ,1293 +torch/include/ATen/ops/to.h,sha256=uk72uhzpd6xE_3F6SvmPNmULI62M3k_ShTOKOA_rFnE,753 +torch/include/ATen/ops/to_compositeimplicitautograd_dispatch.h,sha256=yQSNN-RKv0JwetkpoiVkI0pPHKNSoArSQuUvFumnn2w,1981 +torch/include/ATen/ops/to_dense.h,sha256=fHv8fHMwxJGM2YVgQbJP6_23jOWA5SFyLuP913EAOuE,759 +torch/include/ATen/ops/to_dense_backward.h,sha256=UMW-FWpJkh0tMXDqgJ8QxmlzcZiuG3pY6sxlEqBt8O0,1069 +torch/include/ATen/ops/to_dense_backward_compositeimplicitautograd_dispatch.h,sha256=LkbNxyMzNtk_lZVf7z2W86kfCh7uNP9_6W7unfF9Z2g,1105 +torch/include/ATen/ops/to_dense_backward_native.h,sha256=sak20s57gMHKoxbh2Ne2ZV51bgu2BeH1rsQZNgFab4w,817 +torch/include/ATen/ops/to_dense_backward_ops.h,sha256=1oUiWlfJGgPdKtLlxjHXXNadQFHOi5GzMp0X6vlXJek,1447 +torch/include/ATen/ops/to_dense_compositeimplicitautograd_dispatch.h,sha256=O7IQ3pznnIwtMXSNfXDoAJ4YQX2SxDWPUSuuWYFbAsU,1124 +torch/include/ATen/ops/to_dense_native.h,sha256=tLsx6TKoPjONACfnWgE2-oYdXwBHOl0rcHpBA8qF1nM,836 +torch/include/ATen/ops/to_dense_ops.h,sha256=wc95r1ro0NS9XGXQpbPIkbHsqe6BcYSjhn5ys1grDXs,1472 +torch/include/ATen/ops/to_mkldnn.h,sha256=JHw_YSLFe7KqbePdPnoUz6ixm2fYvJ9wX3qcHQf8tsY,1322 +torch/include/ATen/ops/to_mkldnn_backward.h,sha256=9jg9UojKNEQ5F4j7T125Q0G8__l5IIFFtjjwFJRiZ0c,986 +torch/include/ATen/ops/to_mkldnn_backward_compositeimplicitautograd_dispatch.h,sha256=AeolIabuJhnL-KIJNzvifupaSFe3Ez7FnU3lWzxLE-0,1056 +torch/include/ATen/ops/to_mkldnn_backward_native.h,sha256=-W4ODuWCpk6TQaJhvjsaj_73frS1xSghmtO32KGseA0,768 +torch/include/ATen/ops/to_mkldnn_backward_ops.h,sha256=fSjcp3eQnzz7U26tuKqdyuFqvdx72duQXkLykDQlMdY,1333 +torch/include/ATen/ops/to_mkldnn_compositeexplicitautograd_dispatch.h,sha256=JXldsfZXgtVaBBfRBIqFCiLkLMeGkGrtEm1adVgiofE,1220 +torch/include/ATen/ops/to_mkldnn_cpu_dispatch.h,sha256=kSek53SiILCJynzCJaO26d7yMmjZUym7sty89vLjBoE,1031 +torch/include/ATen/ops/to_mkldnn_native.h,sha256=gjxvDLEhNhuNCE5oFBI5Y86Aa6iHVc6Qo8hcub_7LbQ,913 +torch/include/ATen/ops/to_mkldnn_ops.h,sha256=I6ekRQWBZuT4vTDnS4A7DVSxPpC8vtWmIUEy7p1nbD4,2089 +torch/include/ATen/ops/to_native.h,sha256=varHgkKEtnW0GNu7oenaL3VJoWqEGhrdh269h0OyccQ,1546 +torch/include/ATen/ops/to_ops.h,sha256=iCZ0RF6M7hDvQ_DgtLHG0_z7hixbb1Gq67ObZGpxVdE,4706 +torch/include/ATen/ops/to_padded_tensor.h,sha256=fkYjvDqjUpX1dUugGLwT-HD2ulP_1KY3IgBPyXu54yc,4601 +torch/include/ATen/ops/to_padded_tensor_compositeexplicitautograd_dispatch.h,sha256=Uus528eR89tjNORMGNb7utCX81nWIqmQ-oedY5zPdYg,1580 +torch/include/ATen/ops/to_padded_tensor_native.h,sha256=hjsUyz5UrWxh0cPj7RLcil6VP81OOkfdSm1hc3Fi0y0,1130 +torch/include/ATen/ops/to_padded_tensor_ops.h,sha256=vxjx21fIaaCt5FnKvpmLKUF82JL2aBe2bU4mek4DPGA,2243 +torch/include/ATen/ops/to_sparse.h,sha256=Go8Ymb444cQPIoI0KpK7M_XqOKUqct5DvkcVvoSPheg,760 +torch/include/ATen/ops/to_sparse_bsc.h,sha256=84KDYvlR5z0LycGO2TLL6apJ7Le15v0AbZ3Q-SXOIoc,764 +torch/include/ATen/ops/to_sparse_bsc_compositeimplicitautograd_dispatch.h,sha256=vUxLgeTpjKdKGkPaQ6RrKrqEpeQpWQolwf11y1pQKWk,1103 +torch/include/ATen/ops/to_sparse_bsc_native.h,sha256=KaGHyVPlJ2O4SSmuQmFJYj0seiak1nFNWImOdoSiurQ,815 +torch/include/ATen/ops/to_sparse_bsc_ops.h,sha256=_LAnxrmEMAkz5Eh_XbzA5ktyCSgGhBvnpC69mG-4PDQ,1440 +torch/include/ATen/ops/to_sparse_bsr.h,sha256=7Ku9qtqm-THc32tRHnmOrUwyLRNeBt1bv0aKtaxf64w,764 +torch/include/ATen/ops/to_sparse_bsr_compositeimplicitautograd_dispatch.h,sha256=bUBegCGsWMbrMyPXhq782MqQz3awVEhSx5Hm0Ajxy3g,1103 +torch/include/ATen/ops/to_sparse_bsr_native.h,sha256=yDGMOHQh9vZFkWxhZAnm4rRAFWrHfTkWND5yFZfOTBM,815 +torch/include/ATen/ops/to_sparse_bsr_ops.h,sha256=JMsERtHsi5h17jZUlS14g0Qi6w45uQ3uCXmoWE3RxZA,1440 +torch/include/ATen/ops/to_sparse_compositeimplicitautograd_dispatch.h,sha256=T00rrQPvK4bqSQgAH-p9baMMbkD6gR-zri8UuBzJyzo,1250 +torch/include/ATen/ops/to_sparse_csc.h,sha256=0JHiT62bxrfu1td4bD9vq41GRkUFJ_sOs7pO46NWoyM,764 +torch/include/ATen/ops/to_sparse_csc_compositeimplicitautograd_dispatch.h,sha256=xIuO2y2kWSL_MtrRa8WCigMx34yd5G6zYZ5EcdhHycw,1076 +torch/include/ATen/ops/to_sparse_csc_native.h,sha256=llKNNxMTC2Vcf2Haurb7_HeEt7Dh42FGUNWNcARBvGY,788 +torch/include/ATen/ops/to_sparse_csc_ops.h,sha256=7WoXLai8dIuBkdMDUDh58Sdv3di80fO3NTYIXT43yVY,1351 +torch/include/ATen/ops/to_sparse_csr.h,sha256=L7QN-fW21xFE2qVQ4f8n5is1Qq_ti8h6a4TXiTCHxcs,764 +torch/include/ATen/ops/to_sparse_csr_compositeimplicitautograd_dispatch.h,sha256=UFV3BsJtY7yuZm-O4QExW5JEBBkxQA02TSZAMOQBBh8,1076 +torch/include/ATen/ops/to_sparse_csr_native.h,sha256=OKZtEXULBHoeJ2OcdzlvF5tKskiI3sbMRJr_Ipyj3QI,788 +torch/include/ATen/ops/to_sparse_csr_ops.h,sha256=n0LzU3IGgbGQi8wMdIiUFCRBt_MJFNmWauHl-3h_2Wo,1351 +torch/include/ATen/ops/to_sparse_native.h,sha256=rB39ccyiEwXsHa_DD_h1OaGs3QEiS30Gr_0KscDs9lc,962 +torch/include/ATen/ops/to_sparse_ops.h,sha256=V5l617qAoin5ADySrMoTGfEdm2USv9JcpDdEk68GyrY,2189 +torch/include/ATen/ops/topk.h,sha256=DJFAcnv7bdIkcMnRbxcY8VtX5d4AvvtBK5UwqibhSuA,5377 +torch/include/ATen/ops/topk_compositeexplicitautogradnonfunctional_dispatch.h,sha256=CYzlMPJGjTKBB9dpmfPiiG6DWUjQRNLBgqEYlqNenjA,1283 +torch/include/ATen/ops/topk_cpu_dispatch.h,sha256=lVrszZjuylFDrJEwodgBK5lVaABxUWmMkssMAACatLQ,1979 +torch/include/ATen/ops/topk_cuda_dispatch.h,sha256=tKCkxpc-E4HHeHfKCfBjNkSe8DYJjsR1nW4rsdVzB4U,1981 +torch/include/ATen/ops/topk_meta.h,sha256=22NNNTMoDh4WMXbJazzj8TlmY0QcN-6oA716xi5cVy4,870 +torch/include/ATen/ops/topk_meta_dispatch.h,sha256=CgUhpAtUtlHoGNsSNKp6CGbadxu-5w0nSGrlbUpnfVY,1981 +torch/include/ATen/ops/topk_native.h,sha256=foxXZmSLN-_8Nasgb2ohgS36lggMu9eJtiVo1p4xY6o,1309 +torch/include/ATen/ops/topk_ops.h,sha256=QWFXbKlTOSx8w_ph6MNtBMirXL87eaSga1hwtTXo5iE,2501 +torch/include/ATen/ops/trace.h,sha256=y7S-OMePDpM17m7LdhEYdeneyMnwi6nhtLQ9hlHMsCo,1271 +torch/include/ATen/ops/trace_backward.h,sha256=MbFkq3U4ipeFbMy2dvn2yzo5Ni10h_cUbSyjfmPdQUc,1725 +torch/include/ATen/ops/trace_backward_compositeimplicitautograd_dispatch.h,sha256=JLhJmSb-EBVNz9nC4jCfykCOqjGqWUWxHvE5zzWI88U,1145 +torch/include/ATen/ops/trace_backward_native.h,sha256=FNJMyBxi91KTBWKBjFOnuM4Px4Lu-Z-BCl1QzrWEgn4,772 +torch/include/ATen/ops/trace_backward_ops.h,sha256=rnEitzif5VYNzCjrsFkSzrv0_taYgeQruQu1jdczF6w,1326 +torch/include/ATen/ops/trace_compositeexplicitautograd_dispatch.h,sha256=v-i6rApLCtmAh022Kug2W4c0awkU27NP-LYg3V8kMWw,1119 +torch/include/ATen/ops/trace_cpu_dispatch.h,sha256=OkPFiwZ7GUBARcii2l94kaA46nw06bqKWGuUOtRy8rI,973 +torch/include/ATen/ops/trace_cuda_dispatch.h,sha256=NrIWj2X4lqIT9Mx7hGZ1QvydlPAS5bwiWtczfbKdJ_s,975 +torch/include/ATen/ops/trace_native.h,sha256=RT6_vEEwGTEwNGaAAVkeY2RWMjp88vrsbCh2cXzlCG4,868 +torch/include/ATen/ops/trace_ops.h,sha256=LDBJR55dDX_FTAECQAllgWuTPatlBv7YQ2iEoiAQTBY,1795 +torch/include/ATen/ops/transpose.h,sha256=gEkAxHY9nguD89H-zzKQkRFtrMfp9KdIidvmcGFfjpA,1219 +torch/include/ATen/ops/transpose_compositeexplicitautograd_dispatch.h,sha256=vDpiK0QPLh2y9JRskDzMwiXyYI1JetrPf39_7SZT2C8,1131 +torch/include/ATen/ops/transpose_compositeimplicitautograd_dispatch.h,sha256=T_-uy500xbidVW-JkgrSK-chVKa6FSSHtz2x93iByt8,1057 +torch/include/ATen/ops/transpose_copy.h,sha256=_67SbEIGUcegzQb2e52MNwyszBcgUyYEHh0D_d0zTWw,1565 +torch/include/ATen/ops/transpose_copy_compositeexplicitautograd_dispatch.h,sha256=u5QsMpPNQBQB-mUpVbgz2tbli4jEkw9hBvkpXiJ8ea8,1193 +torch/include/ATen/ops/transpose_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=dMqvVp1kjSzPme50lEK_JE6LHgmyCMIYfQUfERR0wss,1080 +torch/include/ATen/ops/transpose_copy_native.h,sha256=dLXUeM8t6rQSMXrYCkPYoLbRucA9If3xvcZdNAKKJ1E,888 +torch/include/ATen/ops/transpose_copy_ops.h,sha256=POhI_Bsu47uoB3iepiP3oivv9bsd9OSxgoakRz11dKg,2060 +torch/include/ATen/ops/transpose_native.h,sha256=ldkrpGYUE8qqPJG7PkqpWwDZNE_GJMfB6e8KcXdSFcU,1028 +torch/include/ATen/ops/transpose_ops.h,sha256=4Si_blynot-eEXgiHIDpNzjKVOJVxs-DlwEeNNT3S4Y,2597 +torch/include/ATen/ops/trapezoid.h,sha256=Df62Q_BticehSk2JPI_Y7jpdI7GVwFgmEebOA-a021I,1188 +torch/include/ATen/ops/trapezoid_compositeimplicitautograd_dispatch.h,sha256=RI2CHkvX_RtpVqVuz4EYJ-Eu38OnBscCuYp81lie4F4,1151 +torch/include/ATen/ops/trapezoid_native.h,sha256=_Six84Wz_6APyeC7ddBwylfx7IBJyRKuLlCrDntcUgw,863 +torch/include/ATen/ops/trapezoid_ops.h,sha256=MmahfIp4fXXA_FfGDyaTEo_SQJzMNTTVwh4TgDc9C54,1977 +torch/include/ATen/ops/trapz.h,sha256=WNqjA_Xx39vRHK9HhUEADozdHaOr4J_OEHNSKm8mXSg,1147 +torch/include/ATen/ops/trapz_compositeimplicitautograd_dispatch.h,sha256=9ETB9eJ1rYs3-mgf9NjoQPQlk4AfUS6mt13sGloXV4A,1131 +torch/include/ATen/ops/trapz_native.h,sha256=1Bvfk_A3x8mo47m1z_SFITgVgZ9AD1JF0EWtjP0RX7g,843 +torch/include/ATen/ops/trapz_ops.h,sha256=sqyX0dG-AFxA3FVUi8XMe4iYgCRv-6sVtppzyVVx11A,1916 +torch/include/ATen/ops/triangular_solve.h,sha256=zgJ7wCvEXOM8wEheYnJ06apNR1zLBh7lbZT--0UNQQQ,2205 +torch/include/ATen/ops/triangular_solve_compositeexplicitautogradnonfunctional_dispatch.h,sha256=wmtrooultk359PieXB44iyV173Iw7dLqpg39s7LEo8c,1166 +torch/include/ATen/ops/triangular_solve_cpu_dispatch.h,sha256=tyVcfo7LH1sv2FankB_agR-zwgOAsxJsi_dm1WTVm2s,1512 +torch/include/ATen/ops/triangular_solve_cuda_dispatch.h,sha256=sIFedQ68QDvyD8aNWEL41affhMjj-js90iotDcXj27Y,1514 +torch/include/ATen/ops/triangular_solve_meta.h,sha256=3TYkaBDAGCRSRd1IqVJtEItR4YKgAAp1oqOTlEhIptg,901 +torch/include/ATen/ops/triangular_solve_meta_dispatch.h,sha256=sIrwXPY6kzI3AJ92b71JQewFoVgg2wjH1ffsbT94xU0,1514 +torch/include/ATen/ops/triangular_solve_native.h,sha256=Y_3GozTlRh3MyK-DVgEUBJEZVRfZXiRC63xzHzcPWSY,1399 +torch/include/ATen/ops/triangular_solve_ops.h,sha256=APK_qWnjrnif-Z91iPbNBBs2bqMIZJZwrwrkOgdA3ks,2651 +torch/include/ATen/ops/tril.h,sha256=hWmTyK0ebCcfdty_GI816MPKp_Mrqh9LRLA9dM0NPXU,4013 +torch/include/ATen/ops/tril_compositeexplicitautogradnonfunctional_dispatch.h,sha256=7MonXhoFn1QmPWqWLxNSDUZsfVAlscyPLYT87l9QZ28,1294 +torch/include/ATen/ops/tril_cpu_dispatch.h,sha256=FhClPP2DOzfhqPToYaRUkTaFyayyY5yuDhmzy8IFUQ0,1628 +torch/include/ATen/ops/tril_cuda_dispatch.h,sha256=Pw0fYbCZciBsFDCgweji_lkpBa-CV6JQ8FHw9sZOj9Q,1630 +torch/include/ATen/ops/tril_indices.h,sha256=DNkN-Gx0RZYYcyW6Xnc1m2mZGHdCux2_tG9DKC32JW0,2214 +torch/include/ATen/ops/tril_indices_compositeexplicitautograd_dispatch.h,sha256=YS6sTcx5bKhzyeINbU15uSx6CmKYyC96KeZgZhTT-Tk,1169 +torch/include/ATen/ops/tril_indices_cpu_dispatch.h,sha256=N-VfIgdiwoIGmEbdGNmJ_9uCYowLpzw3dCXAXDQ3AD8,1258 +torch/include/ATen/ops/tril_indices_cuda_dispatch.h,sha256=yUk8qARfloPH57aczIlY3uCtAX7w76JJEa5eo3MGreY,1260 +torch/include/ATen/ops/tril_indices_native.h,sha256=4CWekTKKNvTQEAm6RI0kizHvZ5WKOmIrAe6_L0pZsHk,1258 +torch/include/ATen/ops/tril_indices_ops.h,sha256=jolBeqTHLaYt5_HzhRTMLV73zKLDIuDYTvtmRF35yZw,2453 +torch/include/ATen/ops/tril_meta.h,sha256=6SRAPZRNOUvDonbFzhzM84POk9SztKD2OCyKwREqx_A,837 +torch/include/ATen/ops/tril_meta_dispatch.h,sha256=ef-uTzwH0AuCdz80PtIgi_N0aHLypfl4_KmVeK4qNeE,1630 +torch/include/ATen/ops/tril_native.h,sha256=UtWCWB2fyB5PN5osPg3HRqZXCYayhy_uuAEHIEMNACo,1018 +torch/include/ATen/ops/tril_ops.h,sha256=LDJVlJQxta0IcDYuTS9hQHfxIqj0jo_nMvuf0pd5RaU,2510 +torch/include/ATen/ops/triplet_margin_loss.h,sha256=Hmr39QHwiLBtms6GCYvRVgjgFxDwQvY_6VGxjiNu-PI,1282 +torch/include/ATen/ops/triplet_margin_loss_compositeimplicitautograd_dispatch.h,sha256=ygsQoa7Hv103vD93JaTKTNXWFaoffYFJjGRTfPUI7zo,1196 +torch/include/ATen/ops/triplet_margin_loss_native.h,sha256=mdhEb5IFPQzZV_gWKkJ-QDP90LWdU2GW53zAnuVpvI0,908 +torch/include/ATen/ops/triplet_margin_loss_ops.h,sha256=Hvfe_kINZBMt05RhExIbXY0h-fimQnFv9NtYSUY14T8,1702 +torch/include/ATen/ops/triu.h,sha256=cW4-55KxSo6a4Phy2pikk1DQqGjy4b5mmkRO8-pEsB8,4013 +torch/include/ATen/ops/triu_compositeexplicitautogradnonfunctional_dispatch.h,sha256=IQv_0mjONwZaqwbzN3klw-xDAoE6Jx6aTo43aAeLCSc,1294 +torch/include/ATen/ops/triu_cpu_dispatch.h,sha256=TfDoEX__-JW8wSnZk7sMJx-eFb_9qbOaqvI67F5Pit0,1628 +torch/include/ATen/ops/triu_cuda_dispatch.h,sha256=klxQIokRO6heIi5uHKb0pQQoEdS8B72BxXFp0wzRlFg,1630 +torch/include/ATen/ops/triu_indices.h,sha256=-b8__dGDHUuy1yEdrP2FwjVjhsCTfqLdXO79C4TE3kw,2214 +torch/include/ATen/ops/triu_indices_compositeexplicitautograd_dispatch.h,sha256=p99twpuIiW-I4JYsLnOBEm7oTj0HE6mSapRo6Vr9kgw,1169 +torch/include/ATen/ops/triu_indices_cpu_dispatch.h,sha256=ThiFwj8tvlUiwO8Rpv9JnthVQBtzklleI4sLO61njn4,1258 +torch/include/ATen/ops/triu_indices_cuda_dispatch.h,sha256=4RbNsfGAwm-8eptEXusVFfyxGr9BI1CvlHbyetbuRWQ,1260 +torch/include/ATen/ops/triu_indices_native.h,sha256=vZgKik7LpKla_EYEaNIj91QS62d_SiiBZYD97-FvxAw,1258 +torch/include/ATen/ops/triu_indices_ops.h,sha256=UzN2jCOt_7mfG6MS6-sjQ-Q_R2DiCeXxkAqHpfcV4LI,2453 +torch/include/ATen/ops/triu_meta.h,sha256=R3oRI2ROWLR9TN8lKeeriPQSRvT1KIVvDCArvI5x-t0,837 +torch/include/ATen/ops/triu_meta_dispatch.h,sha256=c0DWcTujwcTJ1guoyN7tsYv1QUUVUAINdlrk3Vx0eJw,1630 +torch/include/ATen/ops/triu_native.h,sha256=NJzfQvtGCktCcMroztM33hdPBseg73Jtk5EtNbevXiI,1018 +torch/include/ATen/ops/triu_ops.h,sha256=xzUvf4tfQnyJ6ooE5yKZp4GSq6w-WrdT20t1IZDTdR4,2510 +torch/include/ATen/ops/true_divide.h,sha256=vVM0u8Jt-tnib5lGLU34nX8m7_KGsLqJgQTRQ-iKUQQ,1697 +torch/include/ATen/ops/true_divide_compositeimplicitautograd_dispatch.h,sha256=GTK2kBA9vEY5dlfzn6PiPi8AZy9NgyztGDf976AQXM8,1517 +torch/include/ATen/ops/true_divide_native.h,sha256=HjUGdggLMAiR72SvFqQK62VkWjd-sW30C5nR6av81EA,1119 +torch/include/ATen/ops/true_divide_ops.h,sha256=izXjsaT_Z7c4PutaawTzj61mGAMkyAOhk9TcrelF0e4,3884 +torch/include/ATen/ops/trunc.h,sha256=bThHrJg42Lc4jBItMj1ALdy3fba__G0GWaekARXavO4,1410 +torch/include/ATen/ops/trunc_compositeexplicitautogradnonfunctional_dispatch.h,sha256=ezkCR1YK0N0ehZyEr3AJ0yepOssUvxq6o7mfdK-8DrY,1093 +torch/include/ATen/ops/trunc_cpu_dispatch.h,sha256=XtMNanhlVlfQehDBd-iMP1o2JUas2Ui9Q4AStZe1MnA,1178 +torch/include/ATen/ops/trunc_cuda_dispatch.h,sha256=WnmnDuQoHLYgRRYqhIswwtHq_ypKfDO21q3QVjhAo7M,1180 +torch/include/ATen/ops/trunc_meta.h,sha256=ePhwtjbH5Y9x2TakgYNupYJSqdVtCDpTDOjczOSS3pY,820 +torch/include/ATen/ops/trunc_meta_dispatch.h,sha256=7fixKYBsxpqVDmrtvnBc3OiPP89HBlL6A8VdgCdC7kw,1180 +torch/include/ATen/ops/trunc_native.h,sha256=1mUL_UoI3Ez1Uro5gTZqKsb3boeZlafXdypYbO93HC8,1261 +torch/include/ATen/ops/trunc_ops.h,sha256=N-k-omO5sUAma2FQPIJuEdoz38AkXHgt66fpDtYue8I,2291 +torch/include/ATen/ops/type_as.h,sha256=AwdVDvYR91dnzV2NBKn3jmaFZw3E1GQFUYiHbz2oT3g,758 +torch/include/ATen/ops/type_as_compositeimplicitautograd_dispatch.h,sha256=dv8uyoCMjTCYB5RtdBBuj2oeTDCJBd6lqxvXMCbjW8Y,1045 +torch/include/ATen/ops/type_as_native.h,sha256=v2LPDmsYu4iQrg66e88k11xbntoyJ14YFfyJmwBTg7Y,757 +torch/include/ATen/ops/type_as_ops.h,sha256=OioOs7XMmXtex2G7ERpJo1-uxjvO62JKxlZoRU9Lll8,1300 +torch/include/ATen/ops/unbind.h,sha256=Us1fppseabi-x5bkZQAWw8Up3CP6joOhr2tAap8wf0o,1172 +torch/include/ATen/ops/unbind_compositeexplicitautograd_dispatch.h,sha256=1AUAnZzYjo8pXCoxPwyvOb_rhy_YBKk2Ppv5BvzxwcI,1048 +torch/include/ATen/ops/unbind_compositeimplicitautograd_dispatch.h,sha256=VZms1q-XD70XSJatP9jiyjnP3gSNDYwvofA9zu7MLTs,1050 +torch/include/ATen/ops/unbind_copy.h,sha256=odoE7jy3xo_wzzF511YrzFRLq2bTvx1UZVPTD2GhoqM,1439 +torch/include/ATen/ops/unbind_copy_compositeexplicitautograd_dispatch.h,sha256=SCiFQGUcY305ijwIzFe_HMbD5aOVW4x7At7HtuqUicA,1147 +torch/include/ATen/ops/unbind_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=WzJCqQShrinmnjWHlQb4ECZ5RZPu6cxcwKEKw7YVzkY,1079 +torch/include/ATen/ops/unbind_copy_native.h,sha256=o4DwnRwMMa-rrmh_KAYsBbEvKLvv0T6y0711c8OwAJ0,863 +torch/include/ATen/ops/unbind_copy_ops.h,sha256=zCODlW7yla9Ef1r2SyaeWyJZu0wCadw1TbgM2eQILSo,1969 +torch/include/ATen/ops/unbind_native.h,sha256=a96IIfvlEmJBsrG26jl-yOqlBBBhidVaUX8iasLjYFc,943 +torch/include/ATen/ops/unbind_ops.h,sha256=8nZXbe4nLJa79FLWC74hLInAxrRbDuzw4HOqjagw-us,1967 +torch/include/ATen/ops/unflatten.h,sha256=XY0zghsNhL4xIFsW-0qta3fhq5EdOjhwLfnh6DtI9kM,3035 +torch/include/ATen/ops/unflatten_compositeimplicitautograd_dispatch.h,sha256=q3pmv37xLSmzONSyxLm5pIOXb-EGLqRmYMqXirOCpIQ,1412 +torch/include/ATen/ops/unflatten_dense_tensors.h,sha256=hPGFTdnsuy3OOLY9swgY3XBM0l_6I88z5qtUBnA-J_c,1027 +torch/include/ATen/ops/unflatten_dense_tensors_compositeimplicitautograd_dispatch.h,sha256=6n0V_CTfUS0ApPHEaKQH128kwn15EnCOFM6BTktjuzc,1074 +torch/include/ATen/ops/unflatten_dense_tensors_native.h,sha256=g1B_XmzUdt_8FAdIAPpGhj097yd7Gu4_UQpO82UwuRM,786 +torch/include/ATen/ops/unflatten_dense_tensors_ops.h,sha256=V0ocHe-XxJUUnNo-MYjP2hUTZE1uf-6WmdP-BdjFkcI,1391 +torch/include/ATen/ops/unflatten_native.h,sha256=7FTdxEzeKUI5vW5JvsE7vGlQ_Rj55LHF6Tha9iyi7PQ,919 +torch/include/ATen/ops/unflatten_ops.h,sha256=NtYccRRzkcys92u6DLFiLCoF2YHaWGK__rRivOiFmXM,2141 +torch/include/ATen/ops/unfold.h,sha256=s3T99PCBveeZExVaiyiTCPCZl0eEwzNqIKcvNXHGEd4,757 +torch/include/ATen/ops/unfold_backward.h,sha256=6LLF2qOMzqe_M8-sOPDTgT5EYiqzpyGxiDkYPwIu95k,5194 +torch/include/ATen/ops/unfold_backward_compositeexplicitautograd_dispatch.h,sha256=unmx5aSR3mko0ZWHt3ohc3o-kF4Rl9pjgHA_usng708,1628 +torch/include/ATen/ops/unfold_backward_cpu_dispatch.h,sha256=8hNRxDa0O11AYJ21tLQWSF8BexFIYwSHcjTxh6KcrzU,1203 +torch/include/ATen/ops/unfold_backward_cuda_dispatch.h,sha256=0QcM2lEahMqldeLaehuMMi57Xldi6VUoongCt-IT1Rk,1205 +torch/include/ATen/ops/unfold_backward_native.h,sha256=j8JFbKSh-UNSJeSH-ax9Yqsa_0sCadYmwky1lcCVdII,983 +torch/include/ATen/ops/unfold_backward_ops.h,sha256=2ZJwAeZKszpYe0ZFJiqJfqpzJ8nMzQt8e9NRM0OCj6A,2367 +torch/include/ATen/ops/unfold_copy.h,sha256=a2ab_KuD3jBa6cikEArKh_e6lOMsc4HngtRjpSF_Ou0,1646 +torch/include/ATen/ops/unfold_copy_compositeexplicitautograd_dispatch.h,sha256=Tu02oAKCNR3swxznEOAuLhY4Bi-gxH_RlQOEfUpYSrc,1225 +torch/include/ATen/ops/unfold_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=bHCFrbr20k_OQl1EBusSBL6EzSEYkL9RfZldhqyo7Gc,1096 +torch/include/ATen/ops/unfold_copy_native.h,sha256=cTUzPy2baCqqZOYXFFasTflV2E6vcQRjyztT6d_zxgw,912 +torch/include/ATen/ops/unfold_copy_ops.h,sha256=F0Lc3nSJkbVCsq9Cnd0hlUwaZTlIG-Ekr_72Cry20yY,2143 +torch/include/ATen/ops/unfold_cpu_dispatch.h,sha256=LQzs-kZ6aZ6HBSaj6ro4Okh7kwfXQ4_fN_Rk6PwPBbY,1021 +torch/include/ATen/ops/unfold_cuda_dispatch.h,sha256=cEc1Mn6UZnpLXwsnhT-cTiXkBzY5_LwL6YQfx86K5aU,1023 +torch/include/ATen/ops/unfold_meta_dispatch.h,sha256=ZENsp1SbM7bDsRO9Ta2Wn5Nitg5_np-wt8e7MgxNSMw,1023 +torch/include/ATen/ops/unfold_native.h,sha256=r4RtD3L7ZsPvzxbOSQZbFnMUQhJoEQfzbUs7MWBq3CQ,777 +torch/include/ATen/ops/unfold_ops.h,sha256=trzss8tbLxPJIbEhC6MvtwSk58KkFNFRJ_950-bGi7s,1373 +torch/include/ATen/ops/uniform.h,sha256=vudakx8sdSljf7Hee_qgm72Im0ZXRdl3-sx4RDa2bQg,1752 +torch/include/ATen/ops/uniform_compositeexplicitautograd_dispatch.h,sha256=Osq3PHPGpq97Xc0pML9YQ_knpVpFrdVnF0K15t-y2Q4,1414 +torch/include/ATen/ops/uniform_cpu_dispatch.h,sha256=Jv2-6RGQtimjkBYTviWVF0wHhuxsi-ShApxxcon9Ikk,1057 +torch/include/ATen/ops/uniform_cuda_dispatch.h,sha256=S0hqmznLSPxHUUY0cILYLPUAEKFpVSKsSXBXjbb8hWI,1059 +torch/include/ATen/ops/uniform_meta_dispatch.h,sha256=OHslAJlbhpCL0_r1rjvDT6k4FQ4CCKOaVgme73q3udA,1059 +torch/include/ATen/ops/uniform_native.h,sha256=OICD2Mu4nG6XIO1fj-I0qLgqRqKk83XhSXquaWVyzJ0,1240 +torch/include/ATen/ops/uniform_ops.h,sha256=BEzEvPH6roudbfOz0R1sRYWdYdsRPpo8TTjwA2eDWpI,3014 +torch/include/ATen/ops/unique_consecutive.h,sha256=EgYnf30mTLscYKb5YATv8HmR1tHyDnEGlfpjxxTshsE,2340 +torch/include/ATen/ops/unique_consecutive_compositeexplicitautograd_dispatch.h,sha256=ip2_E_cZrTnt8M7M4kvTSGsCzIBuCc_w88Vr6axSLzA,1472 +torch/include/ATen/ops/unique_consecutive_cpu_dispatch.h,sha256=LCX03ZhiWrdgeacTAfMpJoyfKbVzCNHJQ-jaRU1hrvg,1120 +torch/include/ATen/ops/unique_consecutive_cuda_dispatch.h,sha256=cC6Zkl1Fa5Q2Dm8FhQk9hRFeUHrTjM-LPUqQxaQ0CPU,1122 +torch/include/ATen/ops/unique_consecutive_native.h,sha256=xdwhZQKoVU6D38bQhqV5bPvxplPqkEzSRL9WGF1nj30,1325 +torch/include/ATen/ops/unique_consecutive_ops.h,sha256=DUo_TOLEHqv0YCigXDl3eE9gaQfpFffgV5OHgco8UHw,2782 +torch/include/ATen/ops/unique_dim.h,sha256=6s8jKULkqYrRBHKdgiB2vVPaGewbAq2o-LnHDCYS048,2288 +torch/include/ATen/ops/unique_dim_compositeexplicitautograd_dispatch.h,sha256=shtRtoF3VSv1wVzB5OkzvJc5S6I0CyvGsB6l60UuJ5I,1438 +torch/include/ATen/ops/unique_dim_consecutive.h,sha256=LYfEJUSF6-Kx4qPz9udEZt5kbtcxldi07VaqQO4DAUU,2281 +torch/include/ATen/ops/unique_dim_consecutive_compositeexplicitautograd_dispatch.h,sha256=MEAiIko-yvrWz_A3MlNFo_aKhr0APGTBysqQOX-9PIc,1431 +torch/include/ATen/ops/unique_dim_consecutive_cpu_dispatch.h,sha256=VkJHGj9AUjpULH0san-ZJcKw_m0KGs8JV4A9VYHt6bQ,1092 +torch/include/ATen/ops/unique_dim_consecutive_cuda_dispatch.h,sha256=9OdxQ2m3pjc1yyX8bI0kDTZUZrWkFYuqa9vyuzMii6U,1094 +torch/include/ATen/ops/unique_dim_consecutive_native.h,sha256=338Q6ZNjaZKtKvYqvxa2TPXxAy5zKjLAEijXg0wT7MU,1256 +torch/include/ATen/ops/unique_dim_consecutive_ops.h,sha256=0uBeRnSK6KCTZ7pf-gkmVNbAqdSYNu3qRf34o65CM1k,2692 +torch/include/ATen/ops/unique_dim_cpu_dispatch.h,sha256=EvZku3JTmuxuOy5amEBWHZnEv-QieaAtOYM-AuKvScA,1098 +torch/include/ATen/ops/unique_dim_cuda_dispatch.h,sha256=gtyuZJM_xaIwkERvmt2SaM39tUKUr76jIa5cF73mJbk,1100 +torch/include/ATen/ops/unique_dim_native.h,sha256=QRPo2F-tnfoUStfotsY-fQX1nO8cpPVejMtbKDnOdEc,1269 +torch/include/ATen/ops/unique_dim_ops.h,sha256=0AbjIDh-58vw9vJfDGKpEnotyhJO5Jepl1tHXKqeVTI,2720 +torch/include/ATen/ops/unsafe_chunk.h,sha256=ZwioqB5WtrkuEaABDz2_4y6naqIfbOQHnWUOp4bEEXY,999 +torch/include/ATen/ops/unsafe_chunk_compositeimplicitautograd_dispatch.h,sha256=nnNOSfnzJzhvD1NySrLD2APoNW_BqT87WicybE9OGIg,1070 +torch/include/ATen/ops/unsafe_chunk_native.h,sha256=58WRzG0jkJgeDpmTETv-J9_kVe9igwAp3d5WRyYnqCk,782 +torch/include/ATen/ops/unsafe_chunk_ops.h,sha256=NZgRwR_gfq1kcG71bgDIXGPEZaXwvokyWKcJA50bx-4,1375 +torch/include/ATen/ops/unsafe_split.h,sha256=udX3V42Z25IjjIMaZI9wsbvpNBJCg4L5FIvEyuFmeYc,4263 +torch/include/ATen/ops/unsafe_split_compositeexplicitautograd_dispatch.h,sha256=tXaEXZQXb7YC16OGSkQPaa3WhTEv71hEYzFurkzwL7w,1667 +torch/include/ATen/ops/unsafe_split_native.h,sha256=n8TRnYCFC8VcNJfGMgcKCqLlixX5Iq0oQh48KUnYZR8,915 +torch/include/ATen/ops/unsafe_split_ops.h,sha256=9VewGYHzwA-s5VNVryD-dkh7I0XBfH_ImwPU_Up4k4s,2153 +torch/include/ATen/ops/unsafe_split_with_sizes.h,sha256=n2TgDEfYBGpwBc4lfO1LbxPffPwJ_lJE1HsAdSgsuYs,4772 +torch/include/ATen/ops/unsafe_split_with_sizes_compositeexplicitautograd_dispatch.h,sha256=iGy0DN6Fz0l7gitayqAv43f85zBohiqo-3j4ZobyJ0U,1787 +torch/include/ATen/ops/unsafe_split_with_sizes_native.h,sha256=bP9WJI3IexJJkAnDkC2s1gp_eUEErmG-ZWdQiAkHFKc,948 +torch/include/ATen/ops/unsafe_split_with_sizes_ops.h,sha256=i4k-PjlXR3V4FfJO7NRofwsZPeHJY_aPGJ6fIxQc-gc,2236 +torch/include/ATen/ops/unsqueeze.h,sha256=uaqaxIIvhFyw46gXSJqKZsH8oWTrDeezZPKH__mV43k,936 +torch/include/ATen/ops/unsqueeze_compositeexplicitautograd_dispatch.h,sha256=y6D0SxsL3aQH-JA_1ATfZAdlFfwzBP0MwZN9v_9KU-o,1101 +torch/include/ATen/ops/unsqueeze_copy.h,sha256=ulF74zjjITbg2oNi4JH5U7MAA7TWmL7k8o0-GpZGbBw,1442 +torch/include/ATen/ops/unsqueeze_copy_compositeexplicitautograd_dispatch.h,sha256=RXBdoSDxk5-n4IXqOauFoR74IYVoY5ViYX-UWy1sjjQ,1163 +torch/include/ATen/ops/unsqueeze_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=bpxg01nCb_nYLIvqY-jKUeojiSpP6-aAj-SsRs3ZakQ,1065 +torch/include/ATen/ops/unsqueeze_copy_native.h,sha256=kcmh6t_O3JHpSSc7xlnv-luwW_heskS80hCt4LeguVc,850 +torch/include/ATen/ops/unsqueeze_copy_ops.h,sha256=fzNr2J_vu0N5HDHX1t-ciwWzjqGePxu4b44Q1D7PIo0,1937 +torch/include/ATen/ops/unsqueeze_native.h,sha256=jKux_Juj458LEfBG_P61YATAA06JEpEE72FcGPFpqkc,1047 +torch/include/ATen/ops/unsqueeze_ops.h,sha256=Jn3hsOhjPmCk9lqmg8scStR2-mIAFVunQiB18nsqjxc,1822 +torch/include/ATen/ops/upsample_bicubic2d.h,sha256=VFG7Sjs3cg54poGpR31zQKO57-cW4YXMRB2f7GUOi9Y,8192 +torch/include/ATen/ops/upsample_bicubic2d_backward.h,sha256=xohEMXqS3OFZ-BqCGBZS8qjXSkOuDpgTAmvDhoCdDCw,7938 +torch/include/ATen/ops/upsample_bicubic2d_backward_compositeexplicitautogradnonfunctional_dispatch.h,sha256=g0d07D8UAM7dis5G1vaj2eSQFbLukIsthdqS7OlLg9A,1519 +torch/include/ATen/ops/upsample_bicubic2d_backward_cpu_dispatch.h,sha256=9Yqn5LLtryH7gKMl3mXRydYQZKxuZIt2W6BiX6cgG70,2573 +torch/include/ATen/ops/upsample_bicubic2d_backward_cuda_dispatch.h,sha256=DYKpeD_DCL4vXznMLKD6CFhukQpIlTd3FbWTEsVbA68,2575 +torch/include/ATen/ops/upsample_bicubic2d_backward_meta.h,sha256=TwzAviaFoWdnSq8wRpPHi8kGcjJogfR8Ojki6MuxuR8,1006 +torch/include/ATen/ops/upsample_bicubic2d_backward_meta_dispatch.h,sha256=S0RysAHoVnXgESmOAdZmg6k548HPetSwXwzOl_hAuTM,2575 +torch/include/ATen/ops/upsample_bicubic2d_backward_native.h,sha256=ZodaA34-MTFpHkguqLRrbY6UosObu6brVHxx7Plw5tg,1447 +torch/include/ATen/ops/upsample_bicubic2d_backward_ops.h,sha256=YSda_a4UhAkCJNqe4KNEiFdPdc-0TYWAwFlQsnNxXJU,3037 +torch/include/ATen/ops/upsample_bicubic2d_compositeexplicitautogradnonfunctional_dispatch.h,sha256=GJRI66OCMJ0ohJusXTX7lTKXYJK9wN1Ik0BkGVt7lJ4,1427 +torch/include/ATen/ops/upsample_bicubic2d_compositeimplicitautograd_dispatch.h,sha256=g_28nb7pK3wbDQFt-lpLbsksbGGyJMw7s4OmbEGewqw,1328 +torch/include/ATen/ops/upsample_bicubic2d_cpu_dispatch.h,sha256=jB8LfeRwokVGHN6A_e6pg7lBvU8dImc5Hv5EJIL4bP4,2269 +torch/include/ATen/ops/upsample_bicubic2d_cuda_dispatch.h,sha256=tUdJWbV0oKP06DyMQkE3eq7eZ1sI6ZdBhJrKZhw-qvU,2271 +torch/include/ATen/ops/upsample_bicubic2d_meta.h,sha256=Ob_5soB-Ow95Dl99VPXlgwM6avIL59jX_3sq2xKAY6U,956 +torch/include/ATen/ops/upsample_bicubic2d_meta_dispatch.h,sha256=ev5daEgNn9PCJ8etxyp3RaLullGOchlFS-xCy5RXESo,2271 +torch/include/ATen/ops/upsample_bicubic2d_native.h,sha256=a09SH9SdyDfsvgQnTRo60-xVq2QlhFSojRRPFmLX22w,1483 +torch/include/ATen/ops/upsample_bicubic2d_ops.h,sha256=s65OEj73Dz_xkDeg6iKQh9ptYKQ-Ddke1ltVVBzvPUM,3601 +torch/include/ATen/ops/upsample_bilinear2d.h,sha256=2SjYLWupIwtLpSWtct1TGNtx65JWveHxQLSSoTG-oA4,12147 +torch/include/ATen/ops/upsample_bilinear2d_backward.h,sha256=BbykxVTg5wsqn9REo43MSFuDkqG0BDCtpOOY5K2uNLM,7969 +torch/include/ATen/ops/upsample_bilinear2d_backward_compositeexplicitautogradnonfunctional_dispatch.h,sha256=u8y3eHcsdzIvQBxvWPvSSzt0hnCesnTHVPYgxNiQVU0,1521 +torch/include/ATen/ops/upsample_bilinear2d_backward_cpu_dispatch.h,sha256=xpWQkhlw7ixr_NWPqmk5Jg36HV-GWHDPpSJ3Z-pScGs,2579 +torch/include/ATen/ops/upsample_bilinear2d_backward_cuda_dispatch.h,sha256=vwxus4eIHVgo7cBz-bxyHzNOc-cgGTKX3hKUh3B-z0s,2581 +torch/include/ATen/ops/upsample_bilinear2d_backward_meta.h,sha256=y3g_dTcr6vGo26ehNPK3Viptne_AbZGIMGbdt_omaMk,1007 +torch/include/ATen/ops/upsample_bilinear2d_backward_meta_dispatch.h,sha256=P6oJdzjsbmsEOttA3_xDm-np4qqylMsA1dY5PCYD69w,2581 +torch/include/ATen/ops/upsample_bilinear2d_backward_native.h,sha256=pvItM3mfrh4ib5MqVl4Sl1l-dA1XbeKIj71TZoiYxTw,1452 +torch/include/ATen/ops/upsample_bilinear2d_backward_ops.h,sha256=ZSZmqVZdp2Fd41msrdIc_U8DQanU0rHyQcIymzc3Qzk,3043 +torch/include/ATen/ops/upsample_bilinear2d_compositeexplicitautograd_dispatch.h,sha256=AFonp7HYJdKstea9nOO5dp9aued3qjazrSJbOAhhjp0,1794 +torch/include/ATen/ops/upsample_bilinear2d_compositeexplicitautogradnonfunctional_dispatch.h,sha256=Wb9fcvUUqRmxlwgQMtw-z_ON9VWuaQCcPKh_hm74q-Y,1429 +torch/include/ATen/ops/upsample_bilinear2d_compositeimplicitautograd_dispatch.h,sha256=IGmpa4Y6UZTWjvDszfzLQPliXi7zCAzSxkyFcR9Pqf8,1330 +torch/include/ATen/ops/upsample_bilinear2d_cpu_dispatch.h,sha256=kC3Q4xHH3X59GQfKMrVja2E-LnkKmx2PFyZn6Kd4r7Q,2275 +torch/include/ATen/ops/upsample_bilinear2d_cuda_dispatch.h,sha256=MdoExLBsocpwAYjWpXFecH2ZGprjNASpl1ccclWOEt8,2277 +torch/include/ATen/ops/upsample_bilinear2d_meta.h,sha256=jgHIEKvRT6etXOtk7OTvnnB3qUULzJMfgHKJ2bu2bjI,957 +torch/include/ATen/ops/upsample_bilinear2d_meta_dispatch.h,sha256=Py2wNqAxmOarNBPOUk4W818VNqMl8FzTrIQ4rN_M1PU,2277 +torch/include/ATen/ops/upsample_bilinear2d_native.h,sha256=hKGce_EcyoFRXyhw9gz0UDiBpFV2csYx11n6FzQHlMw,1933 +torch/include/ATen/ops/upsample_bilinear2d_ops.h,sha256=cREMKi70-JOeYBAFCjZ1gk5BBXL3f_jAMys_Rxy_4LA,4620 +torch/include/ATen/ops/upsample_linear1d.h,sha256=XMfYzr3D0mfrne1CaQwm2A1II08h7qsfRtbOYaklu88,7311 +torch/include/ATen/ops/upsample_linear1d_backward.h,sha256=kwy5bGep8i7ziVowLguD8P4GigD-Xcl3m6koFjv8E6Y,7067 +torch/include/ATen/ops/upsample_linear1d_backward_compositeexplicitautogradnonfunctional_dispatch.h,sha256=lBSE3kmc4BB7CaxFf3MOqmSUMYlHdnfHg698xqP6OwE,1415 +torch/include/ATen/ops/upsample_linear1d_backward_cpu_dispatch.h,sha256=2fB5y1fQw9ACU-SNsur0W-94i_YqVd5T_r-_Afd4Z8Q,2291 +torch/include/ATen/ops/upsample_linear1d_backward_cuda_dispatch.h,sha256=kere2JAlUoC7O7nq92I9qGSlJbtlOky-L6Y9UjbYaTU,2293 +torch/include/ATen/ops/upsample_linear1d_backward_meta.h,sha256=oRXml8iFunMdUKG369sS5DKGmxhtvGndfqhGwkyL3Hw,969 +torch/include/ATen/ops/upsample_linear1d_backward_meta_dispatch.h,sha256=NG-EBlKmzPyIL8wGGoA74jQ3Uypuu0FL3pPvZTGbmPc,2293 +torch/include/ATen/ops/upsample_linear1d_backward_native.h,sha256=vKSHMAWZ6kus7Co20yq9kunrtMQ8X4nW6elQp-D_MIk,1370 +torch/include/ATen/ops/upsample_linear1d_backward_ops.h,sha256=ATodPxp3U30nOJa2tu9j0uI47vxEh8WhnL7WulKxcak,2789 +torch/include/ATen/ops/upsample_linear1d_compositeexplicitautogradnonfunctional_dispatch.h,sha256=ivwdDgfcGzY1iFx_Pp4G-OIh3g2pAtPLzMMJrsGUfNg,1323 +torch/include/ATen/ops/upsample_linear1d_compositeimplicitautograd_dispatch.h,sha256=yI8L8BBuy_JfEo6UVla9bGV8sfvkIqsaEHGWhB-61dY,1326 +torch/include/ATen/ops/upsample_linear1d_cpu_dispatch.h,sha256=pwsgd1HnHL8zQjq31vcQ5j1VDngHavSVIiOucldbXnY,1987 +torch/include/ATen/ops/upsample_linear1d_cuda_dispatch.h,sha256=dRAjjgUEanXTessojXyjjm4jCA2Cl5vp2OeCRa-Bp2I,1989 +torch/include/ATen/ops/upsample_linear1d_meta.h,sha256=1kWxbA_DjYmeRVPQwmiNoYZdvLVsFNpjMKeEa0KZhos,919 +torch/include/ATen/ops/upsample_linear1d_meta_dispatch.h,sha256=dLS_D0AmqPfBU44_nAd1LYMH9e5fUp6JZgsbiDF9D6U,1989 +torch/include/ATen/ops/upsample_linear1d_native.h,sha256=tT4KwDEmOa5zZpgud45S_pUeU6Ptk-gTcJawtNXR564,1405 +torch/include/ATen/ops/upsample_linear1d_ops.h,sha256=wOXKdObt3qKdzKRIakouFHBD4Z0e7P5l8NCXGyDOF6g,3350 +torch/include/ATen/ops/upsample_nearest1d.h,sha256=jBdVNdzc--py5Z2lGXWt-P-J9YIW7hIhVKDu_crTAhY,6632 +torch/include/ATen/ops/upsample_nearest1d_backward.h,sha256=OEyC1qpBn47Gp95vs7cOILx1IlbBK_tCIccXfBeScr0,6558 +torch/include/ATen/ops/upsample_nearest1d_backward_compositeexplicitautogradnonfunctional_dispatch.h,sha256=mdHB-STpHD5mkRhMpFCMRb6xJMwOPal8eI7d9ZriKK8,1377 +torch/include/ATen/ops/upsample_nearest1d_backward_cpu_dispatch.h,sha256=fcRZb_Fju5v35-UqY7TIc9SMYkw4ljXieLLN-hHrwiA,2177 +torch/include/ATen/ops/upsample_nearest1d_backward_cuda_dispatch.h,sha256=5NDlCuj0EwWJ8UCM-IUypq7-7chnqD5TOwju3_GAKF0,2179 +torch/include/ATen/ops/upsample_nearest1d_backward_meta.h,sha256=U2PLncfKNwHzR0oLm2UDjnCrQu7m6mv1q2AwANDuYXE,950 +torch/include/ATen/ops/upsample_nearest1d_backward_meta_dispatch.h,sha256=dMH9nFTQtTzQLwkesGH-KEsa4SrlmZ_UddUXpBYBP_c,2179 +torch/include/ATen/ops/upsample_nearest1d_backward_native.h,sha256=Aql3slzmg9XS5WdNR0euFGdEVxkNOWhTjKgWePBTW50,1335 +torch/include/ATen/ops/upsample_nearest1d_backward_ops.h,sha256=jsS-FUQ4BmB_fpbyJKLg_ClJ__JBhBEVmnfoBgSJXfM,2663 +torch/include/ATen/ops/upsample_nearest1d_compositeexplicitautogradnonfunctional_dispatch.h,sha256=fGFQAHPhtd06nLi8_fZ5Bq58a47af-q9BEKFtpB1w8w,1285 +torch/include/ATen/ops/upsample_nearest1d_compositeimplicitautograd_dispatch.h,sha256=sumWZGvf75FfJIxi_npiYxXr-SWbK_sXSAUkY4WsVXE,1288 +torch/include/ATen/ops/upsample_nearest1d_cpu_dispatch.h,sha256=w0GpkzU97FINPKcdDjfRXCIpJstKN-pG7c0h_KGPFiM,1873 +torch/include/ATen/ops/upsample_nearest1d_cuda_dispatch.h,sha256=3YSirPZNlB9W4lXB-0iaoZE9ibiTzU-8fsP_lmmrhtI,1875 +torch/include/ATen/ops/upsample_nearest1d_meta.h,sha256=4BPjT8S8sENwPkHN-FYkpDrZEpUwHzJU1Y5eUPs_HNQ,900 +torch/include/ATen/ops/upsample_nearest1d_meta_dispatch.h,sha256=eZAeY7L0vrCO4Pg4TtbZCwrz8L_cWqX6VxqUQt-Tw08,1875 +torch/include/ATen/ops/upsample_nearest1d_native.h,sha256=7Usz2bcZf-ZO9wADjpkIEw5jQQOTk-y_AV2PLh7CwU0,1351 +torch/include/ATen/ops/upsample_nearest1d_ops.h,sha256=1mIGCtCOKUHJavVYyIc2Gx_Vlo-RnrPnc5EZtzX95H0,3161 +torch/include/ATen/ops/upsample_nearest2d.h,sha256=O_5ffpixJga9VIeobNTWWdgiKoF5thaefVCBkvPwxRM,11006 +torch/include/ATen/ops/upsample_nearest2d_backward.h,sha256=udedsCys3u4JReu1l9pqCImHk3HH-obKMEfm6aGzUk4,7398 +torch/include/ATen/ops/upsample_nearest2d_backward_compositeexplicitautogradnonfunctional_dispatch.h,sha256=1MzQcxYgVgdMzf3YAJpyY67spU0xOCyhG-tW3JEqoGE,1479 +torch/include/ATen/ops/upsample_nearest2d_backward_cpu_dispatch.h,sha256=GlbG2EorM5DXATkDUSRQVf0JKKFga_d_rKGojVaDKq8,2453 +torch/include/ATen/ops/upsample_nearest2d_backward_cuda_dispatch.h,sha256=HpAVwdP44f7xWDJOKPxjxVRu-sww8w4L3UnTb0bLUJ0,2455 +torch/include/ATen/ops/upsample_nearest2d_backward_meta.h,sha256=zyGFvrmYXIU2sd5LW9nlg6Pw0Rgo-Lw3seMpjUh9MZo,986 +torch/include/ATen/ops/upsample_nearest2d_backward_meta_dispatch.h,sha256=u_hHiKGlewIkNWzp5GPx9tmnD_O0QQKBzTwApN31ZYo,2455 +torch/include/ATen/ops/upsample_nearest2d_backward_native.h,sha256=pyprzLb6jzVT8DaBvFXab0I__HFVmRfRmzAQCycjNqI,1407 +torch/include/ATen/ops/upsample_nearest2d_backward_ops.h,sha256=yElwaXsJSwUpF-IcYvIljlE10-2_ng4ucZRoGrpVjvM,2905 +torch/include/ATen/ops/upsample_nearest2d_compositeexplicitautograd_dispatch.h,sha256=aFScUxyx5xG6b-zDAf5yIBkQ_ufI2GwOUos4yy616DI,1710 +torch/include/ATen/ops/upsample_nearest2d_compositeexplicitautogradnonfunctional_dispatch.h,sha256=hziL-cvrzOJ6PF8iAzrkr66Eil6xVh2pcSzGuzgzgXk,1387 +torch/include/ATen/ops/upsample_nearest2d_compositeimplicitautograd_dispatch.h,sha256=r_Lh330YzJ2sz137JqJ3_OaELvP31_i59R4_SdGaMMU,1288 +torch/include/ATen/ops/upsample_nearest2d_cpu_dispatch.h,sha256=KLrwfa_aQDjnGJ9xBZueZRDXRrT9Q6Zow-rlvwygA5A,2149 +torch/include/ATen/ops/upsample_nearest2d_cuda_dispatch.h,sha256=uj1k2MBSila5Jc5rIXAvskiD5_K8Nk2e_KNt_QfCPTQ,2151 +torch/include/ATen/ops/upsample_nearest2d_meta.h,sha256=MjEloyM-rcqtkXZ-b1IijXxoEsk7WJnRgEbqWDtwkhM,936 +torch/include/ATen/ops/upsample_nearest2d_meta_dispatch.h,sha256=XKMsaV-fW3k6EykUytRxEDS3Z1X69tZQEuNNOxdM5o0,2151 +torch/include/ATen/ops/upsample_nearest2d_native.h,sha256=iFcnobq73QduuYOSFsj-hRwA_7MzLDN1hASdgH5MigA,1825 +torch/include/ATen/ops/upsample_nearest2d_ops.h,sha256=NX_114ByvM5Iu1Zx3GNfolzNBIiTz5LYd-cOKosTreY,4344 +torch/include/ATen/ops/upsample_nearest3d.h,sha256=QmD2cR5kUTXnmT7a3iTlQwnLOehttMBxX-MlTXwHuts,8252 +torch/include/ATen/ops/upsample_nearest3d_backward.h,sha256=txFD-Av9RCMbP0tgZmPkRLKkcWytQdv_Bqp8SYy_sJY,8178 +torch/include/ATen/ops/upsample_nearest3d_backward_compositeexplicitautogradnonfunctional_dispatch.h,sha256=lzmFuH3ecfnpV7CXnOOsFHoSWhJz0VrH7TuERSz7TCg,1577 +torch/include/ATen/ops/upsample_nearest3d_backward_cpu_dispatch.h,sha256=EqnWiEwPQUa5TuP1DPJwb9IUXxOYGbRYo8xj3K24Z3M,2717 +torch/include/ATen/ops/upsample_nearest3d_backward_cuda_dispatch.h,sha256=AJudIp8RCyXaePWGfY9FJcrmJnsxuZfGLwnh3BKVaC0,2719 +torch/include/ATen/ops/upsample_nearest3d_backward_meta.h,sha256=Rg7bRlZPktxhgg6IXQTXRu4Jp8VDfAtEFC9tQ-D8ikg,1020 +torch/include/ATen/ops/upsample_nearest3d_backward_meta_dispatch.h,sha256=jODEUU2iUNxrZHZj26sZ5FvXTSaBCvX9ESV0GKkbxc4,2719 +torch/include/ATen/ops/upsample_nearest3d_backward_native.h,sha256=ZSnOPvFhS3Y8AFObBHa6YD3_bLMFvK6H2hQKwU60akg,1475 +torch/include/ATen/ops/upsample_nearest3d_backward_ops.h,sha256=ITV4Vn-y5-0EarAIpEFD5N3YeD0InGtWNloqG6NVqeQ,3135 +torch/include/ATen/ops/upsample_nearest3d_compositeexplicitautogradnonfunctional_dispatch.h,sha256=1qJ4luQVnGE6NRtOrz5_OvpdVBmdLwCbBZEulOiRF0k,1485 +torch/include/ATen/ops/upsample_nearest3d_compositeimplicitautograd_dispatch.h,sha256=us4SZKx54BNw8qn5HVT9715KEPu0mK2HSyg4Lzg7m7M,1288 +torch/include/ATen/ops/upsample_nearest3d_cpu_dispatch.h,sha256=6HPW0Dkw3gUPtuUUNGFRTJ94rrc8bZYLGEOplBu77tc,2413 +torch/include/ATen/ops/upsample_nearest3d_cuda_dispatch.h,sha256=Diy1FaKuyB3s9OFDay_lNb8YIgRdItKN7A85oNybFYw,2415 +torch/include/ATen/ops/upsample_nearest3d_meta.h,sha256=mESNA1u323tXos4lHI0Xb-QJe93khPp8rvKnyK1R99c,970 +torch/include/ATen/ops/upsample_nearest3d_meta_dispatch.h,sha256=hIHn0s-OaLYF43OpCBq2t-18wxgNaZjMo70pOJUlkfA,2415 +torch/include/ATen/ops/upsample_nearest3d_native.h,sha256=eiQEhIMx8axNFVzjzmmlhy6becX4VzrDGfwhsnsV1jw,1747 +torch/include/ATen/ops/upsample_nearest3d_ops.h,sha256=2EHfxmEjRNwLffTVHyq6LCkN3OgU_Ww7Xw_DqVQa81I,3633 +torch/include/ATen/ops/upsample_trilinear3d.h,sha256=3W9E6kvtVPHhfnVXQZ9lW3hDgvba3wyjdunYW2XjcZg,9054 +torch/include/ATen/ops/upsample_trilinear3d_backward.h,sha256=SqPf9FNBGRBAk-Zp7-fqkcv8DGnvfD3zfC9DNJQgoms,8780 +torch/include/ATen/ops/upsample_trilinear3d_backward_compositeexplicitautogradnonfunctional_dispatch.h,sha256=AP2kXqEo9wi_XHOFXxzuRfoCQA9pf6gaj88T8-5Z4-c,1621 +torch/include/ATen/ops/upsample_trilinear3d_backward_cpu_dispatch.h,sha256=s0iSQflxCP1hF5pjgR_fDo4LjupLwO2m13LMnPIdHP0,2849 +torch/include/ATen/ops/upsample_trilinear3d_backward_cuda_dispatch.h,sha256=GkTpTsqlRe6z51pXzsRpyztFTRE_71TVDVEN4Jz2WEE,2851 +torch/include/ATen/ops/upsample_trilinear3d_backward_meta.h,sha256=TKGxdkvWo-MGz0oYBtu9NzRbiM0xhJ7oEBApujHZIxI,1042 +torch/include/ATen/ops/upsample_trilinear3d_backward_meta_dispatch.h,sha256=kc9pT8jE0XxHPZELuAaNLLCnopoUV76uD_07KnrzTsA,2851 +torch/include/ATen/ops/upsample_trilinear3d_backward_native.h,sha256=DsDe4hdKCvN2mwABULGcANebhdbb8qK-f1_P3VxFSn0,1525 +torch/include/ATen/ops/upsample_trilinear3d_backward_ops.h,sha256=TRWVmmPmMxw39RsgVgnuiy3SOkrR082bo4Tpa0cMPJ0,3279 +torch/include/ATen/ops/upsample_trilinear3d_compositeexplicitautogradnonfunctional_dispatch.h,sha256=8hW2jm5ozyz78lqhe543EgtIDFRDUx1cOtgRQvKR5ls,1529 +torch/include/ATen/ops/upsample_trilinear3d_compositeimplicitautograd_dispatch.h,sha256=zreAYtRkrA6BjIBcrDqzedxVegRyLV0QMvM6DSeDG1M,1332 +torch/include/ATen/ops/upsample_trilinear3d_cpu_dispatch.h,sha256=zu6J7ocKvCaw8UsQY9T4iu2JwEIsjs3do0_aB1eRpSM,2545 +torch/include/ATen/ops/upsample_trilinear3d_cuda_dispatch.h,sha256=izNpTuxeT3tjQeY6TjjbdVEtxBk0kGyrZMLi8f6YuZM,2547 +torch/include/ATen/ops/upsample_trilinear3d_meta.h,sha256=V2VD_cRq_XmREMLDYHb0XIl9aTGMPLgoUiLqnd_heIE,992 +torch/include/ATen/ops/upsample_trilinear3d_meta_dispatch.h,sha256=30aaUlfLBQZMJ0D7beom4Y1JryH2vLnjikuuf1leQ2I,2547 +torch/include/ATen/ops/upsample_trilinear3d_native.h,sha256=In-rSLbiKtoo5vAbaD-9Wf9abS826W5354l6X6WG0AY,1563 +torch/include/ATen/ops/upsample_trilinear3d_ops.h,sha256=TuDc7fNnX1B6qxAUrKbMxMKqoJo2DTO7rgCYXOi4_9Q,3849 +torch/include/ATen/ops/value_selecting_reduction_backward.h,sha256=50iUpIEwpCTGhy81ykc_3hqc-t6sy6LQXxjyOFbacCI,2335 +torch/include/ATen/ops/value_selecting_reduction_backward_compositeimplicitautograd_dispatch.h,sha256=XZOBQxgOmxOTGbXly8T2DYQTmU5aWD2bc0dFmehGHso,1295 +torch/include/ATen/ops/value_selecting_reduction_backward_native.h,sha256=mVQH2Irl_BLOPJLOCx63QNTNSgI7HYlkPem9DN9sxf0,1025 +torch/include/ATen/ops/value_selecting_reduction_backward_ops.h,sha256=DL7brvLTfri9Paf5ZUfCIaFotzYcaZ2GVwSPFiwH120,1570 +torch/include/ATen/ops/values.h,sha256=aHiEbW13ImT9Kxo2-9wG7ERpwYIQFXHmBIfnIXuHg3g,757 +torch/include/ATen/ops/values_compositeexplicitautograd_dispatch.h,sha256=NfxBe-IKRKHgsn-e6BK3h_gcKPJOrwikkx6sZQkNeso,1018 +torch/include/ATen/ops/values_copy.h,sha256=8ScsN7bZKLseag-JbeMqiQ_ZXR3f1Uau-sQJUX-Z_dg,1331 +torch/include/ATen/ops/values_copy_compositeexplicitautograd_dispatch.h,sha256=-_kQv813ADijVdRCK4oDIlLCs-p4lap3kAxzIGtywLY,1131 +torch/include/ATen/ops/values_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=G7qH4UrcePdCuKcFyg-2Rp0jz2RvZlc9a6EIudFUVOA,1049 +torch/include/ATen/ops/values_copy_native.h,sha256=w9zwAvkNe16eAq1rdQQx1r4uEFC9SVh8OxvYp3CB_yw,818 +torch/include/ATen/ops/values_copy_ops.h,sha256=j_LgxXl5pGa1ZN1KJhogl4nufnr9LzGWL3MrYZf1pHA,1831 +torch/include/ATen/ops/values_native.h,sha256=XL8VFOu16JXk1Cr-GXJSLcVqALOOnizI8baLftH-pZw,925 +torch/include/ATen/ops/values_ops.h,sha256=K0NvQylY7UsEzgdCJWriEkc8UZbT1GPkilN1WLG8JzM,1217 +torch/include/ATen/ops/vander.h,sha256=nHXvQ6uH_FJh9g4JeV4nEBseWwJvT3cvX2e4PGFCYWA,999 +torch/include/ATen/ops/vander_compositeimplicitautograd_dispatch.h,sha256=uXoUUm1vx2D0GgP6KAldUXrrIrtjwrxyJh5SYdNzdLo,1081 +torch/include/ATen/ops/vander_native.h,sha256=btiDecUDd6ABR57r8V5PcmQ9RVdY-BHQnBxDbixdyQg,793 +torch/include/ATen/ops/vander_ops.h,sha256=c4C80epl2oE36jNNfI2WJxpztELmNLlVjvJuoN5MHxQ,1360 +torch/include/ATen/ops/var.h,sha256=8TgH44ilLXBzoGuP-jK14DCZ7C1AJ_r7OfrhYFUaEn0,5125 +torch/include/ATen/ops/var_compositeimplicitautograd_dispatch.h,sha256=lneD8C9FsxcAhXtZGSQp3eXZkEAQrvlciZuPlYB9PuU,2275 +torch/include/ATen/ops/var_cpu_dispatch.h,sha256=xbTiFw-dPZ7yOjUcMeeyw9_moM-xRlVVjJ873Nqd1xs,1467 +torch/include/ATen/ops/var_cuda_dispatch.h,sha256=uzyd8yLSrd0yP0b1MHAUSqV2sMES69nzvHLQ9IPW2Fw,1469 +torch/include/ATen/ops/var_mean.h,sha256=tHOPj3nbkkxrrtNjFPUIREWcI2TrbsEIUrm_POi6aIA,3471 +torch/include/ATen/ops/var_mean_compositeexplicitautograd_dispatch.h,sha256=nJCMUsGiTT1vPPZY1S4j2FbynhrMKzGwPb2r4f3Wth8,1437 +torch/include/ATen/ops/var_mean_compositeimplicitautograd_dispatch.h,sha256=ZydlSZl7_itNZD4KsOSy9Ht391qMQd9415IdI--clWY,1527 +torch/include/ATen/ops/var_mean_cpu_dispatch.h,sha256=vYztBG8dlhkkV9Qm0sHdfKesjSBeUwLlAyXWcQ1sR3I,1128 +torch/include/ATen/ops/var_mean_cuda_dispatch.h,sha256=A_4opqHf8q6ilPM5jdkmV8hiQY_UDHbQAZ-t6JFFCmI,1130 +torch/include/ATen/ops/var_mean_native.h,sha256=SqDxuvF1Avwgp6uhfdNxFFOSSvonnYEN5-kzOju0d-s,1691 +torch/include/ATen/ops/var_mean_ops.h,sha256=iMjv5G18ETat0FsLdKBK8ag75tLdnC__ROYIVaN5zVE,5950 +torch/include/ATen/ops/var_native.h,sha256=HjJ-lf9zLKTWY9mjMs-MKNXUASmz5aqTHcOzXwXRNek,1894 +torch/include/ATen/ops/var_ops.h,sha256=q4GJL23srEMokn0Ey5xu8Wq66IIrBgRPPU4g4i03xeI,7758 +torch/include/ATen/ops/vdot.h,sha256=JicLDIkN5IfnoN87enhlobiJviGMJe6C5n1G2wd37UM,1402 +torch/include/ATen/ops/vdot_compositeexplicitautograd_dispatch.h,sha256=l6lc0wGToDZwZPEiSl20UKMYJGxcJi-gUt_xYnHsYjs,1169 +torch/include/ATen/ops/vdot_cpu_dispatch.h,sha256=YHIEGfbDjVlUP_jU-rTJnkolITQ-hkjz_CP1nZDn5JU,998 +torch/include/ATen/ops/vdot_cuda_dispatch.h,sha256=GaZyEFeqgMVWQocjbsYrjrwnfmsi8gdy18XQPDWpcGs,1000 +torch/include/ATen/ops/vdot_native.h,sha256=bxNBtL1qS4gZUG34QntoryniL9Zu2gDzoXQ1LrAhsPA,939 +torch/include/ATen/ops/vdot_ops.h,sha256=9T724eQRJCw7rQYrYOL8ODZ8qU7Ye8qZXgw2HdqdKr8,1961 +torch/include/ATen/ops/view.h,sha256=GGtONjhHkbAAZoG7YkCTLRMSjKO4PJHnyOu4SxGspo8,1226 +torch/include/ATen/ops/view_as.h,sha256=xDxUn24gipOhvcTNyePXEVhT0zQlx7dFF3IySwo45eM,758 +torch/include/ATen/ops/view_as_complex.h,sha256=u7picSMflYrIWKCWQ814OjXBYBFW55tjDY6mHcGzNAk,933 +torch/include/ATen/ops/view_as_complex_copy.h,sha256=1NDBuYRizSL7R0wpMrZehqqnMhwRSID6-I8wdTXQyTs,1421 +torch/include/ATen/ops/view_as_complex_copy_compositeexplicitautograd_dispatch.h,sha256=7YwDxhmZ4enLPGl5UONKstWHBRVHXAv2UxJ5FFcVang,1149 +torch/include/ATen/ops/view_as_complex_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=nIIJh5cxokGirJpguEn88TDnecBG1HxI9RLdSjleJC4,1058 +torch/include/ATen/ops/view_as_complex_copy_native.h,sha256=t_0Bq63ZfO63adSp1mNQ6makFBr2UGGZe4ZKJ8yjG7g,836 +torch/include/ATen/ops/view_as_complex_copy_ops.h,sha256=0rLVSPL32E60Qcjpu-38TfnY_-Jgh7VdxSMxA3Yrt2g,1885 +torch/include/ATen/ops/view_as_complex_cpu_dispatch.h,sha256=3jMO8MKkA30YDaXsRtIsJ7bLvD2hnABjOeCQUUKWpog,983 +torch/include/ATen/ops/view_as_complex_cuda_dispatch.h,sha256=yAopiXBJRt86Ot8cCjrxSTkXRphkp9rQDoe4qQ-i3CU,985 +torch/include/ATen/ops/view_as_complex_meta_dispatch.h,sha256=bnfEFb_v0CGfAxp7lS-4B454LowAle6x6XMdZDk61cI,985 +torch/include/ATen/ops/view_as_complex_native.h,sha256=lf9ZcP80WVs33hvB4Lhg3BnjeXZ3WzCOURdGAMzqDpE,739 +torch/include/ATen/ops/view_as_complex_ops.h,sha256=9R6piRXR4G7RDALjgA2UWTU_6wyLo_fwGxmo8V96h9M,1244 +torch/include/ATen/ops/view_as_compositeimplicitautograd_dispatch.h,sha256=C5cdp5DbhwwtcNkmqpICCGuT646zDlRD03zgeIPE8WY,1045 +torch/include/ATen/ops/view_as_native.h,sha256=_wWLqJC__0CWRID3JDYSnqRHczhbQauaX2fDwfMgp-k,757 +torch/include/ATen/ops/view_as_ops.h,sha256=zpiLCubplyWHWYexQuGPI8MyzJZZ2mKkOHm4fw_X02U,1306 +torch/include/ATen/ops/view_as_real.h,sha256=5ayVHt5QlvTfSHaJ1Hz8-4dmx-M_VKWim-WVyA1F9yc,921 +torch/include/ATen/ops/view_as_real_copy.h,sha256=7IQEl-c6a8QJ1wN0jaSyYKcSSGU1-ySygrXWRiyIlNQ,1391 +torch/include/ATen/ops/view_as_real_copy_compositeexplicitautograd_dispatch.h,sha256=7AyOa60Jva43fN_S0GYrJoLyIJt4H0i6bQqpweM67tM,1143 +torch/include/ATen/ops/view_as_real_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=pxYeLcSTKRfJIz1bUIy2ppanoNUMT-Hd2ZVdZ1v0TDo,1055 +torch/include/ATen/ops/view_as_real_copy_native.h,sha256=0WF3X8s2Hqdr_twooGlPfpzwRCMpc6IFsH0YJcXXjVo,830 +torch/include/ATen/ops/view_as_real_copy_ops.h,sha256=1QEGWkzDQPwNNeSuezLkRT278PeaCCkA2bKkVcMx9xg,1867 +torch/include/ATen/ops/view_as_real_cpu_dispatch.h,sha256=IIDz6-o9AGK1JjNbVtGvYxbGGP0cFJ8paH12DRBXxFo,980 +torch/include/ATen/ops/view_as_real_cuda_dispatch.h,sha256=a8jBi4gQ5a-fkvIIVCOLp-vJ4CwbwgZBkX_ZBrgseJs,982 +torch/include/ATen/ops/view_as_real_meta_dispatch.h,sha256=jLFinJQF4v1-HgEsoVUN4-iSY3tTjbHlUG4PMjPtfyw,982 +torch/include/ATen/ops/view_as_real_native.h,sha256=FBPkJ4Jm1JJYzK56sMl16gtx3mwNvK5I9ey5kP6opLg,736 +torch/include/ATen/ops/view_as_real_ops.h,sha256=ea3qjXjO9-xonKQR3sG6-kZ-gTzrZxBBLvxmZvFCefg,1235 +torch/include/ATen/ops/view_compositeexplicitautograd_dispatch.h,sha256=YfVf_zRhMJVZwtdi0360E_lsDJZmo0C9jqRX7Ayfq6U,1038 +torch/include/ATen/ops/view_copy.h,sha256=peQjHdsgZV7JG_uG6MABHdu6S-TxxOFhTbD0cxrezYs,4567 +torch/include/ATen/ops/view_copy_compositeexplicitautograd_dispatch.h,sha256=aYEAnUUQxskAc4fziN8xtieCgMmVXicygQUn2l1aWr0,1607 +torch/include/ATen/ops/view_copy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=MvDZROlbaG5ER5LTuq5REUHVGm8kBwwxLP2FVKYX4vU,1238 +torch/include/ATen/ops/view_copy_native.h,sha256=YiUsJYzg0-BgZw7QmPTc7wrqeZJalTBLkngAk_jkVsc,1074 +torch/include/ATen/ops/view_copy_ops.h,sha256=Y2jtVsII1DLIQn31Bcdm57xlnlJOVb4nIoM7-GkwUCQ,3294 +torch/include/ATen/ops/view_cpu_dispatch.h,sha256=n0nHJcsPfSrGba8oDYuE8b93v5BumHDMVt6A-N_enr0,1079 +torch/include/ATen/ops/view_cuda_dispatch.h,sha256=2u7dNdDKeuSEg4aeLaSOOYvfc40dCXn4MINdLMuyLUg,1081 +torch/include/ATen/ops/view_meta_dispatch.h,sha256=vAOyA1AJ5XD0tXbygiTYrRa-uEJX35_SACr1gNTx4lg,1081 +torch/include/ATen/ops/view_native.h,sha256=Cs4X4WNX_eatnOHi2Hhfjmm3Ko6yQLFJcJuNXDq9N4k,992 +torch/include/ATen/ops/view_ops.h,sha256=SwwCiaWM53F4d3WML2FpoU9FK4ZupDcCcWYJkC-eP9g,1894 +torch/include/ATen/ops/vsplit.h,sha256=KM71VxI6WvjpHrNSaX6Otlz5tKSh3YyP5tvdKBySMMQ,1193 +torch/include/ATen/ops/vsplit_compositeimplicitautograd_dispatch.h,sha256=t52jUPFnDHNxt8JdBEq-3SSE1O9tGfzsOczonUdybOE,1145 +torch/include/ATen/ops/vsplit_native.h,sha256=OIWh43o4DGB9m7Y4bT4EcE6T8vsSo8QV1MdA9RGIUXo,857 +torch/include/ATen/ops/vsplit_ops.h,sha256=u1eSYptxW_q-ruySzD6rhOKni5O-9Kzuv_I5r2tworM,1996 +torch/include/ATen/ops/vstack.h,sha256=9-oSnsmcpHnF7OQmLdMbNGUw1F-DFWDS0MwG49lVZMk,1302 +torch/include/ATen/ops/vstack_compositeimplicitautograd_dispatch.h,sha256=emO4YscThcSAWMKGxGuJosB94u8muTcTjLW98iK6xpY,1172 +torch/include/ATen/ops/vstack_native.h,sha256=me3PDh8hR7Z7IBZcjd2zWU_5Q4leydqeEAY4ewtC16s,806 +torch/include/ATen/ops/vstack_ops.h,sha256=WzGCcbXgd_UTVjQZf5ozkAS13a0bTNWfNict4SXTI-0,1799 +torch/include/ATen/ops/where.h,sha256=e5IQB-LZoBA2mv24F8lCpdGtg5mZLp5IN-75vqLyhS0,2557 +torch/include/ATen/ops/where_compositeimplicitautograd_dispatch.h,sha256=peRwiVwihUlDxQwojEO1mXQO7Ha2XaIaAQ9wqwzcu3w,1364 +torch/include/ATen/ops/where_cpu_dispatch.h,sha256=S0qQQ16Fii0CA3i09OAUYWAY9hrRcudP9OGJV5WWgjQ,1296 +torch/include/ATen/ops/where_cuda_dispatch.h,sha256=4EoxCwDtpsOS4qD5vqgW0mB_wPlZOWrwdG3MMCrx-Sk,1298 +torch/include/ATen/ops/where_native.h,sha256=EdIsoAf_mD76R_OaeXYQ-hzkFPS5RckLT9hvMXmjcLE,1591 +torch/include/ATen/ops/where_ops.h,sha256=4UmqmbPgxA9Ow7EEpldJUbrUgm-JowsOwhAy-K6DdPk,4881 +torch/include/ATen/ops/xlogy.h,sha256=TuCqeYsAVCOenJnWAo8TaphxJlOMowdc7RhMNiOCUug,3318 +torch/include/ATen/ops/xlogy_compositeexplicitautograd_dispatch.h,sha256=iVS_KwkXYj3d4WVWMOLPWnAEWouswJnKsjq736Ito-I,1612 +torch/include/ATen/ops/xlogy_compositeexplicitautogradnonfunctional_dispatch.h,sha256=893tL9CGZya8TpO9sRY0zYtCaipyLDE7CIc_Xpf5C1Q,1145 +torch/include/ATen/ops/xlogy_cpu_dispatch.h,sha256=rLLrWLK8GlMaWaFOjXxFMfLPgxyi3Y8fmDsg-5ApNy8,1282 +torch/include/ATen/ops/xlogy_cuda_dispatch.h,sha256=WbCQeTbvAWTPrGUZ4ahFEM8bjrc9ETJJAqslOU6ADAI,1284 +torch/include/ATen/ops/xlogy_meta.h,sha256=XwY96Fur0W4J-FkBBzSLX7vkPd2hIn0CSfoSxZSA1l8,853 +torch/include/ATen/ops/xlogy_meta_dispatch.h,sha256=XfwHSu5uRYR8XerF7Pj7jia6SWcP7ILRR_82gZC5PoU,1284 +torch/include/ATen/ops/xlogy_native.h,sha256=dxKz3BI0ip-r2VMHmdv4Z5M1dT5a1UvRzEHrNL3GQk8,1320 +torch/include/ATen/ops/xlogy_ops.h,sha256=8qWfUHgkOfm_ltEQLeT0mFjr-fyY9nc2O6raghk8g1I,5881 +torch/include/ATen/ops/xor.h,sha256=UIoqw1zoIaprTXMXWtpL9qk0Zs6lERKjzaPsosIrUKM,1151 +torch/include/ATen/ops/xor_compositeimplicitautograd_dispatch.h,sha256=8R1svVhfc2qFTWM-Fj8wooTqKBD6pYAJXgyS_g73A74,1282 +torch/include/ATen/ops/xor_native.h,sha256=gM5dHlixX5ocP3UuTv8teVyONjrhFj8lkBciivnrQ7s,994 +torch/include/ATen/ops/xor_ops.h,sha256=KNyI_wAKSbxhcl7EmkaPR65P_u2wSNxFq2J2ic-Sx6s,3145 +torch/include/ATen/ops/zero.h,sha256=l1nRjtPSq1AQr6AEwYAKTUeywvg004HZYB-NT3LjQ6c,1397 +torch/include/ATen/ops/zero_compositeexplicitautograd_dispatch.h,sha256=RwOxpmH7vFAarQXVZkuYdBdybZy_YhEfUwdLeSwmlnk,1169 +torch/include/ATen/ops/zero_cpu_dispatch.h,sha256=--hGYlPpPqTv9nVIBWSLlCq1eY4F17dhTx6e-vUKy3c,969 +torch/include/ATen/ops/zero_cuda_dispatch.h,sha256=5yduzMQuacGwEV7MWqKhXMWXF2gjbG3FkvNFS-3Y7Gk,971 +torch/include/ATen/ops/zero_meta_dispatch.h,sha256=zj1PwiKraybZ-vSRnryY-eXt37kxO9M8dtG5HaQW2w4,971 +torch/include/ATen/ops/zero_native.h,sha256=zIxO5KqSUxuJcMoAC6Yrw_prZsmxTz6NJGb30lMjmnw,1135 +torch/include/ATen/ops/zero_ops.h,sha256=SH7IZbIrl1-rELgxW4Rl2LIg23hSNCmLMJwGHwy2gL8,2282 +torch/include/ATen/ops/zeros.h,sha256=28Fpk86-P5URArDY3iPweMXVtcc0iJjqRwR1Amr70Ik,7136 +torch/include/ATen/ops/zeros_compositeexplicitautograd_dispatch.h,sha256=flCpRhzYMiT2a3IDtKWxyh4i3954alOAmf0TBqWc6wQ,2440 +torch/include/ATen/ops/zeros_like.h,sha256=jdw3IDyDg_k5_j_t9agBCmStJpL0bfP-PlvJhxqCbpI,2475 +torch/include/ATen/ops/zeros_like_compositeexplicitautograd_dispatch.h,sha256=Zef8fFttnNwB08ztQGWxwQ149IgEewYmpKtgLhLYyu8,1646 +torch/include/ATen/ops/zeros_like_compositeimplicitautogradnestedtensor_dispatch.h,sha256=TmVm2MpPmpHuSrfeqTFuPJ5aVEBnQYMgQauXMJSnbcw,1392 +torch/include/ATen/ops/zeros_like_native.h,sha256=jUbqnlj7UU-v1U3lWjQSFxciVMD7uo-YWOL3JLHcnL8,1086 +torch/include/ATen/ops/zeros_like_ops.h,sha256=FkMXkSDU7uv1jAT_teyuPyr5S1GMgbLVkIkp_i3wSFM,2655 +torch/include/ATen/ops/zeros_native.h,sha256=hGGjFyBZargs2pXY_DrBUfIOehVEMHS_7Xcm9uTd5Vk,1416 +torch/include/ATen/ops/zeros_ops.h,sha256=6OzY2ObtV9NggSvRmLF8aBRlkwkhCKgUKBT3CZB26D8,4160 +torch/include/ATen/quantized/QTensorImpl.h,sha256=YCONez30ZR878R0GgzfJazkS44z8xQBYXrIqGM2JG5s,4275 +torch/include/ATen/quantized/Quantizer.h,sha256=11qYFvRL3cOpn03oX2jj-McVtmqvxCTVp70_i2HgokY,9486 +torch/include/ATen/record_function.h,sha256=i8ubPtwZiJu_7Tpq2KMgiz-QArMQtQMF9c6KeTXLpyY,24510 +torch/include/ATen/xpu/CachingHostAllocator.h,sha256=gONgsOfhC26F5q2kJ650FDaMpCQT1EvK3OHy-365fDg,1611 +torch/include/ATen/xpu/PeerToPeerAccess.h,sha256=QaZxIBnYUfLYrkqZgNbnMKuAXw8gGb1feJKKzacobXE,571 +torch/include/ATen/xpu/PhiloxXpuState.h,sha256=1XsgWS7eFn9uyFMrhp9KcWESdjg_TMwP0LCYdS8dWWg,1261 +torch/include/ATen/xpu/PinnedMemoryAllocator.h,sha256=pQ7YKcs5YKKEwiGf5yUQROWjKj5WXtt2GOs-dZg1nIA,500 +torch/include/ATen/xpu/XPUContext.h,sha256=2mMuW1pieqh-HETTKnZBhNdwC1fv-A-taQbVquPzvNE,791 +torch/include/ATen/xpu/XPUDevice.h,sha256=rSn5aU7Pn8Pdmig-ckK2xwXXUpH1Q9rtzGJI63Dhsv8,521 +torch/include/ATen/xpu/XPUEvent.h,sha256=jdUIC50oEIdXyYz1r3J2-gQoYg_HIYl9iIzNVooOszI,330 +torch/include/ATen/xpu/XPUGeneratorImpl.h,sha256=-bvV56oSKbqIYJPJ7s7BEfu-gltx3uA8FTiNlcsxTTo,2433 +torch/include/ATen/xpu/XPUGraphsUtils.h,sha256=Z6abmhD97-catJA8HzmeuHUDPIVg3Bt74WSBNLEMiR4,810 +torch/include/ATen/xpu/XPUScaledBlas.h,sha256=0YJyocUwtMrVT3gemZr-CYK2nYr_2PBiVsZlU-Hy4Z0,2647 +torch/include/ATen/xpu/detail/XPUHooks.h,sha256=_7iHlmWH6cW5Q-TgHmKcTCaH8nZdBbSowQQTkWfqFeQ,1431 +torch/include/THC/THCAtomics.cuh,sha256=H75MAoZpXZIKRrPHUPUk-ZQaky8eTN8UYEcI8-BsfdE,372 +torch/include/THC/THCDeviceUtils.cuh,sha256=U2DABMB1OvzbnGeK5XZgJaHx3rt_Ox9gobPJgzm_cCY,332 +torch/include/advisor-annotate.h,sha256=MgjrWkMfFXXb2B7pJlf4xO-drRhiQUPw5t36P264E-g,23930 +torch/include/c10/core/Allocator.h,sha256=e48xQEeIyfuax8jxPUnPt1Z11KyhfwC0R1oxIF02Pl0,14459 +torch/include/c10/core/AllocatorConfig.h,sha256=5mdbb-q6se0CN9JIZamzKAJECIOeGRwl9cbWhWgmDEA,14740 +torch/include/c10/core/AutogradState.h,sha256=RoJraKpzqdovlTTR6UpNBIaQW1aAwwOHogS4RO__zDM,2268 +torch/include/c10/core/Backend.h,sha256=jUqyE50qhbELtKPwwVryHE_7Aj6M9YXT1PEUbO59uy8,12187 +torch/include/c10/core/CPUAllocator.h,sha256=_tQd7SAIJ5k0s7Inu0P5L-o7SSs7diwk2j71sLX98Lw,1953 +torch/include/c10/core/CachingDeviceAllocator.h,sha256=qVPbPqdU6KrXghdePbKMJvQ8jsxhkhKqlpSaVSv9vGI,4559 +torch/include/c10/core/CompileTimeFunctionPointer.h,sha256=ea6PBQnezWHDIAcwtLYbIb-iS_nRuNcF8aE5lS4dgYM,1954 +torch/include/c10/core/ConstantSymNodeImpl.h,sha256=3aOwus1SVehkMF7gyiY0G0Q5DfW67Ch9awyhFV7JxJw,3244 +torch/include/c10/core/Contiguity.h,sha256=OcYWLOKaMJuo7dRL5Yw3piqMJ_a5706yUPGr1y47Zr0,10039 +torch/include/c10/core/CopyBytes.h,sha256=MawPcjyx1VMe1f9kp2RIx2BjAs_lI8jlK4BuppekD6I,1597 +torch/include/c10/core/DefaultDtype.h,sha256=KZKv7UUxi8v82O_Rk4gLa8yQ7QvkYq2HYUmxinwch3I,648 +torch/include/c10/core/DefaultTensorOptions.h,sha256=HgF3PO38zQ9lgd4RxZ2D5wWhobFPof5Sao6cxb_XJ_8,1318 +torch/include/c10/core/Device.h,sha256=xOo02kJjwgwFhsBck2TOjH3cg97SsNwbo0NItlqkxr8,7120 +torch/include/c10/core/DeviceArray.h,sha256=22EPv2g9iAoMplJyqgcPJkRJ35OwJAp3LOv_6RFg724,937 +torch/include/c10/core/DeviceCapability.h,sha256=sw7aVyoj2M0skKdyJQoauOguTqBcB9yYKvJwRDRmyoY,2534 +torch/include/c10/core/DeviceGuard.h,sha256=Gms0KqpunmWig_7lmwO7jrGu9f9vSESDEbsIQcBz5FI,8062 +torch/include/c10/core/DeviceType.h,sha256=FSeENqyP_wy2oz9TTWCVIn7UAWq0p2v4v9tMqMTCKlc,1055 +torch/include/c10/core/DispatchKey.h,sha256=J17uEcheQmM-LKC5JxyZefoLrrWVBoirVUPFZNdRGxg,32681 +torch/include/c10/core/DispatchKeySet.h,sha256=oEYwoUBVJUzdn6V5oQKXeMcPw8tIn3aGQpat2hbp3CY,42121 +torch/include/c10/core/DynamicCast.h,sha256=Rak9MDhBjaSbRxDI-yqQnB8f55gwpX0OM3n4yUuX-Lc,4868 +torch/include/c10/core/Event.h,sha256=UadXfNbB3Rga50tKW1BbTvfB-0_3vmscx6ta3JbwHxk,4710 +torch/include/c10/core/GeneratorImpl.h,sha256=pXrJKhbpEkzfzW2ZmattDRTK-o4US_0VNP-LSEGcczg,4191 +torch/include/c10/core/GradMode.h,sha256=z9_siQQtwK4RxWAE2eHUyt20IIUgGpdfGLp_LbMzKjE,1915 +torch/include/c10/core/InferenceMode.h,sha256=WiggR4JpCIisvvfKIhts7QMvJBsUvG3uksyGQBAkUZw,4017 +torch/include/c10/core/Layout.h,sha256=WZRk5uQ1-c6RjGjk0TGDwMIWZrgNSxMoXZZxIqQ4TUE,1887 +torch/include/c10/core/MemoryFormat.h,sha256=XI0mFyt3vpwyPJ-urnb0vmdrW2W1EOeoEJuYyKbdGeY,8843 +torch/include/c10/core/OptionalRef.h,sha256=VGHaFtquoi3P9FKVWvCmaEmliVViTAy04X7PLWl-IXc,775 +torch/include/c10/core/PyHandleCache.h,sha256=FouTl09n8S7PrgCeNrIYlsUJefsAuddQkYKc5aJveNI,3355 +torch/include/c10/core/QEngine.h,sha256=0XnrQ3HHh00H39dSdMOnWxDt2mC-2F8gUbRd5mtDopM,1264 +torch/include/c10/core/QScheme.h,sha256=Hxao6hBmnsPo4mDykSRoaHGQV1BKndR9W_qvIoD9P5o,1934 +torch/include/c10/core/RefcountedDeleter.h,sha256=z9vp7IFlO65iZE_GqMSfYYX5tXSLOla7T0jgecY96UU,2505 +torch/include/c10/core/SafePyObject.h,sha256=C4eUbVovN5DSCny3CpaMuV0iD65i3urfiM25v9Ce5c4,3975 +torch/include/c10/core/Scalar.h,sha256=0XcaSo3YRCBTAH2PSq7JT99WXwesnsMjthZj3kWLDDw,14411 +torch/include/c10/core/ScalarType.h,sha256=tLqyDCRjVJltJ2bXxgNIhDF44ezNNj7R0RFCRse10y8,9246 +torch/include/c10/core/ScalarTypeToTypeMeta.h,sha256=2ZAPKZkxiEGr1pwqGpnxjqF-ISfk5b4jk6zf18IW_bw,1611 +torch/include/c10/core/Storage.h,sha256=IpQRLJBoacc-PYcu5ZOgjJTP19n94MBRQCIVjmtbb5M,7891 +torch/include/c10/core/StorageImpl.h,sha256=OKoXOg7Bk0ixNZyZfmICPFnHesA6a5Tw9wmnOknjjvk,12071 +torch/include/c10/core/Stream.h,sha256=vklRq7knIIhtKPmGLxoxff1JHkVspXcpYylTTPunj6I,6647 +torch/include/c10/core/StreamGuard.h,sha256=lSXnEpjYzbhTv5LS9PbBpCHFY90SDmbf-pYfDPIqosk,6842 +torch/include/c10/core/SymBool.h,sha256=rdRarYzPMHq3OvsNyg05BbQMt1dDkqiuBZw7dKkVO7M,4892 +torch/include/c10/core/SymFloat.h,sha256=mhRHhTtXNNcyr3B5sDwclWDOLzI5_HOkA64fBNFN_iE,3891 +torch/include/c10/core/SymInt.h,sha256=H8pBTiD28hzkKK444lA3p80VAB9RpsW2hjIp2ECLQgE,17759 +torch/include/c10/core/SymIntArrayRef.h,sha256=psgPBcmm_8F1Gr_Z9GrUo94nF7LmvkHhs54bP6yYME4,3530 +torch/include/c10/core/SymNodeImpl.h,sha256=e43eQx5LX4kt6RxU2aDGfaFcl89Lpnl-fcfg33lFjZ8,7598 +torch/include/c10/core/SymbolicShapeMeta.h,sha256=ImF9BuECCM-PRZKE578Uyyianfdsgyo_xeezvr9XNf4,7983 +torch/include/c10/core/TensorImpl.h,sha256=tkpsOdzdf7MKOOeOwk-Pw8cvTZAXHjzMrWBhb4VinfA,116632 +torch/include/c10/core/TensorOptions.h,sha256=qFFAmNKqdaCMXoRMge0hy4DjxOz2SAUAhcfjWFxl_ts,27288 +torch/include/c10/core/UndefinedTensorImpl.h,sha256=YPHuqeThSMX-hlQXH3_1ax1hejSGvexTJQeULXYJs4s,1487 +torch/include/c10/core/WrapDimMinimal.h,sha256=GzEltFCQfxV_PknyCE2aTtan-Uie-0AtUDNPO76f6ZE,1614 +torch/include/c10/core/alignment.h,sha256=CyLRjpw3Jm1j6I9sVCPc4F1wWXOfo1wcEzSYuezXhNo,1132 +torch/include/c10/core/impl/COW.h,sha256=KPS_fVIdl7S7-n4OZAbTbv16aoV_1pSDCXgn6n9uRLg,1310 +torch/include/c10/core/impl/COWDeleter.h,sha256=XnD0YAt5Euep8_WazaoqIs2sxEQpyunbVwLgAoTtGqg,2352 +torch/include/c10/core/impl/DeviceGuardImplInterface.h,sha256=K9LkLw8J9Bir8jMbmnlY0zQCME_VCf2BK7qA0mnwGeA,15212 +torch/include/c10/core/impl/FakeGuardImpl.h,sha256=AO7r_xeS46X0I_63CpAmTlaB7BTNdyo6aYVudvpYBac,3436 +torch/include/c10/core/impl/GPUTrace.h,sha256=h3gsM8i7vgjyb8ypN9JpTtxbcKr5xGRB05IML4lffZY,1128 +torch/include/c10/core/impl/HermeticPyObjectTLS.h,sha256=3ZAGs8gcdy01ZnRPqN9i6SrN_SJUmkXLi4F-FhGqSR4,2800 +torch/include/c10/core/impl/InlineDeviceGuard.h,sha256=R8ooBA35wnukVZ5_Cl4eo19Jn4azaxVeUngCTTS66sI,16165 +torch/include/c10/core/impl/InlineEvent.h,sha256=oSHUnxokPTjgAtJsjrcL4iwYaJogtdguP4Ny8bCubns,4562 +torch/include/c10/core/impl/InlineStreamGuard.h,sha256=y0-b1g1el6WQGK1mHXMwcniDstsC9m8Q6HIUL_K4lWc,10168 +torch/include/c10/core/impl/LocalDispatchKeySet.h,sha256=k8Gb0gPl6zXnTKjiwvY-i983FJgawQD9qkGOCWGpWlw,6811 +torch/include/c10/core/impl/PyInterpreter.h,sha256=Imdw1o8r0S5Pb1NiNyEK_FpB0StVgyyTl9dV67pa52g,11003 +torch/include/c10/core/impl/PyInterpreterHooks.h,sha256=_6a3hwA1xa1ADfvedrfYZs9A4gaCNdmFHABb8J5_azo,1370 +torch/include/c10/core/impl/PyObjectSlot.h,sha256=uHrktIqLM_6T6wUQurLruZI0CzQOKqsoHk9OETxAq9g,2080 +torch/include/c10/core/impl/PythonDispatcherTLS.h,sha256=iPTFvUJXiDcNL3U0fL9DwbnRBvHKA98Sj1mdxG_esWE,1094 +torch/include/c10/core/impl/SizesAndStrides.h,sha256=3Lk4MQ_G9Yxd466J0Y63J4gznQJvjSTNcTCgn3CEzx0,9010 +torch/include/c10/core/impl/TorchDispatchModeTLS.h,sha256=cc-jimOtCaHndjJJC4CXNc0ZxiJbojjZfbDSnGPbi0w,2535 +torch/include/c10/core/impl/VirtualGuardImpl.h,sha256=HNTfifMlUmPP2dzqPdjW-1O3nVBef6lxu326F-8U0xY,3655 +torch/include/c10/core/impl/alloc_cpu.h,sha256=r1kaVQbsvfDznXZhbyfzCd5V1iUhM5cb-i__TG8p7Ik,926 +torch/include/c10/core/thread_pool.h,sha256=I3B_S9Ug2qpxoMRzI6kpxTEJ2QfdE2qQ8_LGEglKpSo,3251 +torch/include/c10/cuda/CUDAAlgorithm.h,sha256=lsQzc-6okqaGCA8Jbeh2Z2nMRzzeMqPrjP8R7_R4XSc,1295 +torch/include/c10/cuda/CUDAAllocatorConfig.h,sha256=WIaxtexjN8QdXtOCaAPbFCLvmeQTD5EG2zMLXStXWbs,7829 +torch/include/c10/cuda/CUDACachingAllocator.h,sha256=oILXAvvhSs6LU7EkT_pDPuIP-Umj0jcGRDojxx4zdjM,18608 +torch/include/c10/cuda/CUDADeviceAssertion.h,sha256=8MMMTcwJdHHovtI4mLZQMWwvin9qrDfow5PCTBj9Zq8,4416 +torch/include/c10/cuda/CUDADeviceAssertionHost.h,sha256=tfmeiKxIwa7ZDXGLMNMxxEk_ujKKpAs7gp7aPX4mY9c,6885 +torch/include/c10/cuda/CUDAException.h,sha256=D-n2-w2JnzRgLXG5c_56nEoH0pLbHFDg3EDQZL5FQD8,4670 +torch/include/c10/cuda/CUDAFunctions.h,sha256=YvfMp0rFwogXuxHFAsgkeOq1WiSD7DqwowplI9C89Wo,4616 +torch/include/c10/cuda/CUDAGraphsC10Utils.h,sha256=iSE3ZeYTt_zGzccdFoRVYW69osUAHdlugFq9SURa2JU,2998 +torch/include/c10/cuda/CUDAGuard.h,sha256=pogRsenjYuqUa0rxFCuv4PQVtvnC3fbO8eMDF-llypQ,11599 +torch/include/c10/cuda/CUDAMacros.h,sha256=vKcRKJirbLzl6keZ7h9Nq0GHVBG4k8_xD_F6_DRo-rs,1733 +torch/include/c10/cuda/CUDAMathCompat.h,sha256=-ycGywH4SB7-AFYszcthbtzN3tYeRLC59wbhveUS8Gc,3800 +torch/include/c10/cuda/CUDAMiscFunctions.h,sha256=bAYoH_BsfE0drBHbPwbQY1BKpQvzAqIp47Ttp3ixSQQ,682 +torch/include/c10/cuda/CUDAStream.h,sha256=9eIYGzGjW59na9zkQmHQHXDgVqtgUFxPJ1sgvXPJ4Xo,9893 +torch/include/c10/cuda/driver_api.h,sha256=YJDTLY3wmkRijd2nb2KxXuETi2b3V_EKIwweHq8vr1Q,5560 +torch/include/c10/cuda/impl/CUDAGuardImpl.h,sha256=V7NJjlEVLTLouMJ9H7ejDC8h43OsvDdP2XenAOWl2ic,9551 +torch/include/c10/cuda/impl/CUDATest.h,sha256=BTPl4FJNqWy_3-YjnTBSSP51zAn9mZNRExbII4A6ldY,368 +torch/include/c10/cuda/impl/cuda_cmake_macros.h,sha256=b4GPHGIedCcUlEmdyIUJSueqx6cxYglCPACGG4tBD0Q,448 +torch/include/c10/macros/Export.h,sha256=aKgtX7IoPp-XfETT47kLUzjtrnOMHwXoApOWvfEHm-k,298 +torch/include/c10/macros/Macros.h,sha256=wH4q51OHw80iQFJqqiA9fdomPzKQyNh16vYhQ_FDjkY,298 +torch/include/c10/macros/cmake_macros.h,sha256=1C1RQ6S24kR8rzJDnxSjruaF9pbsx4bfcQjFvsNVKe8,541 +torch/include/c10/metal/atomic.h,sha256=SHl9SvSbm0x3t6IVySOVDKm64T80PBlnfHNd9DHlyjc,5626 +torch/include/c10/metal/common.h,sha256=_IlYwDOM_82h4VzJnwWDO9BP_z6c6dj5oXNmit3kFDk,1453 +torch/include/c10/metal/error.h,sha256=A9oV-mQYa2KoAp6JqIeI4IA4xdHB8WLo0os6xcXbPos,2662 +torch/include/c10/metal/expm1f.h,sha256=W1tWWSsW05yGNpKRElkDGV2p-AMXWMa_NPhRTEkdN-s,3850 +torch/include/c10/metal/igamma.h,sha256=qqyazrvnsloK5hiJX3kibHJXEwbAHDBxSWfzwmMBcdE,29348 +torch/include/c10/metal/indexing.h,sha256=h9Mt34ObuyXnGRC9TkN4hNqY6SpBfZH3YQHa-hlKB8w,55043 +torch/include/c10/metal/random.h,sha256=IO331_JhhAnlP1dwyWGnq7eQ0hc4tSS9w9bhqqSLiIM,2471 +torch/include/c10/metal/reduction_utils.h,sha256=pn6Y5d7N1Qa-Al6YbHirW5RusI4itTtSCj_7fRKLDho,11229 +torch/include/c10/metal/special_math.h,sha256=iWI8LdjWome1wSvwXSZDYTSjWUOvYI-yrAu6Y1A2n5I,56194 +torch/include/c10/metal/utils.h,sha256=jduSnlLBIAYBVnIaG9s8Iounl83vonF6BHeDZig6fMs,9292 +torch/include/c10/mobile/CPUCachingAllocator.h,sha256=siV7RrY8N_OTHsB5pv_i_vLjwP42pTXwrGyXYSJDqnk,4419 +torch/include/c10/mobile/CPUProfilingAllocator.h,sha256=oncuerKj9rl0s1psb-coVn62gPeuacZ9bDRlkRIyS8I,4990 +torch/include/c10/test/util/Macros.h,sha256=zDj8MR87ceOXepi-1GwaSYEnZTKQpcsCivD-tTmzd2k,430 +torch/include/c10/test/util/complex_math_test_common.h,sha256=WybEVfYt5z6FHzF8BQTu3bhpdmizcJYweZWK6T6SUAU,22218 +torch/include/c10/test/util/complex_test_common.h,sha256=Q49tXJ3LG0VNYIHsfHW4p1PqqSpg8Rc6yqEZPi134aw,20800 +torch/include/c10/util/AbortHandler.h,sha256=tpnYao6yYLJanEvxZbNYmuWGY0nk9xi-VOaCwPk7k7M,2446 +torch/include/c10/util/AlignOf.h,sha256=2DAJK0-8JTaWbnw0tZdUvyAafOIrnkldhnWVB2oOIpw,5160 +torch/include/c10/util/ApproximateClock.h,sha256=5LkyCeXb-sTHt30PJezIYfXZup-sOFtAoLlK-s7Z1mM,3736 +torch/include/c10/util/Array.h,sha256=H7UEVhnbTgTUx1NSbaGvr6RcwKM2c2rouVamgDnL2qM,704 +torch/include/c10/util/ArrayRef.h,sha256=Hn57lAMvVMwEAy5gqpEEE4Y1IR3evlLis9DAm-0HyHY,10252 +torch/include/c10/util/BFloat16-inl.h,sha256=tANwC7RCx2Q4TQpZxebutCOlc7XIiQ3rzCiC9GALxWk,298 +torch/include/c10/util/BFloat16-math.h,sha256=rfHxMYHrE90RgFQb6fRdPhlwO8X-gveGM_5XS0At72o,8771 +torch/include/c10/util/BFloat16.h,sha256=tANwC7RCx2Q4TQpZxebutCOlc7XIiQ3rzCiC9GALxWk,298 +torch/include/c10/util/Backtrace.h,sha256=99hh6frZffmL9B6uyPlKMEC_DVrSZ90iBnf0buYsBMA,1051 +torch/include/c10/util/Bitset.h,sha256=viuJC1vkqCvyuQAakEIe7gH1jc4sI6qJOjEmbQb61YM,3674 +torch/include/c10/util/C++17.h,sha256=qcd25pqDhOIGtUxvRXjDMWiGSwYHjtuUf8FWAiSpCcY,2068 +torch/include/c10/util/CallOnce.h,sha256=QKZdyHuNeVvMeCbtIkpD1DKUcIMoERA8M6zNWP0cRUc,2317 +torch/include/c10/util/ConstexprCrc.h,sha256=KxnQ5FBry6GVPm0732nDRE82DIq2g7DWfN-LmHcLfoc,6849 +torch/include/c10/util/DeadlockDetection.h,sha256=quzUTfDHPvS_6mttyRt-dDe_9kyGSmnuL-eI_-yx5BU,2471 +torch/include/c10/util/Deprecated.h,sha256=9xSX2Bd3ZgvKHV3qLA28orYjoEi4OlQW4upS17Ik644,313 +torch/include/c10/util/DimVector.h,sha256=CMuEFgqGmK-gM6sVX6LKXCBrbE3KIjy1PkMBlYIW2SQ,698 +torch/include/c10/util/DynamicCounter.h,sha256=9CUviUDJgTs5bkUecWKED1k03u15M_AEQNVonkxFGh4,1571 +torch/include/c10/util/Enumerate.h,sha256=lF-iYhMrwqAgSJR8OFrJN767aNDdhoQ0cTmy6XvbGeU,4255 +torch/include/c10/util/Exception.h,sha256=Phc5e3mr40N7LRJ11p8-Lz_UBL5GJ-SOF09XYg0UiWQ,33466 +torch/include/c10/util/ExclusivelyOwned.h,sha256=wf_sQd-NXJvDWYzGc8vpY26EOrnNIiPPx4gF3tJBW5c,4718 +torch/include/c10/util/ExclusivelyOwnedTensorTraits.h,sha256=H9-sjDESpRHPJ9PNJ5wHsOznreGa6Q5AZJwIhzZER2s,2474 +torch/include/c10/util/FbcodeMaps.h,sha256=SvWo5BYW6hq-FW5gA-SaXpa2SWxs9wzkKR2erty_Prc,982 +torch/include/c10/util/FileSystem.h,sha256=qa1WnkhdQWOnmAdw6VGPMuRRFC7T7PZZjzTu9r_m6CY,891 +torch/include/c10/util/Flags.h,sha256=LICXlXDamM7sC-CLBxoacYqUvHZpu15JlnWiDb5vGh4,11154 +torch/include/c10/util/Float4_e2m1fn_x2.h,sha256=I5T3I6VvHz10-h6Au7k7hoQPZ0HGgj-QDDA3LmAEJOQ,306 +torch/include/c10/util/Float8_e4m3fn-inl.h,sha256=OUgD3KdzlsxbY4vU88NObVdrSSf2LZktRGUmnUQJsnk,303 +torch/include/c10/util/Float8_e4m3fn.h,sha256=OUgD3KdzlsxbY4vU88NObVdrSSf2LZktRGUmnUQJsnk,303 +torch/include/c10/util/Float8_e4m3fnuz-inl.h,sha256=dU4G7OuItSLI6hzDUQ3akWwsnurqoqmqiguPZqIR8ms,305 +torch/include/c10/util/Float8_e4m3fnuz.h,sha256=dU4G7OuItSLI6hzDUQ3akWwsnurqoqmqiguPZqIR8ms,305 +torch/include/c10/util/Float8_e5m2-inl.h,sha256=iqc-2y8RBLJiqt3vVigCgalkl5Xnv3knpiZ0fLBZLKs,301 +torch/include/c10/util/Float8_e5m2.h,sha256=iqc-2y8RBLJiqt3vVigCgalkl5Xnv3knpiZ0fLBZLKs,301 +torch/include/c10/util/Float8_e5m2fnuz-inl.h,sha256=bSW6u8wgewkReTQ3LAYMfRBsl9iVBlZttCu6ZtbzXtk,305 +torch/include/c10/util/Float8_e5m2fnuz.h,sha256=bSW6u8wgewkReTQ3LAYMfRBsl9iVBlZttCu6ZtbzXtk,305 +torch/include/c10/util/Float8_e8m0fnu-inl.h,sha256=QesGPWulELXJsE1_ymZwYgNS1LACzW1FRM5VIlIyrbU,304 +torch/include/c10/util/Float8_e8m0fnu.h,sha256=QesGPWulELXJsE1_ymZwYgNS1LACzW1FRM5VIlIyrbU,304 +torch/include/c10/util/FunctionRef.h,sha256=fyQ8_KLA5NIOXrYy34ytVaSHMgTm0kuGA9B_T4JnUTs,2584 +torch/include/c10/util/Gauge.h,sha256=kZMzAF3p4sit2L0JEX2gjttCzHPHBRaJyac6FC5YK0U,1446 +torch/include/c10/util/Half-inl.h,sha256=aQVHyZtMaFu4m6195VXdn0DNNsfDuBc4gLu9Jmb82SQ,294 +torch/include/c10/util/Half.h,sha256=WCt2hbTquUvDKVMV-07qwyw0pwhYQeb_V9xDYJeInps,555 +torch/include/c10/util/IdWrapper.h,sha256=XrOlnZhjCy8yK7PGWfS7452TFzEFjQvexjlwkWR1xzE,2590 +torch/include/c10/util/IntrusiveList.h,sha256=U1jvYlB76ulrnrgACg1WihddOs1vtEFq-RInhlPUGF4,4749 +torch/include/c10/util/Lazy.h,sha256=cqlGY0dfmPapAy_WV7Lih5j4U1q0Tobe__JaTW2VjXc,3077 +torch/include/c10/util/LeftRight.h,sha256=GKovBValnILIaGvYNlIhkZ7C0Z1gX0sMFW-qTxXK-kM,7463 +torch/include/c10/util/Load.h,sha256=UojwOytDL4SaAR_KCqRyqPTKXzhlN5RJcwbINCnoqtc,1178 +torch/include/c10/util/Logging.h,sha256=OEyhjoez2US21O9_P0KSQpUgJ8OjCWcWa35NNgWxmSc,14354 +torch/include/c10/util/MathConstants.h,sha256=1mpiCU8wwQfIepeIQznB-39Y3vE5sYBCPloMGZCdx4E,3944 +torch/include/c10/util/MaybeOwned.h,sha256=fClAWJ30LKxRPQEYhunWbKIiZFLhOs8R1wpxULDGug4,7431 +torch/include/c10/util/Metaprogramming.h,sha256=8zzmy2y_5eEUR4lMAPsfBcTadQusC2506eA4Zf7JJ28,305 +torch/include/c10/util/NetworkFlow.h,sha256=EghGK6X4dvknoqYKFIOsPBPiS-Tj-z43CMhDObpOswU,1391 +torch/include/c10/util/Optional.h,sha256=GzsvJjlMuP8KRtSRH7FTMJF6fHZo7k497eXst1y7u2c,2249 +torch/include/c10/util/OptionalArrayRef.h,sha256=BWL-GFUet5QKN9Wi_jaRupiNAgWuxG4iMza-51f06Y4,7438 +torch/include/c10/util/ParallelGuard.h,sha256=uV2vMWwnlXgS7s082IZruJiv6OkLAYMMD3Ty39kIVwc,627 +torch/include/c10/util/Registry.h,sha256=HbWzeygfVQq4hX5gJ_NsPVHlf6wRqrUu20Wn3fZH8LQ,13514 +torch/include/c10/util/ScopeExit.h,sha256=t3YVD8cpprBt4WXFuHi1jHT9BJ8DhFSyGtQZ17CEF3U,1513 +torch/include/c10/util/Semaphore.h,sha256=aCep7xN9G1gWY3-rVvpiwzhcrXczlrPZI7FtNyezv3A,1672 +torch/include/c10/util/SmallBuffer.h,sha256=tIOQ9OvQaBuOI6xYm0FNHIx4BsGODO4GEQiUCPV9hDM,2016 +torch/include/c10/util/SmallVector.h,sha256=ukSUM6zYLUpNoI7NUHxozWgOoKjVnWrNZWxsTsrv3kU,49328 +torch/include/c10/util/StringUtil.h,sha256=c3FpQgWLOS_jk6RTMSn2sA8dlkfXMuIF8wmN0Q_8g3Q,7055 +torch/include/c10/util/Synchronized.h,sha256=2tW_9s7EXK40MUtpwv3-YJjA7FQwWllpaxOZLR0ar6o,2179 +torch/include/c10/util/ThreadLocal.h,sha256=wCti5HZb8cPA89t_y1OpPuw7DHj98QT9YfM9slvgxqI,4274 +torch/include/c10/util/ThreadLocalDebugInfo.h,sha256=X3IiE4KqBH1ftqZxGu2pYU47Ev7WzjTGuJlTFvfd-z0,2919 +torch/include/c10/util/Type.h,sha256=T1XX9iuFVOaeV2BNjLjgt5Hp1Aku0Q-Ecl_PolibcmU,900 +torch/include/c10/util/TypeCast.h,sha256=fSNsybFcY0MkrAxthVh-wdmrDYg3niv8glx9BYurJI4,6916 +torch/include/c10/util/TypeIndex.h,sha256=dbzYTSLXTBMex7BW93K3W5ABC6_2-o7vB-1XbjWIAAY,4947 +torch/include/c10/util/TypeList.h,sha256=zkNZb9AcFUJktCgDJSi0K2OKn1w8K_UvhVMPT5nhWx8,298 +torch/include/c10/util/TypeSafeSignMath.h,sha256=HvEviNWsHTA3-frX0xDhi-n0TGTNrgwC4GzSRy0dxHU,306 +torch/include/c10/util/TypeTraits.h,sha256=7EvZei8Q0T6N4WzrKKxXrKYtqLiBaU9GEh1l2BE37_Y,300 +torch/include/c10/util/Unicode.h,sha256=Ua4k-_JzTSImffi1DR5qlhijico5wN8hDI5pCl9sRB4,549 +torch/include/c10/util/UniqueVoidPtr.h,sha256=S5MaEA0td3mAog2tT9EaBqNhx_XneoasbaSEBRkTf0s,4835 +torch/include/c10/util/Unroll.h,sha256=UPOfiyO4HaMYDiu9w0X48H1cC1noEQmvQbfh6tnReRc,1097 +torch/include/c10/util/WaitCounter.h,sha256=I2C4pQZDpzr9G--2VwzfH0xMH6l77QH4og2F30FmYos,2874 +torch/include/c10/util/WaitCounterDynamicBackend.h,sha256=MsfBpIa5pRwQzILRp5Pg6AmlgPvnXXUOfdiz1RE_SYY,916 +torch/include/c10/util/accumulate.h,sha256=vqbcE_ZUjeZ4eC_9x0dAFDinmn-TWl0jp6ZEHNg3Crg,4286 +torch/include/c10/util/bit_cast.h,sha256=sxSghPDly-p8OH6gmTpfHz45ALOYU3Q_qSSForY8N3k,298 +torch/include/c10/util/bits.h,sha256=NvnFKQ-qXIxRN0UJsSzWvlkCWhAaVwJwOQ_saK6-00U,294 +torch/include/c10/util/complex.h,sha256=Fp2VuG8-5FJP0A-ppPtz8hC0OtPl0BibZPYr5I29nI8,2354 +torch/include/c10/util/complex_math.h,sha256=iUqbCt3VejwJnD0QGcZOrnzNb_uZ4a_Sli8M6hXZXCE,12787 +torch/include/c10/util/complex_utils.h,sha256=uh8DvEyYr1jMQ06vgnx3bS6YNB7zV4sMoyC8pIA7hkY,1331 +torch/include/c10/util/copysign.h,sha256=4fFRt3OSrkCMfGUGbbcqHpCkEs0pw8_uKGOsJGr11Z0,1086 +torch/include/c10/util/env.h,sha256=zuLIDHeM7sxVohvXwl6-aoNwcTbLXozkjUzO5Ugl1Y0,1148 +torch/include/c10/util/error.h,sha256=0PShMfIU8VkM8fME8HC_gAkBTfPsP9Op4eeS_k6VpX4,459 +torch/include/c10/util/flat_hash_map.h,sha256=RrZriUT2NETrS8tCQeh7mET1Nf4Z7-jZWK34UCU6wlI,62262 +torch/include/c10/util/floating_point_utils.h,sha256=l8yiPUHN9Za9CCKY9MUFvPUMmgP6mwfuetzTN5TobgY,310 +torch/include/c10/util/generic_math.h,sha256=YQona8Wgjfnc1BzEKVxs2ffRIRr3p1fWQ96rRQ-w148,3319 +torch/include/c10/util/hash.h,sha256=0FzKQcvZ7Cdn29QZRmbdGVSpcUUrG-gn8J5MLucmmPM,11360 +torch/include/c10/util/int128.h,sha256=lGDT-DCXohEx5riIIeri_91JleTaxyiy8SmZtWuQUz4,12577 +torch/include/c10/util/intrusive_ptr.h,sha256=lGJXxgGiea_guUwgI6PQ7PDr6WtHV3aMRJzDAbSfHaQ,46544 +torch/include/c10/util/irange.h,sha256=UzaE6wBFzo7QL4IjDnvnZ2zy1j8AITXz2wRpg91G_sc,3690 +torch/include/c10/util/llvmMathExtras.h,sha256=qKPCbOKabdjuq1_lTAeV49yAzvVHR8d8HA_m6wW2B2g,29717 +torch/include/c10/util/logging_common.h,sha256=Jwd5-L70_-opQL6fNG5Km69q2OjvCgTre4RMQ20omCA,1987 +torch/include/c10/util/logging_is_google_glog.h,sha256=cKXqIlN_PXqVbsBc-hFwCEl4mHIllJord_SRGeeVsW8,3163 +torch/include/c10/util/logging_is_not_google_glog.h,sha256=68A3dg5F6J-Eks2E3ymz-78S0p84ChJcV6CeSs71tdA,5742 +torch/include/c10/util/numa.h,sha256=ThNH5iMdklhU1kgFOdr9IlHryVIOKKdcwexg83E0mJE,967 +torch/include/c10/util/order_preserving_flat_hash_map.h,sha256=O0szYNijg27FvK7v2zLo0lQo7ltmD69U6VL69pCtQRo,65783 +torch/include/c10/util/overflows.h,sha256=oHbFZO3daQDjJgw1skcYrF7rFUhSkXw8MVskwWOPu9U,3721 +torch/include/c10/util/overloaded.h,sha256=FHGcSpssgR5hnXJJ-MIn9wI2Mqb8FVYgTVNNcDlQ7d0,981 +torch/include/c10/util/python_stub.h,sha256=JqFk4mKCyu0chr2QF5a1IqXXbi9HPecVk_VhA2TxtCA,310 +torch/include/c10/util/qint32.h,sha256=ZxbaslMWGDjHB8VlJu25dTRcWWwklUFkUh6T9b8HHsk,296 +torch/include/c10/util/qint8.h,sha256=8IYNTICfJYSwwplrhGH9VGvjyFW56zDXd59Mh_3l6S4,295 +torch/include/c10/util/quint2x4.h,sha256=zcnQCEqSMrTjovsd5FdRF_KMIumwqhT5zwsHMyRcVHI,298 +torch/include/c10/util/quint4x2.h,sha256=IlMXyvQf4QqSO601TKk69qCMcfiSV8EKGKKQixbqFrI,298 +torch/include/c10/util/quint8.h,sha256=aydMTZmqEB4N7-EM5mRUhTZYJIZpSMJkiH_khO5Qcgg,296 +torch/include/c10/util/safe_numerics.h,sha256=g8o-ABoIf_kpszh3kVm6xLtHiqlzzbfNT2Evx8mcLlg,3347 +torch/include/c10/util/signal_handler.h,sha256=yO-vqqSf39w1M-eewc3gHy2h-biMPPELJ3nhw-LKOtA,4021 +torch/include/c10/util/sparse_bitset.h,sha256=tLRVQ8J_dDTkoIw6lVU3ZbIdcBW9ZHltKf5l0XaONQc,26931 +torch/include/c10/util/ssize.h,sha256=3LVqLbLSSldl1SP7d45-5ov2KxHnluC7_z7Pf_qkFXA,1623 +torch/include/c10/util/static_tracepoint.h,sha256=rED_IEBTyD9MieY029u4UdzsFnLaXVpAA22wplohBbE,1330 +torch/include/c10/util/static_tracepoint_elfx86.h,sha256=uT3xse24frgvxeuyHh8K34U6YcynWti_y9lacxCOZFo,7927 +torch/include/c10/util/strides.h,sha256=ijl5aJ28SyH_L44u77n1FCOs_kwdm96oYnHFo4IjPC8,884 +torch/include/c10/util/string_utils.h,sha256=FZ-mqgraU_uZqPS1m6iaJ0xD00cuCQ50iycgYya2GBY,700 +torch/include/c10/util/string_view.h,sha256=CQhocLd5DudSxVaIG-5MmgTd1xc1sXxQShpyutXBi0k,18654 +torch/include/c10/util/strong_type.h,sha256=yMsd5airPEHIIuPBTOG0sKptUR8mylgsoJAG8RqPZfo,35821 +torch/include/c10/util/tempfile.h,sha256=QzgZNO5g3E4TW2g16iL6DwmhkdFOUDrSfMKRHCrYMK8,3014 +torch/include/c10/util/thread_name.h,sha256=5EZrohns_m4Tpb9e7lzI11nm6lGBd9wX5C4eA4l9ix4,440 +torch/include/c10/util/typeid.h,sha256=f4AlUA2mZoQUVarFlDgtCkHW3fg5fhcaBRQZdbwxj48,23584 +torch/include/c10/util/win32-headers.h,sha256=_EBVLD8V16450_L4ha7WnXQvO6a2zP_FXILRLogCLPE,1112 +torch/include/c10/xpu/XPUCachingAllocator.h,sha256=eouYGBytzry5lBJoz6RoTFt0rYX-sev5fqQj-P356qw,3186 +torch/include/c10/xpu/XPUDeviceProp.h,sha256=DfIPZOtUwaXiBbyt8wY74czrf6xzM0j4hIHBp37LC7g,13426 +torch/include/c10/xpu/XPUEvent.h,sha256=f9OVsmLdmvRoXT-NT4pIbcjBou5GWU2ToJEK9ROfBe0,5640 +torch/include/c10/xpu/XPUException.h,sha256=e22TzaFjkKq03u0VDCmQFGwM-6-p1mhqBiSa0wxo1tw,669 +torch/include/c10/xpu/XPUFunctions.h,sha256=d6UF_lw5NTPHSSngOGDVP4JOpKEWg5M5Qk94MXYts_Q,1523 +torch/include/c10/xpu/XPUGraphsC10Utils.h,sha256=jky2gKO_NFZWGy9peL_Krn37HAHUhXuc6seXUr2wYi4,1350 +torch/include/c10/xpu/XPUMacros.h,sha256=r6IGtxNCSJg1ccaOrhyZFS-NfTUmGbWhH39Ce9r6o7I,1124 +torch/include/c10/xpu/XPUStream.h,sha256=6J3FJiWXd17jVQTVS8PpLRAKn6WUIuc0F2mwKhsaiaM,6977 +torch/include/c10/xpu/impl/XPUGuardImpl.h,sha256=pPhS__Ub19ctv6rmCBFshba-yKJf0K3jR-aHtzk4_50,7292 +torch/include/c10/xpu/test/impl/XPUTest.h,sha256=U4e0J34PGyBX6Tao-X3X85TLgF3sVNpA1xq7oA5Mb6c,720 +torch/include/caffe2/core/common.h,sha256=s1y5zswxMN52p4NyHDZT9IFP4KqgahRgGA8tHVr2Gcw,1613 +torch/include/caffe2/core/macros.h,sha256=gSH3DIkJrk_QOVvV6_-RI7v-iwLvFp-i_yyu7BwiDtY,3063 +torch/include/caffe2/core/timer.h,sha256=C6gSn8UqhEI1yr7isd_-xGwmYgoIJKhaoIAvah0J12A,1472 +torch/include/caffe2/perfkernels/batch_box_cox_vec.h,sha256=zlFxE316P2oY9TmN0gCWlAy59HfVqONfYsHiUM-mc5c,9952 +torch/include/caffe2/perfkernels/common.h,sha256=V-FFQ9vAOsaaG4QE08h7Zeuxh6H4m_umwDc8j7FOUuo,6403 +torch/include/caffe2/perfkernels/embedding_lookup_idx.h,sha256=v6rEhVi3EdlyELZwq6W_FZSPS0cdv0emL-0Q-z4kbpU,1928 +torch/include/caffe2/serialize/crc_alt.h,sha256=9-npt1fZ3vAS3LwE9c-sxmOhpgYokW1WvDJ7q-k3iIE,75756 +torch/include/caffe2/serialize/file_adapter.h,sha256=Z09FdmWt1Yr_VsSeNKvYFrVvgx1SlqjRaScp2IEXXrA,1120 +torch/include/caffe2/serialize/in_memory_adapter.h,sha256=QXZ31tffGCe7LEOd_GWfnlPpneX4VtI-S3BZ-XlH3A0,895 +torch/include/caffe2/serialize/inline_container.h,sha256=0TQxZVANerR8aC1S30oeFdkaQWAKetFBjUwvGaaJEko,10785 +torch/include/caffe2/serialize/istream_adapter.h,sha256=-lqKALU9HZ-6_0uZi9ZkgBs_yn7MSMrZBuY5Se3R92k,923 +torch/include/caffe2/serialize/read_adapter_interface.h,sha256=ZX_zatzC443tFw5j43kJnvGl8NarYOCxnOMmMt8myfM,810 +torch/include/caffe2/serialize/versions.h,sha256=KXNkaNurcw_x_bijIon68juajfjkKoQShBIxYAuGBg8,6902 +torch/include/caffe2/utils/fixed_divisor.h,sha256=Zvgc9CidZoQfI7j9QkTqrQaanXf5iZcsvxCJfnJE2bA,3786 +torch/include/caffe2/utils/proto_wrap.h,sha256=1QVXbf-ihQ7qhv9aNvO46oyVXUIYnQrrEi2jc3N9SO8,1514 +torch/include/caffe2/utils/string_utils.h,sha256=OZypdSsHGVDnqhxYJsh_yQXaW0FBlpoEEzpTLlxZieo,1460 +torch/include/caffe2/utils/threadpool/ThreadPool.h,sha256=k8zVVNB-237ElHKofNIJsBPktFzgjp3DX05Dn7j6thg,2630 +torch/include/caffe2/utils/threadpool/ThreadPoolCommon.h,sha256=41zihSOOaucnvGexl1jRBNHowqQDxcwqRPd8mv3PHSg,931 +torch/include/caffe2/utils/threadpool/WorkersPool.h,sha256=Vl9nyM5Fu6CZctEvXOetuqyiAXCoRbl9fSFqiSN8azU,11981 +torch/include/caffe2/utils/threadpool/pthreadpool-cpp.h,sha256=wdhFwxXXDwaAJ-Msy1LkBZD0KA7SEfXZ7EegAf3MpAo,1718 +torch/include/caffe2/utils/threadpool/pthreadpool.h,sha256=J5PnQfqWRF3ETKYJS_vcS95UxeaGIwIA5rmx8T5_spQ,6598 +torch/include/caffe2/utils/threadpool/thread_pool_guard.h,sha256=Bv3NtbE_UJ1KT7Z3Wb0ylMy59G2LOZV09ZWhG4Fr_X4,821 +torch/include/clog.h,sha256=LmhU0B5GdvZxhbdibrfyD6I-wBeQU4ZSuN_mL5O3ZJ8,5154 +torch/include/cpuinfo.h,sha256=2Xqq7HM7ppg34uH7bVY14LTG0H0RJYvgz8dE2HfcYHg,57043 +torch/include/dnnl.h,sha256=-npiSEIICX2ZJy2baWpMX4uOZQpgXfh1A_IZdGSBp8A,1080 +torch/include/dnnl.hpp,sha256=YPZAJVUfe_dEFAyBWc7Zl1dIWZCKQAvnRezxMjIhkSE,1088 +torch/include/dnnl_config.h,sha256=0LRW_9dJNTWARLqhK-nlCgbnWGxWQBszbSoVyRXZcnY,1108 +torch/include/dnnl_debug.h,sha256=XLjSNgFUn83ayTuqCZHZmn_Yvq4mjwaU5A-czblJTc4,1104 +torch/include/dnnl_ocl.h,sha256=03__vBMCxQj81y5cqXR4lF3yoDlZ2Sd6UQ2GJIKCqHQ,1096 +torch/include/dnnl_ocl.hpp,sha256=Oe6xYIdgeoptQbGC9Z8fBKd-iZRLbVZkVpwPxXgnrC4,1104 +torch/include/dnnl_sycl.h,sha256=QuFHJ9y0PVBk7wE5Ad87DUY8w1ut_0284HA3Azr4OSI,1100 +torch/include/dnnl_sycl.hpp,sha256=qyZJxdsGray5-Qb5GlsreeRFni2Ryj4dwGozwFJBkFk,1108 +torch/include/dnnl_sycl_types.h,sha256=cQOxuhg809O4LuehF2b01m66cjXDd11IYcEub_-txJw,1124 +torch/include/dnnl_threadpool.h,sha256=N_AYimWiSinfGRfaJO7QO-wwUSp656InQMsxoupxsvg,1124 +torch/include/dnnl_threadpool.hpp,sha256=FTZXdpXDy7T-HHTtZ4-R8NFuhl8n_61HKmXHqJLZd8I,1132 +torch/include/dnnl_threadpool_iface.hpp,sha256=5H7Q_E09_nyCmWPAg6KAr2_Vs7VyGDbX4pI6Eq9op0M,1156 +torch/include/dnnl_types.h,sha256=342AMEBUhQUC605L8na27vlAj9dChtGiZ645-f4kbfY,1104 +torch/include/dnnl_version.h,sha256=9R16ZzMZoFGazgp5nucYaHprBXG7Qqm2J67EHYUDZ68,1112 +torch/include/experiments-config.h,sha256=NUBIJm4ElN5oM84C6qWGe44-I0j7rz5Ke5drDGFp0PI,766 +torch/include/fbgemm/ConvUtils.h,sha256=cvaDHju_twkawy_GwHTNWOojzNqVxr34lCcGYWijFEU,6430 +torch/include/fbgemm/Fbgemm.h,sha256=XNuwhJzEdEyRaRRw_atSDUrshEnEPs7Murx5SHXyl3o,44257 +torch/include/fbgemm/FbgemmBuild.h,sha256=8BY1QpKWGNZcIargdcXtUAAVWnSpmz76aVwljBT_qfs,3567 +torch/include/fbgemm/FbgemmConvert.h,sha256=Xr47oOcirsIyLd1F9JRmMV0mDmghMIfVtZtoexGaQ1Q,4842 +torch/include/fbgemm/FbgemmEmbedding.h,sha256=OI1oO4qX1g_I1_tD4HOLGW0fttZCh6oJz0eBoW7Q0SE,12435 +torch/include/fbgemm/FbgemmFP16.h,sha256=qKdkHPTdodaaUQJwNjqp1UhG_WiPqempHwatsmaibvM,1597 +torch/include/fbgemm/FbgemmFP32.h,sha256=QOLrz1KxYQOC4wZbNPvyA_wbEr-CC4ZorFDlW_2JO7U,1398 +torch/include/fbgemm/FbgemmFPCommon.h,sha256=LPEP74Uk4DY9SqzN0vXRFGQR4Hj5H2LRoX8xy1WGjdg,9892 +torch/include/fbgemm/FbgemmI64.h,sha256=oUACFs1tWPDyd3pUO3os_j7tzTH7avHVRRL0OiZFVQ0,835 +torch/include/fbgemm/FbgemmI8DepthwiseAvx2.h,sha256=QumE9n8azzsmzGyx4z754ZYKcRNE-5z8uEIGB40RHm8,3795 +torch/include/fbgemm/FbgemmI8DirectconvAvx2.h,sha256=4oKMoeKXFALz6NSZwZDfNUc3c8Y4S4aXHdcTu22NBU8,2059 +torch/include/fbgemm/FbgemmI8Spmdm.h,sha256=tSDTxQLYGA0p-6NYet_oyL3ybCXjmlKf-XjihebThzI,3691 +torch/include/fbgemm/FbgemmPackMatrixB.h,sha256=GkHBT42qVCRPlSEM6wAd8GQxmcu_wLbRbmyH9h0Cs5o,9485 +torch/include/fbgemm/FbgemmSparse.h,sha256=eFxR4UQOaDQUpKlvw7FQIvvmMYIHl7BqPJf0JM92TF8,6642 +torch/include/fbgemm/FloatConversion.h,sha256=d2lOVk1l9sw1Ja3PSIe4_Yve7I-xBjmMGtEuv8Pd9Ao,11644 +torch/include/fbgemm/OutputProcessing-inl.h,sha256=_Q2OPwlpusdlH2V4SZYNOAm6WcptEuVT5Du8dPuXw0c,10579 +torch/include/fbgemm/PackingTraits-inl.h,sha256=pCHjfXyFkEMc5jnCg0-mO4RY-yLmKQpaJ7cnZo5ai2k,20905 +torch/include/fbgemm/QuantUtils.h,sha256=Ey5B3N1Hg85xU80qR0mxSGrmVXjhb2JoakQiEz0rezo,12920 +torch/include/fbgemm/QuantUtilsAvx2.h,sha256=vMZtI59MCQDHxM2QSMwTI9rP-x8-pC9-Di7QPineG6E,5313 +torch/include/fbgemm/QuantUtilsAvx512.h,sha256=bae15lfRDn8teH7NRXbINDIcHxu84LaG_5Oy-ojy8Q0,1464 +torch/include/fbgemm/QuantUtilsNeon.h,sha256=Wo6kEORiB1q--4U9n6P1vloWu5a2lja01e7oXZdrEc4,1463 +torch/include/fbgemm/SimdUtils.h,sha256=tEsPQiR7vh5V1kPYWH4Az1KeDsI99Z-5uhTjfL7gGKk,3209 +torch/include/fbgemm/Types.h,sha256=LMt3p_xD1ig08FYvzzDw4aC6Ood_SnE4fC7HHRGe_W0,800 +torch/include/fbgemm/Utils.h,sha256=x4ZJ2EF5i_UD_ZLP_UkC_OmlDJYx4RGGQ2jur3TjQkM,14636 +torch/include/fbgemm/UtilsAvx2.h,sha256=JZdUxlO1AggRAecTpyn-eSmyolFvLg8V5RbaBk8NpfA,2536 +torch/include/fbgemm/spmmUtils.h,sha256=yYztyD1mvv1xwSUEg6yP0GdPwH2Li9ogYcniEzT2P8I,1584 +torch/include/fbgemm/spmmUtilsAvx2.h,sha256=xC5hZAJdIEJJWp9dj51GpL9OXEww7dToPQBQ3f0yCkw,1376 +torch/include/fmt/args.h,sha256=DceIEI6i6AajzaHQ3Z0Ye95nHSS9vBtBN3rqs4Bx7R4,7453 +torch/include/fmt/base.h,sha256=vkhZh12cbDVEJMMgUo1aV-cpqSX3Ob7OZDbtHEPGVbI,105285 +torch/include/fmt/chrono.h,sha256=8xDR25gWjdvLhEEcdZp8a2ERFC-ikBTGV3xHjemlXL8,77708 +torch/include/fmt/color.h,sha256=psoxTkLeJR7c8DGpSBFs28uD00KE6sJOcHyouf3Zazw,24399 +torch/include/fmt/compile.h,sha256=aFQtB8Uu6C_LUv_iwlL2tKK6iwpO2p0me4Ol3ZagJao,20747 +torch/include/fmt/core.h,sha256=Fon8wYxr5EmpFEP62k7O0QhukP0z9N8E9PGfx-Ygs0A,441 +torch/include/fmt/format-inl.h,sha256=2rX8BILADI7NRM4WMvBU4BOf7jjaigbGc1_8LJnyqQ4,81262 +torch/include/fmt/format.h,sha256=C4PH44EiUxGOi1qdqLnp0zmTSIcX6IpvJWLjjWslm60,162920 +torch/include/fmt/os.h,sha256=9EaHZUNGSZHEmhPALGAlMKDWrJik47HROopcRhjSYM8,13114 +torch/include/fmt/ostream.h,sha256=TwItPiJ9TDezk5XYfFDL7C78XJZG3Px7YP1L6iUBFws,5281 +torch/include/fmt/printf.h,sha256=_6aU3tIvrI_cL9lLpsi6IM3HguW2jvFUC6qJwD9Cxtg,20245 +torch/include/fmt/ranges.h,sha256=eWBKZ53Smvp8H0qigABJ0G_IWxWXEkQRtCoiTvMkYwU,28380 +torch/include/fmt/std.h,sha256=embCKeLfMWOCMXmcLRPgbRS-t0Vk_n95u7xP8RCumms,23786 +torch/include/fmt/xchar.h,sha256=C_ZqGoQboP4kYOlGeHJFgmeVPt7AZFxSlNukFoeYRuA,13352 +torch/include/fp16.h,sha256=qOihPuIFJc7Ka_UrtrCjHjXFWHKZO5sm4MyRgoa6hUw,395 +torch/include/fp16/bitcasts.h,sha256=j98oDlFXdzNmpyi2G416tRL7K3bl2_LORCQnytZ6_cg,2407 +torch/include/fp16/fp16.h,sha256=O-KcphLcDRvpwLmJsl-3FqxqRoTuOvBYIVb0yPBbNmA,22256 +torch/include/fp16/psimd.h,sha256=2L-pHlaH1_t1SUpq0LOvGqKA3zScoC0hHUYhpYwEgbE,7099 +torch/include/fxdiv.h,sha256=tGAjCriH6CaOaYaGoVsuSr56y4GhUyC2NeVsdM1jKY0,13403 +torch/include/google/protobuf/any.h,sha256=0dPp-c5gdDpkcdeW16ul0ghzoj55Y_FjpcNiakIRjgw,6435 +torch/include/google/protobuf/any.pb.h,sha256=GsRCe7XT5ZaYam99q4CZ64W6fwNlg8RSfkF-IMRXTFs,15701 +torch/include/google/protobuf/api.pb.h,sha256=jkh_2ilVJpEW1IV2Z__wR90HR0x8cpsqkm0Uf44H5gA,56339 +torch/include/google/protobuf/arena.h,sha256=YAWfTMRDce8p9y8Y-zAabhzm6pwIaQBO-1Mv3_sDzBA,31583 +torch/include/google/protobuf/arena_impl.h,sha256=uVPlkiM3WnRS82K202NcJu8bYjOWQ42EwFUmq--JYpc,14550 +torch/include/google/protobuf/arenastring.h,sha256=tSRZ7shhAlzdNov6M3M8MB87yZ9VH70VaXvcqmdr6e4,14928 +torch/include/google/protobuf/compiler/code_generator.h,sha256=qaAosNtJc2LBI8NCl8J0cTqaif7wxsUpH0mVwgVZu7M,8107 +torch/include/google/protobuf/compiler/command_line_interface.h,sha256=4naZiRCo7Y5J4OqlWqGV0vs7kF3iBPPFNtBZfjBwvVA,20683 +torch/include/google/protobuf/compiler/cpp/cpp_generator.h,sha256=TG1s2P00GCX41BGjOcTZrVb45gLPGgt8u1K0vKL9V2k,4423 +torch/include/google/protobuf/compiler/csharp/csharp_generator.h,sha256=nq5Zt8k35xucTKXhgbtdDHoutB2YFY1IwXttTGFG8Qo,3056 +torch/include/google/protobuf/compiler/csharp/csharp_names.h,sha256=RT5aj-1yP9vIrtl2QvMhQfIDqgrWF1zOPKsnMmUx34U,4344 +torch/include/google/protobuf/compiler/importer.h,sha256=kWvZOXcLDFBwZnRA-VZ5e1FuTay0NWScvep15X3PoKo,14510 +torch/include/google/protobuf/compiler/java/java_generator.h,sha256=0sXW6Fk4xms0LwKjyRbf_OZOWHsVn2b1iFsKa-6ymrc,3318 +torch/include/google/protobuf/compiler/java/java_names.h,sha256=tZ4jLwnuZXmzWJTbunySeDvkYmMvrVgjN2ZJ8afk8us,3863 +torch/include/google/protobuf/compiler/js/js_generator.h,sha256=L89VUsz3oDyS2hZwsVF-l_WuvC9mpP9BPu8oHoyq7kA,16184 +torch/include/google/protobuf/compiler/js/well_known_types_embed.h,sha256=1IxMQMMPuuOm1hvzFBqOTXxnyfsDtxBfBotANIDcytM,2235 +torch/include/google/protobuf/compiler/objectivec/objectivec_generator.h,sha256=KylF7yQqYLGOl9ADhNuyt8DihObjRYAOqTsaZHhXHsY,3684 +torch/include/google/protobuf/compiler/objectivec/objectivec_helpers.h,sha256=wdPku-cOuR8WJHfq3dObWSt5eo8-BJPBuJ_qvmz_ubI,12548 +torch/include/google/protobuf/compiler/parser.h,sha256=AQbPUunir1y6XGppEuo2ympOpd88WtJSFo9cxa2Lf3U,28082 +torch/include/google/protobuf/compiler/php/php_generator.h,sha256=hvrLGuXysJylvL5a1ybeTGmqe8yrOMNIsD7K6AJVCn4,3856 +torch/include/google/protobuf/compiler/plugin.h,sha256=Fx3d0V6Q6DWX73O5ZVHSyrYGpNEGfSCvIDIybU8L5Zc,4603 +torch/include/google/protobuf/compiler/plugin.pb.h,sha256=Zudgvn5OcDSzFEVGH1nEjQjdVgdglu7zWQNSfi_UT9E,76601 +torch/include/google/protobuf/compiler/python/python_generator.h,sha256=_U5Zp1QS4uzy5K-DVFNPnNfvT5eRqg0EyRIJ_QzU9Ik,7991 +torch/include/google/protobuf/compiler/ruby/ruby_generator.h,sha256=0UP8lyounKGjv80sXOLx2nZWahOFfVIC_V_N_j6L-lE,3065 +torch/include/google/protobuf/descriptor.h,sha256=RAri8I61VYIIII-yba_XCj6JQG7GhJg4YAACPRkyee4,96751 +torch/include/google/protobuf/descriptor.pb.h,sha256=oL3HKdtrcM4k5iZ8c25Gg2Ht958eVJFKehFEMh_qspg,544952 +torch/include/google/protobuf/descriptor_database.h,sha256=AVnf2Pr4m12xPGl6ZzEAo9wrnWOTfpagAJ4zU795oeU,19019 +torch/include/google/protobuf/duration.pb.h,sha256=ECpuPL3O8D-06fBKvaUJ3STehLa6pgvhSRZ4OLC93Gk,10118 +torch/include/google/protobuf/dynamic_message.h,sha256=VteLAaMQjcm50W-vtAQJTyeBCd5Xze5CJi0JOOK3_5c,10240 +torch/include/google/protobuf/empty.pb.h,sha256=5tH6B0bTnnMql14x6r4BuuA0KGMFruPtI2cFDvLrW8A,7936 +torch/include/google/protobuf/extension_set.h,sha256=KuzwGc2MIdtXO68vYYfwedyzxS9vPI6BKtLpDRbFePg,78715 +torch/include/google/protobuf/extension_set_inl.h,sha256=vz5yk-fiND-IEBGWMf_BUyGzm0rAenQs9b3U95AXzoM,12691 +torch/include/google/protobuf/field_mask.pb.h,sha256=z7R4EN3HrkqEeEfGG2IEx8D1VzE7gg5I1B2_roRNODw,12078 +torch/include/google/protobuf/generated_enum_reflection.h,sha256=KvsS7kvFUKGnNxnsdLBBz8vXfRJC0RKmZ2vNsM36Gto,4247 +torch/include/google/protobuf/generated_enum_util.h,sha256=xL71oDSoWHkPcxb9B_LpUcrBBp-L2JImAGmMx5of4jU,3520 +torch/include/google/protobuf/generated_message_reflection.h,sha256=Evd7-cfFQx0UcrTuY5lUn8z9YYBvXQ9Z6ap4FSy2aZ4,13304 +torch/include/google/protobuf/generated_message_table_driven.h,sha256=hgye7FnF8GbdakIL5QTe8rfbMJfxHNATGjcIxqFN1CE,12864 +torch/include/google/protobuf/generated_message_util.h,sha256=jOwFJtVYh5c9useoAhX7QCdtNU_nI0hgT4isChGIYDE,9814 +torch/include/google/protobuf/has_bits.h,sha256=_jfWmZA4ryHcsSmAj_oVupI_8lbGOdUZAViCC1SO4b0,3782 +torch/include/google/protobuf/implicit_weak_message.h,sha256=K3LJGeur8iQjoTvd9_OkAiXMoy3HOPa_FsifnSxDUV4,7268 +torch/include/google/protobuf/inlined_string_field.h,sha256=_Y82aIno5nXHVHan_Zfxv5LBi3Fjr4Mw0w7wNBZTqgA,9586 +torch/include/google/protobuf/io/coded_stream.h,sha256=yRlv1G2tnYKQlZ12wHV7vQH40ZLjhHdv47HNeX0a290,69630 +torch/include/google/protobuf/io/gzip_stream.h,sha256=XEuf1B6Qd36yU_KXU4AuqvKFUX-ZmOU6eDpDxPfxjnQ,6936 +torch/include/google/protobuf/io/io_win32.h,sha256=ZP9sMWh6qjVjJm7rHKoeQXe9EtNo5fV8oMVzpcYNgA8,5638 +torch/include/google/protobuf/io/printer.h,sha256=6iA1IkicL3xgYB8WqD_ZLMJdRW3Q9UeSCGsApxvpJD8,16188 +torch/include/google/protobuf/io/strtod.h,sha256=TMC_HjbTD3uF3yPXY0a2M7u8NTiGMkqnH9yivdn64zI,2685 +torch/include/google/protobuf/io/tokenizer.h,sha256=1LM7XRZTIaJT0DOdN_M7S8i8Z5RypwKCozyB7JUeyG4,17011 +torch/include/google/protobuf/io/zero_copy_stream.h,sha256=kXtIypNICxOUKskWsOBRGvGWtWtcA8cdJEK0m6l1AXo,10512 +torch/include/google/protobuf/io/zero_copy_stream_impl.h,sha256=870dNxc1hQiEjr2AnsTPh3mYuPicpL3Ladclt-SJNvc,13442 +torch/include/google/protobuf/io/zero_copy_stream_impl_lite.h,sha256=pBMdvBZWBf7N_ifCi_LwLp8M1zmEDxEMaP7EDsTEEhw,17080 +torch/include/google/protobuf/map.h,sha256=d9I0DFRC-hzJQkzOZggnXJHJ0EGyzUR8_K0FtN8dJkE,45008 +torch/include/google/protobuf/map_entry.h,sha256=vvakW-1Di-e6_0ocAPKjgZ_5nS5YGwoBT4YLFHtFHLw,7530 +torch/include/google/protobuf/map_entry_lite.h,sha256=eGCj09fpbKGrJjIiukcVppoAO61BlxcoHiR0jDLyQnw,26132 +torch/include/google/protobuf/map_field.h,sha256=64-EBI3YvqXlnLJWBZTJ7WQSC3oCHPajcGTNRg8w5vQ,31679 +torch/include/google/protobuf/map_field_inl.h,sha256=joOet3fsBgwAotoKd-cJ9xOtBPhBFTisWVHE1M18Qzw,14766 +torch/include/google/protobuf/map_field_lite.h,sha256=XEK2ZrXEjvr2Gu6XOkq4XCAMUhHIzUNLFbLIEyQC3js,7813 +torch/include/google/protobuf/map_type_handler.h,sha256=hEvUr7Bb4P8YwLsgRJDpCN0L5lN7DnP-R0sKTSmme_Q,39336 +torch/include/google/protobuf/message.h,sha256=Z3ZOKELypYovvHh-rLhgL18OQY3T25Kdw_h-w1O0dvk,62485 +torch/include/google/protobuf/message_lite.h,sha256=AmOCuTzCFrZHo_5uznps2U02UIfx4dDIRsMb0P1Dv7w,26829 +torch/include/google/protobuf/metadata.h,sha256=B1GOMsqbkFBMpUm9cpanG34OxSkvSHz_E3Ck3Nq-nzI,2111 +torch/include/google/protobuf/metadata_lite.h,sha256=19hC2BDX0bW2tonoEd0d6OPFEN67vg1tzVC2ZJWGgM0,8514 +torch/include/google/protobuf/parse_context.h,sha256=k2hWXKhvTQzKDwI4ua1ZIOCwl-zqZz2S3odj6ZPXAqQ,29872 +torch/include/google/protobuf/port.h,sha256=RrFOVJWOjwuOaw4v09Fg43H57DW_XuPPQaEz3k93ifg,2304 +torch/include/google/protobuf/reflection.h,sha256=xa3WhpUUH9dndC_0qhDHEUaBGHafu4YS9YvnGCwhXsg,22971 +torch/include/google/protobuf/reflection_ops.h,sha256=8oTYDxFdtNXleD7HfUNNRsnXNZL5a2WOR9P0DK7Niiw,4064 +torch/include/google/protobuf/repeated_field.h,sha256=8oArnbihy76j6Z-Fla4SaDSGa2cXGWnFYaiw0zqDdtU,101844 +torch/include/google/protobuf/service.h,sha256=V11g1Aoqv_0tXrvpzCR2pNqhPLjdgkT9VWNvoZ82bdU,13413 +torch/include/google/protobuf/source_context.pb.h,sha256=n1r_icP2vdZ7RLJ8cjbmCxqLtUktkj74uVW7w4gCyjo,11784 +torch/include/google/protobuf/struct.pb.h,sha256=93TCpPovyiLZ2bpAJ8uxo3m_PYqxQyt-4Cka0kY5WDU,42557 +torch/include/google/protobuf/stubs/bytestream.h,sha256=ZtkM0gsy_2tTMN7-hotQcno0mWqImlc4qMi1fwX3PvI,12013 +torch/include/google/protobuf/stubs/callback.h,sha256=-2p4AMh0EtM_vf1dZI4aGOd09rUboPUfNoqh2A-QimM,17332 +torch/include/google/protobuf/stubs/casts.h,sha256=2flqaAibKBHiIkaLYf0VFWTuMskasqM-oBsDqTWLEQE,5987 +torch/include/google/protobuf/stubs/common.h,sha256=aoNidzdf0hVq_chkNEf8TuXaOuLbKbsAKcNAM3mAC0I,7537 +torch/include/google/protobuf/stubs/fastmem.h,sha256=GQig40nwrh9V2ltTQd9vvdHL8CSmZsjn5rTOJQWfvjc,6270 +torch/include/google/protobuf/stubs/hash.h,sha256=K8Jcb3ILTX0IWNK0oLqtS9gUpMzdRvf3oubxGnohvdA,4370 +torch/include/google/protobuf/stubs/logging.h,sha256=i5ZmNdpZrT_vIdEfCNOtd_J2Z7Ne26MV6EZIn3Q01xg,9169 +torch/include/google/protobuf/stubs/macros.h,sha256=QlswL8EWRjchpmPHnYZqrKivq8gmZRFYnaUoJca4ZIU,5157 +torch/include/google/protobuf/stubs/map_util.h,sha256=gslw48Z_NWnwpOColoNscPOEvrgLptPUQoeqKy0F3sw,31467 +torch/include/google/protobuf/stubs/mutex.h,sha256=4YcLW6BWOp3fRLDMOLlthkAwx-b6CG_OTRNRxLFFzm8,6411 +torch/include/google/protobuf/stubs/once.h,sha256=6KqYQ_5GcQ9FkOxmRbnxIP-sYVlGkd-ezXbHwMeGblw,2438 +torch/include/google/protobuf/stubs/platform_macros.h,sha256=jiuqiOJWcz6h5SiO_KVUwD8vRc4nelGjOlLqOSpwedY,5362 +torch/include/google/protobuf/stubs/port.h,sha256=nwamF03zenHrs4rwC88GXIqPlolDElX5vI15IcoI4p0,12998 +torch/include/google/protobuf/stubs/status.h,sha256=qupsWixpuRou4j0gLfT5JDpjQqr3bRpxj5e4tFI7HVA,4193 +torch/include/google/protobuf/stubs/stl_util.h,sha256=F4echaMyDcVjjoFmVluU_IpD35Yojr0d9HPOTZemYFU,3537 +torch/include/google/protobuf/stubs/stringpiece.h,sha256=LjXiP2K_3TVuyozA9EmqA4dGLXSAWodS7TnMYhR-W_s,18115 +torch/include/google/protobuf/stubs/strutil.h,sha256=Q5vYd6nGNCcLTVxwn35hI0XCtla15cCYaSUW08Lb2NY,39031 +torch/include/google/protobuf/stubs/template_util.h,sha256=I7Y0JDCxRt7QO7qq6VNaUOzLSdLc7mtsHfFwyjEVapo,5088 +torch/include/google/protobuf/text_format.h,sha256=sqenjyUdm58rf8_VxrA0ZNHq2s-U3MKvIETnlhbOklc,29245 +torch/include/google/protobuf/timestamp.pb.h,sha256=S1WBiEq2wdpUHY8NSHe2Zhyb7sgUZimWCfLPooNZT1Y,10181 +torch/include/google/protobuf/type.pb.h,sha256=J4LB3ApubIvrfVaLbwADnWsNOjMeYQiiTg37Ccv8vm8,97032 +torch/include/google/protobuf/unknown_field_set.h,sha256=B5X9-mpp-R1Y_yFHPG0Sy3uboS0ayBR3kiBDKci740o,14655 +torch/include/google/protobuf/util/delimited_message_util.h,sha256=4PVusNBb7yHwZsR84eIWAGJX4d-MIyuoy2yoTelCTVo,5653 +torch/include/google/protobuf/util/field_comparator.h,sha256=FONFMgc61-YqbAxfXggp8HNi9d_HyLGqTE7TCR7tZJQ,10756 +torch/include/google/protobuf/util/field_mask_util.h,sha256=-2LptHzfONjGJNXTYpt0NbfdD3cWJNVgN28i4LjK0sw,11631 +torch/include/google/protobuf/util/json_util.h,sha256=YRebX5VcEXlgwHqUpdaLfCn_58T0S5s9eLNqLwumtNk,8683 +torch/include/google/protobuf/util/message_differencer.h,sha256=Pc3R2ge3ZBOv4F_uJYhfwnCxV0ap6d8zZcncoLEQyCQ,45532 +torch/include/google/protobuf/util/time_util.h,sha256=2IsuKeRmm3C2KxnXVsQAzL7dE-4jQc6m4YtlxyJoMEg,12407 +torch/include/google/protobuf/util/type_resolver.h,sha256=gAkiyaAabRAsWrdfNbsjPgBqtPCmU1kF2o-xBuhwTSQ,3107 +torch/include/google/protobuf/util/type_resolver_util.h,sha256=VhW-ZGlbIt09q4FQqfsi5rTEo-p2Z-7ONTXi36LWEXs,2661 +torch/include/google/protobuf/wire_format.h,sha256=O74GF_Rvp8EGjQVXb9AnLsmVzuiB1quEmosAXDJu6Vg,17914 +torch/include/google/protobuf/wire_format_lite.h,sha256=OTN09plkEw3as7E-GtnXk_R2BhwPRPJqnd7XYn93_Hg,83902 +torch/include/google/protobuf/wrappers.pb.h,sha256=T_vLyTiSqP1nlRChgoPDU0gXXOKXuZiUJHJ4p7XOKk0,59364 +torch/include/ittnotify-zca.h,sha256=B0LFdu1bVWrH3uE6bD37JkUy6GmUpapjNhT6vH1a8eA,4007 +torch/include/ittnotify.h,sha256=auq2tSKagVqgMOz2ct64xnPThaFH_V6v2ewTG9w_5hQ,197095 +torch/include/jitprofiling.h,sha256=KUCBurzd7j_1CDBWlBm6LGD5ccDunyQJw8SRfSX8wsQ,29872 +torch/include/kineto/AbstractConfig.h,sha256=rYMkJieFDVMbHwHUiyCyjR87yCOC0e6uoOFCR6spSJk,4033 +torch/include/kineto/ActivityProfilerInterface.h,sha256=r3R977hZ2xJhKFJyb0X2npHxa1zEIaidAKryDr9j2K4,3806 +torch/include/kineto/ActivityTraceInterface.h,sha256=NjOjNQriNj5Iu-pmpgOySBJ6GRVK1Tq2WmSBLXPO1GQ,838 +torch/include/kineto/ActivityType.h,sha256=LvkDpthgHhCWoSSdoghVw8Y-AG5hWC1SdR7QeuV_Oec,2600 +torch/include/kineto/ClientInterface.h,sha256=1ZO8ajqDb-k4RFW2let3VtWedM6Ml7VDS4nGxC6lJCo,911 +torch/include/kineto/Config.h,sha256=DVYcN8SBaLV79dPUNFA7U7gwRdQxPYUS-Q0rL7SOWJk,15955 +torch/include/kineto/GenericTraceActivity.h,sha256=Dz99dKPuQv-zwFP6rFYrDHvfZxLKgOAF2NGTP7fOYwY,4151 +torch/include/kineto/IActivityProfiler.h,sha256=GoIAlq-NEdhXXCOKoOdmY1DbUWh8JThyb0vdm540YJY,5364 +torch/include/kineto/ILoggerObserver.h,sha256=Pd9WLW7CUxfsAV5KdOJpcmwrKkBRco9Z0rJOtWejZ8c,2172 +torch/include/kineto/ITraceActivity.h,sha256=wB2ENeV1aekc7YeXXLu3fS75yogFEU69eyL81NyOPRM,2302 +torch/include/kineto/LoggingAPI.h,sha256=lguI_Ou7FauSHElTPiWO9L1813UTWuqTdV1hikv5IQE,600 +torch/include/kineto/ThreadUtil.h,sha256=pl7vMR9bCinR4wEs9j9dqjKYmqYNegZqcPIxxPWboHU,1179 +torch/include/kineto/TraceSpan.h,sha256=f3hRCWAJD3sFfrAT7rVEa242XXtLz4cmt5hBKUm09jw,1230 +torch/include/kineto/libkineto.h,sha256=fO2LwoVfNpflX67PZfVHwv8cbyq2m9C3vbycrN0BQrc,4140 +torch/include/kineto/output_base.h,sha256=yEThOo6_nuJC5y1bWwJNTygpsPBN3Qv8qG4q1rZWq_k,2418 +torch/include/kineto/time_since_epoch.h,sha256=ajdgeVJCND1QHhGj3GMjB8JrHqyyRzcTRmfRmfCjHek,770 +torch/include/legacy/ittnotify.h,sha256=WyHVB1ifIqOIvr7OvKeiXHoLi1FRGE_LuT5aGPf-2fM,37628 +torch/include/libittnotify.h,sha256=zA1MPO6UURWLg9TsFl2vb_Pivo3Sg6PsNZXcr31P91Q,823 +torch/include/libshm.h,sha256=NzZuufgNX2-Y5q_APKnvqt8Cj_f3Fbqts07hk9tME6c,1459 +torch/include/nnpack.h,sha256=Y9NhEeYb9-epCjY-a9X0e6xzyM55mXQAoJKR2LQ1Xts,33337 +torch/include/oneapi/dnnl/dnnl.h,sha256=ZsHp6aI-S0NHwEg4I1prmR-WIm7JZgHovj4d7NDcVKU,184100 +torch/include/oneapi/dnnl/dnnl.hpp,sha256=_ERA4DRo42U5C2BpaN5SbaLUblcm5T5F7Y0wav-eiLI,649554 +torch/include/oneapi/dnnl/dnnl_common.h,sha256=SSDiogzFeW_yr2DIFHT3xmz3fqsIDSwsbzO5RR24xng,5910 +torch/include/oneapi/dnnl/dnnl_common.hpp,sha256=IuUbgAIZKQzSQ5UtgKB0EGB8XV25u1kch01Qgdmk_Jg,15967 +torch/include/oneapi/dnnl/dnnl_common_types.h,sha256=d9k8STqIIA5GodMG6hoYzzPfF8H-rBHuaYBs7W1fDqQ,8456 +torch/include/oneapi/dnnl/dnnl_config.h,sha256=14ZPJ30PIUg0DzWEmulPxDofR5kKo0txAsZ_AviV-H4,6489 +torch/include/oneapi/dnnl/dnnl_debug.h,sha256=yyEgU_yvebZ7J9wufDKA2Hw1QLDkdhenlSiKhLBc-2U,2564 +torch/include/oneapi/dnnl/dnnl_graph.h,sha256=yHZoW35KzLHRdDr8jJyDe3Nxhvg79i2qbGxEg72uW0s,32980 +torch/include/oneapi/dnnl/dnnl_graph.hpp,sha256=0KcGt0NM9RkT9rXM8gdwK3TqnsXqQh8JFzpyCDcLZHI,65678 +torch/include/oneapi/dnnl/dnnl_graph_ocl.h,sha256=071AEKOkWPr-LNdLpU43OejDYn8Uh3eGeNh6abR_WQQ,6182 +torch/include/oneapi/dnnl/dnnl_graph_ocl.hpp,sha256=nrV3EvZOAqbgBU7V4bLWgKyGlBo4-hlTCuX9V2rKrHE,5687 +torch/include/oneapi/dnnl/dnnl_graph_sycl.h,sha256=mULm3wJ3yvBsz31J-AIOHaZ3Q7o9J7Kg8wiFf-3h1Xs,3907 +torch/include/oneapi/dnnl/dnnl_graph_sycl.hpp,sha256=59hAOWIJS4kHFGjGjtc7CjjFTd7iYi314BgbZs34AAk,4591 +torch/include/oneapi/dnnl/dnnl_graph_types.h,sha256=wkiBBIfZmDTQBDhD0wD0d0nhIPsZveBY1IOWBy5pYm8,17054 +torch/include/oneapi/dnnl/dnnl_ocl.h,sha256=RJDsU-QxcHTS6uqAmgwW5z-mhAu1MdsdQYzPWkfSUWs,12113 +torch/include/oneapi/dnnl/dnnl_ocl.hpp,sha256=99NQHNhWluOycqte3593uJJqh5vkOCQXoY0eDXzycaA,18033 +torch/include/oneapi/dnnl/dnnl_ocl_types.h,sha256=gzwyeH3ueR6be7RYPtbl4fDNDBnL4ZQiCPXJ0m2HN_Q,1592 +torch/include/oneapi/dnnl/dnnl_sycl.h,sha256=HXTEz3ReWohMp0Bmogw3pM3IVdOw6U4hQOxr0rTJnMY,8606 +torch/include/oneapi/dnnl/dnnl_sycl.hpp,sha256=VTAiA-k-yoRPbCCX2aaz4hy5OcINVDMQffpuM1nSwhs,15098 +torch/include/oneapi/dnnl/dnnl_sycl_types.h,sha256=-xH0kWI2nUGZfDaIrqpPZQIWLSRZwZJnB1t5pb1EtH0,1604 +torch/include/oneapi/dnnl/dnnl_threadpool.h,sha256=n6up-M0twiOw4SHBlGNsur9JrKLDK1fpImiWrffN__w,4778 +torch/include/oneapi/dnnl/dnnl_threadpool.hpp,sha256=iUdMOglTZPrPYJ_HCNqohc9uFGv5H84mcYiX01XhkC8,4581 +torch/include/oneapi/dnnl/dnnl_threadpool_iface.hpp,sha256=2G1k0EVB5w6vEaem6xKl7HPVJNNviGLqN9WiPRicPn0,2460 +torch/include/oneapi/dnnl/dnnl_types.h,sha256=TaxrsqfwVH9xTuWdfv35CBH3VfHzO9YCJhpWibv3qpw,98646 +torch/include/oneapi/dnnl/dnnl_ukernel.h,sha256=JQaRctXpTGnVOJ5vYTYh7_DADoGoK61zoOzpaKQv_sE,13770 +torch/include/oneapi/dnnl/dnnl_ukernel.hpp,sha256=DYvCjVy3h98RCgo6foEQsj6Hcc2l5A3nFv8RPiMjeqk,17578 +torch/include/oneapi/dnnl/dnnl_ukernel_types.h,sha256=yHoxkzpPlsnM0blT_4uI_yvbvbh6sh2QLuwNfGgRhj4,2871 +torch/include/oneapi/dnnl/dnnl_version.h,sha256=mRKK8kCHGTNL7iJzdCW1tPrXdOu6VQkG-TpvJZpVpug,1266 +torch/include/oneapi/dnnl/dnnl_version_hash.h,sha256=iU47tx7g_C_3ozM17l9Uk0WPPsE8klkTsQmCybr6l8Y,1500 +torch/include/psimd.h,sha256=Zz7YehRUM8gHMbAgELTyZqAx1Vo01wJFgN7-XCnaIWY,45758 +torch/include/pthreadpool.h,sha256=WCxI36to5mSi14ZZsoJ_pNnJsNF6ZJVPBZzzcxeCiio,99582 +torch/include/pybind11/attr.h,sha256=1ems9luMNWI0iQLODXwL6eUwqt2oVo3DIYyMiJf8DsI,26477 +torch/include/pybind11/buffer_info.h,sha256=Yvlrn5CAGjdaW7-I7Yjwnq2MvOfVOcAPbq0tWlmbFGQ,8032 +torch/include/pybind11/cast.h,sha256=-CAlLyvCjg5uHz8TmHJ5OUBieX6gUjkBsCQOmg_3xvU,93493 +torch/include/pybind11/chrono.h,sha256=uPfk6B6By7PVNisjsK9POSemaaK067KBFpj9tqpgbSA,8867 +torch/include/pybind11/common.h,sha256=gPyvFv4QoeZXIScQJFUQ4ZorDCNaj7rmauNmyXKryR4,374 +torch/include/pybind11/complex.h,sha256=Ed9RnnUAzCpNKbsohjlK9wiuVMJqTkt534gmpackgLo,2350 +torch/include/pybind11/conduit/pybind11_conduit_v1.h,sha256=S7fBLOEGYLtDKNH3P0RLK2yA5dsxkLfIzrZJAEH-sT0,4407 +torch/include/pybind11/conduit/pybind11_platform_abi_id.h,sha256=xVIPJrQU5t5Fdkuvym-5Uq7hG3h0UuY9HaI-T4UdcZ0,4245 +torch/include/pybind11/conduit/wrap_include_python_h.h,sha256=0i5dyYjj5r-d_b6_2RM2Al4-bw8pk8FWXSPKpRs53u8,2323 +torch/include/pybind11/critical_section.h,sha256=taXAwGTd6qdN0xQ2fFyx54rwtvcxKHtGohSmj0Horwg,1864 +torch/include/pybind11/detail/class.h,sha256=lWdbLzuLWT13FXg3mpGyk3fdCr7YZV_ElK3nvzN03Xw,31490 +torch/include/pybind11/detail/common.h,sha256=5un8HFrbh9Rwl46zrVuORl0PgNFUpItcKMKtVgXSOR0,60170 +torch/include/pybind11/detail/cpp_conduit.h,sha256=Ky4trNogphamYB3mPZRiUqdj-Kn7N-pj6JFHTD3HIwg,2807 +torch/include/pybind11/detail/descr.h,sha256=Tx_PmytruYwTbHD-P-nFabeVeN36QiiFtexnW_fSqD8,8315 +torch/include/pybind11/detail/dynamic_raw_ptr_cast_if_possible.h,sha256=ohZyWzmgYl6C-hVY-M95L2TlJ-o7FWVLhBUzTUJ6Nh0,1430 +torch/include/pybind11/detail/exception_translation.h,sha256=I0Kcq942M9fBqdDcHxC_xi5IGbz9MpyuYTBBXCDSZzw,2847 +torch/include/pybind11/detail/function_record_pyobject.h,sha256=gLKBGhjjZgJyb_Ko_I9UdA93cCYDovJnR8t_mR8naWk,7992 +torch/include/pybind11/detail/init.h,sha256=wAe1Tcq6zTe2fVTGNwD5dopnGggeH1ITf4lj0k4x82w,23327 +torch/include/pybind11/detail/internals.h,sha256=SX3GA-OVNL_hzYUugiiFybNRycomSkhU0pRhLmhxyB0,32455 +torch/include/pybind11/detail/native_enum_data.h,sha256=UbLzcm8Sr8qSIZDZBe23NDQaCG9mv8nOKm3ihpP3JRU,7887 +torch/include/pybind11/detail/pybind11_namespace_macros.h,sha256=HkDg8EaXiYYo40-GVgLB89tu59MfOSpndItiaKmNVxU,3755 +torch/include/pybind11/detail/struct_smart_holder.h,sha256=TyFmoD7GEJPJL7F0eKSsicZVsiVXVSZUMTwSX-s50_0,15326 +torch/include/pybind11/detail/type_caster_base.h,sha256=HMapjYM-G_s6xwWhVTasZIeRHf0ih80XVCDEO6R_8OA,66447 +torch/include/pybind11/detail/typeid.h,sha256=rNavm6ne8gSq8kf9ktNchKrp4LPzvoDkiSffOjKOHg4,1879 +torch/include/pybind11/detail/using_smart_holder.h,sha256=Sw21_eubAl4zLd5vSJeOQrvAM8Qh8axAziuRt0VDQJ4,794 +torch/include/pybind11/detail/value_and_holder.h,sha256=Jj8DQG_7b4GJWUR68lvnzyMSzVQmR6Yq4raU2MhaYLM,3931 +torch/include/pybind11/eigen.h,sha256=i-T90hORMeIsLSOlZKHIWJnZ1Zr_dsXPlk6HOsUcAsk,570 +torch/include/pybind11/eigen/common.h,sha256=RsVa00Nmbrnu-dUnXHM0RPwElcDIWdFr8GUHAeRXtKM,632 +torch/include/pybind11/eigen/matrix.h,sha256=3l6hl3j4Vf5GYiN5eSUet5Fdjn8kYjYAAb_AaTRI2Lk,32844 +torch/include/pybind11/eigen/tensor.h,sha256=hPyEjJ3wVl9ijofydLvW2KYtSGAY19TWpgrWo43wshc,18914 +torch/include/pybind11/embed.h,sha256=Jiig-eB4X29PHsAETSRW9QcMb_Uhl3dI5DeZ0dbTuD4,12890 +torch/include/pybind11/eval.h,sha256=mKpLWiEMihIwfszdLSZ0AR4Er4K-vrkqQvVts3D3T1Q,5116 +torch/include/pybind11/functional.h,sha256=HtoVWGymQtRk8pXMm1XkeX9iyhxeQwRt-cYWCOybtgw,5598 +torch/include/pybind11/gil.h,sha256=slDhtOmhPnygMDRcn4Ow4SEmbB3_AKOPVVWOLSzWBk8,6997 +torch/include/pybind11/gil_safe_call_once.h,sha256=INXGowIf5Pkrj3Dx2-3k8PTtNLpE1KGj0PeuWAwSEng,4308 +torch/include/pybind11/gil_simple.h,sha256=IaDqehOobdxm9vNti3nrgpYwmWyYhq_2hL5RAfMnU9o,1439 +torch/include/pybind11/iostream.h,sha256=8GiODvb8XDo8l8MbkV9doUMQXKcSJGHIY57HUMUfRMk,9116 +torch/include/pybind11/native_enum.h,sha256=_PeH6t6Nto5n_OzPseMoAdfOYSTcM0gCb3JQG1dzGlg,2731 +torch/include/pybind11/numpy.h,sha256=IE5oasvNX5E-IxRBIjeJ_mWOlu6vUosZX83qS65DBP0,91831 +torch/include/pybind11/operators.h,sha256=ngkisot1ufStnPaqrTa5dDdPVpa9iIfo0xI14HHKjkY,9357 +torch/include/pybind11/options.h,sha256=8ZETtW7ki2zoCP0H75SER_KC3bK8v6pyNmWCtXQAh30,2988 +torch/include/pybind11/pybind11.h,sha256=5Rco-aXAtEbWrr-BAfc9hsJFAA3sL1eCL59pfWRZ7-A,160933 +torch/include/pybind11/pytypes.h,sha256=hZtv1K0eSdK0wp7BSltdmLtI61xM0EfqbsXgNfqxmOo,102452 +torch/include/pybind11/stl.h,sha256=2ShB4sVCmoLQEXwQ4TtpdNlfVNjC8Oe3o_ueXqHwryg,24996 +torch/include/pybind11/stl/filesystem.h,sha256=JRytMDkseOyHEUr5_QmQ5Aq3h0KPuFYm05_MBAv9gYc,4327 +torch/include/pybind11/stl_bind.h,sha256=ueu4PBjrmNE8eeYCO_199Ao7UaxvaekIst4X-mTg3YI,29900 +torch/include/pybind11/subinterpreter.h,sha256=jjLvW8JasrqA0TEN4oVv-F3RdXaX3AV2khapPOMXw9M,11721 +torch/include/pybind11/trampoline_self_life_support.h,sha256=n9awxwSLjSCDn_iI0scbyFj-2dFmQ9VDH7oMQUZ_GoY,2927 +torch/include/pybind11/type_caster_pyobject_ptr.h,sha256=L2FBWjW4QZB8tvWspGtLJ5risRpwuYaTDd0lxacPqF4,2183 +torch/include/pybind11/typing.h,sha256=XbhaqcvlrIHdl95G0S9AeFhVP8jE9PK3UrX9oBevUUo,9145 +torch/include/pybind11/warnings.h,sha256=OCaRnwHWlndKlsTAPeMCeG9k27T19vS3hSq-_CdTQIU,2622 +torch/include/qnnpack_func.h,sha256=TtDF5mhpFcTbzvLUYlHV33KG2BkVZELMfdJa8dKN6eo,4400 +torch/include/sleef.h,sha256=KVX3Qp0EoFxVNKY08ap3UZUQyQxgO0y7Svop0B6aWSM,269540 +torch/include/tensorpipe/channel/basic/factory.h,sha256=ymil_LBc8GItwEFwHfBAuQNp46y_7T3Ll4qnvJ3kSvg,717 +torch/include/tensorpipe/channel/cma/factory.h,sha256=MwKFZJViyVujWnLo4RyfncH50bJSJx7J_gx7hoMxbnA,713 +torch/include/tensorpipe/channel/context.h,sha256=wNHghkQ66kK3UmlgjQVTjzLN1mFIVDQM_pqp6IwHmP0,3955 +torch/include/tensorpipe/channel/cuda_basic/factory.h,sha256=7bOoST16TKhE2dniZEw2pRLYtkU7PoIKETA_y55fPcs,762 +torch/include/tensorpipe/channel/cuda_gdr/error.h,sha256=fn1e-JAtlHlwMPoSzG8sdzqUufoef6R5traX3Kj47AU,893 +torch/include/tensorpipe/channel/cuda_gdr/factory.h,sha256=jk0MGTTp0yOnjlmo-OYIFB-AqSHRC3kWW_1IvWreRFo,846 +torch/include/tensorpipe/channel/cuda_ipc/factory.h,sha256=DaoYze9SwRtxeKBxUfNocEFetD8iC8I8O91zjHxNpWI,723 +torch/include/tensorpipe/channel/cuda_xth/factory.h,sha256=rU3qvRAN8IdjqKRpjKf-VNN5hp1hus4SwCYwPVTd7FM,723 +torch/include/tensorpipe/channel/error.h,sha256=HpiFTA5aFd7omH5ffWJ_QzRVfmzk4GyE3mEZA_KN3Ho,1032 +torch/include/tensorpipe/channel/mpt/factory.h,sha256=4NYX8S-rdFBR9GDWjgVwF0fuE2k1WhTs7-z8XKYJAiE,900 +torch/include/tensorpipe/channel/xth/factory.h,sha256=oq9LF99KTTer6ZkP2QW2u6a7x4aOBXO3fIR4iTbI0iE,713 +torch/include/tensorpipe/common/buffer.h,sha256=vZhzGJbP7wGrwFQQaY0dnYf_PG70tPEqOaX7D8kvf6Q,3726 +torch/include/tensorpipe/common/cpu_buffer.h,sha256=dWjm6FWlfNu-Gye6ARmHgWxWwOJYEAoHvgo2FwR1AII,695 +torch/include/tensorpipe/common/cuda_buffer.h,sha256=f2pUmSj2Zu6cvVh_f4kOt0S1xwrysdazM7xtvmWuBuc,722 +torch/include/tensorpipe/common/device.h,sha256=qyWkJ6NhKKGPqDSzXdDxzHyUkNlYX3OMM-wxTHlgACs,1903 +torch/include/tensorpipe/common/error.h,sha256=sUmM9D9IZBstFv8aV27ZLAxDQ2d194w39-auvOR3ZCc,3382 +torch/include/tensorpipe/common/optional.h,sha256=Cg8ztuIvxC8ckWyM1giXZhoIsYCFGIopRQ8wQd3f17k,382 +torch/include/tensorpipe/config.h,sha256=bAyHYIbpM0M0TMPiTcaFvcWnFCfDodz_rqGZNi_kZck,605 +torch/include/tensorpipe/config_cuda.h,sha256=2sXFPeoSb2bwgUfnhtcwL9QZJbyRxbbdUWwYLZVb9CA,573 +torch/include/tensorpipe/core/context.h,sha256=eUPwjLU3Voc-puVW8YZ03-utlUh1E2pmLrzpmgV8wZQ,2722 +torch/include/tensorpipe/core/error.h,sha256=czqGb_5R6zz5hcj1BrXZN3D04d8ANt49nbEjpsc5sow,1215 +torch/include/tensorpipe/core/listener.h,sha256=NoKRYhODFRTb2oifps5cxRdYoIe6l5pLqhS_m5xHMFQ,3182 +torch/include/tensorpipe/core/message.h,sha256=NylQKLbpf-IKhyNOzOQBUe2j4pVXjJ9Zl0CBruK8hp0,3139 +torch/include/tensorpipe/core/pipe.h,sha256=FzxISVeZVDxVxgLNyz8N4rcqg-En5JYJK3jMDAdDNOM,3226 +torch/include/tensorpipe/tensorpipe.h,sha256=5qmmXu8SyMq_sREiWZ5GljM-glz-pl4bJSeMaRQLh6U,1703 +torch/include/tensorpipe/tensorpipe_cuda.h,sha256=vHBuinUAmAWIB97PgDRZjclLIJ2-sjmoKkGXwG7iMSg,958 +torch/include/tensorpipe/transport/context.h,sha256=dD4NNcqRe1jvzHAVPYlL_koSf0oC6q3u-ZXIGyqHoQQ,2899 +torch/include/tensorpipe/transport/error.h,sha256=h86Nl4wdVPCBcB11mL630XYqSNzAnavmB2oOU3WwVMw,1173 +torch/include/tensorpipe/transport/ibv/error.h,sha256=iVqKZZU6-Mwxek1SaGohndVYPtL19Ei5fbv8X2b27oU,1174 +torch/include/tensorpipe/transport/ibv/factory.h,sha256=uAAKRzbF6MdDTikr3gCTKXJxGS5sfBjyHcZ4oOCrU9Y,719 +torch/include/tensorpipe/transport/ibv/utility.h,sha256=Yi-VEfXhUG39nK8PMXZT9_jEEO5o3JamDb55besOXw4,823 +torch/include/tensorpipe/transport/shm/factory.h,sha256=HcaaTa5gnGqT0Qz2LlsLttU9DYkLYD2XJ5IE2m_ftfQ,719 +torch/include/tensorpipe/transport/uv/error.h,sha256=QsPw4R0VuiMJPiU4bp2QIYw9A40Uyb-F3J5efL88yaY,970 +torch/include/tensorpipe/transport/uv/factory.h,sha256=D3i_rOQ2F31pDo6iivssNX9q2GlmPcxRQLx3kv-UYTM,717 +torch/include/tensorpipe/transport/uv/utility.h,sha256=5Z_QG64aU9n-yMSMKepKBlUI90htLwHBIcZhJrn92Mg,1303 +torch/include/torch/csrc/CudaIPCTypes.h,sha256=qsqVbMeUqs5FMT02n7hsDxpjxLnBrXnjbn6xgAEmTh4,3651 +torch/include/torch/csrc/DataLoader.h,sha256=0lLHCpmBQ9wnuXLOIH_Ok-t1EQHsX9-IgRPmrYTzfL8,476 +torch/include/torch/csrc/Device.h,sha256=WMNOcYpUnj5oDV05ABo2xLUG4AdmJ14WuB7wRy1rJao,739 +torch/include/torch/csrc/DeviceAccelerator.h,sha256=kK0O_HBZNVYKHKEB7zCW9c2IB03enTyLR_Q427Kp47Y,430 +torch/include/torch/csrc/Dtype.h,sha256=u_dUqcRhIC1kenlr-nnrrz0T0I0XhB_48aKqt7Z3shw,1090 +torch/include/torch/csrc/DynamicTypes.h,sha256=LFNtoH9z3wftoGGyS0lNCgmC4vEAFss3S8-mz3UONWY,1316 +torch/include/torch/csrc/Event.h,sha256=ZaiYri4BhtfCgKsXKUFrnj9s0-LxNd4IvdgDggmV6mc,840 +torch/include/torch/csrc/Exceptions.h,sha256=gMUswcsutDEEYRVj9kEWogd6EB-6HdVeIB57EGI6zpc,16257 +torch/include/torch/csrc/Export.h,sha256=cqQQF3wDc-5-WHNjcnuu6fEGxNBDZvqGV7xfx1C5fiM,411 +torch/include/torch/csrc/Generator.h,sha256=m2Bqihf3Sc0bWnI4unsiH51o8YmYhGuCtkzATUDVktg,1310 +torch/include/torch/csrc/Layout.h,sha256=NB5zkGBd7Grp7USYFjF1zYqkXJH6FNEMrwPuCRUdyc8,840 +torch/include/torch/csrc/MemoryFormat.h,sha256=leW7WY12ZeRCjgcbTGhRw1hHEyo5MjP0mzY0B-9Z75s,936 +torch/include/torch/csrc/Module.h,sha256=xPZ6iAnFOpb0kJKIkvSamoVaepAvN9nIp8qDnL1vfpw,355 +torch/include/torch/csrc/PyInterpreter.h,sha256=FwV8NJX2vHVvAgSH9pQKqq66z67jwZjciKcipXFbyjg,647 +torch/include/torch/csrc/PyInterpreterHooks.h,sha256=z8Ur8_WiaAWFDFbfT9zRh6w1FNrLxGwcD_9cTIuch8k,649 +torch/include/torch/csrc/QScheme.h,sha256=X-6XDVHnS9nPbqA3sbH4iulEe38QurprXBRIXF5puRQ,862 +torch/include/torch/csrc/Size.h,sha256=GG35TADU4Fb5LsxfMYG2S1li_9unhRLFcfMiQ41KiLY,730 +torch/include/torch/csrc/Storage.h,sha256=2_h8Ndwai_c3HhWZTeEoBEUVcj6vg63VOS6m-jy9JXY,1701 +torch/include/torch/csrc/StorageMethods.h,sha256=wdY_jcfOWT5HwMR2634Q7id1n4COsYf-hJiJxPUPr_Y,386 +torch/include/torch/csrc/StorageSharing.h,sha256=FDdRsnDvPPBWeBpuSztbEEC3UwZkprcmSIcK0BeC65I,393 +torch/include/torch/csrc/Stream.h,sha256=T_frqzmuEVKzU21HrUoJDUiDCaZNoF1vd5UeF77EmCA,963 +torch/include/torch/csrc/THConcat.h,sha256=t4GpgRJv-bY0ccAE0AgICWQNamhXi3g_EDkJOWVpA6I,945 +torch/include/torch/csrc/THP.h,sha256=5gweWqAcY2BZqsPj1bp0at5P-XYyEWN4MM5L2qRBolo,763 +torch/include/torch/csrc/TypeInfo.h,sha256=r7tPAL63xDEPFo8x6uvHtgODFHXjhXJDzRFAUulNFsU,819 +torch/include/torch/csrc/Types.h,sha256=sEsjWCg6HiCzV10np0kjdl6YWmjcpU0biDbJzBQGQ5c,417 +torch/include/torch/csrc/acc/Module.h,sha256=dFVIrVAvxN9Uk4QybsLW1QQZsincqYLEbXsi9fg8FD4,428 +torch/include/torch/csrc/api/include/torch/all.h,sha256=d_uD0PDavFCyhOyDnOdk5wLAVQE9NI7iSBXqTcfiprk,818 +torch/include/torch/csrc/api/include/torch/arg.h,sha256=BL9aGQ0jh03qjO-ktgWHFxTcukzzbsVZlat4G-lSl6s,1681 +torch/include/torch/csrc/api/include/torch/autograd.h,sha256=c2Z8tuuRXj_DwlwBBYHIjDjaHbDjGcA-L6QqrPNy9Yg,426 +torch/include/torch/csrc/api/include/torch/cuda.h,sha256=iEh4xDeeRRMgYfLIkDNu9Q8crqvLJ2CbNTRj6MsNd1s,987 +torch/include/torch/csrc/api/include/torch/data.h,sha256=LQstdyTLY96Iw3-alKqvTgzfeK7McbI5ae83zGoh41E,551 +torch/include/torch/csrc/api/include/torch/data/dataloader.h,sha256=LKWckxETIn2rdHCN_belMApFqkzs-dQfjvZNvUWrek4,2151 +torch/include/torch/csrc/api/include/torch/data/dataloader/base.h,sha256=jBcbswB5JpHaJJ6gn1opeXmZzLF4QUn4ySBcWEQ1XD0,9475 +torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h,sha256=EGKQPKMzA7uvIuT8jGGoSALVLggpHhZRXT0VuYEEVXU,2589 +torch/include/torch/csrc/api/include/torch/data/dataloader/stateless.h,sha256=HByZb45MUrHOb0q-aLcj9aPq5JnpPByCMtlu2An3-Sg,3000 +torch/include/torch/csrc/api/include/torch/data/dataloader_options.h,sha256=PbZabfCzPYj6WCCX1vUkybqdiYPdk4uBGwF-h7tPnns,2451 +torch/include/torch/csrc/api/include/torch/data/datasets.h,sha256=tir-STDUqaajiGy5-x_bwDoOc4PwlvmwadAITiB82a8,543 +torch/include/torch/csrc/api/include/torch/data/datasets/base.h,sha256=Cjw4p8Vo-rca61JdGvm9Gvum6eYjV9G65WJtIH6UrcU,3430 +torch/include/torch/csrc/api/include/torch/data/datasets/chunk.h,sha256=s8v5sRT9ZulWFXlp-WNfi9eXKnYO9Bzz2hovW-54Aw0,19430 +torch/include/torch/csrc/api/include/torch/data/datasets/map.h,sha256=DAwZ6ieQyoHNZrkHBaGEmTbYPt4XtDeS4XISGl6OMEM,4326 +torch/include/torch/csrc/api/include/torch/data/datasets/mnist.h,sha256=YRPvU01q1ywMPAQjrjBaNo6KUzSgW9uvuNPEpfDtQaE,1483 +torch/include/torch/csrc/api/include/torch/data/datasets/shared.h,sha256=dLHvC69hde_HijNDTWAJ9jYMTk_OAX9GelxNjr_goMc,2849 +torch/include/torch/csrc/api/include/torch/data/datasets/stateful.h,sha256=ltL0s1nqziimtGBnUpEJffAeInVa2KwWe0jxuTcvcMc,2488 +torch/include/torch/csrc/api/include/torch/data/datasets/tensor.h,sha256=5GaBd5nOL3lvJw5po94pIRkGZBv1OFC_Am8RX7gUXAA,1185 +torch/include/torch/csrc/api/include/torch/data/detail/data_shuttle.h,sha256=crrKlaIf0Y7nvvN1qiU7vNdthyS7wH5YTQEwE7IUE0w,2839 +torch/include/torch/csrc/api/include/torch/data/detail/queue.h,sha256=3PbwSIlInczgyEu4kzi1TNK9RPA2Ipc6QI8QT5PmDhg,2709 +torch/include/torch/csrc/api/include/torch/data/detail/sequencers.h,sha256=408hk6loMFpzN9QVZdbyGsv0mQ-m63m_86sUawhH77U,4694 +torch/include/torch/csrc/api/include/torch/data/example.h,sha256=s_XXP010mJyyotdSSY0lIUsWJgyqCALdfXgiPj9OJNA,1543 +torch/include/torch/csrc/api/include/torch/data/iterator.h,sha256=ztvL0ZIktgE9uNVqS32HjQ0yRwckT0h_A3KS3k1EZQI,5559 +torch/include/torch/csrc/api/include/torch/data/samplers.h,sha256=EJcqg_L6zv1LbFAlpkytbkGTZA6pGGIAbDc1y_jeDUQ,572 +torch/include/torch/csrc/api/include/torch/data/samplers/base.h,sha256=roqyYGAFtgoLNPaVbQo0FlQ-f7Hyeg1IYUJ1eCMV5Xg,1420 +torch/include/torch/csrc/api/include/torch/data/samplers/custom_batch_request.h,sha256=Go9M3TfetFP9DqO_VLJh3Q7IHWz67v7opPOTFLQMUrQ,760 +torch/include/torch/csrc/api/include/torch/data/samplers/distributed.h,sha256=sHAXPB3zmVGOCzk933AbajliCikcBvFa2ZVS49aKs1s,4314 +torch/include/torch/csrc/api/include/torch/data/samplers/random.h,sha256=PBl9BsQzkJ4iVIWCHxyWjz33mpP6PKAXNRpIFuL6Bjs,1716 +torch/include/torch/csrc/api/include/torch/data/samplers/sequential.h,sha256=NDKQhS8I9qqAZJj789_KnUBMkIZjOijEUe3uKJcGGR4,1448 +torch/include/torch/csrc/api/include/torch/data/samplers/serialize.h,sha256=nubpsLpxYasgAUxYhHQI3F0aXeVO71iyVftZAQKUMsk,911 +torch/include/torch/csrc/api/include/torch/data/samplers/stream.h,sha256=1KrRV4D5s25Zyk8TG_2hlGA6gjWFm2pESGO52UHw1jg,2227 +torch/include/torch/csrc/api/include/torch/data/transforms.h,sha256=-7PZ3J4Sl8IGwJkCtsa3gwyRIRwAakqh0XYCjLIRr30,476 +torch/include/torch/csrc/api/include/torch/data/transforms/base.h,sha256=zy50TQRf0TfljUSw97T-uBt3JOsqpTX29QOT_Tyydns,1833 +torch/include/torch/csrc/api/include/torch/data/transforms/collate.h,sha256=6ixnhJX-HgRWGYOxW7TlRt0jfTHEJ_f9k9M6SuoXVoM,1317 +torch/include/torch/csrc/api/include/torch/data/transforms/lambda.h,sha256=oRuX2N9-kb-ri0kl-nXUWFA2Z-ndJ03W7p34b78mpL0,1913 +torch/include/torch/csrc/api/include/torch/data/transforms/stack.h,sha256=e8RMeA2_J1Ee0CBnJVpvGC6oR1YUJzZJlhRb7lgvCUU,1628 +torch/include/torch/csrc/api/include/torch/data/transforms/tensor.h,sha256=uT8NLQGuIK7cAnu3hqZ1MwE9P5DZwKjlt6dayOzrMjU,2677 +torch/include/torch/csrc/api/include/torch/data/worker_exception.h,sha256=cReMfofGMxB08LBOyvVQj_u7E4IqMN9W6ZTPgw7jI2M,1373 +torch/include/torch/csrc/api/include/torch/detail/TensorDataContainer.h,sha256=Gf65fgWWtL0d8WZ-sRFJ8Bw95DTSgS6RR0m_Y_9ym7c,13206 +torch/include/torch/csrc/api/include/torch/detail/static.h,sha256=slXrhsYFnm2u6o3WMwIwn2olNGwC68waixn1TGf8Xlw,2347 +torch/include/torch/csrc/api/include/torch/enum.h,sha256=4dLXAs573lv-RY-KA9SoVS-fZjsMPTtpQjsIysif-ZM,7704 +torch/include/torch/csrc/api/include/torch/expanding_array.h,sha256=mJgJDI08qavPtouHQwo9ZzD_Al8oIFnDZdwkKYwXOBI,6927 +torch/include/torch/csrc/api/include/torch/fft.h,sha256=UhE-r-y8A3qsxDf8xSu1zXKXfOkXBMzM1Jy7mMDrzzE,12358 +torch/include/torch/csrc/api/include/torch/imethod.h,sha256=9jhzS5dOBFwnbq-1_a7C-coPinIrrkssmZfagWPpyHA,1994 +torch/include/torch/csrc/api/include/torch/jit.h,sha256=fVuU6JSqhzY-GsSoOZf4VHgKtnkHbGFo8KPeOd9kTEE,1142 +torch/include/torch/csrc/api/include/torch/mps.h,sha256=HrGBge68iJlcBjFVYOCQ0v6V-_kIpAiJ_pwwPAro_E0,1448 +torch/include/torch/csrc/api/include/torch/nativert/ModelRunnerHandle.h,sha256=pM8dpUHKtzlOjWp8Dhf-6GRCt_AFhfdbqDWSTJyy5DI,1580 +torch/include/torch/csrc/api/include/torch/nested.h,sha256=VjlIslutEY3O4RQUM652WoldCaH-nNMa_x0dUd5Hj0o,3027 +torch/include/torch/csrc/api/include/torch/nn.h,sha256=Y6_mVoiLIHyzr4RRQ5LYIA9MxJOmTPQn2tFbvrYXcZk,505 +torch/include/torch/csrc/api/include/torch/nn/cloneable.h,sha256=hYgWBoO_CdiI7TIkKvKQBc8uzgqpx7_o--jrV_cq-sU,4155 +torch/include/torch/csrc/api/include/torch/nn/functional.h,sha256=Yebih9a14mooUre0-lyB7AbuSM3zQI54o5hy8j5qXyA,896 +torch/include/torch/csrc/api/include/torch/nn/functional/activation.h,sha256=4gbJWkC0GoEsUENxZN9kRDOWs0xy7KSrCkGdss57FZE,30028 +torch/include/torch/csrc/api/include/torch/nn/functional/batchnorm.h,sha256=thPydHdHkAH9GiVKLJ6rBiCnjeyxNh1jKiGG5V5Ntc4,2269 +torch/include/torch/csrc/api/include/torch/nn/functional/conv.h,sha256=Tls9WI9J-iSMRhYGmTkzrPoQZwW7bvk-N7MxU1JfIbM,8373 +torch/include/torch/csrc/api/include/torch/nn/functional/distance.h,sha256=rEP1qHLYXatcmYEMAWWHsjVAumgwF1IGiRBk5c-NbrI,2753 +torch/include/torch/csrc/api/include/torch/nn/functional/dropout.h,sha256=3sJbPO0E8TaifvfoJyTZxTC0KDGi6xydUTVT2r4rSLo,6790 +torch/include/torch/csrc/api/include/torch/nn/functional/embedding.h,sha256=-n4IK-tZPGJmAmdxWyT-gqmzk0clttDfsm-HAhrIciU,6613 +torch/include/torch/csrc/api/include/torch/nn/functional/fold.h,sha256=lLbiMxGeCA1dJP3PIAUVOAfLQAzvM1f-Zw2x5Hp2gjs,2990 +torch/include/torch/csrc/api/include/torch/nn/functional/instancenorm.h,sha256=zIIIVJG2Bzo7FZyED4D0SWWIV6WovO7cbPEOryUohX8,1809 +torch/include/torch/csrc/api/include/torch/nn/functional/linear.h,sha256=ugg28fvjDzk2lgYne1UVM4csQdQLUAGda3ezZuHAkBo,1015 +torch/include/torch/csrc/api/include/torch/nn/functional/loss.h,sha256=Z5tmLVYSQt7Zp7IL_4crceVtUL88rIIBdaXnLhZDT10,32095 +torch/include/torch/csrc/api/include/torch/nn/functional/normalization.h,sha256=s5cxNP6BF1UiO40t8oBV1dIT_h3UiRH_zyjYKFH-cSs,6225 +torch/include/torch/csrc/api/include/torch/nn/functional/padding.h,sha256=5gYWsnKjj7ofCPHkjYPpJ-SynLBJud8EAjaDijQCNTg,1928 +torch/include/torch/csrc/api/include/torch/nn/functional/pixelshuffle.h,sha256=pjM2FRB74Vw2dZWre034KB4LsFPUP-BBoclCa9mYTOU,1547 +torch/include/torch/csrc/api/include/torch/nn/functional/pooling.h,sha256=v_5wJJYLo5db9KDb7SyS0wd7ikfzWwMkb5eVcoCrZqU,35664 +torch/include/torch/csrc/api/include/torch/nn/functional/upsampling.h,sha256=gbZ6HgiDysvMmz9IqOeZQwGT5LB23IYRfxqOVg5dLNU,10982 +torch/include/torch/csrc/api/include/torch/nn/functional/vision.h,sha256=HjnFEeYjeBGo7xEZupgryWYaeprbBRpUS0uDO7HI2cw,3833 +torch/include/torch/csrc/api/include/torch/nn/init.h,sha256=TQ4dS3iK_g_lZSA6H3QRjWHCU8LD3bAMdrV4mT1qv9M,5173 +torch/include/torch/csrc/api/include/torch/nn/module.h,sha256=QeTM-YNCF-l26PHQ_xAqCQLQF1gP-9NCs4vLRa9QKnY,27067 +torch/include/torch/csrc/api/include/torch/nn/modules.h,sha256=UZxQ4tAgNJ5MB824qRZUVwVBRscPY9h3fslYV3b0H8Q,1543 +torch/include/torch/csrc/api/include/torch/nn/modules/_functions.h,sha256=lfmzcEi-3tq_8YKuvNcrCtrPC3UKVtoOEy0G3AqlGoY,910 +torch/include/torch/csrc/api/include/torch/nn/modules/activation.h,sha256=03i8F0M9vuuxzcf3BqAzwpn-GEaEBMBdWCvDmDib0TY,30571 +torch/include/torch/csrc/api/include/torch/nn/modules/adaptive.h,sha256=gzmhHN6jsfv38PJUZMB5RnSkYpFufVcy1hH_dTq14IM,3771 +torch/include/torch/csrc/api/include/torch/nn/modules/batchnorm.h,sha256=v2fGhpWLroZu-HNmj0GqBEv3CBeabjj0KHKzI5BnXOo,8479 +torch/include/torch/csrc/api/include/torch/nn/modules/common.h,sha256=jVT0e01SXVxuvGpfauX-sjoeFZJImpZ-HvtEqhg0XzU,4602 +torch/include/torch/csrc/api/include/torch/nn/modules/container/any.h,sha256=F01wtQcvmgLe3S0o3iYNVpeIA4OcXAV8eytwvqA2KBA,13712 +torch/include/torch/csrc/api/include/torch/nn/modules/container/any_module_holder.h,sha256=S-IMNkIUdSLtUpRD9NSSD_JnjDuXgwO5QUNqAzzQSUo,5250 +torch/include/torch/csrc/api/include/torch/nn/modules/container/any_value.h,sha256=4WmDto4MkFYybDAfv95JVHZ3fURvguwuWV890TzyHTU,4392 +torch/include/torch/csrc/api/include/torch/nn/modules/container/functional.h,sha256=EGxMBeX0zHtKL6wWek3-3FGhVMlG6Z1Ku5ncqfZikwo,3597 +torch/include/torch/csrc/api/include/torch/nn/modules/container/moduledict.h,sha256=iBorAWRt_qNevxSW_1N74gS-5VCrz3lY8_mG1fRJH74,8676 +torch/include/torch/csrc/api/include/torch/nn/modules/container/modulelist.h,sha256=J4PxwHw4-05Ok-zWqJAyV6QBnGNjHmGQHQ6PvSuR3TI,9196 +torch/include/torch/csrc/api/include/torch/nn/modules/container/named_any.h,sha256=b3TYOyXtnx1PtDUfP03XZDnhdmj5F5xTcfq7n_9PhSc,2696 +torch/include/torch/csrc/api/include/torch/nn/modules/container/parameterdict.h,sha256=22O3j4R_oC6MJAmE9iWNffx9Pb6atCVK0-GD6yQDJv0,4711 +torch/include/torch/csrc/api/include/torch/nn/modules/container/parameterlist.h,sha256=OVlHpI4NxcpAL4JbpDazpF4wlzd0NU78q7z8kLDOEA8,5812 +torch/include/torch/csrc/api/include/torch/nn/modules/container/sequential.h,sha256=bb75yxy9DuRtuhb_U3aYDp1G-fYPoyaJRm3PeWMm2XU,13988 +torch/include/torch/csrc/api/include/torch/nn/modules/conv.h,sha256=EpGiG2mprFb7oocnUc7N-r1BERpm2tllnqZNCD1RRjA,16513 +torch/include/torch/csrc/api/include/torch/nn/modules/distance.h,sha256=nql9Y19QBsW032P6_RVhGmfq3NYtvKcLIqSjc-5IM8w,3310 +torch/include/torch/csrc/api/include/torch/nn/modules/dropout.h,sha256=Alr2vWdC2vQ_P3vAFwXqvGYoG9ENxpmCQhzoR8sN2Xo,6654 +torch/include/torch/csrc/api/include/torch/nn/modules/embedding.h,sha256=nuJtlx1iXIalox9jWBJViUIvofZ2JgbiAFve00alXMI,6309 +torch/include/torch/csrc/api/include/torch/nn/modules/fold.h,sha256=czUUxQhErjSun_9F0cQ3cbYjTJsWKzyT8eB_AluM1IE,3076 +torch/include/torch/csrc/api/include/torch/nn/modules/instancenorm.h,sha256=brdUwQ8jDoyuLbS5y8KxnM7NJyKnWs6mJ7IukdHLhtU,5768 +torch/include/torch/csrc/api/include/torch/nn/modules/linear.h,sha256=kgodTIxGeZOe7VUHCSMkzCNsAxWqgv8C6JXPyHAXSkE,7739 +torch/include/torch/csrc/api/include/torch/nn/modules/loss.h,sha256=QVsU0rm3VxGWPYcH3uS61ed_oJm6s6yKx_8vDOoZ90I,31230 +torch/include/torch/csrc/api/include/torch/nn/modules/normalization.h,sha256=GSvC2nI74qLTUt18BXboGZlfd-SyispJO09d3_6orLA,7185 +torch/include/torch/csrc/api/include/torch/nn/modules/padding.h,sha256=g3RTBTVaJz-8Byd0QaDp7GCXihIh1Sr7ZhjKjKo_90I,14600 +torch/include/torch/csrc/api/include/torch/nn/modules/pixelshuffle.h,sha256=BDmKhAvvlh3XMIBDJCcLwxKZJGcsGj8A0z6nk2ZE8Sw,3363 +torch/include/torch/csrc/api/include/torch/nn/modules/pooling.h,sha256=uikBjDJjHp3v9Ge5WWgF150NIEGEMtAgBgkZjIBxx-s,29894 +torch/include/torch/csrc/api/include/torch/nn/modules/rnn.h,sha256=BF92Lb2iX0HigEyM0mYpms2Yylp4zteTqnvPoLn48K8,13702 +torch/include/torch/csrc/api/include/torch/nn/modules/transformer.h,sha256=VfumjzK-K-ynNtgVZ3kNR81AX17LnQw--a69DTBZoS8,5576 +torch/include/torch/csrc/api/include/torch/nn/modules/transformercoder.h,sha256=DMi4gf-7bhJMIN2Mmo-hcxT0P3Vs55tQJwTnhAFF6nI,5457 +torch/include/torch/csrc/api/include/torch/nn/modules/transformerlayer.h,sha256=wOu5mDfVXfrC6OWeud6vlp_ERqmsCf2hGmOfxIIeLZ8,6661 +torch/include/torch/csrc/api/include/torch/nn/modules/upsampling.h,sha256=4-8Y2-yx6CYi6FMar3jY3OBgJy3scUubRVieChU0-K8,1873 +torch/include/torch/csrc/api/include/torch/nn/modules/utils.h,sha256=EFeKPqk8CAjyY5KvvaWiDFArSVy_MWuHJ4ryA-QbXMM,1654 +torch/include/torch/csrc/api/include/torch/nn/options.h,sha256=sxG7alldUUJoWyfJrvSTi-0B72_NQXn1Mop-JfTHceo,899 +torch/include/torch/csrc/api/include/torch/nn/options/activation.h,sha256=uhyNnM7WIuoju5zQxwdcz33Ci_kMAfKH98poA5aNa1w,19238 +torch/include/torch/csrc/api/include/torch/nn/options/adaptive.h,sha256=sjOvq3GgknXt1PkX9MFkU7qjOSyGjtQYzuRc6JovEJM,1311 +torch/include/torch/csrc/api/include/torch/nn/options/batchnorm.h,sha256=tSndtNVHDgkdoHeiVnzO8wO6sbb9axlSOgQEEN56AoE,2991 +torch/include/torch/csrc/api/include/torch/nn/options/conv.h,sha256=lQXIbZwhpTt95rCaE0VmHDO7pi0fU8pSlGNUDOFdpdI,13648 +torch/include/torch/csrc/api/include/torch/nn/options/distance.h,sha256=IFWwIffyDJ1Lry00dfccYOt_TOGpK_q4X-Mjbxi6JJA,2243 +torch/include/torch/csrc/api/include/torch/nn/options/dropout.h,sha256=6bJy2Iqz0OXfGSDUX23n2dj2CHTwQ0qfCZQm6nlhx70,3299 +torch/include/torch/csrc/api/include/torch/nn/options/embedding.h,sha256=JUsnVNC9P-Sg9rlUOc-6oKb--hPgKsXrklmfOjBbBGo,11852 +torch/include/torch/csrc/api/include/torch/nn/options/fold.h,sha256=USrVVGHqN90-CLvmnQveb-S2MigbiCwZPfCXSNqW34Q,3167 +torch/include/torch/csrc/api/include/torch/nn/options/instancenorm.h,sha256=tN7AKMLz_tX7u0mvLA2C0JTeATVDiq52g_IwsuXy-pY,2506 +torch/include/torch/csrc/api/include/torch/nn/options/linear.h,sha256=zQ0gjydeaArty4-8PqXP__vE-Sf_JSLS3NtS2QEXJk8,3033 +torch/include/torch/csrc/api/include/torch/nn/options/loss.h,sha256=Mtu5B5AaslcrDi6xa7tn50BCtxaxYAjK-epFgIbU8X4,26909 +torch/include/torch/csrc/api/include/torch/nn/options/normalization.h,sha256=LLi4Snl31dy_KfV4m33KbW5Z2Fe5wjyT3pYZRVi34Uc,5731 +torch/include/torch/csrc/api/include/torch/nn/options/padding.h,sha256=tbU2Tvhs-LnyxWJqtOyyb7TGDHycaGcc-l0zIXWWgQo,7089 +torch/include/torch/csrc/api/include/torch/nn/options/pixelshuffle.h,sha256=m5j2SlTRE7BJijFx1RmSloo70YWbPDTlJVm7L3YPSEo,1886 +torch/include/torch/csrc/api/include/torch/nn/options/pooling.h,sha256=rK_4UzIrHnL1BvJ0oX3P5CP3nSJ5HaYg7BasPFd7cEI,17961 +torch/include/torch/csrc/api/include/torch/nn/options/rnn.h,sha256=5qTRgvl4Cq3gTOcQex8Jc_JSPYCmVBewOmxadwkbGyc,8449 +torch/include/torch/csrc/api/include/torch/nn/options/transformer.h,sha256=bvMimjBCIRN0vmA66AZHdKNBNx8Ib0kIen4SODfFhV0,2068 +torch/include/torch/csrc/api/include/torch/nn/options/transformercoder.h,sha256=KyMKPP5LOnqggsVAEh6yKd6vT-i-hpX3gwHhbOVsIgc,2573 +torch/include/torch/csrc/api/include/torch/nn/options/transformerlayer.h,sha256=vbt-2FO0LdboCf6g0zvQdYi8RHHcefezgSGKeJp0V6w,2313 +torch/include/torch/csrc/api/include/torch/nn/options/upsampling.h,sha256=-rGCWi7NB8ZDo4gC8AyluCZboU0CCCSEs4rhvoG2xoo,4379 +torch/include/torch/csrc/api/include/torch/nn/options/vision.h,sha256=8T2d6HnqLAMZWVrjeHdPrG8hwm8-QG_rJO4araZCx7s,1340 +torch/include/torch/csrc/api/include/torch/nn/parallel/data_parallel.h,sha256=cgf5YDCNfv8pmMAtOIym3De_kc1B1IUz23wW9SpdpUo,11452 +torch/include/torch/csrc/api/include/torch/nn/pimpl-inl.h,sha256=_7gjiWDY99dqBzC7khwLF-7g1OKmsunrtTuTMDLhhro,3478 +torch/include/torch/csrc/api/include/torch/nn/pimpl.h,sha256=wzvuQ_6KJXp5O49oIIGNZMsMcnxQyhqj8JHTLOWGjc4,6869 +torch/include/torch/csrc/api/include/torch/nn/utils.h,sha256=eZzeszpy667cwp6FJ523gX_puBwH-2OMvLeqGQPuFEI,385 +torch/include/torch/csrc/api/include/torch/nn/utils/clip_grad.h,sha256=fOyCc1u-hCi6OekXaJ6ZMqGgpcX-6lNE5Y-j1ZsuLs8,5092 +torch/include/torch/csrc/api/include/torch/nn/utils/convert_parameters.h,sha256=cYaGluG4Ra0DFAqtbjo1bqD4INGuQA7G8OHo2IFuoUg,2630 +torch/include/torch/csrc/api/include/torch/nn/utils/rnn.h,sha256=1fO253Y8XJjMdccTDcKD8jLSCbqHFr0nMnL-hIRK3Aw,13047 +torch/include/torch/csrc/api/include/torch/optim.h,sha256=dKbqqbG93ik70Mqw60l65oGLZl9N-rWQVhI_TQ07K38,648 +torch/include/torch/csrc/api/include/torch/optim/adagrad.h,sha256=nAVNhd73uYBYL2ZeTCLU3vjEbfJgut34RBhdP-g_yWk,3451 +torch/include/torch/csrc/api/include/torch/optim/adam.h,sha256=PJvoyY_mO-OsMuS2gPjKrZnwakTVLmBTEXR3sfvq2e0,3129 +torch/include/torch/csrc/api/include/torch/optim/adamw.h,sha256=KkrUzV21r36SWjpZhgB5t4v5f_PuUO9LhSFoPvpOfd0,3149 +torch/include/torch/csrc/api/include/torch/optim/lbfgs.h,sha256=sTD9wwF_XrGtm-2aUr4yyfq7k92Nc-J_lLwge0vbJaM,3684 +torch/include/torch/csrc/api/include/torch/optim/optimizer.h,sha256=qs-B1iT1jE_UmKKdqlDjAeK2IX9r7l2-8wXMq_irEl4,8380 +torch/include/torch/csrc/api/include/torch/optim/rmsprop.h,sha256=srRMwObMUT9gcndgw8Zr0JBtkb-8Wjz-iX5SRTXh_8g,3142 +torch/include/torch/csrc/api/include/torch/optim/schedulers/lr_scheduler.h,sha256=-7Z-GPuYZWCf8TjI5J87q0jR9xi3Opa5Xbayvy3MEE0,1373 +torch/include/torch/csrc/api/include/torch/optim/schedulers/reduce_on_plateau_scheduler.h,sha256=-rWp5O4vbLWCWhv8Ng5-Pi6AowyEYnKRBrmpDaYqtE0,1634 +torch/include/torch/csrc/api/include/torch/optim/schedulers/step_lr.h,sha256=AR6ANTwsCyEVEnfg4_uNiBKM_zgNPEXNlCHpsJcSIWM,653 +torch/include/torch/csrc/api/include/torch/optim/serialize.h,sha256=n4P_G-sQqX3RKGRz0tDGoI0IQLqK6T-j9u-Co--1GjY,12927 +torch/include/torch/csrc/api/include/torch/optim/sgd.h,sha256=mbnkMFtvgOYUWSS25noZtCL1U0-7_UBE7t-mxrnYAjU,2876 +torch/include/torch/csrc/api/include/torch/ordered_dict.h,sha256=qbkJy2mDZxqt5rkMLhaVYE-6Mlo5wEidHY8LcgQoJX8,16522 +torch/include/torch/csrc/api/include/torch/python.h,sha256=xNAoE1udfG8OcxH-Ob5ZXcm95WfpEuYaQIywN-mTzbI,10174 +torch/include/torch/csrc/api/include/torch/python/init.h,sha256=DI9siWXORGUKh2T9AousnlS3ss2XOLsXmC2ci2fzdm4,458 +torch/include/torch/csrc/api/include/torch/serialize.h,sha256=cJYBTLdpqP6ZhbZD6XPBwPjNG27lofBkgk_AzjonEZE,5498 +torch/include/torch/csrc/api/include/torch/serialize/archive.h,sha256=bgmYgV3iccrvTK1uih12iixI6ZmuXNlwN2yOiA5JgpE,355 +torch/include/torch/csrc/api/include/torch/serialize/input-archive.h,sha256=94hT0mn8WsZMPf6jDzY0GECw3vOeK_oZTWIiVGDWLys,4209 +torch/include/torch/csrc/api/include/torch/serialize/output-archive.h,sha256=JV4yJh7pHvUejgJT3Ks0ByQv8yy8oBnyM1Krc123AoI,2543 +torch/include/torch/csrc/api/include/torch/serialize/tensor.h,sha256=0zHxiYy2sLUsm0I33QgdUI9wOVukkU_toXnQ4TiAk50,686 +torch/include/torch/csrc/api/include/torch/sparse.h,sha256=Gtx29zexv7Kz-O1GmCSsESZHS9Abtd1INKsc21GmqNM,291 +torch/include/torch/csrc/api/include/torch/special.h,sha256=oH3xzdNxoyHZnP1xjxyG-XISWpdfBrO1-VhzrSHHz_8,38539 +torch/include/torch/csrc/api/include/torch/torch.h,sha256=Pl63ncpcYFuxfHZlmVPbj5_dJ4E6pnRAY8G9QbBd-rw,408 +torch/include/torch/csrc/api/include/torch/types.h,sha256=N00lXLA_-FDh8z1MOBB_ygEfKoxieN3KEOQwy-ACX_4,2642 +torch/include/torch/csrc/api/include/torch/utils.h,sha256=GB1CqG8ZKtQmwCv3I7fOMvdlmngE3RG1FG9XNDRNiIo,3839 +torch/include/torch/csrc/api/include/torch/version.h,sha256=e6jwvr0_ZyDbVQT9pfn4HX7RLbLsPjcFFDnijTct2Fs,292 +torch/include/torch/csrc/api/include/torch/xpu.h,sha256=AMYSk9Y1uA92ZQ16t9uXRxEPjtPo5ScFS3KhaWnVKxM,856 +torch/include/torch/csrc/autograd/FunctionsManual.h,sha256=IaNVzA5pfP7L3kLolxGUQcvJE00S8bDcQVMKcAY2n4k,34019 +torch/include/torch/csrc/autograd/InferenceMode.h,sha256=IIsNk73vBgJGreu_P72DNwmvvUzynAuFphP3tEAf-eg,410 +torch/include/torch/csrc/autograd/VariableTypeUtils.h,sha256=N4a7JuuQ3O5pg4dAXvqy6O2c9NI9156cOxoE91Y3nKo,14821 +torch/include/torch/csrc/autograd/anomaly_mode.h,sha256=WUXJ0uJlIF2bueS1UEZUyWkj0GUegPoYcj1aiIn5ah0,1979 +torch/include/torch/csrc/autograd/autograd.h,sha256=FFXo-LL0wK9pD3yC5foBkVHE_w7yK1HulOGpzj91ES4,5563 +torch/include/torch/csrc/autograd/autograd_not_implemented_fallback.h,sha256=tCJe7yOLcR7RL_3UxToohetXaL4IV4-AhirhV0-ICFc,1396 +torch/include/torch/csrc/autograd/cpp_hook.h,sha256=EU4UlP4ia7rBL1MFvTwoQvow-FsZU1q87npXD99hLBc,1213 +torch/include/torch/csrc/autograd/custom_function.h,sha256=-ZSPfYRlRrpjl1FfFsCtlblAp-XLeH1ns_fEZtkOmW0,21502 +torch/include/torch/csrc/autograd/edge.h,sha256=3ExDHbB7rd61-6oJ4xVs3WCAMqBwfFYvMdtfgTHVapo,1869 +torch/include/torch/csrc/autograd/engine.h,sha256=4aKIpTxt2ZYd-qxpucCMSe1s-x-6i79Z14zYSOlWrww,11059 +torch/include/torch/csrc/autograd/forward_grad.h,sha256=EvkQ6z7r0OJOFsZOFj3Fj8HOHCVJJxZCzXjpVVlDOqg,9191 +torch/include/torch/csrc/autograd/function.h,sha256=Li4oaACOgNBgRpOJTWhlxBC1xrgWkO1PuFku1_kMuEc,30970 +torch/include/torch/csrc/autograd/function_hook.h,sha256=_mhR01mCC8NZPe4VcGVDCWBrluemLCvKjxyLZ_lhwEU,2506 +torch/include/torch/csrc/autograd/functions/accumulate_grad.h,sha256=1FZmJFc4b4CYTcbBgr-gygTNu66ej74TQLqWI0ann0Q,15229 +torch/include/torch/csrc/autograd/functions/basic_ops.h,sha256=wz9skTUtaMj9mQJfov3QB7r3GmAsxeDvc2X2iX3HJOg,3650 +torch/include/torch/csrc/autograd/functions/comm.h,sha256=FNF3iPcVZJLNbnnL6O5iK39EULAsbdjPuPYQ6J9zNGQ,1451 +torch/include/torch/csrc/autograd/functions/pybind.h,sha256=eMdYn3nYpRUpn2gG6xMtyCUKr37Tdcd8yPNF-mdo6eU,634 +torch/include/torch/csrc/autograd/functions/tensor.h,sha256=C91kezIt12_arV9fzIP7xqgDjJ40bki3_gva7m_m0xE,7523 +torch/include/torch/csrc/autograd/functions/utils.h,sha256=dVZArpaTbZE27304zREYGBfLyzZ3IY8U-CT2ojRU8vo,3484 +torch/include/torch/csrc/autograd/generated/Functions.h,sha256=qTwCldpEHUfGW20t-4Jz8_uM4vPeSyEvnnOPLeEZXAQ,516528 +torch/include/torch/csrc/autograd/generated/VariableType.h,sha256=xu17YMWup0QnMT6IdfIN5ro4ft9ekdDJGMm9cNyQzFk,1759 +torch/include/torch/csrc/autograd/generated/ViewFuncs.h,sha256=yPvzfQIRFWg-9GPcG1JBBIIW6pZ150ihOgyrQdf9ofY,37577 +torch/include/torch/csrc/autograd/generated/python_functions.h,sha256=cqFoR0VPydNMFLNZE1gQLyNgKqVlPl-TXqk8dEdo3Dw,1145 +torch/include/torch/csrc/autograd/generated/python_return_types.h,sha256=CvTXlC3oUkpxoNUGArs7fYZGAoJpOVDO6UDpQfRgjt8,4316 +torch/include/torch/csrc/autograd/generated/variable_factories.h,sha256=EWalUuVIP-5o0htCkXwdvVZccPRIb59rnsN8UDxsPxQ,60271 +torch/include/torch/csrc/autograd/grad_mode.h,sha256=49QHebGFym_CUOczJEtR9N64aq9mdZjk7o9scjMT6XU,464 +torch/include/torch/csrc/autograd/graph_task.h,sha256=P0OxC7RHuUtQVinzU4SpYB3KsQIAya8ECxpcDNUn6RA,9605 +torch/include/torch/csrc/autograd/input_buffer.h,sha256=5rDYazxZzTRe4xTxL9H0bM4rOVLy-pMEpvPbAtEDwt0,2266 +torch/include/torch/csrc/autograd/input_metadata.h,sha256=8BE5MVxErQyJ-uqmLYTR7gHVMaGeqMQbIbazSUmqeRw,4022 +torch/include/torch/csrc/autograd/jit_decomp_interface.h,sha256=cQ3nucJtKJIUvLQCHo5vz3mem5As_-Yb0XZIiN9FQkM,2082 +torch/include/torch/csrc/autograd/profiler.h,sha256=B4BypHNHlVX9vBCnvfwl4yxogmg-pWrKUhQ3SKceoMU,366 +torch/include/torch/csrc/autograd/profiler_kineto.h,sha256=IZRmLEChGov_x-44NndYJ6FOKNa6GqtArCBvqsjFspw,8523 +torch/include/torch/csrc/autograd/profiler_legacy.h,sha256=ybnnQqJ55ZyBMj9-X65QC6LBQGHl1a-aGaAYrdziuro,10956 +torch/include/torch/csrc/autograd/profiler_python.h,sha256=w_uymVzw7mSJshQulmwIbbypnob4XkFFcRdr_pLmKeQ,338 +torch/include/torch/csrc/autograd/python_anomaly_mode.h,sha256=U0rQ5UcXxtf5r-77lmLEb60r3DanCUqnbbt-7NICuts,1440 +torch/include/torch/csrc/autograd/python_autograd.h,sha256=vU-tC6gZ3BY11lhixIp-rPmPB67doBTiX8eRV7_ogp8,677 +torch/include/torch/csrc/autograd/python_cpp_function.h,sha256=Hzc5J7cVNNffCylrbR3L82F-A6hI5v8IAY2pyWIpxpE,5498 +torch/include/torch/csrc/autograd/python_engine.h,sha256=lpZEd6U06q3aGIjXXzMNzuaSsOEUgCqlqjxLUSOzcE0,1510 +torch/include/torch/csrc/autograd/python_enum_tag.h,sha256=DWE7qeWc8UxiHD2TgGvRtkmCNiihI6phVvHIOE76vH8,374 +torch/include/torch/csrc/autograd/python_fft_functions.h,sha256=rCqcUNevR9OzMD2NhlUKC3WWinruFbqKYo13oUS5GLA,389 +torch/include/torch/csrc/autograd/python_function.h,sha256=zsWQhrpnEVUg0SIW5MP5zOk-CYsb8d2r6tXbmK7FzAs,5625 +torch/include/torch/csrc/autograd/python_hook.h,sha256=OdHmJXgXfy5jadWaKCHREp80MInG0q2WSR39921_v7g,2321 +torch/include/torch/csrc/autograd/python_legacy_variable.h,sha256=tNV-tr0AfucX_7ooFijF1lEWN3Tw5VT0myraeUQcVB8,511 +torch/include/torch/csrc/autograd/python_linalg_functions.h,sha256=8wRQxErZ873uJ5RptU29fcGT-OJYlaIy3B8hW8g6J4o,392 +torch/include/torch/csrc/autograd/python_nested_functions.h,sha256=4ipseJnANXuARoQRTVboHeqICoDEDKzeVTb0Y7PyDMU,462 +torch/include/torch/csrc/autograd/python_nn_functions.h,sha256=EKy9pNl3ybOxBu0JZTA8W9auzbtCnBqjctIS40LZOgI,383 +torch/include/torch/csrc/autograd/python_saved_variable_hooks.h,sha256=83uwA7LUqaCznTyUST-mlRNzBPt0MA8RUH_jI2RgfEg,1333 +torch/include/torch/csrc/autograd/python_sparse_functions.h,sha256=-BmwGly0XH3XsNvJbbSFkj0taRxazvFz-XRoT79BO4o,392 +torch/include/torch/csrc/autograd/python_special_functions.h,sha256=rxQgJ6E7VDMf73wk-DSnSwj5-j4pQoatW--g9h8HYeM,392 +torch/include/torch/csrc/autograd/python_torch_functions.h,sha256=ZgViZedLSuehprslQelMPBEjtTJ_xjLKXNcLLZRb2gY,920 +torch/include/torch/csrc/autograd/python_variable.h,sha256=VWKfw-DXVrDFKbSZZyNrBLrX2sqbcbYD284Bm-DKJtQ,4112 +torch/include/torch/csrc/autograd/python_variable_indexing.h,sha256=EdGDkaPMSb6PRj1dTG2tyiqWpDS3Hrrkrmb4csUejs0,3006 +torch/include/torch/csrc/autograd/record_function_ops.h,sha256=FuLjqyuwTmxPp4xP94yxkLp_XfgHcR_H2txjyFqEVzo,1189 +torch/include/torch/csrc/autograd/saved_variable.h,sha256=R4T7rg-Ou9m00Al9IJTHXDhOJkeUpvwDGFuKnaTry3Q,5418 +torch/include/torch/csrc/autograd/saved_variable_hooks.h,sha256=kwnUYEiaui84rDo3h3apvW3G2PXCk-qlB_7bpY213sE,795 +torch/include/torch/csrc/autograd/symbolic.h,sha256=QkadzHJ6l6JTk1lnaBv6t0IQw5L2YQin5b9HKLlZiuQ,554 +torch/include/torch/csrc/autograd/utils/error_messages.h,sha256=dtBSGmA8U46QFfsSfSDsP1mP_cBjbYWO-zHACUQphdw,749 +torch/include/torch/csrc/autograd/utils/grad_layout_contract.h,sha256=-m8k_tjDVBdAlQ6Hq794tYxSILM6R_NWMvKFZN90-QU,3168 +torch/include/torch/csrc/autograd/utils/lambda_post_hook.h,sha256=LmkQcAnvDxXP6ISLWFrmT_qiTeBJsxQvWplpdDqet7o,1658 +torch/include/torch/csrc/autograd/utils/python_arg_parsing.h,sha256=KYRRUVW4HID-8dXLLK8ejR3Q0dRJxK4ORjqsE_RLPBo,1629 +torch/include/torch/csrc/autograd/utils/warnings.h,sha256=vMaKfEyqoSsAqrwKjRVnypKd4wvWDT6h1FYsxwNttUk,837 +torch/include/torch/csrc/autograd/utils/wrap_outputs.h,sha256=voVEs04uTnBr3Cfg7XYBKrPDuNE7UTuWCYwvspbfeao,4091 +torch/include/torch/csrc/autograd/variable.h,sha256=bxSbmVIGP6YnwtOe4MS4uyxBEYHe8U7rRKqzD5H8i9A,42899 +torch/include/torch/csrc/autograd/variable_info.h,sha256=x_powXIvA0FoDX1ZfprEiC7UknRztkLKAfKWpvCDpx4,862 +torch/include/torch/csrc/copy_utils.h,sha256=L27LKL-iro2NvWObZ5WKTH-1Csq304z0U1N3gW26N6k,1674 +torch/include/torch/csrc/cpu/Module.h,sha256=zGx7rIRNPxhfuZdJND23s8ueyqhYxEANUwyMs6XBJA8,393 +torch/include/torch/csrc/cuda/CUDAPluggableAllocator.h,sha256=AFyOmG0V29FkoDmXg8AiPBMWJcm931LtMXWXhQZWk0w,6776 +torch/include/torch/csrc/cuda/Event.h,sha256=KLa6boqJoG359kbJUQ05SEnt_jfDTgSTZJx9zT9b10I,687 +torch/include/torch/csrc/cuda/GdsFile.h,sha256=_sbk174mXjBzcCce8rvrChCh_0Yyk0e-hIM3VzanxX8,446 +torch/include/torch/csrc/cuda/Module.h,sha256=mFzWaRz5WRtYv2VaovHWXTdsafKM3KK1pzQhvtyBawk,738 +torch/include/torch/csrc/cuda/Stream.h,sha256=pOltSeNx7OTGfnVQBh1V3USsJwtMfkvYuBzzBjhfhS8,758 +torch/include/torch/csrc/cuda/THCP.h,sha256=824p3D8G5rEcJ8_mqta6VVtehwmQrX8r2LR630cDITM,477 +torch/include/torch/csrc/cuda/comm.h,sha256=X39M4z7rL1-bsydkOa7ctawby7a9c_rVh_vgZUmtxGE,1768 +torch/include/torch/csrc/cuda/device_set.h,sha256=WphcH70-YDeVx1chXwuIzm6uQZRdDuuGptqpD120_lA,439 +torch/include/torch/csrc/cuda/memory_snapshot.h,sha256=V8GPsLu3xnMUBGlOd6UIdfVxLXmMC4PdU1jYjkcOxfk,1235 +torch/include/torch/csrc/cuda/nccl.h,sha256=oSBApz0v7VDQuSQvqTdmsWtT3Wee-cCegWX73uOI3ko,6125 +torch/include/torch/csrc/cuda/python_comm.h,sha256=3UpS2iokMzxsYGpslUbV5JnGWopGe3zjdTHOp5IzgT0,425 +torch/include/torch/csrc/cuda/python_nccl.h,sha256=438GoxIfBg-mTsXGvv2hMY9mKpclUEGX9M7ZV-9p978,936 +torch/include/torch/csrc/cuda/utils.h,sha256=wlakPJDSnG_QUpIK6f8LvWw0r7y5OQc4w1hei9exg3Y,469 +torch/include/torch/csrc/distributed/Placement.h,sha256=Ljbn5O4sm3CF4fBgshX4YRiQqzO6vy9Sk6n_ZCrXlaI,2831 +torch/include/torch/csrc/distributed/autograd/autograd.h,sha256=3rkmIlVBwPEIBrhQOqZZMJlMDEuVAersaMGqVP7IA3I,1890 +torch/include/torch/csrc/distributed/autograd/context/container.h,sha256=1QFZ6vefKZmxD8Zc9-EBvjCWkjHhfZ9UxYvrRF2-yAc,6638 +torch/include/torch/csrc/distributed/autograd/context/context.h,sha256=WxXzVZWmQqRmkqVTQbuCCyp64KYya1e0OWdMZlIXJkw,6868 +torch/include/torch/csrc/distributed/autograd/engine/dist_engine.h,sha256=oUAdwQuhseLPr6qTwc-ZzPFi11zfDycWPcgWWwP-mHM,7672 +torch/include/torch/csrc/distributed/autograd/functions/recvrpc_backward.h,sha256=yUhTCVz-MeNdBaXoMDHwEzuL-qmFra3_mVjBjkIOopM,1916 +torch/include/torch/csrc/distributed/autograd/functions/sendrpc_backward.h,sha256=ztfoFVFG6KzHKU4Zz3IzpfkshRcOh-awivGQapGF_i8,1577 +torch/include/torch/csrc/distributed/autograd/python_autograd.h,sha256=F9cPdI4F4m7HPMIs_fBea6QMpX0J5kUyD3EDmHHX1Xg,428 +torch/include/torch/csrc/distributed/autograd/rpc_messages/autograd_metadata.h,sha256=VdgRx9Eaj6Jy3s55wgTpRQVpYoX1WqNuHutcs8cZbj8,954 +torch/include/torch/csrc/distributed/autograd/rpc_messages/cleanup_autograd_context_req.h,sha256=QeJbAf00azhBpdrAUaCBXyrT1KHFng6rIeK37d14594,1090 +torch/include/torch/csrc/distributed/autograd/rpc_messages/cleanup_autograd_context_resp.h,sha256=-CIxYg-7UQ52v3om34tmUM0r1nxWHX35BhQqGAXWnZE,915 +torch/include/torch/csrc/distributed/autograd/rpc_messages/propagate_gradients_req.h,sha256=cCl7oeWz1PbpB80JTecbjugSF3SMstl2tPW1mIrrrK4,1502 +torch/include/torch/csrc/distributed/autograd/rpc_messages/propagate_gradients_resp.h,sha256=G_2iVpZVZSecDjhQA-EslD5swLZWHCJ1k1MB5_UvNnM,1008 +torch/include/torch/csrc/distributed/autograd/rpc_messages/rpc_with_autograd.h,sha256=wWIg4p62dn0Kq4BSNnZz0a-CDv0cs09VBtL1Z53W3aw,3760 +torch/include/torch/csrc/distributed/autograd/rpc_messages/rpc_with_profiling_req.h,sha256=FZqHLNTHs8uMCbRd_fHTjrf_S5dWJ_MwPHK87W3XiME,2764 +torch/include/torch/csrc/distributed/autograd/rpc_messages/rpc_with_profiling_resp.h,sha256=7VpaqDe6N23Qk-vOyJ2J9VQUzrTpHUiiaU9NvR22T2Q,2724 +torch/include/torch/csrc/distributed/autograd/rpc_messages/rref_backward_req.h,sha256=E9P-Y0xyK68cinxepkUq2uKl73qzssChvNtTYZ4eRaA,1444 +torch/include/torch/csrc/distributed/autograd/rpc_messages/rref_backward_resp.h,sha256=yxE9UFlGQauit2LcWyCkFgy8Uw31HXPRheKJFB7Eqvs,762 +torch/include/torch/csrc/distributed/autograd/utils.h,sha256=oRUE0r6ccxMxc3SPd1ViAexoV2c5xsxmyS4YAp2HWW4,2901 +torch/include/torch/csrc/distributed/c10d/Backend.hpp,sha256=-sCGcDxol3SaC-I7AyaXY_lGtMR6BzQ1x_IOX_Tu_GE,16894 +torch/include/torch/csrc/distributed/c10d/Backoff.hpp,sha256=DnLFbWRCa3IhP5E29sSnNpsHBO9oJat1Ek4W1hDjIAw,1305 +torch/include/torch/csrc/distributed/c10d/FakeProcessGroup.hpp,sha256=TWpNTw3rjB4mVQMztkfRxR_vaxlLPYk7kpD7hzpjkRU,8491 +torch/include/torch/csrc/distributed/c10d/FileStore.hpp,sha256=iK7cGCElJxpUzi4-Xv4e1mN_6RSEHvoYYcWvynJw640,1842 +torch/include/torch/csrc/distributed/c10d/FlightRecorder.hpp,sha256=NjLecFoN8jONqyaC4vIqXrQYjXVMbMgjxXVfX7ZMnRY,12196 +torch/include/torch/csrc/distributed/c10d/FlightRecorderDetail.hpp,sha256=hhmnmi-jELb5QCSpMHzpIFtYE3uebAeAQkfTwOO_5JA,21246 +torch/include/torch/csrc/distributed/c10d/Functional.hpp,sha256=w291iOsIXki5SJnLK6Guu9Gxry0LPmzpZ4j6DW7a-aw,2682 +torch/include/torch/csrc/distributed/c10d/GlooDeviceFactory.hpp,sha256=6MsvopYzTV3oGjWqYoDRXQTbeaNCwg7F2CalioXwYeM,1094 +torch/include/torch/csrc/distributed/c10d/GroupRegistry.hpp,sha256=LFpx87v7dvk11uGm6nS4cxkllN4G6gBHSJL6eouJB44,823 +torch/include/torch/csrc/distributed/c10d/HashStore.hpp,sha256=wLEhb20eHMpuzUCLVCx0q4Ne4bzqa1g_YYupgq9Lgxk,2487 +torch/include/torch/csrc/distributed/c10d/NCCLUtils.hpp,sha256=XBJGTIYYWso4loj-lOh3HzlJnw-3fZE2uEmKf-EpOB0,17402 +torch/include/torch/csrc/distributed/c10d/NanCheck.hpp,sha256=GgTgy_8F64ZhC9a8FjzUGQXM5-ukKEFQwzew6e6RUnU,582 +torch/include/torch/csrc/distributed/c10d/ParamCommsUtils.hpp,sha256=eZc_Y3UZdYKiTg-Ry5escL-hY0TPu45ierTnRUpydaQ,9005 +torch/include/torch/csrc/distributed/c10d/PrefixStore.hpp,sha256=6ccfMIhqe3OGCWTut0PKGoU43e6uukpMFTu1qpOgioU,2525 +torch/include/torch/csrc/distributed/c10d/ProcessGroup.hpp,sha256=KJSSfzIOVVeZHC50uB45pSr26mi3PnA1Nfr7VNSsmck,37572 +torch/include/torch/csrc/distributed/c10d/ProcessGroupGloo.hpp,sha256=Qq0N_Tsti2mTCQ5geN7UKMLUCABKfQpvZmba-OGe_o4,17222 +torch/include/torch/csrc/distributed/c10d/ProcessGroupGlooDetail.hpp,sha256=f69cUYXlFSeXNAyUQeTevLKEaAxnNWS61Gvg9TsrY_E,22213 +torch/include/torch/csrc/distributed/c10d/ProcessGroupMPI.hpp,sha256=qsSyYDVHxrmUNqOR1h8lDNpv0JBnHguzXLFqFiqedgQ,9028 +torch/include/torch/csrc/distributed/c10d/ProcessGroupNCCL.hpp,sha256=PyY6_e3hshGZWNaviSCBldeiUrxPQcWUCFcosGiWPDY,56179 +torch/include/torch/csrc/distributed/c10d/ProcessGroupUCC.hpp,sha256=4Fi1Bzw3nBo9zoU92LvtMDpM52gsf7Pm7fmmQPGFCq4,11518 +torch/include/torch/csrc/distributed/c10d/ProcessGroupWrapper.hpp,sha256=CYpXSpOtMH93YoowNfAz0WF0suUkYtNT1c96CdHOmZE,5331 +torch/include/torch/csrc/distributed/c10d/PyProcessGroup.hpp,sha256=g3aEN4SyDwE6NaMJfPxgdwpQtRyIKqwFqTsOb-xzYSQ,11295 +torch/include/torch/csrc/distributed/c10d/RankLocal.hpp,sha256=Gvg4O_rZFs5U1GTWVyESLYEujG6m5rvKENlsifIFbG0,2541 +torch/include/torch/csrc/distributed/c10d/Store.hpp,sha256=9BKl4q6otNsZ-g69nhrD4kQzrWOJkUPcm4KqVaoTH1w,4702 +torch/include/torch/csrc/distributed/c10d/TCPStore.hpp,sha256=AN_Mrek0IPhjZntabzkaMkFbTzztOwxqlhR-qwhuKdI,5355 +torch/include/torch/csrc/distributed/c10d/TCPStoreBackend.hpp,sha256=hyhVPDwaPZ2SwkxV6d8TVo3iOksRpsQi32pIjMuj00s,1832 +torch/include/torch/csrc/distributed/c10d/TraceUtils.h,sha256=itfJMHemy2q7yvi_PZlaGcj5vOy3p_U3WqGDh_8BPb8,9340 +torch/include/torch/csrc/distributed/c10d/Types.hpp,sha256=wepA8YoV7H_xAkuD7A4HpuzUCWFDIViuia81C8vg5IY,5340 +torch/include/torch/csrc/distributed/c10d/UCCTracing.hpp,sha256=xzw8ckF13C97z9ZzJZJruxZPW1COo96OuuV2_1RD9DA,2555 +torch/include/torch/csrc/distributed/c10d/UCCUtils.hpp,sha256=1yEkP1SJnvJQCCtLG7jKUqNAYDlV0mjkJcnxcLRYm0c,6614 +torch/include/torch/csrc/distributed/c10d/UnixSockUtils.hpp,sha256=RBTSux9rLp20yj8jF_k5c3rguQBp_o9aWy4aohgsyQU,804 +torch/include/torch/csrc/distributed/c10d/Utils.hpp,sha256=UZuyr33mSYtSKl9SuVfOIO2WH-g6oaGeLBIBUbzCFvU,24041 +torch/include/torch/csrc/distributed/c10d/WinSockUtils.hpp,sha256=-DWh4gPRTjDxX8zfhyE9Bu9YXyhUAGciZjCQsctmlkU,795 +torch/include/torch/csrc/distributed/c10d/Work.hpp,sha256=olPktUZD7i-nxQBwELMYhHVb7aTwIVk9KvyWrEl1FoI,6104 +torch/include/torch/csrc/distributed/c10d/c10d.h,sha256=98aqdnQ7MT6I3vRDCjmrF2zpwhmlbjjebZHyaDdUz3k,420 +torch/include/torch/csrc/distributed/c10d/comm.hpp,sha256=MB5AenuguWwMeIKABucAzpwS7T4lNA85YgSKkxtbxfo,4677 +torch/include/torch/csrc/distributed/c10d/control_collectives/ControlCollectives.hpp,sha256=IbknaNbjdaGHyXPzJVP3JaDMOPB5LF0-0pzHVdeGzMA,1959 +torch/include/torch/csrc/distributed/c10d/control_collectives/StoreCollectives.hpp,sha256=nQjw3mAaL0nwCBTfvvtlM9QO31os-yHHc74gzM_k-eE,2195 +torch/include/torch/csrc/distributed/c10d/control_plane/Handlers.hpp,sha256=vG-xauGcy-87UZbzThZHGzwo6wsw25Z79HWhUFZLkGs,2570 +torch/include/torch/csrc/distributed/c10d/control_plane/WaitCounterHandler.hpp,sha256=XveaRQ5aVYkHecZ2Z4a_3HRejCU0233sxJimG1xtLbk,567 +torch/include/torch/csrc/distributed/c10d/control_plane/WorkerServer.hpp,sha256=xxqg78hobK_Z0E587GIjWeOOsEaiENHKsZsnUeRnlso,902 +torch/include/torch/csrc/distributed/c10d/cuda/CUDAEventCache.hpp,sha256=q4lCWhFi99XcNnFdk9A9YhfUtJlQRfSmr6RykF4HvUs,998 +torch/include/torch/csrc/distributed/c10d/cuda/StreamBlock.hpp,sha256=rbq6FcheBGluDgn9NEU4-nuXN8ItfSgVhy8NBZb5C_k,1117 +torch/include/torch/csrc/distributed/c10d/cuda/utils.hpp,sha256=p-DYuAHZo9VjAbXM5FvxqTXSl47rPhPAiWttX5qNprs,484 +torch/include/torch/csrc/distributed/c10d/debug.h,sha256=ebhH_PUCoe7bakjer98f7OMMkrvIkefj3-jdzbwOb9Y,858 +torch/include/torch/csrc/distributed/c10d/default_comm_hooks.hpp,sha256=i9cBVCXiFfq8wAmCUMFnnG4lhvlWyoeaQP7B5GZotmQ,1999 +torch/include/torch/csrc/distributed/c10d/error.h,sha256=VVxbcGxJKtxoYWiji9uEhc3UwMonbEEQ7W5_zMvj_N0,1544 +torch/include/torch/csrc/distributed/c10d/exception.h,sha256=m7UHsDwvBIlSwKaTL3xNT5w-EwiIR7JYrIMdVY14UlQ,1580 +torch/include/torch/csrc/distributed/c10d/logger.hpp,sha256=tkHtVcM3BcBv3b4ZyrvuuYEyIo6m-9W2dEtgEWM2ZQM,6686 +torch/include/torch/csrc/distributed/c10d/logging.h,sha256=kQSwLqHtBQGg00Ow6Be3fg8HPUrHCHcAC7mLU_xF2-I,2084 +torch/include/torch/csrc/distributed/c10d/python_callback_work.hpp,sha256=6Gt8x8CATCK7aJiAFygtXfN9dx7RlINra7pJ77ibpeE,1030 +torch/include/torch/csrc/distributed/c10d/python_comm_hook.h,sha256=KZ2FDYZSeCvTUUdakbwM5TgK7MfS8NVfpundzm1-Zkw,1327 +torch/include/torch/csrc/distributed/c10d/quantization/quantization.h,sha256=Md-HOaJ9-DpVUffMQnBRJ812FMA9jX_JfFVvVhQ_LG4,709 +torch/include/torch/csrc/distributed/c10d/quantization/quantization_gpu.h,sha256=jtpDYbQ9RTOF5AeWmm9zi2e13NCIziUX_rvcHJRUl5E,711 +torch/include/torch/csrc/distributed/c10d/quantization/quantization_utils.h,sha256=S40yJ9Z3sN81eQkoCt1BPol-D41J8RRYI8m9WMmY1LU,1510 +torch/include/torch/csrc/distributed/c10d/reducer.hpp,sha256=YGWitUwFHY9niki6ZiBvAGIvBusobLN8CvLqDMKZQVo,26416 +torch/include/torch/csrc/distributed/c10d/reducer_timer.hpp,sha256=TD4Lpxk-65H8hy9A1eDI60X8pX4U0zqc_EYLrsJrkC0,2638 +torch/include/torch/csrc/distributed/c10d/sequence_num.hpp,sha256=otUETjq8RGaGOOWeqsCjPAq-MrjJ48rNWSXtlcX563Q,1958 +torch/include/torch/csrc/distributed/c10d/socket.h,sha256=HpAenewC5doWDVOyzdVBkmrO-Q40dpnS_kAPzIMZGxM,2714 +torch/include/torch/csrc/distributed/c10d/socket_fmt.h,sha256=ugcrbys6fYksAsFKph3TptWa_b3MDR-0hqL34nZfgxs,956 +torch/include/torch/csrc/distributed/c10d/symm_mem/CUDASymmetricMemory-inl.h,sha256=idFAEJNOvqhs8oYHb3cc4VezzW3ORlO9vIYD0W-B3WI,12951 +torch/include/torch/csrc/distributed/c10d/symm_mem/CUDASymmetricMemory.hpp,sha256=k5-NyGf7jSlUVnLv2ln3w8MDoxAl1ulci-l4-JR9bKs,5040 +torch/include/torch/csrc/distributed/c10d/symm_mem/CUDASymmetricMemoryTypes.hpp,sha256=AZ4bxoN0-rMWiIsOzAqb0UU4mTdG_hZWK3NRyHZVzio,1140 +torch/include/torch/csrc/distributed/c10d/symm_mem/CUDASymmetricMemoryUtils.hpp,sha256=ES2pP2CxH4v0Zl1ZiTk1J9ghhJs91U3BnbZjUybrUSs,3220 +torch/include/torch/csrc/distributed/c10d/symm_mem/DMAConnectivity.hpp,sha256=UA_H2-MUPXBRVjruzND7ieJ_h3MsgrzThydPDEYBu3M,1531 +torch/include/torch/csrc/distributed/c10d/symm_mem/SymmetricMemory.hpp,sha256=rGRVrG2wATZnOZ61JwKP8dxQ-rmLU3LTwWJKe3Blu1Y,9018 +torch/include/torch/csrc/distributed/c10d/symm_mem/env.hpp,sha256=-4nJOjv1iHpWQ8TU3lI2ZgWBcVTLHxHL9dSt1v2jgEk,669 +torch/include/torch/csrc/distributed/c10d/symm_mem/intra_node_comm.hpp,sha256=Tw0nzvZy36gPv2RGxBvr-X9PdRP70BHAT_aAa9l-Uc0,2579 +torch/include/torch/csrc/distributed/c10d/symm_mem/nvshmem_team_manager.hpp,sha256=U_AHgACA2binAyN4TbeptiMSrkv4f96uoSN1QOgdohI,6652 +torch/include/torch/csrc/distributed/python_placement.h,sha256=87wvbwBCZkwHvXHZ12w_RIc8nwlR5GgxZVNmuZQACLY,422 +torch/include/torch/csrc/distributed/rpc/agent_utils.h,sha256=-WmN5L_KWnHQPDVm8G8lnvyl8CVP3itL_71MxSoD930,1883 +torch/include/torch/csrc/distributed/rpc/message.h,sha256=4J0JYMLIRqpvzFsG8zwjv49Biok9AtJWttFcW60vj8M,7887 +torch/include/torch/csrc/distributed/rpc/metrics/RpcMetricsHandler.h,sha256=qBhyhGPXtUqD16i-UP-zGC-FcH3heCX4lnFEZJcC3fA,1822 +torch/include/torch/csrc/distributed/rpc/profiler/remote_profiler_manager.h,sha256=57nLwfYlLfg_4Q82xj6teBpsEI-VtpQmrHikpXOJsOo,2480 +torch/include/torch/csrc/distributed/rpc/profiler/server_process_global_profiler.h,sha256=4LyG-7M-7dnoS7AxoEJ2A_C6ibEFh7XHYgZFOPsx7u8,4653 +torch/include/torch/csrc/distributed/rpc/py_rref.h,sha256=19R-hMHZZ4wwDCYxoGQZGHBmaDSt4F7imiImR61r8QI,3219 +torch/include/torch/csrc/distributed/rpc/python_call.h,sha256=ib1wexw1L3-FANmVfR5z8k6k8bJWDX_LUDHhhc2SIPc,1065 +torch/include/torch/csrc/distributed/rpc/python_functions.h,sha256=udBVDNxsN7qlVKV6RYNWfga9atMEP64wz0B5h9WfVTk,2511 +torch/include/torch/csrc/distributed/rpc/python_remote_call.h,sha256=L6V5BiyzPhuj0W_-0CfbkUlJzcO2ZBbFW4c9mpMrvuQ,1532 +torch/include/torch/csrc/distributed/rpc/python_resp.h,sha256=Lm4TlIG9M46Qn7uXjSbtGHg5heXeKzFzn_Ccuo6lY_M,875 +torch/include/torch/csrc/distributed/rpc/python_rpc_handler.h,sha256=3lVkpCFiVWfzjbUIsuUQOrUv9qcPUgVV0ODlfOTy4X8,5208 +torch/include/torch/csrc/distributed/rpc/request_callback.h,sha256=zJnOxrCIzxFWwuia5XvgvIL--WflFgHSPP337JzGcvk,1480 +torch/include/torch/csrc/distributed/rpc/request_callback_impl.h,sha256=ljQoxGJulsdA1jbSXmcKpAOA_fhbSItRx2wCLMAJ9NI,2336 +torch/include/torch/csrc/distributed/rpc/request_callback_no_python.h,sha256=y5wSLgvzWSU9p-8ZATnzUKbRliw29xWVccbSbpf341k,4158 +torch/include/torch/csrc/distributed/rpc/rpc.h,sha256=AZ88ciAR9Kpv7jQjNO9hWvrgFkTMuyssBTr1HaJjBQQ,418 +torch/include/torch/csrc/distributed/rpc/rpc_agent.h,sha256=mlgNrzyiR68jkMDOuMbFxURwYwGahAEtB3fyZXlNf80,13898 +torch/include/torch/csrc/distributed/rpc/rpc_command_base.h,sha256=v3MU4z486fYnio_EQ5lZmWz_l8dcEe6tD-vCq4jUJMU,932 +torch/include/torch/csrc/distributed/rpc/rref_context.h,sha256=bpPQk3p5wEayzyYiusB27j9zOFfNqeExlDOSToUIAjU,16033 +torch/include/torch/csrc/distributed/rpc/rref_impl.h,sha256=y-j6pPBLe85lWMkwrUSkvCGEczuMD7lnhkZrV1AUfEk,16707 +torch/include/torch/csrc/distributed/rpc/rref_proto.h,sha256=SWbK563pyfM4ErGDXn8csprLuyWMhKQDhBj3YACMZMk,5611 +torch/include/torch/csrc/distributed/rpc/script_call.h,sha256=6YqWqBglQVy9d6ekl0oaficMWr6RpsltysOUMwARXIM,2740 +torch/include/torch/csrc/distributed/rpc/script_remote_call.h,sha256=dmWKw9zMvhAr47cx4wUZfBdcKJ4v-fWOs35CY9KwCCY,1947 +torch/include/torch/csrc/distributed/rpc/script_resp.h,sha256=g-NlV9plQD0iRb4Oe-RdMcUROnVR1KVWxDiW3xi2REU,903 +torch/include/torch/csrc/distributed/rpc/tensorpipe_agent.h,sha256=uku_0SKx9IE_kVuCGltuNcLOVpI8t8u7jbDgwl0Lr_E,17894 +torch/include/torch/csrc/distributed/rpc/tensorpipe_utils.h,sha256=jiKArNodJh9qrWWApKos2cQFYYYwQlpdGXF-P9_0OJg,4995 +torch/include/torch/csrc/distributed/rpc/testing/faulty_tensorpipe_agent.h,sha256=knNysmZUsPfvEdMnV8n5RWVkxXH6yC4QEfBuOWUi79Y,4040 +torch/include/torch/csrc/distributed/rpc/testing/testing.h,sha256=9Z7ubO59UGH4QyrBqzqDuSR4LzuiVJzcV0teEMAa5s0,436 +torch/include/torch/csrc/distributed/rpc/torchscript_functions.h,sha256=h16g5rg-iUPYVNzmfovPMZlq4HJXf-yQZ-QKy4X5Dwo,1910 +torch/include/torch/csrc/distributed/rpc/types.h,sha256=3za2zUBLFSjbS4mMrpcWzfG2xPASKvCJz_mmRIv20jM,2464 +torch/include/torch/csrc/distributed/rpc/unpickled_python_call.h,sha256=lQy-y_rF5i3E1gAh_gH9byjIGMMoWFIi7qFMf2AZjN0,1642 +torch/include/torch/csrc/distributed/rpc/unpickled_python_remote_call.h,sha256=AVUQz2-ZGzECQgZl2Ocpvnw8blFvEIAfnc2KOpMnn_0,1461 +torch/include/torch/csrc/distributed/rpc/utils.h,sha256=2CGx4yhtg62GZHCmuPp2DAN0p-GTGA-6jQ7SpkqMBOM,4044 +torch/include/torch/csrc/dynamo/cache_entry.h,sha256=to35fpvYfvTCGY4eiHWFsq9s2HPZKX6cob4AbaKXM8o,3062 +torch/include/torch/csrc/dynamo/compiled_autograd.h,sha256=oQLZJI-nsjkPIpSYVDBFRt65XCTMMFU582fhjwKTpWs,50940 +torch/include/torch/csrc/dynamo/cpp_shim.h,sha256=PikXznGvcUJZ5GSh4D6Fs8Pc28kk6BUcB1WzUsDi22E,611 +torch/include/torch/csrc/dynamo/cpython_defs.h,sha256=Axt2oLc0fsLl5VqxCR-5rRyBLHhSpnt-LF8O-4dTYWA,1174 +torch/include/torch/csrc/dynamo/cpython_includes.h,sha256=d53ADPd7Sk_FzfNKvtgPigmzUWJ6H6AZpzu5SqZGkrs,1934 +torch/include/torch/csrc/dynamo/debug_macros.h,sha256=M6MYIcD0iNODFf9uia3dM4XLxiBs0b54HG4JgFh1zHk,3782 +torch/include/torch/csrc/dynamo/eval_frame.h,sha256=UrkVDtGWPDugFqTQGmf25GZBc0mKtroRQGEjO6SXa-g,1741 +torch/include/torch/csrc/dynamo/eval_frame_cpp.h,sha256=dhlVGNy0xsuEou-sk-DsOU3EeU-UWwPr6yV60lu37E8,876 +torch/include/torch/csrc/dynamo/extra_state.h,sha256=UoFwBzF-jO-p_9qFsFHZAK9fTgJtnRnsdnwb3jRy2zo,6682 +torch/include/torch/csrc/dynamo/framelocals_mapping.h,sha256=1wY8fe28hVm3r1oYVnVtPGWQeJdrim7wP1XuuzpKPPQ,3035 +torch/include/torch/csrc/dynamo/guards.h,sha256=DpM9tRm96YZ1V_HwawlBL9DDs3A-JYYu_0QcxpRFa1I,4144 +torch/include/torch/csrc/dynamo/init.h,sha256=2zowU12pO7ujkPnOise78YFjJq85AilpavNxRc_Fe3g,441 +torch/include/torch/csrc/dynamo/python_compiled_autograd.h,sha256=pnKkQpXyekQfk5B4vtzCgxNWHUjKgwp-4J2lPrOfpyg,469 +torch/include/torch/csrc/dynamo/stackref_bridge.h,sha256=VDxP9T4sWOW0QHU3HAWhvX8LV5dMX0PiXbimAa_Dbgo,618 +torch/include/torch/csrc/dynamo/utils.h,sha256=QhXCgdMkEzSha-lH8EJKO7NnsKg5OVEaWu_gWG8X9do,772 +torch/include/torch/csrc/export/example_upgraders.h,sha256=-mACzEc9kbq3weBPH9VqyGkZPjRdWUt374q6Z3SnuUM,761 +torch/include/torch/csrc/export/pt2_archive_constants.h,sha256=i4Nj2YOCLZ0JJt7NbGNiu1RaEmyYeGP2L0dj4kf_8AY,4927 +torch/include/torch/csrc/export/pybind.h,sha256=fI_Sphc3RTmoEAd8w5bUsVyY1ZFBaJTvF6mQ_7ls-Q4,396 +torch/include/torch/csrc/export/upgrader.h,sha256=Hpg96dnZyxdzYIfRUblO2D_dwbmVmsIdQ80VbYLD8qk,5603 +torch/include/torch/csrc/functionalization/Module.h,sha256=5ZEw4c7qn1PtmLTX7QH_bjxWsQdgoAZvpUgUeUwmcHE,1308 +torch/include/torch/csrc/functorch/init.h,sha256=oGmErAJcLTYIjo-LgFLpDI934rG-kDnH22cu0jcoKFE,360 +torch/include/torch/csrc/fx/node.h,sha256=82SLiN-PrEtXKlVBK2sECGpVi7SbFbTpLUPn4_LXcu8,384 +torch/include/torch/csrc/inductor/aoti_eager/kernel_holder.h,sha256=HIhm62YRnDVjHgfMRdtwg8nYbbClw6KxkAE9IDLq5bQ,4379 +torch/include/torch/csrc/inductor/aoti_eager/kernel_meta_info.h,sha256=JxovwkN6E91D6orIoONk1lIUX3nYqAPapr33TO_dQ3w,5966 +torch/include/torch/csrc/inductor/aoti_include/array_ref.h,sha256=SFBN5XNKtGL8M4EOlZh4wKWDEfeFawPurJrz7Q8TuyQ,555 +torch/include/torch/csrc/inductor/aoti_include/common.h,sha256=pk3x6OttsruIOjeDW1AfSKAzTewv0PV84F_6JhIMK3g,670 +torch/include/torch/csrc/inductor/aoti_include/cpu.h,sha256=cxf5uxsTPXTmzx9Tal01sNbQMLpGIV71OQsLQAMtFzU,386 +torch/include/torch/csrc/inductor/aoti_include/cuda.h,sha256=e5T6P_3cdnOAKaSOpNv8JXHp2pNfCsDGqNNvqjv2kdo,387 +torch/include/torch/csrc/inductor/aoti_include/mps.h,sha256=tZd4iKD9EXjrnZ5y_umoJ1rX3wMCbN1F7stgzTniRSg,386 +torch/include/torch/csrc/inductor/aoti_include/xpu.h,sha256=7zsKLgDuFFnmOpsQ18ZNC28pb8-aKaW2b9TnJeEQDv8,386 +torch/include/torch/csrc/inductor/aoti_package/model_package_loader.h,sha256=SCBejTgGLIgcsYctnHOPNRbyP6FrMl3AZz66IhqWjFs,2129 +torch/include/torch/csrc/inductor/aoti_package/pybind.h,sha256=-QbSC0FRBUlK06XOsjhMkqaoLotj8abv4QS6AgEu4nk,403 +torch/include/torch/csrc/inductor/aoti_runner/model_container_runner.h,sha256=tJHG5PB7zoFiBVKPfVGikeOHgScZj-4zEAUCJDSsD5c,5703 +torch/include/torch/csrc/inductor/aoti_runner/model_container_runner_cpu.h,sha256=z6F1PWz7f0CK5aZSNnuy24o_5x-zHLDtkD8AFrQ5l9k,733 +torch/include/torch/csrc/inductor/aoti_runner/model_container_runner_cuda.h,sha256=N-sbQlgKK07d01VyelmnwKoTfiufb-R_hpzeFqHV_U8,1385 +torch/include/torch/csrc/inductor/aoti_runner/model_container_runner_mps.h,sha256=Q8DXtywT5LCB62h1PjXAg2RGvhIafrROAncYfWpBURs,710 +torch/include/torch/csrc/inductor/aoti_runner/model_container_runner_xpu.h,sha256=JrBydhSlEk9MOITI33NQg_Yf2hi8dBepGPUlnIoU64k,1470 +torch/include/torch/csrc/inductor/aoti_runner/pybind.h,sha256=sllydAFs1uLRcUJzr6HhfDKdFR-U6_gdquQWoVLQL30,402 +torch/include/torch/csrc/inductor/aoti_runtime/arrayref_tensor.h,sha256=wfrP-xBlKeIUkl72vQrTqi12NBwK113xtVZynOJ_swk,6510 +torch/include/torch/csrc/inductor/aoti_runtime/constant_type.h,sha256=kw7DVntwNZI20Tx0yksFG7tZPHrpJuN7gZmqF09LHl4,781 +torch/include/torch/csrc/inductor/aoti_runtime/device_utils.h,sha256=c1H1BS8sIFDLh3UUhBQRCxz7vHykMXVebnYn9q510LI,2574 +torch/include/torch/csrc/inductor/aoti_runtime/interface.h,sha256=cB1UaxdWjUYl61uR0kPBMogxSJ6cHBP-lvj9LCvORYE,11406 +torch/include/torch/csrc/inductor/aoti_runtime/kernel_context_tls.h,sha256=IhN1F26Nn63YmBiPD09LbZv0DTllWzd3ppkGThYOgy0,2635 +torch/include/torch/csrc/inductor/aoti_runtime/mini_array_ref.h,sha256=5DbABsGXNt8dA4tLwQRDqUq4ccRlXDXzwXjdxAbsB7k,4980 +torch/include/torch/csrc/inductor/aoti_runtime/model.h,sha256=0crcjSzh8t3hYaOqlKZZMmIQc8jwTdpkIaf9jKl_V8M,2511 +torch/include/torch/csrc/inductor/aoti_runtime/model_base.h,sha256=pFK4B809CnWOzQHVfw5795B_-3CCwe8eNZkGAoqka_c,29624 +torch/include/torch/csrc/inductor/aoti_runtime/model_container.h,sha256=bjnOa55wgQlTnIfshHopMvRYXZ67gsgKCwOVeO-6Bqw,29152 +torch/include/torch/csrc/inductor/aoti_runtime/scalar_to_tensor.h,sha256=1_eNE1F_kl-XWpwsgc33m1p07_lNK1iasp1cRVQt5NI,1844 +torch/include/torch/csrc/inductor/aoti_runtime/sycl_runtime_wrappers.h,sha256=OaGUOYdhQM-Im3iJONCWE9vTIvGy4-im0cxs5S4NrQU,6133 +torch/include/torch/csrc/inductor/aoti_runtime/thread_local.h,sha256=kQpIjL_9JLeu-B5C2_PYsv-BhIh8NueCEVupbBdCJyU,4606 +torch/include/torch/csrc/inductor/aoti_runtime/utils.h,sha256=EWudxCMNKZgkYcw_QIc_XWMFBMl2wsGYLOQe_fhzHD4,14357 +torch/include/torch/csrc/inductor/aoti_runtime/utils_cuda.h,sha256=iP8TDGVTQKcAQH5GscGF21TcRPiUggE887Pl_j_n5i8,2079 +torch/include/torch/csrc/inductor/aoti_runtime/utils_xpu.h,sha256=OxYab5unrLFCiIAbqy7iZf5e0_p6IF-YY7NU1VEEHlk,1969 +torch/include/torch/csrc/inductor/aoti_torch/c/macros.h,sha256=dbD2szZ8zECHPYsKCOC8lT4WJj7CnbkKvlGrsBmUl5w,2321 +torch/include/torch/csrc/inductor/aoti_torch/c/shim.h,sha256=T_Iq5tMxBRHM4wcGuPWaJeA2Ji62OeyNBcEu60lZmKo,25708 +torch/include/torch/csrc/inductor/aoti_torch/c/shim_cpu.h,sha256=tx_K_GPKYJ2_erq5WfWx4Cj_U__Ze28tvea1kvPBrrI,7490 +torch/include/torch/csrc/inductor/aoti_torch/c/shim_deprecated.h,sha256=84fTR6qD0UVNXY9ammn7K1Fp5Rj9mvKHjCkWtIOEmCg,6551 +torch/include/torch/csrc/inductor/aoti_torch/c/shim_mps.h,sha256=1zx5xWfQsLU7HfIVMfzotvFDJmJjAlqWVHcnAavB04Y,3189 +torch/include/torch/csrc/inductor/aoti_torch/c/shim_xpu.h,sha256=Psqiql3DOXCZaXLv7GwoKCcQi4B4Ihg4t49PvH8YXCY,5982 +torch/include/torch/csrc/inductor/aoti_torch/generated/c_shim_aten.h,sha256=xG_AhAJbz_mAHwzAMSu0uhcgFD98KUfUrmdHoQ_j6zw,1888 +torch/include/torch/csrc/inductor/aoti_torch/generated/c_shim_cpu.h,sha256=5F1yiqXhfdZ7Y--dBqT-dYlrDoHqzds7cfCd_CHvGNs,30774 +torch/include/torch/csrc/inductor/aoti_torch/generated/c_shim_cuda.h,sha256=sG4MZQKHN-AJc-s1MPnqbFeZaywqlJ3v2MQDyfCcvuU,35870 +torch/include/torch/csrc/inductor/aoti_torch/generated/c_shim_mps.h,sha256=vkEmWoNCp-cI-Ict_h3Ynho3V-ng8Q3g5OAT6B2BcPU,24659 +torch/include/torch/csrc/inductor/aoti_torch/generated/c_shim_xpu.h,sha256=LxaGoRtyr1QMlGf1Jh1rCTi_E5Ty6Y0vtuBwCavObQc,12953 +torch/include/torch/csrc/inductor/aoti_torch/mkldnn_tensor.h,sha256=ZdeZ09ReNHprPAM-vXNUXrFL3uupfCbuwVaOQS7ivLs,625 +torch/include/torch/csrc/inductor/aoti_torch/oss_proxy_executor.h,sha256=P_YnlpyPprSTfrsebAjxnoiXW4irLumVbKISuEaaAu4,4893 +torch/include/torch/csrc/inductor/aoti_torch/proxy_executor.h,sha256=qIXJIglBUusFnK8VloIMmFur3Z0j8VHzXjVhcHSWxdU,1111 +torch/include/torch/csrc/inductor/aoti_torch/tensor_converter.h,sha256=WdeIfmMjhpTrqPXmWQ09BKeBKJIZ53UIobYOzefW3nk,1207 +torch/include/torch/csrc/inductor/aoti_torch/utils.h,sha256=NkLCyR_WcJo1l4IHElRaIv9w8QFQKmaTOT8OM0vGa-o,7825 +torch/include/torch/csrc/inductor/array_ref_impl.h,sha256=x-vqZVeeXCimfxfyKMNN2hQoDCMFBKg_MwKNdUt_kIo,3187 +torch/include/torch/csrc/inductor/cpp_prefix.h,sha256=x1eojnd8jJsXHUVhiNlHBsByfOoNuIAOcU-KvlGuIdc,39688 +torch/include/torch/csrc/inductor/cpp_wrapper/array_ref.h,sha256=XKMFQCveJevHKVCHmyiepJa2JBZTCMFrU0kE8lJmsnE,554 +torch/include/torch/csrc/inductor/cpp_wrapper/common.h,sha256=CZQGlJOMRMoA5RPtk-WhuRf5PIMeMUItlmyGoE1IMEY,2183 +torch/include/torch/csrc/inductor/cpp_wrapper/cpu.h,sha256=DsDdKA8bpepv9yp-59zY3HoQa55zmmdgZtRS4y4JXuU,385 +torch/include/torch/csrc/inductor/cpp_wrapper/cuda.h,sha256=5UFQ8IoNiEzKO_mlcXLDCoUkDS__Y2zXBURrZOsm1vs,386 +torch/include/torch/csrc/inductor/cpp_wrapper/device_internal/cpu.h,sha256=rOgmA6ZaUHX1Zvj-Tr3qj8Oc_8BYCMmXPE5GAZhj9ZQ,333 +torch/include/torch/csrc/inductor/cpp_wrapper/device_internal/cuda.h,sha256=2x0n7z6ZZ1t0Bo5xEhcyCnoaH0GsvweIfR0fBN_oXZ0,391 +torch/include/torch/csrc/inductor/cpp_wrapper/device_internal/mps.h,sha256=wRwIY3fjx11KMZZuPGffr3sFJilZ39DDGJ9M4UV5_3w,388 +torch/include/torch/csrc/inductor/cpp_wrapper/device_internal/xpu.h,sha256=SulOHp5rrEkUIyWH0wjhPK1ezDtmiX00u3tAnusq1XQ,457 +torch/include/torch/csrc/inductor/cpp_wrapper/mps.h,sha256=1BbioeTM6zhVciGbOrNx2SHBn7tw_9-z6bBV-QZ8WqA,385 +torch/include/torch/csrc/inductor/cpp_wrapper/xpu.h,sha256=IBlTUyK_SmNSYedu09lhXmzJZ3k_XjmMurZpfMifAhE,385 +torch/include/torch/csrc/inductor/inductor_ops.h,sha256=lln5wsSTK3alK8h3ooWn5VEjKM4m3IewPDdzw9_Xc0w,1349 +torch/include/torch/csrc/inductor/static_cuda_launcher.h,sha256=zoNo39SrfO3uubBWQotyHt19tCoYwkJmeFeFEQU0o3A,472 +torch/include/torch/csrc/instruction_counter/Module.h,sha256=Ml9ZG1I-Y6RPLlwR-rnjGTsz77UfWljboJcIEhfjgRw,425 +torch/include/torch/csrc/itt.h,sha256=Hh_KZ49HvlacfiBSGHKCIOxr8lJ7gwwAYpFMGxyvgTI,435 +torch/include/torch/csrc/itt_wrapper.h,sha256=AiJkfyZXHdf_XHd5s6hkf4dxtDYCpUS14iFxmzKuSvA,574 +torch/include/torch/csrc/jit/api/compilation_unit.h,sha256=hUIkZcGmufGNvFGijvHyETh9F7G6Rw7Xh6YJ3t2W-ho,11950 +torch/include/torch/csrc/jit/api/function_impl.h,sha256=4yKX3Evd3u0UwmzAM2Cad1mpScm9JtlNfJE6ri36waY,5995 +torch/include/torch/csrc/jit/api/method.h,sha256=eHbmuglj-sEN05sX-njsaznd-xnGRsV06NyD8CkD6vY,2676 +torch/include/torch/csrc/jit/api/module.h,sha256=A-UjaUfOofIqr71ps4ImjsqEVMWKh5DAcrurB1NUcXA,23751 +torch/include/torch/csrc/jit/api/object.h,sha256=26RTyq72lWmX5CFc5jC3ZTpd5Mc8itPqGyeT0FmaBpo,6337 +torch/include/torch/csrc/jit/backends/backend.h,sha256=Jp65JTXDs4J2ThN_jLXjZZnSL7zK6VghpFSnkqFw9s8,4086 +torch/include/torch/csrc/jit/backends/backend_debug_handler.h,sha256=_QT_zsuAF_buHIuago5qA2sNd8REDXq8ylIALk8gM2s,6586 +torch/include/torch/csrc/jit/backends/backend_debug_info.h,sha256=1XFkmDPhdGlyjLpFLx0x_FIIIcnMw32BZk8gg7S-4j4,2567 +torch/include/torch/csrc/jit/backends/backend_detail.h,sha256=wdFD4DqTtzpkP9gDSiv-7UMirUM6wDDGB7H-HR1QPwY,1333 +torch/include/torch/csrc/jit/backends/backend_exception.h,sha256=IjU1PU_ALiUOijUSGWyNXAWlcdEyVdMcLWakEDxZv-0,2370 +torch/include/torch/csrc/jit/backends/backend_init.h,sha256=RAFmi0TqARbl-ubYaKTCIL8TNqAGm1qFMPCY3Xx9L30,506 +torch/include/torch/csrc/jit/backends/backend_interface.h,sha256=MX68QIi9QUduProJUDhmZRYrI0v70iFW6T-aIoG_l1o,1413 +torch/include/torch/csrc/jit/backends/backend_preprocess.h,sha256=VqNFjRIHvSl7dzAUIL7By46cYMTxFH2jXRhbK62PHYM,667 +torch/include/torch/csrc/jit/backends/backend_resolver.h,sha256=CYBglxD9roKA4sfXp_54q4ruhOKFu16OWd3Lta8dWGw,506 +torch/include/torch/csrc/jit/backends/coreml/cpp/context.h,sha256=tethBGnuL4WyugUIwuYJ0enleu3p0ayUni8k8fzPNb4,692 +torch/include/torch/csrc/jit/backends/coreml/objc/PTMCoreMLCompiler.h,sha256=reCeVEraZWxNme4d0cnKMjywXuSfMWGE6ZSgTkjEBBc,787 +torch/include/torch/csrc/jit/backends/coreml/objc/PTMCoreMLExecutor.h,sha256=xwIlHZRCswsW26xZ7Ql_fjUTjLBt42ZfNlNrJzf9BuM,668 +torch/include/torch/csrc/jit/backends/coreml/objc/PTMCoreMLFeatureProvider.h,sha256=DkokTYTWbUAlpImXcjhqy7a11H7A5Ty0hJ4fxXmMjtY,604 +torch/include/torch/csrc/jit/backends/coreml/objc/PTMCoreMLModelWrapper.h,sha256=wHqsv6LISy7Xy9B6SkOQQMdSdWBuQIypvi_SHRjpSGA,1176 +torch/include/torch/csrc/jit/backends/coreml/objc/PTMCoreMLTensorSpec.h,sha256=5gsPmrVB6h5S29xNnRgVWAiYrwrKK-51ArG_vJ5J5Mg,902 +torch/include/torch/csrc/jit/backends/xnnpack/compiler/xnn_compiler.h,sha256=ADmstNgU9OkZ5aV11bfLXfUexBpDMyTAIhtzz7o03IY,1036 +torch/include/torch/csrc/jit/backends/xnnpack/executor/xnn_executor.h,sha256=iuAnIUo0qIJ1kY9Uuvj5Nmh2fPzRlvrKcjTdE3EE7Tw,1821 +torch/include/torch/csrc/jit/backends/xnnpack/serialization/serializer.h,sha256=tEkmXQjr76j9w_xXGTJDQf6oqeNXGm11EJ-fhVUq904,3033 +torch/include/torch/csrc/jit/backends/xnnpack/xnnpack_graph_builder.h,sha256=2WQ7XQcCZvv619Q-3Lc4aKqwhJEU9eAeOnSz0-C3oZY,3489 +torch/include/torch/csrc/jit/codegen/cuda/interface.h,sha256=n_0AGEGG0qhy6rCnWJpRk3NwlY7fWXNmxSnms0BrWzY,2118 +torch/include/torch/csrc/jit/codegen/fuser/arg_spec.h,sha256=kEbcFpRmYoos45ISwGCEj7xMeR5yTrTqtRVzkVa-22k,1607 +torch/include/torch/csrc/jit/codegen/fuser/codegen.h,sha256=iUhuS0ExBWQ3dJgW3rXixOfs9wr_Hv4W8_1wBVTB4Jk,999 +torch/include/torch/csrc/jit/codegen/fuser/compiler.h,sha256=XlK31j1-g_YBuW4eNveTsIJhsfLhfS5S75BwtV1-5gY,2088 +torch/include/torch/csrc/jit/codegen/fuser/cpu/fused_kernel.h,sha256=4GspYxscZ_D7qaNhqpb3vOdrp8zOk4kDJrwTftge9SQ,1253 +torch/include/torch/csrc/jit/codegen/fuser/cpu/resource_strings.h,sha256=-mHwdYh9bS9Qp0Rjwjhn1slJ5Dsba7WpaoSyEOnNr1g,2532 +torch/include/torch/csrc/jit/codegen/fuser/cpu/temp_file.h,sha256=fjVmQwk3FzmMZaR-3uVOAWBUnS0Karbb2SRRNFdvuQk,3145 +torch/include/torch/csrc/jit/codegen/fuser/cuda/fused_kernel.h,sha256=QYz6Vg2SZAolMNCXOm97jCKznd5YVGxi1jUf_rKaAfc,1765 +torch/include/torch/csrc/jit/codegen/fuser/cuda/resource_strings.h,sha256=uWSW1FCXRu-v37o5IqTmsXcUkXPlFMJSOrZLKXiueSg,11175 +torch/include/torch/csrc/jit/codegen/fuser/executor.h,sha256=B7r0NLU-F8utHGO8CRIuCjp204lK1Ch8_bgGgTU3Rws,754 +torch/include/torch/csrc/jit/codegen/fuser/fallback.h,sha256=8caRHyCb87UPKCrvhOIiQ4rwfWYeut2LUL2qHWrxIE0,428 +torch/include/torch/csrc/jit/codegen/fuser/fused_kernel.h,sha256=aisFlx4O0Ur4aqwSMKKeexzBtMU7cz_ZnBJJbL9TCkc,3559 +torch/include/torch/csrc/jit/codegen/fuser/interface.h,sha256=S-tgQYiHs8Yq8aQ6bS45VKTkY9dwS1TZmLEM8O-OSEA,1976 +torch/include/torch/csrc/jit/codegen/fuser/kernel_cache.h,sha256=RRzEWG3xtahznaAG4DjhdrbmXY1Jp6Ndmv8T_hopvb0,1248 +torch/include/torch/csrc/jit/codegen/fuser/kernel_spec.h,sha256=BivQtrvupHG9BAEjCZCXrH71hc_zuojVtWLUjZKh_LA,4655 +torch/include/torch/csrc/jit/codegen/fuser/partition_desc.h,sha256=IddHbNKQdgPgY4ESijYgYkoPamv5Rl5l0KQpgyqU5Bk,2009 +torch/include/torch/csrc/jit/codegen/fuser/tensor_desc.h,sha256=ATarPR55x29jHUU-RznxLnDmHiIax1Hwo35ymAAfT1w,2955 +torch/include/torch/csrc/jit/codegen/fuser/tensor_info.h,sha256=dzENGXbxvP1X-sHViShL8mjKYCtZyCCY9TAaI7EWAoE,790 +torch/include/torch/csrc/jit/codegen/onednn/LlgaTensorImpl.h,sha256=PzwwFiuS1WR8uguOyLfScgiTq8rPY4qwyJwlu6mkZNQ,7944 +torch/include/torch/csrc/jit/codegen/onednn/decompose_silu.h,sha256=p_G-mIPLgMY8jSGFSk0x3Lku8FaVjyluOluZUlo1On4,442 +torch/include/torch/csrc/jit/codegen/onednn/defer_size_check.h,sha256=pE1__qzRiyQxN2cJbvvqWFWKjWPYBo790Ledlv98MhY,436 +torch/include/torch/csrc/jit/codegen/onednn/graph_fuser.h,sha256=CR2zC1oIpjsRncDjPGgK6SeQR2ZGVGG1iuja1UKwiqY,1470 +torch/include/torch/csrc/jit/codegen/onednn/graph_helper.h,sha256=LGewDjvOWFT38EcIBi_JOnHV_I9zOQcBwzFwgcGC7yc,2718 +torch/include/torch/csrc/jit/codegen/onednn/guard_shape.h,sha256=j20gjfQhLQYJqfBBe8L4AnpzjfP7gFbSkd1Bu5DxAg8,438 +torch/include/torch/csrc/jit/codegen/onednn/interface.h,sha256=h47yQa2csCXocYQVkvTHsPb7iyJJjEnqQDfvHc3bXdU,1652 +torch/include/torch/csrc/jit/codegen/onednn/kernel.h,sha256=bya7H4LqTE67tU_O_gVJNg2a5yaxIwcr3zsVdr12KDw,2948 +torch/include/torch/csrc/jit/codegen/onednn/layout_propagation.h,sha256=A-K9-r745pQok43Myo_xHK9kmxsf5sut9U8ZolAykvc,443 +torch/include/torch/csrc/jit/codegen/onednn/operator.h,sha256=vX10EMXfm62FHTWVTb284rQGQF7vpdeiznLJmkFgPb0,4176 +torch/include/torch/csrc/jit/codegen/onednn/prepare_binary.h,sha256=u2XAd1M6J7MiGAqN_QH8ktm0Y_ppCJ89YPAOEmnqFC0,753 +torch/include/torch/csrc/jit/cuda/cuda.h,sha256=dRaA7N_y1gPx6TIxr-DgVimq5hrhKrsXwWrKxRYx_4s,5411 +torch/include/torch/csrc/jit/frontend/builtin_functions.h,sha256=IZBvfhC3BrCaGLAUUVWmqchlP7aNvLonuPTxlBskFXY,469 +torch/include/torch/csrc/jit/frontend/canonicalize_modified_loop.h,sha256=jsuIx-jMYBiRGMHonSgVsKio2zrmbgjVRqeDiqOVxqw,541 +torch/include/torch/csrc/jit/frontend/concrete_module_type.h,sha256=GCxfEpftkhM8Z1sP5vTssOJ3eIg-ZViluiZEPmZkQZk,9291 +torch/include/torch/csrc/jit/frontend/convert_to_ssa.h,sha256=3zWfz9auCqI1QD7FxwBBjL2_UMe6E3p3G4_A90JG0J4,556 +torch/include/torch/csrc/jit/frontend/edit_distance.h,sha256=kBIcPiahPtaKkOxWxALNLIi6fjke52sFJqNoII-lmbE,483 +torch/include/torch/csrc/jit/frontend/error_report.h,sha256=NUq0IuGQRclkqoYl683WnEpv5aIU79t2XtQzBMR_sEI,2494 +torch/include/torch/csrc/jit/frontend/exit_transforms.h,sha256=AHUnyTGs7X9qs68WAce4PaeNaYnZU-ZiUXq9N6n4p-c,447 +torch/include/torch/csrc/jit/frontend/function_schema_parser.h,sha256=A2AeqcgaCJv99Meo_KUk7IdUEvd09tdJkDExivRiij8,1058 +torch/include/torch/csrc/jit/frontend/inline_loop_condition.h,sha256=4tqiJQvvtb7knAxeGN7_2XV47pJwoTZO2qLqPpw4GS0,581 +torch/include/torch/csrc/jit/frontend/ir_emitter.h,sha256=0sEUfd9NIyIK_zS4st3_79jowETO89MCwy0-fPnIRCU,770 +torch/include/torch/csrc/jit/frontend/lexer.h,sha256=ybWb6X5xGC4OwghexEU_fVM_tnGF5QnmPGbKfTq4seU,19212 +torch/include/torch/csrc/jit/frontend/mini_environment.h,sha256=u87AA6rHKGLu_MNWaKLtkIkjb_IIqytdpI24T5Qxeug,1629 +torch/include/torch/csrc/jit/frontend/name_mangler.h,sha256=PRM_e4MlsIKA1wowjkp5vHEGNBTOaB0X5K85wHKKszA,884 +torch/include/torch/csrc/jit/frontend/parse_string_literal.h,sha256=Fznb2iPJ4zUS5wUiMAjIY6q4O91g_VyE93DL5sdDbuw,2548 +torch/include/torch/csrc/jit/frontend/parser.h,sha256=_VFpRbn8WXPLBhYDz70syzCXeSXU0SRYAfe8ZaKvvhI,903 +torch/include/torch/csrc/jit/frontend/parser_constants.h,sha256=0oL1Mg44XC6hXBAUVj99yv1wylrXakght95EY8u7aHw,405 +torch/include/torch/csrc/jit/frontend/resolver.h,sha256=nHTt6zBkmJoMOlSKazSzRYwWajRE-DE-d50_vInSpOQ,2211 +torch/include/torch/csrc/jit/frontend/schema_matching.h,sha256=5duuKpN_Iu8dwscoEsjSlxNmAshtYyyLEqMtuQEYwrI,2362 +torch/include/torch/csrc/jit/frontend/schema_type_parser.h,sha256=jnwfPWpFa2hr5QDIp4c30fq5KrOfqeRDzw5TYrjv-cc,1590 +torch/include/torch/csrc/jit/frontend/script_type_parser.h,sha256=J0NaC5d95lNulX8d1gN7A94c2U44hrh0OI85Oo83KTI,1834 +torch/include/torch/csrc/jit/frontend/source_range.h,sha256=2RKUq0fZGS76QMDILHOltvJjxLE1dGS5C7IWc8oRJ0M,17167 +torch/include/torch/csrc/jit/frontend/source_ref.h,sha256=62PZejPu4EM0IIIzvCc0CLbi-M--HGcAfpGXtgKvYVo,1542 +torch/include/torch/csrc/jit/frontend/strtod.h,sha256=zBQEJYtFWY-Fvdb6nsS13gggDCnZo8UFQDxv90QZv4M,470 +torch/include/torch/csrc/jit/frontend/sugared_value.h,sha256=I4HFJFg5JjLT3lGlE1M5pOKH2ROrg9ArDwIoqANJbRE,28516 +torch/include/torch/csrc/jit/frontend/tracer.h,sha256=-wUprSpD2qxaVJuMOsYFeOpZH15_GqWtJGREqucHsI0,13055 +torch/include/torch/csrc/jit/frontend/tree.h,sha256=INdyEOZij5mHcPQ0dA7weulkHlxPpH4EfcLipDEUDdg,6807 +torch/include/torch/csrc/jit/frontend/tree_views.h,sha256=jUVuM_ORa1Fw2JpabQ437wr9bUTbnKjrBJ1SHWRAdXg,37454 +torch/include/torch/csrc/jit/frontend/versioned_symbols.h,sha256=QQs29ujosMvluxrGO2hAW7BFNDKEk2d9F_nTO3Lmmig,849 +torch/include/torch/csrc/jit/ir/alias_analysis.h,sha256=aW6ia8q2mJjNqzru3uhzz8YWxa2EUL69KDjhDVbUTvM,14545 +torch/include/torch/csrc/jit/ir/attributes.h,sha256=aI-bBxIrJVjRBKMvsHbqeQNPVLBlVKzqMMZ2gNNacsA,5048 +torch/include/torch/csrc/jit/ir/constants.h,sha256=6fLeQ2WAKA5g2gw8Zs-R7XkAXkXk4YXgYUcDwUohf5Y,2262 +torch/include/torch/csrc/jit/ir/graph_node_list.h,sha256=rgOcMU9i8Cl87ZuhS0sSSjeKVHx1lDbAercWE9y7NS0,6608 +torch/include/torch/csrc/jit/ir/graph_utils.h,sha256=f7t71HGhSNU94EvgZvL67Ns4uelB56jQHlK9Nfh0xW0,758 +torch/include/torch/csrc/jit/ir/ir.h,sha256=AF_hGL7WppLKfjPCG_bUmnt7wV49ABP1eH70XHRCtY0,54115 +torch/include/torch/csrc/jit/ir/ir_views.h,sha256=Wb8vo6TOqKNyz9JpfZhOxT_EtBCwK5eI2XZwqp8JsCI,4878 +torch/include/torch/csrc/jit/ir/irparser.h,sha256=QR383rzKoILJH2nvRV99BfSLecPlQ0JmNhRUUkdSBY4,1354 +torch/include/torch/csrc/jit/ir/named_value.h,sha256=82WrC4LrBN4TKGqdHMEXgO-n50yfYiUtR2h-Bg30Ny4,2650 +torch/include/torch/csrc/jit/ir/node_hashing.h,sha256=DR0v95_n2vYSlFBwPiJ8ITtCCexa-Yl8QFI3stx6mjM,519 +torch/include/torch/csrc/jit/ir/scope.h,sha256=2kze-TeAMP3hBFE-kK8jyJSYeHR9OeTY7UhFG262FD4,7412 +torch/include/torch/csrc/jit/ir/subgraph_matcher.h,sha256=WImU1qLKIOT_5C7nMn58JP_v5ApuyrZN-uSMEysC4BU,3381 +torch/include/torch/csrc/jit/ir/type_hashing.h,sha256=8TAouNEGWvMPma9IVod1oqIYHuIggQaFsq8_Zq71yYQ,688 +torch/include/torch/csrc/jit/jit_log.h,sha256=syz7hm-O9pgJaPrw4-5q9GNwPCqfNoR6-idW4okMeOg,5060 +torch/include/torch/csrc/jit/jit_opt_limit.h,sha256=l-n0og_7nXcLMg_ae44PbLXrziAZY1ISo3PmTzCVsww,1635 +torch/include/torch/csrc/jit/mobile/code.h,sha256=E-rv5f8zS38MQixts0_MOe7Ur3sGHLM0Hih0rMcgj5I,1332 +torch/include/torch/csrc/jit/mobile/compatibility/backport.h,sha256=my50F4l06bIP3ScMBpCyHLLkzKVI6R5Teno6DO5MVGw,893 +torch/include/torch/csrc/jit/mobile/compatibility/backport_manager.h,sha256=RiXxwVhpwUkte-nxkn5-ChdWNlo21NliH1XFW25R-Rk,1413 +torch/include/torch/csrc/jit/mobile/compatibility/model_compatibility.h,sha256=dywbWpJUEvz_CiepxNHFc0oATDKtWOJwblheeOvIaFU,3864 +torch/include/torch/csrc/jit/mobile/compatibility/runtime_compatibility.h,sha256=ZooMOfeu6qEpE_yad8q7fTAQ2wZiIlFveVWhEGhm96o,1451 +torch/include/torch/csrc/jit/mobile/debug_info.h,sha256=zWiX3q7hHzoNvtlkyeqhm5wi5o-VPa9W41Cb7W3DQ74,2460 +torch/include/torch/csrc/jit/mobile/file_format.h,sha256=dhaybsAFdjlU06j0_UY4SCiV4WUl6lJhG_q-akFl6oo,6925 +torch/include/torch/csrc/jit/mobile/flatbuffer_loader.h,sha256=ZemcyJvz1xrViIzqyU9FOpEFKSfs0Zj5KLZFizGbwOk,5028 +torch/include/torch/csrc/jit/mobile/frame.h,sha256=WiI8ygemRG2Cs8kC-XhXSsUEsW4_OPVg7fxVpAB58Sk,1065 +torch/include/torch/csrc/jit/mobile/function.h,sha256=fs89swfvXdN8o1rkHr1YJ7WplNp2GfnzoUbp8qld1lE,3195 +torch/include/torch/csrc/jit/mobile/import.h,sha256=yr-EklN5mCQAZ4UFDu17e1r4Kjje5dpLkhOv3LxYRWk,4094 +torch/include/torch/csrc/jit/mobile/import_data.h,sha256=kqh0Z_dfBXiDhA4cVAURyAn5tmKpjAz71FpwcIj8dzA,1249 +torch/include/torch/csrc/jit/mobile/import_export_common.h,sha256=dLR011fk_eI2oPyJ_s-rSPt0EqhKUHpYiDlBXjfQejE,731 +torch/include/torch/csrc/jit/mobile/interpreter.h,sha256=JUerPsUZ5IqflpfMtbtPOCIW58lD2ZwmAyVXmJqnY5s,901 +torch/include/torch/csrc/jit/mobile/method.h,sha256=oYavtszbUZH2NAe0pM7wkKQtAyr1edu6qwn5PiWq7mo,1078 +torch/include/torch/csrc/jit/mobile/model_tracer/BuildFeatureTracer.h,sha256=K-OXlFb1vxQ9yYmUh9iGcluYaMWrrFpvTyaryo9wX04,1215 +torch/include/torch/csrc/jit/mobile/model_tracer/CustomClassTracer.h,sha256=ZFqxc7Hukxo_Mb4g7ikCxcPvRObAqcfqUxPG-IvQ4_E,1213 +torch/include/torch/csrc/jit/mobile/model_tracer/KernelDTypeTracer.h,sha256=kP9reVHEFkMFMnMr1LR_6CD-352jdMl9dDlCAci3tQM,1466 +torch/include/torch/csrc/jit/mobile/model_tracer/MobileModelRunner.h,sha256=Xfd9FoGNn9_R3oAZaDN4YC35lQzutLYIHIgJyuGztvg,5340 +torch/include/torch/csrc/jit/mobile/model_tracer/OperatorCallTracer.h,sha256=KFHgSJ8NOBDwzrswmf6dNCCW2L2SF8OoqG42NnryF4M,1172 +torch/include/torch/csrc/jit/mobile/model_tracer/TensorUtils.h,sha256=9KJss0Al81LTcQKjbUZJclVKvIqn-0OYrF8rQN2XotA,652 +torch/include/torch/csrc/jit/mobile/model_tracer/TracerRunner.h,sha256=wj-4TNfuyr4Q0yXX5AGbaEI3C7GaGc5o7RTorH3gvHE,1361 +torch/include/torch/csrc/jit/mobile/module.h,sha256=AjMKsMnliGQWiNEY2q6rBJoGg1xq6IvMF5y_QC6_v84,6175 +torch/include/torch/csrc/jit/mobile/nnc/aot_compiler.h,sha256=4QtJt2yncfiqbmu-TdqZXukUJSUoyG299S3SyHwuYMY,884 +torch/include/torch/csrc/jit/mobile/nnc/context.h,sha256=gFDTG6b9go-Oc2gUseF8DNsfvFtdVTlQh1nrzn1PAlA,6870 +torch/include/torch/csrc/jit/mobile/nnc/registry.h,sha256=q_Ba_oX7lIXuiH0Eu6mXvLT1zFEW8X2BhAhGW7EYFv0,1414 +torch/include/torch/csrc/jit/mobile/observer.h,sha256=5nKATYXvy7peg2rKDFro8wGL76rlx9hIJoCURvo3xLo,4080 +torch/include/torch/csrc/jit/mobile/parse_bytecode.h,sha256=o27oJpF6gCfKzSi8p8m5Gu72LfZXckuzJ6lweJLnCuU,994 +torch/include/torch/csrc/jit/mobile/parse_operators.h,sha256=av7eaS1-HSzMpE57EnjVBcBrr0AzWPyCrKpp3UJW1tU,963 +torch/include/torch/csrc/jit/mobile/prim_ops_registery.h,sha256=nhqJNmc8RtbuOJbMfog5XBknbBnw8lukCYsEnGFVnS4,849 +torch/include/torch/csrc/jit/mobile/profiler_edge.h,sha256=K7vw8Lu4GZ22V9PcAVj31heshmiSJQvtZP-k3WYjuhk,4742 +torch/include/torch/csrc/jit/mobile/promoted_prim_ops.h,sha256=3lp0XyINie-YHJQbH9bAr1dqcS2L7e5LXcIiLWwDXBA,1297 +torch/include/torch/csrc/jit/mobile/quantization.h,sha256=5yAbohsf1X8ysN-Fdi74gDpcSn2M4JeqBkR-SF1dSYM,1492 +torch/include/torch/csrc/jit/mobile/register_ops_common_utils.h,sha256=qPbFCTpOJiEo2mbQFMdhgA5VYHEg6pTZVntHoTO0Hzs,1941 +torch/include/torch/csrc/jit/mobile/train/export_data.h,sha256=VjByQpzxac0K4d5RSjDZEf7tJXkitv728Sr4ZhxR_jI,1848 +torch/include/torch/csrc/jit/mobile/train/optim/sgd.h,sha256=LQc_NMk3A0J43eJVLbrGme_tf2lonFAUz5xTH_3XoOM,4585 +torch/include/torch/csrc/jit/mobile/train/random.h,sha256=l8ExBi_8l5sQInNEL4XyvgIh5eUWH6H_xci33saSzmc,1773 +torch/include/torch/csrc/jit/mobile/train/sequential.h,sha256=SN3bNiMvPnwhSvmrp9k__pvHli_Xzc2QfFQgdsgN8qk,1478 +torch/include/torch/csrc/jit/mobile/type_parser.h,sha256=sapP6ZQle_VaZCI1hieMjxZTz5kGQ5-E6_1dju27KkI,1697 +torch/include/torch/csrc/jit/mobile/upgrader_mobile.h,sha256=CfF3MVWCIOkQWEbeJj25Ez2jhxR-OzplLf65Oujqwek,1159 +torch/include/torch/csrc/jit/operator_upgraders/upgraders.h,sha256=tBLNg_Aw07Vox9rPhruU1aoMdpadPMCuwdsyDnbuNOc,1638 +torch/include/torch/csrc/jit/operator_upgraders/upgraders_entry.h,sha256=7oBZBxLSNsQZ7E0HLUL2WPbEBtxElBydUtEjAOEvuEQ,776 +torch/include/torch/csrc/jit/operator_upgraders/utils.h,sha256=oD6TyMldIa8D9ygMZ7fmgjOtQTl2hK6Gsmi00gWy-po,1947 +torch/include/torch/csrc/jit/operator_upgraders/version_map.h,sha256=Oq0QWD-3F83cJ1_VmSkv_C8zJW-7Ndwpdfuvwe7fFaI,1141 +torch/include/torch/csrc/jit/passes/add_if_then_else.h,sha256=f0ShcVoByKs00Ld2YqZYXvquWhtqIikV2zornZZkhIc,417 +torch/include/torch/csrc/jit/passes/annotate_warns.h,sha256=02JWzxMLmy_BfOtgIgCmMeA6MMJWOqh1xm3VH4wAdi8,421 +torch/include/torch/csrc/jit/passes/autocast.h,sha256=_qPHpJ7hB1wzcvYWEuzEuEbmD69eteFsNq2IAVQhTEM,496 +torch/include/torch/csrc/jit/passes/bailout_graph.h,sha256=-E0TEJ6zyidaxR7FZTRymeOpVOlGqF2MsJPiQpaZXcs,1344 +torch/include/torch/csrc/jit/passes/batch_mm.h,sha256=DyxWCGNbD3UeqUbNxlUb4mGeKD1rayabjZcO3SVClZ0,385 +torch/include/torch/csrc/jit/passes/canonicalize.h,sha256=v7t65TCLRkIsGRnDhSa2Vlk65tMBGpJ_kMwERKX7NNw,721 +torch/include/torch/csrc/jit/passes/canonicalize_graph_fuser_ops.h,sha256=xN1GwxxzunnJ8gd-M6MtsKR4iy4_zPRWpCyme7EWCV4,399 +torch/include/torch/csrc/jit/passes/check_strict_fusion.h,sha256=MsxAQiu72jflrxZqFGFv8u3-M98BokJpck5ZruquxgY,420 +torch/include/torch/csrc/jit/passes/clear_profiling.h,sha256=5tAIUwLoKnKFfTK-jTGE622dvzxCuguLeqSElDg3wyI,722 +torch/include/torch/csrc/jit/passes/clear_undefinedness.h,sha256=jnc_bdQUATcOY3Jz7fMHoYaBX71k3IIZfqB_NYI8UEs,1104 +torch/include/torch/csrc/jit/passes/common_subexpression_elimination.h,sha256=rofGn5UT4KhFColNDpbnqiXeL5goOP4U0NQutKRNOUU,416 +torch/include/torch/csrc/jit/passes/concat_opt.h,sha256=YuSp1PFcUmxy_dLmEhVlhM_YcoFb2ZA9tQXIJaP0lYo,779 +torch/include/torch/csrc/jit/passes/constant_pooling.h,sha256=En3nfQkAGG3_470VppGHE65MINttbQgqMV2H_Tw6IfQ,399 +torch/include/torch/csrc/jit/passes/constant_propagation.h,sha256=p35UK_K-X2j2XImbtpgrGFpUNO4SXkRxf2m4htvJ_Rw,1543 +torch/include/torch/csrc/jit/passes/create_autodiff_subgraphs.h,sha256=_mlHdBQFWeKNgLAXa2DuUkBNWDekvjaVYYkN8KiTALA,767 +torch/include/torch/csrc/jit/passes/create_functional_graphs.h,sha256=5_fBFCv2Fa6Ns-7LhXrmZBtOL7hlKhIjjTODem5uzQ0,538 +torch/include/torch/csrc/jit/passes/dbr_quantization/remove_redundant_aliases.h,sha256=cMY-yjhfl6j62rOMFYw2usBgHUqA_pemFtc9tjsP4Co,594 +torch/include/torch/csrc/jit/passes/dead_code_elimination.h,sha256=Egpe15Aw5mI7eETml6LIPzIMmhTsEi6m0swVL5CpeGg,1813 +torch/include/torch/csrc/jit/passes/decompose_ops.h,sha256=B9qYNXZWlkJI5Q-RqSPM0UymrH7_748Rd5IWKtwTVQs,390 +torch/include/torch/csrc/jit/passes/device_type_analysis.h,sha256=NFvPZxkTRmVQ6H8iM0hcF_ksf6qiqS38FYAsZQkbdoM,496 +torch/include/torch/csrc/jit/passes/dtype_analysis.h,sha256=GCEVeveWihqGgJphM-DTpPlhNIvcUk3qGYUjUUlvZ1g,643 +torch/include/torch/csrc/jit/passes/eliminate_no_ops.h,sha256=sSidjyAbmaWMv9g-Y_GybSiJOw06wcwHabBXSZ5cuGA,746 +torch/include/torch/csrc/jit/passes/erase_number_types.h,sha256=n37Zgicm7KfOrz5bMFo-oSfjg1V8EXCWdEVwStYT9xM,1042 +torch/include/torch/csrc/jit/passes/fixup_trace_scope_blocks.h,sha256=PRjV9r6yj3s-N1hU1A2DYQSqU2g4I-BbRVRlBNrBh8w,1902 +torch/include/torch/csrc/jit/passes/fold_conv_bn.h,sha256=rGgsRsYYCyvl4oZ3eiHEPFl0NRnhO7sidzFHY-1QR2Q,1224 +torch/include/torch/csrc/jit/passes/fold_linear_bn.h,sha256=o3V0vkB4kiML7iN7KSvGYX20ta-cozpNT2o-9ofvwd8,920 +torch/include/torch/csrc/jit/passes/freeze_module.h,sha256=zsbw3P9Y4vImNTSrHU3a3LCgbtPCC51qJ7q5ArWdkmM,1473 +torch/include/torch/csrc/jit/passes/frozen_concat_linear.h,sha256=R_dFKDX09qS1051w0BQg4QEuy1urm8Rd2nt-6Qhi0f8,506 +torch/include/torch/csrc/jit/passes/frozen_conv_add_relu_fusion.h,sha256=oJ3U7PeMHAuuGK3LDJRwWAVQHU0KRSuzI8-PHM37dKU,558 +torch/include/torch/csrc/jit/passes/frozen_conv_folding.h,sha256=gqsDYKhyF7MI_OpRx7a922ULvGWGpoa4zTW70HFLVxA,1101 +torch/include/torch/csrc/jit/passes/frozen_graph_optimizations.h,sha256=aaRe66_HHQh2uYaDpGH8Od5NzJKDbMqtTdK9I5Nklt0,695 +torch/include/torch/csrc/jit/passes/frozen_linear_folding.h,sha256=YSh0apny-0M41_JuI7Tri2Z1kQf3UZWfrzaKubdir0M,599 +torch/include/torch/csrc/jit/passes/frozen_linear_transpose.h,sha256=c_Dw0bRU5R1w0-nmiPEauljSJgvi88FD3mUgsiCEiJY,515 +torch/include/torch/csrc/jit/passes/frozen_ops_to_mkldnn.h,sha256=cle2FR8ZgXrj4gEaFmqDIcMTg0TNEg3w4L_GTtiTtMs,643 +torch/include/torch/csrc/jit/passes/fuse_linear.h,sha256=VzB0Mw8-Lu4zS1JRwncRxmUMiU9fFOu80orgNp3Y6Ew,997 +torch/include/torch/csrc/jit/passes/fuse_relu.h,sha256=KcwM0AHZQFtb25kONC0f8oW3XYlUBArSZ2Y0oOtQSMo,502 +torch/include/torch/csrc/jit/passes/graph_fuser.h,sha256=nSYOAoLK2QWkUGSCaQ4zI3iTxT6QzFJnRHxrEIuTQGI,1480 +torch/include/torch/csrc/jit/passes/graph_rewrite_helper.h,sha256=WoXBBh9VgNk-MIqbifhEGiX4kh4LU2qs5odFQGXtwsc,1989 +torch/include/torch/csrc/jit/passes/guard_elimination.h,sha256=Q4EZMWjp79bdW-X45G1IdG4TFj1tl6jMKVVNIPXYCUQ,605 +torch/include/torch/csrc/jit/passes/hoist_conv_packed_params.h,sha256=CdAvrvCgDfL7zvtwgHG0AKqrWOdKe_nqbbwaJcOQRlY,440 +torch/include/torch/csrc/jit/passes/inline_autodiff_subgraphs.h,sha256=VZxi6tzq_hzPn3EIzIg2ZtvXBJ6yGfAZc5b7ATbX_ug,504 +torch/include/torch/csrc/jit/passes/inline_fork_wait.h,sha256=OYvgI7lfPVwGsxgnzilm2OJuhkGt6Ltc__35dn0-Owg,776 +torch/include/torch/csrc/jit/passes/inline_forked_closures.h,sha256=8e3yZCxzuikeldUCGUF3XTgAfkeHh6wEyz-KBCulR9k,456 +torch/include/torch/csrc/jit/passes/inliner.h,sha256=ToYyx5gJ37QcV0oTvzDEkDMVJUnb8GYXzk-4hThoCzs,483 +torch/include/torch/csrc/jit/passes/inplace_check.h,sha256=sOI32FKTl3O3s0tHYlg1k_Sn77sEst2-hWueyAj3i2A,390 +torch/include/torch/csrc/jit/passes/insert_guards.h,sha256=AIb_PhMXGon7heho-glI929uIC1Im0meEjOgRZLiIyI,668 +torch/include/torch/csrc/jit/passes/integer_value_refinement.h,sha256=CLQ2zGwDUAv_Y281ot29mm2GgduyL0vK3eujms0Md1Q,463 +torch/include/torch/csrc/jit/passes/lift_closures.h,sha256=td4UuyZdea9dFkD6W7KJODsmMQtFzUloB7ZRJY_zEsc,451 +torch/include/torch/csrc/jit/passes/liveness.h,sha256=Vxa4INJpMYKITv3m8bqOFZfJzDbfDZAfLtMLewxzuUE,879 +torch/include/torch/csrc/jit/passes/loop_unrolling.h,sha256=asj2phSEZGmoy9emUuDzgkc26M2J3kVk5nc6VfTUG-8,1235 +torch/include/torch/csrc/jit/passes/lower_grad_of.h,sha256=QYS_pCq01yGmynQVkT9l0_v1PgmUrWTMs3j5vdWn1KY,577 +torch/include/torch/csrc/jit/passes/lower_graph.h,sha256=rWUkw2SbpYBkvHYsCSnDrqeHXD75Qu2CNPjJJtC8QZ8,979 +torch/include/torch/csrc/jit/passes/lower_tuples.h,sha256=6LHRDOHVsmYyg1ciIF0PdXDX-yf0Wnj42YeXrMISSWQ,895 +torch/include/torch/csrc/jit/passes/metal_rewrite.h,sha256=Aq9hJ1g_b3rQKMBRm5BboxDHVKXCSKYDZ2A_duZ8LQE,835 +torch/include/torch/csrc/jit/passes/mkldnn_rewrite.h,sha256=3VXK9g-dLkqo4FCUmH8MwloWrtA3KtinJYCNeXgD-uA,859 +torch/include/torch/csrc/jit/passes/mobile_optimizer_type.h,sha256=15fTYpsDTiBMHsuAwOxPsTjXIZL37PtFWtZKRgFRn6M,491 +torch/include/torch/csrc/jit/passes/normalize_ops.h,sha256=lXj48gpVeLtNH-4uxdtIKYTCCMgAXEcXwm0pkzDgCU0,765 +torch/include/torch/csrc/jit/passes/onednn_graph_fuser.h,sha256=GBjQKvwNo03pCg9YKeSRbXSn-6QlqFFcvzfLbiU3gfY,1653 +torch/include/torch/csrc/jit/passes/onnx.h,sha256=_UkiWGPLHo91XTx9I-0bagdDtkLgzuNjaI1N9ZLYSYk,1086 +torch/include/torch/csrc/jit/passes/onnx/cast_all_constant_to_floating.h,sha256=dAvOYnKqFVtEHNOkfClRH3eNj7MbSKFcam_kBj4sGwM,471 +torch/include/torch/csrc/jit/passes/onnx/constant_fold.h,sha256=_XQyhSXo2-qnPkq340iCigEeHpih1PVrHls2iSjgm20,947 +torch/include/torch/csrc/jit/passes/onnx/constant_map.h,sha256=5pZuHzoqzXePcJsmaPYCqfEKKnU3sH4uoNwh82NatdY,4676 +torch/include/torch/csrc/jit/passes/onnx/deduplicate_initializers.h,sha256=w1w5ieTjPU34qymJgA_2JGWjoL2bmjx1A7KYQDSzPJ0,501 +torch/include/torch/csrc/jit/passes/onnx/eliminate_unused_items.h,sha256=krk079cOT4rOH11yfKlxBXyD7zx-KH47s6D22eUfaPk,597 +torch/include/torch/csrc/jit/passes/onnx/eval_peephole.h,sha256=-hDeDvDyI7kkdWzqeANeNLyjZ-XhSNCEtFkPrso0_4I,474 +torch/include/torch/csrc/jit/passes/onnx/fixup_onnx_controlflow.h,sha256=QhZj4aOPAdB3mVdIra74SH8ZIDRis6MMDnagak07f-o,475 +torch/include/torch/csrc/jit/passes/onnx/function_extraction.h,sha256=IrN-zKkMc117HwUOPd8rpLrScYQg0BWjVhsKfL3KpNQ,2505 +torch/include/torch/csrc/jit/passes/onnx/function_substitution.h,sha256=UE5MXmhwcKcnThcaJ44yHVQhUJEOYH1Te1cu8ua6dLQ,389 +torch/include/torch/csrc/jit/passes/onnx/helper.h,sha256=RSnKwjRHMLYSn9MBghSauvoIFIEppnUgSwoDodezT9U,2259 +torch/include/torch/csrc/jit/passes/onnx/list_model_parameters.h,sha256=Bjjdu1GfYUC_XzaoNeDd9uFxxI3BtRqHUBeyQsYTFh4,493 +torch/include/torch/csrc/jit/passes/onnx/naming.h,sha256=xARbuBP5w5yHBxa1SqvHvsIgsgSfzjYCLkbYIyOCKKA,1014 +torch/include/torch/csrc/jit/passes/onnx/onnx_log.h,sha256=k7Q3msE4ebSIbatK2SozmuuHhAN6PmDtG5o7na41lgw,838 +torch/include/torch/csrc/jit/passes/onnx/pattern_conversion/autograd_function_process.h,sha256=TzA91rqMukunWZhNt7243zU9XfOm183P5c8xD4y3QoY,429 +torch/include/torch/csrc/jit/passes/onnx/pattern_conversion/common.h,sha256=SwwoOcou_ddWJ-ZZaq9dGO4DUnQVkZ0H2fH-R3je_u8,590 +torch/include/torch/csrc/jit/passes/onnx/pattern_conversion/pattern_conversion.h,sha256=yWht1SKQmZcuKsB72qwwKXcIBtlvzWA53D_S-em-OtI,2349 +torch/include/torch/csrc/jit/passes/onnx/pattern_conversion/pattern_encapsulation.h,sha256=5NhWadoRDuNm59FWVQ_E1vTuD5XUJ9aLvg_7offUD58,1616 +torch/include/torch/csrc/jit/passes/onnx/peephole.h,sha256=CE7EBRjxIdulDb9RKZKCZzDY8_i6ahhbP4Ly1tpep1E,467 +torch/include/torch/csrc/jit/passes/onnx/prepare_division_for_onnx.h,sha256=BMLs0MXEEuJAzJbrSF7RsC0nUBDYEdb1y59QJzDk9gk,705 +torch/include/torch/csrc/jit/passes/onnx/preprocess_for_onnx.h,sha256=YippKvsxqhHWv_oqgC2ZW-RnI-jROrOlQ6V93sCAZOg,409 +torch/include/torch/csrc/jit/passes/onnx/remove_inplace_ops_for_onnx.h,sha256=-hSGx58ku7bXvK-mb020ASWIUnCX2q3W-82DP8zgaPI,455 +torch/include/torch/csrc/jit/passes/onnx/scalar_type_analysis.h,sha256=74SMht0iHAbNST6nalhUdYH4g3maNy3l7HFSQQvGwcQ,534 +torch/include/torch/csrc/jit/passes/onnx/shape_type_inference.h,sha256=SlGyecscNEDgdxVBblR94i56eM2W-I5nHs3FKVXSPB0,4209 +torch/include/torch/csrc/jit/passes/onnx/unpack_quantized_weights.h,sha256=DkcIIjXB_6VqcDWmss6830dM5ICTHG3pgQhqQMOfVuo,681 +torch/include/torch/csrc/jit/passes/pass_manager.h,sha256=LvOMTVmjxz-XJqZKWj9p6k0UwMlRTualwlZQ9Kar8Hs,4803 +torch/include/torch/csrc/jit/passes/peephole.h,sha256=Mo7rrtoHcaYiQXLtAuzLTrq6havHuGUk6S8EI7TwjWc,736 +torch/include/torch/csrc/jit/passes/peephole_alias_sensitive.h,sha256=Sf5RJwOqKFe4iciAVLkp1FrJpjShsvbjVHL5By-XDQs,664 +torch/include/torch/csrc/jit/passes/peephole_dict_idioms.h,sha256=V1wOXOIN92YLg3pFp1SYwO3zuCxe_c7Iwq9coIatUZU,1229 +torch/include/torch/csrc/jit/passes/peephole_list_idioms.h,sha256=y6BBOysIaiX9LXvuefeadCFj2p0s4sko4-GsQYPnxnI,2232 +torch/include/torch/csrc/jit/passes/peephole_non_tensor.h,sha256=skm22Pz51el-KVG0k2jh9gR8wlDOKfcR5NDQPmsHaRE,571 +torch/include/torch/csrc/jit/passes/prepack_folding.h,sha256=kX30fJNLOVaYaUVY2f1iQk8VySYqlOXv3gi6m5vQy8k,587 +torch/include/torch/csrc/jit/passes/quantization/dedup_module_uses.h,sha256=cLkTsvEGzKSDL1wyuvvvBBagD7DnVXlXTcwj3pTF-NE,1055 +torch/include/torch/csrc/jit/passes/quantization/finalize.h,sha256=-QWRnlHJuRD-VOMy4dhOXHl76pcvNMJHfG3HaKWWSI4,2550 +torch/include/torch/csrc/jit/passes/quantization/fusion_passes.h,sha256=7MHhqzRUYn7PztFKJ-wXW57JLKNQHmiJ6M06Ybi0VAY,420 +torch/include/torch/csrc/jit/passes/quantization/helper.h,sha256=MMFMaD1PNwvUSsdkkfdf2eK8XKpYuFfzysXyiEp33U0,7713 +torch/include/torch/csrc/jit/passes/quantization/insert_observers.h,sha256=jYIDv3dOcYnAK6_36Ynm3aYJm8QGLNKT0FSv8nYGSP0,2580 +torch/include/torch/csrc/jit/passes/quantization/insert_quant_dequant.h,sha256=sv9uH-qDkwIiS6PfV9KyTuw7SN_xZo40mAGHL7-TXME,1679 +torch/include/torch/csrc/jit/passes/quantization/quantization_patterns.h,sha256=qEZPI2jlOnTnl6wf-wxjG11-_RZm_UvPPU687m4oze0,53615 +torch/include/torch/csrc/jit/passes/quantization/quantization_type.h,sha256=1MjTQ7coNAARQy0W3o_hvfMv-3Wl5VhThENqY99fiBc,587 +torch/include/torch/csrc/jit/passes/quantization/register_packed_params.h,sha256=qPhixrMBoFVCr8GWDqs-v4jIiDDai3ytqbv23aMeDWI,743 +torch/include/torch/csrc/jit/passes/refine_tuple_types.h,sha256=97LywtAOszRtA9MQscOX8gLmB2pZzXQZfEz9C4wtaUg,496 +torch/include/torch/csrc/jit/passes/remove_dropout.h,sha256=ANNXHbSIIcRmZpBcoC0ZlsPAsGgJoobsWCGrLK-gMKI,509 +torch/include/torch/csrc/jit/passes/remove_exceptions.h,sha256=BSf7-h68dGHJ4OCbxFH5G53zLAnqgcQDCnwjb0kvnbM,1183 +torch/include/torch/csrc/jit/passes/remove_expands.h,sha256=_wMfo-Lk2Kkru2UWb7wxY5SjZd9ch-_DVvaTdVXoAjY,397 +torch/include/torch/csrc/jit/passes/remove_inplace_ops.h,sha256=ZeX2AINr3DaNyLJT4mGcwIhT2nwwNi-TjFpVD5_tMSQ,525 +torch/include/torch/csrc/jit/passes/remove_mutation.h,sha256=v_hHpZwvYKxAo3S7AcIURHmz-lI3Zv5YXMnuTM-8wFo,2891 +torch/include/torch/csrc/jit/passes/remove_redundant_profiles.h,sha256=zcRHNfhQ46hRnX5G1vNJJGdNf5ln9O2zFZDmf1REyFM,491 +torch/include/torch/csrc/jit/passes/replacement_of_old_operators.h,sha256=Vt8IwExtBSQL8GgsGUMuAonB3K7ZjfkBzRCHUQOv5L4,688 +torch/include/torch/csrc/jit/passes/requires_grad_analysis.h,sha256=NS7EqB2A-1reB4lsvoL4Yp-sxnWfQFNyr7SIaHzhmyU,475 +torch/include/torch/csrc/jit/passes/restore_mutation.h,sha256=eOvMa99BGqwPfZPgiS0QOq5U0BQJAcNHygQHZzcm2BA,2055 +torch/include/torch/csrc/jit/passes/shape_analysis.h,sha256=lmNddX5YF6phTtpKEEj2EuaShFHmG4THQyB7Td0qHbI,1331 +torch/include/torch/csrc/jit/passes/specialize_autogradzero.h,sha256=21kPaHTi-xVHnofwW5P0sK73y-1XsKnl8lMT0SsSy64,885 +torch/include/torch/csrc/jit/passes/subgraph_rewrite.h,sha256=f9-7N1cQEa946MWCds4qMzywlo7nc-BkVNvSatwmwzs,4341 +torch/include/torch/csrc/jit/passes/symbolic_shape_analysis.h,sha256=TOMd0js5rYIWV05AFpf-PJq9OYXUoaFBOl707VvPZvk,2332 +torch/include/torch/csrc/jit/passes/symbolic_shape_cache.h,sha256=sXd7qzIrY6LAcp9iudjXKO23O9J4iS2hMVpQw3QS47I,1828 +torch/include/torch/csrc/jit/passes/symbolic_shape_runtime_fusion.h,sha256=DLMEVq55DQ3b0DYl-XywA0aS1Av7IQdAHC5LubhTa00,2593 +torch/include/torch/csrc/jit/passes/tensorexpr_fuser.h,sha256=BZSULniWR5TvBLOyiryThuYXdissuTKArdcJ66z0VZ0,2953 +torch/include/torch/csrc/jit/passes/update_differentiable_graph_requires_grad.h,sha256=hwcyT7I6dlZWCmLqedbalUm73IvOfAKMhXlZwUZdWcM,969 +torch/include/torch/csrc/jit/passes/utils/check_alias_annotation.h,sha256=hBYq1dwM4MiGPCY1e89K2uxovD2u01KNkHu-c4A4-4s,841 +torch/include/torch/csrc/jit/passes/utils/memory_dag.h,sha256=PgqnB_pKQxz3le9erTTycryFQ9q1YQTz4eri-0wna5o,6645 +torch/include/torch/csrc/jit/passes/utils/op_registry.h,sha256=2egFx0dFliiCY71fhR1HkJKYJrZEA0v4t-0tAITc65w,1262 +torch/include/torch/csrc/jit/passes/utils/optimization_utils.h,sha256=AiONhxLLO2m3l_G7mcAX1xZigva1RrBJHvUoa78ITNw,473 +torch/include/torch/csrc/jit/passes/utils/subgraph_utils.h,sha256=NTZJ2TZ3LpMsje665S60ulrvfG54IKWMn4PHR0x9Rtw,2614 +torch/include/torch/csrc/jit/passes/value_refinement_utils.h,sha256=nDJhO_jc3-arA7JW5WdnWn-s5EKgx4sMEAxsRGXQSlQ,2861 +torch/include/torch/csrc/jit/passes/variadic_ops.h,sha256=gB8X2YrJJvpMxajBSMk36y4Wb-qGMed2vKIKiDBpzE8,1139 +torch/include/torch/csrc/jit/passes/vulkan_rewrite.h,sha256=2am84jm42Je81wqkg8oNJVsSLY39hhxK7nygP7eCLiI,927 +torch/include/torch/csrc/jit/passes/xnnpack_rewrite.h,sha256=yl8n6WNwyx2L4_aH4hUE1UQrbAWO23sZ3qVB_oZLwB4,1049 +torch/include/torch/csrc/jit/python/init.h,sha256=vNYIEI_xN8J5Mt06W0zqxyNmpg9sVxwgpW4zkp037QI,397 +torch/include/torch/csrc/jit/python/module_python.h,sha256=igT4tAZwKBYHmEtHSUyXp8SM_cpiCsWBbJ2y-u5xO_I,2127 +torch/include/torch/csrc/jit/python/opaque_obj.h,sha256=kZy2BWyyma9BVgtF4Owx_mJ0Aj3CPLn-5eh12pf0CE4,3135 +torch/include/torch/csrc/jit/python/pybind.h,sha256=oRXJuaMzSL5txY51K_YchGAQ5AKXuFO6v0JL3EQ3o1c,8207 +torch/include/torch/csrc/jit/python/pybind_utils.h,sha256=NVpFPyEIY-XdsOROqvAz0JwDmfIUmsxem8_rGHrF1AY,45754 +torch/include/torch/csrc/jit/python/python_arg_flatten.h,sha256=T_5P6SeD4L0HwgiF1EgBaOJTns53ObnKlrWo8uuSwic,3781 +torch/include/torch/csrc/jit/python/python_custom_class.h,sha256=ld9_AGKC_-TTIhJ8Arb18NskKGvOhmKM5Mk4hb9gqRw,666 +torch/include/torch/csrc/jit/python/python_dict.h,sha256=wnSiklovZ7ltUylHMtu0XTnxSGZeDvQbUYUgP5H86TA,3637 +torch/include/torch/csrc/jit/python/python_ir.h,sha256=WvU_pTbdoTY5yQQ9wJIv6f4ixvr2pfKZ8bAYW7M9Vws,1947 +torch/include/torch/csrc/jit/python/python_ivalue.h,sha256=RoKOjA5RuPZwble4J_LxmG3vg8Epbd6rSDCnia1nEkg,3936 +torch/include/torch/csrc/jit/python/python_list.h,sha256=bR11jlcisx1BfNLiUy_sZt4EChGw3Yzymm6PvdRe7Bw,5748 +torch/include/torch/csrc/jit/python/python_sugared_value.h,sha256=OWOjMwm4H3Mb9lr1hRca7uvAAIIy2jR3TUvfli7-wfk,11590 +torch/include/torch/csrc/jit/python/python_tracer.h,sha256=4T989L04dccgGxgHBXghLodx48imnb7nUfBxO4GiieU,1472 +torch/include/torch/csrc/jit/python/python_tree_views.h,sha256=RPY1Ogr9vgVgg_hAE3ISyF_xYAWp9If4kdwmcaE9TuE,404 +torch/include/torch/csrc/jit/python/script_init.h,sha256=XgA-WXGN1XrJwXmirEGVqc5UtY_KWNb4fUQX-Thfj2E,406 +torch/include/torch/csrc/jit/python/update_graph_executor_opt.h,sha256=xdKRIbEiJewN_qDogGpAFIuyhaoeX-X0n2_4nB6bAwg,439 +torch/include/torch/csrc/jit/python/utf8_decoding_ignore.h,sha256=B6blNz_2z3iECmAe7j7YLkDvvI8C1qS_3XOQE_Xqz14,433 +torch/include/torch/csrc/jit/resource_guard.h,sha256=SlgztVvYnO7gH67Es8lAgD36-otV1Z4Bwha1Lbf3yfQ,694 +torch/include/torch/csrc/jit/runtime/argument_spec.h,sha256=XkPJ-5z9YywuEFg0udCxpxlyZH6563HzzfFz2MbPwbs,16595 +torch/include/torch/csrc/jit/runtime/autodiff.h,sha256=gk9xNh2dJ_7kotDK_PPTRN7X7GfS1U5o45FqkUpuUYw,4184 +torch/include/torch/csrc/jit/runtime/calculate_necessary_args.h,sha256=VHcSKHiUe_SXS2K7hyc0uG-4OgZQFjZcnzKEgmUz3LU,2535 +torch/include/torch/csrc/jit/runtime/custom_operator.h,sha256=h1APxS6uYOLL9pKJ-xoAcoRb8m0gwaD2lD2S4OOBodc,1308 +torch/include/torch/csrc/jit/runtime/decomposition_registry.h,sha256=rqzNfixCRRvSIACDilIpQSyJ2bcFI0DMJ34B1F92LkQ,1299 +torch/include/torch/csrc/jit/runtime/decomposition_registry_util.h,sha256=x-tYdDgODVbKlfH9CdiePOmbQokrbO3ceTS2Bb_aAtQ,515 +torch/include/torch/csrc/jit/runtime/exception_message.h,sha256=BslHUofsN8BPUqzFUOSbCR4K_vn-6jpuoqMVGyILQhw,868 +torch/include/torch/csrc/jit/runtime/graph_executor.h,sha256=4kxD3v5CGlYHT0aj3P5B-pdrI1OQQyZQEz3j4PGkAGc,4913 +torch/include/torch/csrc/jit/runtime/graph_executor_impl.h,sha256=1zH-nvCo2QteqvanQ3eZ7mjrgG-wVhlLAa7wNXXmJec,4281 +torch/include/torch/csrc/jit/runtime/graph_iterator.h,sha256=jCz577Ln9PoIwzyx0FEzkHmdqav5fqYC9nJ-_nUNPGE,5192 +torch/include/torch/csrc/jit/runtime/instruction.h,sha256=awntSN3u-lCufAlR8euNijbXe7Jfy0znAVnStGdDoPc,5812 +torch/include/torch/csrc/jit/runtime/interpreter.h,sha256=Ae4OGN2Iy6Y2UDGsYHqn6qu2gaLr-K5nbeGU7kHXqtM,5245 +torch/include/torch/csrc/jit/runtime/interpreter/can_emit_inline.h,sha256=y9NZJmjJOWpkZq_E_dI1c2TixH-NoSmaWqzjqmPenuc,4208 +torch/include/torch/csrc/jit/runtime/interpreter/code_impl.h,sha256=SuENU6qmE-6Cq5_9QNudU-pMAXkgRAhdXFSZgK2SDyY,33553 +torch/include/torch/csrc/jit/runtime/interpreter/frame.h,sha256=VeercdUuV2EqaQPgEg_4bANdttPbyxOWtq0cHVlxl-I,1364 +torch/include/torch/csrc/jit/runtime/interpreter/preprocess_graph.h,sha256=nTwhXzmPZROEwL6x3Xa7DSHHelnHkxbUnRZjjQmwIek,655 +torch/include/torch/csrc/jit/runtime/jit_exception.h,sha256=Zc8QecTVAQX8NJmO5jyOlbhiMI85f6cHAPrnrsj-QJc,1423 +torch/include/torch/csrc/jit/runtime/jit_trace.h,sha256=QOfLSGozBn6GWvSU8lZP2ei3H341v5_c56RaQKHo-Do,461 +torch/include/torch/csrc/jit/runtime/logging.h,sha256=dw5NkNpPi_XUNYg7PZ7Y7iBC5ziQull3pL8OsMiU80o,2868 +torch/include/torch/csrc/jit/runtime/operator.h,sha256=GuDfqdJ4QpIcWGQnFn_qO0-P4rGIIl1s9t97AR2fFNA,11872 +torch/include/torch/csrc/jit/runtime/operator_options.h,sha256=aKyUKJcXMUY2coB-r6w7Gn5MqM6Oi_gagAUreCBz3fs,418 +torch/include/torch/csrc/jit/runtime/print_handler.h,sha256=Y8I3uAqbeTiRz0PGKPPuddwV3K-x5TsFUaiHsQx3Tx4,562 +torch/include/torch/csrc/jit/runtime/profiling_graph_executor_impl.h,sha256=rp1X0yzpyQuPrVYeezL4a3m14C9-JOwkamiqeyC1vYI,3212 +torch/include/torch/csrc/jit/runtime/profiling_record.h,sha256=Pl8FRDdC3xcnXC0QY_YqxKsXMYAcR0twk3_bDjgNQF8,8811 +torch/include/torch/csrc/jit/runtime/register_ops_utils.h,sha256=q6U1f5ag2mbImjCdDX89RTtn039ONUbsWDhgZcnpUV8,42878 +torch/include/torch/csrc/jit/runtime/script_profile.h,sha256=N1X3tzFIej3-eVHceltWERDxdGVPZVSCLILcwva1q3I,2890 +torch/include/torch/csrc/jit/runtime/serialized_shape_function_registry.h,sha256=mcuHossgV1v7dKRzyGnfhZFyhXsTzDnaWN6Y9HT9Mjs,610 +torch/include/torch/csrc/jit/runtime/shape_function_registry.h,sha256=uoL-f3SUaAQuiukKBOihRcRjbGI4RW7UYHcnDV3cN6o,497 +torch/include/torch/csrc/jit/runtime/simple_graph_executor_impl.h,sha256=XpJfxZfwtfkmS_8y4NDtCr0C6ZOo1vNw3OFaxBHPn90,897 +torch/include/torch/csrc/jit/runtime/slice_indices_adjust.h,sha256=n3jrzM_G9_3ccL-w6g17Klgv7m7OZx8Nt4ueF-AYh6s,1036 +torch/include/torch/csrc/jit/runtime/static/ProcessedNodeInputs.h,sha256=0VsG_EWU4RlKMytyPWszfKkN9r1tsUguema93szWs20,6657 +torch/include/torch/csrc/jit/runtime/static/fusion.h,sha256=tbkTq6d876UIXZJUIwG1E9y0Y9G51l38RPRvcDOehC8,561 +torch/include/torch/csrc/jit/runtime/static/impl.h,sha256=m_mI33uKD-_Lbs6R7Tf-aQoiHJjr5Yac82zKm5fNkS4,36183 +torch/include/torch/csrc/jit/runtime/static/init.h,sha256=aNaEAVBJYoov2lPcnGzHAgfMYph6jxyAOUfRrxrQK-c,403 +torch/include/torch/csrc/jit/runtime/static/memory_planner.h,sha256=68PBeEEqvSHnLwaSxaEkc5CP2gqxVYdLxIS48iX-rpg,10165 +torch/include/torch/csrc/jit/runtime/static/ops.h,sha256=5I8G87YwBcJ--zBW4vWSqV4BCYa_k_U7w7GRbvduQeU,5824 +torch/include/torch/csrc/jit/runtime/static/passes.h,sha256=Wu3GXnn1CiiP90I5bgtelZQYEn3jFL6arF5X6PsE1MM,3938 +torch/include/torch/csrc/jit/runtime/static/processed_node_wrapper.h,sha256=My4mV4TP1f4HOTVOPj3RQZoKXFIX2haaHuuXnH7Wo9A,6849 +torch/include/torch/csrc/jit/runtime/static/static_method.h,sha256=I9CqnYsJgIzLyVJz-US2O8M0_O6F6J8DgzBOkihoTKY,1578 +torch/include/torch/csrc/jit/runtime/static/te_wrapper.h,sha256=MKHuU07WRx2w7L6AbXVEe9k9PVAUvgmHwZXz_kp4x4s,1399 +torch/include/torch/csrc/jit/runtime/symbolic_script.h,sha256=g3o1hzSledXLC_qGXaW00L5ceN_5f9GkUcsHVj0oh7A,816 +torch/include/torch/csrc/jit/runtime/symbolic_shape_registry.h,sha256=OhMa9p-mfJyzj-iQGgK97aIowSuoWM1_aFwYp5JN76c,3056 +torch/include/torch/csrc/jit/runtime/symbolic_shape_registry_util.h,sha256=x2o-VKti7VMmmQqOIINueRcjcddhyRBLSAhZyYTkFGQ,605 +torch/include/torch/csrc/jit/runtime/vararg_functions.h,sha256=4C3J9b3VP4jaUBAGH3ZF9CRc2WRAfPP0JdhMOiAiUWs,1401 +torch/include/torch/csrc/jit/runtime/variable_tensor_list.h,sha256=fEV6nglRgQkc_2-Gag2kf9lwJ_z4FV2Q5M7xOjUZs-w,781 +torch/include/torch/csrc/jit/serialization/callstack_debug_info_serialization.h,sha256=QcsfMxPT_pqRc7EASChDRGo24Qs4FWRoXsHqcdDdBSw,2858 +torch/include/torch/csrc/jit/serialization/export.h,sha256=X6mqoZw41PetqOCOxaeZyaKcsLcJ8qYnx7T2bOFaaM4,11743 +torch/include/torch/csrc/jit/serialization/export_bytecode.h,sha256=K5fnIyMk2cOEvawaXbJyMwhwPkzwAnCjswZdjiK9Sgo,1622 +torch/include/torch/csrc/jit/serialization/flatbuffer_serializer.h,sha256=zVHXB_S7tz5eQ9_ams7Zs_rfLWZsP_2dSMBNC1ttAKY,3297 +torch/include/torch/csrc/jit/serialization/flatbuffer_serializer_jit.h,sha256=n-sfcJ-3xmrwI5jpCFXoQvSaFEV-gp8tVB_yphdoAXc,426 +torch/include/torch/csrc/jit/serialization/import.h,sha256=CBVFVUcoTm_zaWm7uoqeCR_Zd0Mt-9ViWQ2RZYF-B88,5085 +torch/include/torch/csrc/jit/serialization/import_export_constants.h,sha256=4oXjn6hyyJNAWk5su46kkyjStM189G05kktdT7N43g0,899 +torch/include/torch/csrc/jit/serialization/import_export_functions.h,sha256=LwcXblZza7xkyq0Rka34tHdsd_mTGmyT4tJpoEIsavs,643 +torch/include/torch/csrc/jit/serialization/import_export_helpers.h,sha256=4eXPN8wLr2YGcnCxglW8a3uQP4JarUu6znXfw2Jutt4,905 +torch/include/torch/csrc/jit/serialization/import_read.h,sha256=A5y-7aXZN_AsR_Xs5TeAUFDzu3DKU6pGwuPiv9nCKKo,1086 +torch/include/torch/csrc/jit/serialization/import_source.h,sha256=CsfRD-msOa4zp7bsm3GFRueWXoNKllKtqBnc12E_kQ4,3678 +torch/include/torch/csrc/jit/serialization/mobile_bytecode_generated.h,sha256=ca1Xmcpjrw0eI1Wo5PDQjyLDaU2Bj4CStJf9sxavbxw,98864 +torch/include/torch/csrc/jit/serialization/onnx.h,sha256=qJhopSKUjvWlH2obLaaYCTMrW9W2qnZJVAjN3PNLEQ4,767 +torch/include/torch/csrc/jit/serialization/pickle.h,sha256=pgfxjFeY2B8EbGlNOh1jGnlAN27A9C8yCCpp9RN3AdA,4944 +torch/include/torch/csrc/jit/serialization/pickler.h,sha256=irAEuSyKkGnm_noEteCownc4zn_IhkGUOf2Cr8M3JKY,6589 +torch/include/torch/csrc/jit/serialization/pickler_helper.h,sha256=JP45K7oJ56Carbn1DE4qVTiZpdU4Xp_kbzXgarec2_M,7204 +torch/include/torch/csrc/jit/serialization/python_print.h,sha256=N-gq3PVba8pfhIElWd3BStwWTrR0VpgfM_fOyYZhY6U,1563 +torch/include/torch/csrc/jit/serialization/source_range_serialization.h,sha256=7g9X73noS0b5SL75D4qkmSh9Y5b4eFSaII8TEps4a88,1920 +torch/include/torch/csrc/jit/serialization/source_range_serialization_impl.h,sha256=N3-0_YKngFCYPWVg-vLqjo4NIoJZIHDwubKSEIpWFt8,934 +torch/include/torch/csrc/jit/serialization/storage_context.h,sha256=ndqEnG2nx8IYCScZEGgfSfnK98O8LmTkFsi6nqzGpy8,2741 +torch/include/torch/csrc/jit/serialization/type_name_uniquer.h,sha256=WeGv4RvmdKHQWZkT8cxnS0LXKLkYMVTsfLiGVFFFkfs,1008 +torch/include/torch/csrc/jit/serialization/unpickler.h,sha256=wF1HWI6CT-NqrxfAgrdJBpyBkxIfgGD8p1TLxYhaygA,7938 +torch/include/torch/csrc/jit/tensorexpr/analysis.h,sha256=2ujRn9DusgJSx48wfTBcafF_OmRqI2ZUhSWEON_QUo8,9236 +torch/include/torch/csrc/jit/tensorexpr/block_codegen.h,sha256=rWfhdJdSRI5_Yci_08AdMpAo9DxYL_IGeIxcTFB1qEI,4544 +torch/include/torch/csrc/jit/tensorexpr/bounds_inference.h,sha256=X7rqLiu36NbZ8xyWLHI51dPOxAF0FEB2ZngozgS6FBo,2424 +torch/include/torch/csrc/jit/tensorexpr/bounds_overlap.h,sha256=hRRgaDYY0YQjP09GU4iKkkxcMurzQAUF0u-hD4M4WBg,4725 +torch/include/torch/csrc/jit/tensorexpr/codegen.h,sha256=pVCNtliRXfjAxxPeGkz2xNQIf2uGxVa2XwktxJkAQXI,7690 +torch/include/torch/csrc/jit/tensorexpr/cpp_codegen.h,sha256=PyyUp0kHrvWFcj189YCPWbPgCAOR-q0irm0TEXyUemA,2703 +torch/include/torch/csrc/jit/tensorexpr/cpp_intrinsics.h,sha256=f2nVKYuxGRr0dRpmYBC2s2HouEh_UrCkirRB084kxgI,887 +torch/include/torch/csrc/jit/tensorexpr/cuda_codegen.h,sha256=1tNyoT2slJt8I0eUCv3hvk2vWHCvkgFoIFuC6cpe8l0,8488 +torch/include/torch/csrc/jit/tensorexpr/cuda_random.h,sha256=xNgNZ6ulyIg_RXjBcuLSywKlfFPlfLbYooFQ7o7Igqg,2846 +torch/include/torch/csrc/jit/tensorexpr/eval.h,sha256=di5-_tg9Wxz_zZO1_TfSzETK-BjVWIhrjjHU1AqB0Ps,10097 +torch/include/torch/csrc/jit/tensorexpr/exceptions.h,sha256=h4tscEytrsVBp0FeDu7dQ1a70SyqvhE2zK52gBNLE-c,3475 +torch/include/torch/csrc/jit/tensorexpr/expr.h,sha256=kwHPQLgNNggfMmRuhW-nG_Kx70oBKGCKLvp-pCwyUTU,14435 +torch/include/torch/csrc/jit/tensorexpr/external_functions.h,sha256=TbX1FLAD27y78pp0ibNQbkAtkrRedl819pSEnsCrkkM,3687 +torch/include/torch/csrc/jit/tensorexpr/external_functions_core.h,sha256=-XniYhj7ULLZaIJXLxOmVi5R8M6QoPsppkZ792Xe-rU,707 +torch/include/torch/csrc/jit/tensorexpr/external_functions_registry.h,sha256=pFmM_5RCB22qFInr1mwWoX6hT4vyDDiOMNflfcxlJLE,2560 +torch/include/torch/csrc/jit/tensorexpr/fwd_decls.h,sha256=QoA0Vbh_h-33YrgqSpyn0XvheH9Ubfmy1SQZOkqRrKo,3244 +torch/include/torch/csrc/jit/tensorexpr/graph_opt.h,sha256=nztWGJXqgy2d55nJrA_O1rHuw_32tfUVTDHuQAD_t_Y,4688 +torch/include/torch/csrc/jit/tensorexpr/half_support.h,sha256=9Y-LYGyA0Xqs3NNqzhw4Id-6x2eds0c3AzxgCJ042eY,6143 +torch/include/torch/csrc/jit/tensorexpr/hash_provider.h,sha256=o-wcxe63HmX-SdK7pkVSNsfXRanmBhavuJRUwvjRvq8,7787 +torch/include/torch/csrc/jit/tensorexpr/intrinsic_symbols.h,sha256=qc_HAjNnjTPricyApZe-ah89dmIydG-_IohjaC3QOKc,674 +torch/include/torch/csrc/jit/tensorexpr/ir.h,sha256=5AXa-hM0bsST1tTzs4WhBAB-BjJTGgE-6cX8kza-IgQ,23233 +torch/include/torch/csrc/jit/tensorexpr/ir_cloner.h,sha256=88KpZ7EwH5QwR694Lo5gWCj_T8aFTEGXeckCtLbxa9w,2597 +torch/include/torch/csrc/jit/tensorexpr/ir_mutator.h,sha256=xIIYd3jGDJwGQNYNJNGY4zTxONONq1WKhrE4AZ2bzJM,2623 +torch/include/torch/csrc/jit/tensorexpr/ir_printer.h,sha256=i9QX1RBE-T_EsYICKb9FmzdRLhVbPwcC21bbV3110HI,4515 +torch/include/torch/csrc/jit/tensorexpr/ir_simplifier.h,sha256=bfo3nS5BWEJIm5P0d1GWxuLFnpUUSjx2Z0tY-YmGscM,15511 +torch/include/torch/csrc/jit/tensorexpr/ir_verifier.h,sha256=3BIXofQLDRbC4f4oXyxtB8hPZmr58EN6TY6bye-3qaI,1567 +torch/include/torch/csrc/jit/tensorexpr/ir_visitor.h,sha256=yGeW-NEbk9Sr3JWyN-BpTqxWAIIkHFeXVJiA3FwYGoM,2441 +torch/include/torch/csrc/jit/tensorexpr/kernel.h,sha256=9WGYY5qqKt2evd4NCe8sK0fEXFjB-5cQgQUkE9QSV_k,13646 +torch/include/torch/csrc/jit/tensorexpr/llvm_codegen.h,sha256=iNG4AcV8blDZASUGlAHJfsKNp8NwPj_STQD6XhXuJ7E,4093 +torch/include/torch/csrc/jit/tensorexpr/llvm_jit.h,sha256=ti8Y7XRaZTbRofvOim-pe8htkhIK7WiApV5MpaOow2c,2274 +torch/include/torch/csrc/jit/tensorexpr/loopnest.h,sha256=K_rimui2rklVgDOUNCgJeQB_HwobFaabBd-sDAtwc44,22032 +torch/include/torch/csrc/jit/tensorexpr/loopnest_randomization.h,sha256=QYpdnfuqv9YlA0shpYVSoSC3ZdbBEU1k334eMSpl7X4,563 +torch/include/torch/csrc/jit/tensorexpr/lowerings.h,sha256=uLQ7cEVTUanhRoUj70V77d63qmEtEQ9NxOqnYmYAK-c,1534 +torch/include/torch/csrc/jit/tensorexpr/mem_dependency_checker.h,sha256=uZGsYXWIela0_0tBuKxr5Nj6fgEoJdouzDv4--ofZ-Y,13716 +torch/include/torch/csrc/jit/tensorexpr/operators/conv2d.h,sha256=NKC3IMS43R68jwounzCjcpK5kMXbyi_zHXJ_TEeYutI,3147 +torch/include/torch/csrc/jit/tensorexpr/operators/matmul.h,sha256=1_W_nubAKxRtQElE8cIbHUIMnYUpzGh0S-ubZDcUmpE,857 +torch/include/torch/csrc/jit/tensorexpr/operators/misc.h,sha256=Keqv3pTo-YL1k6Sk1uPn-WmQVKd9k5HOIv1yWKXtGfw,3542 +torch/include/torch/csrc/jit/tensorexpr/operators/norm.h,sha256=iP-nTSjXKVrcIJ0BhRfPi0Ureik5eHY4o-D6GIQST_Y,627 +torch/include/torch/csrc/jit/tensorexpr/operators/operators.h,sha256=_Ry3BgjJ7jD_7tip9TcAr456eHg-MBLFOI5SHIBh0vU,725 +torch/include/torch/csrc/jit/tensorexpr/operators/pointwise.h,sha256=8C9DJI3SpUov7VAGWsLgxd0QJFCvVan4zDiUBZVqkVo,3413 +torch/include/torch/csrc/jit/tensorexpr/operators/quantization.h,sha256=ELez7-v-cjZ4jo1uGghV51V34zyyNn9fNJhqnATQNrg,5543 +torch/include/torch/csrc/jit/tensorexpr/operators/reduction.h,sha256=o5Gm21oXdYuDycCYgzDJmTNYx1ORWT9FBj21QvWlDbc,1359 +torch/include/torch/csrc/jit/tensorexpr/operators/softmax.h,sha256=E5SPmORIGJGA7T-WsbQ17XGeOtEAP40S2RA6qXewEZ4,575 +torch/include/torch/csrc/jit/tensorexpr/reduction.h,sha256=IlW0-XCNfWWtBw3uIdtu79KxRpU6MvvF8Gu2Pv38UOI,9120 +torch/include/torch/csrc/jit/tensorexpr/registerizer.h,sha256=2p119qQdHGQP8HErMZfbA4la9YIuxsKyLGc2432tEvM,12773 +torch/include/torch/csrc/jit/tensorexpr/stmt.h,sha256=KX9ydeQE8JsiupZEwuNoTgJMTZCfuo02Ozif6Oc3Uq0,24074 +torch/include/torch/csrc/jit/tensorexpr/tensor.h,sha256=uzw4CIqoSprQabliELSqixZV38OH-1gNYWce6a58PMQ,10753 +torch/include/torch/csrc/jit/tensorexpr/tensorexpr_init.h,sha256=g29feo9fFx5y7g8-FTKgkyLz-067Vk1UgEbGJPhBIJ8,497 +torch/include/torch/csrc/jit/tensorexpr/types.h,sha256=avrlOuBF5XvP8gfas5K0H-Ef4wNyHa2U4WJcP-gGC60,4534 +torch/include/torch/csrc/jit/tensorexpr/unique_name_manager.h,sha256=SRV0LH8tZ03D2QOWlDf_UypE8KW8OY1taliuZ98eNA8,1079 +torch/include/torch/csrc/jit/tensorexpr/var_substitutor.h,sha256=kyXzHdMPDXrWW6qexm2NdLuZDoOckM047EG7gDpSAyk,1914 +torch/include/torch/csrc/jit/testing/catch_utils.hpp,sha256=9J4-d643UOXpEEozt3uj9IjBEOiYzO8hQl6MSrJvwWA,607 +torch/include/torch/csrc/jit/testing/file_check.h,sha256=kmx_9WCtQPYXNBEY16EtQa7hPG5_hdpQ9oUUQRDRcHQ,2797 +torch/include/torch/csrc/jit/testing/hooks_for_testing.h,sha256=qW-z-AW6Bh843JWoG1EaMaGtWnsCIBhSJ_s2BeZ6HOA,832 +torch/include/torch/csrc/lazy/backend/backend_data.h,sha256=KFer511g6xsjax-CTfHhesSd6iVyK-I9Lu0tm0OLfWA,1434 +torch/include/torch/csrc/lazy/backend/backend_device.h,sha256=uQtecjcbroPg3vlUk9Nc1HA5ZW7JerkeNCH4iNeM9PQ,3182 +torch/include/torch/csrc/lazy/backend/backend_interface.h,sha256=LDrHg3jqgn--27fk9LjLLPvFah-BC5CAJeNyGfpQ0i8,5057 +torch/include/torch/csrc/lazy/backend/lowering_context.h,sha256=ByjZ8kTR6xJQv3djqkb8-FVoTwU7KiaMhQod0sCxbnI,3492 +torch/include/torch/csrc/lazy/core/cache.h,sha256=NPX66NO6k1kTnOuxuoXhvqDKeSggJgYdX9ycmXZS_0s,3979 +torch/include/torch/csrc/lazy/core/config.h,sha256=NTCfI1DLjGKJ_CenoDuhGgOGFA1CNiRKQIPikR1UOTk,1165 +torch/include/torch/csrc/lazy/core/debug_util.h,sha256=WofYQtKMOilg_NYSJJGOVpp0-j620_Xow_uq4OKOHdg,1528 +torch/include/torch/csrc/lazy/core/dynamic_ir.h,sha256=r5M9Jz8i2QslpW347zzyDieFodJ2RKDqeouU9CLhr_o,1651 +torch/include/torch/csrc/lazy/core/hash.h,sha256=JqcW9fbKY4LHGuK2n-TKi3FXzIlOMW7hEftR_o5Lvzo,7853 +torch/include/torch/csrc/lazy/core/helpers.h,sha256=spbVctMT_ExB7IAJ_I41c8683CfcuSND9YfrQiHRogY,2477 +torch/include/torch/csrc/lazy/core/internal_ops/ltc_ops.h,sha256=u7eSsjmKarTO6HoXAQmGB6ovkv4heVKITcGW9z1CdB0,1704 +torch/include/torch/csrc/lazy/core/ir.h,sha256=Vea1kwHwjNaMxDFrgnEkHmAFkO5OqhvVXB1BtKeqH_A,8059 +torch/include/torch/csrc/lazy/core/ir_builder.h,sha256=LFFuUi2tQnknn1vAc3NCMbqYsZkeQ2nfNTgslIKwOEo,4963 +torch/include/torch/csrc/lazy/core/ir_dump_util.h,sha256=wTnx_SqhzRO0Iqj_l0XOZyi2VlG5pxl9c-4x7ZW8Gh8,918 +torch/include/torch/csrc/lazy/core/ir_metadata.h,sha256=4gKlybk5kMnedrHtuxn2VFPw_GA9froaCjFyz74eTmU,1577 +torch/include/torch/csrc/lazy/core/ir_util.h,sha256=N8jZgssPrh2RquBZ1MPnCn76GLaRwP7flOdYfoNbpNQ,1620 +torch/include/torch/csrc/lazy/core/lazy_graph_executor.h,sha256=vZ0LzZKUQDKZW9aHmDTnX2VG9CPcqVK6O-WwjW5gG18,15285 +torch/include/torch/csrc/lazy/core/metrics.h,sha256=wlwOLg_QznDs-jpVtpLZUXH1o3y8Hcp7DM1MGgqcb0M,8505 +torch/include/torch/csrc/lazy/core/multi_wait.h,sha256=g_DRC2nbclyo9wPg59GPkARRRkCblYJJNqIoVIxGYn0,2003 +torch/include/torch/csrc/lazy/core/ops/arithmetic_ir_ops.h,sha256=tm0XXxCP76MrNTvigLQ1ndJk6KuqoMSqcutoDtn2iMU,635 +torch/include/torch/csrc/lazy/core/ops/utils.h,sha256=GImlZp7FQGsmM8HqgcEIAvJaugEUSi1Ti4QrJd1X_R4,1239 +torch/include/torch/csrc/lazy/core/permutation_util.h,sha256=Q9MUTbUEkCcM9J5muU9oNYCgBRZmcC2bdldsBM-N5mY,1506 +torch/include/torch/csrc/lazy/core/shape.h,sha256=hkUJcwT7We7i78k6tn1IJYqxBs6ZbQOFu704igBeqQg,2269 +torch/include/torch/csrc/lazy/core/shape_inference.h,sha256=T4svTZ8aGNx-uMpB-YyO0JzP2brFqyAt-Zuo64zMOX8,15656 +torch/include/torch/csrc/lazy/core/tensor.h,sha256=cM7lEIXw4D6wbYk1GetFdqNqai4NIKJXOaz8ZYmSWrc,10134 +torch/include/torch/csrc/lazy/core/tensor_impl.h,sha256=dYQ-izxXl2wfr3OfEkUi-b_FKG-i-fhxuWuPp8CLkGY,2170 +torch/include/torch/csrc/lazy/core/tensor_util.h,sha256=PrHDUfoMAsIrCQMMM2EmwU13pZBR7kaupc0wdWS2upc,2790 +torch/include/torch/csrc/lazy/core/thread_pool.h,sha256=K_THTX12OXQHK-6-Hz9rKnkZOZ-LiGzgRf85XjTGm14,1046 +torch/include/torch/csrc/lazy/core/trie.h,sha256=BSxr1ajdACgUhkgPOat-UgRU54-HPj6YdWFoSvv8juw,2446 +torch/include/torch/csrc/lazy/core/unique.h,sha256=I9Bp4qmGEQL4iBw8gIVUFf6yTE25bmc4T_EOL6aP7eE,1427 +torch/include/torch/csrc/lazy/core/util.h,sha256=HpMCdADPJ5pddLtVHMxCFU1Wz3cRbK1rRzRR-unOjNw,3127 +torch/include/torch/csrc/lazy/generated/LazyIr.h,sha256=_sMPAn8432z8zxwyCin1a6Ry-eIAwz6xeaI1kbtSXZI,296076 +torch/include/torch/csrc/lazy/generated/LazyNativeFunctions.h,sha256=1-U98BOSCutmRtKFomtrqB18Aawfk-C5O4q_IYwVx6E,23104 +torch/include/torch/csrc/lazy/generated/LazyNonNativeIr.h,sha256=gGlt2iV9CIh2ZhzFATnhnRO7jwtPSTDxDw48Op5k4Gk,4197 +torch/include/torch/csrc/lazy/python/init.h,sha256=NZYCX2lL9lwbHUnsXw5YgWxETS4lqMJn5ZPCUuz1_nQ,478 +torch/include/torch/csrc/lazy/python/python_util.h,sha256=gWzcbBoLIC17LCUycSWsDWXr1ZnqzQjvFibyIfpaA_0,569 +torch/include/torch/csrc/lazy/ts_backend/config.h,sha256=JPAgsEYiOlNHlNWphPlOEQ77bRs_cvscW90lKvdXqKc,460 +torch/include/torch/csrc/lazy/ts_backend/dynamic_ir.h,sha256=cyUKC1y86Db3LhHl85BrRoQDvtcSZsPsywGw2Z0AhCE,2610 +torch/include/torch/csrc/lazy/ts_backend/ir_builder.h,sha256=R-54wutbGLkaVoEjX71KPDenJHRvCQdX_67CxuVOlaI,2645 +torch/include/torch/csrc/lazy/ts_backend/ops/device_data.h,sha256=llMQNQtVtsJNjTASKtIsTqHpOZXvkA6_WgZQo6c2FFA,1550 +torch/include/torch/csrc/lazy/ts_backend/ops/generic.h,sha256=YfpQxCCAq4_QoJEy886VfiMFn4LhD8tzd2FPdnZOWzs,1682 +torch/include/torch/csrc/lazy/ts_backend/ops/to_copy.h,sha256=QP6Bl2xw3qUxqY8wzdAm0bJJeprhXBX_SQpFBRGFz9c,4333 +torch/include/torch/csrc/lazy/ts_backend/tensor_aten_ops.h,sha256=zjZsB7ks-66zjdNXNjB1yzaaJfgbbLHcYZwGSFCIXuU,777 +torch/include/torch/csrc/lazy/ts_backend/ts_autograd_functions.h,sha256=PF6QsWXwmBJ8as2Bi1S4D6A-QwkNUVdsBEyTnCxsA0A,880 +torch/include/torch/csrc/lazy/ts_backend/ts_backend_impl.h,sha256=RmrFgmvb6YpwJ9OfalU3ykyLbB36Y-QH57WZUkixh68,1494 +torch/include/torch/csrc/lazy/ts_backend/ts_eager_fallback.h,sha256=zzuu9qy_l3DK__izeiDULKw8BXVHH6_3_VrwD9QZ7Nw,946 +torch/include/torch/csrc/lazy/ts_backend/ts_lowering_context.h,sha256=JLTgyK1_rv0JURMXdpkxypmoeJU9XS1t83_kOZcgEn8,4766 +torch/include/torch/csrc/lazy/ts_backend/ts_node.h,sha256=svuUBEC01SrGzKuSktuyePEGf5LHLij6dzDiSgo8HsE,3605 +torch/include/torch/csrc/lazy/ts_backend/ts_node_lowering.h,sha256=Ae0WcTTYggl-ltP4TJhF4CY_fWLsw6oiL5WW2DNhJWQ,720 +torch/include/torch/csrc/monitor/counters.h,sha256=1M8nPXP8kvJh07G84-8Er_Yxw4aCOx4s13hvkkGT0ME,8097 +torch/include/torch/csrc/monitor/events.h,sha256=gMjVvEPEKxzWiDz_836HQxHw780l01DOxKGZjDw0HXA,2936 +torch/include/torch/csrc/monitor/python_init.h,sha256=ffmFgZ0KuXD-55U1Cl5L5NILNxO1GmFy55Giy78OCKA,381 +torch/include/torch/csrc/mps/Module.h,sha256=Apu7gii0dgPwg9bKgKnTjByEbqlIGalnAcMe_xO8okc,427 +torch/include/torch/csrc/mtia/Module.h,sha256=YFWOdviupcuSSKOYYRkRc0WQvAzgTDm2jFgYg1fMg1M,432 +torch/include/torch/csrc/mtia/profiler/MTIAMemoryProfiler.h,sha256=u6o2GVJoyjszRJ-PtMxVhaqDIjYFPhyKGaxKPM7hUs4,801 +torch/include/torch/csrc/multiprocessing/init.h,sha256=MDM3byavkbVz0s27gK41WWSm2QXYY_D5CzdeQZum3-g,422 +torch/include/torch/csrc/onnx/back_compat.h,sha256=NdCcjbbsoMV9cfLR7VgZG8ZY6Xx3QW67FEPpfBX19VE,1278 +torch/include/torch/csrc/onnx/init.h,sha256=nofikk1oLIWEWuDOtCxajPECVUwk1wfwxT32f-xeuGY,400 +torch/include/torch/csrc/onnx/onnx.h,sha256=iB8JqbKgTU0LEsC-MyZ9CzQMm-vDTwObYrg2JDfyBcU,759 +torch/include/torch/csrc/profiler/api.h,sha256=xGirYXerLVr29MBGKasBpHlty_2R_ubR6PO3tKX1O1I,764 +torch/include/torch/csrc/profiler/collection.h,sha256=3hQ3fd_4dowBGvLDQSdIRMuUbpEI2AzFgEjkhNIJ9Ao,21594 +torch/include/torch/csrc/profiler/combined_traceback.h,sha256=HLbTLLaatpUhhfKtslyO_CkD0Gx5QYsb13CPIrxNA8Q,2711 +torch/include/torch/csrc/profiler/containers.h,sha256=WDZSvZ25EhAZxa6QLBLacg7GG6U3ar_tzJf9sBB7aHU,6248 +torch/include/torch/csrc/profiler/data_flow.h,sha256=q2ojqcszbAWhZip6MuCo2C29sArfBFA5niAMTLuH94A,3880 +torch/include/torch/csrc/profiler/events.h,sha256=QVTGHVeO3B_dz8xeUEEH1EUpK_QxGWFcc2f7-VmXsyk,1290 +torch/include/torch/csrc/profiler/kineto_client_interface.h,sha256=k6Da71DcfA4CuBppIXQHFWx_MzxBxa1DKkQJH8wXBAs,500 +torch/include/torch/csrc/profiler/kineto_shim.h,sha256=hrcsVu0GELjJpTiknirTu5AKN44jlU7G8oz55hz7ykw,4169 +torch/include/torch/csrc/profiler/orchestration/observer.h,sha256=FfMboy_CPDXZ1ASXbt57BTJT3iZAFITo-eheXou_9nE,7704 +torch/include/torch/csrc/profiler/orchestration/python_tracer.h,sha256=xtE70933sen95GAWc3N2hCTimRsoHukfVRmFBeAjmDw,2558 +torch/include/torch/csrc/profiler/orchestration/vulkan.h,sha256=JnVjekrFW8Syv2J0DIRh9esqtM6UrgjlSeIafZB3m5Q,1030 +torch/include/torch/csrc/profiler/perf-inl.h,sha256=P3W5T5ZGJO6H6kyGVG6jdJ6IZDz6KN7-j8YhZY_HMng,1658 +torch/include/torch/csrc/profiler/perf.h,sha256=dX35-crTvUn84O5tX42GJFFEyTjvsmLeC3tXHd-LW8I,2847 +torch/include/torch/csrc/profiler/python/combined_traceback.h,sha256=_a1nMBwi4_f_CXlvXoLDI_FrL4lWKhkmb2m6e46q8Qo,1246 +torch/include/torch/csrc/profiler/python/init.h,sha256=ZxXqiKbTO0_Ym1-doIZBz9UgqpeLrJR5U6hSfnnSa4s,1252 +torch/include/torch/csrc/profiler/python/pybind.h,sha256=6yCJymuZHstk5mhrEKwMtL9CHtFIc1yZ0-4U5DokRzs,1515 +torch/include/torch/csrc/profiler/standalone/execution_trace_observer.h,sha256=XEu_BQoKycd7zvUbK-8qo6MsoTZiDlGTyQB4QlS6ndw,882 +torch/include/torch/csrc/profiler/standalone/itt_observer.h,sha256=e1m64SgR2WYIjNv8SpkugKFihDL4L0PoYwnZaGPjXpg,478 +torch/include/torch/csrc/profiler/standalone/nvtx_observer.h,sha256=C6vGiw36g4tlZxw_gYFxGwzHkIPdp1FHKJdbCEICyoM,479 +torch/include/torch/csrc/profiler/standalone/privateuse1_observer.h,sha256=gJGJ72kpSq3KAZt0iexVY7IKSUUqSHMx-gPvqKr_43M,1699 +torch/include/torch/csrc/profiler/stubs/base.h,sha256=F7fUVssVS6_IjHPZb5thWw9vro26s8ykVwsazBds5hE,1939 +torch/include/torch/csrc/profiler/unwind/action.h,sha256=SFTO1_4SBz79t6J7iBH-0QRbgqEbhA5-gbOF5RDRH8U,1678 +torch/include/torch/csrc/profiler/unwind/communicate.h,sha256=9Hw2syApVGUsDyKQiAKXmzWwu9G2xsuIEJGpf-UTFzw,2506 +torch/include/torch/csrc/profiler/unwind/debug_info.h,sha256=_5sgKQQ3zaBPE5Qwo9-RtMmKgFXyd9SKvL9QvPWI6qU,9354 +torch/include/torch/csrc/profiler/unwind/dwarf_enums.h,sha256=G5scVf4DSqKqO4HFK99q1FG64M-oEAddzWZfRSPXQmY,1364 +torch/include/torch/csrc/profiler/unwind/dwarf_symbolize_enums.h,sha256=02cDTcepBwtkBB2xl6j5kRR3439c7zZv5KDsZs5Moi4,4912 +torch/include/torch/csrc/profiler/unwind/eh_frame_hdr.h,sha256=NGXHq0_cbbCQ5O9GNSexDktFO2IOiXCbIgPPaLl_NQw,2934 +torch/include/torch/csrc/profiler/unwind/fast_symbolizer.h,sha256=tBeWMSZVhAUxibcIYVB9iqwU1DV9pFI_qqCeO8ywAMM,3557 +torch/include/torch/csrc/profiler/unwind/fde.h,sha256=Dm8ZxCUASdn_sQi1FZYY71-vY9WmAR1SKOvZelPEJCg,12691 +torch/include/torch/csrc/profiler/unwind/lexer.h,sha256=qteUGXS78lP8Q6EJU2JanNwUSMqRnkUx7GZBs6Vfws4,4135 +torch/include/torch/csrc/profiler/unwind/line_number_program.h,sha256=93WN5uZJIAdg3zdESlMPDOALhphl8HZKUxvs-Vc2UKI,11079 +torch/include/torch/csrc/profiler/unwind/mem_file.h,sha256=1wXn3uYzPJ80v5-XOfmhAncaubiw_jjv-bt686idwpQ,4843 +torch/include/torch/csrc/profiler/unwind/range_table.h,sha256=2fRNVYzs6KNiFkvveN9awqa5oNIxwcxIi8s2F52-0BU,2363 +torch/include/torch/csrc/profiler/unwind/sections.h,sha256=i02YUf5QMuuzJgdfAifWcIOZl8P3Ip4S5SrnqkZKdug,3922 +torch/include/torch/csrc/profiler/unwind/unwind.h,sha256=xaMH9xCsVyhCHotSw6e73aqNRz8d-oCduQlP4vSGtFQ,1387 +torch/include/torch/csrc/profiler/unwind/unwind_error.h,sha256=6SFMi81YnkNMvPRi4_ar_4PMplmX2VJmAP0sVGJZSYI,1152 +torch/include/torch/csrc/profiler/unwind/unwinder.h,sha256=X3QBtUM9v3BUQ1uG3j9DE1Ttx6aJ67WcXqweeEv2x0w,2547 +torch/include/torch/csrc/profiler/util.h,sha256=ALGJ5oQDPWpGhrVi147sfKqFgg21nmH42WCXZD30D6A,7100 +torch/include/torch/csrc/python_dimname.h,sha256=myFoabBPfQqnBLUwqLepYasPlIhxdBrnHLf4HJxOSxM,468 +torch/include/torch/csrc/python_headers.h,sha256=W1ASyJDtRGr7YTipLtmOGZ6N2gzkNjM_8ju-vWUwi-w,903 +torch/include/torch/csrc/serialization.h,sha256=3_Zm2oq56ytJX1nTZXV1xGdum9BkuUusbG739Tty8wE,935 +torch/include/torch/csrc/shim_conversion_utils.h,sha256=WzsYcnAgrlZQ5lbDSZK7e3hTM4vAoVoQbIDPnYFlrQ4,926 +torch/include/torch/csrc/stable/accelerator.h,sha256=GfbDlA9Vh6HZuXF8lk1il8hzRL59FTJJw-UNb7HRcO0,2208 +torch/include/torch/csrc/stable/c/shim.h,sha256=dIAhaCmAKy44MD0bzICRDbWvz2qK_yZZl3mdNRNhuOI,5279 +torch/include/torch/csrc/stable/device.h,sha256=c127B_czfZfuAQikoKN5kuiOj3eK-zWs5aMJ09mz0-8,101 +torch/include/torch/csrc/stable/device_inl.h,sha256=9qoxIAI9UQb9TRi9JWDsWqcPZgH-nkuCD7r-BjC2BrI,1349 +torch/include/torch/csrc/stable/device_struct.h,sha256=ijvUyVI-1fYq8pCo5REh3jGVDxikMPAOT9fBDgFKAF0,3153 +torch/include/torch/csrc/stable/library.h,sha256=FhcWCpv8r58VsM1jbripl8et6uO9HaV8N25pERoWGNw,13014 +torch/include/torch/csrc/stable/macros.h,sha256=HE7Jpqv9KHGK9PMdXS0SZiRjlkAzc5DhYgDUAQq8d4c,1124 +torch/include/torch/csrc/stable/ops.h,sha256=WMycIvsnyrdk89u3tKiPfBQ_r0CEYC_btjRvfRJm0dw,29014 +torch/include/torch/csrc/stable/stableivalue_conversions.h,sha256=Om2tlrjIFfH7R8qjCxTDCBRkU0wrQJvm_jXuGTrztZc,33964 +torch/include/torch/csrc/stable/tensor.h,sha256=MIwb6Kq9H9Ry_wh9uij65SEUpw-JYddJ4UI9YFMvf6M,101 +torch/include/torch/csrc/stable/tensor_inl.h,sha256=-rQrA3yE53zdr0ZBoqQi_U6qk5ThQyRx-mUXbX8cbTg,2886 +torch/include/torch/csrc/stable/tensor_struct.h,sha256=2EvDfchpB4OOfstW-PyMpcB2SaaEnJdXfJZUgMDzs0o,8720 +torch/include/torch/csrc/stable/version.h,sha256=rPh_A_6O7eGaz5IgWNWZYB5f4AYI9EFvGkyE5tPAxcw,1039 +torch/include/torch/csrc/tensor/python_tensor.h,sha256=W51E9SLaphq9d3dR2CqRLTiOnNrh8q2-hWuFPK4UGDM,1454 +torch/include/torch/csrc/utils.h,sha256=MEEk2pvmH89d8q08Yr31hjOXp9A3xi9pLlHWuUoEDkE,4884 +torch/include/torch/csrc/utils/byte_order.h,sha256=BhoYR327QBjuW7_X6MfbdW2ZcV2bi5x4XOsNuHJGDuw,2508 +torch/include/torch/csrc/utils/cpp_stacktraces.h,sha256=rMp2epRbiAYUnwzeEFtDKUgh4qQtsJfNcJb97fVluDY,484 +torch/include/torch/csrc/utils/cuda_enabled.h,sha256=tHkNXPv0rKNUg_ld-gA61f_7jYZ7AgUf1SkayPhxVhI,424 +torch/include/torch/csrc/utils/device_lazy_init.h,sha256=Lq2sY2b3o9L6sOsLVW3UJ3MsZ-_2NxjRJw4AYLDWF1I,3068 +torch/include/torch/csrc/utils/disable_torch_function.h,sha256=ntEGSYFVYb73xt4ar8X9M03q7ErmDb_KjuEbmqL5zcI,2164 +torch/include/torch/csrc/utils/generated_serialization_types.h,sha256=qHD-tOSpvSfIG0VDwbuvijgLwA4FHBy7pxlE2G4nI4E,122589 +torch/include/torch/csrc/utils/init.h,sha256=yFogmRgeaTycae64CMu1uQsaqrZ28T0XiBmcHTRLcqc,447 +torch/include/torch/csrc/utils/invalid_arguments.h,sha256=OYo7VRpe44aNaGGvVJIL7xPSI3rBFkGUHtRGYQyEEX0,556 +torch/include/torch/csrc/utils/nested.h,sha256=eBsEENIGSfa5kjay2Xmc3AIgUDRRN4D9g5A5nKDsJ-o,560 +torch/include/torch/csrc/utils/numpy_stub.h,sha256=iSr881WC_2tdoB55OTK2oUk2yXL8OscXS5oL45TOY3A,653 +torch/include/torch/csrc/utils/object_ptr.h,sha256=SqtlMKOikYchibyiqOvsV8MNUDvsEiS_4_X5r7QM7Kg,2254 +torch/include/torch/csrc/utils/out_types.h,sha256=mwq_iEveRZqZR9NfUx-XdC4Kr-ltwSVXsi7i27v8RrE,574 +torch/include/torch/csrc/utils/pybind.h,sha256=xa8X7QCUioJ5WC0L87bw1-ADNlK0MH7l40ii1CLD7fA,13429 +torch/include/torch/csrc/utils/pycfunction_helpers.h,sha256=OaKMH7DhZUQeC6EjF-XjrOK4OW1vfZLP6BUzXQ41-EY,1061 +torch/include/torch/csrc/utils/pyobject_preservation.h,sha256=rUW1oCr5l4bbkZ199tXlkDktOVuiC6rooCkzjF58yOc,982 +torch/include/torch/csrc/utils/python_arg_parser.h,sha256=ldaUKI31Of2ar2_0MrsVcVaZAS46xqc_MtIXaFC1zJ4,43994 +torch/include/torch/csrc/utils/python_compat.h,sha256=Vr5VaAfrlhP9EJw5DDAa38PuiZAThz_SNOVB0TPe9w4,1222 +torch/include/torch/csrc/utils/python_dispatch.h,sha256=jqjX8Y8ebUUoXE6UZOybFRzMLM5VR94uZmu4fYty7Fg,651 +torch/include/torch/csrc/utils/python_numbers.h,sha256=1jrABqT3xL7BQzUwi5oNfjscA0Z-kxKUWEtano1BxZw,6383 +torch/include/torch/csrc/utils/python_raii.h,sha256=JLoYiMGFICxaIMoH6u5e4vp6SGE4W2N_EpTxD78NlV4,2912 +torch/include/torch/csrc/utils/python_scalars.h,sha256=JLGvlzGLJHFu1PLBKyxEcAc8OVsYHKNcVlhKG-4WkUg,6282 +torch/include/torch/csrc/utils/python_strings.h,sha256=lg0THu6tMRvIsihohsa49N9EpO3BBIt6ogFLv6fegCQ,4857 +torch/include/torch/csrc/utils/python_stub.h,sha256=JqFk4mKCyu0chr2QF5a1IqXXbi9HPecVk_VhA2TxtCA,310 +torch/include/torch/csrc/utils/python_symnode.h,sha256=TsvNCunai6IiBOL_wAcNpqeWMSh_ftOmtxzT-DPzd4c,10375 +torch/include/torch/csrc/utils/python_torch_function_mode.h,sha256=DxJo0hwTAG1hkq5LWJgXK58NUHiS4CDAbsrsBK_SkVY,1094 +torch/include/torch/csrc/utils/python_tuples.h,sha256=I8rMtebgRbe52cgReGUGwmmNk2HBsukIZaGg3V4VjkA,980 +torch/include/torch/csrc/utils/pythoncapi_compat.h,sha256=MUnDxkt6MWbfFXfbqGgIH3pV9RwqfFDzfHLbWTHh_Pk,72698 +torch/include/torch/csrc/utils/schema_info.h,sha256=kAn1bspmNcHr91si2o4ei6k3fuQ1-NvtoT-ISRENK6M,4043 +torch/include/torch/csrc/utils/six.h,sha256=m41GvPHVu05z3PgIjnmXFYJrJLw0EX4AfdXtov4Ht9E,1743 +torch/include/torch/csrc/utils/structseq.h,sha256=2G-lkmF_SYF2ECFSJwOLA6HBYFctjEwcgt924a5jfkw,395 +torch/include/torch/csrc/utils/tensor_apply.h,sha256=utGr0N-b-NAYkc68JEZcyeKrNncROANSHTpEQjidt4k,682 +torch/include/torch/csrc/utils/tensor_dtypes.h,sha256=cfAjJqa_c3rgNnj3ZxtnCRK-Ozyaykiwy9TfeXbilpU,496 +torch/include/torch/csrc/utils/tensor_flatten.h,sha256=-JgUD7iNFqUTEhe6bDougZZkdibYt3QuRmN7CPJBD-g,2999 +torch/include/torch/csrc/utils/tensor_layouts.h,sha256=9iqdB6L0Fzm8LXUjOKgSg8JDxxPNAvc6p_YG_YCCqOc,323 +torch/include/torch/csrc/utils/tensor_list.h,sha256=_dWalILXx6uIho9CQRwN-RW7hiVOikXfvR1Vu7geUYo,421 +torch/include/torch/csrc/utils/tensor_memoryformats.h,sha256=nV8q2ZOPt1auubOHrtFZvobiPTsqvo2UUT9ohUAi0qQ,600 +torch/include/torch/csrc/utils/tensor_new.h,sha256=vvHvcE26VfaYQ7fUgEF0sFfDP79mvoNxgPgmbsS-rqk,4285 +torch/include/torch/csrc/utils/tensor_numpy.h,sha256=CKuofC4dLDOzDQd7lBuoTWcagNQp--s7Dp_TrwVb6OQ,1129 +torch/include/torch/csrc/utils/tensor_qschemes.h,sha256=yOncI33ZbiK-oPvZEnvWapNXE0wRSqzZNit4zyCCOz0,428 +torch/include/torch/csrc/utils/tensor_types.h,sha256=z8Fq8XAQUE-NWt-AeOelujtTbpzllUyHm3H4D-Xd3EM,923 +torch/include/torch/csrc/utils/throughput_benchmark-inl.h,sha256=JmcH6qIqFot8fp8cLSVF6RIyEMdbGNyCxjUYZY5dP28,6590 +torch/include/torch/csrc/utils/throughput_benchmark.h,sha256=WcS0hu1H0O6aqlflKnQyuwo9V15e9sv4NR-zA0x2WkU,7191 +torch/include/torch/csrc/utils/torch_dispatch_mode.h,sha256=c-D7EjkxhFiKGeEzuGWzAbE-Iq8rVsqmrklnwamj8G4,2529 +torch/include/torch/csrc/utils/variadic.h,sha256=gbXQ7bGebPOoVsGoLjc4RycltMc1BYLTKcUv_VxUGw8,3630 +torch/include/torch/csrc/utils/verbose.h,sha256=YMrRuUzOz8RuhXUsyIH2uzVkHpXGp6iWrV1mgVwrpqY,392 +torch/include/torch/csrc/xpu/Event.h,sha256=DUja-x8C-w3C3xD_lzTVDY61kgx1PVLn1zWi8m758MQ,623 +torch/include/torch/csrc/xpu/Module.h,sha256=ITvFMk9MWU03WLLy-BOZmpoJnIVF0f70KlIO3dtoTTw,430 +torch/include/torch/csrc/xpu/Stream.h,sha256=6lPNJMuXZqw9O-_PNTb5EY9fXplRF0Jj0JfbV0xXJ7g,691 +torch/include/torch/csrc/xpu/XPUPluggableAllocator.h,sha256=ZAKYjogIIzPBamhYGB5ewStINvWxF1lRt8dCbiXCVpQ,3124 +torch/include/torch/custom_class.h,sha256=5kCrTDtYqFkFL336lLUk8zxsbg4Cci18rz3D-BpxskI,20104 +torch/include/torch/custom_class_detail.h,sha256=BIE1P3Ie7e5Ma5Ii9I1_xp5rlR_ZyY95ADZ68LYGoUU,8086 +torch/include/torch/extension.h,sha256=2juzxgbeXcd8wDHl9fCm-8iqxJ8YnqutefZANPuWnkg,467 +torch/include/torch/headeronly/core/DeviceType.h,sha256=3VX6zWVEIf5ChLy6EUKdXEOLMB0I8uIO4cI6Pc66CS4,4460 +torch/include/torch/headeronly/core/Dispatch.h,sha256=cdTOahmNMCFJ_1qKM62sYWYRzooKV7_3nfUY_XxgJ34,3825 +torch/include/torch/headeronly/core/Dispatch_v2.h,sha256=33ik-uH1fo7JRhwsS31E-ozgf_lG0iWbU1X6zI3VKcs,32987 +torch/include/torch/headeronly/core/Layout.h,sha256=HFoNirxYWVYbAcPO_UtnWv3lhAwY37RKczzFKgf3wKw,948 +torch/include/torch/headeronly/core/MemoryFormat.h,sha256=K7Q7XLCpUnKaFrI0k5D1hGOQK5X7obWQAQkF7a1PVH0,1206 +torch/include/torch/headeronly/core/ScalarType.h,sha256=C7Lrm8rgVAqcvDfYmR-lvdl6VBIHZ9cIeneMOiKk9b4,17784 +torch/include/torch/headeronly/core/TensorAccessor.h,sha256=j_0qsKM8oV-CQJGO5YXi6fX9v-bn9LqT4R3tG5dlnuw,13907 +torch/include/torch/headeronly/cpu/vec/intrinsics.h,sha256=PV2_UwjmjaVTKAc1PjPerISePzJnTLKf5iynUNFmnHM,1917 +torch/include/torch/headeronly/cpu/vec/vec_half.h,sha256=kXa2ne1je1uWnwec2732Zx8jV1gNFlRa7yw1k2X5D9o,1740 +torch/include/torch/headeronly/macros/Export.h,sha256=djmO3rnevROLmRWB2F2dALcS-htAKOE2Cci0ypilDhY,5791 +torch/include/torch/headeronly/macros/Macros.h,sha256=FzvmOK4VzZttTWn85SW58shDT7trEGD5Uts9nbd3pJE,25363 +torch/include/torch/headeronly/macros/cmake_macros.h,sha256=b-Stsa62GB_2kD_2ym9YW6yjCTvXoX5m1liJ_4Y3pt8,450 +torch/include/torch/headeronly/util/BFloat16.h,sha256=AD_2I7G_nOghEYAdK76E1Y8_Q-FbRoLsYmaz5stHqfg,15039 +torch/include/torch/headeronly/util/Deprecated.h,sha256=tyNcwEnjhdHs3LbgKssdAQqInoDJXNhgcSg1z2sj3nc,3579 +torch/include/torch/headeronly/util/Exception.h,sha256=IJVuC3dAGEfh0M5pap7hFGyRixEgOQjwfR83CFsdSUk,3422 +torch/include/torch/headeronly/util/Float4_e2m1fn_x2.h,sha256=G734w0W4oOe35KET9Tap746EWyTe7G6SbMmoNHvyt0g,1326 +torch/include/torch/headeronly/util/Float8_e4m3fn.h,sha256=5ImaKczPAkhmrlUxjRWY4yXk-uFgVMGGZWkxCaqVKPw,18408 +torch/include/torch/headeronly/util/Float8_e4m3fnuz.h,sha256=kzwud1EZqJYcAO4jET3FP-qfB4CZOJLR_TmvGt1ab_w,14613 +torch/include/torch/headeronly/util/Float8_e5m2.h,sha256=YCEB1vgf5rR42qYQc6VoXz46wecBtlfGl5RbXSRrBeM,14852 +torch/include/torch/headeronly/util/Float8_e5m2fnuz.h,sha256=87PtkT3hft5BedgwSL39-4KA4_KRP_dMFWs51XE0nic,14898 +torch/include/torch/headeronly/util/Float8_e8m0fnu.h,sha256=UtF9d4bS2fnTUFA_UHHK7Y3pG1it99XKo3ZiaA67OsE,6938 +torch/include/torch/headeronly/util/Float8_fnuz_cvt.h,sha256=aVJimoCmZgfahBmkRR40USG1eSeAng5hzhclZTa5TDM,1920 +torch/include/torch/headeronly/util/Half.h,sha256=r2_DJws_bzPgHK1jNzj8v8T2SZXU9sEsik97PPC2hLo,28235 +torch/include/torch/headeronly/util/HeaderOnlyArrayRef.h,sha256=f_p0joOnbl3MTpJuOEefhvRPCg_3L1AuF0d8UiQKqzo,7712 +torch/include/torch/headeronly/util/Metaprogramming.h,sha256=jPSAnrndcYsql4SqkbcffUCImefhQJxQmlNfd112EX0,7444 +torch/include/torch/headeronly/util/TypeList.h,sha256=bbsfasQ9L24ryDshgykojdyL98jbAcFdjr0ygLu4xI4,17804 +torch/include/torch/headeronly/util/TypeSafeSignMath.h,sha256=HjY_mtA-ngu32v3y_U_Kl1SS1RZlW_OE1mjyFXMGzgo,4585 +torch/include/torch/headeronly/util/TypeTraits.h,sha256=C4S0eYZ8fQZnHQAKZcnfMCBE2PrZ8m0W8djVag2_nJE,5698 +torch/include/torch/headeronly/util/bit_cast.h,sha256=-YBNY7PSadYyIoF3IyB-_RvY19evGIVh-Zt9Vi8liT8,1426 +torch/include/torch/headeronly/util/bits.h,sha256=K1SQupBTltkxUVAH28IXO8VQqNf1eLkYqGGMKKT7gmc,1644 +torch/include/torch/headeronly/util/complex.h,sha256=DBoJapV0ySW-w8QqKy3muh1YuxlunJC_4KU_Yx83Hv0,18096 +torch/include/torch/headeronly/util/floating_point_utils.h,sha256=o36InAmLzUt4OsrTbNeM2dNwCT0xbjmkOqYwewTZ1h0,1047 +torch/include/torch/headeronly/util/qint32.h,sha256=NjQBdVMVQoI1SxNNrtgEOOScvOLpgwPrTHIAmIlMSJY,434 +torch/include/torch/headeronly/util/qint8.h,sha256=JIN-Vao78wIx0308UT98URVQZdmXfYX3oTuzqlOi--o,586 +torch/include/torch/headeronly/util/quint2x4.h,sha256=vSoOsu-raTav0QIldQWUhYp9bY88d_HD3Kn_VXdRm9M,483 +torch/include/torch/headeronly/util/quint4x2.h,sha256=Pu82ZJKu21wqi232YMuAmtTWtq7DKaIek56Lr9u-N1c,483 +torch/include/torch/headeronly/util/quint8.h,sha256=2W7tsPA88e_obpE9TqWAeprIXjjZkyqwOqvX6TlGz-s,435 +torch/include/torch/headeronly/util/shim_utils.h,sha256=m0wt7-KIUyyPwP0oD2Bl1TsfLiCMEbVU4ZhsE4hnpkg,1028 +torch/include/torch/headeronly/version.h,sha256=9LeyYglDE1gwe3fN5Vit08RWWtBoUmJ6eYiuWgycxkU,818 +torch/include/torch/library.h,sha256=VAZgRxwQNyt3q2UQD7_7YwrvVCbVYDNfq0jPaIciTBk,42653 +torch/include/torch/script.h,sha256=e7ma1b60NplDJbbjKdE0vS98ttRT1GzWH4xHD6jn_MA,723 +torch/include/xnnpack.h,sha256=J0rMCxKw6Ue47CLqvzXN-hRCmJHLkDN2yQDWMhpMvRg,201257 +torch/jit/__init__.py,sha256=M44yU0shlEoS9EThEj7nahpMqP3W7z1q0wCRoZin0Oc,8366 +torch/jit/__pycache__/__init__.cpython-310.pyc,, +torch/jit/__pycache__/_async.cpython-310.pyc,, +torch/jit/__pycache__/_await.cpython-310.pyc,, +torch/jit/__pycache__/_builtins.cpython-310.pyc,, +torch/jit/__pycache__/_check.cpython-310.pyc,, +torch/jit/__pycache__/_dataclass_impls.cpython-310.pyc,, +torch/jit/__pycache__/_decomposition_utils.cpython-310.pyc,, +torch/jit/__pycache__/_decompositions.cpython-310.pyc,, +torch/jit/__pycache__/_freeze.cpython-310.pyc,, +torch/jit/__pycache__/_fuser.cpython-310.pyc,, +torch/jit/__pycache__/_ir_utils.cpython-310.pyc,, +torch/jit/__pycache__/_logging.cpython-310.pyc,, +torch/jit/__pycache__/_monkeytype_config.cpython-310.pyc,, +torch/jit/__pycache__/_pickle.cpython-310.pyc,, +torch/jit/__pycache__/_recursive.cpython-310.pyc,, +torch/jit/__pycache__/_script.cpython-310.pyc,, +torch/jit/__pycache__/_serialization.cpython-310.pyc,, +torch/jit/__pycache__/_shape_functions.cpython-310.pyc,, +torch/jit/__pycache__/_state.cpython-310.pyc,, +torch/jit/__pycache__/_trace.cpython-310.pyc,, +torch/jit/__pycache__/annotations.cpython-310.pyc,, +torch/jit/__pycache__/frontend.cpython-310.pyc,, +torch/jit/__pycache__/generate_bytecode.cpython-310.pyc,, +torch/jit/__pycache__/quantized.cpython-310.pyc,, +torch/jit/__pycache__/supported_ops.cpython-310.pyc,, +torch/jit/__pycache__/unsupported_tensor_ops.cpython-310.pyc,, +torch/jit/_async.py,sha256=_uWj0yoyTVobkY7SumObSP2ivtlXljGoXR7642tJ4jY,3827 +torch/jit/_await.py,sha256=UG6mM5L4tF7NRDT5BfFX4njoM1B_EhdoMT59KsyHF-8,852 +torch/jit/_builtins.py,sha256=r6KY4JsZ8oL7FSis8CJOtwyil58FAn0w73kpVY_Ycu0,6807 +torch/jit/_check.py,sha256=pAon5PwX0F0aENhczukFdu8R59Sqob-on9KnEMr9RDE,9772 +torch/jit/_dataclass_impls.py,sha256=3xo2DKMaUZv44Ngw1VYETZ4mqbwPTyX29U1VCItl6Co,6681 +torch/jit/_decomposition_utils.py,sha256=m0KBrliX_cBpL8A-oINVX5cpf8RK1fBR3QSkWC0ynEY,412 +torch/jit/_decompositions.py,sha256=mrGuX9pQgTAwKO3ZdiX1soWARHsz5JeYxmepdXsNxfM,4507 +torch/jit/_freeze.py,sha256=IA2X-_2pvZne_pviyy2jYICmcxaCrXdbZlugcrldQ3o,9510 +torch/jit/_fuser.py,sha256=S5G68B_fYqbpbsMO_aSNa88faNdw0zrqQuHUbGBmX5s,7091 +torch/jit/_ir_utils.py,sha256=rZ-9uD9-TVbXBl82rogFnQDTsLVysHwlMGVnzrrKmoE,894 +torch/jit/_logging.py,sha256=jWaacYoHjd_Cao_1hzyPKYiADS7cb7tLQc1gRkZblUQ,257 +torch/jit/_monkeytype_config.py,sha256=hxZGPI8HNdBtjFmIG9E_yZnE5JBQ4Ea0efSK5Es_PuA,7355 +torch/jit/_passes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/jit/_passes/__pycache__/__init__.cpython-310.pyc,, +torch/jit/_passes/__pycache__/_property_propagation.cpython-310.pyc,, +torch/jit/_passes/_property_propagation.py,sha256=4L1s-f_Ngp4Abz0Mf5t-BtQlEnyIWV2GPya6N2Om7qE,1438 +torch/jit/_pickle.py,sha256=c8EQuGRAI2iUrXLPtgSqv8ID1CGtSOaDcb7FUk73-Nc,1168 +torch/jit/_recursive.py,sha256=hSvm4f_LUXHHmfVOtrFCPm7ZoAkiVfCpZdw37huSxlE,42294 +torch/jit/_script.py,sha256=gsiBE6gkS3wQeSeMqwl_iCT81yR-_KK70EKRuYCSHxU,67324 +torch/jit/_script.pyi,sha256=ruCc_RRLzsVLlX-DJT_OpHMUocXYr030BuBMW-PCbXI,9473 +torch/jit/_serialization.py,sha256=6nPyLY85yJDLpeFV60SmlYZZ5rJ1-_kLpfZG4kR16u4,10748 +torch/jit/_shape_functions.py,sha256=ObfQlMeSV0nKBOblxdM74vgFp800Tm4fttkDWm1FWlg,45277 +torch/jit/_state.py,sha256=DykcLWDYRVEoCPT6wnJmEwNlL_753jSWezRteTFvEBU,3803 +torch/jit/_trace.py,sha256=KO_ThOYb9ZFl7UqbD1AH6WRZsAYQqVAxu98hoRQDel8,55949 +torch/jit/annotations.py,sha256=RtNqPaRL94G90fdZst8jLUe747e8udqFVAjZ-UCCEa0,18003 +torch/jit/frontend.py,sha256=Ib4pZW3oTZCo-JrT6eNul19EUvU32Jbfusif82z0tNA,45220 +torch/jit/generate_bytecode.py,sha256=e-Ltj08oGvI5x-Q3SWgnU0v21B-YQafnhYDj3XJ_C2c,1042 +torch/jit/mobile/__init__.py,sha256=3WnclynJzSbu34n3z21P2xIavP0_lmtWE-fLy7mpTLk,8889 +torch/jit/mobile/__pycache__/__init__.cpython-310.pyc,, +torch/jit/quantized.py,sha256=_qdmUEm74_VB2z0Dipf61uuvyefSkNAz0kLSPGxFMmA,3193 +torch/jit/supported_ops.py,sha256=Pe-f7iivLwVZF6P2z21xmLkCo9TuNw9S3EUdcu60uRA,10264 +torch/jit/unsupported_tensor_ops.py,sha256=JYLe90X6vb3BBzNB9xKY8VIRKtk2-LmsK-UXUbXMqYI,1995 +torch/lib/libc10.so,sha256=EJdtKpjg-YB-jB9E2TDF7E4Hr3BJzQLMSNUXf5Uqffs,1490361 +torch/lib/libc10_cuda.so,sha256=ZEq6verU3SWhVk42D-62lmrFYp9ItHhDSE4y8kme-64,577801 +torch/lib/libcaffe2_nvrtc.so,sha256=-HPTp6aJCdWEE8hwHot7fFymn9UWLWJzUgBTfYm6jYo,23073 +torch/lib/libgomp.so.1,sha256=WbrdfFUMNAoj0hfDcjKkusbmapn0eqJzoKA5O8fGjds,254337 +torch/lib/libshm.so,sha256=Nj0dguOxKkHsB6J6Imy4s0oWX4CVTfDZxRjkzuPMgYo,57969 +torch/lib/libshm/alloc_info.h,sha256=7SdVmCqiLa2mfKg-4DaB9rdpJnStPCmgXASpbjqtzBU,104 +torch/lib/libshm/err.h,sha256=j5cpgd5gS8_WgroKTyMLvDHDiXSe0GzbwE-1Sy88mA4,1258 +torch/lib/libshm/libshm.h,sha256=_6sOfY_vSO6mECr6XNIChm7r06uVO2fQRW-CZDOf5gs,1205 +torch/lib/libshm/socket.h,sha256=b_IuucKssZ6iHI_coGieeWw4aePAX9eYHly8l1BNyCs,4322 +torch/lib/libshm_windows/libshm.h,sha256=9MByK00M3an2HH2S8gFjZMUJsFJb96VRYE190Z-ALFo,779 +torch/lib/libtorch.so,sha256=Zy9s-m9bs5CUxS5AD2yoRDv-KU8Gunk975Dd8zlSn18,343457 +torch/lib/libtorch_cpu.so,sha256=Qge57Qw8hrWpkVBjeu9y4m5JoGKfAvryHzcxNQWwnW4,448177281 +torch/lib/libtorch_cuda.so,sha256=IMfrWe3wNAEDqmjo_wJfW4NEHutdSkTT6u10XwKtNQ8,1043840721 +torch/lib/libtorch_cuda_linalg.so,sha256=sacIh61cPoy_cAbdOt157e1B7VIC_cLj0cv7fFC7hFY,127514817 +torch/lib/libtorch_global_deps.so,sha256=Lqq3TWBkeXakXK9OBkPYsbVo9yAqocyGH9_3DOqNv0g,17353 +torch/lib/libtorch_nvshmem.so,sha256=WngafDcvM7pOGPhadYjOljCye6OWfyONKChLXkOiwx4,9828441 +torch/lib/libtorch_python.so,sha256=vqhyPAerzaMPo2odFBAvk3nhUo5ODzqYRyAwxvrOR4I,32121089 +torch/library.py,sha256=rbEzl-VgRjDN7Cp8x74414rOk3Wa7f90vfD3Q058crE,67536 +torch/linalg/__init__.py,sha256=y6AmGLFke8lNFB6WQWPqQrXIMs8jcNzktvsAwElr6cY,114965 +torch/linalg/__pycache__/__init__.cpython-310.pyc,, +torch/masked/__init__.py,sha256=WljBC5z-aMQ3EB29GNw5BVnONrx14zh1Cgrz7fqJ-1E,928 +torch/masked/__pycache__/__init__.cpython-310.pyc,, +torch/masked/__pycache__/_docs.cpython-310.pyc,, +torch/masked/__pycache__/_ops.cpython-310.pyc,, +torch/masked/_docs.py,sha256=Jr-iD8MG_4F6Ip_yxboE8Or1ms-bo3ay_6pdggbfV44,49468 +torch/masked/_ops.py,sha256=yoy0XPEhVdOUKn8L2yf897s5RxfaVpSzrON3HWOyX30,66676 +torch/masked/maskedtensor/__init__.py,sha256=yRXNgVmvSu6WET5dYVroutE7gtiXkN1JuBwogvcTvsY,344 +torch/masked/maskedtensor/__pycache__/__init__.cpython-310.pyc,, +torch/masked/maskedtensor/__pycache__/_ops_refs.cpython-310.pyc,, +torch/masked/maskedtensor/__pycache__/binary.cpython-310.pyc,, +torch/masked/maskedtensor/__pycache__/core.cpython-310.pyc,, +torch/masked/maskedtensor/__pycache__/creation.cpython-310.pyc,, +torch/masked/maskedtensor/__pycache__/passthrough.cpython-310.pyc,, +torch/masked/maskedtensor/__pycache__/reductions.cpython-310.pyc,, +torch/masked/maskedtensor/__pycache__/unary.cpython-310.pyc,, +torch/masked/maskedtensor/_ops_refs.py,sha256=JUazeL9NOxpMA7HyPSx82F0-D4lQI7PtlJJU0_KUO08,18130 +torch/masked/maskedtensor/binary.py,sha256=8cYTvBPO3P-8I99WQrVr1oLMDrXsfcWPwU-HMu6I4Dk,5496 +torch/masked/maskedtensor/core.py,sha256=5m6EdCtOXQfu76SnF5jzU9JdYIi2aREPq9CmaBq_0_Y,13059 +torch/masked/maskedtensor/creation.py,sha256=cuKrXLyknX42q3rbZOmrjmqgrFudey8GUh5Fmpu5YOs,605 +torch/masked/maskedtensor/passthrough.py,sha256=kEDm_BwgAN2erALo2NF8SLWX8J9jrAuySd9upW15-40,1447 +torch/masked/maskedtensor/reductions.py,sha256=lpGZNoL58xnxvhKntt2YMeZZUqcrGAzwijWSVhaRAmg,5599 +torch/masked/maskedtensor/unary.py,sha256=F3sO8CbzFYZhpTZxOx4nobOb7RRMgtx_gbY0IRbAXmA,4197 +torch/monitor/__init__.py,sha256=09VJnyTA2zwN2clbG0o6pV3Yf4YdzW2BospVTxNa4WU,1278 +torch/monitor/__pycache__/__init__.cpython-310.pyc,, +torch/mps/__init__.py,sha256=L_-i7MJ6LOsBSs3PbsPUBY3PLoCbbNnHz-kddk72NTE,6281 +torch/mps/__pycache__/__init__.cpython-310.pyc,, +torch/mps/__pycache__/event.cpython-310.pyc,, +torch/mps/__pycache__/profiler.cpython-310.pyc,, +torch/mps/event.py,sha256=tobbRc_mwlY-8W0QlYxxQQg75sPO-25nLzR9Pw9Ix7Q,1730 +torch/mps/profiler.py,sha256=TaunF3Y7c_HW26Y7ECPS6MRUFl-D93ArcSPgKT-hMyw,3553 +torch/mtia/__init__.py,sha256=ikfLSnDrmdfr13PgUeq4anJjy7B0neotwta4U-AoAmA,14333 +torch/mtia/__pycache__/__init__.cpython-310.pyc,, +torch/mtia/__pycache__/_utils.cpython-310.pyc,, +torch/mtia/__pycache__/memory.cpython-310.pyc,, +torch/mtia/__pycache__/mtia_graph.cpython-310.pyc,, +torch/mtia/_utils.py,sha256=4UJfB-hN2jC9pp0U-FuBOVHAstjmy2D9oeKQfPwWVHY,1597 +torch/mtia/memory.py,sha256=lNssdA4KEtBua385OKj3OBadHgM8FImuT76WOKX9JSk,2298 +torch/mtia/mtia_graph.py,sha256=YRYPe3XId6Rjvo7FPLOeTzm_vxeoXupzZCVeI8pcuHg,2627 +torch/multiprocessing/__init__.py,sha256=OwDLFFO9tcKACRyuy0qeyrlcLKW1ClqTNexktwlYiXw,3456 +torch/multiprocessing/__pycache__/__init__.cpython-310.pyc,, +torch/multiprocessing/__pycache__/_atfork.cpython-310.pyc,, +torch/multiprocessing/__pycache__/pool.cpython-310.pyc,, +torch/multiprocessing/__pycache__/queue.cpython-310.pyc,, +torch/multiprocessing/__pycache__/reductions.cpython-310.pyc,, +torch/multiprocessing/__pycache__/spawn.cpython-310.pyc,, +torch/multiprocessing/_atfork.py,sha256=NDXE2HR06ENj_1bGrQumxLdTGSDOlP-2bzeNwij7ajA,790 +torch/multiprocessing/pool.py,sha256=HQtd_V3oWKnkpQRrR4cutVFdlwxWwgCiUVPYSQXaU7M,1743 +torch/multiprocessing/queue.py,sha256=OT9KTbNOpqjhun_ZQTXizodE1UOwrpSbJhYRKtAyNmE,1477 +torch/multiprocessing/reductions.py,sha256=njCm-1F9r3ITWCKArQ_x47cL5_s4mEJnUYPuddhVWTE,23096 +torch/multiprocessing/spawn.py,sha256=lqqwiBGMGAwdqQftBObfOvpyDVgqdyuTResjEfPuCj4,12863 +torch/nativert/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/nativert/__pycache__/__init__.cpython-310.pyc,, +torch/nativert/backends/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/nativert/backends/__pycache__/__init__.cpython-310.pyc,, +torch/nativert/backends/__pycache__/_lower_utils.cpython-310.pyc,, +torch/nativert/backends/__pycache__/_lowered_aoti_module.cpython-310.pyc,, +torch/nativert/backends/_lower_utils.py,sha256=ofktQqoTb1gOwnC1cCimgFXFeTiaNCZZjpMsig0453I,3499 +torch/nativert/backends/_lowered_aoti_module.py,sha256=qBtnm7S4xagZczsqAdqcqmpLHwz-Z65tMvenrbSP3Fc,890 +torch/nested/__init__.py,sha256=mkwY4MEFBX0UCdglMwPTanFcee1UvEesV1V0pLxYuNg,22039 +torch/nested/__pycache__/__init__.cpython-310.pyc,, +torch/nested/_internal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/nested/_internal/__pycache__/__init__.cpython-310.pyc,, +torch/nested/_internal/__pycache__/nested_int.cpython-310.pyc,, +torch/nested/_internal/__pycache__/nested_tensor.cpython-310.pyc,, +torch/nested/_internal/__pycache__/ops.cpython-310.pyc,, +torch/nested/_internal/__pycache__/sdpa.cpython-310.pyc,, +torch/nested/_internal/nested_int.py,sha256=um71hBoBQwgKUHCA1xrCLia3ABzK8DiKAaOlqXTCW2Y,3198 +torch/nested/_internal/nested_tensor.py,sha256=7a5nu1i4uBTbWMNTQtqYQDz5os-0DYf6fZODi05e_BY,25114 +torch/nested/_internal/ops.py,sha256=hK9Sjw3lnWrpCPbYAcVnKiD6MqukISxuUDpmfbXu-vc,96833 +torch/nested/_internal/sdpa.py,sha256=Pq5Z0T1cubseFxkLWZgYAsit-Pw36_bc8VrXK4k2F18,34462 +torch/nn/__init__.py,sha256=SGakM4nNGjI1YZwNintPfgNVTV5FrVKhiFXbq5Db8Pk,2425 +torch/nn/__pycache__/__init__.cpython-310.pyc,, +torch/nn/__pycache__/_reduction.cpython-310.pyc,, +torch/nn/__pycache__/common_types.cpython-310.pyc,, +torch/nn/__pycache__/cpp.cpython-310.pyc,, +torch/nn/__pycache__/functional.cpython-310.pyc,, +torch/nn/__pycache__/grad.cpython-310.pyc,, +torch/nn/__pycache__/init.cpython-310.pyc,, +torch/nn/__pycache__/parameter.cpython-310.pyc,, +torch/nn/_reduction.py,sha256=ndJ4VxoNYRrvspg35qJtWdkGi0Cu2XsMv-sa0rBDt-s,1626 +torch/nn/attention/__init__.py,sha256=lq_jkyUFQmsU-VEWBfMXZPqOq4qot6-V--LSb3Do-qY,6771 +torch/nn/attention/__pycache__/__init__.cpython-310.pyc,, +torch/nn/attention/__pycache__/_fa4.cpython-310.pyc,, +torch/nn/attention/__pycache__/_registry.cpython-310.pyc,, +torch/nn/attention/__pycache__/_utils.cpython-310.pyc,, +torch/nn/attention/__pycache__/bias.cpython-310.pyc,, +torch/nn/attention/__pycache__/flex_attention.cpython-310.pyc,, +torch/nn/attention/__pycache__/varlen.cpython-310.pyc,, +torch/nn/attention/_fa4.py,sha256=M8B1bJ7dwPIvVSnaVnQg3iwxjIoGup71BH4e6SuYqbo,12023 +torch/nn/attention/_registry.py,sha256=v9_zwXDvF8dts0R_24B3cpP7wDJcOVawlhh9nLoubeg,3886 +torch/nn/attention/_utils.py,sha256=Z1ZaobjobHCxX9ER4PnH1e2SeY3Fb_uZ1cLwP7mDbOs,2013 +torch/nn/attention/bias.py,sha256=lgZDdsAdwoPGA0W8_UY7PqEh2QCBmrD4wqIkTyELaCA,13600 +torch/nn/attention/experimental/__init__.py,sha256=VXpUxbEIcm46WvCIT1rgWY3vSN7V7UMT42FqE7UR-9M,111 +torch/nn/attention/experimental/__pycache__/__init__.cpython-310.pyc,, +torch/nn/attention/experimental/__pycache__/_paged_attention.cpython-310.pyc,, +torch/nn/attention/experimental/_paged_attention.py,sha256=2-Wu5fsAO2s_l8l1GXXifyHqasUq7k1LPfG3RYlAOC0,13026 +torch/nn/attention/flex_attention.py,sha256=JZPFMw6Fzr0X-mxLHvoMXFoYV9X4YvRngxhKJ7MOMqk,66199 +torch/nn/attention/varlen.py,sha256=YL0CbT4fJiiqaZfJ5mkXnmEp80mCHfsXJa3TwsFy9Us,10101 +torch/nn/backends/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/nn/backends/__pycache__/__init__.cpython-310.pyc,, +torch/nn/backends/__pycache__/thnn.cpython-310.pyc,, +torch/nn/backends/thnn.py,sha256=DIn1LJwiPPLheO-ePySpWoHesiuc7NUEcfM4X-hyE2Y,154 +torch/nn/common_types.py,sha256=6nu95uJFHkfNYQrVRxzgRWSF-4tVNSzIF7A1h3HWiMI,2089 +torch/nn/cpp.py,sha256=qiuQgs3CT0t-Vy1FcJsrm08DQSHnMcxG09AWIf2hu_A,3100 +torch/nn/functional.py,sha256=9jNeRDzpPd8h7PnZS7tNSk2S4SjFv7WYJvNUlcnChwM,258350 +torch/nn/functional.pyi,sha256=osAS8_eJpvcXJOHaprbHZWUCKT-bge7rhriRqA3vV2I,27749 +torch/nn/grad.py,sha256=xEFG-ZnkxxjBMJajUSoNPqlHLiFFFAZ3wXBvn2kCRYc,9910 +torch/nn/init.py,sha256=rMjfjikoRpyGSnM6bEw0XIOnwxhDoOBXwd7LP7TCslk,24834 +torch/nn/intrinsic/__init__.py,sha256=mLJtyO2jadna-iZ8mCcW_NoEMq4mJxr3BqaJDy0jBhE,697 +torch/nn/intrinsic/__pycache__/__init__.cpython-310.pyc,, +torch/nn/intrinsic/modules/__init__.py,sha256=bqi9D10UvQcO_cimMFdlI5HjLEvFOp7Y0hT6g3WOSMQ,517 +torch/nn/intrinsic/modules/__pycache__/__init__.cpython-310.pyc,, +torch/nn/intrinsic/modules/__pycache__/fused.cpython-310.pyc,, +torch/nn/intrinsic/modules/fused.py,sha256=Q6ta4U7JgPoSVs66FPll7Hjhjl_pXcO3pFWKGnBzspk,563 +torch/nn/intrinsic/qat/__init__.py,sha256=7rFxYP3UVmm4gwSlC7aBqXoJF1s0Q4aIdJZuW7ST8wI,59 +torch/nn/intrinsic/qat/__pycache__/__init__.cpython-310.pyc,, +torch/nn/intrinsic/qat/modules/__init__.py,sha256=n9s1HTHyr4Ao5_38irURngF2ZPh7pTJy9eos_oIz3Bs,637 +torch/nn/intrinsic/qat/modules/__pycache__/__init__.cpython-310.pyc,, +torch/nn/intrinsic/qat/modules/__pycache__/conv_fused.cpython-310.pyc,, +torch/nn/intrinsic/qat/modules/__pycache__/linear_fused.cpython-310.pyc,, +torch/nn/intrinsic/qat/modules/__pycache__/linear_relu.cpython-310.pyc,, +torch/nn/intrinsic/qat/modules/conv_fused.py,sha256=YKNHs_Fh3tfSoWmUAgd5APZwerDHpxPyY8KAXXDdMak,833 +torch/nn/intrinsic/qat/modules/linear_fused.py,sha256=qKnc8PyXqHPM--vfXmlD7JQoR5I480vCcYNZu-52-mM,434 +torch/nn/intrinsic/qat/modules/linear_relu.py,sha256=8740qDh1H-F03wWtKB6tQhPFSf2M2Cowyb91sfs02Ww,434 +torch/nn/intrinsic/quantized/__init__.py,sha256=Elo1b9Ro7sj3MsWn3xys-1rGWSe21SANc4H6Ai3x25c,336 +torch/nn/intrinsic/quantized/__pycache__/__init__.cpython-310.pyc,, +torch/nn/intrinsic/quantized/dynamic/__init__.py,sha256=Ov25o_5XouCKIqpzK42xcw8dAwVd02tGZqS4XL8BOIM,73 +torch/nn/intrinsic/quantized/dynamic/__pycache__/__init__.cpython-310.pyc,, +torch/nn/intrinsic/quantized/dynamic/modules/__init__.py,sha256=acHjDVSQZsjlTsbUoN4pI-971UJRfjavwMJRJuEOOBk,114 +torch/nn/intrinsic/quantized/dynamic/modules/__pycache__/__init__.cpython-310.pyc,, +torch/nn/intrinsic/quantized/dynamic/modules/__pycache__/linear_relu.cpython-310.pyc,, +torch/nn/intrinsic/quantized/dynamic/modules/linear_relu.py,sha256=z509nJpUu_QTwDUjE_ON9Fbu7n5GfMnOzWju35bEXRk,97 +torch/nn/intrinsic/quantized/modules/__init__.py,sha256=6WHqSE0pA7qaW20FVPWggCar8uawjVKABKVeNdxjNlo,379 +torch/nn/intrinsic/quantized/modules/__pycache__/__init__.cpython-310.pyc,, +torch/nn/intrinsic/quantized/modules/__pycache__/bn_relu.cpython-310.pyc,, +torch/nn/intrinsic/quantized/modules/__pycache__/conv_relu.cpython-310.pyc,, +torch/nn/intrinsic/quantized/modules/__pycache__/linear_relu.cpython-310.pyc,, +torch/nn/intrinsic/quantized/modules/bn_relu.py,sha256=3t9doT82fRh1SytKSivqQgxVfDP41KuvL-R9hz8oSb8,111 +torch/nn/intrinsic/quantized/modules/conv_relu.py,sha256=QWzacsMW7FtkasYvsZ9WqRExBjaMqsxHQHD5tYsZBFA,149 +torch/nn/intrinsic/quantized/modules/linear_relu.py,sha256=Zuj3I1owPTdoovG1-BoogRjn8JX1rMWM-WXYc-QFneU,89 +torch/nn/modules/__init__.py,sha256=chOVC7vb1QKPVwZ7I1MexX9fxazQGfbsmsaStR-cOgY,6494 +torch/nn/modules/__pycache__/__init__.cpython-310.pyc,, +torch/nn/modules/__pycache__/_functions.cpython-310.pyc,, +torch/nn/modules/__pycache__/activation.cpython-310.pyc,, +torch/nn/modules/__pycache__/adaptive.cpython-310.pyc,, +torch/nn/modules/__pycache__/batchnorm.cpython-310.pyc,, +torch/nn/modules/__pycache__/channelshuffle.cpython-310.pyc,, +torch/nn/modules/__pycache__/container.cpython-310.pyc,, +torch/nn/modules/__pycache__/conv.cpython-310.pyc,, +torch/nn/modules/__pycache__/distance.cpython-310.pyc,, +torch/nn/modules/__pycache__/dropout.cpython-310.pyc,, +torch/nn/modules/__pycache__/flatten.cpython-310.pyc,, +torch/nn/modules/__pycache__/fold.cpython-310.pyc,, +torch/nn/modules/__pycache__/instancenorm.cpython-310.pyc,, +torch/nn/modules/__pycache__/lazy.cpython-310.pyc,, +torch/nn/modules/__pycache__/linear.cpython-310.pyc,, +torch/nn/modules/__pycache__/loss.cpython-310.pyc,, +torch/nn/modules/__pycache__/module.cpython-310.pyc,, +torch/nn/modules/__pycache__/normalization.cpython-310.pyc,, +torch/nn/modules/__pycache__/padding.cpython-310.pyc,, +torch/nn/modules/__pycache__/pixelshuffle.cpython-310.pyc,, +torch/nn/modules/__pycache__/pooling.cpython-310.pyc,, +torch/nn/modules/__pycache__/rnn.cpython-310.pyc,, +torch/nn/modules/__pycache__/sparse.cpython-310.pyc,, +torch/nn/modules/__pycache__/transformer.cpython-310.pyc,, +torch/nn/modules/__pycache__/upsampling.cpython-310.pyc,, +torch/nn/modules/__pycache__/utils.cpython-310.pyc,, +torch/nn/modules/_functions.py,sha256=yIbl9J5PJVweRgebPTkdwOoiggiDPfnzlGL3_tYPkmI,12143 +torch/nn/modules/activation.py,sha256=0pKYRdoDcXBLT6ddnvSHrDhCUl5ql5xSYBanQJJqqQA,61690 +torch/nn/modules/adaptive.py,sha256=_fGwVPaYb2GHaz_Uv1klKHGnt7MTH1y4LwFD7Ia21I8,12606 +torch/nn/modules/batchnorm.py,sha256=CeOOVjBwOUc9VdUnzAAnwzS3BNsLHc4y4aKTPX8ln4k,39124 +torch/nn/modules/channelshuffle.py,sha256=1K2PoerBn3WvtN3gfTyLAp6sjMVhADPjgI0eV5XD0WU,1682 +torch/nn/modules/container.py,sha256=CSb09BA0Le5Bzly1OxNAUHvdq3l5UQbw2j1GGiRZwWU,37644 +torch/nn/modules/conv.py,sha256=2IEJEt_Ui9Hs8yKYbLHnRSxhp79_QAMk_iNGJpok00Q,78485 +torch/nn/modules/distance.py,sha256=z7zUT5-kLio0kqt6r3EwNgDpmPDcoRC6QasilD_yTsk,3372 +torch/nn/modules/dropout.py,sha256=8avb3aCV6e4LuWcB6a_XDbyiApi9MZCqaLedDsmMR_c,11517 +torch/nn/modules/flatten.py,sha256=ogOVF9rao5nMuDXr2bLASB2QzQ4BIWhR3Z_t-byMpL8,5760 +torch/nn/modules/fold.py,sha256=o58ibuN2AmkR3o2Qg9ACBwx8iAFTlhaEuyGpucZxr14,13227 +torch/nn/modules/instancenorm.py,sha256=Oic0CevfwH_v2sSBBVUnpgPwFonbnvdYVYO87UeUGMk,20446 +torch/nn/modules/lazy.py,sha256=yAx_4T2XYmaBfaH9fKr9tAeFLA6-aUW2DJtYUvPausI,11674 +torch/nn/modules/linear.py,sha256=xx4LSC8hQyxjUzUeYiCVbb7iuOsR9ulka3qO4Xtqgq8,12326 +torch/nn/modules/loss.py,sha256=eoqpu8vAufDCvtx_9ND3TE1o0iHtOYZ8eZ3KcEq_Y1o,96383 +torch/nn/modules/module.py,sha256=NMmWgreDKlEQ39hb2Ib1Qvpir_Nd3z8Uc-qGqKvUres,127468 +torch/nn/modules/normalization.py,sha256=7m3NyZ6EldcSZJGSqt4QBN8DvNYfTyMPnojurAjk5_A,15276 +torch/nn/modules/padding.py,sha256=Nyvsav0h0dJ1rtUt6i5c0jnPtfImRlId567eusJcHNk,31660 +torch/nn/modules/pixelshuffle.py,sha256=N4rqCH-2DvBKLG4ZpJLHUNsv8Ylx2uQHm7VxRop4CWw,3948 +torch/nn/modules/pooling.py,sha256=embOujctPnv03alIcbm3MLjQwr-fb1BRh0kXu13KyCY,61114 +torch/nn/modules/rnn.py,sha256=VIqGsq1BOBYqXbE7sqZtxyl1laT7SyReBXFF_NPxajU,74891 +torch/nn/modules/sparse.py,sha256=EoN7x92aUFDCCCyA3Nxun6_vs5q_5bImjq2HJMCi4G8,24208 +torch/nn/modules/transformer.py,sha256=6_Tlr3Fz0djNJzijtBCEPhYpFeegEbTW8Ihvsf5UN8o,52547 +torch/nn/modules/upsampling.py,sha256=xqIhg4bfAfGsJ3rp8fMm-yeI8P_nKParbOdUGCkALlk,11611 +torch/nn/modules/utils.py,sha256=mHqqrpvGyU0PrwZq92ncEKf8HkecKh6xwlv7BuL-z1Y,2640 +torch/nn/parallel/__init__.py,sha256=z43J5FJ5qqe_aVSla6yG0qZ19t_Y9pX3g3BzYJvVuSs,760 +torch/nn/parallel/__pycache__/__init__.cpython-310.pyc,, +torch/nn/parallel/__pycache__/_functions.cpython-310.pyc,, +torch/nn/parallel/__pycache__/comm.cpython-310.pyc,, +torch/nn/parallel/__pycache__/data_parallel.cpython-310.pyc,, +torch/nn/parallel/__pycache__/distributed.cpython-310.pyc,, +torch/nn/parallel/__pycache__/parallel_apply.cpython-310.pyc,, +torch/nn/parallel/__pycache__/replicate.cpython-310.pyc,, +torch/nn/parallel/__pycache__/scatter_gather.cpython-310.pyc,, +torch/nn/parallel/_functions.py,sha256=fPJzhppnM2HchHHFncE9QlSeL-JnqeDqpUZKgs1mFbA,4946 +torch/nn/parallel/comm.py,sha256=chG2i_OgCo7XPY1Ve3gH1FoZOqkVn7jIm9BLbTTPNd0,11019 +torch/nn/parallel/data_parallel.py,sha256=GgGVoFm9fZNj-kNRiCUzbz9mWShPOSHZ2zO0N8WDdnM,11878 +torch/nn/parallel/distributed.py,sha256=G3Q6YwoPi2FLVYLNsVN-dSb21V3Q2blhTp6Odk5Bqto,109859 +torch/nn/parallel/parallel_apply.py,sha256=dJ-3CamysoWxowd676lt2_mFnPEs-m2-wUnIz258CBA,4683 +torch/nn/parallel/replicate.py,sha256=j9wzBYM7E1e8WATzoJxStwqms5_De5WEWARG1PktB9w,6972 +torch/nn/parallel/scatter_gather.py,sha256=837qjpFtZ0vvVQ4Sz8IrJ5dSDSB2xKoT4ihgMbVNH-c,5702 +torch/nn/parameter.py,sha256=qmZVu3tgcL7d5hDip0v98PjZ4EHgJaeOe9OhvhkWwOc,12217 +torch/nn/parameter.pyi,sha256=nWmOqB7CJFdB0wabxODC0yZI5j0N20MhsHb_twxD3Ac,1118 +torch/nn/qat/__init__.py,sha256=YHWepHV69h8eIIZ09WgM96wRwYTKAdZ5IXJG4ajhsHI,365 +torch/nn/qat/__pycache__/__init__.cpython-310.pyc,, +torch/nn/qat/dynamic/__init__.py,sha256=3v0msXCbfI7q_EYZ2WUPfuW0IxLRr2s8ICycY6XraDQ,208 +torch/nn/qat/dynamic/__pycache__/__init__.cpython-310.pyc,, +torch/nn/qat/dynamic/modules/__init__.py,sha256=xnBpUudYrmz9leiWC2UaMEGbDX2eO--nNluoaO_V-LE,78 +torch/nn/qat/dynamic/modules/__pycache__/__init__.cpython-310.pyc,, +torch/nn/qat/dynamic/modules/__pycache__/linear.cpython-310.pyc,, +torch/nn/qat/dynamic/modules/linear.py,sha256=io9A-B4H0RMvMRYuKeVSxRQPsBhdCy5WKfvr5QtKHuo,416 +torch/nn/qat/modules/__init__.py,sha256=xHBwOWC71Dzb9MLPvLkMMdcDlr39rf-dejMilOtshHM,501 +torch/nn/qat/modules/__pycache__/__init__.cpython-310.pyc,, +torch/nn/qat/modules/__pycache__/conv.cpython-310.pyc,, +torch/nn/qat/modules/__pycache__/embedding_ops.cpython-310.pyc,, +torch/nn/qat/modules/__pycache__/linear.cpython-310.pyc,, +torch/nn/qat/modules/conv.py,sha256=hOAGSJ7oaQTf_9DWXPWrGGsQ9oPLASiCZaeHX4X3BMI,406 +torch/nn/qat/modules/embedding_ops.py,sha256=1BP3HyU1Xkr8yQBH1RNqv2rwZM9Uv6Wl6X5-DM_Jlls,458 +torch/nn/qat/modules/linear.py,sha256=cFw8lAcvlWfV__h6uSDi9w4I7snqlWGVAyfY7nnHiMA,392 +torch/nn/quantizable/__init__.py,sha256=O3C0GktZB_Ut6pNTL17JbCzJ2h2hCIK3KH8sVnhSuDs,57 +torch/nn/quantizable/__pycache__/__init__.cpython-310.pyc,, +torch/nn/quantizable/modules/__init__.py,sha256=gr03bjx4iwgg1n8zCu3B1UpgNqhb6UxxSVvwO5894V4,207 +torch/nn/quantizable/modules/__pycache__/__init__.cpython-310.pyc,, +torch/nn/quantizable/modules/__pycache__/activation.cpython-310.pyc,, +torch/nn/quantizable/modules/__pycache__/rnn.cpython-310.pyc,, +torch/nn/quantizable/modules/activation.py,sha256=m8gKPli1OoBlwAng4E2ndP9K3ov2t6D7pN1Zj84nv0g,440 +torch/nn/quantizable/modules/rnn.py,sha256=ymfl_ayTkuUunsNt9186sFOhtapsxsTHVtY_QlKFH9A,429 +torch/nn/quantized/__init__.py,sha256=OTMoZbhpm8nI1oMVMuB8tt4JvpDN3MsIoYww2nUJfQM,771 +torch/nn/quantized/__pycache__/__init__.cpython-310.pyc,, +torch/nn/quantized/__pycache__/functional.cpython-310.pyc,, +torch/nn/quantized/_reference/__init__.py,sha256=VrWZh6FzvyvAi744iiFBcYarBX3Akn6kTarYzEIX0_w,66 +torch/nn/quantized/_reference/__pycache__/__init__.cpython-310.pyc,, +torch/nn/quantized/_reference/modules/__init__.py,sha256=yjgG2MRfrWs-u8l1CCILBoPTa-FBORFZh9i86vYKdy8,1018 +torch/nn/quantized/_reference/modules/__pycache__/__init__.cpython-310.pyc,, +torch/nn/quantized/_reference/modules/__pycache__/conv.cpython-310.pyc,, +torch/nn/quantized/_reference/modules/__pycache__/linear.cpython-310.pyc,, +torch/nn/quantized/_reference/modules/__pycache__/rnn.cpython-310.pyc,, +torch/nn/quantized/_reference/modules/__pycache__/sparse.cpython-310.pyc,, +torch/nn/quantized/_reference/modules/__pycache__/utils.cpython-310.pyc,, +torch/nn/quantized/_reference/modules/conv.py,sha256=FclYIsMCbXH4erKiBDintHNWDsplOru0QY9LDToSL-s,579 +torch/nn/quantized/_reference/modules/linear.py,sha256=Cu-oS3rGRNtFQX8C8yBiLIeORYswqNnFbVw3ds6PMKQ,450 +torch/nn/quantized/_reference/modules/rnn.py,sha256=A6kV2QXCij5mpFFUTWBQwf6ynKQNJj0VMJbvHqkXa-Y,524 +torch/nn/quantized/_reference/modules/sparse.py,sha256=gSNXDYXlx1IoSrRN0i_pJHJt1znBH3sAPvDpivdfask,467 +torch/nn/quantized/_reference/modules/utils.py,sha256=nBSMp0qUV2OBmuCJYKGmpY6JtRinMoHhwPT2B8VbY08,590 +torch/nn/quantized/dynamic/__init__.py,sha256=lN8JfmyIwtMWNsOD0hWGgKMVPUXuUb5cu6QOvIlEJxg,58 +torch/nn/quantized/dynamic/__pycache__/__init__.cpython-310.pyc,, +torch/nn/quantized/dynamic/modules/__init__.py,sha256=ORZYUZYDqtgat8r4CkTj2GRbnR4y2CxoK3hNUT1AFEU,993 +torch/nn/quantized/dynamic/modules/__pycache__/__init__.cpython-310.pyc,, +torch/nn/quantized/dynamic/modules/__pycache__/conv.cpython-310.pyc,, +torch/nn/quantized/dynamic/modules/__pycache__/linear.cpython-310.pyc,, +torch/nn/quantized/dynamic/modules/__pycache__/rnn.cpython-310.pyc,, +torch/nn/quantized/dynamic/modules/conv.py,sha256=bq0IjYdFIpdJbsQkIeF1LDHZOC8wvGInVohV5KwqqI0,669 +torch/nn/quantized/dynamic/modules/linear.py,sha256=67W7Cw26T5oIiE4n3RJykC6PX5VypOJU3lQcNP6mohg,448 +torch/nn/quantized/dynamic/modules/rnn.py,sha256=vWAb3OQKyHWubLC5U-qIGP-GgYq-GFpvltZCDXjogrA,740 +torch/nn/quantized/functional.py,sha256=YLagkINzH1ksH0zcEEizTr0Wdu8gvziqPkx-elbUkJE,276 +torch/nn/quantized/modules/__init__.py,sha256=oNogz5eH2YEYfHjRkYBEqp_XD2GduDqc9StknEGWx40,2101 +torch/nn/quantized/modules/__pycache__/__init__.cpython-310.pyc,, +torch/nn/quantized/modules/__pycache__/activation.cpython-310.pyc,, +torch/nn/quantized/modules/__pycache__/batchnorm.cpython-310.pyc,, +torch/nn/quantized/modules/__pycache__/conv.cpython-310.pyc,, +torch/nn/quantized/modules/__pycache__/dropout.cpython-310.pyc,, +torch/nn/quantized/modules/__pycache__/embedding_ops.cpython-310.pyc,, +torch/nn/quantized/modules/__pycache__/functional_modules.cpython-310.pyc,, +torch/nn/quantized/modules/__pycache__/linear.cpython-310.pyc,, +torch/nn/quantized/modules/__pycache__/normalization.cpython-310.pyc,, +torch/nn/quantized/modules/__pycache__/rnn.cpython-310.pyc,, +torch/nn/quantized/modules/__pycache__/utils.cpython-310.pyc,, +torch/nn/quantized/modules/activation.py,sha256=52tIo-6xSFg2QIuNL-Q7AKs2IiDBCcGFIvWNupA3fjA,528 +torch/nn/quantized/modules/batchnorm.py,sha256=OpxwQosX9Pv53csZ4ZXKhFOkya_tXMbtndDMSETJKV8,437 +torch/nn/quantized/modules/conv.py,sha256=3JBXb4gZOKXHIyWnnPEVxlb-WRDSMiNEUvuofCSNsSw,666 +torch/nn/quantized/modules/dropout.py,sha256=qdWqDycnaodhJDr_EyIQCiaSg4xK5dqEZ21IBIsC_8M,442 +torch/nn/quantized/modules/embedding_ops.py,sha256=smsmXs2h7t2y6WbToNuJ060heMQbZOXOfkNbdwOqVO4,547 +torch/nn/quantized/modules/functional_modules.py,sha256=bk60spaa4_sUCDXyh4GOh937FVIwNCH-l93lAPi39-Q,554 +torch/nn/quantized/modules/linear.py,sha256=zsZr5Rb4z4XJvTjc-hF9cqG4uqpsbkHOc3jJOxcSM4A,481 +torch/nn/quantized/modules/normalization.py,sha256=vUyWsXC7CFIm0oohnco73FD3Kz9xMGHeJKq3dNKZxKQ,626 +torch/nn/quantized/modules/rnn.py,sha256=NWI5IuH_qaC1YD1ROeoUbodbN3yS0MrZKOhXLmGfPDo,411 +torch/nn/quantized/modules/utils.py,sha256=ZkyzQS1nmLaK5Nvq2eKtSha7mHG3HyM08_5ueUc9FpQ,539 +torch/nn/utils/__init__.py,sha256=TvaBvbmBj0pMGuf4nqvOVRPGBkcJESoCLl-swaJYHjw,1337 +torch/nn/utils/__pycache__/__init__.cpython-310.pyc,, +torch/nn/utils/__pycache__/_deprecation_utils.cpython-310.pyc,, +torch/nn/utils/__pycache__/_named_member_accessor.cpython-310.pyc,, +torch/nn/utils/__pycache__/_per_sample_grad.cpython-310.pyc,, +torch/nn/utils/__pycache__/clip_grad.cpython-310.pyc,, +torch/nn/utils/__pycache__/convert_parameters.cpython-310.pyc,, +torch/nn/utils/__pycache__/fusion.cpython-310.pyc,, +torch/nn/utils/__pycache__/init.cpython-310.pyc,, +torch/nn/utils/__pycache__/memory_format.cpython-310.pyc,, +torch/nn/utils/__pycache__/parametrizations.cpython-310.pyc,, +torch/nn/utils/__pycache__/parametrize.cpython-310.pyc,, +torch/nn/utils/__pycache__/prune.cpython-310.pyc,, +torch/nn/utils/__pycache__/rnn.cpython-310.pyc,, +torch/nn/utils/__pycache__/spectral_norm.cpython-310.pyc,, +torch/nn/utils/__pycache__/stateless.cpython-310.pyc,, +torch/nn/utils/__pycache__/weight_norm.cpython-310.pyc,, +torch/nn/utils/_deprecation_utils.py,sha256=KB2l-yIWZAA9OI0lT0f2s5WXeFvwvydY4EP0GGDDags,1698 +torch/nn/utils/_expanded_weights/__init__.py,sha256=PHIe9H3l0iuImQ6z3WqMkWIS37FDQVQ16vMo0a08mtA,452 +torch/nn/utils/_expanded_weights/__pycache__/__init__.cpython-310.pyc,, +torch/nn/utils/_expanded_weights/__pycache__/conv_expanded_weights.cpython-310.pyc,, +torch/nn/utils/_expanded_weights/__pycache__/conv_utils.cpython-310.pyc,, +torch/nn/utils/_expanded_weights/__pycache__/embedding_expanded_weights.cpython-310.pyc,, +torch/nn/utils/_expanded_weights/__pycache__/expanded_weights_impl.cpython-310.pyc,, +torch/nn/utils/_expanded_weights/__pycache__/expanded_weights_utils.cpython-310.pyc,, +torch/nn/utils/_expanded_weights/__pycache__/group_norm_expanded_weights.cpython-310.pyc,, +torch/nn/utils/_expanded_weights/__pycache__/instance_norm_expanded_weights.cpython-310.pyc,, +torch/nn/utils/_expanded_weights/__pycache__/layer_norm_expanded_weights.cpython-310.pyc,, +torch/nn/utils/_expanded_weights/__pycache__/linear_expanded_weights.cpython-310.pyc,, +torch/nn/utils/_expanded_weights/conv_expanded_weights.py,sha256=5Kr60dZ4gzcsX-uPJYWw6_9-Afoqu5QgVAmUt-smiDA,2925 +torch/nn/utils/_expanded_weights/conv_utils.py,sha256=6SePfcWuh4cfbojlhk6X1Sxq0naMjd5YbcyNPYec9xw,10756 +torch/nn/utils/_expanded_weights/embedding_expanded_weights.py,sha256=kVjENz7zj9_3fIiF9rNgNbUx7Z78UNSEJRhO9dYjryc,3073 +torch/nn/utils/_expanded_weights/expanded_weights_impl.py,sha256=pzQ4QgHqmP9fk67f_AH3JpmeqYGdNTmp9oL9pYeGfDU,6410 +torch/nn/utils/_expanded_weights/expanded_weights_utils.py,sha256=HkbQYEBm_P2AlXNkwRLX-TPUEf3gv97EUnTxGcr9P4U,7611 +torch/nn/utils/_expanded_weights/group_norm_expanded_weights.py,sha256=gDcjclHjBNQ31HOKcYaPI5EBnhhp77ni81FiInEZ4wU,3576 +torch/nn/utils/_expanded_weights/instance_norm_expanded_weights.py,sha256=TEs5rHPpUAet5KUtF1_RgyKr3kbZRKY6kEqsqP5mk5M,3772 +torch/nn/utils/_expanded_weights/layer_norm_expanded_weights.py,sha256=X1r7CwjyK-j03S9J6axQPGJ7DQr-yg1mWUNQ3Rip9UE,3289 +torch/nn/utils/_expanded_weights/linear_expanded_weights.py,sha256=6BI2LGjLpH29uFg5ktMxIW7AmxrA83uBPs62YmZOqww,2259 +torch/nn/utils/_named_member_accessor.py,sha256=v_piC7X6_GvF6C0hkAR_JJz6ogS_N7sHqB1_CasDmIM,14210 +torch/nn/utils/_per_sample_grad.py,sha256=r2XSvB-eGfw7g-TOhHWT_v_w2K4oI3qaK7pHxm9S_iw,5775 +torch/nn/utils/clip_grad.py,sha256=Vujg1O3HwFMiYtBppIVXUjumkXb9q3Cv4a6uh7qnz40,11480 +torch/nn/utils/convert_parameters.py,sha256=xiTn9HykDVWMwcR_Kx4zTJrTWxtLlfPv3oWYxeSUku4,3213 +torch/nn/utils/fusion.py,sha256=hWBzG7SJQ35obxMV7Bsrg1GNlWRLU4znQjUgGxiZ24Y,6434 +torch/nn/utils/init.py,sha256=eA5Y0Ti3Qjhd-pCKEx9MpLHjJuz4bA3XNw6W0lC55XE,2250 +torch/nn/utils/memory_format.py,sha256=p0Ro5ZwDBNetA2-Y3TC06WJDreCuYgx0Es1MSniTT20,8274 +torch/nn/utils/parametrizations.py,sha256=Z-WuelFBf3gI_aTSKfk14kUXmW2RgVq8vmEz7RF-q6k,25776 +torch/nn/utils/parametrize.py,sha256=YS2q7nP1YBgS-Wow0wrXzAcGNrHcXExq7gt8_1NlRXw,36856 +torch/nn/utils/prune.py,sha256=mnAmevHeeu54_cEbTQJiSD9f-YZYOb-ZU0vjbq6Udu8,58397 +torch/nn/utils/rnn.py,sha256=PX4B1dLAPMGFgPNmftUBv00FKQIytuoO_XZr6SZHtH8,23409 +torch/nn/utils/spectral_norm.py,sha256=Ew3B4iDZOAJGwqfpVc-SmhBDz0586hg52A0hrJaHxFE,14936 +torch/nn/utils/stateless.py,sha256=3rQJAtpopS35ovIp8bCuoIBuz-xWr_0CFigLDwqlw7I,11568 +torch/nn/utils/weight_norm.py,sha256=AyxC7VlgSfeRd_e8Q8s42OyBum5Sh7kxUyohS1nSbV0,5882 +torch/numa/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/numa/__pycache__/__init__.cpython-310.pyc,, +torch/numa/__pycache__/binding.cpython-310.pyc,, +torch/numa/binding.py,sha256=negjusGJo3TNLoeXBzbgARzII1cZcVpDn9VV4cgzhDA,22268 +torch/onnx/__init__.py,sha256=YP3PKKXbByu8vI0F_2SeTHbqnn0RztKiQGKnOm8EoTg,15492 +torch/onnx/__pycache__/__init__.cpython-310.pyc,, +torch/onnx/__pycache__/_constants.cpython-310.pyc,, +torch/onnx/__pycache__/_flags.cpython-310.pyc,, +torch/onnx/__pycache__/errors.cpython-310.pyc,, +torch/onnx/__pycache__/operators.cpython-310.pyc,, +torch/onnx/__pycache__/symbolic_helper.cpython-310.pyc,, +torch/onnx/__pycache__/symbolic_opset10.cpython-310.pyc,, +torch/onnx/__pycache__/symbolic_opset11.cpython-310.pyc,, +torch/onnx/__pycache__/symbolic_opset12.cpython-310.pyc,, +torch/onnx/__pycache__/symbolic_opset13.cpython-310.pyc,, +torch/onnx/__pycache__/symbolic_opset14.cpython-310.pyc,, +torch/onnx/__pycache__/symbolic_opset15.cpython-310.pyc,, +torch/onnx/__pycache__/symbolic_opset16.cpython-310.pyc,, +torch/onnx/__pycache__/symbolic_opset17.cpython-310.pyc,, +torch/onnx/__pycache__/symbolic_opset18.cpython-310.pyc,, +torch/onnx/__pycache__/symbolic_opset19.cpython-310.pyc,, +torch/onnx/__pycache__/symbolic_opset20.cpython-310.pyc,, +torch/onnx/__pycache__/symbolic_opset7.cpython-310.pyc,, +torch/onnx/__pycache__/symbolic_opset8.cpython-310.pyc,, +torch/onnx/__pycache__/symbolic_opset9.cpython-310.pyc,, +torch/onnx/__pycache__/testing.cpython-310.pyc,, +torch/onnx/__pycache__/utils.cpython-310.pyc,, +torch/onnx/__pycache__/verification.cpython-310.pyc,, +torch/onnx/_constants.py,sha256=KsVyVjgGFLE_G3mr8-ilc3YY6_0zxbKHZsw1OVbQOUo,531 +torch/onnx/_flags.py,sha256=7gg9rPep-Oy_cuneXABiEItasVTVvsp5PJ7cfc_6KLA,1554 +torch/onnx/_internal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/onnx/_internal/__pycache__/__init__.cpython-310.pyc,, +torch/onnx/_internal/__pycache__/_lazy_import.cpython-310.pyc,, +torch/onnx/_internal/_lazy_import.py,sha256=xygw-S5099yDPu1xVluAV-5KwUlfpVlIYTHxlX1inRk,1246 +torch/onnx/_internal/exporter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/onnx/_internal/exporter/__pycache__/__init__.cpython-310.pyc,, +torch/onnx/_internal/exporter/__pycache__/_analysis.cpython-310.pyc,, +torch/onnx/_internal/exporter/__pycache__/_building.cpython-310.pyc,, +torch/onnx/_internal/exporter/__pycache__/_capture_strategies.cpython-310.pyc,, +torch/onnx/_internal/exporter/__pycache__/_compat.cpython-310.pyc,, +torch/onnx/_internal/exporter/__pycache__/_constants.cpython-310.pyc,, +torch/onnx/_internal/exporter/__pycache__/_core.cpython-310.pyc,, +torch/onnx/_internal/exporter/__pycache__/_decomp.cpython-310.pyc,, +torch/onnx/_internal/exporter/__pycache__/_dispatching.cpython-310.pyc,, +torch/onnx/_internal/exporter/__pycache__/_dynamic_shapes.cpython-310.pyc,, +torch/onnx/_internal/exporter/__pycache__/_errors.cpython-310.pyc,, +torch/onnx/_internal/exporter/__pycache__/_flags.cpython-310.pyc,, +torch/onnx/_internal/exporter/__pycache__/_fx_passes.cpython-310.pyc,, +torch/onnx/_internal/exporter/__pycache__/_ir_passes.cpython-310.pyc,, +torch/onnx/_internal/exporter/__pycache__/_isolated.cpython-310.pyc,, +torch/onnx/_internal/exporter/__pycache__/_onnx_program.cpython-310.pyc,, +torch/onnx/_internal/exporter/__pycache__/_registration.cpython-310.pyc,, +torch/onnx/_internal/exporter/__pycache__/_reporting.cpython-310.pyc,, +torch/onnx/_internal/exporter/__pycache__/_schemas.cpython-310.pyc,, +torch/onnx/_internal/exporter/__pycache__/_tensors.cpython-310.pyc,, +torch/onnx/_internal/exporter/__pycache__/_testing.cpython-310.pyc,, +torch/onnx/_internal/exporter/__pycache__/_type_casting.cpython-310.pyc,, +torch/onnx/_internal/exporter/__pycache__/_verification.cpython-310.pyc,, +torch/onnx/_internal/exporter/_analysis.py,sha256=hf7JJxvKcZWYihn4vtMGxYubPabiTMIiqvbnxPNUWg8,10071 +torch/onnx/_internal/exporter/_building.py,sha256=0prsplsrZp8M3pkErlVDS2xEOHPaJ_V5263_tCNfaLY,29382 +torch/onnx/_internal/exporter/_capture_strategies.py,sha256=_44t8rQA4cMcINhZj6I8At_WgEDdI4_qJ9ZM7cFu36s,10578 +torch/onnx/_internal/exporter/_compat.py,sha256=-eRZxVhhWHeY45SzAdYeLFhLfV_eZnEf904lFlLyH_I,9531 +torch/onnx/_internal/exporter/_constants.py,sha256=y8ST-ZGRhbGrA_d-oM2xapBMa0hnFcEgLbLxt8pcMn4,378 +torch/onnx/_internal/exporter/_core.py,sha256=nNfGbWFhYMZfHxS9i-viLfe3IzXujC7IPXxGBtpL6p0,68770 +torch/onnx/_internal/exporter/_decomp.py,sha256=lTMejROAFz6WfV9nukQ6DThbdWll7-2XqWAmt5ZiiqA,2869 +torch/onnx/_internal/exporter/_dispatching.py,sha256=UBFm9Ph1FGgmR-bqhQLCSlcK_agtt9Sqs8QVWC17mLw,14768 +torch/onnx/_internal/exporter/_dynamic_shapes.py,sha256=Eezc69_Woj1sl0RIbn3RKXxfg0kYxMDu_kG9i2GGPFU,14437 +torch/onnx/_internal/exporter/_errors.py,sha256=VziOIvyap9A_UDRP41HkC_s0J-R13dbCrVLIusF-6A8,535 +torch/onnx/_internal/exporter/_flags.py,sha256=0vyPbWUoBb_BUpGJpR5JRKZJxlXfk312XsdrbZsD9JM,794 +torch/onnx/_internal/exporter/_fx_passes.py,sha256=3spXyuBmD5B7__EBEE7UMVquUP4ti6BZdz5ionjopqI,1840 +torch/onnx/_internal/exporter/_ir_passes.py,sha256=Tfz3G2kO4pSsLOnED4t-3DmbkALge4KpmUZg5GbD85I,4940 +torch/onnx/_internal/exporter/_isolated.py,sha256=V5WRzYKVHIgDXUaj77DkyEUMoJ2sdXAlZ0q2CsewhKw,1928 +torch/onnx/_internal/exporter/_onnx_program.py,sha256=hxb_iMdRZ2o1Y-7zLI1tdEvsDjcC7Xajy6SHcea5g1w,18565 +torch/onnx/_internal/exporter/_registration.py,sha256=3M0KVTorSj70Bx83zIw9DlGGUTtoYPo3poCiBPvOy0I,12631 +torch/onnx/_internal/exporter/_reporting.py,sha256=6W6rplMRhS3M3c4dXlAPLjiwPMNPrDZTjfsNZ3UBZPg,7384 +torch/onnx/_internal/exporter/_schemas.py,sha256=nL8XEUf7JC_JxMHM0CH6p59wV0fGCTsCWM0FHT40y18,20718 +torch/onnx/_internal/exporter/_tensors.py,sha256=DlkG9NKRI-8maW2hSj4pSTOu12xuZVN5o-NqYah3k4w,2613 +torch/onnx/_internal/exporter/_testing.py,sha256=vn4KD6-Cd7pD7NUVEWJv8M_dvCeCWobEucKpjvZQPVg,3993 +torch/onnx/_internal/exporter/_torchlib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/onnx/_internal/exporter/_torchlib/__pycache__/__init__.cpython-310.pyc,, +torch/onnx/_internal/exporter/_torchlib/__pycache__/_tensor_typing.cpython-310.pyc,, +torch/onnx/_internal/exporter/_torchlib/__pycache__/_torchlib_registry.cpython-310.pyc,, +torch/onnx/_internal/exporter/_torchlib/_tensor_typing.py,sha256=JHhDsn_lG0pKsa-apEM8D4KvRoOOH2Uhy6_X4nxG7wY,1793 +torch/onnx/_internal/exporter/_torchlib/_torchlib_registry.py,sha256=jW4S1Slfj03D3k5E1LtJHmLRoWXWebyKsvT2Vl7J5oQ,2829 +torch/onnx/_internal/exporter/_torchlib/ops/__init__.py,sha256=bgyPtdiM9s1nE_1ZdR_6-0y0Tea9o0Qiyts2wWU7EM4,180 +torch/onnx/_internal/exporter/_torchlib/ops/__pycache__/__init__.cpython-310.pyc,, +torch/onnx/_internal/exporter/_torchlib/ops/__pycache__/core.cpython-310.pyc,, +torch/onnx/_internal/exporter/_torchlib/ops/__pycache__/hop.cpython-310.pyc,, +torch/onnx/_internal/exporter/_torchlib/ops/__pycache__/nn.cpython-310.pyc,, +torch/onnx/_internal/exporter/_torchlib/ops/__pycache__/symbolic.cpython-310.pyc,, +torch/onnx/_internal/exporter/_torchlib/ops/__pycache__/symops.cpython-310.pyc,, +torch/onnx/_internal/exporter/_torchlib/ops/core.py,sha256=NMSMQLta-VKSWasAcaUQ7h03h62B0WO3cZC2OsN7U0k,1568 +torch/onnx/_internal/exporter/_torchlib/ops/hop.py,sha256=wz02t6P3ho1UGNu2_hASITTBZBK1g6Ehx-kaVQaznz8,5309 +torch/onnx/_internal/exporter/_torchlib/ops/nn.py,sha256=RTR5YpC4lqQLuKuvQUWtHon7J7u5Znd8SqitXIz0dxI,13942 +torch/onnx/_internal/exporter/_torchlib/ops/symbolic.py,sha256=L_UmNJ7hxPi4hytioLUT8T6a0vKhTiWqaBblRFITtYQ,4722 +torch/onnx/_internal/exporter/_torchlib/ops/symops.py,sha256=sATKG3Ln9dlJGTj4gLLpRNx-a1cx49xfUrjpbGsGQH4,1172 +torch/onnx/_internal/exporter/_type_casting.py,sha256=hCTUy4U8abpYW0sNmvUPWvZfCxhjx-NyU5LuY9kvdY0,1161 +torch/onnx/_internal/exporter/_verification.py,sha256=A0lm3xjvYLK4_tpH9aldElVSG6BzZq3OEOq7nXWPh2U,12502 +torch/onnx/_internal/fx/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/onnx/_internal/fx/__pycache__/__init__.cpython-310.pyc,, +torch/onnx/_internal/fx/__pycache__/_pass.cpython-310.pyc,, +torch/onnx/_internal/fx/__pycache__/type_utils.cpython-310.pyc,, +torch/onnx/_internal/fx/_pass.py,sha256=ijrOE4Clp5xEKvTid1WJPDwa2QWqkC5FKMu_FOrZrj0,8638 +torch/onnx/_internal/fx/passes/__init__.py,sha256=mImXwcuJd6IfP3-3RkuLStx9i0ykJK8dhozuZNwRdpA,91 +torch/onnx/_internal/fx/passes/__pycache__/__init__.cpython-310.pyc,, +torch/onnx/_internal/fx/passes/__pycache__/type_promotion.cpython-310.pyc,, +torch/onnx/_internal/fx/passes/type_promotion.py,sha256=SdIJvN-9gWrCQh9Quu5We4vG4aYJLlKqEQxJAmg_8Mk,64728 +torch/onnx/_internal/fx/type_utils.py,sha256=zzMW9zPqINHo5IlOUmO82CJTuUCzwsxg1Cvkh-XrRS8,5820 +torch/onnx/_internal/torchscript_exporter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/onnx/_internal/torchscript_exporter/__pycache__/__init__.cpython-310.pyc,, +torch/onnx/_internal/torchscript_exporter/__pycache__/_experimental.cpython-310.pyc,, +torch/onnx/_internal/torchscript_exporter/__pycache__/_globals.cpython-310.pyc,, +torch/onnx/_internal/torchscript_exporter/__pycache__/_type_utils.cpython-310.pyc,, +torch/onnx/_internal/torchscript_exporter/__pycache__/jit_utils.cpython-310.pyc,, +torch/onnx/_internal/torchscript_exporter/__pycache__/onnx_proto_utils.cpython-310.pyc,, +torch/onnx/_internal/torchscript_exporter/__pycache__/registration.cpython-310.pyc,, +torch/onnx/_internal/torchscript_exporter/__pycache__/symbolic_helper.cpython-310.pyc,, +torch/onnx/_internal/torchscript_exporter/__pycache__/symbolic_opset10.cpython-310.pyc,, +torch/onnx/_internal/torchscript_exporter/__pycache__/symbolic_opset11.cpython-310.pyc,, +torch/onnx/_internal/torchscript_exporter/__pycache__/symbolic_opset12.cpython-310.pyc,, +torch/onnx/_internal/torchscript_exporter/__pycache__/symbolic_opset13.cpython-310.pyc,, +torch/onnx/_internal/torchscript_exporter/__pycache__/symbolic_opset14.cpython-310.pyc,, +torch/onnx/_internal/torchscript_exporter/__pycache__/symbolic_opset15.cpython-310.pyc,, +torch/onnx/_internal/torchscript_exporter/__pycache__/symbolic_opset16.cpython-310.pyc,, +torch/onnx/_internal/torchscript_exporter/__pycache__/symbolic_opset17.cpython-310.pyc,, +torch/onnx/_internal/torchscript_exporter/__pycache__/symbolic_opset18.cpython-310.pyc,, +torch/onnx/_internal/torchscript_exporter/__pycache__/symbolic_opset19.cpython-310.pyc,, +torch/onnx/_internal/torchscript_exporter/__pycache__/symbolic_opset20.cpython-310.pyc,, +torch/onnx/_internal/torchscript_exporter/__pycache__/symbolic_opset7.cpython-310.pyc,, +torch/onnx/_internal/torchscript_exporter/__pycache__/symbolic_opset8.cpython-310.pyc,, +torch/onnx/_internal/torchscript_exporter/__pycache__/symbolic_opset9.cpython-310.pyc,, +torch/onnx/_internal/torchscript_exporter/__pycache__/utils.cpython-310.pyc,, +torch/onnx/_internal/torchscript_exporter/__pycache__/verification.cpython-310.pyc,, +torch/onnx/_internal/torchscript_exporter/_experimental.py,sha256=HZDRgJ_2gR2664BL8J5I5QH02kiUwfeI55yiBWB22yE,1033 +torch/onnx/_internal/torchscript_exporter/_globals.py,sha256=dEltGsC4MJTeVUCaAYm3-L6xpjaNPZkGBNwG7jfM47Q,2801 +torch/onnx/_internal/torchscript_exporter/_type_utils.py,sha256=0V0OxtM_ezeGm81PGcMYKdi-p9jF9DxTXZMyUFkECJE,13980 +torch/onnx/_internal/torchscript_exporter/jit_utils.py,sha256=G54JtruScTA0GKf3uoQs6YsfUPWeRFc8jeynIrSKpy4,13986 +torch/onnx/_internal/torchscript_exporter/onnx_proto_utils.py,sha256=ZJjtM23Wca6-idsxqQK--FJbk_5bkUf5oF4kiWVYoZY,9196 +torch/onnx/_internal/torchscript_exporter/registration.py,sha256=rAJXA-E-qwKzS8M-376LEWobt_HdSan1y-5RFla4nB0,11182 +torch/onnx/_internal/torchscript_exporter/symbolic_helper.py,sha256=xBqBuw_iL4ojvBRv-NKXcvueD8ShDliKhm7VXLCgocM,85878 +torch/onnx/_internal/torchscript_exporter/symbolic_opset10.py,sha256=_I6137y8hDaLuvXH2lUaNB3SkcnYgijPOeEzCYk02BA,37634 +torch/onnx/_internal/torchscript_exporter/symbolic_opset11.py,sha256=RSWXkus5f1uURfj7UXh0LIV6seZTLPhgiesWBUEzz8U,53594 +torch/onnx/_internal/torchscript_exporter/symbolic_opset12.py,sha256=TzgOUMDVwx3ttTpG1rx1VJBJmLFJAFP_pdxmjr6xf-k,15756 +torch/onnx/_internal/torchscript_exporter/symbolic_opset13.py,sha256=7XIs0ZyCmujWOiGgU_0jTjGC2uJ9fUdhx5h4_6nYRfc,41451 +torch/onnx/_internal/torchscript_exporter/symbolic_opset14.py,sha256=ke3fcxZwLcOeR65HBVfpjOjpP7XoQcV1gSuVxpERypI,10386 +torch/onnx/_internal/torchscript_exporter/symbolic_opset15.py,sha256=yUBs1fDhvIx7-aWghD1ZtBbYwlVODGJrb_Tk1HQPEFQ,2892 +torch/onnx/_internal/torchscript_exporter/symbolic_opset16.py,sha256=QRJIIAf0VwR4NseYTKn5K3TGNJ8sBNYsgdbQBfxG0oY,6456 +torch/onnx/_internal/torchscript_exporter/symbolic_opset17.py,sha256=7hNlJ7lMbVZsutDQvLFxfpoKGRa4njNv8cbCSMBC9QM,8236 +torch/onnx/_internal/torchscript_exporter/symbolic_opset18.py,sha256=sfpwiW82KHkxpJJxqPjTtn2k_TfypndUKgqvnrZf9sw,8206 +torch/onnx/_internal/torchscript_exporter/symbolic_opset19.py,sha256=mdWDL5ju6R87V0WlsPnwFidl5EwyPeOb4roJkXLW1fI,536 +torch/onnx/_internal/torchscript_exporter/symbolic_opset20.py,sha256=LUCfXezm0zhOyDiSHhuYJac_y9DoIgTtAzgIJ-UtkOw,2462 +torch/onnx/_internal/torchscript_exporter/symbolic_opset7.py,sha256=d71ZOvg4TYXfi9AP3F3YxtUrqrTXxkcXV6Qj0aSQAI0,2192 +torch/onnx/_internal/torchscript_exporter/symbolic_opset8.py,sha256=jR_c6xodWrKtmz8CaV_1zS4Ywhr-xG4DKBOzRajmETY,15081 +torch/onnx/_internal/torchscript_exporter/symbolic_opset9.py,sha256=ONT0ZrDN_X8_8iFBYP17MrB5rGc0H-v9Kdv_Kg3ckMA,224288 +torch/onnx/_internal/torchscript_exporter/utils.py,sha256=3GTXTFT5DTiUMv8SV5TNHPp0QRHKfRLHBba35QHdr_s,76631 +torch/onnx/_internal/torchscript_exporter/verification.py,sha256=GwzdBrlaezXTl7gY_Ctu3HxZ-HoLieiNxZQHCDDkyfM,19154 +torch/onnx/errors.py,sha256=7Svwc5kOBcoGNz4d7rZ0Cdh217IkmlDADQZOeFL9flg,3478 +torch/onnx/operators.py,sha256=fS94DP2lYBZwI8qpxN6VWHWuTrvD7VWueC8eonqRbnE,1185 +torch/onnx/ops/__init__.py,sha256=OLQtAPGNTE3dZM_4u3KOTedP6OodYoP_2kzIYdliJuE,20939 +torch/onnx/ops/__pycache__/__init__.cpython-310.pyc,, +torch/onnx/ops/__pycache__/_dtype_mappings.cpython-310.pyc,, +torch/onnx/ops/__pycache__/_impl.cpython-310.pyc,, +torch/onnx/ops/__pycache__/_symbolic_impl.cpython-310.pyc,, +torch/onnx/ops/_dtype_mappings.py,sha256=T2_Rwd7HR5CzErvrphymlsCk0kRZhauZdhZbi0JZb3Y,836 +torch/onnx/ops/_impl.py,sha256=94Dkjbor-MpvC-iWDi88VCEg6r_9HONFP60XXQeOPYE,19965 +torch/onnx/ops/_symbolic_impl.py,sha256=24BTqbscR8TszMJ_sSXpRqyUwhRURZfV_N2qQYLvYgg,11765 +torch/onnx/symbolic_helper.py,sha256=LIHrpW5b175KG4GTm6gWc9WISbYYmgkKEd-hXXRGyGw,222 +torch/onnx/symbolic_opset10.py,sha256=SYoifeNPe7fnfUQ1o7oOfsfJTBkRjsgI-spAJ4zqZfU,325 +torch/onnx/symbolic_opset11.py,sha256=HER3r7zS8st1M2PCCZdyUkDp4ImPaAp4h5-yNjg8arM,224 +torch/onnx/symbolic_opset12.py,sha256=xaQpIzjkwHUiPIsJ3PTDfh-9_DH8ko_Ryve2_oZv4JI,224 +torch/onnx/symbolic_opset13.py,sha256=WqXlv_pfF46qr5GdBgwGQjPYF9kJtuk9EXMyQeQppfM,224 +torch/onnx/symbolic_opset14.py,sha256=nTk5SFQne8C41KTD8ZNyBF5vQfF_YZvg2qXmpA75QYA,224 +torch/onnx/symbolic_opset15.py,sha256=UnyYwoNDZ4wsiSjLzTQug9TabHmEEkXXzt53IPH-aB0,224 +torch/onnx/symbolic_opset16.py,sha256=lo4OY1dQwuJfL52MUh7zuQDdVhyxBJOnsJTTQDTWsnQ,224 +torch/onnx/symbolic_opset17.py,sha256=IdVLH_n6JA3TttyJ6NI1HFYpDdwTChRB5ZjSd7szl7w,224 +torch/onnx/symbolic_opset18.py,sha256=0yKeke5KAewf1P536eOWLondGHKk-kPp1etMqtCyyek,224 +torch/onnx/symbolic_opset19.py,sha256=sUngszvMGJzrGCyrzTuZgSA-aOY4G9-niC9JuwCsVuQ,224 +torch/onnx/symbolic_opset20.py,sha256=rz2fMG4kDcGK1j0qTEb77TwYXBhFVtS_JuIVjp0KMpk,224 +torch/onnx/symbolic_opset7.py,sha256=M27NKKqPnRtfFaW-M5MKFxQ7n0chpvTLN66xwuSyuOA,222 +torch/onnx/symbolic_opset8.py,sha256=8yMePMZ6epwV-RxEKja0OHDGddthTfL0zc7eBoOb-ys,222 +torch/onnx/symbolic_opset9.py,sha256=jAXYpzkr9EBN7tpGVw3JCJhuZN2yWmHVmty_3HgdEeQ,391 +torch/onnx/testing.py,sha256=QbAECaWoSos_a1XwM_KBh63qvQVajvlnMDHr0qUnNO4,219 +torch/onnx/utils.py,sha256=-qCzBD-q5XxSHGEBxw-VSxii2--pBaBsWpC-IVn2uJg,233 +torch/onnx/verification.py,sha256=L6GdYIC4gPAgZu4uXJmib7vG7u_1bkMMnXmee70zveU,343 +torch/optim/__init__.py,sha256=IJRMuKRPeA_LG1xGkftt7lCJtIUcZumTdvnYTHckfRA,2205 +torch/optim/__pycache__/__init__.cpython-310.pyc,, +torch/optim/__pycache__/_adafactor.cpython-310.pyc,, +torch/optim/__pycache__/_functional.cpython-310.pyc,, +torch/optim/__pycache__/_muon.cpython-310.pyc,, +torch/optim/__pycache__/adadelta.cpython-310.pyc,, +torch/optim/__pycache__/adagrad.cpython-310.pyc,, +torch/optim/__pycache__/adam.cpython-310.pyc,, +torch/optim/__pycache__/adamax.cpython-310.pyc,, +torch/optim/__pycache__/adamw.cpython-310.pyc,, +torch/optim/__pycache__/asgd.cpython-310.pyc,, +torch/optim/__pycache__/lbfgs.cpython-310.pyc,, +torch/optim/__pycache__/lr_scheduler.cpython-310.pyc,, +torch/optim/__pycache__/nadam.cpython-310.pyc,, +torch/optim/__pycache__/optimizer.cpython-310.pyc,, +torch/optim/__pycache__/radam.cpython-310.pyc,, +torch/optim/__pycache__/rmsprop.cpython-310.pyc,, +torch/optim/__pycache__/rprop.cpython-310.pyc,, +torch/optim/__pycache__/sgd.cpython-310.pyc,, +torch/optim/__pycache__/sparse_adam.cpython-310.pyc,, +torch/optim/__pycache__/swa_utils.cpython-310.pyc,, +torch/optim/_adafactor.py,sha256=7V2pOaIq8LxDGeeUMnCBxVr-Eyq7iT4c_8tmjPhMK4U,28505 +torch/optim/_functional.py,sha256=kYDxfTcm5jVdomzxYI38DtdvmbyvtHJT3jG9b1cuxLc,3250 +torch/optim/_multi_tensor/__init__.py,sha256=QDNuwnjJKxJYZ3RXNdXO0prL2H0xS15WUHxbwQe0CBc,1068 +torch/optim/_multi_tensor/__init__.pyi,sha256=Q4IMQ5dfkrDDq7ooUZubB4Okb7KHVhWpjx5HUF3f7hY,537 +torch/optim/_multi_tensor/__pycache__/__init__.cpython-310.pyc,, +torch/optim/_muon.py,sha256=OOlZGEJL0mYE94YZWkqnKvtgZ0tKycy953eXQBPLH1I,13619 +torch/optim/adadelta.py,sha256=heONEIv-KrGw3ok5otWhPpWrh5esfq-54-_b9XDWa0g,16844 +torch/optim/adagrad.py,sha256=8VnABK3P0swSBB-5xUj2qrODowHgTBqn9m6R9ITJnBw,21102 +torch/optim/adam.py,sha256=aRJG4QSlTD_5hZIqT1Ua6giMBsM1ihiGHlnDSpINIeE,40142 +torch/optim/adamax.py,sha256=l7EehwOJ6JO6n71yihuRa7zOyiwWqCL0ZqOcXz2rQZI,17480 +torch/optim/adamw.py,sha256=VCmQVrd0XBYhkhMrtgKPM4fAX_QgNRj_AkAFhYSWgxI,7388 +torch/optim/asgd.py,sha256=6HfLehKnLUmoQ5zQcZLDi8FKrBotw1LQwkeIf_8hg1w,16495 +torch/optim/lbfgs.py,sha256=3MRZNMJAfUsYbbODuo0ymWH7gjfDDLHsVv__bZbCRlE,20047 +torch/optim/lr_scheduler.py,sha256=5WGLmRgss_y_YVXltvAP1HGgkzJy2wmMN1vbkKZLIIQ,103616 +torch/optim/nadam.py,sha256=Rhhe9T0eL5AjlLA2Zy7nIdtI7LbWe9hLcyi_OQtPZ6Y,26714 +torch/optim/optimizer.py,sha256=Qt8x387-g4kAR7CSLIWwQhDpw_mwObbqMR-HW9dETC4,50978 +torch/optim/radam.py,sha256=T5naPFdCJRdxgfBU85X8O45Po3mXnGkxHpqEeuuzZg4,25028 +torch/optim/rmsprop.py,sha256=7k5hLYPFQ90617ZFgwzVmBKq1s4deaaOmS9-t1Xg7L0,20583 +torch/optim/rprop.py,sha256=sYndravfwvp4IkHttSapE4Yk4bmdxygkb-XT9wT_1qg,17688 +torch/optim/sgd.py,sha256=jJfxKJkjV08qStf_L7dY6m5m4b5ljQOamjuuEKEiKig,20354 +torch/optim/sparse_adam.py,sha256=M9uMYpTVzM2Jy7WOjLYWxGLTX7RTAh44lYN1fohPoQg,8046 +torch/optim/swa_utils.py,sha256=lIHMGrYgzI5rlZG_o5wSEKjP3o252mZQ2bm7_mxvgy4,21807 +torch/overrides.py,sha256=fEEQ7OGvIl79S8r0-w_OigncA36zif9FitBkZKANFdY,105642 +torch/package/__init__.py,sha256=ZLLvoviHHErV-XQZagde2I4cuNDK49dFLRGUC5oyOFc,388 +torch/package/__pycache__/__init__.cpython-310.pyc,, +torch/package/__pycache__/_digraph.cpython-310.pyc,, +torch/package/__pycache__/_directory_reader.cpython-310.pyc,, +torch/package/__pycache__/_importlib.cpython-310.pyc,, +torch/package/__pycache__/_mangling.cpython-310.pyc,, +torch/package/__pycache__/_mock.cpython-310.pyc,, +torch/package/__pycache__/_package_pickler.cpython-310.pyc,, +torch/package/__pycache__/_package_unpickler.cpython-310.pyc,, +torch/package/__pycache__/_stdlib.cpython-310.pyc,, +torch/package/__pycache__/file_structure_representation.cpython-310.pyc,, +torch/package/__pycache__/find_file_dependencies.cpython-310.pyc,, +torch/package/__pycache__/glob_group.cpython-310.pyc,, +torch/package/__pycache__/importer.cpython-310.pyc,, +torch/package/__pycache__/package_exporter.cpython-310.pyc,, +torch/package/__pycache__/package_importer.cpython-310.pyc,, +torch/package/_digraph.py,sha256=sFyjCdLOgMvWt5Z8I5f_iliJqdnSRahZF58FPpv4DLA,5630 +torch/package/_directory_reader.py,sha256=4CzVDaz_zvXlYrgPfIJe5PGxyBHpFhMBGNiJvOeGOLM,1915 +torch/package/_importlib.py,sha256=chdvY9cde326LrzXj8VnjV_3eNqrMlhuPwhuEO0BvaQ,2998 +torch/package/_mangling.py,sha256=AcYB3eQBkuEVVtUfILoCzrQiqvjR_L5c0S3tDNIUReE,1892 +torch/package/_mock.py,sha256=n4L1d-hoa5XO7kyAlxbYMjeZWa2vwQ_-7Ih_dZfH0SA,2866 +torch/package/_package_pickler.py,sha256=b5WTWIdtQqGWQRUXXLyKMRYLWHVsBis_ZuY6Q_hRq2c,5615 +torch/package/_package_unpickler.py,sha256=hBxGPJDOF1wWmGVAfvN4FMCmm1o1Qt4pDKPmCdSdH-k,992 +torch/package/_stdlib.py,sha256=0Y8CEuUZa639Pb_jPi5Mt7ZYvPlxnGMyqk0_IJ9Nwlk,591 +torch/package/analyze/__init__.py,sha256=RtjmM0jmYQwfuv9mQoKgZQZBij-GQ4cFcJX7_-aihDg,130 +torch/package/analyze/__pycache__/__init__.cpython-310.pyc,, +torch/package/analyze/__pycache__/find_first_use_of_broken_modules.cpython-310.pyc,, +torch/package/analyze/__pycache__/is_from_package.cpython-310.pyc,, +torch/package/analyze/__pycache__/trace_dependencies.cpython-310.pyc,, +torch/package/analyze/find_first_use_of_broken_modules.py,sha256=6vS1J-nNAUNV7ZY9ND--3t3hsVC48D4owSdzWko9LP0,1035 +torch/package/analyze/is_from_package.py,sha256=5RN5zZTnmZiMxadQGK3OVYl38Q37nYS92FDVXrpQVEw,404 +torch/package/analyze/trace_dependencies.py,sha256=PHXKGtmWdCy7VczGvfVcV7AwFhFqfToPYVcTI5nSxec,2235 +torch/package/file_structure_representation.py,sha256=WxViio-LC3FFQ-qsPfqFWP06LOIOtjS91gGzWW8x_aI,4746 +torch/package/find_file_dependencies.py,sha256=-47nZhmmsTN92nmLp09KAmymnSzOAiXf5f65-umr_jc,3948 +torch/package/glob_group.py,sha256=JbQhUMBRqeLFEt95MvbZcOVaMRu81nvhSxkx9_vLbng,3665 +torch/package/importer.py,sha256=S3AiYDaTi0sMMt0I_HqbIwA5Y_qMonqg-V_Eh0ZiR2o,10242 +torch/package/package_exporter.py,sha256=1-RLYv22L1ghxQx769rkH6mp40bCRPf5h7FMfcGjUyc,50866 +torch/package/package_importer.py,sha256=OAgSnWFqDzfM6dlC0UjcZv-lcpVE1woTMHNsK5jjW34,31688 +torch/profiler/__init__.py,sha256=wkycjPawFAc2hKygHPFfcAfdkKKII5tR_Tp4GpGF0tw,1726 +torch/profiler/__pycache__/__init__.cpython-310.pyc,, +torch/profiler/__pycache__/_memory_profiler.cpython-310.pyc,, +torch/profiler/__pycache__/_pattern_matcher.cpython-310.pyc,, +torch/profiler/__pycache__/_utils.cpython-310.pyc,, +torch/profiler/__pycache__/itt.cpython-310.pyc,, +torch/profiler/__pycache__/profiler.cpython-310.pyc,, +torch/profiler/__pycache__/python_tracer.cpython-310.pyc,, +torch/profiler/_memory_profiler.py,sha256=jPp0uxP5VGhJt4LvhjxFZYrSZ2gToh0ejCKwZ-wOPQQ,48443 +torch/profiler/_pattern_matcher.py,sha256=ra8yh9MmReE3CqO5viFyIjsf4zC38oU1a6oFohS_njU,24982 +torch/profiler/_utils.py,sha256=F1xF-LxEP-fdw022eTBlDsaTCPc-6gJFL_S_0twNMAk,21696 +torch/profiler/itt.py,sha256=GwDQYUY-qkdGn6Yg5VuS52aih12iJWLrPxdE3EMEXeg,1830 +torch/profiler/profiler.py,sha256=EBodLZ_AsnuH42U37AGgSpjLaJakG39sHBSy8MFvQEI,47745 +torch/profiler/python_tracer.py,sha256=x5uqqvGYD1eyQS0r1rPpzmkSnQ7ScZt7T6tR7uOgX9o,476 +torch/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/quantization/__init__.py,sha256=26_HXlyQPbMEKh9UcXaBxPecNP82NbYXWWd0JuWeNtE,2654 +torch/quantization/__pycache__/__init__.cpython-310.pyc,, +torch/quantization/__pycache__/_numeric_suite.cpython-310.pyc,, +torch/quantization/__pycache__/_numeric_suite_fx.cpython-310.pyc,, +torch/quantization/__pycache__/_quantized_conversions.cpython-310.pyc,, +torch/quantization/__pycache__/fake_quantize.cpython-310.pyc,, +torch/quantization/__pycache__/fuse_modules.cpython-310.pyc,, +torch/quantization/__pycache__/fuser_method_mappings.cpython-310.pyc,, +torch/quantization/__pycache__/observer.cpython-310.pyc,, +torch/quantization/__pycache__/qconfig.cpython-310.pyc,, +torch/quantization/__pycache__/quant_type.cpython-310.pyc,, +torch/quantization/__pycache__/quantization_mappings.cpython-310.pyc,, +torch/quantization/__pycache__/quantize.cpython-310.pyc,, +torch/quantization/__pycache__/quantize_fx.cpython-310.pyc,, +torch/quantization/__pycache__/quantize_jit.cpython-310.pyc,, +torch/quantization/__pycache__/stubs.cpython-310.pyc,, +torch/quantization/__pycache__/utils.cpython-310.pyc,, +torch/quantization/_numeric_suite.py,sha256=kGqWAUJhc0DKg9RjXhiKRx7dxfmX-M5Y1w9jAEnU0Z0,779 +torch/quantization/_numeric_suite_fx.py,sha256=LkEYZQLt_CRTe4d_9EAvCzpuKKHTmTjYoXLXcawjN-I,752 +torch/quantization/_quantized_conversions.py,sha256=Xr23SEEq14CPzvm26uNtJ7P5njsNOAGeUF8gY8cPl7Y,4358 +torch/quantization/fake_quantize.py,sha256=AZes9LhE_KB-0Q_nV0Qy5kSOY0N9cvv7NPEpdjTwBz4,1015 +torch/quantization/fuse_modules.py,sha256=qdHvwLDuYEu2zJaAKtztSbw157nYTS5rJLCKBbBLPRA,732 +torch/quantization/fuser_method_mappings.py,sha256=QT2XYwG6LRioeQPh0lrmZ2awt05ejXODVO3S1BFgu-I,512 +torch/quantization/fx/__init__.py,sha256=s3Wh6JJbmUuv-pk4yieKjDpsHZRUkEqW04jRMT9iJPs,594 +torch/quantization/fx/__pycache__/__init__.cpython-310.pyc,, +torch/quantization/fx/__pycache__/_equalize.cpython-310.pyc,, +torch/quantization/fx/__pycache__/convert.cpython-310.pyc,, +torch/quantization/fx/__pycache__/fuse.cpython-310.pyc,, +torch/quantization/fx/__pycache__/fusion_patterns.cpython-310.pyc,, +torch/quantization/fx/__pycache__/graph_module.cpython-310.pyc,, +torch/quantization/fx/__pycache__/match_utils.cpython-310.pyc,, +torch/quantization/fx/__pycache__/pattern_utils.cpython-310.pyc,, +torch/quantization/fx/__pycache__/prepare.cpython-310.pyc,, +torch/quantization/fx/__pycache__/quantization_patterns.cpython-310.pyc,, +torch/quantization/fx/__pycache__/quantization_types.cpython-310.pyc,, +torch/quantization/fx/__pycache__/utils.cpython-310.pyc,, +torch/quantization/fx/_equalize.py,sha256=lqBIInk3Gq4t2kdsaO0vpkjpCXriv5WQAgCP2uKlbak,1251 +torch/quantization/fx/convert.py,sha256=hQUg5B8P8CByLc7JIHeBEm15VHyuxPWxv2zFgo5oYmc,387 +torch/quantization/fx/fuse.py,sha256=xKT6NKY-nOHbiUAhvd6UyFLOWaN7IzTXzQkQQRM1OCM,381 +torch/quantization/fx/fusion_patterns.py,sha256=qSu3LbPeOO8dbO14vvA-yHKvoflh8F4Ta6JLCYOfmxU,416 +torch/quantization/fx/graph_module.py,sha256=Q2bphJkn60j97Wvy_gAOol-sAx5VKavZujO5Z1ChBmg,574 +torch/quantization/fx/match_utils.py,sha256=qFqoYdkrjA4jB2Figx-06RzeiN3KGs5WYt68TRqRYKs,457 +torch/quantization/fx/pattern_utils.py,sha256=8YjiPNSE0n9A6pLrlsv92foYAx37EWl93C5tHbxKrUQ,1299 +torch/quantization/fx/prepare.py,sha256=k6hE4OfbcI8r-csnlRP9gd8E4Hbak6NIO-q4E2_TPTg,387 +torch/quantization/fx/quantization_patterns.py,sha256=Qws7uHQqdnaF9nK_UPx_ACyQiREN7D40F9QqcuFafdQ,2088 +torch/quantization/fx/quantization_types.py,sha256=FC78rHJfePvTdJfTmXfKCBUXtz2mbF1SK7s3401zhZY,396 +torch/quantization/fx/utils.py,sha256=3KZFWzVZPxCpzxlNUxv3xigcpmYg2AmtaOyJfKtfuCM,724 +torch/quantization/observer.py,sha256=J8sHSdsC9i6OqY4_OpzrTOqeHS1fZF_VmN132CZQWsY,1079 +torch/quantization/qconfig.py,sha256=NT4W-h_HrXKX06TnuRxrvfnv5Kwho6Xa4vd7ESA7RHs,944 +torch/quantization/quant_type.py,sha256=wwPL8MSv-G6QV5LogvkL4xRJ28Ido0yA7kPzh2dsIo0,399 +torch/quantization/quantization_mappings.py,sha256=F4DwF6qNFg8h4xhKvp8nBGuLLr5VwNjNjRoSTWFebdI,1148 +torch/quantization/quantize.py,sha256=g8mA0kRJIO2z63PuUcawc9bovat-uVjeUxIKFwvLb-I,804 +torch/quantization/quantize_fx.py,sha256=hBC2pUobd9oeYUliLKlIYE2dQ-6BQvdxg2xTyvkFLa8,736 +torch/quantization/quantize_jit.py,sha256=JNw2_M1d6EITYzYrXlrAsUac_4tX-IDMuAO_7prxhk8,714 +torch/quantization/stubs.py,sha256=ukEM_vZ34I3UdBnhFPn5GFL713MwFlEysXUAfYGshnA,392 +torch/quantization/utils.py,sha256=kOpHHmJ602vEybccn81hVLOHwY0CQ2YdnG9n9kOVcQM,833 +torch/quasirandom.py,sha256=APrygrXAGBNtwTyf4v_gqJtT6AvOukzyCkQQf7l1p7k,7905 +torch/random.py,sha256=YouGXE36a3QsOLP-_q0sxyUflF1XXCftBSlRxWlwL0E,7299 +torch/return_types.py,sha256=FptLQ227rc2ihQg89v3hGmt2LCqBizLVDAVVWCxZAWk,1485 +torch/return_types.pyi,sha256=hHUj4bIDTq9gprXJamZ5xR0U5vLVBqQRSOwE0uIg8G4,17837 +torch/serialization.py,sha256=QzJLfDlEMfIUFDOrW8jwjlqAvMdHZlA40m1YKenFpW4,85464 +torch/share/cmake/ATen/ATenConfig.cmake,sha256=Fu4Jh3vhuxYcjsZfQ71erhUpBbyJr0-gwuAk6I7FqKQ,263 +torch/share/cmake/Caffe2/Caffe2Config.cmake,sha256=A5TumkyqwF9wP1Cor7darefhLipCsRot63UA0p2eBpA,5348 +torch/share/cmake/Caffe2/Caffe2Targets-release.cmake,sha256=8VOqc_eCRXerGxKA15IeU9GjFQEm67bGjzdbwlQPdFo,3098 +torch/share/cmake/Caffe2/Caffe2Targets.cmake,sha256=978qX1WgOvNiILMGJY4iK4gTtBkjs0if7kXSE7nt1BU,8409 +torch/share/cmake/Caffe2/FindCUDAToolkit.cmake,sha256=kl99c2bqe1LwRcg7k8VkwqL99pQ9CF9vTwG-kfKIu84,38768 +torch/share/cmake/Caffe2/FindCUDSS.cmake,sha256=54i8T6FKzYP1KMtHTXaUhsuCuXHogM8SDadMAUNZT8I,2698 +torch/share/cmake/Caffe2/FindCUSPARSELT.cmake,sha256=cjNafMBEzBGv0kZAQqMxdpku0Vyf2Yrn3vJ_OVHxdUQ,3068 +torch/share/cmake/Caffe2/FindSYCLToolkit.cmake,sha256=w2vDQMm9VF71HM4v7XmJK8DTdiE3Q_d91rmjB8nE-kQ,4547 +torch/share/cmake/Caffe2/Modules_CUDA_fix/FindCUDA.cmake,sha256=uH9LCtcsv8VgeuFEyyMTugFUiILpcgM3oEnJZka4AB0,459 +torch/share/cmake/Caffe2/Modules_CUDA_fix/FindCUDNN.cmake,sha256=NKwIx_LRJ3uu9oJC9_apdlRooZ-uR_izK1_deByfEQo,3085 +torch/share/cmake/Caffe2/Modules_CUDA_fix/upstream/CMakeInitializeConfigs.cmake,sha256=v1O1FBKmJWk1h-Zbh8M6qVlP4OqVsmCcYD8zwdVfb6Q,1657 +torch/share/cmake/Caffe2/Modules_CUDA_fix/upstream/FindCUDA.cmake,sha256=vz7pTfsrZCUqr1wtAtEP7gkiTKex3dDaAK4AZLj2hRQ,86626 +torch/share/cmake/Caffe2/Modules_CUDA_fix/upstream/FindCUDA/make2cmake.cmake,sha256=_KLZxL3AhZehZKubThy4o2C_gEH5mm4h3kMpxLHgajU,3925 +torch/share/cmake/Caffe2/Modules_CUDA_fix/upstream/FindCUDA/parse_cubin.cmake,sha256=h3Ka8c-mmE2Majl0s8342faZWVPAaDbO1rM_4m--YzA,3439 +torch/share/cmake/Caffe2/Modules_CUDA_fix/upstream/FindCUDA/run_nvcc.cmake,sha256=xCYQQ4GWx5BsAWYZZEOo79e_Pu_pK7S_pWM-6XNS-Tw,11813 +torch/share/cmake/Caffe2/Modules_CUDA_fix/upstream/FindCUDA/select_compute_arch.cmake,sha256=5qkm8pG_f94RlPJEB8ZHT_y8UOtToZmdPMWYN7ienO0,11581 +torch/share/cmake/Caffe2/Modules_CUDA_fix/upstream/FindPackageMessage.cmake,sha256=ToKFxPt7HSmEA014cFkMZl79quM2gpF7tmcP8h1BuYs,1564 +torch/share/cmake/Caffe2/public/LoadHIP.cmake,sha256=BRi_MoRm7uwg_M9ectIoTKCjhqIYBPCygAE4F2hDsqw,10558 +torch/share/cmake/Caffe2/public/cuda.cmake,sha256=sTOosbvKXnghNXM6qKby_00dwIhaKLHM1DuJFKKQrjQ,14296 +torch/share/cmake/Caffe2/public/gflags.cmake,sha256=YrTkm-nQX6N3mh3tpY9a-i1_s_lAlifW0V_UZdAHS-M,2620 +torch/share/cmake/Caffe2/public/glog.cmake,sha256=zy1mZaicXNUHxSG7eOZ4ZVnbgk5qN-IuG_-jXUi98nk,2320 +torch/share/cmake/Caffe2/public/mkl.cmake,sha256=y1E6axKvT-AvgfmJrVMptYDVJ5svt723jNuQYIJp_kg,1317 +torch/share/cmake/Caffe2/public/mkldnn.cmake,sha256=7D8oS35genLaLdSPfgh3foWXQMsa2bUsQnB5WKfKPAA,444 +torch/share/cmake/Caffe2/public/protobuf.cmake,sha256=weW3OuHBIqIt0KpWRWzAnzSCu-AJ9naUfkjxcvaRl5c,4003 +torch/share/cmake/Caffe2/public/utils.cmake,sha256=z9vGM2Xnz2CUfEc-SZTF-UpYMdd0LVT-wRxdci0OZtE,22834 +torch/share/cmake/Caffe2/public/xpu.cmake,sha256=FSR-6s79wL2FhahY6PhdIb_QESp73I-e1N2p65DoQPI,1287 +torch/share/cmake/Tensorpipe/TensorpipeTargets-release.cmake,sha256=F61imoXwiRatw97-TefIPmRwlsVTdvAXItQDGEFGGPI,1803 +torch/share/cmake/Tensorpipe/TensorpipeTargets.cmake,sha256=TzMZ4Gzcbdar0vXwpwewmlbO7f91cHDXHwu5h0cp0l0,4700 +torch/share/cmake/Torch/TorchConfig.cmake,sha256=FJZoXHdVXE8aV-6Q9rSP_4-CAaDCCLK8JJrkwoEZz9w,5167 +torch/share/cmake/Torch/TorchConfigVersion.cmake,sha256=uQiO7tYa1DDpb4fES6pZxoWSlSaQHJxbBykWHQMq9WM,367 +torch/signal/__init__.py,sha256=UvInN-gZ-pXXT9wvdSjrESHuSVNz5qEcnLMRzycbXiU,46 +torch/signal/__pycache__/__init__.cpython-310.pyc,, +torch/signal/windows/__init__.py,sha256=pqkf3lWIkwGpjDn_njgkrpqzYYCBpC25zEK7iD4FGaI,383 +torch/signal/windows/__pycache__/__init__.cpython-310.pyc,, +torch/signal/windows/__pycache__/windows.cpython-310.pyc,, +torch/signal/windows/windows.py,sha256=qJi7w3QzoL4Ime9gKazKAaErMj-QreMgDHGr1LCz5cI,22720 +torch/sparse/__init__.py,sha256=rOEaTFwwUVMcNXKgkxFz-l3ujiS_PqJQCAgAI3mUB5I,25825 +torch/sparse/__pycache__/__init__.cpython-310.pyc,, +torch/sparse/__pycache__/_semi_structured_conversions.cpython-310.pyc,, +torch/sparse/__pycache__/_semi_structured_ops.cpython-310.pyc,, +torch/sparse/__pycache__/_triton_ops.cpython-310.pyc,, +torch/sparse/__pycache__/_triton_ops_meta.cpython-310.pyc,, +torch/sparse/__pycache__/semi_structured.cpython-310.pyc,, +torch/sparse/_semi_structured_conversions.py,sha256=F1nRbKXb3PClzvZ26vvU8Ud69elhsYqPyN2DocHGco4,14094 +torch/sparse/_semi_structured_ops.py,sha256=amFEB7QitjDP__drpqaGl5EE1iuxvC7AzAYPGzVP3bM,6433 +torch/sparse/_triton_ops.py,sha256=QjotjO4jPqDEV-AUAYjVK255Ni3f0tNv5o32GfPJ8R4,87904 +torch/sparse/_triton_ops_meta.py,sha256=WOlmUBX0i1QNryQbsh3OvtqoT6GokFAA6sqZMejB95E,501216 +torch/sparse/semi_structured.py,sha256=rb1R2gZ8FJ-ngzODpykQoBS7sPXh-BarD3awkmShw90,28722 +torch/special/__init__.py,sha256=vua7SYF8ZjpL6Gpf_M6VCrVW1b-WHfJqfx4-KTNMZgU,32035 +torch/special/__pycache__/__init__.cpython-310.pyc,, +torch/storage.py,sha256=KkEVNt3MBBPrIvbVEbj7npIlXM4VlPKAnqpaUQGk5tI,52229 +torch/testing/__init__.py,sha256=KWGXAtM1wGYjenz5lGf2H16r3-qI1ZmOVsHuxHn7S2k,219 +torch/testing/__pycache__/__init__.cpython-310.pyc,, +torch/testing/__pycache__/_comparison.cpython-310.pyc,, +torch/testing/__pycache__/_creation.cpython-310.pyc,, +torch/testing/__pycache__/_utils.cpython-310.pyc,, +torch/testing/_comparison.py,sha256=7dDfhFHtpkqgNSfXlMIJB1gQ4QXQKj6bD65sd8ZEAeo,66541 +torch/testing/_creation.py,sha256=k8RHStpiiYDrQ6UMl9Dncy4GBm7ZYRu54I5qJ9nxE_Y,12198 +torch/testing/_internal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/testing/_internal/__pycache__/__init__.cpython-310.pyc,, +torch/testing/_internal/__pycache__/autocast_test_lists.cpython-310.pyc,, +torch/testing/_internal/__pycache__/autograd_function_db.cpython-310.pyc,, +torch/testing/_internal/__pycache__/check_kernel_launches.cpython-310.pyc,, +torch/testing/_internal/__pycache__/common_cuda.cpython-310.pyc,, +torch/testing/_internal/__pycache__/common_device_type.cpython-310.pyc,, +torch/testing/_internal/__pycache__/common_dist_composable.cpython-310.pyc,, +torch/testing/_internal/__pycache__/common_distributed.cpython-310.pyc,, +torch/testing/_internal/__pycache__/common_dtype.cpython-310.pyc,, +torch/testing/_internal/__pycache__/common_fsdp.cpython-310.pyc,, +torch/testing/_internal/__pycache__/common_jit.cpython-310.pyc,, +torch/testing/_internal/__pycache__/common_methods_invocations.cpython-310.pyc,, +torch/testing/_internal/__pycache__/common_mkldnn.cpython-310.pyc,, +torch/testing/_internal/__pycache__/common_modules.cpython-310.pyc,, +torch/testing/_internal/__pycache__/common_mps.cpython-310.pyc,, +torch/testing/_internal/__pycache__/common_nn.cpython-310.pyc,, +torch/testing/_internal/__pycache__/common_optimizers.cpython-310.pyc,, +torch/testing/_internal/__pycache__/common_pruning.cpython-310.pyc,, +torch/testing/_internal/__pycache__/common_quantization.cpython-310.pyc,, +torch/testing/_internal/__pycache__/common_quantized.cpython-310.pyc,, +torch/testing/_internal/__pycache__/common_subclass.cpython-310.pyc,, +torch/testing/_internal/__pycache__/common_utils.cpython-310.pyc,, +torch/testing/_internal/__pycache__/composite_compliance.cpython-310.pyc,, +torch/testing/_internal/__pycache__/custom_op_db.cpython-310.pyc,, +torch/testing/_internal/__pycache__/custom_tensor.cpython-310.pyc,, +torch/testing/_internal/__pycache__/dist_utils.cpython-310.pyc,, +torch/testing/_internal/__pycache__/dynamo_pytree_test_utils.cpython-310.pyc,, +torch/testing/_internal/__pycache__/dynamo_test_failures.cpython-310.pyc,, +torch/testing/_internal/__pycache__/fake_config_module.cpython-310.pyc,, +torch/testing/_internal/__pycache__/fake_config_module2.cpython-310.pyc,, +torch/testing/_internal/__pycache__/fake_config_module3.cpython-310.pyc,, +torch/testing/_internal/__pycache__/hop_db.cpython-310.pyc,, +torch/testing/_internal/__pycache__/hypothesis_utils.cpython-310.pyc,, +torch/testing/_internal/__pycache__/inductor_utils.cpython-310.pyc,, +torch/testing/_internal/__pycache__/jit_metaprogramming_utils.cpython-310.pyc,, +torch/testing/_internal/__pycache__/jit_utils.cpython-310.pyc,, +torch/testing/_internal/__pycache__/logging_tensor.cpython-310.pyc,, +torch/testing/_internal/__pycache__/logging_utils.cpython-310.pyc,, +torch/testing/_internal/__pycache__/quantization_torch_package_models.cpython-310.pyc,, +torch/testing/_internal/__pycache__/static_module.cpython-310.pyc,, +torch/testing/_internal/__pycache__/subclasses.cpython-310.pyc,, +torch/testing/_internal/__pycache__/torchbind_impls.cpython-310.pyc,, +torch/testing/_internal/__pycache__/triton_utils.cpython-310.pyc,, +torch/testing/_internal/__pycache__/two_tensor.cpython-310.pyc,, +torch/testing/_internal/autocast_test_lists.py,sha256=sNrUoirJajP9joMNWBbv238LLAjWGP9kWZT1dOjcGKw,28405 +torch/testing/_internal/autograd_function_db.py,sha256=K78GnkbWfkS_KNQXxQSQ2jt-bk3vLUzaqTmLVdvYvas,19613 +torch/testing/_internal/check_kernel_launches.py,sha256=KDW-fjae41C_aetbWyQGeXsEBWpv0cQaM9S57AdbQPo,6027 +torch/testing/_internal/codegen/__init__.py,sha256=8QLhisbHub6VJl6egijnrOPKK5QNAe5FJhfcxEelj4Y,22 +torch/testing/_internal/codegen/__pycache__/__init__.cpython-310.pyc,, +torch/testing/_internal/common_cuda.py,sha256=eOg_J-cn5rvv8hjAjWUBAhmLmJNubHfg7J7oleValGU,16670 +torch/testing/_internal/common_device_type.py,sha256=a_Yupawqmx8uIsgaZcItFu5zOb0eRyat21lvl1iAp8k,74778 +torch/testing/_internal/common_dist_composable.py,sha256=IwtTq8pjXlXDotDZE_Fpy1o7tkpAP_WnNcx05GpJ3YA,3577 +torch/testing/_internal/common_distributed.py,sha256=nJsi0Ux74YPFDT5nbtpj5laLWBmDDLncJLDEwD4-pso,70658 +torch/testing/_internal/common_dtype.py,sha256=a9ynJdwVC4LdrBzMUaWTqcBQz9hQgUoq3T4iP5swFNg,5106 +torch/testing/_internal/common_fsdp.py,sha256=oLOE9JXmdnPuaHcPqOS-LOq4tjs2rNMKHzJh9KghSBs,59453 +torch/testing/_internal/common_jit.py,sha256=gL4n8qfJ8o6s4ZO7GKK3yfmrY_LOOWYabKDW_nmRAA0,15860 +torch/testing/_internal/common_methods_invocations.py,sha256=E6VpClTbx6cZRDIAt5iDyBEBMTbnvOu15_3u7fyzoRg,1218643 +torch/testing/_internal/common_mkldnn.py,sha256=kmhRTpQe3H0x5_8pvJdtmDZPgNRijjGQtIf_WCLb4vU,3899 +torch/testing/_internal/common_modules.py,sha256=pI9u28Emmrzg7znE3aZAlojmlYShY3JlRnPDGxMUu94,210467 +torch/testing/_internal/common_mps.py,sha256=GstoVe5fwhCKxMgRjzhw9Fk18meSO5NCD99OQX_QCu0,30480 +torch/testing/_internal/common_nn.py,sha256=kP3lXzPmiHCJU0Zvb2h4GHU7tLqHmTAdDGTf0iQzYzk,172865 +torch/testing/_internal/common_optimizers.py,sha256=-o6X8ZtEVMhYkyeIihxNmpI64L60C7lARN8fENDkd98,85588 +torch/testing/_internal/common_pruning.py,sha256=nYwQmrHvNQpRmIkuxK7yYki2CwmaMVJKsnIW_Z-xIw8,13655 +torch/testing/_internal/common_quantization.py,sha256=QNiUE9SlrZ8HJ8zMzxf4OrP2Ry6Wv9TpDwyOSEYlCIg,115812 +torch/testing/_internal/common_quantized.py,sha256=m5WdKRaTdbn53OO2rWZPHmTUzhoXeGosw11selJhYuQ,25000 +torch/testing/_internal/common_subclass.py,sha256=w7Ujh7GvRbFO-zoW-Kf9buyGT2Ys7lyxq7wFnhUqTl8,12086 +torch/testing/_internal/common_utils.py,sha256=k4-W0g2mW1afLvGQO3xjG9t-sf_g7LpIbab_pPgJk5Y,243334 +torch/testing/_internal/composite_compliance.py,sha256=ZcIFt_P1gnt85fv2EkL05Uy22e6UTExm_A40o0DfDT4,26099 +torch/testing/_internal/custom_op_db.py,sha256=O-KOltP37Q_2ee7leslEDGSytAV6-sIYM_MPFL61o2c,19645 +torch/testing/_internal/custom_tensor.py,sha256=Wa47h74Yy8OpHql48jgp8447cPCDqki5sBobSmST1g4,5279 +torch/testing/_internal/data/__init__.py,sha256=8QLhisbHub6VJl6egijnrOPKK5QNAe5FJhfcxEelj4Y,22 +torch/testing/_internal/data/__pycache__/__init__.cpython-310.pyc,, +torch/testing/_internal/data/__pycache__/network1.cpython-310.pyc,, +torch/testing/_internal/data/__pycache__/network2.cpython-310.pyc,, +torch/testing/_internal/data/network1.py,sha256=ksE5iUCq6Hhp8772pRhqpUna414huKdlzvh92oQgxTc,169 +torch/testing/_internal/data/network2.py,sha256=FlOrR6LuubeOhZHKURvkoWqIGHlvMNX2SyoZ22XPvfg,199 +torch/testing/_internal/dist_utils.py,sha256=WBlzvl4sb7bXl8T_Dv_-LDgZtUp4bdGCFfCNpbDjWck,7255 +torch/testing/_internal/distributed/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/testing/_internal/distributed/__pycache__/__init__.cpython-310.pyc,, +torch/testing/_internal/distributed/__pycache__/checkpoint_utils.cpython-310.pyc,, +torch/testing/_internal/distributed/__pycache__/common_state_dict.cpython-310.pyc,, +torch/testing/_internal/distributed/__pycache__/ddp_under_dist_autograd_test.cpython-310.pyc,, +torch/testing/_internal/distributed/__pycache__/distributed_test.cpython-310.pyc,, +torch/testing/_internal/distributed/__pycache__/distributed_utils.cpython-310.pyc,, +torch/testing/_internal/distributed/__pycache__/fake_pg.cpython-310.pyc,, +torch/testing/_internal/distributed/__pycache__/multi_threaded_pg.cpython-310.pyc,, +torch/testing/_internal/distributed/__pycache__/rpc_utils.cpython-310.pyc,, +torch/testing/_internal/distributed/_shard/__init__.py,sha256=mIQlHRV-d0Zr3TOwF0Vr4fBPuPk4uNR8rzKPy1EhlPw,27 +torch/testing/_internal/distributed/_shard/__pycache__/__init__.cpython-310.pyc,, +torch/testing/_internal/distributed/_shard/__pycache__/test_common.cpython-310.pyc,, +torch/testing/_internal/distributed/_shard/sharded_tensor/__init__.py,sha256=h9RFxi9o1Jukm8ez0X7m1JNc9_zEcvBPNHNtODTMIPA,3212 +torch/testing/_internal/distributed/_shard/sharded_tensor/__pycache__/__init__.cpython-310.pyc,, +torch/testing/_internal/distributed/_shard/sharded_tensor/__pycache__/_test_ops_common.cpython-310.pyc,, +torch/testing/_internal/distributed/_shard/sharded_tensor/__pycache__/_test_st_common.cpython-310.pyc,, +torch/testing/_internal/distributed/_shard/sharded_tensor/_test_ops_common.py,sha256=Ngk6Ynz4RSlUmj5oDTB0d-1jr4hl7DiVvyGy1IZefcw,4011 +torch/testing/_internal/distributed/_shard/sharded_tensor/_test_st_common.py,sha256=Qys7mhe_-Ew8m14WqTGlJ1VJf_gINSZyraRfyDNP44w,1618 +torch/testing/_internal/distributed/_shard/test_common.py,sha256=0siUUMgcT2SqfCOGQvb4_k-_r2yHoOALNG0kM1OTGwc,1219 +torch/testing/_internal/distributed/_tensor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/testing/_internal/distributed/_tensor/__pycache__/__init__.cpython-310.pyc,, +torch/testing/_internal/distributed/_tensor/__pycache__/common_dtensor.cpython-310.pyc,, +torch/testing/_internal/distributed/_tensor/common_dtensor.py,sha256=toiFh6T0JyKzKelEQs7ehlIeS8gPJdNCX6CUXblyqEg,34878 +torch/testing/_internal/distributed/checkpoint_utils.py,sha256=xsTEaaQtYcWPGf8teoSHYBAzGKz-Oev9jgW5KcCj0VU,6187 +torch/testing/_internal/distributed/common_state_dict.py,sha256=HU0cY-TeqC7QE6BFuQd_GnLF-H5Up0_IY-y9AFw1Ui4,6725 +torch/testing/_internal/distributed/ddp_under_dist_autograd_test.py,sha256=GmyIdNigAzVqSiH2jSrNsDaYh5CrkCqWGcyMqRCoJNI,26998 +torch/testing/_internal/distributed/distributed_test.py,sha256=sCzvdL6pTS-aFsE-viY4HOZbjFD1N70F8rMQhjlw9QM,438304 +torch/testing/_internal/distributed/distributed_utils.py,sha256=FglJQlzvQwzZeaIi7hK0rW6-w6WuwOZL64QC3f4oEkU,1871 +torch/testing/_internal/distributed/fake_pg.py,sha256=leq7bTGTnLIk7j_L7YzRg0_SbbzKqjGsjTivzx4H-Oo,1126 +torch/testing/_internal/distributed/multi_threaded_pg.py,sha256=DBQQ2Vv3ZIPOlNbJxlBSFWcsT7wYxsaKf89bM3-jvk0,21410 +torch/testing/_internal/distributed/nn/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/testing/_internal/distributed/nn/__pycache__/__init__.cpython-310.pyc,, +torch/testing/_internal/distributed/nn/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/testing/_internal/distributed/nn/api/__pycache__/__init__.cpython-310.pyc,, +torch/testing/_internal/distributed/nn/api/__pycache__/remote_module_test.cpython-310.pyc,, +torch/testing/_internal/distributed/nn/api/remote_module_test.py,sha256=GohOmmJgmhgehHlcwU55daRtg1zl1NN447dORb_An9E,29751 +torch/testing/_internal/distributed/rpc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/testing/_internal/distributed/rpc/__pycache__/__init__.cpython-310.pyc,, +torch/testing/_internal/distributed/rpc/__pycache__/dist_autograd_test.cpython-310.pyc,, +torch/testing/_internal/distributed/rpc/__pycache__/dist_optimizer_test.cpython-310.pyc,, +torch/testing/_internal/distributed/rpc/__pycache__/faulty_agent_rpc_test.cpython-310.pyc,, +torch/testing/_internal/distributed/rpc/__pycache__/faulty_rpc_agent_test_fixture.cpython-310.pyc,, +torch/testing/_internal/distributed/rpc/__pycache__/rpc_agent_test_fixture.cpython-310.pyc,, +torch/testing/_internal/distributed/rpc/__pycache__/rpc_test.cpython-310.pyc,, +torch/testing/_internal/distributed/rpc/__pycache__/tensorpipe_rpc_agent_test_fixture.cpython-310.pyc,, +torch/testing/_internal/distributed/rpc/dist_autograd_test.py,sha256=hnnYnCoPTRCORVCKGmbLt73DkHoOQKPp3dnpPNpttiE,107044 +torch/testing/_internal/distributed/rpc/dist_optimizer_test.py,sha256=HibDFt3xUTuOmm2mXOAnEzCctb48WKGzNPWZ-BRr-hk,10574 +torch/testing/_internal/distributed/rpc/examples/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/testing/_internal/distributed/rpc/examples/__pycache__/__init__.cpython-310.pyc,, +torch/testing/_internal/distributed/rpc/examples/__pycache__/parameter_server_test.cpython-310.pyc,, +torch/testing/_internal/distributed/rpc/examples/__pycache__/reinforcement_learning_rpc_test.cpython-310.pyc,, +torch/testing/_internal/distributed/rpc/examples/parameter_server_test.py,sha256=_sm9R6jjnAkl49tk_dOH9dRZIdDEmuAmOy4DUkMa9ck,4568 +torch/testing/_internal/distributed/rpc/examples/reinforcement_learning_rpc_test.py,sha256=JDYkhzz7ZsK-H-IVEPic9Sxu7ZLv0taf1REfAnWgTbM,9268 +torch/testing/_internal/distributed/rpc/faulty_agent_rpc_test.py,sha256=zcYRImWXoIg0qmVWpkPlTKA_t0neQPYyi9YXm8IdgTo,14239 +torch/testing/_internal/distributed/rpc/faulty_rpc_agent_test_fixture.py,sha256=ziVR9Z4tDhdG0omKEvGVfOXDN2I10eeXCcMYJ6G_vYk,2142 +torch/testing/_internal/distributed/rpc/jit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/testing/_internal/distributed/rpc/jit/__pycache__/__init__.cpython-310.pyc,, +torch/testing/_internal/distributed/rpc/jit/__pycache__/dist_autograd_test.cpython-310.pyc,, +torch/testing/_internal/distributed/rpc/jit/__pycache__/rpc_test.cpython-310.pyc,, +torch/testing/_internal/distributed/rpc/jit/__pycache__/rpc_test_faulty.cpython-310.pyc,, +torch/testing/_internal/distributed/rpc/jit/dist_autograd_test.py,sha256=bzq_ajaMCiVEFFmI1IsrK_bRKneEDMyyKOkXuiuq_ZE,4172 +torch/testing/_internal/distributed/rpc/jit/rpc_test.py,sha256=5Z1TtfUjWPqMWS6hlGq53PvW34Cs5A6WTZ3iMxoKTNw,46869 +torch/testing/_internal/distributed/rpc/jit/rpc_test_faulty.py,sha256=8TjJOzAvAlbE2qy3izpDBUHnUzog6r7jjEPciYoLs7U,7974 +torch/testing/_internal/distributed/rpc/rpc_agent_test_fixture.py,sha256=y5P27BCxk82IPTVOzov4-Ojr3_tykIOGlLlSEwWEv_w,1874 +torch/testing/_internal/distributed/rpc/rpc_test.py,sha256=vIKftGkUHdm_j43ANOg4b-vDiacUXHiUuETcCfI2aFM,225880 +torch/testing/_internal/distributed/rpc/tensorpipe_rpc_agent_test_fixture.py,sha256=6RTlsS0sKBh2iZqvLm_ieqIQpjSuwqlYc7qdgjb96YM,974 +torch/testing/_internal/distributed/rpc_utils.py,sha256=_ytL9c2DUzSMzTVyoOTKg8UJVlINNdy0R4mtFXBR0rI,6615 +torch/testing/_internal/dynamo_pytree_test_utils.py,sha256=5zPqhGQDcqd4Ynshj8cS_TVz_syUcPa_nKWDAKCQ0lY,1059 +torch/testing/_internal/dynamo_test_failures.py,sha256=cOb8083VbvRlqtmOZZelODTQd87t1YGPLD9TuRgJbo0,5471 +torch/testing/_internal/fake_config_module.py,sha256=m7LTx36uQonXPnUIh974Q7FcJHUzPJyF1jvTB1y9BbU,1253 +torch/testing/_internal/fake_config_module2.py,sha256=gk8fSMjiMktUYrbdWi-Yvm4aH6TeOBa-7nnB5SDMZwQ,343 +torch/testing/_internal/fake_config_module3.py,sha256=uZCeu_rAnYafwa44zvUjYdJwUTWs1nTZvAD5b1EO9M8,233 +torch/testing/_internal/generated/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/testing/_internal/generated/__pycache__/__init__.cpython-310.pyc,, +torch/testing/_internal/generated/__pycache__/annotated_fn_args.cpython-310.pyc,, +torch/testing/_internal/generated/annotated_fn_args.py,sha256=CxGeTreU0N_K-1dWAckpYT-w5j8QVXKExU3xU4q5_nQ,555701 +torch/testing/_internal/hop_db.py,sha256=GN_OcImSslxsP9QTXYi4IGMni2Pc1LAq4-tCSX0nOQw,16741 +torch/testing/_internal/hypothesis_utils.py,sha256=vUexcZDOzld1AnNjM07e1b1wJstgQ1bvE7f2vObeVDo,14910 +torch/testing/_internal/inductor_utils.py,sha256=lrmMO-shwYEhGJacxkuPIl7s2RxvvnAzuLBKjk76ZQU,13598 +torch/testing/_internal/jit_metaprogramming_utils.py,sha256=1kwm5pbc86-z8EJJgadxnDJogN7Km6P0p8Z9PaIbtn4,34057 +torch/testing/_internal/jit_utils.py,sha256=VXmEAYGnJ88-U-AF6XT1bm0X9gEsB-RWJ49s_ZNnOAc,33890 +torch/testing/_internal/logging_tensor.py,sha256=GE23NCZ6hhwkck48gOOyOFO5SigntV7VeSxUdNF8juk,6646 +torch/testing/_internal/logging_utils.py,sha256=hHrY_eSidr5n7N602cfaa_rp9tuksIEhNq54g3y-NfI,8240 +torch/testing/_internal/opinfo/__init__.py,sha256=6PWvlARagSjyrZW5xCOA5YGQjLqwaijc36TFX4UrU9g,116 +torch/testing/_internal/opinfo/__pycache__/__init__.cpython-310.pyc,, +torch/testing/_internal/opinfo/__pycache__/core.cpython-310.pyc,, +torch/testing/_internal/opinfo/__pycache__/refs.cpython-310.pyc,, +torch/testing/_internal/opinfo/__pycache__/utils.cpython-310.pyc,, +torch/testing/_internal/opinfo/core.py,sha256=qnF6s8S2fK_yYdyomXf4PGomn9kGFigPNWAb5y5P7aI,124158 +torch/testing/_internal/opinfo/definitions/__init__.py,sha256=8IK85dB9S_tx3aiyuUwfSYLKgoGRaBmVnajBKn__Vqk,452 +torch/testing/_internal/opinfo/definitions/__pycache__/__init__.cpython-310.pyc,, +torch/testing/_internal/opinfo/definitions/__pycache__/_masked.cpython-310.pyc,, +torch/testing/_internal/opinfo/definitions/__pycache__/fft.cpython-310.pyc,, +torch/testing/_internal/opinfo/definitions/__pycache__/linalg.cpython-310.pyc,, +torch/testing/_internal/opinfo/definitions/__pycache__/nested.cpython-310.pyc,, +torch/testing/_internal/opinfo/definitions/__pycache__/signal.cpython-310.pyc,, +torch/testing/_internal/opinfo/definitions/__pycache__/sparse.cpython-310.pyc,, +torch/testing/_internal/opinfo/definitions/__pycache__/special.cpython-310.pyc,, +torch/testing/_internal/opinfo/definitions/_masked.py,sha256=Rh5ZHiRX_zFqpJmVQms1xOReECjHzCnEHm9cTDZsFAg,46549 +torch/testing/_internal/opinfo/definitions/fft.py,sha256=Obl4XOqN-AA0J9eNBvF1Xgs8lHpD_qBotZ3fATffRos,29445 +torch/testing/_internal/opinfo/definitions/linalg.py,sha256=dMI64nFIH50DIKgcOgnVgn2PkQhu6EgTSpLb_1Ez6ZU,84750 +torch/testing/_internal/opinfo/definitions/nested.py,sha256=WBq-Fnb_dDwEp1iE-kosI_BtbL5t7k4xq3LviXw-tQg,59775 +torch/testing/_internal/opinfo/definitions/signal.py,sha256=LM2_KWXES706JWWxUyf0oPbuz75WaFZ_fpR_UM0AsCY,15351 +torch/testing/_internal/opinfo/definitions/sparse.py,sha256=XWdcwVLDyhaQMIpdUFmqWLPfsYVHYxF883MBEn0jsms,33825 +torch/testing/_internal/opinfo/definitions/special.py,sha256=1KHiLojCDEFV3WyJL3akApXBFvwI8U3lv9R1G3_hTXA,27054 +torch/testing/_internal/opinfo/refs.py,sha256=rhbUtkE6NiONK48DR72RB6-JLzIbqXh5JvJ5vw0daQk,8039 +torch/testing/_internal/opinfo/utils.py,sha256=7_Yr7GTcZOZqjV56bBSFHqGsV0rodYmbPGFCxOcOyow,8780 +torch/testing/_internal/optests/__init__.py,sha256=o-8t0Cva860Tcw0Ig_-rBr6-9Uuc9bDRWRMG6FgKzbA,372 +torch/testing/_internal/optests/__pycache__/__init__.cpython-310.pyc,, +torch/testing/_internal/optests/__pycache__/aot_autograd.cpython-310.pyc,, +torch/testing/_internal/optests/__pycache__/autograd_registration.cpython-310.pyc,, +torch/testing/_internal/optests/__pycache__/fake_tensor.cpython-310.pyc,, +torch/testing/_internal/optests/__pycache__/generate_tests.cpython-310.pyc,, +torch/testing/_internal/optests/__pycache__/make_fx.cpython-310.pyc,, +torch/testing/_internal/optests/aot_autograd.py,sha256=eWV9LbIl200wVnXFYBawM1IQR7n6sNFFJQCct1Jftt4,7042 +torch/testing/_internal/optests/autograd_registration.py,sha256=YozT16xsHX1S3l34E20MxHzXSxyM5M8gID2c2dDbBkI,5771 +torch/testing/_internal/optests/fake_tensor.py,sha256=WuT0PGbogjTGPJeRYo2JiQYoTzj_iZET56L1zkv0W4w,257 +torch/testing/_internal/optests/generate_tests.py,sha256=YWbx0SBn4YYaBzf_ZwsxHTrn4BSJhRMvyt5TduGjdjQ,31762 +torch/testing/_internal/optests/make_fx.py,sha256=cERDt-I8VgMfwqddFNkbnkWnBWPZZegU5Yo0ijAtF5E,3265 +torch/testing/_internal/quantization_torch_package_models.py,sha256=DnChjrnLG54TWRhINvfTxOFmNZt5WflDBJDpam4fj9w,951 +torch/testing/_internal/static_module.py,sha256=bwmblZ7N3UtKuO6UEJDUUJdqdhxxIpCwvmrJEESauOk,893 +torch/testing/_internal/subclasses.py,sha256=CRkW9T6cevXnr7zywX1dhL_vpD0M4omAZS5PnLfH5bI,2530 +torch/testing/_internal/test_module/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/testing/_internal/test_module/__pycache__/__init__.cpython-310.pyc,, +torch/testing/_internal/test_module/__pycache__/future_div.cpython-310.pyc,, +torch/testing/_internal/test_module/__pycache__/no_future_div.cpython-310.pyc,, +torch/testing/_internal/test_module/future_div.py,sha256=298hLJlLz2QCJ80OVQXQM6CgN71nbkFMNnkesgzSnY8,114 +torch/testing/_internal/test_module/no_future_div.py,sha256=sksxzWFUupRBbSThS69P366IwnWBNGJe9EqQx8m5EKM,145 +torch/testing/_internal/torchbind_impls.py,sha256=tdIILgz0rKFQuNtD4JHImuFXJ4g3Oh0c88nsRkKpwuo,5686 +torch/testing/_internal/triton_utils.py,sha256=xp1ARQwl872rlJrDksu1x3RfnxqZt_tgnU_27PsmqNw,31990 +torch/testing/_internal/two_tensor.py,sha256=GWa6LJ-bShFRAwW5S4OUKfwYIcMpT0oqWaJAoAZZd7w,3677 +torch/testing/_utils.py,sha256=Qsxfa_GOOgLO6bC19Sx9MXKTtr94LNC3brfdkjqZKRU,2039 +torch/torch_version.py,sha256=MheXhDr4r0O0mDO_Eaxz7vYLl0HRWr8hnQciPgx4QuI,2530 +torch/types.py,sha256=HTA9Kd7Cl_VWtpq03OQy9_7JqbPK2JbyDjwAWMx30x0,3555 +torch/utils/__init__.py,sha256=zMoIT_1VcmllcYuDNcUEfhrwT5iksaEIlf0mzinvnqM,3891 +torch/utils/__pycache__/__init__.cpython-310.pyc,, +torch/utils/__pycache__/_appending_byte_serializer.cpython-310.pyc,, +torch/utils/__pycache__/_config_module.cpython-310.pyc,, +torch/utils/__pycache__/_content_store.cpython-310.pyc,, +torch/utils/__pycache__/_contextlib.cpython-310.pyc,, +torch/utils/__pycache__/_cpp_embed_headers.cpython-310.pyc,, +torch/utils/__pycache__/_cpp_extension_versioner.cpython-310.pyc,, +torch/utils/__pycache__/_cxx_pytree.cpython-310.pyc,, +torch/utils/__pycache__/_debug_mode.cpython-310.pyc,, +torch/utils/__pycache__/_device.cpython-310.pyc,, +torch/utils/__pycache__/_dtype_abbrs.cpython-310.pyc,, +torch/utils/__pycache__/_exposed_in.cpython-310.pyc,, +torch/utils/__pycache__/_filelock.cpython-310.pyc,, +torch/utils/__pycache__/_foreach_utils.cpython-310.pyc,, +torch/utils/__pycache__/_functools.cpython-310.pyc,, +torch/utils/__pycache__/_get_clean_triton.cpython-310.pyc,, +torch/utils/__pycache__/_helion.cpython-310.pyc,, +torch/utils/__pycache__/_import_utils.cpython-310.pyc,, +torch/utils/__pycache__/_mode_utils.cpython-310.pyc,, +torch/utils/__pycache__/_ordered_set.cpython-310.pyc,, +torch/utils/__pycache__/_pallas.cpython-310.pyc,, +torch/utils/__pycache__/_python_dispatch.cpython-310.pyc,, +torch/utils/__pycache__/_pytree.cpython-310.pyc,, +torch/utils/__pycache__/_runtime_estimation.cpython-310.pyc,, +torch/utils/__pycache__/_stats.cpython-310.pyc,, +torch/utils/__pycache__/_thunk.cpython-310.pyc,, +torch/utils/__pycache__/_traceback.cpython-310.pyc,, +torch/utils/__pycache__/_triton.cpython-310.pyc,, +torch/utils/__pycache__/_typing_utils.cpython-310.pyc,, +torch/utils/__pycache__/_zip.cpython-310.pyc,, +torch/utils/__pycache__/backend_registration.cpython-310.pyc,, +torch/utils/__pycache__/bundled_inputs.cpython-310.pyc,, +torch/utils/__pycache__/checkpoint.cpython-310.pyc,, +torch/utils/__pycache__/collect_env.cpython-310.pyc,, +torch/utils/__pycache__/cpp_backtrace.cpython-310.pyc,, +torch/utils/__pycache__/cpp_extension.cpython-310.pyc,, +torch/utils/__pycache__/deterministic.cpython-310.pyc,, +torch/utils/__pycache__/dlpack.cpython-310.pyc,, +torch/utils/__pycache__/file_baton.cpython-310.pyc,, +torch/utils/__pycache__/flop_counter.cpython-310.pyc,, +torch/utils/__pycache__/hooks.cpython-310.pyc,, +torch/utils/__pycache__/mkldnn.cpython-310.pyc,, +torch/utils/__pycache__/mobile_optimizer.cpython-310.pyc,, +torch/utils/__pycache__/model_zoo.cpython-310.pyc,, +torch/utils/__pycache__/module_tracker.cpython-310.pyc,, +torch/utils/__pycache__/show_pickle.cpython-310.pyc,, +torch/utils/__pycache__/throughput_benchmark.cpython-310.pyc,, +torch/utils/__pycache__/weak.cpython-310.pyc,, +torch/utils/_appending_byte_serializer.py,sha256=bs9USsaM-2edEomwNuRARE3qpqM6yMvauob3_EChH4s,4064 +torch/utils/_config_module.py,sha256=CbkMreZWyTRygpx16iocFzWE7zqRry51qv6YOh-8DEY,30933 +torch/utils/_config_typing.pyi,sha256=ZSNBjlnywGtVn4IxDkS0azK0t3q9Go71xETCA7VTN-E,1333 +torch/utils/_content_store.py,sha256=oe3EG2xt1HjHby1Qx-QXwN4ny004UhStbwtm-ImE79o,9327 +torch/utils/_contextlib.py,sha256=8iwhoDfEsmpDERITj6ZqUQjF6c_kyRaecywdFep6hAY,6402 +torch/utils/_cpp_embed_headers.py,sha256=JEXbg6pJrEuEyc6wTsDYVAJds2U66qZ15-Ik4W1tYdw,1758 +torch/utils/_cpp_extension_versioner.py,sha256=YHjYXX88iLDyZSuhNPJ3O4LS0LkNiqc2HMCW9GJmMSs,1946 +torch/utils/_cxx_pytree.py,sha256=JgWgOrTHNl9WrlOdrfajz773izpt8ZeXzk6Z0vEoDKo,39468 +torch/utils/_debug_mode.py,sha256=u6MpxS1vkr973utJ52lY2AqkiZggvYRkAY9nfWthEn4,51151 +torch/utils/_device.py,sha256=LfQJERUaJwJGgi7VSj7h377sHN3LgJ82OK4Mtzoy3kk,3996 +torch/utils/_dtype_abbrs.py,sha256=L-w4-UnjmD5QeuGbwRqilJ0iCc9Q1XsTjQUvygG0GE0,755 +torch/utils/_exposed_in.py,sha256=BdZbKFvTNdNkns_bTnsscKtH-o-OyJf5WOZS_mZlcXs,720 +torch/utils/_filelock.py,sha256=pzI0dRIiOSru8SdJ_IYI0d3FJqj2PZ0atCQoiGMgTTc,1530 +torch/utils/_foreach_utils.py,sha256=BWAnBP6D5TSRloDeNja7WfPM6Hz4fArfq7TEY_UmZUE,2409 +torch/utils/_functools.py,sha256=3CwhtToEBWLYMNtFIPrO_wCj9TtDCatRL7ZbgLP_FiE,1609 +torch/utils/_get_clean_triton.py,sha256=7i0QtKJ522qEV60U2LsuygxuyI_BceKuEX-zStQw4yw,6985 +torch/utils/_helion.py,sha256=JcmLdzWOPs6yfikYYZDIzWUSejX4gF598lAo9x2Sbcg,364 +torch/utils/_import_utils.py,sha256=WKkO4UjWrjJ-Kw_eeveZUMVsvcDc43YB5IxXf2Icy2o,1174 +torch/utils/_mode_utils.py,sha256=sYjEYYBLwkP2g45Acigb32vqjNru3RgCJ-Efd1ol0A8,255 +torch/utils/_ordered_set.py,sha256=SEe8VuL4pWgCl_eGJLl9odGUzCzaQ-PIwWBy2jqDjx8,5658 +torch/utils/_pallas.py,sha256=M-Ynbn_6Y4rK0T3-xSiqnNzIwGDSnnsBNJUgR3dXch0,2683 +torch/utils/_python_dispatch.py,sha256=8pK5jHeGz-l4YQx4gUpI1x2Drr_Ze4WbnS6R2UbQcWg,37772 +torch/utils/_pytree.py,sha256=BEmISkb2JVWSc--9P2WcxPBMXEuC6nFIIeCy4AigN5g,76634 +torch/utils/_runtime_estimation.py,sha256=k8WXeGlnAgekhlfAUWTpbhiKIWqz0L0Q-ByJ62DPdFg,4368 +torch/utils/_stats.py,sha256=6tFYMMxr0QGrEZg9qI1Whq-t1uizO3fneCjmjaWyxDA,1041 +torch/utils/_strobelight/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/utils/_strobelight/__pycache__/__init__.cpython-310.pyc,, +torch/utils/_strobelight/__pycache__/cli_function_profiler.cpython-310.pyc,, +torch/utils/_strobelight/cli_function_profiler.py,sha256=g7ZjL4WWrNcd_KtjWQMAyQE41haPAJ0_0TGOZL-vULg,11360 +torch/utils/_sympy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/utils/_sympy/__pycache__/__init__.cpython-310.pyc,, +torch/utils/_sympy/__pycache__/functions.cpython-310.pyc,, +torch/utils/_sympy/__pycache__/interp.cpython-310.pyc,, +torch/utils/_sympy/__pycache__/numbers.cpython-310.pyc,, +torch/utils/_sympy/__pycache__/printers.cpython-310.pyc,, +torch/utils/_sympy/__pycache__/reference.cpython-310.pyc,, +torch/utils/_sympy/__pycache__/singleton_int.cpython-310.pyc,, +torch/utils/_sympy/__pycache__/solve.cpython-310.pyc,, +torch/utils/_sympy/__pycache__/symbol.cpython-310.pyc,, +torch/utils/_sympy/__pycache__/value_ranges.cpython-310.pyc,, +torch/utils/_sympy/functions.py,sha256=alkAW625zAWIZm8fXJ9JOFMeFjsgPWyzLub8AQbFs-I,53254 +torch/utils/_sympy/interp.py,sha256=Z4G1PT0oma4lwmNGw_mzyJq8XX_JqLsdG9UR_SSA70o,7200 +torch/utils/_sympy/numbers.py,sha256=gBkhAoqP-fpMOeTUKboxsl7rSC1evGKIVfaLHDB8ai4,11495 +torch/utils/_sympy/printers.py,sha256=tmMAtxAsXDYtRmcHWCU8TTcKSSq9y0_NXEj6ps2aNmw,25505 +torch/utils/_sympy/reference.py,sha256=XLOrjT1fm_jtfDNhNcVh7cUTam-MFJCql2BGgapt5NA,14114 +torch/utils/_sympy/singleton_int.py,sha256=K9fu2DlCBq5cXXQHzo1aJKbA11bxaIzuXptEZ96OP1A,2975 +torch/utils/_sympy/solve.py,sha256=TKC7vPm_YgXV3IPW4YqfwK1GT7RyQVNdhgX7_ojYpKM,6377 +torch/utils/_sympy/symbol.py,sha256=-rU79KpJLIfxT7jAXUlEp3M_OvXj83win7XHVJ3IMc8,3737 +torch/utils/_sympy/value_ranges.py,sha256=TYAdz3xxB1L-Ha17MRDO8Mu37JK2wlqFy8HgzCEKp0M,39345 +torch/utils/_thunk.py,sha256=m5ck10KTsFbRFnH0qyv9_exIsG8ujIeLozlGLEhVC8Y,644 +torch/utils/_traceback.py,sha256=jLTvYPVDTxdTWs03vZGrDzTs_cVydzEPOt_-Nu664mc,10274 +torch/utils/_triton.py,sha256=4CpUvAKqsPRLwMg_kUUef0ODSFnxmN27kPx3I82fJRU,5369 +torch/utils/_typing_utils.py,sha256=G40MJQ1rh4UGcCex2NI4a_WuchMPEO7RQvkbVP4F7xU,365 +torch/utils/_zip.py,sha256=eBoEuB5X-ARtblldfoAU5JN-lADeWkRE59wtuFKiFPc,2509 +torch/utils/backcompat/__init__.py,sha256=R3Sq5nrFTb96s7Cs-gNFpXfjDtyVahc-dbqXaEVqUnA,678 +torch/utils/backcompat/__pycache__/__init__.cpython-310.pyc,, +torch/utils/backend_registration.py,sha256=Zx8iAl9_8XvOOQngUUuynEV69j7vIK3IAYUJUmXn55c,22078 +torch/utils/benchmark/__init__.py,sha256=VMZoFTt8YGaScu3-5L1uWwMOED8FRYoEBAX37RFJ3c0,411 +torch/utils/benchmark/__pycache__/__init__.cpython-310.pyc,, +torch/utils/benchmark/examples/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/utils/benchmark/examples/__pycache__/__init__.cpython-310.pyc,, +torch/utils/benchmark/examples/__pycache__/compare.cpython-310.pyc,, +torch/utils/benchmark/examples/__pycache__/fuzzer.cpython-310.pyc,, +torch/utils/benchmark/examples/__pycache__/op_benchmark.cpython-310.pyc,, +torch/utils/benchmark/examples/__pycache__/simple_timeit.cpython-310.pyc,, +torch/utils/benchmark/examples/__pycache__/spectral_ops_fuzz_test.cpython-310.pyc,, +torch/utils/benchmark/examples/compare.py,sha256=vCmmcvWlXuf3hLDdZprpNCeV4Dv-7Qn6fTHH9Mqna24,2931 +torch/utils/benchmark/examples/fuzzer.py,sha256=5e2AwlYhk30tRXL4pmkiP4a6wtiHtgm-6A5m5DRM-zg,2658 +torch/utils/benchmark/examples/op_benchmark.py,sha256=C9lRKNCPijSkKiPjo6-3lu_wVQwt-4oc4z91qAeTuLc,4412 +torch/utils/benchmark/examples/simple_timeit.py,sha256=ioYkChBgAPHwz5gWqTfUFTCiqqk6CRud3Lob1tFe9uM,541 +torch/utils/benchmark/examples/spectral_ops_fuzz_test.py,sha256=Z4r34jAqH9rrDVdnZBj8yMaHigcYrQ2N6iS0O3JDlPU,4787 +torch/utils/benchmark/op_fuzzers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/utils/benchmark/op_fuzzers/__pycache__/__init__.cpython-310.pyc,, +torch/utils/benchmark/op_fuzzers/__pycache__/binary.cpython-310.pyc,, +torch/utils/benchmark/op_fuzzers/__pycache__/sparse_binary.cpython-310.pyc,, +torch/utils/benchmark/op_fuzzers/__pycache__/sparse_unary.cpython-310.pyc,, +torch/utils/benchmark/op_fuzzers/__pycache__/spectral.cpython-310.pyc,, +torch/utils/benchmark/op_fuzzers/__pycache__/unary.cpython-310.pyc,, +torch/utils/benchmark/op_fuzzers/binary.py,sha256=_A--hlOm0zcmwm3JoB_4ggFfNYAHzjFtlK7a3MHmkbI,4144 +torch/utils/benchmark/op_fuzzers/sparse_binary.py,sha256=FfyrCWiRHqxAzK27kp_gqP-zb4V31aT3N9drKRD8URU,4226 +torch/utils/benchmark/op_fuzzers/sparse_unary.py,sha256=TB__9Vo1Q9n6Awp07zMbGj_0nmUb54LCP3YyBRjU_7w,3491 +torch/utils/benchmark/op_fuzzers/spectral.py,sha256=u3ydR5HcQ3DwN0N0IIX9cYRiWDFm32sEw8nCkXa2djU,3632 +torch/utils/benchmark/op_fuzzers/unary.py,sha256=xvApHM3-2cP997UF5gotcTDfUas2tUUkzeUByLgKWV8,3154 +torch/utils/benchmark/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/utils/benchmark/utils/__pycache__/__init__.cpython-310.pyc,, +torch/utils/benchmark/utils/__pycache__/_stubs.cpython-310.pyc,, +torch/utils/benchmark/utils/__pycache__/common.cpython-310.pyc,, +torch/utils/benchmark/utils/__pycache__/compare.cpython-310.pyc,, +torch/utils/benchmark/utils/__pycache__/compile.cpython-310.pyc,, +torch/utils/benchmark/utils/__pycache__/cpp_jit.cpython-310.pyc,, +torch/utils/benchmark/utils/__pycache__/fuzzer.cpython-310.pyc,, +torch/utils/benchmark/utils/__pycache__/sparse_fuzzer.cpython-310.pyc,, +torch/utils/benchmark/utils/__pycache__/timer.cpython-310.pyc,, +torch/utils/benchmark/utils/_stubs.py,sha256=u29cftbrzC0fc9gq-6o78yApgPHNMwBKoXqY4QEiQ1M,1026 +torch/utils/benchmark/utils/common.py,sha256=u7toTEFGVRe4DgX4juDUVNIuzpxUD-k2Y2--lkXA_Yg,13774 +torch/utils/benchmark/utils/compare.py,sha256=vGP9rkUnbQLIXDPtZXDaia5pBet7Y8ACLaidC11wQIE,13473 +torch/utils/benchmark/utils/compile.py,sha256=Wx3JjogowjvrpFbXL5SaFBs-HgLSPazi0HjlxYd8xZk,7675 +torch/utils/benchmark/utils/cpp_jit.py,sha256=9sTV4KXXjMy6-8gVCLzFk2EFRq_Qfg39v2MS-KOw3Fc,6976 +torch/utils/benchmark/utils/fuzzer.py,sha256=I1fpGS3SxZ6evdJIYtAUCDLYuZnHe6N9Y9f_NuH01Ps,18778 +torch/utils/benchmark/utils/sparse_fuzzer.py,sha256=QHSjRkx-bahmatNbcFNbOsw5YFp9Kjdw_ojAbZmDwto,5401 +torch/utils/benchmark/utils/timeit_template.cpp,sha256=Wzz-o6Yjgq3tkmUTxeRldQxrsETh48T2hwL8xbOkRSg,1009 +torch/utils/benchmark/utils/timer.py,sha256=Rojc-r71VRrJgunJLa4BXuotv_JDzKUlFYGvChzFJZ8,20850 +torch/utils/benchmark/utils/valgrind_wrapper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/utils/benchmark/utils/valgrind_wrapper/__pycache__/__init__.cpython-310.pyc,, +torch/utils/benchmark/utils/valgrind_wrapper/__pycache__/timer_interface.cpython-310.pyc,, +torch/utils/benchmark/utils/valgrind_wrapper/callgrind.h,sha256=wK1NVdRImF_4WVLlQrXkufunvE0qLr5dw50v86KPIo0,5744 +torch/utils/benchmark/utils/valgrind_wrapper/compat_bindings.cpp,sha256=ysuof0blt-4g76St1LUrdlZLiaCBKjwjwZXE0L4nI74,813 +torch/utils/benchmark/utils/valgrind_wrapper/timer_callgrind_template.cpp,sha256=ILVnffXHThuakEj3hzKv4usmt8rICdXpSTBeWKz7jU4,1676 +torch/utils/benchmark/utils/valgrind_wrapper/timer_interface.py,sha256=VhsUDBXp0fYM9-Hezi0fNmuraZIh9g4ZYXL0vuNUWwA,37941 +torch/utils/benchmark/utils/valgrind_wrapper/valgrind.h,sha256=8MpV41sjwR0bIML04pxlLIjVuGhRtWdy1Kmtax4jFLI,422653 +torch/utils/bundled_inputs.py,sha256=s8pzZXai4mWFu9rhsZgH_aeNFr62YUSYFbXSeu6Nq-A,22698 +torch/utils/checkpoint.py,sha256=tqwHRdWPyJHw90G0M-T91Z77Hp_pkcaz8rj8Rg99XXo,72241 +torch/utils/collect_env.py,sha256=Bf_D9qgNyNBNIbdQx5xv6AngcDLOMXRhq7v7vBotKE0,31107 +torch/utils/cpp_backtrace.py,sha256=GxSqoJwxCh9nbgm7EJS9KRJ0Mn5UwIwJUje-0vC4C-Y,483 +torch/utils/cpp_extension.py,sha256=jIw8kKraebTuiqd9Ab4b5PlNFyqK2zM9zK1D1raqtmE,137975 +torch/utils/data/__init__.py,sha256=atpjQDmxEyRtlfR9vDgGuJNxGQJq3H8g5drwHgkAK9A,1701 +torch/utils/data/__pycache__/__init__.cpython-310.pyc,, +torch/utils/data/__pycache__/backward_compatibility.cpython-310.pyc,, +torch/utils/data/__pycache__/dataloader.cpython-310.pyc,, +torch/utils/data/__pycache__/dataset.cpython-310.pyc,, +torch/utils/data/__pycache__/distributed.cpython-310.pyc,, +torch/utils/data/__pycache__/graph.cpython-310.pyc,, +torch/utils/data/__pycache__/graph_settings.cpython-310.pyc,, +torch/utils/data/__pycache__/sampler.cpython-310.pyc,, +torch/utils/data/_utils/__init__.py,sha256=9-7TzN_myxBjyvWvbQPPgZLmWAJ89O3AH1AKzyORONA,1606 +torch/utils/data/_utils/__pycache__/__init__.cpython-310.pyc,, +torch/utils/data/_utils/__pycache__/collate.cpython-310.pyc,, +torch/utils/data/_utils/__pycache__/fetch.cpython-310.pyc,, +torch/utils/data/_utils/__pycache__/pin_memory.cpython-310.pyc,, +torch/utils/data/_utils/__pycache__/signal_handling.cpython-310.pyc,, +torch/utils/data/_utils/__pycache__/worker.cpython-310.pyc,, +torch/utils/data/_utils/collate.py,sha256=m60nb5Rps5MwEw8_z-cYjdtL5fYawFVEdnfhm9iMpFk,15978 +torch/utils/data/_utils/fetch.py,sha256=3F1nYcG5DGCtTDd_LhHLnYOC4pzjz0w8BTkJiUy9E7U,2010 +torch/utils/data/_utils/pin_memory.py,sha256=cnq1aHT6XIxFQ1nXYX-ALw3JmNhNZTsiKmFN3fGWz8M,4116 +torch/utils/data/_utils/signal_handling.py,sha256=4QRnZFkfMb3bgaptzCh24hgbwDITJ-32Tl5lgEZusNc,3261 +torch/utils/data/_utils/worker.py,sha256=xWMjBFU3ICLO74wZayjdiS51PNfyGnYxHawgu4RJOOs,14260 +torch/utils/data/backward_compatibility.py,sha256=hEdTcktD0OuPmwt2eK_F4UkslR-n6D7wd14VSfG1DI4,317 +torch/utils/data/dataloader.py,sha256=y42CsN6ZnyE0m33SYdMJGfz2kvCx11BMollOiOj9DpY,81155 +torch/utils/data/datapipes/__init__.py,sha256=OIYy5fRjiWdLc8SRrug0pOjrXouG0I-f2G8QQB0ynto,88 +torch/utils/data/datapipes/__pycache__/__init__.cpython-310.pyc,, +torch/utils/data/datapipes/__pycache__/_decorator.cpython-310.pyc,, +torch/utils/data/datapipes/__pycache__/_hook_iterator.cpython-310.pyc,, +torch/utils/data/datapipes/__pycache__/_typing.cpython-310.pyc,, +torch/utils/data/datapipes/__pycache__/datapipe.cpython-310.pyc,, +torch/utils/data/datapipes/__pycache__/gen_pyi.cpython-310.pyc,, +torch/utils/data/datapipes/_decorator.py,sha256=OhlEdmcjdqhVTfTc4FO2gIiJxQUMbcI-ug-5Nrc0Rig,7757 +torch/utils/data/datapipes/_hook_iterator.py,sha256=SciExxOz5XAb6PawByXG9MfuLdIN6XntMV_esMuqyU4,11972 +torch/utils/data/datapipes/_typing.py,sha256=G2ity3QqvQqZeS3NsojbXgKiLFD1comh3pGbphj1plk,16437 +torch/utils/data/datapipes/dataframe/__init__.py,sha256=j6gnc1vHYL9elliHkQsCRh9vaKbFRwHa0oMj6AIU2SY,378 +torch/utils/data/datapipes/dataframe/__pycache__/__init__.cpython-310.pyc,, +torch/utils/data/datapipes/dataframe/__pycache__/dataframe_wrapper.cpython-310.pyc,, +torch/utils/data/datapipes/dataframe/__pycache__/dataframes.cpython-310.pyc,, +torch/utils/data/datapipes/dataframe/__pycache__/datapipes.cpython-310.pyc,, +torch/utils/data/datapipes/dataframe/__pycache__/structures.cpython-310.pyc,, +torch/utils/data/datapipes/dataframe/dataframe_wrapper.py,sha256=9_V6cyBVauL0RpEehdWMCroAn1TGqKcM-M7ggGG7spg,3288 +torch/utils/data/datapipes/dataframe/dataframes.py,sha256=XvECqQrgwGT6DF6w3psLXJzTE8-CS7UZHWDo7THtseE,14624 +torch/utils/data/datapipes/dataframe/datapipes.py,sha256=1x78_3zeg8ZayCNzSeIlWyikwEKpf8Qwu1hTsEYzi4k,4626 +torch/utils/data/datapipes/dataframe/structures.py,sha256=7NKwwvZI2CtjpjvA1eJmyFQcbet7cYXdaxSMTFPZdx0,662 +torch/utils/data/datapipes/datapipe.py,sha256=VVX5I_Ulqt3NYtUsPNNROFNalRsflL1zVu8XjIhXE9g,17268 +torch/utils/data/datapipes/datapipe.pyi,sha256=kx0WXMNJNO74UvU-hs5iiaqijR-DucetLwH4As7sNNY,32730 +torch/utils/data/datapipes/gen_pyi.py,sha256=FR1brWWZ7IfnbsUblKApGwseZ51eORLfooAsf7lxEFE,11798 +torch/utils/data/datapipes/iter/__init__.py,sha256=Mh3NOCQIx3v7WrLqstLcFBuLDz4GRM-cSaBf-kJ6uFY,1862 +torch/utils/data/datapipes/iter/__pycache__/__init__.cpython-310.pyc,, +torch/utils/data/datapipes/iter/__pycache__/callable.cpython-310.pyc,, +torch/utils/data/datapipes/iter/__pycache__/combinatorics.cpython-310.pyc,, +torch/utils/data/datapipes/iter/__pycache__/combining.cpython-310.pyc,, +torch/utils/data/datapipes/iter/__pycache__/filelister.cpython-310.pyc,, +torch/utils/data/datapipes/iter/__pycache__/fileopener.cpython-310.pyc,, +torch/utils/data/datapipes/iter/__pycache__/grouping.cpython-310.pyc,, +torch/utils/data/datapipes/iter/__pycache__/routeddecoder.cpython-310.pyc,, +torch/utils/data/datapipes/iter/__pycache__/selecting.cpython-310.pyc,, +torch/utils/data/datapipes/iter/__pycache__/sharding.cpython-310.pyc,, +torch/utils/data/datapipes/iter/__pycache__/streamreader.cpython-310.pyc,, +torch/utils/data/datapipes/iter/__pycache__/utils.cpython-310.pyc,, +torch/utils/data/datapipes/iter/callable.py,sha256=8uxKn1f76Ub6S5Af6heG1vTn5R-n8GWFKmJTSvxsru0,9129 +torch/utils/data/datapipes/iter/combinatorics.py,sha256=VrUqkmiH8EAxD8YH1McX0k0NxqIt_7pm5ExPmqH2YKg,6513 +torch/utils/data/datapipes/iter/combining.py,sha256=GVZ_EKb155gutGBYOc_f9pzOqBNQdQoexvkzeF49le8,28085 +torch/utils/data/datapipes/iter/filelister.py,sha256=pd59x2Ls-g1SpKBm4T5hgln0LHSqCVO8L82rfNVI-VY,2554 +torch/utils/data/datapipes/iter/fileopener.py,sha256=Qz0RAtlb8o2A9-YIMGcRVU2T6RztItmNCuqcGcvPQeA,2889 +torch/utils/data/datapipes/iter/grouping.py,sha256=biMrk7no1nxMkTU4mVDxL9dMmikSmBHcsDFyyPuEMjM,12441 +torch/utils/data/datapipes/iter/routeddecoder.py,sha256=tdXrrUemDgjMWYxinV6bUeUFWxcujUc-UpqMVnHOW4o,2731 +torch/utils/data/datapipes/iter/selecting.py,sha256=LXpA0_L7TlTGkc5FlZpdzkxEaKqLUAEDoDFnAW3y4Ro,3308 +torch/utils/data/datapipes/iter/sharding.py,sha256=7L9kALGs1kF0dRr4O4RczAhVvv1mRQOKX8MrEc6_mpo,3587 +torch/utils/data/datapipes/iter/streamreader.py,sha256=TWVLV5IUepvqMWcNkEo3cBNbjbNYecXoXRpJ9GKfRGU,1537 +torch/utils/data/datapipes/iter/utils.py,sha256=y4CTzQ6oasBdi4xihoTYopUZ8_4P5eVoOCfk6s_aMSM,2109 +torch/utils/data/datapipes/map/__init__.py,sha256=6weaVqSBgL8DhjqKLXA2mpYjkh8djBYGEl8zwP4RXcY,714 +torch/utils/data/datapipes/map/__pycache__/__init__.cpython-310.pyc,, +torch/utils/data/datapipes/map/__pycache__/callable.cpython-310.pyc,, +torch/utils/data/datapipes/map/__pycache__/combinatorics.cpython-310.pyc,, +torch/utils/data/datapipes/map/__pycache__/combining.cpython-310.pyc,, +torch/utils/data/datapipes/map/__pycache__/grouping.cpython-310.pyc,, +torch/utils/data/datapipes/map/__pycache__/utils.cpython-310.pyc,, +torch/utils/data/datapipes/map/callable.py,sha256=lUC_SHHytKC2yJVi60rQdwxwrJGtxwoRCOkxIYio0k8,1933 +torch/utils/data/datapipes/map/combinatorics.py,sha256=7z15zvemzsOwnZvs9KaFs6WOW65nsj6V9eGHuQT3HOE,4267 +torch/utils/data/datapipes/map/combining.py,sha256=F4fe6WGH-Ya_tzv2i0FYC7tlcXtWSS3cDsZV5fHvyJQ,3903 +torch/utils/data/datapipes/map/grouping.py,sha256=6yhKtwyAviE9TcLEiJX-urTZeFZ_lE6nt3dHDEPgeV0,2488 +torch/utils/data/datapipes/map/utils.py,sha256=5oq8xhZHdJjrswR2Zzgef32cdSTMrgvvfrSC8f8EKLo,1813 +torch/utils/data/datapipes/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/utils/data/datapipes/utils/__pycache__/__init__.cpython-310.pyc,, +torch/utils/data/datapipes/utils/__pycache__/common.cpython-310.pyc,, +torch/utils/data/datapipes/utils/__pycache__/decoder.cpython-310.pyc,, +torch/utils/data/datapipes/utils/__pycache__/snapshot.cpython-310.pyc,, +torch/utils/data/datapipes/utils/common.py,sha256=tSDBePrnSBJkxvZuuyjskOs1p7fgP_zZChj_KVA1_mc,13893 +torch/utils/data/datapipes/utils/decoder.py,sha256=pz1ney5EaxNyh566Z_dPRbJPJQn2zTVQzagxsHyGTLY,12123 +torch/utils/data/datapipes/utils/snapshot.py,sha256=tk8G2YDUdmEjIOMlLxuqOScYD3bxFyHUmyt_rvZA3Ck,3145 +torch/utils/data/dataset.py,sha256=QiOU76Q5NSjFYzlXrZ3SIzo04keAGKC0rikBmYZ111I,19554 +torch/utils/data/distributed.py,sha256=lYZvlTxNcfW5ysXW2vvqZBwU3nYMymmi3d45_3aNc7I,6451 +torch/utils/data/graph.py,sha256=0rWT2IKMX2whRUyf6owBsdFjif-d-6cbRAtKnw2Z1RI,5830 +torch/utils/data/graph_settings.py,sha256=ImWDygTKAWFF9-wy0-RkgYh8_0l6HLiEJT3uhQK8jWM,5556 +torch/utils/data/sampler.py,sha256=gX-BikiX8MElaaqI7blRw9mRLMILSkfWK_87cMrfGsU,12738 +torch/utils/deterministic.py,sha256=aDwP89FjYTIT-3g2RtWBoagN59_JbqE2BZbgV4HttMU,611 +torch/utils/dlpack.py,sha256=xf66jbvrVfzzOypKLVw6Wgo1vD7MXq0K57cnJRoCbGI,8462 +torch/utils/file_baton.py,sha256=MC49FPov6VrEuNFtPNxBdq6g14lrGkwRsHAI9-mxlow,2140 +torch/utils/flop_counter.py,sha256=tZ02XMa-98MVHLYUDwnl-btjW1UnQMgZuulUicV6QA0,34384 +torch/utils/hipify/__init__.py,sha256=Jzb_RfgvXCrm_SQ4AfeGVi1N36YybxnM5mpyxrnihgI,33 +torch/utils/hipify/__pycache__/__init__.cpython-310.pyc,, +torch/utils/hipify/__pycache__/constants.cpython-310.pyc,, +torch/utils/hipify/__pycache__/cuda_to_hip_mappings.cpython-310.pyc,, +torch/utils/hipify/__pycache__/hipify_python.cpython-310.pyc,, +torch/utils/hipify/__pycache__/version.cpython-310.pyc,, +torch/utils/hipify/constants.py,sha256=sogTIVpPGdJWQA7OvnjfeAgNwbp8BpbWtO12xV-KBFE,1174 +torch/utils/hipify/cuda_to_hip_mappings.py,sha256=5bVeogUAvp3mHTjBn2O9Q-EyuGL9ygmvpdF8mBaNs2o,398996 +torch/utils/hipify/hipify_python.py,sha256=c3XOLDdftCXT543jnB_Wee743nP_DIsluhKHjTAWj9Q,47680 +torch/utils/hipify/version.py,sha256=RsZjRjMprNcDm97wqRRSk6rTLgTX8N0GyicZyZ8OsBQ,22 +torch/utils/hooks.py,sha256=zbWZkEMWxURSbkKEHOaLz5PiqFa_OAviDyd2_u5TJ0o,10212 +torch/utils/jit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/utils/jit/__pycache__/__init__.cpython-310.pyc,, +torch/utils/jit/__pycache__/log_extract.cpython-310.pyc,, +torch/utils/jit/log_extract.py,sha256=ow9gm6RPIXXwgGYOVx63uEreA31vzKY-pbaWTjfUR-E,4194 +torch/utils/mkldnn.py,sha256=OynlvKEDzAFEV5zLLqUKO61n-P_lExeBtuF_PEGW5qk,8244 +torch/utils/mobile_optimizer.py,sha256=lV9qq0E-O7M3AcVBnNdRJEYaQkEZwz7Tl7R6W1qo60s,6414 +torch/utils/model_dump/__init__.py,sha256=IZfRjacOoMdDjh4CnxvwHBY-cemXHVHm-w9bVCdCgJ8,19311 +torch/utils/model_dump/__main__.py,sha256=jYGPuoI11jzWgGKtK1-E550XLfPkrbHq_BRUbLusK-A,79 +torch/utils/model_dump/__pycache__/__init__.cpython-310.pyc,, +torch/utils/model_dump/__pycache__/__main__.cpython-310.pyc,, +torch/utils/model_dump/code.js,sha256=70w_JAT7N8dkWHrpQsA1enZCJK7VJOIy23ukbbbXQAg,19251 +torch/utils/model_dump/htm.mjs,sha256=m-psDFjVL3_BzcZnYkiRT8AIYhFhCY5ERrh_LP4sEH4,1230 +torch/utils/model_dump/preact.mjs,sha256=005yDhrtmGbeMNCyf7SMhNktZT4VisnDde1R-TMD5gk,10078 +torch/utils/model_dump/skeleton.html,sha256=vq4r1yFKZEchXwQmky1zpj3q65MCPDBD7wDt6SqzJGg,384 +torch/utils/model_zoo.py,sha256=o2NC-XaU8fqDXbUBQDv7thQBld_LOK-Ko63GS4x8Iyg,117 +torch/utils/module_tracker.py,sha256=pt9-CzmJYVRSg7U91RQCtU5rRBVGRmro0a9biTeKjCg,5434 +torch/utils/serialization/__init__.py,sha256=urhmq5QqBImvzUxNXw7VkCHllOx41xEyNenyZOWKYQQ,21 +torch/utils/serialization/__pycache__/__init__.cpython-310.pyc,, +torch/utils/serialization/__pycache__/config.cpython-310.pyc,, +torch/utils/serialization/config.py,sha256=01NhAREofDqt4RBG0NS2TRodKXUEyRwpmYw0dnBELdk,654 +torch/utils/show_pickle.py,sha256=gQRZpzpYj1zBCHMxehPmyqvC-9pIobj4-mhYH7cmkvo,5459 +torch/utils/tensorboard/__init__.py,sha256=ZYXvCXkbnXG7fJB_0aD2m1tdKIjo39LFzMqN7fku94w,480 +torch/utils/tensorboard/__pycache__/__init__.cpython-310.pyc,, +torch/utils/tensorboard/__pycache__/_convert_np.cpython-310.pyc,, +torch/utils/tensorboard/__pycache__/_embedding.cpython-310.pyc,, +torch/utils/tensorboard/__pycache__/_onnx_graph.cpython-310.pyc,, +torch/utils/tensorboard/__pycache__/_proto_graph.cpython-310.pyc,, +torch/utils/tensorboard/__pycache__/_pytorch_graph.cpython-310.pyc,, +torch/utils/tensorboard/__pycache__/_utils.cpython-310.pyc,, +torch/utils/tensorboard/__pycache__/summary.cpython-310.pyc,, +torch/utils/tensorboard/__pycache__/writer.cpython-310.pyc,, +torch/utils/tensorboard/_convert_np.py,sha256=Wcss2Qu8wlM9GHrn6m0AVXK8o8wyhsHdoGtxOjuZSPU,882 +torch/utils/tensorboard/_embedding.py,sha256=z6sP-bBDNOsAm-wJfa9GZ66pU9sJUzHKDiomNZ4BcOY,3281 +torch/utils/tensorboard/_onnx_graph.py,sha256=PA7DpVebSOvpqKYFiuvqqmzYFo3Y9zLDZRwN77c2YJw,1941 +torch/utils/tensorboard/_proto_graph.py,sha256=c27C4d9o0xu4COEo3sTa2VN7dRW5OF4EBeBdXpjxJVc,2146 +torch/utils/tensorboard/_pytorch_graph.py,sha256=64ULEjxTcoeCxPoreFtdPEY4g7VLz8GhdPoygYy1VfU,13908 +torch/utils/tensorboard/_utils.py,sha256=Ba09mgSthmGDFSV3kdroiSJftzJzmlZig-dtU6A_JfM,4416 +torch/utils/tensorboard/summary.py,sha256=A7Nao-3MvEKWVfq3Mf0MTwNdZyqR_oawVPObsNqYCJw,36888 +torch/utils/tensorboard/writer.py,sha256=YofS1lWLBJSbx-WqHG1GqwehSS5NYhw0nyWpKEv-Kvk,47533 +torch/utils/throughput_benchmark.py,sha256=zlDMe1eHSkg2aoXXUiRppGgYGb4IILIIPL2QHHxGxqI,6625 +torch/utils/viz/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torch/utils/viz/__pycache__/__init__.cpython-310.pyc,, +torch/utils/viz/__pycache__/_cycles.cpython-310.pyc,, +torch/utils/viz/_cycles.py,sha256=1-WtySNMYEy6ukW9kknuHbkLmcvV4bLr0lie7EBzbX4,17026 +torch/utils/weak.py,sha256=Gb_Y0QGo0zv63z34uV3ksh3z_VtfX0S7k2-1i-Rd8zs,12267 +torch/version.py,sha256=U-P7JM6vMA3oEa4Ich5co6ByDH75AMg2XaP-gMcnHrw,317 +torch/xpu/__init__.py,sha256=YyABknyuq1X4YnGk7Ng2mlIkDRaSukcoYo-8MWObc3I,19356 +torch/xpu/__pycache__/__init__.cpython-310.pyc,, +torch/xpu/__pycache__/_gpu_trace.cpython-310.pyc,, +torch/xpu/__pycache__/_utils.cpython-310.pyc,, +torch/xpu/__pycache__/memory.cpython-310.pyc,, +torch/xpu/__pycache__/random.cpython-310.pyc,, +torch/xpu/__pycache__/streams.cpython-310.pyc,, +torch/xpu/_gpu_trace.py,sha256=xVF2Wike9f8uqlxtwDshiyTFbduMGq0HupoSLb47_70,2364 +torch/xpu/_utils.py,sha256=JTETOkI3J7tp4SFKV3ukRlvQDO-6Qg850KkJ8wO6gh0,1591 +torch/xpu/memory.py,sha256=Z1rYRqFgj-po4aCMzzxxzTafRK9r5WAvbXT6Zfd_-i0,13165 +torch/xpu/random.py,sha256=dnrrJobYRQJd-6-JcuyoNmbkw7IsMsJM-GnigqsfnlY,5282 +torch/xpu/streams.py,sha256=iw4WmhDpCmmJhIkdS6GGzZZHIa9Cs0w-UT3FpdXMst4,5955 +torchgen/__init__.py,sha256=iirTpG38WcCsNMhEbi1dg7_jad6ptk_uzZ-BzaGBFyU,348 +torchgen/__pycache__/__init__.cpython-310.pyc,, +torchgen/__pycache__/code_template.cpython-310.pyc,, +torchgen/__pycache__/context.cpython-310.pyc,, +torchgen/__pycache__/gen.cpython-310.pyc,, +torchgen/__pycache__/gen_aoti_c_shim.cpython-310.pyc,, +torchgen/__pycache__/gen_backend_stubs.cpython-310.pyc,, +torchgen/__pycache__/gen_functionalization_type.cpython-310.pyc,, +torchgen/__pycache__/gen_lazy_tensor.cpython-310.pyc,, +torchgen/__pycache__/gen_schema_utils.cpython-310.pyc,, +torchgen/__pycache__/gen_vmap_plumbing.cpython-310.pyc,, +torchgen/__pycache__/local.cpython-310.pyc,, +torchgen/__pycache__/model.cpython-310.pyc,, +torchgen/__pycache__/native_function_generation.cpython-310.pyc,, +torchgen/__pycache__/utils.cpython-310.pyc,, +torchgen/__pycache__/yaml_utils.cpython-310.pyc,, +torchgen/aoti/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torchgen/aoti/__pycache__/__init__.cpython-310.pyc,, +torchgen/aoti/__pycache__/fallback_ops.cpython-310.pyc,, +torchgen/aoti/fallback_ops.py,sha256=jM5PnL1OfqBf7cp9NmcKE_cyTT1enYfmN1yDWUElmmQ,8266 +torchgen/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torchgen/api/__pycache__/__init__.cpython-310.pyc,, +torchgen/api/__pycache__/autograd.cpython-310.pyc,, +torchgen/api/__pycache__/cpp.cpython-310.pyc,, +torchgen/api/__pycache__/dispatcher.cpython-310.pyc,, +torchgen/api/__pycache__/functionalization.cpython-310.pyc,, +torchgen/api/__pycache__/lazy.cpython-310.pyc,, +torchgen/api/__pycache__/meta.cpython-310.pyc,, +torchgen/api/__pycache__/native.cpython-310.pyc,, +torchgen/api/__pycache__/python.cpython-310.pyc,, +torchgen/api/__pycache__/structured.cpython-310.pyc,, +torchgen/api/__pycache__/translate.cpython-310.pyc,, +torchgen/api/__pycache__/ufunc.cpython-310.pyc,, +torchgen/api/__pycache__/unboxing.cpython-310.pyc,, +torchgen/api/autograd.py,sha256=nhFrD22zbt1UdCyuEejF0tTKVU89bSXlnsYQOymYydY,38959 +torchgen/api/cpp.py,sha256=ZnH8_cUb1xko-rfX2U412o3a9LFtgUNDrzLw6r98IBU,16279 +torchgen/api/dispatcher.py,sha256=gPrg9tJ0ob1ErXWoGXJDGZTg0MbDCivTALKE7kjITU4,3479 +torchgen/api/functionalization.py,sha256=i1mC-9qDZ3P-JFqe2gX7-6kRhJphzOl6prvXVgcBeLk,7815 +torchgen/api/lazy.py,sha256=0Kmm1C4M9a4urfEMPke1oUI41I_yohnXCMRem9zmakc,17053 +torchgen/api/meta.py,sha256=zJYzviYI2gY9V9yPUyiZ_fShcdm_5LbigqGUH_WfaWw,483 +torchgen/api/native.py,sha256=xpye5SVepNMaHSIFzIfcrG-6BkDxCB3fPdQUPcilf5w,5205 +torchgen/api/python.py,sha256=H2bMn2UUx_islGq2fvdFA_ie-zxuIrGzR5aNHJyi38c,59687 +torchgen/api/structured.py,sha256=MuPt1MpFhHtZxXtUY5KaeccGY0Q_T5RHHXAFqgrdQVY,6115 +torchgen/api/translate.py,sha256=KBoD8K6_1e4I1ftVf2hDAoYri4zILxrs-3ZziTqYN2s,19297 +torchgen/api/types/__init__.py,sha256=bQ29sz_GNJGgqoDUsE6i_AcYZq81pOs1ATXQJQhUhLY,144 +torchgen/api/types/__pycache__/__init__.cpython-310.pyc,, +torchgen/api/types/__pycache__/signatures.cpython-310.pyc,, +torchgen/api/types/__pycache__/types.cpython-310.pyc,, +torchgen/api/types/__pycache__/types_base.cpython-310.pyc,, +torchgen/api/types/signatures.py,sha256=lMzNWPSRj5oUZbgb8EJrAsP1ob6Bj2YenzI-KcwrVIM,12825 +torchgen/api/types/types.py,sha256=gRiCF9DO_x0ARN1faZ9iYx0IRYTzyCywAwhWXqYzcuo,6210 +torchgen/api/types/types_base.py,sha256=5KzMRZ7idtW8VS7xUrBH24FeNpGQ4Byw7UAo5sjUKH0,7184 +torchgen/api/ufunc.py,sha256=BukIDKwJTKZMoasfvzKLTiP-kGOIoc7ptAiLtrM3egk,6693 +torchgen/api/unboxing.py,sha256=_JIvPzZF-LoRDkenskzx4JVTqiAit5-TTXk0F-pOjaU,9381 +torchgen/code_template.py,sha256=4Yo5Pc1lZapXIPqc1WPfV8tlOuZJxwoLDgFeE1CgaT4,3211 +torchgen/context.py,sha256=TESgCeRyBcLVD3ixrHShmeqQQKV9MSfkuiyXze_JH6o,4024 +torchgen/dest/__init__.py,sha256=qECRwrljRjK-kMdBqfc9X8JPVVPU6XlUuWNEdFD9u0w,805 +torchgen/dest/__pycache__/__init__.cpython-310.pyc,, +torchgen/dest/__pycache__/lazy_ir.cpython-310.pyc,, +torchgen/dest/__pycache__/lazy_ts_lowering.cpython-310.pyc,, +torchgen/dest/__pycache__/native_functions.cpython-310.pyc,, +torchgen/dest/__pycache__/register_dispatch_key.cpython-310.pyc,, +torchgen/dest/__pycache__/ufunc.cpython-310.pyc,, +torchgen/dest/lazy_ir.py,sha256=1IHFEXWgszQIySWsc__f_zs3VsVXmX96RfnS3VuilGM,28990 +torchgen/dest/lazy_ts_lowering.py,sha256=9QUvL_Z-mGqRfhtK_X2RSEHlGmFOqDr_J8cYJrALUG4,1831 +torchgen/dest/native_functions.py,sha256=I4SK08v3bRwTfFJP7CKtqP3yqmR6Bxt1MqR8g5h_LPg,3171 +torchgen/dest/register_dispatch_key.py,sha256=-rvA6YCoRAprlXo-L9ZxZYLkNCk_kmO709ElL0CAwhE,41484 +torchgen/dest/ufunc.py,sha256=WpaJR5EltYdz21ihQYVqfYq9UFD2J-s9p5HoFKAzSvw,17837 +torchgen/gen.py,sha256=VF366I9yEV0X22rgIdSMx3J40UXwFEn5r_XvWDvVCBs,114283 +torchgen/gen_aoti_c_shim.py,sha256=15nbdQam7uAWQInSLqtM_MGqGyqsMUpoLOS3WK0wP7U,28140 +torchgen/gen_backend_stubs.py,sha256=A2N6c1iPmAZ0VRygiN_fjO5Z9KQTwdvbXA6fbu8IYDE,22385 +torchgen/gen_functionalization_type.py,sha256=CTBMSIlrsuP6RQYVG8UDCHuaRjyUa2SReyzRC4aQ-lY,47241 +torchgen/gen_lazy_tensor.py,sha256=9BjJQpeZTMzTov-0t7WKAzcNu_I4iSzEXNv4mYn1AKs,22730 +torchgen/gen_schema_utils.py,sha256=UBP7DIYvs9LCe2T-u2-I0dbYwJEK5iq7LwBNHWc3Y-E,3283 +torchgen/gen_vmap_plumbing.py,sha256=O8ZAG-K2kNvLWjRChcpxIbaq_cNtg7G6nbBZttrft9Q,9391 +torchgen/local.py,sha256=dMVxtnuOWt4kewxkG2G7TN4EjPr37shRFzdtajs3QR8,2167 +torchgen/model.py,sha256=xyv9olyEmaUyWr19ao1r9YTmFSlJEfn60xLoVKX7Qv0,114542 +torchgen/native_function_generation.py,sha256=ZiAx2ok6wMnUY08LijwHMiEsj-Qk12ni824x-tt4I5s,29765 +torchgen/operator_versions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torchgen/operator_versions/__pycache__/__init__.cpython-310.pyc,, +torchgen/operator_versions/__pycache__/gen_mobile_upgraders.cpython-310.pyc,, +torchgen/operator_versions/__pycache__/gen_mobile_upgraders_constant.cpython-310.pyc,, +torchgen/operator_versions/gen_mobile_upgraders.py,sha256=w-G92xuAzrUdLZYIzD6COyfIx3Net0N-6iVg2XAiSZ8,12381 +torchgen/operator_versions/gen_mobile_upgraders_constant.py,sha256=C-U6rHQybm_FTcxsz27RMgJDj464NOLhlOzVjSjEn0w,243 +torchgen/packaged/ATen/native/native_functions.yaml,sha256=KcVcyzl-qFo5Lu1-F2gTp4Hd4ZJb_A9sCh_aY1pCGoM,618114 +torchgen/packaged/ATen/native/tags.yaml,sha256=RqITpHAZwlaIt0DtRUOVFU0M6EmOjw2qj82DE1-9_c4,5508 +torchgen/packaged/ATen/templates/ATenOpList.cpp,sha256=YobnhIm91ECCc6uYD2uDOrvFM4WqutKQbQ5x_Fh_5IE,1059 +torchgen/packaged/ATen/templates/CompositeViewCopyKernels.cpp,sha256=H64AHoCBB7MJIECAHNzki8NiTVPND0hy2vJ-KqiSF2c,2077 +torchgen/packaged/ATen/templates/DispatchKeyFunction.h,sha256=npUU8WpU76sZv8oqUQqBpcV_QHT6RW9j42EVTSA6pvA,702 +torchgen/packaged/ATen/templates/DispatchKeyFunctions.h,sha256=KlLfLZSYEG_7miq0fD8yuFtgVtm2mO4CQ9WiT6xoEpY,1937 +torchgen/packaged/ATen/templates/DispatchKeyFunctions_inl.h,sha256=nlAU0xWHQqRZn7JNV163YgAv5wwlykwsikMyjzZeZkI,824 +torchgen/packaged/ATen/templates/DispatchKeyNativeFunctions.cpp,sha256=DYjxJmYQ5Yegq1XW4hakqjvZo5skNWi2f5ZNLPUyQ4c,184 +torchgen/packaged/ATen/templates/DispatchKeyNativeFunctions.h,sha256=e8lUNJZ4jt0uMHjio6HOupVpMv83DtAaFBudAG6pEDw,384 +torchgen/packaged/ATen/templates/Function.h,sha256=Z2OimxsHx42itqLZE04H7-RiAPb7UJRzNZQvmVUW6n4,519 +torchgen/packaged/ATen/templates/FunctionalInverses.h,sha256=ikZPokOnPXrImLa9EbaKGPMgB4NsyIH1cuUSgmLyejQ,797 +torchgen/packaged/ATen/templates/Functions.cpp,sha256=OBZ0Sa3RsXJGI0bBJlxY3FopVvT_76QP9vjWXm-URN8,3107 +torchgen/packaged/ATen/templates/Functions.h,sha256=W_xrKMuoXaRhohnPldbA0OVqkAi_NYid-pZ9zJQAa8U,4637 +torchgen/packaged/ATen/templates/LazyIr.h,sha256=-aVOIdjB719-6SLBsUURho6x0xdKyXsN6h5QP76HTd8,585 +torchgen/packaged/ATen/templates/LazyNonNativeIr.h,sha256=KQbjyZ0Q8qK8JcgqAaF-M-ZhvRE5UhTj8JIHyceNK9Y,178 +torchgen/packaged/ATen/templates/MethodOperators.h,sha256=ifirYleNPll8bjo_OYaC8jEuLWIJlP0Asy0xjtdGfQo,830 +torchgen/packaged/ATen/templates/NativeFunction.h,sha256=C8rQosVZF3aESwI4IvZitd60sdGov6kvClkDAtnx3Oc,366 +torchgen/packaged/ATen/templates/NativeFunctions.h,sha256=N351coNgM9F_jpdma5OK3DvlNUw2oY51iBXKe5dK81Y,1149 +torchgen/packaged/ATen/templates/NativeMetaFunction.h,sha256=C0alnIY6J-5Mlca9_0ocI7bnFKo5jQ_QTuLzo8iCUDQ,452 +torchgen/packaged/ATen/templates/NativeMetaFunctions.h,sha256=mIOwmpkQY9zYolxUXK39c4nRDyG32vBsqEeSDo76p_k,306 +torchgen/packaged/ATen/templates/Operator.h,sha256=5TqYc2DVGzB2gwuIwC8p4D6KnSDIylKXScnjwLfpdu0,448 +torchgen/packaged/ATen/templates/Operators.cpp,sha256=cjfjkIMtfc8n1w0TDy_JJDJq0DK2cT9DfhkZw3YnTWM,347 +torchgen/packaged/ATen/templates/Operators.h,sha256=oU939CI59Drfg2QlKfkCdU6yVQBVi0y9Ia_kQ0rFC5k,3200 +torchgen/packaged/ATen/templates/RedispatchFunctions.cpp,sha256=pNhfp3gMBw4km2c_4EfeF6ge3DGZi8xtGCnkmjzfpi0,307 +torchgen/packaged/ATen/templates/RedispatchFunctions.h,sha256=HFJ8SLBmg2LNRbsp9MdhHBGGztTGhcjzdWCgYPx5f7c,882 +torchgen/packaged/ATen/templates/RegisterBackendSelect.cpp,sha256=Op-RV7_8UnF_dbxO-hZ8X-7DBnFHsP9s11cM0JkJOWY,752 +torchgen/packaged/ATen/templates/RegisterCodegenUnboxedKernels.cpp,sha256=tux2wSt9RalK0o5AfliXJB3N4diTi-88PwNHOobDbmM,1119 +torchgen/packaged/ATen/templates/RegisterDispatchDefinitions.ini,sha256=hnJyQ-BCtiix4FaiwW1l3Zaq95M8C0lFTwbySsiWMDs,455 +torchgen/packaged/ATen/templates/RegisterDispatchKey.cpp,sha256=H1qeAudkw2IT-m8ai9iPg_xp10ctCVXTfrUaftBMPfk,1475 +torchgen/packaged/ATen/templates/RegisterFunctionalization.cpp,sha256=XwSLhkDBdltLpwLt6tju8BXB0JLWK1MDPb01Gv3agCs,3461 +torchgen/packaged/ATen/templates/RegisterSchema.cpp,sha256=HoLTDNwRhe8xJJucgd6qCkqTglPtxLYCRGCD_4-S0j0,383 +torchgen/packaged/ATen/templates/RegistrationDeclarations.h,sha256=KImic_ILyhxavbGxVna-Ascf--okibalZJlK44a5dic,160 +torchgen/packaged/ATen/templates/TensorBody.h,sha256=XC_ffll_pB-M83EpxDufnQIzOpAJUlc-FEQxBn7ljqM,29267 +torchgen/packaged/ATen/templates/TensorMethods.cpp,sha256=4C7qcrfgMsziFBzG1-J96WteoZ3xsl4eWaLkc-9P6PQ,2613 +torchgen/packaged/ATen/templates/UfuncCPU.cpp,sha256=LrnISndBkXtdugvOWeRk9ZGYQlztFI5yqytoaZiKOQk,445 +torchgen/packaged/ATen/templates/UfuncCPUKernel.cpp,sha256=paz66F7U6E9e2X-rpbxlVDGcxevcXIOialaEqAaoArc,350 +torchgen/packaged/ATen/templates/UfuncCUDA.cu,sha256=HOBz8yO4QFxxmX_6gCF7L8MJvrGPwGQjoE-qDf8kF9Y,494 +torchgen/packaged/ATen/templates/UnboxingFunctions.cpp,sha256=wwdlYUaaCjXwhlaoqieeO-3fOqoQSBj62j6Is4n-UKY,709 +torchgen/packaged/ATen/templates/UnboxingFunctions.h,sha256=bcs4ET0LLtzs7nSSWhKA8jJzongib5CGlNA5yaExfKw,1026 +torchgen/packaged/ATen/templates/ViewMetaClasses.cpp,sha256=_8f0OdKZjfhK7LzODYmnmwaXjyie-LRnC-rVHxTv-ZM,346 +torchgen/packaged/ATen/templates/ViewMetaClasses.h,sha256=MhYaW9BQoS8iplXAz9IVu6_SY4JMG4eHP-ERqSXsdD0,233 +torchgen/packaged/ATen/templates/ViewMetaClassesPythonBinding.cpp,sha256=ATEHc06ioTG0d02quoCUFyBgaYR3FRV6SX-tkiLiFdY,292 +torchgen/packaged/ATen/templates/aten_interned_strings.h,sha256=_FM2jXAhATj9GZ66dXXUPx72q2uYnzT8iN4hkTz0rmI,805 +torchgen/packaged/ATen/templates/enum_tag.h,sha256=w3hCov4CToJ5qyHrnadei9907AIZkDLALSOlOZ1gP2Q,179 +torchgen/packaged/autograd/BUILD.bazel,sha256=Jd76gG6LQlmmEKK9IYlDbkVSmc8L5bTvGjG159L3rJA,104 +torchgen/packaged/autograd/README.md,sha256=hGiUzBaCs0wzBhEXB3vkWUXU4Lima6y5_wPKjAoKQ-Q,147 +torchgen/packaged/autograd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torchgen/packaged/autograd/__pycache__/__init__.cpython-310.pyc,, +torchgen/packaged/autograd/__pycache__/context.cpython-310.pyc,, +torchgen/packaged/autograd/__pycache__/gen_annotated_fn_args.cpython-310.pyc,, +torchgen/packaged/autograd/__pycache__/gen_autograd.cpython-310.pyc,, +torchgen/packaged/autograd/__pycache__/gen_autograd_functions.cpython-310.pyc,, +torchgen/packaged/autograd/__pycache__/gen_inplace_or_view_type.cpython-310.pyc,, +torchgen/packaged/autograd/__pycache__/gen_python_functions.cpython-310.pyc,, +torchgen/packaged/autograd/__pycache__/gen_trace_type.cpython-310.pyc,, +torchgen/packaged/autograd/__pycache__/gen_variable_factories.cpython-310.pyc,, +torchgen/packaged/autograd/__pycache__/gen_variable_type.cpython-310.pyc,, +torchgen/packaged/autograd/__pycache__/gen_view_funcs.cpython-310.pyc,, +torchgen/packaged/autograd/__pycache__/load_derivatives.cpython-310.pyc,, +torchgen/packaged/autograd/build.bzl,sha256=mByyWKdnGG70dVc0E-YFaqRlPzikan1ZAJDtUNvfD_Y,491 +torchgen/packaged/autograd/context.py,sha256=aCykxnX--PJ_Tl4CW2GOYAbW25o26ZyirEobqc7ozOk,954 +torchgen/packaged/autograd/deprecated.yaml,sha256=UbtajzWo89jf1Q5sw8JNJIZT5s-iDBagnrGJthtDS2Q,6250 +torchgen/packaged/autograd/derivatives.yaml,sha256=odoWohLYWvHQR09ycED9sZDTL2KWv9cCkzjyfMf5so4,182902 +torchgen/packaged/autograd/gen_annotated_fn_args.py,sha256=7SpCWSDgEj5pBYtWqsPAseC6Cfvyi_hUt-ST7BSF9hY,4476 +torchgen/packaged/autograd/gen_autograd.py,sha256=p6C9Pjmm1DyvB5QnFPqLs4EnWSR82cSpX975BipgJT8,4617 +torchgen/packaged/autograd/gen_autograd_functions.py,sha256=dtyifH9ppWGXQ_wIJ8izPKK-WhEjh5vHc133jGZxbOY,38202 +torchgen/packaged/autograd/gen_inplace_or_view_type.py,sha256=PdFBJzejyh2MiwIqvsWxgdxGxEG-qgj_XePjtYeT358,22715 +torchgen/packaged/autograd/gen_python_functions.py,sha256=DCddPWOLQ9jSzD-7YRAOaTYuXWAIwI3VvEPVMzLQ8DY,46384 +torchgen/packaged/autograd/gen_trace_type.py,sha256=v5Vip_2pFsKYbxyu06MM0UdU4e_Rm-dryIooB9SqGGk,19019 +torchgen/packaged/autograd/gen_variable_factories.py,sha256=a0Q5N1zGSVxfES_cnq88tjwOB9P79piRqchTrhWCNPk,4479 +torchgen/packaged/autograd/gen_variable_type.py,sha256=h5HV5KlA1aplHJPVvQmD_BfmVNnO8wgS3ZfiQn3pXQQ,84532 +torchgen/packaged/autograd/gen_view_funcs.py,sha256=vSdnTGGFcRqc3z1spnST9wsFylihaeTFy7jjtQoj7Hc,11589 +torchgen/packaged/autograd/load_derivatives.py,sha256=qTrUXbd2C0MHRTJ54JtOaXabAlEWZbolYjc2GAh4J9o,40621 +torchgen/packaged/autograd/templates/ADInplaceOrViewType.cpp,sha256=6juXEdMJaxhS1nv6bqUmx-cJLWPyc4Yb3teAeTyEBG4,790 +torchgen/packaged/autograd/templates/Functions.cpp,sha256=j8Ga18okz6DI1ulIL5BErJIskHKQZPhuuNlj5RcgUuE,1478 +torchgen/packaged/autograd/templates/Functions.h,sha256=9vjETYlNoQKCJVRNBmIvBoj6T2GA9-c16T5FPVmWpa0,1577 +torchgen/packaged/autograd/templates/TraceType.cpp,sha256=aqACTyrT05ElIiBLJYkfSgxNjwhum6_QUPDAtXwoKqo,695 +torchgen/packaged/autograd/templates/VariableType.cpp,sha256=AG80s3CwhESp-zaewyfHmwmL0cOxOXZJcZxqyn2cIBs,2259 +torchgen/packaged/autograd/templates/VariableType.h,sha256=DVuAf8_kgQCcnZsVBFxSwwJTNZbFo01C5dVFhcROmq4,1467 +torchgen/packaged/autograd/templates/ViewFuncs.cpp,sha256=oas1Pw6wWyAfRy2uh5K7fGD3qR60LD2Oiv-B5OW6Tvc,269 +torchgen/packaged/autograd/templates/ViewFuncs.h,sha256=7RoIEE9NQ6jWdg3SfdbRsQxACKdscsrnZN45JTJER5I,498 +torchgen/packaged/autograd/templates/annotated_fn_args.py.in,sha256=gRgF9BZmylhyfXrVSAVjg9Y4TUYpq1FgYVd3_hk_9no,199 +torchgen/packaged/autograd/templates/python_enum_tag.cpp,sha256=2cTLq6vaU-qjAXLrChZAnCmpVqA4oDvZLOsBY3GWmDA,495 +torchgen/packaged/autograd/templates/python_fft_functions.cpp,sha256=g8Ub5jh_YhgeourCXjB2zlH15Lm_oGwLa37IjibMoEc,1951 +torchgen/packaged/autograd/templates/python_functions.cpp,sha256=b20LJcBbbQHQ4hTt-2h__DIuk8uHksD4ZVD5csfM43Q,1121 +torchgen/packaged/autograd/templates/python_functions.h,sha256=WX52FzntisoprdObQvGXrzMhehgWZ2rIfnHzgNpX-5U,345 +torchgen/packaged/autograd/templates/python_linalg_functions.cpp,sha256=3NyK1tMOYwAsnxyb1k04RPiN9MQkriblY3GnPVOrfSY,1614 +torchgen/packaged/autograd/templates/python_nested_functions.cpp,sha256=2wivRfIBY8pkU9mqHVQfqnsIff6K1Al-BTJyRFuUeAw,2029 +torchgen/packaged/autograd/templates/python_nn_functions.cpp,sha256=8AyIozHVM21KEaVuOPgT-zPfPGj6hpNMC5SiwqUixW0,3501 +torchgen/packaged/autograd/templates/python_return_types.cpp,sha256=GB75OiT-5X3rmgXZlc30MB67qMlvqkzhrDIfIj1mZp4,1219 +torchgen/packaged/autograd/templates/python_return_types.h,sha256=ZDLPH-bxSjCpeyWLhU6kZsuAxa2pnCgTE57YpxXmDmQ,198 +torchgen/packaged/autograd/templates/python_sparse_functions.cpp,sha256=NW_L2mF7ZrR2FvXtDE7iNfw0BM-wTyUzBa_C1B5RZ7A,1551 +torchgen/packaged/autograd/templates/python_special_functions.cpp,sha256=JqcAExUPCnbzUujY2PIDL5Gap-ZKlltKiZmDTleO_8s,1972 +torchgen/packaged/autograd/templates/python_torch_functions.cpp,sha256=QEgUPJbi5TunkkQog-o6zoIjpLFZ6VFHQYxKe7BUAiw,2601 +torchgen/packaged/autograd/templates/python_variable_methods.cpp,sha256=h8H1qLkn5j-WAGBx2VdOjJv73nJZQKkWy0mrrXXXcn4,53977 +torchgen/packaged/autograd/templates/variable_factories.h,sha256=g-WOn2XuHBsLNGUk-emw0-KcrNsosDjqAu4NjPJCFA4,5637 +torchgen/selective_build/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torchgen/selective_build/__pycache__/__init__.cpython-310.pyc,, +torchgen/selective_build/__pycache__/operator.cpython-310.pyc,, +torchgen/selective_build/__pycache__/selector.cpython-310.pyc,, +torchgen/selective_build/operator.py,sha256=Ljbk1blp0ljG9qjg_RLb7Txeo1k_L5wRalhQXBQFC-s,6521 +torchgen/selective_build/selector.py,sha256=fZckUgNq4stv6nGT74vG483RlQ8hQGv5cdHq5XejyZU,12666 +torchgen/static_runtime/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torchgen/static_runtime/__pycache__/__init__.cpython-310.pyc,, +torchgen/static_runtime/__pycache__/config.cpython-310.pyc,, +torchgen/static_runtime/__pycache__/gen_static_runtime_ops.cpython-310.pyc,, +torchgen/static_runtime/__pycache__/generator.cpython-310.pyc,, +torchgen/static_runtime/config.py,sha256=JWrHLk7Men1T9lAINaTOnIeQOCorU5cfY-hXYYy_2J4,14487 +torchgen/static_runtime/gen_static_runtime_ops.py,sha256=eoYNdqEXbgEG5YMmYeKEMp8hAU9__jrmZ4j_n6DrDpA,7395 +torchgen/static_runtime/generator.py,sha256=SCAzUYjGAJlHFjDDuo5jkbyyjhG8KtdVsLfW69WCT8s,27116 +torchgen/utils.py,sha256=ELozfIkI7QFlZwwy2ajWHTL1NdWoJIvSt0Xg8Rq3img,16787 +torchgen/yaml_utils.py,sha256=kw3UXTMgpTgOG8SK1pxEOlAz1ASzlvMRFf6Rt-vKJVI,1080 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch-2.10.0.dist-info/WHEEL b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch-2.10.0.dist-info/WHEEL new file mode 100644 index 0000000000000000000000000000000000000000..0ae1f2287209419c2076913b624a606b156a24f8 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch-2.10.0.dist-info/WHEEL @@ -0,0 +1,6 @@ +Wheel-Version: 1.0 +Generator: setuptools (80.9.0) +Root-Is-Purelib: false +Tag: cp310-cp310-manylinux_2_28_x86_64 +Build: 3 + diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch-2.10.0.dist-info/entry_points.txt b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch-2.10.0.dist-info/entry_points.txt new file mode 100644 index 0000000000000000000000000000000000000000..11efe6037bac3676192b5e5d921a88e0f9e59685 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch-2.10.0.dist-info/entry_points.txt @@ -0,0 +1,6 @@ +[console_scripts] +torchfrtrace = torch.distributed.flight_recorder.fr_trace:main +torchrun = torch.distributed.run:main + +[torchrun.logs_specs] +default = torch.distributed.elastic.multiprocessing:DefaultLogsSpecs diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch-2.10.0.dist-info/licenses/LICENSE b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch-2.10.0.dist-info/licenses/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..47bee4248ac8175dc1e9fe294be040b56d4216e3 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch-2.10.0.dist-info/licenses/LICENSE @@ -0,0 +1,8961 @@ +From PyTorch: + +Copyright (c) 2016- Facebook, Inc (Adam Paszke) +Copyright (c) 2014- Facebook, Inc (Soumith Chintala) +Copyright (c) 2011-2014 Idiap Research Institute (Ronan Collobert) +Copyright (c) 2012-2014 Deepmind Technologies (Koray Kavukcuoglu) +Copyright (c) 2011-2012 NEC Laboratories America (Koray Kavukcuoglu) +Copyright (c) 2011-2013 NYU (Clement Farabet) +Copyright (c) 2006-2010 NEC Laboratories America (Ronan Collobert, Leon Bottou, Iain Melvin, Jason Weston) +Copyright (c) 2006 Idiap Research Institute (Samy Bengio) +Copyright (c) 2001-2004 Idiap Research Institute (Ronan Collobert, Samy Bengio, Johnny Mariethoz) + +From Caffe2: + +Copyright (c) 2016-present, Facebook Inc. All rights reserved. + +All contributions by Facebook: +Copyright (c) 2016 Facebook Inc. + +All contributions by Google: +Copyright (c) 2015 Google Inc. +All rights reserved. + +All contributions by Yangqing Jia: +Copyright (c) 2015 Yangqing Jia +All rights reserved. + +All contributions by Kakao Brain: +Copyright 2019-2020 Kakao Brain + +All contributions by Cruise LLC: +Copyright (c) 2022 Cruise LLC. +All rights reserved. + +All contributions by Tri Dao: +Copyright (c) 2024 Tri Dao. +All rights reserved. + +All contributions by Arm: +Copyright (c) 2021, 2023-2025 Arm Limited and/or its affiliates + +All contributions from Caffe: +Copyright(c) 2013, 2014, 2015, the respective contributors +All rights reserved. + +All other contributions: +Copyright(c) 2015, 2016 the respective contributors +All rights reserved. + +Caffe2 uses a copyright model similar to Caffe: each contributor holds +copyright over their contributions to Caffe2. The project versioning records +all such contribution and copyright details. If a contributor wants to further +mark their specific copyright on a particular contribution, they should +indicate their copyright solely in the commit message of the change when it is +committed. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. Neither the names of Facebook, Deepmind Technologies, NYU, NEC Laboratories America + and IDIAP Research Institute nor the names of its contributors may be + used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + + +The PyTorch repository and source distributions bundle several libraries that are +compatibly licensed. We list these here. + +Name: DCGM +License: Apache-2.0 +Files: /pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/DCGM + For details, see the files concatenated below: /pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/DCGM/LICENSE + +Name: FP16 +License: MIT +Files: /pytorch/third_party/FP16 + For details, see the files concatenated below: /pytorch/third_party/FP16/LICENSE + +Name: FXdiv +License: MIT +Files: /pytorch/third_party/FXdiv + For details, see the files concatenated below: /pytorch/third_party/FXdiv/LICENSE + +Name: NNPACK +License: BSD-2-Clause +Files: /pytorch/third_party/NNPACK + For details, see the files concatenated below: /pytorch/third_party/NNPACK/LICENSE + +Name: NVTX +License: Apache-2.0 with exception +Files: /pytorch/third_party/NVTX + For details, see the files concatenated below: /pytorch/third_party/NVTX/LICENSE.txt + +Name: VulkanMemoryAllocator +License: MIT +Files: /pytorch/third_party/VulkanMemoryAllocator + For details, see the files concatenated below: /pytorch/third_party/VulkanMemoryAllocator/LICENSE.txt + +Name: XNNPACK +License: BSD-3-Clause +Files: /pytorch/third_party/XNNPACK + For details, see the files concatenated below: /pytorch/third_party/XNNPACK/LICENSE + +Name: aiter +License: MIT +Files: /pytorch/third_party/aiter + For details, see the files concatenated below: /pytorch/third_party/aiter/LICENSE + +Name: benchmark +License: Apache-2.0 +Files: /pytorch/third_party/benchmark, + /pytorch/third_party/opentelemetry-cpp/third_party/benchmark, + /pytorch/third_party/protobuf/third_party/benchmark + For details, see the files concatenated below: /pytorch/third_party/benchmark/LICENSE, + /pytorch/third_party/opentelemetry-cpp/third_party/benchmark/LICENSE, + /pytorch/third_party/protobuf/third_party/benchmark/LICENSE + +Name: boost-vcpkg-helpers +License: MIT +Files: /pytorch/third_party/opentelemetry-cpp/tools/vcpkg/ports/boost-vcpkg-helpers + For details, see the files concatenated below: /pytorch/third_party/opentelemetry-cpp/tools/vcpkg/ports/boost-vcpkg-helpers/LICENSE.txt + +Name: cJSON +License: MIT +Files: /pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/prometheus-cpp/3rdparty/civetweb/examples/rest/cJSON, + /pytorch/third_party/opentelemetry-cpp/third_party/prometheus-cpp/3rdparty/civetweb/examples/rest/cJSON + For details, see the files concatenated below: /pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/prometheus-cpp/3rdparty/civetweb/examples/rest/cJSON/LICENSE, + /pytorch/third_party/opentelemetry-cpp/third_party/prometheus-cpp/3rdparty/civetweb/examples/rest/cJSON/LICENSE + +Name: catch2 +License: BSL-1.0 +Files: /pytorch/third_party/opentelemetry-cpp/third_party/opentracing-cpp/3rd_party/include/opentracing/catch2 + For details, see the files concatenated below: /pytorch/third_party/opentelemetry-cpp/third_party/opentracing-cpp/3rd_party/include/opentracing/catch2/LICENSE.txt + +Name: clog +License: BSD-2-Clause +Files: /pytorch/third_party/cpuinfo/deps/clog, + /pytorch/third_party/fbgemm/external/cpuinfo/deps/clog + For details, see the files concatenated below: /pytorch/third_party/cpuinfo/deps/clog/LICENSE, + /pytorch/third_party/fbgemm/external/cpuinfo/deps/clog/LICENSE + +Name: colorama +License: BSD-3-Clause +Files: /pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/DCGM/testing/python3/libs_3rdparty/colorama + For details, see the files concatenated below: /pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/DCGM/testing/python3/libs_3rdparty/colorama/LICENSE.txt + +Name: composable_kernel +License: MIT +Files: /pytorch/third_party/aiter/3rdparty/composable_kernel, + /pytorch/third_party/composable_kernel, + /pytorch/third_party/fbgemm/external/composable_kernel, + /pytorch/third_party/flash-attention/csrc/composable_kernel + For details, see the files concatenated below: /pytorch/third_party/aiter/3rdparty/composable_kernel/LICENSE, + /pytorch/third_party/composable_kernel/LICENSE, + /pytorch/third_party/fbgemm/external/composable_kernel/LICENSE, + /pytorch/third_party/flash-attention/csrc/composable_kernel/LICENSE + +Name: cpp-httplib +License: MIT +Files: /pytorch/third_party/cpp-httplib + For details, see the files concatenated below: /pytorch/third_party/cpp-httplib/LICENSE + +Name: cpplint +License: BSD-3-Clause +Files: /pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/json/third_party/cpplint + For details, see the files concatenated below: /pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/json/third_party/cpplint/LICENSE + +Name: cpr +License: MIT +Files: /pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/cpr + For details, see the files concatenated below: /pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/cpr/LICENSE + +Name: cpuinfo +License: BSD-2-Clause +Files: /pytorch/third_party/cpuinfo, + /pytorch/third_party/fbgemm/external/cpuinfo + For details, see the files concatenated below: /pytorch/third_party/cpuinfo/LICENSE, + /pytorch/third_party/fbgemm/external/cpuinfo/LICENSE + +Name: cudnn_frontend +License: MIT +Files: /pytorch/third_party/cudnn_frontend + For details, see the files concatenated below: /pytorch/third_party/cudnn_frontend/LICENSE.txt + +Name: cutlass +License: BSD-3-Clause +Files: /pytorch/third_party/cutlass, + /pytorch/third_party/fbgemm/external/cutlass, + /pytorch/third_party/flash-attention/csrc/cutlass + For details, see the files concatenated below: /pytorch/third_party/cutlass/LICENSE.txt, + /pytorch/third_party/fbgemm/external/cutlass/LICENSE.txt, + /pytorch/third_party/flash-attention/csrc/cutlass/LICENSE.txt + +Name: dart +License: Apache-2.0 +Files: /pytorch/third_party/flatbuffers/dart + For details, see the files concatenated below: /pytorch/third_party/flatbuffers/dart/LICENSE + +Name: docs +License: Apache-2.0 with exception +Files: /pytorch/third_party/NVTX/docs + For details, see the files concatenated below: /pytorch/third_party/NVTX/docs/LICENSE.txt + +Name: doctest +License: MIT +Files: /pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/json/test/thirdparty/doctest + For details, see the files concatenated below: /pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/json/test/thirdparty/doctest/LICENSE.txt + +Name: duktape-1.5.2 +License: MIT +Files: /pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/prometheus-cpp/3rdparty/civetweb/src/third_party/duktape-1.5.2, + /pytorch/third_party/opentelemetry-cpp/third_party/prometheus-cpp/3rdparty/civetweb/src/third_party/duktape-1.5.2 + For details, see the files concatenated below: /pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/prometheus-cpp/3rdparty/civetweb/src/third_party/duktape-1.5.2/LICENSE.txt, + /pytorch/third_party/opentelemetry-cpp/third_party/prometheus-cpp/3rdparty/civetweb/src/third_party/duktape-1.5.2/LICENSE.txt + +Name: duktape-1.8.0 +License: MIT +Files: /pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/prometheus-cpp/3rdparty/civetweb/src/third_party/duktape-1.8.0, + /pytorch/third_party/opentelemetry-cpp/third_party/prometheus-cpp/3rdparty/civetweb/src/third_party/duktape-1.8.0 + For details, see the files concatenated below: /pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/prometheus-cpp/3rdparty/civetweb/src/third_party/duktape-1.8.0/LICENSE.txt, + /pytorch/third_party/opentelemetry-cpp/third_party/prometheus-cpp/3rdparty/civetweb/src/third_party/duktape-1.8.0/LICENSE.txt + +Name: dynolog +License: MIT +Files: /pytorch/third_party/kineto/libkineto/third_party/dynolog + For details, see the files concatenated below: /pytorch/third_party/kineto/libkineto/third_party/dynolog/LICENSE + +Name: etw +License: MIT +Files: /pytorch/third_party/opentelemetry-cpp/exporters/etw/include/opentelemetry/exporters/etw + For details, see the files concatenated below: /pytorch/third_party/opentelemetry-cpp/exporters/etw/include/opentelemetry/exporters/etw/LICENSE + +Name: expected +License: MIT +Files: /pytorch/third_party/opentelemetry-cpp/third_party/opentracing-cpp/3rd_party/include/opentracing/expected + For details, see the files concatenated below: /pytorch/third_party/opentelemetry-cpp/third_party/opentracing-cpp/3rd_party/include/opentracing/expected/LICENSE + +Name: fbgemm +License: BSD-3-Clause +Files: /pytorch/third_party/fbgemm + For details, see the files concatenated below: /pytorch/third_party/fbgemm/LICENSE + +Name: ffnvcodec +License: MIT with exception +Files: /pytorch/third_party/opentelemetry-cpp/tools/vcpkg/ports/ffnvcodec + For details, see the files concatenated below: /pytorch/third_party/opentelemetry-cpp/tools/vcpkg/ports/ffnvcodec/LICENSE.txt + +Name: flash-attention +License: BSD-3-Clause +Files: /pytorch/third_party/flash-attention + For details, see the files concatenated below: /pytorch/third_party/flash-attention/LICENSE + +Name: flatbuffers +License: Apache-2.0 +Files: /pytorch/third_party/flatbuffers + For details, see the files concatenated below: /pytorch/third_party/flatbuffers/LICENSE + +Name: fmt +License: MIT with exception +Files: /pytorch/third_party/fmt, + /pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/fmt, + /pytorch/third_party/kineto/libkineto/third_party/fmt + For details, see the files concatenated below: /pytorch/third_party/fmt/LICENSE, + /pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/fmt/LICENSE.rst, + /pytorch/third_party/kineto/libkineto/third_party/fmt/LICENSE + +Name: gemmlowp +License: Apache-2.0 +Files: /pytorch/third_party/gemmlowp/gemmlowp + For details, see the files concatenated below: /pytorch/third_party/gemmlowp/gemmlowp/LICENSE + +Name: generator +License: Apache-2.0 +Files: /pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/prometheus-cpp/3rdparty/googletest/googlemock/scripts/generator, + /pytorch/third_party/opentelemetry-cpp/third_party/prometheus-cpp/3rdparty/googletest/googlemock/scripts/generator, + /pytorch/third_party/protobuf/third_party/googletest/googlemock/scripts/generator, + /pytorch/third_party/tensorpipe/third_party/googletest/googlemock/scripts/generator + For details, see the files concatenated below: /pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/prometheus-cpp/3rdparty/googletest/googlemock/scripts/generator/LICENSE, + /pytorch/third_party/opentelemetry-cpp/third_party/prometheus-cpp/3rdparty/googletest/googlemock/scripts/generator/LICENSE, + /pytorch/third_party/protobuf/third_party/googletest/googlemock/scripts/generator/LICENSE, + /pytorch/third_party/tensorpipe/third_party/googletest/googlemock/scripts/generator/LICENSE + +Name: gettimeofday +License: Apache-2.0 +Files: /pytorch/third_party/opentelemetry-cpp/tools/vcpkg/ports/gettimeofday + For details, see the files concatenated below: /pytorch/third_party/opentelemetry-cpp/tools/vcpkg/ports/gettimeofday/LICENSE + +Name: gloo +License: BSD-3-Clause +Files: /pytorch/third_party/gloo + For details, see the files concatenated below: /pytorch/third_party/gloo/LICENSE + +Name: googlemock +License: BSD-3-Clause +Files: /pytorch/third_party/protobuf/third_party/googletest/googlemock, + /pytorch/third_party/tensorpipe/third_party/googletest/googlemock + For details, see the files concatenated below: /pytorch/third_party/protobuf/third_party/googletest/googlemock/LICENSE, + /pytorch/third_party/tensorpipe/third_party/googletest/googlemock/LICENSE + +Name: googletest +License: BSD-3-Clause +Files: /pytorch/third_party/fbgemm/external/googletest, + /pytorch/third_party/googletest, + /pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/googletest, + /pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/prometheus-cpp/3rdparty/googletest, + /pytorch/third_party/kineto/libkineto/third_party/googletest, + /pytorch/third_party/opentelemetry-cpp/third_party/googletest, + /pytorch/third_party/opentelemetry-cpp/third_party/prometheus-cpp/3rdparty/googletest, + /pytorch/third_party/protobuf/third_party/googletest, + /pytorch/third_party/protobuf/third_party/googletest/googletest, + /pytorch/third_party/tensorpipe/third_party/googletest, + /pytorch/third_party/tensorpipe/third_party/googletest/googletest + For details, see the files concatenated below: /pytorch/third_party/fbgemm/external/googletest/LICENSE, + /pytorch/third_party/googletest/LICENSE, + /pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/googletest/LICENSE, + /pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/prometheus-cpp/3rdparty/googletest/LICENSE, + /pytorch/third_party/kineto/libkineto/third_party/googletest/LICENSE, + /pytorch/third_party/opentelemetry-cpp/third_party/googletest/LICENSE, + /pytorch/third_party/opentelemetry-cpp/third_party/prometheus-cpp/3rdparty/googletest/LICENSE, + /pytorch/third_party/protobuf/third_party/googletest/LICENSE, + /pytorch/third_party/protobuf/third_party/googletest/googletest/LICENSE, + /pytorch/third_party/tensorpipe/third_party/googletest/LICENSE, + /pytorch/third_party/tensorpipe/third_party/googletest/googletest/LICENSE + +Name: gtest +License: BSD-3-Clause +Files: /pytorch/third_party/ideep/mkl-dnn/tests/gtests/gtest + For details, see the files concatenated below: /pytorch/third_party/ideep/mkl-dnn/tests/gtests/gtest/LICENSE + +Name: hipify_torch +License: MIT +Files: /pytorch/third_party/fbgemm/external/hipify_torch + For details, see the files concatenated below: /pytorch/third_party/fbgemm/external/hipify_torch/LICENSE.txt + +Name: hstu +License: BSD-3-Clause +Files: /pytorch/third_party/fbgemm/fbgemm_gpu/experimental/hstu + For details, see the files concatenated below: /pytorch/third_party/fbgemm/fbgemm_gpu/experimental/hstu/LICENSE + +Name: hungarian +License: Permissive (free to use) +Files: /pytorch/third_party/opentelemetry-cpp/tools/vcpkg/ports/hungarian + For details, see the files concatenated below: /pytorch/third_party/opentelemetry-cpp/tools/vcpkg/ports/hungarian/LICENSE.txt + +Name: ideep +License: MIT +Files: /pytorch/third_party/ideep + For details, see the files concatenated below: /pytorch/third_party/ideep/LICENSE + +Name: irrlicht +License: MIT +Files: /pytorch/third_party/opentelemetry-cpp/tools/vcpkg/ports/irrlicht + For details, see the files concatenated below: /pytorch/third_party/opentelemetry-cpp/tools/vcpkg/ports/irrlicht/LICENSE.txt + +Name: kineto +License: BSD-3-Clause +Files: /pytorch/third_party/kineto + For details, see the files concatenated below: /pytorch/third_party/kineto/LICENSE + +Name: libnop +License: Apache-2.0 +Files: /pytorch/third_party/tensorpipe/third_party/libnop + For details, see the files concatenated below: /pytorch/third_party/tensorpipe/third_party/libnop/LICENSE + +Name: libstemmer +License: BSD-3-Clause +Files: /pytorch/third_party/opentelemetry-cpp/tools/vcpkg/ports/libstemmer + For details, see the files concatenated below: /pytorch/third_party/opentelemetry-cpp/tools/vcpkg/ports/libstemmer/LICENSE + +Name: libuv +License: MIT +Files: /pytorch/third_party/tensorpipe/third_party/libuv + For details, see the files concatenated below: /pytorch/third_party/tensorpipe/third_party/libuv/LICENSE + +Name: mimalloc +License: MIT +Files: /pytorch/third_party/mimalloc + For details, see the files concatenated below: /pytorch/third_party/mimalloc/LICENSE + +Name: miniz-3.0.2 +License: MIT +Files: /pytorch/third_party/miniz-3.0.2 + For details, see the files concatenated below: /pytorch/third_party/miniz-3.0.2/LICENSE + +Name: mkl-dnn +License: Apache-2.0 +Files: /pytorch/third_party/ideep/mkl-dnn + For details, see the files concatenated below: /pytorch/third_party/ideep/mkl-dnn/LICENSE + +Name: ms-gsl +License: MIT +Files: /pytorch/third_party/opentelemetry-cpp/third_party/ms-gsl + For details, see the files concatenated below: /pytorch/third_party/opentelemetry-cpp/third_party/ms-gsl/LICENSE + +Name: mx +License: MIT +Files: /pytorch/third_party/fbgemm/fbgemm_gpu/src/quantize_ops/mx, + /pytorch/third_party/fbgemm/fbgemm_gpu/test/quantize/mx + For details, see the files concatenated below: /pytorch/third_party/fbgemm/fbgemm_gpu/src/quantize_ops/mx/LICENSE, + /pytorch/third_party/fbgemm/fbgemm_gpu/test/quantize/mx/LICENSE + +Name: onnx +License: Apache-2.0 +Files: /pytorch/third_party/onnx + For details, see the files concatenated below: /pytorch/third_party/onnx/LICENSE + +Name: opentelemetry-cpp +License: Apache-2.0 +Files: /pytorch/third_party/opentelemetry-cpp + For details, see the files concatenated below: /pytorch/third_party/opentelemetry-cpp/LICENSE + +Name: opentelemetry-proto +License: Apache-2.0 +Files: /pytorch/third_party/opentelemetry-cpp/third_party/opentelemetry-proto + For details, see the files concatenated below: /pytorch/third_party/opentelemetry-cpp/third_party/opentelemetry-proto/LICENSE + +Name: opentracing-cpp +License: Apache-2.0 +Files: /pytorch/third_party/opentelemetry-cpp/third_party/opentracing-cpp + For details, see the files concatenated below: /pytorch/third_party/opentelemetry-cpp/third_party/opentracing-cpp/LICENSE + +Name: pdcurses +License: Public Domain for core +Files: /pytorch/third_party/opentelemetry-cpp/tools/vcpkg/ports/pdcurses + For details, see the files concatenated below: /pytorch/third_party/opentelemetry-cpp/tools/vcpkg/ports/pdcurses/LICENSE + +Name: pfs +License: Apache-2.0 +Files: /pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/pfs + For details, see the files concatenated below: /pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/pfs/LICENSE + +Name: physac +License: MIT +Files: /pytorch/third_party/opentelemetry-cpp/tools/vcpkg/ports/physac + For details, see the files concatenated below: /pytorch/third_party/opentelemetry-cpp/tools/vcpkg/ports/physac/LICENSE + +Name: pqp +License: Apache-2.0 +Files: /pytorch/third_party/opentelemetry-cpp/tools/vcpkg/ports/pqp + For details, see the files concatenated below: /pytorch/third_party/opentelemetry-cpp/tools/vcpkg/ports/pqp/LICENSE + +Name: prometheus-cpp +License: MIT +Files: /pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/prometheus-cpp, + /pytorch/third_party/opentelemetry-cpp/third_party/prometheus-cpp + For details, see the files concatenated below: /pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/prometheus-cpp/LICENSE, + /pytorch/third_party/opentelemetry-cpp/third_party/prometheus-cpp/LICENSE + +Name: protobuf +License: BSD-3-Clause +Files: /pytorch/third_party/protobuf + For details, see the files concatenated below: /pytorch/third_party/protobuf/LICENSE + +Name: psimd +License: MIT +Files: /pytorch/third_party/psimd + For details, see the files concatenated below: /pytorch/third_party/psimd/LICENSE + +Name: pthreadpool +License: BSD-2-Clause +Files: /pytorch/third_party/pthreadpool + For details, see the files concatenated below: /pytorch/third_party/pthreadpool/LICENSE + +Name: pybind11 +License: BSD-3-Clause +Files: /pytorch/third_party/onnx/third_party/pybind11, + /pytorch/third_party/pybind11, + /pytorch/third_party/tensorpipe/third_party/pybind11 + For details, see the files concatenated below: /pytorch/third_party/onnx/third_party/pybind11/LICENSE, + /pytorch/third_party/pybind11/LICENSE, + /pytorch/third_party/tensorpipe/third_party/pybind11/LICENSE + +Name: python +License: Apache-2.0 with exception +Files: /pytorch/third_party/NVTX/python + For details, see the files concatenated below: /pytorch/third_party/NVTX/python/LICENSE.txt + +Name: python +License: BSD-3-Clause +Files: /pytorch/third_party/cutlass/python + For details, see the files concatenated below: /pytorch/third_party/cutlass/python/LICENSE.txt + +Name: python +License: BSD-3-Clause +Files: /pytorch/third_party/fbgemm/external/cutlass/python + For details, see the files concatenated below: /pytorch/third_party/fbgemm/external/cutlass/python/LICENSE.txt + +Name: python +License: BSD-3-Clause +Files: /pytorch/third_party/flash-attention/csrc/cutlass/python + For details, see the files concatenated below: /pytorch/third_party/flash-attention/csrc/cutlass/python/LICENSE.txt + +Name: python-peachpy +License: BSD-2-Clause +Files: /pytorch/third_party/python-peachpy + For details, see the files concatenated below: /pytorch/third_party/python-peachpy/LICENSE.rst + +Name: sigslot +License: Public Domain +Files: /pytorch/third_party/opentelemetry-cpp/tools/vcpkg/ports/sigslot + For details, see the files concatenated below: /pytorch/third_party/opentelemetry-cpp/tools/vcpkg/ports/sigslot/LICENSE + +Name: sleef +License: BSL-1.0 +Files: /pytorch/third_party/sleef + For details, see the files concatenated below: /pytorch/third_party/sleef/LICENSE.txt + +Name: swift +License: Apache-2.0 +Files: /pytorch/third_party/flatbuffers/swift + For details, see the files concatenated below: /pytorch/third_party/flatbuffers/swift/LICENSE + +Name: tb_plugin +License: BSD-3-Clause +Files: /pytorch/third_party/kineto/tb_plugin + For details, see the files concatenated below: /pytorch/third_party/kineto/tb_plugin/LICENSE + +Name: tensorflow-common +License: MIT +Files: /pytorch/third_party/opentelemetry-cpp/tools/vcpkg/ports/tensorflow-common + For details, see the files concatenated below: /pytorch/third_party/opentelemetry-cpp/tools/vcpkg/ports/tensorflow-common/LICENSE.txt + +Name: tensorpipe +License: BSD-3-Clause +Files: /pytorch/third_party/tensorpipe + For details, see the files concatenated below: /pytorch/third_party/tensorpipe/LICENSE.txt + +Name: test +License: MIT with exception +Files: /pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/cpr/test + For details, see the files concatenated below: /pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/cpr/test/LICENSE + +Name: variant +License: BSD-3-Clause +Files: /pytorch/third_party/opentelemetry-cpp/third_party/opentracing-cpp/3rd_party/include/opentracing/variant + For details, see the files concatenated below: /pytorch/third_party/opentelemetry-cpp/third_party/opentracing-cpp/3rd_party/include/opentracing/variant/LICENSE + +Name: vcpkg +License: MIT +Files: /pytorch/third_party/opentelemetry-cpp/tools/vcpkg + For details, see the files concatenated below: /pytorch/third_party/opentelemetry-cpp/tools/vcpkg/LICENSE.txt + +Name: vulkan +License: Apache-2.0 with exception +Files: /pytorch/third_party/opentelemetry-cpp/tools/vcpkg/ports/vulkan + For details, see the files concatenated below: /pytorch/third_party/opentelemetry-cpp/tools/vcpkg/ports/vulkan/LICENSE.txt + +/pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/DCGM/LICENSE +---------------------------------------------------------------------------------- +Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + +/pytorch/third_party/FP16/LICENSE +--------------------------------- +The MIT License (MIT) + +Copyright (c) 2017 Facebook Inc. +Copyright (c) 2017 Georgia Institute of Technology +Copyright 2019 Google LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +/pytorch/third_party/FXdiv/LICENSE +---------------------------------- +The MIT License (MIT) + +Copyright (c) 2017 Facebook Inc. +Copyright (c) 2016-2017 Marat Dukhan + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +/pytorch/third_party/NNPACK/LICENSE +----------------------------------- +Copyright (c) 2017 Facebook Inc. +Copyright (c) 2015-2017, Georgia Institute of Technology +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +/pytorch/third_party/NVTX/LICENSE.txt +------------------------------------- +============================================================================== +NVTX is under the Apache License v2.0 with LLVM Exceptions: +============================================================================== + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +---- LLVM Exceptions to the Apache 2.0 License ---- + +As an exception, if, as a result of your compiling your source code, portions +of this Software are embedded into an Object form of such source code, you +may redistribute such embedded portions in such Object form without complying +with the conditions of Sections 4(a), 4(b) and 4(d) of the License. + +In addition, if you combine or link compiled forms of this Software with +software that is licensed under the GPLv2 ("Combined Software") and if a +court of competent jurisdiction determines that the patent provision (Section +3), the indemnity provision (Section 9) or other Section of the License +conflicts with the conditions of the GPLv2, you may retroactively and +prospectively choose to deem waived or otherwise exclude such Section(s) of +the License, but only in their entirety and only with respect to the Combined +Software. + + + +/pytorch/third_party/VulkanMemoryAllocator/LICENSE.txt +------------------------------------------------------ +Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +/pytorch/third_party/XNNPACK/LICENSE +------------------------------------ +BSD License + +For XNNPACK software + +Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. +Copyright 2019 Google LLC + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name Facebook nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +/pytorch/third_party/aiter/LICENSE +---------------------------------- +Copyright © Advanced Micro Devices, Inc. All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +/pytorch/third_party/benchmark/LICENSE +-------------------------------------- + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +/pytorch/third_party/opentelemetry-cpp/third_party/benchmark/LICENSE +-------------------------------------------------------------------- + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +/pytorch/third_party/protobuf/third_party/benchmark/LICENSE +----------------------------------------------------------- + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +/pytorch/third_party/opentelemetry-cpp/tools/vcpkg/ports/boost-vcpkg-helpers/LICENSE.txt +---------------------------------------------------------------------------------------- +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +/pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/prometheus-cpp/3rdparty/civetweb/examples/rest/cJSON/LICENSE +---------------------------------------------------------------------------------------------------------------------------------- +Copyright (c) 2009-2017 Dave Gamble and cJSON contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + + +/pytorch/third_party/opentelemetry-cpp/third_party/prometheus-cpp/3rdparty/civetweb/examples/rest/cJSON/LICENSE +--------------------------------------------------------------------------------------------------------------- +Copyright (c) 2009-2017 Dave Gamble and cJSON contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + + +/pytorch/third_party/opentelemetry-cpp/third_party/opentracing-cpp/3rd_party/include/opentracing/catch2/LICENSE.txt +------------------------------------------------------------------------------------------------------------------- +Boost Software License - Version 1.0 - August 17th, 2003 + +Permission is hereby granted, free of charge, to any person or organization +obtaining a copy of the software and accompanying documentation covered by +this license (the "Software") to use, reproduce, display, distribute, +execute, and transmit the Software, and to prepare derivative works of the +Software, and to permit third-parties to whom the Software is furnished to +do so, all subject to the following: + +The copyright notices in the Software and this entire statement, including +the above license grant, this restriction and the following disclaimer, +must be included in all copies of the Software, in whole or in part, and +all derivative works of the Software, unless such copies or derivative +works are solely in the form of machine-executable object code generated by +a source language processor. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + + +/pytorch/third_party/cpuinfo/deps/clog/LICENSE +---------------------------------------------- +Copyright (C) 2018 Marat Dukhan +Copyright (c) 2017-2018 Facebook Inc. +Copyright (c) 2017 Georgia Institute of Technology + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +/pytorch/third_party/fbgemm/external/cpuinfo/deps/clog/LICENSE +-------------------------------------------------------------- +Copyright (C) 2018 Marat Dukhan +Copyright (c) 2017-2018 Facebook Inc. +Copyright (c) 2017 Georgia Institute of Technology + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +/pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/DCGM/testing/python3/libs_3rdparty/colorama/LICENSE.txt +----------------------------------------------------------------------------------------------------------------------------- +Copyright (c) 2010 Jonathan Hartley + +Released under the New BSD license (reproduced below), or alternatively you may +use this software under any OSI approved open source license such as those at +http://opensource.org/licenses/alphabetical + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name(s) of the copyright holders, nor those of its contributors + may be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + +/pytorch/third_party/aiter/3rdparty/composable_kernel/LICENSE +------------------------------------------------------------- +Copyright (c) 2018- , Advanced Micro Devices, Inc. (Chao Liu, Jing Zhang) +Copyright (c) 2019- , Advanced Micro Devices, Inc. (Letao Qin, Qianfeng Zhang, Liang Huang, Shaojie Wang) +Copyright (c) 2022- , Advanced Micro Devices, Inc. (Anthony Chang, Chunyu Lai, Illia Silin, Adam Osewski, Poyen Chen, Jehandad Khan) +Copyright (c) 2019-2021, Advanced Micro Devices, Inc. (Hanwen Chang) +Copyright (c) 2019-2020, Advanced Micro Devices, Inc. (Tejash Shah) +Copyright (c) 2020 , Advanced Micro Devices, Inc. (Xiaoyan Zhou) +Copyright (c) 2021-2022, Advanced Micro Devices, Inc. (Jianfeng Yan) + +SPDX-License-Identifier: MIT +Copyright (c) 2018-2025, Advanced Micro Devices, Inc. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +/pytorch/third_party/composable_kernel/LICENSE +---------------------------------------------- +Copyright (c) 2018- , Advanced Micro Devices, Inc. (Chao Liu, Jing Zhang) +Copyright (c) 2019- , Advanced Micro Devices, Inc. (Letao Qin, Qianfeng Zhang, Liang Huang, Shaojie Wang) +Copyright (c) 2022- , Advanced Micro Devices, Inc. (Anthony Chang, Chunyu Lai, Illia Silin, Adam Osewski, Poyen Chen, Jehandad Khan) +Copyright (c) 2019-2021, Advanced Micro Devices, Inc. (Hanwen Chang) +Copyright (c) 2019-2020, Advanced Micro Devices, Inc. (Tejash Shah) +Copyright (c) 2020 , Advanced Micro Devices, Inc. (Xiaoyan Zhou) +Copyright (c) 2021-2022, Advanced Micro Devices, Inc. (Jianfeng Yan) + +SPDX-License-Identifier: MIT +Copyright (c) 2018-2025, Advanced Micro Devices, Inc. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +/pytorch/third_party/fbgemm/external/composable_kernel/LICENSE +-------------------------------------------------------------- +Copyright (c) 2018- , Advanced Micro Devices, Inc. (Chao Liu, Jing Zhang) +Copyright (c) 2019- , Advanced Micro Devices, Inc. (Letao Qin, Qianfeng Zhang, Liang Huang, Shaojie Wang) +Copyright (c) 2022- , Advanced Micro Devices, Inc. (Anthony Chang, Chunyu Lai, Illia Silin, Adam Osewski, Poyen Chen, Jehandad Khan) +Copyright (c) 2019-2021, Advanced Micro Devices, Inc. (Hanwen Chang) +Copyright (c) 2019-2020, Advanced Micro Devices, Inc. (Tejash Shah) +Copyright (c) 2020 , Advanced Micro Devices, Inc. (Xiaoyan Zhou) +Copyright (c) 2021-2022, Advanced Micro Devices, Inc. (Jianfeng Yan) + +SPDX-License-Identifier: MIT +Copyright (c) 2018-2025, Advanced Micro Devices, Inc. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +/pytorch/third_party/flash-attention/csrc/composable_kernel/LICENSE +------------------------------------------------------------------- +Copyright (c) 2018- , Advanced Micro Devices, Inc. (Chao Liu, Jing Zhang) +Copyright (c) 2019- , Advanced Micro Devices, Inc. (Letao Qin, Qianfeng Zhang, Liang Huang, Shaojie Wang) +Copyright (c) 2022- , Advanced Micro Devices, Inc. (Anthony Chang, Chunyu Lai, Illia Silin, Adam Osewski, Poyen Chen, Jehandad Khan) +Copyright (c) 2019-2021, Advanced Micro Devices, Inc. (Hanwen Chang) +Copyright (c) 2019-2020, Advanced Micro Devices, Inc. (Tejash Shah) +Copyright (c) 2020 , Advanced Micro Devices, Inc. (Xiaoyan Zhou) +Copyright (c) 2021-2022, Advanced Micro Devices, Inc. (Jianfeng Yan) + +SPDX-License-Identifier: MIT +Copyright (c) 2018-2024, Advanced Micro Devices, Inc. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +/pytorch/third_party/cpp-httplib/LICENSE +---------------------------------------- +The MIT License (MIT) + +Copyright (c) 2017 yhirose + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + + +/pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/json/third_party/cpplint/LICENSE +------------------------------------------------------------------------------------------------------ +cpplint.py and its corresponding unit tests are Copyright (C) 2009 Google Inc. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +/pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/cpr/LICENSE +--------------------------------------------------------------------------------- +This license applies to everything except the contents of the "test" +directory and its subdirectories. + +MIT License + +Copyright (c) 2017-2021 Huu Nguyen +Copyright (c) 2022 libcpr and many other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +/pytorch/third_party/cpuinfo/LICENSE +------------------------------------ +Copyright (c) 2019 Google LLC +Copyright (c) 2017-2018 Facebook Inc. +Copyright (C) 2012-2017 Georgia Institute of Technology +Copyright (C) 2010-2012 Marat Dukhan + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +/pytorch/third_party/fbgemm/external/cpuinfo/LICENSE +---------------------------------------------------- +Copyright (c) 2019 Google LLC +Copyright (c) 2017-2018 Facebook Inc. +Copyright (C) 2012-2017 Georgia Institute of Technology +Copyright (C) 2010-2012 Marat Dukhan + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +/pytorch/third_party/cudnn_frontend/LICENSE.txt +----------------------------------------------- +/* + * Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + + +/pytorch/third_party/cutlass/LICENSE.txt +---------------------------------------- +Copyright (c) 2017 - 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +SPDX-License-Identifier: BSD-3-Clause + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Certain files within this repository are subject to separate licensing terms: + +- The files located in the `python/CuTeDSL` directory are licensed under the + NVIDIA End User License Agreement (EULA). Please refer to + https://docs.nvidia.com/cutlass/media/docs/pythonDSL/license.html + for the full terms. + + +/pytorch/third_party/fbgemm/external/cutlass/LICENSE.txt +-------------------------------------------------------- +Copyright (c) 2017 - 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +SPDX-License-Identifier: BSD-3-Clause + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Certain files within this repository are subject to separate licensing terms: + +- The files located in the `python/CuTeDSL` directory are licensed under the + NVIDIA End User License Agreement (EULA). Please refer to + https://docs.nvidia.com/cutlass/media/docs/pythonDSL/license.html + for the full terms. + + +/pytorch/third_party/flash-attention/csrc/cutlass/LICENSE.txt +------------------------------------------------------------- +Copyright (c) 2017 - 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +SPDX-License-Identifier: BSD-3-Clause + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +/pytorch/third_party/flatbuffers/dart/LICENSE +--------------------------------------------- + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2014 Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +/pytorch/third_party/NVTX/docs/LICENSE.txt +------------------------------------------ +============================================================================== +NVTX is under the Apache License v2.0 with LLVM Exceptions: +============================================================================== + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +---- LLVM Exceptions to the Apache 2.0 License ---- + +As an exception, if, as a result of your compiling your source code, portions +of this Software are embedded into an Object form of such source code, you +may redistribute such embedded portions in such Object form without complying +with the conditions of Sections 4(a), 4(b) and 4(d) of the License. + +In addition, if you combine or link compiled forms of this Software with +software that is licensed under the GPLv2 ("Combined Software") and if a +court of competent jurisdiction determines that the patent provision (Section +3), the indemnity provision (Section 9) or other Section of the License +conflicts with the conditions of the GPLv2, you may retroactively and +prospectively choose to deem waived or otherwise exclude such Section(s) of +the License, but only in their entirety and only with respect to the Combined +Software. + + + +/pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/json/test/thirdparty/doctest/LICENSE.txt +-------------------------------------------------------------------------------------------------------------- +The MIT License (MIT) + +Copyright (c) 2016-2021 Viktor Kirilov + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +/pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/prometheus-cpp/3rdparty/civetweb/src/third_party/duktape-1.5.2/LICENSE.txt +------------------------------------------------------------------------------------------------------------------------------------------------ +=============== +Duktape license +=============== + +(http://opensource.org/licenses/MIT) + +Copyright (c) 2013-2016 by Duktape authors (see AUTHORS.rst) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +/pytorch/third_party/opentelemetry-cpp/third_party/prometheus-cpp/3rdparty/civetweb/src/third_party/duktape-1.5.2/LICENSE.txt +----------------------------------------------------------------------------------------------------------------------------- +=============== +Duktape license +=============== + +(http://opensource.org/licenses/MIT) + +Copyright (c) 2013-2016 by Duktape authors (see AUTHORS.rst) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +/pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/prometheus-cpp/3rdparty/civetweb/src/third_party/duktape-1.8.0/LICENSE.txt +------------------------------------------------------------------------------------------------------------------------------------------------ +=============== +Duktape license +=============== + +(http://opensource.org/licenses/MIT) + +Copyright (c) 2013-2017 by Duktape authors (see AUTHORS.rst) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +/pytorch/third_party/opentelemetry-cpp/third_party/prometheus-cpp/3rdparty/civetweb/src/third_party/duktape-1.8.0/LICENSE.txt +----------------------------------------------------------------------------------------------------------------------------- +=============== +Duktape license +=============== + +(http://opensource.org/licenses/MIT) + +Copyright (c) 2013-2017 by Duktape authors (see AUTHORS.rst) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +/pytorch/third_party/kineto/libkineto/third_party/dynolog/LICENSE +----------------------------------------------------------------- +MIT License + +Copyright (c) Facebook, Inc. and its affiliates. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +/pytorch/third_party/opentelemetry-cpp/exporters/etw/include/opentelemetry/exporters/etw/LICENSE +------------------------------------------------------------------------------------------------ +TraceLogging Dynamic for Windows + +Copyright (c) Microsoft Corporation. All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +/pytorch/third_party/opentelemetry-cpp/third_party/opentracing-cpp/3rd_party/include/opentracing/expected/LICENSE +----------------------------------------------------------------------------------------------------------------- +The MIT License (MIT) + +Copyright (c) 2015 Martin Moene +Copyright (c) 2015 Microsoft Corporation. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + + +/pytorch/third_party/fbgemm/LICENSE +----------------------------------- +BSD License + +For FBGEMM software + +Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name Facebook nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +/pytorch/third_party/opentelemetry-cpp/tools/vcpkg/ports/ffnvcodec/LICENSE.txt +------------------------------------------------------------------------------ +GNU LESSER GENERAL PUBLIC LICENSE +Version 2.1, February 1999 + +Copyright (C) 1991, 1999 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] +Preamble +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. + +This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. + +When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. + +To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. + +For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. + +We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. + +To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. + +Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. + +Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. + +When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. + +We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. + +For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. + +In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. + +Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. + +The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION +0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". + +A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. + +The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) + +"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. + +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. + +1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. + +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: + +a) The modified work must itself be a software library. +b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. +c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. +d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. +(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. + +3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. + +Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. + +This option is useful when you wish to copy part of the code of the Library into a program that is not a library. + +4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. + +If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. + +5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. + +However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. + +When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. + +If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) + +Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. + +6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. + +You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: + +a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) +b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. +c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. +d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. +e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. +For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. + +It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. + +7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: + +a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. +b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. +8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. + +9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. + +10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. + +11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. + +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. + +12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. + +13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. + +14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. + +NO WARRANTY + +15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS +How to Apply These Terms to Your New Libraries +If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). + +To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. + +one line to give the library's name and an idea of what it does. +Copyright (C) year name of author + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: + +Yoyodyne, Inc., hereby disclaims all copyright interest in +the library `Frob' (a library for tweaking knobs) written +by James Random Hacker. + +signature of Ty Coon, 1 April 1990 +Ty Coon, President of Vice +That's all there is to it! + +/pytorch/third_party/flash-attention/LICENSE +-------------------------------------------- +BSD 3-Clause License + +Copyright (c) 2022, the respective contributors, as shown by the AUTHORS file. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +/pytorch/third_party/flatbuffers/LICENSE +---------------------------------------- + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +/pytorch/third_party/fmt/LICENSE +-------------------------------- +Copyright (c) 2012 - present, Victor Zverovich and {fmt} contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- Optional exception to the license --- + +As an exception, if, as a result of your compiling your source code, portions +of this Software are embedded into a machine-executable object form of such +source code, you may redistribute such embedded portions in such object form +without including the above copyright and permission notices. + + +/pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/fmt/LICENSE.rst +------------------------------------------------------------------------------------- +Copyright (c) 2012 - present, Victor Zverovich + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- Optional exception to the license --- + +As an exception, if, as a result of your compiling your source code, portions +of this Software are embedded into a machine-executable object form of such +source code, you may redistribute such embedded portions in such object form +without including the above copyright and permission notices. + + +/pytorch/third_party/kineto/libkineto/third_party/fmt/LICENSE +------------------------------------------------------------- +Copyright (c) 2012 - present, Victor Zverovich and {fmt} contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- Optional exception to the license --- + +As an exception, if, as a result of your compiling your source code, portions +of this Software are embedded into a machine-executable object form of such +source code, you may redistribute such embedded portions in such object form +without including the above copyright and permission notices. + + +/pytorch/third_party/gemmlowp/gemmlowp/LICENSE +---------------------------------------------- + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +/pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/prometheus-cpp/3rdparty/googletest/googlemock/scripts/generator/LICENSE +--------------------------------------------------------------------------------------------------------------------------------------------- + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [2007] Neal Norwitz + Portions Copyright [2007] Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +/pytorch/third_party/opentelemetry-cpp/third_party/prometheus-cpp/3rdparty/googletest/googlemock/scripts/generator/LICENSE +-------------------------------------------------------------------------------------------------------------------------- + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [2007] Neal Norwitz + Portions Copyright [2007] Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +/pytorch/third_party/protobuf/third_party/googletest/googlemock/scripts/generator/LICENSE +----------------------------------------------------------------------------------------- + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [2007] Neal Norwitz + Portions Copyright [2007] Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +/pytorch/third_party/tensorpipe/third_party/googletest/googlemock/scripts/generator/LICENSE +------------------------------------------------------------------------------------------- + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [2007] Neal Norwitz + Portions Copyright [2007] Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +/pytorch/third_party/opentelemetry-cpp/tools/vcpkg/ports/gettimeofday/LICENSE +----------------------------------------------------------------------------- +/* + * Copied from PostgreSQL source: + * http://doxygen.postgresql.org/gettimeofday_8c_source.html + * + */ + +/* + * gettimeofday.c + * Win32 gettimeofday() replacement + * + * src/port/gettimeofday.c + * + * Copyright (c) 2003 SRA, Inc. + * Copyright (c) 2003 SKC, Inc. + * + * Permission to use, copy, modify, and distribute this software and + * its documentation for any purpose, without fee, and without a + * written agreement is hereby granted, provided that the above + * copyright notice and this paragraph and the following two + * paragraphs appear in all copies. + * + * IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, + * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING + * LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS + * DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + * THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS + * IS" BASIS, AND THE AUTHOR HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, + * SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + */ + + +/pytorch/third_party/gloo/LICENSE +--------------------------------- +BSD License + +For Gloo software + +Copyright (c) 2017-present, Facebook, Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name Facebook nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +/pytorch/third_party/protobuf/third_party/googletest/googlemock/LICENSE +----------------------------------------------------------------------- +Copyright 2008, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +/pytorch/third_party/tensorpipe/third_party/googletest/googlemock/LICENSE +------------------------------------------------------------------------- +Copyright 2008, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +/pytorch/third_party/fbgemm/external/googletest/LICENSE +------------------------------------------------------- +Copyright 2008, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +/pytorch/third_party/googletest/LICENSE +--------------------------------------- +Copyright 2008, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +/pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/googletest/LICENSE +---------------------------------------------------------------------------------------- +Copyright 2008, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +/pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/prometheus-cpp/3rdparty/googletest/LICENSE +---------------------------------------------------------------------------------------------------------------- +Copyright 2008, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +/pytorch/third_party/kineto/libkineto/third_party/googletest/LICENSE +-------------------------------------------------------------------- +Copyright 2008, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +/pytorch/third_party/opentelemetry-cpp/third_party/googletest/LICENSE +--------------------------------------------------------------------- +Copyright 2008, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +/pytorch/third_party/opentelemetry-cpp/third_party/prometheus-cpp/3rdparty/googletest/LICENSE +--------------------------------------------------------------------------------------------- +Copyright 2008, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +/pytorch/third_party/protobuf/third_party/googletest/LICENSE +------------------------------------------------------------ +Copyright 2008, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +/pytorch/third_party/protobuf/third_party/googletest/googletest/LICENSE +----------------------------------------------------------------------- +Copyright 2008, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +/pytorch/third_party/tensorpipe/third_party/googletest/LICENSE +-------------------------------------------------------------- +Copyright 2008, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +/pytorch/third_party/tensorpipe/third_party/googletest/googletest/LICENSE +------------------------------------------------------------------------- +Copyright 2008, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +/pytorch/third_party/ideep/mkl-dnn/tests/gtests/gtest/LICENSE +------------------------------------------------------------- +Copyright 2008, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +/pytorch/third_party/fbgemm/external/hipify_torch/LICENSE.txt +------------------------------------------------------------- +MIT License + +Copyright (c) 2021-2024, Advanced Micro Devices, Inc. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +/pytorch/third_party/fbgemm/fbgemm_gpu/experimental/hstu/LICENSE +---------------------------------------------------------------- +BSD 3-Clause License + +Copyright (c) 2022, the respective contributors, as shown by the AUTHORS file. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/* + * SPDX-FileCopyrightText: Copyright (c) <2024> NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * SPDX-License-Identifier: LicenseRef-NvidiaProprietary + * + * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual + * property and proprietary rights in and to this material, related + * documentation and any modifications thereto. Any use, reproduction, + * disclosure or distribution of this material and related documentation + * without an express license agreement from NVIDIA CORPORATION or + * its affiliates is strictly prohibited. + */ + +/pytorch/third_party/opentelemetry-cpp/tools/vcpkg/ports/hungarian/LICENSE.txt +------------------------------------------------------------------------------ +/******************************************************************** + ******************************************************************** + ** + ** libhungarian by Cyrill Stachniss, 2004 + ** + ** + ** Solving the Minimum Assignment Problem using the + ** Hungarian Method. + ** + ** ** This file may be freely copied and distributed! ** + ** + ** Parts of the used code was originally provided by the + ** "Stanford GraphGase", but I made changes to this code. + ** As asked by the copyright node of the "Stanford GraphGase", + ** I hereby proclaim that this file are *NOT* part of the + ** "Stanford GraphGase" distrubition! + ** + ** This file is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied + ** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + ** PURPOSE. + ** + ******************************************************************** + ********************************************************************/ + + +/pytorch/third_party/ideep/LICENSE +---------------------------------- +Copyright (c) 2018 Intel Corporation. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +/pytorch/third_party/opentelemetry-cpp/tools/vcpkg/ports/irrlicht/LICENSE.txt +----------------------------------------------------------------------------- +The Irrlicht Engine License +=========================== + +Copyright (C) 2002-2015 Nikolaus Gebhardt + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgement in the product documentation would be + appreciated but is not required. +2. Altered source versions must be clearly marked as such, and must not be + misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + +/pytorch/third_party/kineto/LICENSE +----------------------------------- +BSD License + +For Kineto software + +Copyright (c) Meta Platforms, Inc. and affiliates. + +All contributions by Microsoft: +Copyright (c) Microsoft Corporation. (The Azure AI Platform team) + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name Meta nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +/pytorch/third_party/tensorpipe/third_party/libnop/LICENSE +---------------------------------------------------------- +Copyright 2017 The Native Object Protocols Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + +/pytorch/third_party/opentelemetry-cpp/tools/vcpkg/ports/libstemmer/LICENSE +--------------------------------------------------------------------------- +Snowball - License +Except where explicitly noted, all the software given out on this Snowball site is covered by the 3-clause BSD License: + +Copyright (c) 2001, Dr Martin Porter, +Copyright (c) 2002, Richard Boulton. +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Essentially, all this means is that you can do what you like with the code, except claim another Copyright for it, or claim that it is issued under a different license. The software is also issued without warranties, which means that if anyone suffers through its use, they cannot come back and sue you. You also have to alert anyone to whom you give the Snowball software to the fact that it is covered by the BSD license. + +We have not bothered to insert the licensing arrangement into the text of the Snowball software. + + +/pytorch/third_party/tensorpipe/third_party/libuv/LICENSE +--------------------------------------------------------- +Copyright (c) 2015-present libuv project contributors. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. + + +/pytorch/third_party/mimalloc/LICENSE +------------------------------------- +MIT License + +Copyright (c) 2018-2025 Microsoft Corporation, Daan Leijen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +/pytorch/third_party/miniz-3.0.2/LICENSE +---------------------------------------- +Copyright 2013-2014 RAD Game Tools and Valve Software +Copyright 2010-2014 Rich Geldreich and Tenacious Software LLC + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +/pytorch/third_party/ideep/mkl-dnn/LICENSE +------------------------------------------ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + ============================================================================ + + Copyright 2016-2023 Intel Corporation + Copyright 2018 YANDEX LLC + Copyright 2019-2023 FUJITSU LIMITED + Copyright 2020-2023 Arm Ltd. and affiliates + Copyright 2020-2022 Codeplay Software Limited + Copyright 2021 Alanna Tempest + Copyright 2022-2023 IBM Corporation + Copyright 2023 KNS Group LLC (YADRO) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + This distribution includes third party software ("third party programs"). + This third party software, even if included with the distribution of + the Intel software, may be governed by separate license terms, including + without limitation, third party license terms, other Intel software license + terms, and open source software license terms. These separate license terms + govern your use of the third party programs as set forth in the + "THIRD-PARTY-PROGRAMS" file. + + +/pytorch/third_party/opentelemetry-cpp/third_party/ms-gsl/LICENSE +----------------------------------------------------------------- +Copyright (c) 2015 Microsoft Corporation. All rights reserved. + +This code is licensed under the MIT License (MIT). + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +/pytorch/third_party/fbgemm/fbgemm_gpu/src/quantize_ops/mx/LICENSE +------------------------------------------------------------------ + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + + +/pytorch/third_party/fbgemm/fbgemm_gpu/test/quantize/mx/LICENSE +--------------------------------------------------------------- + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + + +/pytorch/third_party/onnx/LICENSE +--------------------------------- + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +/pytorch/third_party/opentelemetry-cpp/LICENSE +---------------------------------------------- + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +/pytorch/third_party/opentelemetry-cpp/third_party/opentelemetry-proto/LICENSE +------------------------------------------------------------------------------ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +/pytorch/third_party/opentelemetry-cpp/third_party/opentracing-cpp/LICENSE +-------------------------------------------------------------------------- + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright The OpenTracing Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +/pytorch/third_party/opentelemetry-cpp/tools/vcpkg/ports/pdcurses/LICENSE +------------------------------------------------------------------------- +The core package is in the public domain, but small portions of PDCurses are subject to copyright under various licenses. + +The win32 files are released to the public domain. + +If you use PDCurses in an application, an acknowledgement would be appreciated, but is not mandatory. If you make corrections or enhancements to PDCurses, please forward them to the current maintainer for the benefit of other users. + +This software is provided AS IS with NO WARRANTY whatsoever. + +/pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/pfs/LICENSE +--------------------------------------------------------------------------------- + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2020-present Daniel Trugman + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +/pytorch/third_party/opentelemetry-cpp/tools/vcpkg/ports/physac/LICENSE +----------------------------------------------------------------------- +MIT License + +Copyright (c) 2022 Víctor Fisac + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +/pytorch/third_party/opentelemetry-cpp/tools/vcpkg/ports/pqp/LICENSE +-------------------------------------------------------------------- +Copyright 1999 University of North Carolina at Chapel Hill. +All rights reserved. + +Permission to use, copy, modify, and distribute this software and its +documentation for educational, research, and non-profit purposes, without fee, +and without a written agreement is hereby granted, provided that the above +copyright notice and the following three paragraphs appear in all copies. + +IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL BE LIABLE TO +ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, +INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS +DOCUMENTATION, EVEN IF THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL SPECIFICALLY DISCLAIMS ANY +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED +HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF NORTH CAROLINA AT +CHAPEL HILL HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, +ENHANCEMENTS, OR MODIFICATIONS. + +The authors may be contacted via: + +US Mail: Eric Larsen, Stefan Gottschalk + Department of Computer Science + Sitterson Hall, CB #3175 + University of North Carolina + Chapel Hill, NC 27599-3175 + +Phone: (919) 962-1749 + +Email: geom@cs.unc.edu + +/pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/prometheus-cpp/LICENSE +-------------------------------------------------------------------------------------------- +MIT License + +Copyright (c) 2016-2021 Jupp Mueller +Copyright (c) 2017-2022 Gregor Jasny + +And many contributors, see +https://github.com/jupp0r/prometheus-cpp/graphs/contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +/pytorch/third_party/opentelemetry-cpp/third_party/prometheus-cpp/LICENSE +------------------------------------------------------------------------- +MIT License + +Copyright (c) 2016-2021 Jupp Mueller +Copyright (c) 2017-2022 Gregor Jasny + +And many contributors, see +https://github.com/jupp0r/prometheus-cpp/graphs/contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +/pytorch/third_party/protobuf/LICENSE +------------------------------------- +Copyright 2008 Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Code generated by the Protocol Buffer compiler is owned by the owner +of the input file used when generating it. This code is not +standalone and requires a support library to be linked with it. This +support library is itself covered by the above license. + + +/pytorch/third_party/psimd/LICENSE +---------------------------------- +The MIT License (MIT) + +Copyright (c) 2017 Facebook Inc. +Copyright (c) 2014-2017 Georgia Institute of Technology +Copyright 2019 Google LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +/pytorch/third_party/pthreadpool/LICENSE +---------------------------------------- +Copyright 2019 Google LLC +Copyright (c) 2017 Facebook Inc. +Copyright (c) 2015-2017 Georgia Institute of Technology +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + +/pytorch/third_party/onnx/third_party/pybind11/LICENSE +------------------------------------------------------ +Copyright (c) 2016 Wenzel Jakob , All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Please also refer to the file .github/CONTRIBUTING.md, which clarifies licensing of +external contributions to this project including patches, pull requests, etc. + + +/pytorch/third_party/pybind11/LICENSE +------------------------------------- +Copyright (c) 2016 Wenzel Jakob , All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Please also refer to the file .github/CONTRIBUTING.md, which clarifies licensing of +external contributions to this project including patches, pull requests, etc. + + +/pytorch/third_party/tensorpipe/third_party/pybind11/LICENSE +------------------------------------------------------------ +Copyright (c) 2016 Wenzel Jakob , All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Please also refer to the file CONTRIBUTING.md, which clarifies licensing of +external contributions to this project including patches, pull requests, etc. + + +/pytorch/third_party/NVTX/python/LICENSE.txt +-------------------------------------------- +============================================================================== +NVTX is under the Apache License v2.0 with LLVM Exceptions: +============================================================================== + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +---- LLVM Exceptions to the Apache 2.0 License ---- + +As an exception, if, as a result of your compiling your source code, portions +of this Software are embedded into an Object form of such source code, you +may redistribute such embedded portions in such Object form without complying +with the conditions of Sections 4(a), 4(b) and 4(d) of the License. + +In addition, if you combine or link compiled forms of this Software with +software that is licensed under the GPLv2 ("Combined Software") and if a +court of competent jurisdiction determines that the patent provision (Section +3), the indemnity provision (Section 9) or other Section of the License +conflicts with the conditions of the GPLv2, you may retroactively and +prospectively choose to deem waived or otherwise exclude such Section(s) of +the License, but only in their entirety and only with respect to the Combined +Software. + + + +/pytorch/third_party/cutlass/python/LICENSE.txt +----------------------------------------------- +Copyright (c) 2017 - 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +SPDX-License-Identifier: BSD-3-Clause + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +/pytorch/third_party/fbgemm/external/cutlass/python/LICENSE.txt +--------------------------------------------------------------- +Copyright (c) 2017 - 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +SPDX-License-Identifier: BSD-3-Clause + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +/pytorch/third_party/flash-attention/csrc/cutlass/python/LICENSE.txt +-------------------------------------------------------------------- +Copyright (c) 2017 - 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +SPDX-License-Identifier: BSD-3-Clause + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +/pytorch/third_party/python-peachpy/LICENSE.rst +----------------------------------------------- +============================== +PeachPy license (2-clause BSD) +============================== + +Copyright (c) 2017, Facebook Inc. +Copyright (c) 2013-2017, Georgia Institute of Technology +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +/pytorch/third_party/opentelemetry-cpp/tools/vcpkg/ports/sigslot/LICENSE +------------------------------------------------------------------------ +License +The sigslot library has been placed in the public domain. This means that you are free to use it however you like. + +The author takes no responsibility or liability of any kind for any use that you may make of this library. + +If you screw up, it's your fault. + +If the library screws up, you got it for free, so you should have tested it better - it's still your responsibility. + +/pytorch/third_party/sleef/LICENSE.txt +-------------------------------------- +Boost Software License - Version 1.0 - August 17th, 2003 + +Permission is hereby granted, free of charge, to any person or organization +obtaining a copy of the software and accompanying documentation covered by +this license (the "Software") to use, reproduce, display, distribute, +execute, and transmit the Software, and to prepare derivative works of the +Software, and to permit third-parties to whom the Software is furnished to +do so, all subject to the following: + +The copyright notices in the Software and this entire statement, including +the above license grant, this restriction and the following disclaimer, +must be included in all copies of the Software, in whole or in part, and +all derivative works of the Software, unless such copies or derivative +works are solely in the form of machine-executable object code generated by +a source language processor. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + + +/pytorch/third_party/flatbuffers/swift/LICENSE +---------------------------------------------- + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +/pytorch/third_party/kineto/tb_plugin/LICENSE +--------------------------------------------- +BSD License + +For Kineto software + +Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. + +All contributions by Microsoft: +Copyright (c) Microsoft Corporation. (The Azure AI Platform team) + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name Facebook nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +/pytorch/third_party/opentelemetry-cpp/tools/vcpkg/ports/tensorflow-common/LICENSE.txt +-------------------------------------------------------------------------------------- +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +/pytorch/third_party/tensorpipe/LICENSE.txt +------------------------------------------- +BSD License + +For TensorPipe software + +Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name Meta nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +/pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/cpr/test/LICENSE +-------------------------------------------------------------------------------------- +This license applies to everything inside this directory and all +subdirectories. + + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. + +/pytorch/third_party/opentelemetry-cpp/third_party/opentracing-cpp/3rd_party/include/opentracing/variant/LICENSE +---------------------------------------------------------------------------------------------------------------- +Copyright (c) MapBox +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +- Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +- Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. +- Neither the name "MapBox" nor the names of its contributors may be + used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/pytorch/third_party/opentelemetry-cpp/tools/vcpkg/LICENSE.txt +-------------------------------------------------------------- +MIT License + +Copyright (c) Microsoft Corporation + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be included in all copies +or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +/pytorch/third_party/opentelemetry-cpp/tools/vcpkg/ports/vulkan/LICENSE.txt +--------------------------------------------------------------------------- +/* +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of this License; and +You must cause any modified files to carry prominent notices stating that You changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. +You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +=============================================================================================================================================== + +/Copyright (C) 2012 LunarG, Inc. +//All rights reserved. +// +//Redistribution and use in source and binary forms, with or without +//modification, are permitted provided that the following conditions +//are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// +// Neither the name of LunarG Inc. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +//POSSIBILITY OF SUCH DAMAGE. + +=============================================================================================================================================== + +#============================================================================= +# Copyright 2007-2009 Kitware, Inc. +# Copyright 2007-2008 Miguel A. Figueroa-Villanueva +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright_cmake.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distributed this file outside of CMake, substitute the full +# License text for the above reference.) + + +============================================================================================================================================== + +// +// Copyright (C) 2015-2018 Google, Inc. +// Copyright (C) +// +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// +// Neither the name of 3Dlabs Inc. Ltd. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// + +========================================================================================================================================== + +Note: This license has also been called the "New BSD License" or "Modified BSD License". See also the 2-clause BSD License. +Copyright +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +========================================================================================================================================== + +/* +* xxHash - Fast Hash algorithm +* Copyright (C) 2012-2016, Yann Collet +* +* BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are +* met: +* +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above +* copyright notice, this list of conditions and the following disclaimer +* in the documentation and/or other materials provided with the +* distribution. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +* You can contact the author at : +* - xxHash homepage: http://www.xxhash.com +* - xxHash source repository : https://github.com/Cyan4973/xxHash +*/ + + +=========================================================================================================================================== + +# Copyright (C) 2018 Google, Inc. +# +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# +# Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +========================================================================================================================================== + +/* A Bison parser, made by GNU Bison 3.0.4. */ + +/* Bison implementation for Yacc-like parsers in C +Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program. If not, see . */ + +/* As a special exception, you may create a larger work that contains +part or all of the Bison parser skeleton and distribute that work +under terms of your choice, so long as that work isn't itself a +parser generator using the skeleton or a modified version thereof +as a parser skeleton. Alternatively, if you modify or redistribute +the parser skeleton itself, you may (at your option) remove this +special exception, which will cause the skeleton and the resulting +Bison output files to be licensed under the GNU General Public +License without this special exception. +This special exception was added by the Free Software Foundation in +version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by +simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid +infringing on user name space. This should be done even for local +variables, as they might otherwise be expanded by user macros. +There are some unavoidable exceptions within include files to +define necessary library symbols; they are noted "INFRINGES ON +USER NAME SPACE" below. */ + +============================================================================================================================================== + +copyright : [ +Copyright (c) 2017 The Khronos Group Inc., +, +Permission is hereby granted, free of charge, to any person obtaining a copy, +of this software and/or associated documentation files (the \Materials\"),", +to deal in the Materials without restriction, including without limitation, +the rights to use, copy, modify, merge, publish, distribute, sublicense,, +and/or sell copies of the Materials, and to permit persons to whom the, +Materials are furnished to do so, subject to the following conditions:, +, +The above copyright notice and this permission notice shall be included in, +all copies or substantial portions of the Materials., +, +MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS, +STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND, +HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ , +, +THE MATERIALS ARE PROVIDED \AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS", +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL, +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER, +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING, +FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS, +IN THE MATERIALS. + +============================================================================================================================================= + +CMake - Cross Platform Makefile Generator +Copyright 2000-2009 Kitware, Inc., Insight Software Consortium +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +* Neither the names of Kitware, Inc., the Insight Software Consortium, +nor the names of their contributors may be used to endorse or promote +products derived from this software without specific prior written +permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------ + +The above copyright and license notice applies to distributions of +CMake in source and binary form. Some source files contain additional +notices of original copyright by their contributors; see each source +for details. Third-party software packages supplied with CMake under +compatible licenses provide their own copyright notices documented in +corresponding subdirectories. + +------------------------------------------------------------------------------ + +CMake was initially developed by Kitware with the following sponsorship: + +* National Library of Medicine at the National Institutes of Health +as part of the Insight Segmentation and Registration Toolkit (ITK). + +* US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel +Visualization Initiative. + +* National Alliance for Medical Image Computing (NAMIC) is funded by the +National Institutes of Health through the NIH Roadmap for Medical Research, +Grant U54 EB005149. + +* Kitware, Inc. + +======================================================================================================================================== + +The authors of this software are Rob Pike and Ken Thompson. +* Copyright (c) 2002 by Lucent Technologies. +* Permission to use, copy, modify, and distribute this software for any +* purpose without fee is hereby granted, provided that this entire notice +* is included in all copies of any software which is or includes a copy +* or modification of this software and in all copies of the supporting +* documentation for such software. +* THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED +* WARRANTY. IN PARTICULAR, NEITHER THE AUTHORS NOR LUCENT TECHNOLOGIES MAKE ANY +* REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY +* OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. + + +======================================================================================================================================== + +Copyright (c) 2015-2018 Baldur Karlsson + +Copyright (c) 2014 Crytek + +Copyright (c) 1998-2018 Third party code and tools + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +========================================================================================================================================= + +/* +Copyright (c) 2009 Dave Gamble +Copyright (c) 2015-2016 The Khronos Group Inc. +Copyright (c) 2015-2016 Valve Corporation +Copyright (c) 2015-2016 LunarG, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + +=========================================================================================================================================== + +Copyright (c) 2005 - 2017 G-Truc Creation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + + +========================================================================================================================================== + +/* +The JsonCpp library's source code, including accompanying documentation, +tests and demonstration applications, are licensed under the following +conditions... +The author (Baptiste Lepilleur) explicitly disclaims copyright in all +jurisdictions which recognize such a disclaimer. In such jurisdictions, +this software is released into the Public Domain. +In jurisdictions which do not recognize Public Domain property (e.g. Germany as of +2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is +released under the terms of the MIT License (see below). +In jurisdictions which recognize Public Domain property, the user of this +software may choose to accept it either as 1) Public Domain, 2) under the +conditions of the MIT License (see below), or 3) under the terms of dual +Public Domain/MIT License conditions described here, as they choose. +The MIT License is about as close to Public Domain as a license can get, and is +described in clear, concise terms at: +http://en.wikipedia.org/wiki/MIT_License + +The full text of the MIT License follows: + +Copyright (c) 2007-2010 Baptiste Lepilleur +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, copy, +modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +========================================================================================================================================== + +/** +* `murmurhash.h' - murmurhash +* +* copyright (c) 2014 joseph werle +* Copyright (c) 2015-2016 The Khronos Group Inc. +* Copyright (c) 2015-2016 Valve Corporation +* Copyright (c) 2015-2016 LunarG, Inc. +* +* Permission is hereby granted, free of charge, to any person obtaining a copy +* of this software and/or associated documentation files (the "Materials"), to +* deal in the Materials without restriction, including without limitation the +* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +* sell copies of the Materials, and to permit persons to whom the Materials are +* furnished to do so, subject to the following conditions: +* +* The above copyright notice(s) and this permission notice shall be included in +* all copies or substantial portions of the Materials. +* +* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +* +* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE +* USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +========================================================================================================================================= + +Licenced as X11: http://www.kryogenix.org/code/browser/licence.html +This basically means: do what you want with it. + +========================================================================================================================================= + +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/common.hpp +/// @date 2013-12-24 / 2013-12-24 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + + +========================================================================================================================================== + +// LICENSE +// +// This software is in the public domain. Where that dedication is not +// recognized, you are granted a perpetual, irrevocable license to copy, +// distribute, and modify this file as you see fit. +// + +========================================================================================================================================== + +Simple DirectMedia Layer +Copyright (C) 1997-2018 Sam Lantinga + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not +claim that you wrote the original software. If you use this software +in a product, an acknowledgment in the product documentation would be +appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be +misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + +========================================================================================================================================= + +/****************************************************************************\ +Copyright (c) 2002, NVIDIA Corporation. + +NVIDIA Corporation("NVIDIA") supplies this software to you in +consideration of your agreement to the following terms, and your use, +installation, modification or redistribution of this NVIDIA software +constitutes acceptance of these terms. If you do not agree with these +terms, please do not use, install, modify or redistribute this NVIDIA +software. + +In consideration of your agreement to abide by the following terms, and +subject to these terms, NVIDIA grants you a personal, non-exclusive +license, under NVIDIA's copyrights in this original NVIDIA software (the +NVIDIA Software), to use, reproduce, modify and redistribute the +NVIDIA Software, with or without modifications, in source and/or binary +forms; provided that if you redistribute the NVIDIA Software, you must +retain the copyright notice of NVIDIA, this notice and the following +text and disclaimers in all such redistributions of the NVIDIA Software. +Neither the name, trademarks, service marks nor logos of NVIDIA +Corporation may be used to endorse or promote products derived from the +NVIDIA Software without specific prior written permission from NVIDIA. +Except as expressly stated in this notice, no other rights or licenses +express or implied, are granted by NVIDIA herein, including but not +limited to any patent rights that may be infringed by your derivative +works or by other works in which the NVIDIA Software may be +incorporated. No hardware is licensed hereunder. + +THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, +INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR +ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER +PRODUCTS. + +IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, +INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY +OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE +NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, +TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF +NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +\****************************************************************************/ + +================================================================================================================================================== + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + + +================================================================================================================================================== + +GNU LESSER GENERAL PUBLIC LICENSE +Version 3, 29 June 2007 + +Copyright (C) 2007 Free Software Foundation, Inc. + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + +This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. + +0. Additional Definitions. + +As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. + +"The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. + +An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. + +A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". + +The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. + +The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. + +1. Exception to Section 3 of the GNU GPL. + +You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. + +2. Conveying Modified Versions. + +If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: + +a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or +b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. +3. Object Code Incorporating Material from Library Header Files. + +The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: + +a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. +b) Accompany the object code with a copy of the GNU GPL and this license document. +4. Combined Works. + +You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: + +a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. +b) Accompany the Combined Work with a copy of the GNU GPL and this license document. +c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. +d) Do one of the following: +0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. +1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. +e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) +5. Combined Libraries. + +You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: + +a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. +b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. +6. Revised Versions of the GNU Lesser General Public License. + +The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. + +If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch-2.10.0.dist-info/licenses/NOTICE b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch-2.10.0.dist-info/licenses/NOTICE new file mode 100644 index 0000000000000000000000000000000000000000..6effb8b5d70709f90835f2f5d646352fd77b6943 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch-2.10.0.dist-info/licenses/NOTICE @@ -0,0 +1,456 @@ +======================================================================= +Software under third_party +======================================================================= +Software libraries under third_party are provided as github submodule +links, and their content is not part of the Caffe2 codebase. Their +licences can be found under the respective software repositories. + +======================================================================= +Earlier BSD License +======================================================================= +Early development of Caffe2 in 2015 and early 2016 is licensed under the +BSD license. The license is attached below: + +All contributions by Facebook: +Copyright (c) 2016 Facebook Inc. + +All contributions by Google: +Copyright (c) 2015 Google Inc. +All rights reserved. + +All contributions by Yangqing Jia: +Copyright (c) 2015 Yangqing Jia +All rights reserved. + +All contributions by Kakao Brain: +Copyright 2019-2020 Kakao Brain + +All other contributions: +Copyright(c) 2015, 2016 the respective contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +======================================================================= +Caffe's BSD License +======================================================================= +Some parts of the caffe2 code is derived from the original Caffe code, which is +created by Yangqing Jia and is now a BSD-licensed open-source project. The Caffe +license is as follows: + +COPYRIGHT + +All contributions by the University of California: +Copyright (c) 2014, The Regents of the University of California (Regents) +All rights reserved. + +All other contributions: +Copyright (c) 2014, the respective contributors +All rights reserved. + +Caffe uses a shared copyright model: each contributor holds copyright over +their contributions to Caffe. The project versioning records all such +contribution and copyright details. If a contributor wants to further mark +their specific copyright on a particular contribution, they should indicate +their copyright solely in the commit message of the change when it is +committed. + +LICENSE + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +CONTRIBUTION AGREEMENT + +By contributing to the BVLC/caffe repository through pull-request, comment, +or otherwise, the contributor releases their content to the +license and copyright terms herein. + +======================================================================= +Caffe2's Apache License +======================================================================= + +This repo contains Caffe2 code, which was previously licensed under +Apache License Version 2.0: + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +======================================================================= +Cephes's 3-Clause BSD License +======================================================================= + +Code derived from implementations in the Cephes Math Library should mention +its derivation and reference the following license: + + 3-Clause BSD License for the Cephes Math Library + Copyright (c) 2018, Steven Moshier + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL Steven Moshier BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +======================================================================= +SciPy's 3-Clause BSD License +======================================================================= + +Code derived from implementations in SciPy should mention its derivation +and reference the following license: + + Copyright (c) 2001-2002 Enthought, Inc. 2003-2019, SciPy Developers. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + 3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +======================================================================= +Boost's 1.0 Software License +======================================================================= + +Code derived from implementations in Boost 1.0 should mention its +derivation and reference the following license: + + Boost Software License - Version 1.0 - August 17th, 2003 + + Permission is hereby granted, free of charge, to any person or organization + obtaining a copy of the software and accompanying documentation covered by + this license (the "Software") to use, reproduce, display, distribute, + execute, and transmit the Software, and to prepare derivative works of the + Software, and to permit third-parties to whom the Software is furnished to + do so, all subject to the following: + + The copyright notices in the Software and this entire statement, including + the above license grant, this restriction and the following disclaimer, + must be included in all copies of the Software, in whole or in part, and + all derivative works of the Software, unless such copies or derivative + works are solely in the form of machine-executable object code generated by + a source language processor. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT + SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE + FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +======================================================================= +PILLOW-SIMD Software License +======================================================================= + +Code derived from implementations in PILLOW-SIMD should mention its derivation +and reference the following license: + + The Python Imaging Library (PIL) is + + Copyright © 1997-2011 by Secret Labs AB + Copyright © 1995-2011 by Fredrik Lundh + + Pillow is the friendly PIL fork. It is + + Copyright © 2010-2022 by Alex Clark and contributors + + Like PIL, Pillow is licensed under the open source HPND License: + + By obtaining, using, and/or copying this software and/or its associated + documentation, you agree that you have read, understood, and will comply + with the following terms and conditions: + + Permission to use, copy, modify, and distribute this software and its + associated documentation for any purpose and without fee is hereby granted, + provided that the above copyright notice appears in all copies, and that + both that copyright notice and this permission notice appear in supporting + documentation, and that the name of Secret Labs AB or the author not be + used in advertising or publicity pertaining to distribution of the software + without specific, written prior permission. + + SECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS + SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. + IN NO EVENT SHALL SECRET LABS AB OR THE AUTHOR BE LIABLE FOR ANY SPECIAL, + INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch-2.10.0.dist-info/top_level.txt b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch-2.10.0.dist-info/top_level.txt new file mode 100644 index 0000000000000000000000000000000000000000..90d81bec1d35eb3996334268974885a5398b6c6c --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch-2.10.0.dist-info/top_level.txt @@ -0,0 +1,3 @@ +functorch +torch +torchgen diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_strobelight/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_strobelight/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_strobelight/cli_function_profiler.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_strobelight/cli_function_profiler.py new file mode 100644 index 0000000000000000000000000000000000000000..d2e1595bf2a1477b33ed00446d86e6cdea267a8f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_strobelight/cli_function_profiler.py @@ -0,0 +1,313 @@ +# mypy: disallow-untyped-defs + +import functools +import logging +import os +import re +import subprocess +import time +from collections.abc import Callable, Sequence +from threading import Lock +from typing import Any, TypeVar +from typing_extensions import ParamSpec + + +logger = logging.getLogger("strobelight_function_profiler") + +console_handler = logging.StreamHandler() +formatter = logging.Formatter( + "%(name)s, line %(lineno)d, %(asctime)s, %(levelname)s: %(message)s" +) +console_handler.setFormatter(formatter) + +logger.addHandler(console_handler) +logger.setLevel(logging.INFO) +logger.propagate = False + +_P = ParamSpec("_P") +_R = TypeVar("_R") + + +class StrobelightCLIProfilerError(Exception): + """ + Raised when an error happens during strobelight profiling + """ + + +def _pid_namespace_link(pid: int | None = None) -> str: + """Returns the link to the process's namespace, example: pid:[4026531836]""" + PID_NAMESPACE_PATH = "/proc/{}/ns/pid" + pid = pid or os.getpid() + return os.readlink(PID_NAMESPACE_PATH.format(pid)) + + +def _pid_namespace(pid: int | None = None) -> int: + """Returns the process's namespace id""" + pid = pid or os.getpid() + link = _pid_namespace_link(pid) + return int(link[link.find("[") + 1 : -1]) + + +def _command_to_string(command: Sequence[str]) -> str: + return " ".join(command) + + +class StrobelightCLIFunctionProfiler: + """ + Note: this is a meta only tool. + + StrobelightCLIFunctionProfiler can be used to profile a python function and + generate a strobelight link with the results. It works on meta servers but + does not requires an fbcode target. + When stop_at_error is false(default), error during profiling does not prevent + the work function from running. + + Check function_profiler_example.py for an example. + """ + + # This lock is used to make sure only one thread is running the profiler at any point. + _lock = Lock() + + def __init__( + self, + *, + stop_at_error: bool = False, + max_profile_duration_sec: int = 60 * 10, + sample_each: float = 1e7, # sample each sample_each cycles. + run_user_name: str = "pytorch-strobelight-ondemand", + timeout_wait_for_running_sec: int = 60, + timeout_wait_for_finished_sec: int = 60, + recorded_env_variables: list[str] | None = None, + sample_tags: list[str] | None = None, + stack_max_len: int = 127, + async_stack_max_len: int = 127, + ) -> None: + self.stop_at_error = stop_at_error + self.max_profile_duration_sec = max_profile_duration_sec + self.sample_each = sample_each + self.run_user_name = run_user_name + self.timeout_wait_for_running_sec = timeout_wait_for_running_sec + self.timeout_wait_for_finished_sec = timeout_wait_for_finished_sec + # Results of the most recent run. + # Tracks the strobelight run id of the most recent run + self.current_run_id: int | None = None + self.sample_tags = sample_tags + + def _run_async(self) -> None: + processId = os.getpid() + namespace = _pid_namespace(processId) + command = [ + "strobeclient", + "run", + "--profiler", + "pyperf", + "--event", + "cycles", + "--async", + "--sample-interval", + f"{int(self.sample_each)}", + "--duration-ms", + f"{int(self.max_profile_duration_sec * 1000)}", + "--pid", + f"{namespace}:{processId}", + ] + + if self.sample_tags: + command.append("--sample-tags") + command.append(",".join(self.sample_tags)) + + logger.debug("running command: %s", _command_to_string(command)) + result = subprocess.run(command, capture_output=True) + output = result.stderr.decode("utf-8") + logger.debug("output:\n{%s}", output) + + if result.returncode != 0: + raise StrobelightCLIProfilerError( + f"failed to start strobelight profiling, error in run_async:{output}" + ) + + if match := re.search(r"INFO Run Id: (-?\d+)", output): + self.current_run_id = int(match.group(1)) + return + + raise StrobelightCLIProfilerError( + f"failed to start strobelight profiling, unexpected result {output}" + ) + + def _wait_for_running(self, counter: int = 0) -> None: + if counter > 20: + raise StrobelightCLIProfilerError( + "wait_for_running called more than 20 times" + ) + + command = ["strobeclient", "getRunStatus", "--run-id", f"{self.current_run_id}"] + logger.debug("running command: %s", _command_to_string(command)) + result = subprocess.run(command, capture_output=True) + output = result.stderr.decode("utf-8") + logger.debug("output:\n{%s}", output) + + if result.returncode != 0: + raise StrobelightCLIProfilerError( + f"failed to start strobelight profiling, error in wait_for_running:{output}" + ) + + if match := re.search("Profile run status: (.*)", output): + current_status = match.group(1) + if current_status == "RUNNING": + return + elif current_status == "PREPARING": + time.sleep(10) + self._wait_for_running(counter + 1) + return + else: + raise StrobelightCLIProfilerError(f"unexpected {current_status} phase") + + raise StrobelightCLIProfilerError(f"unexpected output\n: {output} ") + + def _stop_run(self) -> None: + command = ["strobeclient", "stopRun", "--run-id", str(self.current_run_id)] + logger.debug("running command: %s", _command_to_string(command)) + result = subprocess.run(command, capture_output=True) + output = result.stderr.decode("utf-8") + logger.debug("output:\n{%s}", output) + + if result.returncode != 0: + raise StrobelightCLIProfilerError( + f"failed to stop strobelight profiling, return code is not 0 :{output}" + ) + + if match := re.search("INFO ::1:(.*)", output): + current_status = match.group(1) + if current_status.__contains__("Success!"): + return + else: + raise StrobelightCLIProfilerError( + f"failed to stop strobelight profiling, got {current_status} result" + ) + + raise StrobelightCLIProfilerError(f"unexpected output\n: {output} ") + + def _get_results(self) -> None: + command = ["strobeclient", "getRunStatus", "--run-id", str(self.current_run_id)] + logger.debug("running command: %s", _command_to_string(command)) + result = subprocess.run(command, capture_output=True) + output = result.stderr.decode("utf-8") + logger.debug("output:\n{%s}", output) + + if result.returncode != 0: + raise StrobelightCLIProfilerError( + f"failed to extract profiling results, return code is not 0 : {output}" + ) + + if match := re.search("INFO ::1:(.*)", output): + current_status = match.group(1) + if current_status.__contains__("Profile run status: PROCESSING"): + time.sleep(10) + self._get_results() + return + elif not current_status.__contains__("Profile run finished with SUCCESS"): + raise StrobelightCLIProfilerError( + f"failed to extract profiling results, unexpected response {output}" + ) + + for item in re.findall( + r"(Total samples(.*)|GraphProfiler(.*)|Icicle view \(python stack\)(.*))", + output, + ): + logger.info(item[0]) + + def _stop_strobelight_no_throw( + self, + collect_results: bool, + ) -> None: + try: + # call stop run + self._stop_run() + logger.info("strobelight profiling stopped") + + logger.debug("collection stopped") + + if not collect_results: + return + + self._get_results() + except Exception: + logger.warning("error during stop_strobelight", exc_info=True) + + # Return true if strobelight started and is running. Never throw. + def _start_strobelight(self) -> bool: + strobelight_started = False + try: + self._run_async() + strobelight_started = True + logger.info("strobelight run id is: %s", self.current_run_id) + self._wait_for_running() + logger.info("strobelight profiling running") + return True + + except Exception: + logger.warning("error during start_strobelight:", exc_info=True) + if strobelight_started: + self._stop_strobelight_no_throw(collect_results=False) + return False + + def profile( + self, work_function: Callable[_P, _R], *args: _P.args, **kwargs: _P.kwargs + ) -> _R | None: + self.current_run_id = None + + if locked := StrobelightCLIFunctionProfiler._lock.acquire(False): + if not locked: + if self.stop_at_error: + raise StrobelightCLIProfilerError("concurrent runs not supported") + + logger.warning("concurrent runs not supported") + return work_function(*args, **kwargs) + + started = self._start_strobelight() + if not started: + if self.stop_at_error: + StrobelightCLIFunctionProfiler._lock.release() + raise StrobelightCLIProfilerError( + "failed to start strobelight profiling" + ) + result = work_function(*args, **kwargs) + StrobelightCLIFunctionProfiler._lock.release() + return result + + try: + logger.debug("collection started") + result = work_function(*args, **kwargs) + self._stop_strobelight_no_throw(collect_results=True) + StrobelightCLIFunctionProfiler._lock.release() + return result + except Exception as error: + logger.warning("work function throw exception", exc_info=True) + self._stop_strobelight_no_throw(collect_results=False) + StrobelightCLIFunctionProfiler._lock.release() + raise error + return None + + +# A function decorator that wraps profile, if no profiler is provided one with +# default args is created. A function can be annotated as: +# @strobelight() +# @strobelight(profiler = StrobelightFunctionProfiler(stop_at_error=True,..)) +# @strobelight(stop_at_error=True,...) +def strobelight( + profiler: StrobelightCLIFunctionProfiler | None = None, **kwargs: Any +) -> Callable[[Callable[_P, _R]], Callable[_P, _R | None]]: + if not profiler: + profiler = StrobelightCLIFunctionProfiler(**kwargs) + + def strobelight_inner( + work_function: Callable[_P, _R], + ) -> Callable[_P, _R | None]: + @functools.wraps(work_function) + def wrapper_function(*args: _P.args, **kwargs: _P.kwargs) -> _R | None: + # pyrefly: ignore [bad-argument-type] + return profiler.profile(work_function, *args, **kwargs) + + return wrapper_function + + return strobelight_inner diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_sympy/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_sympy/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_sympy/functions.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_sympy/functions.py new file mode 100644 index 0000000000000000000000000000000000000000..0816a2c23d6484b8b4e7bca0a9225554ae7770b2 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_sympy/functions.py @@ -0,0 +1,1463 @@ +# mypy: allow-untyped-defs +import functools +import math +import operator +import sys +from collections.abc import Callable +from typing import SupportsFloat, TYPE_CHECKING, TypeVar +from typing_extensions import TypeVarTuple, Unpack + +import sympy +from sympy import S +from sympy.core import sympify +from sympy.core.expr import Expr +from sympy.core.function import Application +from sympy.core.logic import _torf, fuzzy_and, fuzzy_or +from sympy.core.numbers import equal_valued +from sympy.core.operations import LatticeOp, ShortCircuit +from sympy.core.sorting import ordered +from sympy.core.traversal import walk +from sympy.printing.precedence import PRECEDENCE +from sympy.utilities.iterables import sift + +from torch.torch_version import TorchVersion + +from .numbers import int_oo + + +if TYPE_CHECKING: + from collections.abc import Iterable + + +_T = TypeVar("_T", bound=SupportsFloat) +_Ts = TypeVarTuple("_Ts") + +# Portions of this file are adapted from the Sympy codebase, which was +# licensed as follows: +# +# Copyright (c) 2006-2023 SymPy Development Team +# +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# a. Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# b. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# c. Neither the name of SymPy nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR +# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +# DAMAGE. + +__all__ = [ + "FloorDiv", + "ModularIndexing", + "Where", + "PythonMod", + "Mod", + "CleanDiv", + "CeilToInt", + "FloorToInt", + "CeilDiv", + "IntTrueDiv", + "FloatTrueDiv", + "LShift", + "RShift", + "IsNonOverlappingAndDenseIndicator", + "TruncToFloat", + "TruncToInt", + "RoundToInt", + "RoundDecimal", + "ToFloat", + "FloatPow", + "PowByNatural", + "Identity", +] + + +def _is_symbols_binary_summation(expr: sympy.Expr) -> bool: + # No need to check that two args are not the same, since expr is pr-optimized but we do it anyway. + return ( + expr.is_Add + and len(expr._args) == 2 + and expr._args[0].is_symbol + and expr._args[1].is_symbol + and expr._args[0] is not expr._args[1] + ) + + +def _keep_float( + f: Callable[[Unpack[_Ts]], _T], +) -> Callable[[Unpack[_Ts]], _T | sympy.Float]: + @functools.wraps(f) + def inner(*args: Unpack[_Ts]) -> _T | sympy.Float: + # pyrefly: ignore [bad-argument-type] + r: _T | sympy.Float = f(*args) + if any(isinstance(a, sympy.Float) for a in args) and not isinstance( + r, sympy.Float + ): + r = sympy.Float(float(r)) + return r + + # pyrefly: ignore [bad-return] + return inner + + +def fuzzy_eq(x: bool | None, y: bool | None) -> bool | None: + if None in (x, y): + return None + return x == y + + +def simple_floordiv_gcd(p: sympy.Basic, q: sympy.Basic) -> sympy.Basic: + """ + Fast path for sympy.gcd, using a simple factoring strategy. + + We try to rewrite p and q in the form n*e*p1 + n*e*p2 and n*e*q0, + where n is the greatest common integer factor and e is the largest + syntactic common factor (i.e., common sub-expression) in p and q. + Then the gcd returned is n*e, cancelling which we would be left with + p1 + p2 and q0. + + Note that further factoring of p1 + p2 and q0 might be possible with + sympy.factor (which uses domain-specific theories). E.g., we are unable + to find that x*y + x + y + 1 is divisible by x + 1. More generally, + when q is of the form q1 + q2 (instead of being already factored) it + might be necessary to fall back on sympy.gcd. + """ + + def integer_coefficient(x: sympy.Basic) -> int: + integer_coefficients: list[int] = [ + abs(int(arg)) + for arg in sympy.Mul.make_args(x) + if isinstance(arg, (int, sympy.Integer)) + ] + return math.prod(integer_coefficients) + + def integer_factor(expr: sympy.Basic) -> int: + integer_factors: Iterable[int] = map( + integer_coefficient, sympy.Add.make_args(expr) + ) + return functools.reduce(math.gcd, integer_factors) + + gcd: int = math.gcd(integer_factor(p), integer_factor(q)) + p, q = p / gcd, q / gcd # type: ignore[operator, assignment] # remove in py3.12 + + base_splits: list[tuple[sympy.Basic, ...]] = list( + map(sympy.Mul.make_args, sympy.Add.make_args(p)) + ) + divisor_split: tuple[sympy.Basic, ...] = sympy.Mul.make_args(q) + for x in divisor_split: + if all(x in base_split for base_split in base_splits): + gcd = gcd * x # type: ignore[operator] # remove in py3.12 + return gcd # type: ignore[return-value] # remove in py3.12 + + +# It would be nice to have assertions on whether or not inputs is_integer +# However, with bugs like https://github.com/sympy/sympy/issues/26620 sympy +# sometimes inconsistently reports floats an integers. +# +# What we can assume from sympy is that if something is an int, it +# definitely is is_integer, but if it is a float it may or may not +# be is_integer. So we are unable to do strong asserts that things +# are NOT integers. + + +# TODO: In Triton, // rounds to zero, but in Python, it is floor division. +# When we can prove both arguments are non-negative, we should just have a +# GenericFloorDiv (name pending) which can codegen efficiently in Python/C, +# and then PythonFloorDiv and CIntDiv which have the appropriate rounding +# semantics. +# +# Right now, FloorDiv de facto changes behavior if arguments are negative or +# not, this can potentially cause correctness issues. +class FloorDiv(sympy.Function): + """ + We maintain this so that: + 1. We can use divisibility guards to simplify FloorDiv(a, b) to a / b. + 2. Printing out the expression is nicer (compared to say, representing a//b as (a - a % b) / b) + + NB: This is Python-style floor division, round to -Inf + """ + + nargs: tuple[int, ...] = (2,) + precedence: int = 35 # lower precedence than add + is_integer: bool = True + + @property + def base(self) -> sympy.Basic: + # pyrefly: ignore [missing-attribute] + return self.args[0] + + @property + def divisor(self) -> sympy.Basic: + # pyrefly: ignore [missing-attribute] + return self.args[1] + + def _sympystr(self, printer: sympy.printing.StrPrinter) -> str: + base = printer.parenthesize(self.base, PRECEDENCE["Atom"] - 0.5) + divisor = printer.parenthesize(self.divisor, PRECEDENCE["Atom"] - 0.5) + return f"({base}//{divisor})" + + # Automatic evaluation. + # https://docs.sympy.org/latest/guides/custom-functions.html#best-practices-for-eval + @classmethod + def eval(cls, base: sympy.Integer, divisor: sympy.Integer) -> sympy.Basic | None: + # python test/test_dynamic_shapes.py -k TestDimConstraints.test_dim_constraints_solve_full + # Assert triggered by inequality solver + # assert base.is_integer, base + # assert divisor.is_integer, divisor + + # We don't provide the same error message as in Python because SymPy + # makes it difficult to check the types. + if divisor.is_zero: + raise ZeroDivisionError("division by zero") + if base in (int_oo, -int_oo, sympy.oo, -sympy.oo) and divisor in ( + int_oo, + -int_oo, + sympy.oo, + -sympy.oo, + ): + return sympy.nan + if base is sympy.nan or divisor is sympy.nan: + return sympy.nan + + if base.is_zero: + return sympy.S.Zero + if base.is_integer and equal_valued(divisor, 1): + return base + if base.is_integer and equal_valued(divisor, -1): + return sympy.Mul(base, -1) + if ( + isinstance(base, sympy.Number) + and isinstance(divisor, sympy.Number) + and ( + base in (int_oo, -int_oo, sympy.oo, -sympy.oo) + or divisor in (int_oo, -int_oo, sympy.oo, -sympy.oo) + ) + ): + r = float(base) / float(divisor) + if r == math.inf: + return int_oo + elif r == -math.inf: + return -int_oo + elif math.isnan(r): + return sympy.nan + else: + return sympy.Integer(math.floor(r)) + if isinstance(base, sympy.Integer) and isinstance(divisor, sympy.Integer): + return sympy.Integer(int(base) // int(divisor)) + if isinstance(base, FloorDiv): + return FloorDiv(base.args[0], base.args[1] * divisor) + + # Expands (x + y) // b into x // b + y // b. + # This only works if floor is an identity, i.e. x / b is an integer. + if isinstance(divisor, sympy.Integer): + quotients = 0 + terms = [] + for term in sympy.Add.make_args(base): + quotient = term / divisor + + # This is a sympy bug fixed in https://github.com/sympy/sympy/pull/28442 + # sympy can generate a quotient with (1/22)*.... such that quotient.is_integer is True + # FloorDiv should not allow that as output. see + quotient_is_integer = None + if isinstance(quotient, sympy.Mul) and TorchVersion( + sympy.__version__ + ) < TorchVersion("1.15.0"): + rationals = quotient.atoms(sympy.Rational) + all_rationals_ints = all(r.q == 1 for r in rationals) + quotient_is_integer = quotient.is_integer and all_rationals_ints + else: + quotient_is_integer = quotient.is_integer + + if quotient_is_integer: + terms.append(term) + quotients += quotient + + if len(terms) != 0: + # Passing evaluate = False since expression will be optimized during the subtraction post its construction. + return ( + FloorDiv(base - sympy.Add(*terms, evaluate=False), divisor) + + quotients + ) + + try: + gcd = simple_floordiv_gcd(base, divisor) + if equal_valued(gcd, 1) and isinstance(divisor, sympy.Add): + gcd = sympy.gcd(base, divisor) + if not equal_valued(gcd, 1): + return FloorDiv( + sympy.simplify(base / gcd), sympy.simplify(divisor / gcd) + ) + except sympy.PolynomialError: + pass # https://github.com/pytorch/pytorch/issues/108276 + + return None + + +class ModularIndexing(sympy.Function): + """ + ModularIndexing(a, b, c) => (a // b) % c where % is the C modulus + """ + + nargs: tuple[int, ...] = (3,) + is_integer: bool = True + precedence: int = 35 # lower precedence than add + + @classmethod + def eval( + cls, base: sympy.Integer, divisor: sympy.Integer, modulus: sympy.Integer + ) -> sympy.Basic | None: + if base == 0 or modulus == 1: + return sympy.S.Zero + if ( + isinstance(base, sympy.Integer) + and isinstance(divisor, sympy.Integer) + and isinstance(modulus, sympy.Integer) + ): + return (base // divisor) % modulus + + try: + if divisor != 1: + gcd = sympy.gcd(base, divisor) + if gcd != 1: + return ModularIndexing( + sympy.simplify(base / gcd), + sympy.simplify(divisor / gcd), + modulus, + ) + except sympy.PolynomialError: + pass # https://github.com/pytorch/pytorch/issues/108276 + + if isinstance(base, sympy.Add): + new_terms: list[sympy.Integer] = [] + all_positive: bool = True + for term in base.args: + if sympy.gcd(term, modulus * divisor) != modulus * divisor: + if (isinstance(term, sympy.Integer) and term < 0) or ( + isinstance(term, sympy.Mul) + and isinstance(term.args[0], sympy.Integer) + and term.args[0] < 0 + ): + # workaround for https://github.com/triton-lang/triton/issues/619, + # if there are negative terms, // produces wrong result + # TODO if https://github.com/triton-lang/triton/issues/619 is fixed + # this optimization would become valid + all_positive = False + break + else: + new_terms.append(term) + + if len(new_terms) != len(base.args) and all_positive: + return ModularIndexing(sum(new_terms), divisor, modulus) + + if isinstance(base, FloorDiv): + return ModularIndexing(base.args[0], base.args[1] * divisor, modulus) + + return None + + def _eval_is_nonnegative(self) -> bool | None: + # pyrefly: ignore [missing-attribute] + p, q = self.args[:2] + return fuzzy_eq(p.is_nonnegative, q.is_nonnegative) # type: ignore[attr-defined] + + +class Where(sympy.Function): + """ + Good ol' ternary operator + """ + + nargs: tuple[int, ...] = (3,) + precedence: int = 35 # lower precedence than add + + def _eval_is_integer(self) -> bool | None: + return True if self.args[1].is_integer and self.args[2].is_integer else None # type: ignore[attr-defined] + + def _eval_is_nonnegative(self) -> bool | None: + return ( + True + if self.args[1].is_nonnegative and self.args[2].is_nonnegative # type: ignore[attr-defined] + else None + ) + + def _eval_is_positive(self) -> bool | None: + return True if self.args[1].is_positive and self.args[2].is_positive else None # type: ignore[attr-defined] + + @classmethod + def eval(cls, c: sympy.Basic, p: sympy.Basic, q: sympy.Basic) -> sympy.Basic | None: + if c == sympy.true: + return p + elif c == sympy.false: + return q + return None + + +# Python-style modulus: take sign from RHS +class PythonMod(sympy.Function): + nargs: tuple[int, ...] = (2,) + + precedence: int = 35 # lower precedence than add + is_integer: bool = True + + @classmethod + def eval(cls, p: sympy.Expr, q: sympy.Expr) -> sympy.Expr | None: + # python test/dynamo/test_export.py -k ExportTests.test_trivial_constraint + # Triggered by sympy.solvers.inequalities.reduce_inequalities + # assert p.is_integer, p + # assert q.is_integer, q + + if q.is_zero: + raise ZeroDivisionError("Modulo by zero") + + # Three cases: + # 1. p == 0 + # 2. p is either q or -q + # 3. p is integer and q == 1 + if p is S.Zero or p in (q, -q) or q == 1: + return S.Zero + + # Evaluate if they are both literals. + if q.is_Number and p.is_Number: + return p % q + + # If q == 2, it's a matter of whether p is odd or even. + if q.is_Number and q == 2: + if p.is_even: + return S.Zero + if p.is_odd: + return S.One + + # If p is a multiple of q. + r = p / q + if r.is_integer: + return S.Zero + + # If p < q and its ratio is positive, then: + # - floor(p / q) = 0 + # - p % q = p - floor(p / q) * q = p + less = p < q + # pyrefly: ignore [missing-attribute] + if less.is_Boolean and bool(less) and r.is_positive: + return p + + if sympy.Mod(p, q) == 0: + return S.Zero + + return None + + # NB: args[1] for PythonMod + def _eval_is_nonnegative(self) -> bool | None: + return True if self.args[1].is_positive else None # type: ignore[attr-defined] + + def _eval_is_nonpositive(self) -> bool | None: + return True if self.args[1].is_negative else None # type: ignore[attr-defined] + + def _ccode(self, printer) -> str: + # pyrefly: ignore [missing-attribute] + p = printer.parenthesize(self.args[0], PRECEDENCE["Atom"] - 0.5) + # pyrefly: ignore [missing-attribute] + q = printer.parenthesize(self.args[1], PRECEDENCE["Atom"] - 0.5) + # pyrefly: ignore [missing-attribute] + abs_q = str(q) if self.args[1].is_positive else f"abs({q})" + return f"({p} % {q}) < 0 ? {p} % {q} + {abs_q} : {p} % {q}" + + +# Generic modulus: only defined on non-negative arguments +class Mod(sympy.Function): + nargs = (2,) + precedence: int = 35 # lower precedence than add + + is_integer = True + is_nonnegative = True + + @classmethod + def eval(cls, p, q): + # This was adapted from: sympy/core/mod.py + + # Triggered by + # python test/test_dynamic_shapes.py -k TestDimConstraints.test_dim_constraints_solve_full + # assert p.is_integer, p + # assert q.is_integer, q + + if q.is_zero: + raise ZeroDivisionError("Modulo by zero") + + # Three cases: + # 1. p == 0 + # 2. p is either q or -q + # 3. p is integer and q == 1 + if p is S.Zero or p in (q, -q) or q == 1: + return S.Zero + + # Evaluate if they are both literals. + if q.is_Number and p.is_Number: + if p < 0: + raise AssertionError(p) + if q < 1: + raise AssertionError(q) + return p % q + + # If q == 2, it's a matter of whether p is odd or even. + if q.is_Number and q == 2: + if p.is_even: + return S.Zero + if p.is_odd: + return S.One + + # If p is a multiple of q. + r = p / q + if r.is_integer: + return S.Zero + + # If p < q and its ratio is positive, then: + # - floor(p / q) = 0 + # - p % q = p - floor(p / q) * q = p + less = p < q + if less.is_Boolean and bool(less) and r.is_positive: + return p + + +class CleanDiv(FloorDiv): + """ + Div where we can assume no rounding. + This is to enable future optimizations. + """ + + +# Don't use sympy ceiling/floor as they will attempt simplifications involving +# frac +class CeilToInt(sympy.Function): + is_integer = True + + @classmethod + def eval(cls, number): + # assert number.is_integer is not True, number + if number in (sympy.oo, int_oo): + return int_oo + if number in (-sympy.oo, -int_oo): + return -int_oo + if isinstance(number, sympy.Number): + return sympy.Integer(math.ceil(float(number))) + + def _ccode(self, printer) -> str: + # pyrefly: ignore [missing-attribute] + number = printer.parenthesize(self.args[0], self.args[0].precedence - 0.5) + return f"ceil({number})" + + +class FloorToInt(sympy.Function): + is_integer = True + + @classmethod + def eval(cls, number): + if number in (sympy.oo, int_oo): + return int_oo + if number in (-sympy.oo, int_oo): + return -int_oo + if isinstance(number, sympy.Integer): + return number + if isinstance(number, sympy.Number): + return sympy.Integer(math.floor(float(number))) + + +class CeilDiv(sympy.Function): + """ + Div used in indexing that rounds up. + """ + + is_integer = True + + def __new__(cls, base, divisor): + base = sympy.sympify(base) + divisor = sympy.sympify(divisor) + if sympy.gcd(base, divisor) == divisor: + return CleanDiv(base, divisor) + else: + return FloorDiv(base + (divisor - 1), divisor) + + +class LShift(sympy.Function): + is_integer = True + + @classmethod + def eval(cls, base, shift): + if shift < 0: + raise ValueError("negative shift count") + return base * 2**shift + + +class RShift(sympy.Function): + is_integer = True + + @classmethod + def eval(cls, base, shift): + if shift < 0: + raise ValueError("negative shift count") + return FloorDiv(base, 2**shift) + + +class MinMaxBase(Expr, LatticeOp): # type: ignore[misc] + def __new__(cls, *original_args, **assumptions): + from sympy.core.parameters import global_parameters + + evaluate = assumptions.pop("evaluate", global_parameters.evaluate) + args = (sympify(arg) for arg in original_args) + + # See the comment in _satisfy_unique_summations_symbols. + unique_summations_symbols = ( + None + if not evaluate + else cls._satisfy_unique_summations_symbols(original_args) + ) + + if evaluate: + try: + # first standard filter, for cls.zero and cls.identity + # also reshape Max(a, Max(b, c)) to Max(a, b, c) + args = frozenset(cls._new_args_filter(args)) # type: ignore[assignment] + except ShortCircuit: + return cls.zero # type: ignore[attr-defined] + + # No need to run _collapse_arguments and _find_localzeros, see the comment + # in _satisfy_unique_summations_symbols. + if unique_summations_symbols is None: + # remove redundant args that are easily identified + args = cls._collapse_arguments(args, **assumptions) + + # find local zeros + args = cls._find_localzeros(args, **assumptions) + + args = frozenset(args) + + if not args: + return cls.identity # type: ignore[attr-defined] + + if len(args) == 1: + return list(args).pop() + + # base creation + obj = Expr.__new__(cls, *ordered(args), **assumptions) + obj._argset = args + + obj.unique_summations_symbols = unique_summations_symbols + return obj + + @classmethod + def _satisfy_unique_summations_symbols( + cls, args + ) -> set[sympy.core.symbol.Symbol] | None: + """ + One common case in some models is building expressions of the form + max(max(max(a+b...), c+d), e+f) which is simplified to max(a+b, c+d, e+f, ...). + For such expressions, we call the Max constructor X times (once for each nested + max) and the expression gets flattened. + + An expensive cost in constructing those expressions is running _collapse_arguments + and _find_localzeros. However, those two optimizations are unnecessary when the args + to max are all of the form a+b, c+d, ..etc where each term uses a unique set of symbols. + + This function is used to detect such properties of the expressions we are building + and if so inform that we do not need to run those optimizations. To detect those, + we store a property in the expression that tells that this expression is a min/max + operation over terms that use unique symbols "unique_summations_symbols". This property + also memoize the set of symbols used in all the terms to make it faster to detect this + property inductively. + + When we apply max to add a new term, all we need to do is check if the new term uses + unique symbols (with respect to existing terms and itself). + Example: + t = Max(a+b, c+d) ==> satisfies the property + Max(t, h+j) ==> h,j not in [a,b,c,d] => satisfy the property. + + The function returns None if the new expression does not satisfy the unique_summations_symbols + property. Otherwise, it returns a new set of unique symbols. + """ + if len(args) != 2: + return None + + (lhs, rhs) = ( + (args[1], args[0]) + if isinstance(args[1], MinMaxBase) + else (args[0], args[1]) + ) + + if not _is_symbols_binary_summation(rhs): + return None + + # base case max(a+b, c+d) ==> satisfies the property if a+b and c+d use unique symbols. + if _is_symbols_binary_summation(lhs): + return cls._unique_symbols(args) + + # inductive case max(t, h+j) ==> satisfies the property if h, j not in t.unique_summations_symbols + if isinstance(lhs, MinMaxBase): + lhs_unique_summations_symbols = getattr( + lhs, "unique_summations_symbols", None + ) + if lhs_unique_summations_symbols is not None: + return cls._unique_symbols([rhs], lhs_unique_summations_symbols) + + return None + + @classmethod + def _unique_symbols( + cls, args, initial_set: set[sympy.core.symbol.Symbol] | None = None + ) -> set[sympy.core.symbol.Symbol] | None: + """ + Return seen_symbols if all atoms in all args are all unique symbols, + else returns None. initial_set can be used to represent initial value for seen_symbols + """ + seen_symbols = set() if initial_set is None else initial_set + for arg in args: + for element in arg.atoms(): + if not isinstance(element, sympy.core.symbol.Symbol): + return None + elif element in seen_symbols: + return None + else: + seen_symbols.add(element) + return seen_symbols + + @classmethod + def _collapse_arguments(cls, args, **assumptions): + """Remove redundant args. + + Examples + ======== + + >>> from sympy import Min, Max + >>> from sympy.abc import a, b, c, d, e + + Any arg in parent that appears in any + parent-like function in any of the flat args + of parent can be removed from that sub-arg: + + >>> Min(a, Max(b, Min(a, c, d))) + Min(a, Max(b, Min(c, d))) + + If the arg of parent appears in an opposite-than parent + function in any of the flat args of parent that function + can be replaced with the arg: + + >>> Min(a, Max(b, Min(c, d, Max(a, e)))) + Min(a, Max(b, Min(a, c, d))) + """ + if not args: + return args + args = list(ordered(args)) + if cls is Min: + other = Max + else: + other = Min # type: ignore[assignment] + + # find global comparable max of Max and min of Min if a new + # value is being introduced in these args at position 0 of + # the ordered args + if args[0].is_number: + sifted = mins, maxs = [], [] # type: ignore[var-annotated] + for i in args: + for v in walk(i, Min, Max): + if v.args[0].is_comparable: + sifted[isinstance(v, Max)].append(v) + small = Min.identity + for i in mins: + v = i.args[0] + if v.is_number and (v < small) == True: # noqa: E712 + small = v + big = Max.identity + for i in maxs: + v = i.args[0] + if v.is_number and (v > big) == True: # noqa: E712 + big = v + # at the point when this function is called from __new__, + # there may be more than one numeric arg present since + # local zeros have not been handled yet, so look through + # more than the first arg + if cls is Min: + for arg in args: + if not arg.is_number: + break + if (arg < small) == True: # noqa: E712 + small = arg + elif cls == Max: + for arg in args: + if not arg.is_number: + break + if (arg > big) == True: # noqa: E712 + big = arg + T = None + if cls is Min: + if small != Min.identity: + other = Max + T = small + elif big != Max.identity: + other = Min # type: ignore[assignment] + T = big + if T is not None: + # remove numerical redundancy + for i in range(len(args)): + a = args[i] + if isinstance(a, other): + a0 = a.args[0] + if ( # noqa: E712 + (a0 > T) if other == Max else (a0 < T) # noqa: E712 + ) == True: # noqa: E712 + args[i] = cls.identity # type: ignore[attr-defined] + + # remove redundant symbolic args + def do(ai, a): + if not isinstance(ai, (Min, Max)): + return ai + cond = a in ai.args + if not cond: + return ai.func(*[do(i, a) for i in ai.args], evaluate=False) + if isinstance(ai, cls): + # pyrefly: ignore [missing-attribute] + return ai.func(*[do(i, a) for i in ai.args if i != a], evaluate=False) + return a + + for i, a in enumerate(args): + args[i + 1 :] = [do(ai, a) for ai in args[i + 1 :]] + + # factor out common elements as for + # Min(Max(x, y), Max(x, z)) -> Max(x, Min(y, z)) + # and vice versa when swapping Min/Max -- do this only for the + # easy case where all functions contain something in common; + # trying to find some optimal subset of args to modify takes + # too long + + def factor_minmax(args): + is_other = lambda arg: isinstance(arg, other) # noqa: E731 + other_args, remaining_args = sift(args, is_other, binary=True) + if not other_args: + return args + + # Min(Max(x, y, z), Max(x, y, u, v)) -> {x,y}, ({z}, {u,v}) + arg_sets = [set(arg.args) for arg in other_args] + common = set.intersection(*arg_sets) + if not common: + return args + + new_other_args = list(common) + arg_sets_diff = [arg_set - common for arg_set in arg_sets] + + # If any set is empty after removing common then all can be + # discarded e.g. Min(Max(a, b, c), Max(a, b)) -> Max(a, b) + if all(arg_sets_diff): + other_args_diff = [other(*s, evaluate=False) for s in arg_sets_diff] + new_other_args.append(cls(*other_args_diff, evaluate=False)) + + other_args_factored = other(*new_other_args, evaluate=False) + return remaining_args + [other_args_factored] + + if len(args) > 1: + args = factor_minmax(args) + + return args + + @classmethod + def _new_args_filter(cls, arg_sequence): + """ + Generator filtering args. + + first standard filter, for cls.zero and cls.identity. + Also reshape ``Max(a, Max(b, c))`` to ``Max(a, b, c)``, + and check arguments for comparability + """ + for arg in arg_sequence: + # pre-filter, checking comparability of arguments + if ( + not isinstance(arg, Expr) + or arg.is_extended_real is False + or (arg.is_number and not arg.is_comparable) + ): + raise ValueError(f"The argument '{arg}' is not comparable.") + + if arg == cls.zero: # type: ignore[attr-defined] + raise ShortCircuit(arg) + elif arg == cls.identity: # type: ignore[attr-defined] + continue + elif arg.func == cls: + yield from arg.args + else: + yield arg + + @classmethod + def _find_localzeros(cls, values, **options): + """ + Sequentially allocate values to localzeros. + + When a value is identified as being more extreme than another member it + replaces that member; if this is never true, then the value is simply + appended to the localzeros. + + Unlike the sympy implementation, we only look for zero and one, we don't + do generic is connected test pairwise which is slow + """ + + # First, collapse all numeric arguments + other_values = set() + num_value = None + for arg in values: + if arg.is_Number: + if num_value is None: + num_value = arg + else: + if cls is Max: + num_value = max(num_value, arg) + elif cls is Min: + num_value = min(num_value, arg) + else: + raise AssertionError(f"impossible {cls}") + else: + other_values.add(arg) + + # Special cases when there is only one symbolic value + if num_value is None: + return other_values + + if len(other_values) == 0: + return {num_value} + + if len(other_values) == 1: + other_value = next(iter(other_values)) + if num_value in (0.0, 0) and other_value.is_nonnegative: + return other_values if cls is Max else {num_value} + if num_value == 1 and other_value.is_positive: + return other_values if cls is Max else {num_value} + + other_values.add(num_value) + return other_values + + _eval_is_algebraic = lambda s: _torf(i.is_algebraic for i in s.args) # noqa: E731 + _eval_is_antihermitian = lambda s: _torf( # noqa: E731 + i.is_antihermitian + for i in s.args # noqa: E731 + ) # noqa: E731 + _eval_is_commutative = lambda s: _torf( # noqa: E731 + i.is_commutative + for i in s.args # noqa: E731 + ) # noqa: E731 + _eval_is_complex = lambda s: _torf(i.is_complex for i in s.args) # noqa: E731 + _eval_is_composite = lambda s: _torf(i.is_composite for i in s.args) # noqa: E731 + _eval_is_even = lambda s: _torf(i.is_even for i in s.args) # noqa: E731 + _eval_is_finite = lambda s: _torf(i.is_finite for i in s.args) # noqa: E731 + _eval_is_hermitian = lambda s: _torf(i.is_hermitian for i in s.args) # noqa: E731 + _eval_is_imaginary = lambda s: _torf(i.is_imaginary for i in s.args) # noqa: E731 + _eval_is_infinite = lambda s: _torf(i.is_infinite for i in s.args) # noqa: E731 + _eval_is_integer = lambda s: _torf(i.is_integer for i in s.args) # noqa: E731 + _eval_is_irrational = lambda s: _torf(i.is_irrational for i in s.args) # noqa: E731 + _eval_is_negative = lambda s: _torf(i.is_negative for i in s.args) # noqa: E731 + _eval_is_noninteger = lambda s: _torf(i.is_noninteger for i in s.args) # noqa: E731 + _eval_is_nonnegative = lambda s: _torf( # noqa: E731 + i.is_nonnegative + for i in s.args # noqa: E731 + ) # noqa: E731 + _eval_is_nonpositive = lambda s: _torf( # noqa: E731 + i.is_nonpositive + for i in s.args # noqa: E731 + ) # noqa: E731 + _eval_is_nonzero = lambda s: _torf(i.is_nonzero for i in s.args) # noqa: E731 + _eval_is_odd = lambda s: _torf(i.is_odd for i in s.args) # noqa: E731 + _eval_is_polar = lambda s: _torf(i.is_polar for i in s.args) # noqa: E731 + _eval_is_positive = lambda s: _torf(i.is_positive for i in s.args) # noqa: E731 + _eval_is_prime = lambda s: _torf(i.is_prime for i in s.args) # noqa: E731 + _eval_is_rational = lambda s: _torf(i.is_rational for i in s.args) # noqa: E731 + _eval_is_real = lambda s: _torf(i.is_real for i in s.args) # noqa: E731 + _eval_is_extended_real = lambda s: _torf( # noqa: E731 + i.is_extended_real + for i in s.args # noqa: E731 + ) # noqa: E731 + _eval_is_transcendental = lambda s: _torf( # noqa: E731 + i.is_transcendental + for i in s.args # noqa: E731 + ) # noqa: E731 + _eval_is_zero = lambda s: _torf(i.is_zero for i in s.args) # noqa: E731 + + +class Max(MinMaxBase, Application): # type: ignore[misc] + r""" + Return, if possible, the maximum value of the list. + """ + + zero = S.Infinity + identity = S.NegativeInfinity + + def _eval_is_positive(self): # type:ignore[override] + return fuzzy_or(a.is_positive for a in self.args) # type: ignore[attr-defined] + + def _eval_is_nonnegative(self): # type:ignore[override] + return fuzzy_or(a.is_nonnegative for a in self.args) # type: ignore[attr-defined] + + def _eval_is_negative(self): # type:ignore[override] + # pyrefly: ignore [missing-attribute] + return fuzzy_and(a.is_negative for a in self.args) + + +class Min(MinMaxBase, Application): # type: ignore[misc] + """ + Return, if possible, the minimum value of the list. + """ + + zero = S.NegativeInfinity + identity = S.Infinity + + def _eval_is_positive(self): # type:ignore[override] + return fuzzy_and(a.is_positive for a in self.args) # type: ignore[attr-defined] + + def _eval_is_nonnegative(self): # type:ignore[override] + return fuzzy_and(a.is_nonnegative for a in self.args) # type: ignore[attr-defined] + + def _eval_is_negative(self): # type:ignore[override] + # pyrefly: ignore [missing-attribute] + return fuzzy_or(a.is_negative for a in self.args) + + +def safe_pow(base, exp): + sign = 1 + if base < 0: + base = -base + sign = 1 if exp % 2 == 0 else -1 + return sign * _safe_pow(base, exp) + + +# Prevent people from overflowing pow +def _safe_pow(base, exponent): + if exponent < 0: + raise ValueError("Exponent must be non-negative.") + + if exponent == 0: + return 1 + + half_exp = safe_pow(base, exponent // 2) + if half_exp is int_oo: + return int_oo + + # TODO: microoptimization is to avoid overflowing into arbitrary precision + # and detect overflow prior to doing operations + + result = half_exp * half_exp + if result > sys.maxsize: + return int_oo + + if exponent % 2 == 1: + result *= base + if result > sys.maxsize: + return int_oo + + return result + + +class PowByNatural(sympy.Function): + is_integer = True + + precedence: int = 50 # precedence of mul + + @classmethod + def eval(cls, base, exp): + if isinstance(base, sympy.Integer) and isinstance(exp, sympy.Integer): + r = safe_pow(base, exp) + if r in (-int_oo, int_oo): + return r + return sympy.Integer(r) + if isinstance(exp, sympy.Integer): + # Rely on regular sympy Pow for this (note that iterated + # multiplication turns into a Pow anyway, you can't escape!!) + return sympy.Pow(base, exp) + if exp in (int_oo, sympy.oo): + if base.is_nonnegative: + return int_oo + elif base.is_negative: + return sympy.zoo # this is apparently what (-2)**sympy.oo does + # NB: do NOT translate into sympy.Pow, we will lose knowledge that exp + # is a natural number if we do + + +# base is assumed to be nonnegative, thereby prevent complex numbers from +# occurring +class FloatPow(sympy.Function): + is_real = True + + precedence: int = 60 # precedence of pow + + @classmethod + def eval(cls, base, exp): + # NB: These test sympy.Number, not sympy.Float, because: + # - Sometimes we may have sympy.oo or int_oo, and that's not a Float + # (but coerces to math.Inf) + # - Sometimes Float(0.0) will unpredictably decay to Integer(0), + # but we should still accept it in floatey contexts + if isinstance(base, sympy.Number) and isinstance(exp, sympy.Number): + return sympy.Float(float(base) ** float(exp)) + # NB: do not do any nontrivial reasoning + + +# Overloaded to be compatible with regular Python. +# https://github.com/pytorch/pytorch/issues/90900 +# +# In particular, sympy division is willing to simplify x/x == 1 +# where 1 is an integer, but this must be a float if x was float. +class FloatTrueDiv(sympy.Function): + is_real = True + + precedence: int = 35 # lower precedence than add + + @classmethod + def eval(cls, base, divisor): + # assert base.is_integer is not True, base + # assert divisor.is_integer is not True, divisor + + if divisor.is_zero: + raise ZeroDivisionError("division by zero") + + if isinstance(base, sympy.Number) and isinstance(divisor, sympy.Number): + return sympy.Float(float(base) / float(divisor)) + + +# Overloaded to be compatible with regular Python. We distinguish this from +# FloatTrueDiv, because the code generation has to be different for this case: +# Python has a fancy algorithm for integer true division that isn't just +# "promote both arguments to float and use float division", so you need to +# codegen it differently. While technically you can work it out from the +# types of the input, this is often inconvenient to do in Inductor codegen, +# so just have a different operator +# NB: Right now, Inductor codegen doesn't implement this correctly lol +class IntTrueDiv(sympy.Function): + is_real = True + + precedence: int = 35 # lower precedence than add + + @classmethod + def eval(cls, base, divisor): + if divisor.is_zero: + raise ZeroDivisionError("division by zero") + + if ( + isinstance(base, sympy.Number) + and isinstance(divisor, sympy.Number) + and ( + base in (int_oo, -int_oo, sympy.oo, -sympy.oo) + or divisor in (int_oo, -int_oo, sympy.oo, -sympy.oo) + ) + ): + # Don't have to worry about precision here, you're getting zero or + # inf from the division + return sympy.Float(float(base) / float(divisor)) + if isinstance(base, sympy.Integer) and isinstance(divisor, sympy.Integer): + return sympy.Float(int(base) / int(divisor)) + + def _ccode(self, printer) -> str: + # pyrefly: ignore [missing-attribute] + base = printer.parenthesize(self.args[0], PRECEDENCE["Atom"] - 0.5) + # pyrefly: ignore [missing-attribute] + divisor = printer.parenthesize(self.args[1], PRECEDENCE["Atom"] - 0.5) + return f"((int){base}/(int){divisor})" + + +# TODO: As an indicator, this != 0 implies == 1 (and vice versa). +# Because we do not have the ability to guard on the stride permutation +# at the moment, it is hard to make further inferences when this is true, +# as although we know the tensor is contiguous in *some* layout, we don't +# know which one (however, you could, for example, make the inference that +# reshaping this to a 1D tensor can be guard-free.) +class IsNonOverlappingAndDenseIndicator(sympy.Function): + is_integer = True + + @classmethod + def eval(cls, *args): + if len(args) % 2 != 0: + raise AssertionError( + f"expected an even number of arguments, got {len(args)}" + ) + dim = len(args) // 2 + sizes = args[0:dim] + strides = args[dim:] + + # sym_node imported in torch.__init__. Local import to avoid an import cycle + from torch.fx.experimental.symbolic_shapes import ( + eval_is_non_overlapping_and_dense, + ) + + if all(isinstance(a, sympy.Integer) for a in args): + return eval_is_non_overlapping_and_dense( + [int(a) for a in sizes], [int(a) for a in strides] + ) + + if dim == 1: + # Manually implement the rank one short circuit + if strides[0].is_Number and strides[0] == 1: + return 1 + + if sizes[0].is_Number and sizes[0] < 2: + return 1 + + # return 0 case covered by case above + + # TODO: Inability to access size-obliviousness sucks: if we have a + # size oblivious test on a size-like unbacked SymInt, we could + # confidently return zero when we have a size-like u0 stride + # and a size-like u1 size. Maybe a fancy ValueRanges analysis for + # this function could help figure this out. + + if all(isinstance(a, sympy.Integer) for a in strides): + if dim == 0: + raise AssertionError("dim must not be zero") + # When all strides are integral, we can sort, and the size for the + # largest stride doesn't matter and can be arbitrarily symbolic + s_sizes, s_strides = zip( + *sorted(zip(sizes, strides, strict=True), key=operator.itemgetter(1)), + strict=True, + ) + # Put something arbitrary in the max size spot, it'll be ignored + if all(isinstance(a, sympy.Integer) for a in s_sizes[:-1]): + s_sizes = s_sizes[:-1] + (42,) + # We can reuse the regular eval, because it is invariant to + # permutation of dimensions + return eval_is_non_overlapping_and_dense( + [int(a) for a in s_sizes], [int(a) for a in s_strides] + ) + + return None + + +# NB: this is inconsistent with math.trunc in Python +class TruncToFloat(sympy.Function): + is_real = True + + @classmethod + def eval(cls, number): + # assert number.is_integer is not True, number + if isinstance(number, sympy.Number): + # NB: It is safe to use truncation to integer, which is what + # math.trunc does, as Python integers are arbitrary precision and + # so we are guaranteed not to lose precision when we do this + return sympy.Float(math.trunc(float(number))) + + +class TruncToInt(sympy.Function): + is_integer = True + + @classmethod + def eval(cls, number): + # assert number.is_integer is not True, number + if number in (sympy.oo, int_oo): + return int_oo + if number in (-sympy.oo, -int_oo): + return -int_oo + if isinstance(number, sympy.Number): + return sympy.Integer(math.trunc(float(number))) + + +# This is float -> int +class RoundToInt(sympy.Function): + is_integer = True + + @classmethod + def eval(cls, number): + # assert number.is_integer is not True, number + + if number is sympy.oo: + return int_oo + if number is -sympy.oo: + return -int_oo + if isinstance(number, sympy.Number): + return sympy.Integer(round(float(number), 0)) + + +# To get float -> int, Python style round semantics. +# +# x = PyFloat_AsDouble(self); +# if (o_ndigits == Py_None) { +# /* single-argument round or with None ndigits: +# * round to nearest integer */ +# rounded = round(x); +# if (fabs(x-rounded) == 0.5) +# /* halfway case: round to even */ +# rounded = 2.0*round(x/2.0); +# return PyLong_FromDouble(rounded); +# } + + +# NB: Like Round, this only ever returns floats. ndigits cannot be None +class RoundDecimal(sympy.Function): + is_real = True + + @classmethod + def eval(cls, number, ndigits): + # assert number.is_integer is not True, number + + if isinstance(number, sympy.Number) and isinstance(ndigits, sympy.Integer): + return sympy.Float(round(float(number), int(ndigits))) + + +class ToFloat(sympy.Function): + is_real = True + + @classmethod + def eval(cls, number): + if number in [sympy.oo, -sympy.oo]: + return number + + if isinstance(number, sympy.Integer): + return sympy.Float(int(number)) + if number is int_oo: + return sympy.oo + if number is -int_oo: + return -sympy.oo + + +class Identity(sympy.Function): + """ + Prevents expansion and other optimizations + """ + + precedence = 10 + + def __repr__(self) -> str: # type: ignore[override] + # pyrefly: ignore [missing-attribute] + return f"Identity({self.args[0]})" + + def _sympystr(self, printer) -> str: + """Controls how sympy's StrPrinter prints this""" + # pyrefly: ignore [missing-attribute] + return f"({printer.doprint(self.args[0])})" + + def _eval_is_real(self): + # pyrefly: ignore [missing-attribute] + return self.args[0].is_real + + def _eval_is_integer(self): + return self.args[0].is_integer # type: ignore[attr-defined] + + def _eval_expand_identity(self, **hints): + # Removes the identity op. + # pyrefly: ignore [missing-attribute] + return self.args[0] + + def __int__(self) -> int: + # pyrefly: ignore [missing-attribute] + return int(self.args[0]) + + def __float__(self) -> float: + # pyrefly: ignore [missing-attribute] + return float(self.args[0]) + + +def make_opaque_unary_fn(name): + class OpaqueUnaryFn(sympy.Function): + """ + Unlike the builtin sympy functions on real numbers like sympy.sqrt, + these equivalents do not do any nontrivial reasoning besides + constant propagation. This helps avoid performing transformations + that are valid for real numbers but are invalid for floating point; + in particular, while we are willing to make optimizations that change + numerics for Tensor compute, we are NOT willing to make optimizations + that change numerics for size compute. + """ + + _torch_handler_name = name + _torch_unpickler = make_opaque_unary_fn + + @classmethod + def eval(cls, a): + if isinstance(a, (sympy.Integer, sympy.Float)): + # Python converts to float64 before computing, c.f. + # >>> math.sin(2**53+1) + # -0.848925964814655 + # >>> math.sin(float(2**53+1)) + # -0.848925964814655 + try: + return sympy.Float(getattr(math, name)(float(a))) + # Just use sympy semantics for infinity/overflow, you might get some + # weird objects but ask silly questions, get silly answers + except OverflowError: + return getattr(sympy, name)(a) + elif a in [sympy.oo, -sympy.oo, sympy.zoo, -sympy.zoo, int_oo, -int_oo]: + if a is int_oo: + a = sympy.oo + if a is -int_oo: + a = -sympy.oo + if name == "log2": + return sympy.log(a, 2) + return getattr(sympy, name)(a) + return None + + nm = "OpaqueUnaryFn_" + name + OpaqueUnaryFn.__name__ = nm + OpaqueUnaryFn.__qualname__ = nm + + return OpaqueUnaryFn + + +# Keep in sync with math_op_names in torch/fx/experimental/sym_node.py +OpaqueUnaryFn_sqrt = make_opaque_unary_fn("sqrt") +OpaqueUnaryFn_cos = make_opaque_unary_fn("cos") +OpaqueUnaryFn_cosh = make_opaque_unary_fn("cosh") +OpaqueUnaryFn_sin = make_opaque_unary_fn("sin") +OpaqueUnaryFn_sinh = make_opaque_unary_fn("sinh") +OpaqueUnaryFn_tan = make_opaque_unary_fn("tan") +OpaqueUnaryFn_tanh = make_opaque_unary_fn("tanh") +OpaqueUnaryFn_asin = make_opaque_unary_fn("asin") +OpaqueUnaryFn_acos = make_opaque_unary_fn("acos") +OpaqueUnaryFn_atan = make_opaque_unary_fn("atan") +OpaqueUnaryFn_exp = make_opaque_unary_fn("exp") +OpaqueUnaryFn_log = make_opaque_unary_fn("log") +OpaqueUnaryFn_asinh = make_opaque_unary_fn("asinh") +OpaqueUnaryFn_log2 = make_opaque_unary_fn("log2") + + +def make_opaque_bitwise_fn(name, real_op_name): + if name == "bitwise_and": + prec = PRECEDENCE["BitwiseAnd"] + elif name == "bitwise_xor": + prec = PRECEDENCE["BitwiseXor"] + elif name == "bitwise_or": + prec = PRECEDENCE["BitwiseOr"] + else: + raise AssertionError(f"unrecognized {name}") + + class BitwiseFn(sympy.Function): + _torch_handler_name = name + precedence: int = prec + _torch_unpickler = functools.partial( + make_opaque_bitwise_fn, real_op_name=real_op_name + ) + + @classmethod + def eval(cls, a, b): + if a.is_Boolean and b.is_Boolean: + return getattr(operator, real_op_name)(a, b) + if a.is_Boolean: + a = sympy.Integer(1 if a else 0) + if b.is_Boolean: + b = sympy.Integer(1 if b else 0) + if isinstance(a, (sympy.Integer, int)) and isinstance( + b, (sympy.Integer, int) + ): + return sympy.Integer(getattr(operator, real_op_name)(int(a), int(b))) + return None + + nm = "BitwiseFn_" + name + BitwiseFn.__name__ = nm + BitwiseFn.__qualname__ = nm + + return BitwiseFn + + +BitwiseFn_bitwise_and = make_opaque_bitwise_fn("bitwise_and", "and_") +BitwiseFn_bitwise_or = make_opaque_bitwise_fn("bitwise_or", "or_") +BitwiseFn_bitwise_xor = make_opaque_bitwise_fn("bitwise_xor", "xor") diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_sympy/interp.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_sympy/interp.py new file mode 100644 index 0000000000000000000000000000000000000000..6eca9e389d85ae452cbf357d01ca9278239a617d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_sympy/interp.py @@ -0,0 +1,228 @@ +# mypy: allow-untyped-defs +""" +This is a simple interpreter for Sympy expressions that dispatches to +classes following the torch._inductor.virtualized calling convention. +For directness, the interpreter takes the handler directly rather than +consulting the TLS. It does not use most of the methods on the full +handler; only those with corresponding Sympy expressions. To see an example +of a full handler, see torch.utils._sympy.value_ranges.ValueRangeAnalysis. +""" + +import functools +import logging +from typing import Any + +import sympy +from sympy.logic.boolalg import Boolean as SympyBoolean, BooleanAtom + +import torch + +from .functions import ( + BitwiseFn_bitwise_and, + BitwiseFn_bitwise_or, + BitwiseFn_bitwise_xor, + CeilToInt, + CleanDiv, + FloatPow, + FloatTrueDiv, + FloorDiv, + FloorToInt, + Identity, + IntTrueDiv, + IsNonOverlappingAndDenseIndicator, + Max, + Min, + Mod, + ModularIndexing, + OpaqueUnaryFn_log2, + PowByNatural, + PythonMod, + RoundDecimal, + RoundToInt, + ToFloat, + TruncToFloat, + TruncToInt, + Where, +) + + +log = logging.getLogger(__name__) + + +# TODO: Dedupe this with SYMPY_INTERP + + +@functools.cache +def handlers(): + # TODO add CeilDiv (it doesn't appear in the index_expr) + + # TODO default to some decompositions if the interpreter doesn't have them + # like decomposing ModularIndexing or implementing Le(a,b) as Ge(b, a) + + HANDLERS = { + sympy.Or: "or_", + sympy.And: "and_", + sympy.Eq: "eq", + sympy.Ne: "ne", + sympy.Lt: "lt", + sympy.Gt: "gt", + sympy.Le: "le", + sympy.Ge: "ge", + sympy.Not: "not_", + IntTrueDiv: "int_truediv", + FloatTrueDiv: "truediv", + FloorDiv: "floordiv", + CleanDiv: "floordiv", # TODO: hmm? + TruncToFloat: "trunc", + Where: "where", + sympy.Add: "add", + sympy.Mul: "mul", + FloatPow: "pow", + PowByNatural: "pow_by_natural", + # sympy simplifies x * x into Pow(x, 2), so we need to handle this. + # Do NOT use builtin Pow for floats + # TODO: There is a hazard here, if we have float * float it will + # also get turned into Pow(float, 2) but we don't want this because + # pow_by_natural is assumed to only be integers. Probably the fix is + # to add a FloatMul to impede this optimization + sympy.Pow: "pow_by_natural", + Mod: "mod", + PythonMod: "python_mod", + # TODO: Inductor can generate these, but it's ill-specified which + # semantics were intended here. Needs to be cleaned up along with + # FloorDiv in a bigger cleanup + sympy.Mod: "mod", + sympy.Abs: "abs", + sympy.log: "log", + sympy.exp: "exp", + sympy.Min: "minimum", + sympy.Max: "maximum", + Min: "minimum", + Max: "maximum", + ModularIndexing: "modular_indexing", + sympy.functions.elementary.piecewise.ExprCondPair: "expr_cond_pair", + sympy.Piecewise: "piecewise", + Identity: "identity", + IsNonOverlappingAndDenseIndicator: "is_non_overlapping_and_dense_indicator", + RoundDecimal: "round_decimal", + # TODO: do the rest of the opaque unary functions... + OpaqueUnaryFn_log2: "log2", + BitwiseFn_bitwise_and: "bitwise_and", + BitwiseFn_bitwise_or: "bitwise_or", + BitwiseFn_bitwise_xor: "bitwise_xor", + } + # TODO: This is kind of pointless, we shouldn't be generating sympy.sin + # for these functions, they should be Opaque instead + for name in ["cos", "sin", "tan", "sinh", "cosh", "tanh", "asin", "acos", "atan"]: + HANDLERS[getattr(sympy, name)] = name + + return HANDLERS + + +ASSOCIATIVE_OPS = {"minimum", "maximum", "mul", "add", "and_", "or_"} + + +def _run_sympy_handler(analysis, args, expr, index_dtype=torch.int64): + # Special cases + if isinstance(expr, sympy.Pow) and isinstance( + expr.args[1], sympy.core.numbers.Half + ): + return analysis.sqrt(args[0]) + if isinstance(expr, ToFloat): + return analysis.to_dtype(args[0], torch.float64) + + # These handlers are special because they take an extra dtype argument + # specifying what they should convert to, and we need to appropriately set + # this up when we convert from Sympy. A reasonable default when you + # are translating is to conservatively do int64, and then narrow these + # arguments later when you discover you can narrow the index range. But + # if you already know that 32-bit indexing is OK, you can directly do the + # sympy translation with index_dtype=torch.int32 + INDEX_DTYPE_HANDLERS = { + TruncToInt: "trunc_to_int", + sympy.floor: "floor_to_int", + sympy.ceiling: "ceil_to_int", + FloorToInt: "floor_to_int", + CeilToInt: "ceil_to_int", + RoundToInt: "round_to_int", + } + if (handler_name := INDEX_DTYPE_HANDLERS.get(expr.func)) is not None: + return getattr(analysis, handler_name)(*args, index_dtype) + + # Fastpath for n-ary integral addition + if expr.func is sympy.Add and expr.is_integer and hasattr(analysis, "sym_sum"): + r = analysis.sym_sum(args) + log.debug("sym_sum(%s) -> %s", args, r) + return r + + if hasattr(expr.func, "_torch_handler_name"): + handler_name = expr.func._torch_handler_name + else: + handler_name = handlers()[expr.func] + handler = getattr(analysis, handler_name) + try: + if handler_name in ASSOCIATIVE_OPS: + if len(args) <= 1: + raise AssertionError("associative op needs >1 args") + acc = handler(args[0], args[1]) + for i in range(2, len(args)): + acc = handler(acc, args[i]) + log.debug("%s(%s) -> %s", handler_name, args, acc) + return acc + else: + r = handler(*args) + log.debug("%s(%s) -> %s", handler_name, args, r) + return r + except NotImplementedError: + raise + except Exception: + log.warning("failed while executing %s(%s)", handler_name, args) + raise + + +_nil = object() + + +def sympy_interp( + analysis, + env: dict[sympy.Symbol, Any], + expr: sympy.Expr | SympyBoolean, + *, + index_dtype=torch.int64, + missing_handler=None, +): + # Handle base cases + dtype = None + if isinstance(expr, BooleanAtom): + dtype = torch.bool + elif isinstance(expr, sympy.Integer): + dtype = torch.int64 + elif isinstance(expr, sympy.Number): + dtype = torch.double + + if dtype is not None: + return analysis.constant(expr, dtype) + elif isinstance(expr, sympy.Symbol): + if (r := env.get(expr, _nil)) is not _nil: + return r + elif missing_handler: + return missing_handler(expr) + else: + raise KeyError(expr) + + # Recursive case + return _run_sympy_handler( + analysis, + [ + sympy_interp( + analysis, + env, + arg, + index_dtype=index_dtype, + missing_handler=missing_handler, + ) + for arg in expr.args + ], + expr, + index_dtype=index_dtype, + ) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_sympy/numbers.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_sympy/numbers.py new file mode 100644 index 0000000000000000000000000000000000000000..8b08e01d8e52bbed86c4630a88974172fe096ab4 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_sympy/numbers.py @@ -0,0 +1,399 @@ +# mypy: allow-untyped-defs +import mpmath.libmp as mlib # type: ignore[import-untyped] +import sympy +from sympy import Expr +from sympy.core.decorators import _sympifyit +from sympy.core.expr import AtomicExpr +from sympy.core.numbers import Number +from sympy.core.parameters import global_parameters +from sympy.core.singleton import S, Singleton + + +# pyrefly: ignore [invalid-inheritance] +class IntInfinity(Number, metaclass=Singleton): + r"""Positive integer infinite quantity. + + Integer infinity is a value in an extended integers which + is greater than all other integers. We distinguish it from + sympy's existing notion of infinity in that it reports that + it is_integer. + + Infinity is a singleton, and can be accessed by ``S.IntInfinity``, + or can be imported as ``int_oo``. + """ + + # NB: We can't actually mark this as infinite, as integer and infinite are + # inconsistent assumptions in sympy. We also report that we are complex, + # different from sympy.oo + + is_integer = True + is_commutative = True + is_number = True + is_extended_real = True + is_comparable = True + is_extended_positive = True + is_prime = False + + # Ensure we get dispatched to before plain numbers + _op_priority = 100.0 + + __slots__ = () + + def __new__(cls): + return AtomicExpr.__new__(cls) + + def _sympystr(self, printer) -> str: + return "int_oo" + + def _eval_subs(self, old, new): + if self == old: + return new + + # We could do these, not sure about it + """ + def _eval_evalf(self, prec=None): + return Float('inf') + + def evalf(self, prec=None, **options): + return self._eval_evalf(prec) + """ + + @_sympifyit("other", NotImplemented) + def __add__(self, other): + if isinstance(other, Number) and global_parameters.evaluate: + if other in (S.Infinity, S.NegativeInfinity): + return other + if other in (S.NegativeIntInfinity, S.NaN): + return S.NaN + return self + return Number.__add__(self, other) + + __radd__ = __add__ + + @_sympifyit("other", NotImplemented) + def __sub__(self, other): + if isinstance(other, Number) and global_parameters.evaluate: + if other is S.Infinity: + return S.NegativeInfinity + if other is S.NegativeInfinity: + return S.Infinity + if other in (S.IntInfinity, S.NaN): + return S.NaN + return self + return Number.__sub__(self, other) + + @_sympifyit("other", NotImplemented) + def __rsub__(self, other): + return (-self).__add__(other) + + @_sympifyit("other", NotImplemented) + def __mul__(self, other): + if isinstance(other, Number) and global_parameters.evaluate: + if other.is_zero or other is S.NaN: + return S.NaN + if other.is_extended_positive: + return self + return S.NegativeIntInfinity + return Number.__mul__(self, other) + + __rmul__ = __mul__ + + @_sympifyit("other", NotImplemented) + def __truediv__(self, other): + if isinstance(other, Number) and global_parameters.evaluate: + if other in ( + S.Infinity, + S.IntInfinity, + S.NegativeInfinity, + S.NegativeIntInfinity, + S.NaN, + ): + return S.NaN + if other.is_extended_nonnegative: + return S.Infinity # truediv produces float + return S.NegativeInfinity # truediv produces float + return Number.__truediv__(self, other) + + def __abs__(self): + return S.IntInfinity + + def __neg__(self): + return S.NegativeIntInfinity + + def _eval_power(self, expt): + if expt.is_extended_positive: + return S.IntInfinity + if expt.is_extended_negative: + return S.Zero + if expt is S.NaN: + return S.NaN + if expt is S.ComplexInfinity: + return S.NaN + if expt.is_extended_real is False and expt.is_number: + from sympy.functions.elementary.complexes import re + + expt_real = re(expt) + if expt_real.is_positive: + return S.ComplexInfinity + if expt_real.is_negative: + return S.Zero + if expt_real.is_zero: + return S.NaN + + return self ** expt.evalf() + + def _as_mpf_val(self, prec): + return mlib.finf + + def __hash__(self): + return super().__hash__() + + def __eq__(self, other): + return other is S.IntInfinity + + def __ne__(self, other): + return other is not S.IntInfinity + + def __gt__(self, other): + if other is S.Infinity: + return sympy.false # sympy.oo > int_oo + elif other is S.IntInfinity: + return sympy.false # consistency with sympy.oo + else: + return sympy.true + + def __ge__(self, other): + if other is S.Infinity: + return sympy.false # sympy.oo > int_oo + elif other is S.IntInfinity: + return sympy.true # consistency with sympy.oo + else: + return sympy.true + + def __lt__(self, other): + if other is S.Infinity: + return sympy.true # sympy.oo > int_oo + elif other is S.IntInfinity: + return sympy.false # consistency with sympy.oo + else: + return sympy.false + + def __le__(self, other): + if other is S.Infinity: + return sympy.true # sympy.oo > int_oo + elif other is S.IntInfinity: + return sympy.true # consistency with sympy.oo + else: + return sympy.false + + @_sympifyit("other", NotImplemented) + def __mod__(self, other): + if not isinstance(other, Expr): + return NotImplemented + return S.NaN + + __rmod__ = __mod__ + + def floor(self): + return self + + def ceiling(self): + return self + + +int_oo = S.IntInfinity + + +# pyrefly: ignore [invalid-inheritance] +class NegativeIntInfinity(Number, metaclass=Singleton): + """Negative integer infinite quantity. + + NegativeInfinity is a singleton, and can be accessed + by ``S.NegativeInfinity``. + + See Also + ======== + + IntInfinity + """ + + # Ensure we get dispatched to before plain numbers + _op_priority = 100.0 + + is_integer = True + is_extended_real = True + is_commutative = True + is_comparable = True + is_extended_negative = True + is_number = True + is_prime = False + + __slots__ = () + + def __new__(cls): + return AtomicExpr.__new__(cls) + + def _eval_subs(self, old, new): + if self == old: + return new + + def _sympystr(self, printer) -> str: + return "-int_oo" + + """ + def _eval_evalf(self, prec=None): + return Float('-inf') + + def evalf(self, prec=None, **options): + return self._eval_evalf(prec) + """ + + @_sympifyit("other", NotImplemented) + def __add__(self, other): + if isinstance(other, Number) and global_parameters.evaluate: + if other is S.Infinity: + return S.Infinity + if other in (S.IntInfinity, S.NaN): + return S.NaN + return self + return Number.__add__(self, other) + + __radd__ = __add__ + + @_sympifyit("other", NotImplemented) + def __sub__(self, other): + if isinstance(other, Number) and global_parameters.evaluate: + if other is S.NegativeInfinity: + return S.Infinity + if other in (S.NegativeIntInfinity, S.NaN): + return S.NaN + return self + return Number.__sub__(self, other) + + @_sympifyit("other", NotImplemented) + def __rsub__(self, other): + return (-self).__add__(other) + + @_sympifyit("other", NotImplemented) + def __mul__(self, other): + if isinstance(other, Number) and global_parameters.evaluate: + if other.is_zero or other is S.NaN: + return S.NaN + if other.is_extended_positive: + return self + return S.IntInfinity + return Number.__mul__(self, other) + + __rmul__ = __mul__ + + @_sympifyit("other", NotImplemented) + def __truediv__(self, other): + if isinstance(other, Number) and global_parameters.evaluate: + if other in ( + S.Infinity, + S.IntInfinity, + S.NegativeInfinity, + S.NegativeIntInfinity, + S.NaN, + ): + return S.NaN + if other.is_extended_nonnegative: + return self + return S.Infinity # truediv returns float + return Number.__truediv__(self, other) + + def __abs__(self): + return S.IntInfinity + + def __neg__(self): + return S.IntInfinity + + def _eval_power(self, expt): + if expt.is_number: + if expt in ( + S.NaN, + S.Infinity, + S.NegativeInfinity, + S.IntInfinity, + S.NegativeIntInfinity, + ): + return S.NaN + + if isinstance(expt, sympy.Integer) and expt.is_extended_positive: + if expt.is_odd: + return S.NegativeIntInfinity + else: + return S.IntInfinity + + inf_part = S.IntInfinity**expt + s_part = S.NegativeOne**expt + if inf_part == 0 and s_part.is_finite: + return inf_part + if ( + inf_part is S.ComplexInfinity + and s_part.is_finite + and not s_part.is_zero + ): + return S.ComplexInfinity + return s_part * inf_part + + def _as_mpf_val(self, prec): + return mlib.fninf + + def __hash__(self): + return super().__hash__() + + def __eq__(self, other): + return other is S.NegativeIntInfinity + + def __ne__(self, other): + return other is not S.NegativeIntInfinity + + def __gt__(self, other): + if other is S.NegativeInfinity: + return sympy.true # -sympy.oo < -int_oo + elif other is S.NegativeIntInfinity: + return sympy.false # consistency with sympy.oo + else: + return sympy.false + + def __ge__(self, other): + if other is S.NegativeInfinity: + return sympy.true # -sympy.oo < -int_oo + elif other is S.NegativeIntInfinity: + return sympy.true # consistency with sympy.oo + else: + return sympy.false + + def __lt__(self, other): + if other is S.NegativeInfinity: + return sympy.false # -sympy.oo < -int_oo + elif other is S.NegativeIntInfinity: + return sympy.false # consistency with sympy.oo + else: + return sympy.true + + def __le__(self, other): + if other is S.NegativeInfinity: + return sympy.false # -sympy.oo < -int_oo + elif other is S.NegativeIntInfinity: + return sympy.true # consistency with sympy.oo + else: + return sympy.true + + @_sympifyit("other", NotImplemented) + def __mod__(self, other): + if not isinstance(other, Expr): + return NotImplemented + return S.NaN + + __rmod__ = __mod__ + + def floor(self): + return self + + def ceiling(self): + return self + + def as_powers_dict(self): + return {S.NegativeOne: 1, S.IntInfinity: 1} diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_sympy/printers.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_sympy/printers.py new file mode 100644 index 0000000000000000000000000000000000000000..7006b7f7fdc65552a239d805dc30119e8ac2acf5 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_sympy/printers.py @@ -0,0 +1,593 @@ +import sys + +import sympy +from sympy.printing.precedence import PRECEDENCE, precedence +from sympy.printing.str import StrPrinter + + +INDEX_TYPE = "int64_t" +INDEX_TYPE_MAX = (1 << 63) - 1 +INDEX_TYPE_MIN = -1 << 63 + + +# This printer contains rules that are supposed to be generic for both C/C++ and +# Python +class ExprPrinter(StrPrinter): + # override this so that _print_FloorDiv is used + printmethod = "_torch_sympystr" + + def _print_Mul(self, expr: sympy.Expr) -> str: + return self.stringify(expr.args, "*", precedence(expr)) + + def _print_Not(self, expr: sympy.Expr) -> str: + return f"not ({self._print(expr.args[0])})" + + def _print_Add(self, expr: sympy.Expr, order: str | None = None) -> str: + return self.stringify(expr.args, " + ", precedence(expr)) + + def _print_Relational(self, expr: sympy.Expr) -> str: + return self.stringify(expr.args, f" {expr.rel_op} ", precedence(expr)) + + def _print_BitwiseFn_bitwise_and(self, expr: sympy.Expr) -> str: + return self.stringify(expr.args, " & ", PRECEDENCE["BitwiseAnd"]) + + def _print_BitwiseFn_bitwise_or(self, expr: sympy.Expr) -> str: + return self.stringify(expr.args, " | ", PRECEDENCE["BitwiseOr"]) + + def _print_BitwiseFn_bitwise_xor(self, expr: sympy.Expr) -> str: + return self.stringify(expr.args, " ^ ", PRECEDENCE["BitwiseXor"]) + + # NB: this is OK to put here, because Mod is only defined for positive + # numbers, and so across C/Python its behavior is consistent + def _print_Mod(self, expr: sympy.Expr) -> str: + return self.stringify(expr.args, " % ", PRECEDENCE["Atom"] - 0.5) + + def _print_FloatTrueDiv(self, expr: sympy.Expr) -> str: + s = self.stringify(expr.args, " / ", PRECEDENCE["Atom"] - 0.5) + return f"({s})" + + def _print_CleanDiv(self, expr: sympy.Expr) -> str: + return self._print_FloorDiv(expr) + + def _print_Identity(self, expr: sympy.Expr) -> str: + return self._print(expr.args[0]) + + def _print_Float(self, expr: sympy.Expr) -> str: + if expr._prec == 53: + # IEEE-754 double precision have 53 bits. SymPy prints them with + # 15 digits, but we need 17 for round-trip correctness + return str(sympy.Float(expr, dps=17)) + else: + # We don't use other precisions in pytorch + return str(expr) + + # This must be implemented because sympy will collect x * x into Pow(x, 2), without + # any explicit intervention. We print it just like x * x, notably, we + # never generate sympy.Pow with floats. + # + # NB: this pow by natural, you should never have used builtin sympy.pow + # for FloatPow, and a symbolic exponent should be PowByNatural. These + # means exp is guaranteed to be integer. + # pyrefly: ignore [bad-override] + def _print_Pow(self, expr: sympy.Expr) -> str: + base, exp = expr.args + if exp != int(exp): + raise AssertionError(exp) + exp = int(exp) + if exp < 0: + raise AssertionError(f"exponent must be non-negative, got {exp}") + if exp > 0: + return self.stringify([base] * exp, "*", PRECEDENCE["Mul"]) + return "1" + + # Explicit NotImplemented functions are to prevent default sympy printing + # behavior, which will just barf out ToFloat(...) to your IR. The error + # message is better here because it tells you which printer class it needs + # to go in. + + def _print_ToFloat(self, expr: sympy.Expr) -> str: + raise NotImplementedError(f"_print_ToFloat not implemented for {type(self)}") + + def _print_Infinity(self, expr: sympy.Expr) -> str: + raise NotImplementedError(f"_print_Infinity not implemented for {type(self)}") + + def _print_NegativeInfinity(self, expr: sympy.Expr) -> str: + raise NotImplementedError( + f"_print_NegativeInfinity not implemented for {type(self)}" + ) + + def _print_FloorDiv(self, expr: sympy.Expr) -> str: + raise NotImplementedError(f"_print_FloorDiv not implemented for {type(self)}") + + def _print_PythonMod(self, expr: sympy.Expr) -> str: + raise NotImplementedError(f"_print_PythonMod not implemented for {type(self)}") + + def _print_IntTrueDiv(self, expr: sympy.Expr) -> str: + raise NotImplementedError(f"_print_IntTrueDiv not implemented for {type(self)}") + + def _print_PowByNatural(self, expr: sympy.Expr) -> str: + raise NotImplementedError( + f"_print_PowByNatural not implemented for {type(self)}" + ) + + def _print_FloatPow(self, expr: sympy.Expr) -> str: + raise NotImplementedError(f"_print_FloatPow not implemented for {type(self)}") + + def _print_TruncToInt(self, expr: sympy.Expr) -> str: + raise NotImplementedError(f"_print_TruncToInt not implemented for {type(self)}") + + def _print_RoundToInt(self, expr: sympy.Expr) -> str: + raise NotImplementedError(f"_print_RoundToInt not implemented for {type(self)}") + + def _print_RoundDecimal(self, expr: sympy.Expr) -> str: + raise NotImplementedError( + f"_print_RoundDecimal not implemented for {type(self)}" + ) + + # NB: Some float operations are INTENTIONALLY not implemented for + # printers. You can implement them as a quick unblock, but it is better + # to ask yourself why we haven't done this computation in the Tensor + # universe instead + + def _print_TruncToFloat(self, expr: sympy.Expr) -> str: + raise NotImplementedError( + f"_print_TruncToFloat not implemented for {type(self)}" + ) + + +class PythonPrinter(ExprPrinter): + def _print_ToFloat(self, expr: sympy.Expr) -> str: + if len(expr.args) != 1: + raise AssertionError("ToFloat expects exactly one argument") + # NB: We use sym_float here because the printer is used for cache + # serialization, and cache guards get evaluated with SymInt to + # propagate guards to the parent ShapeEnv. However, this comes at a + # runtime cost for guards involving float. If this is unacceptable + # overhead, what you want to do is have two separate printers for + # SymInt, one for when the inputs are guaranteed to be int, and + # another for when they could be SymInt. + # + # NB: sym_min/sym_max also have this problem, but I chose not to fix + # those. + # + # See https://github.com/pytorch/pytorch/issues/142507 for more + # context. + return f"torch.sym_float({self._print(expr.args[0])})" + + def _print_And(self, expr: sympy.Expr) -> str: + return self.stringify(expr.args, " and ", precedence(expr)) + + def _print_Or(self, expr: sympy.Expr) -> str: + return self.stringify(expr.args, " or ", precedence(expr)) + + def _print_ModularIndexing(self, expr: sympy.Expr) -> str: + x, div, mod = ( + self.parenthesize(arg, PRECEDENCE["Atom"] - 0.5) for arg in expr.args + ) + if div != "1": + x = f"({x} // {div})" + return f"({x} % {mod})" + + def _print_Infinity(self, expr: sympy.Expr) -> str: + return "math.inf" + + def _print_NegativeInfinity(self, expr: sympy.Expr) -> str: + return "-math.inf" + + # WARNING: this is dangerous for Triton, which has C-style modulus + def _print_PythonMod(self, expr: sympy.Expr) -> str: + return self.stringify(expr.args, " % ", PRECEDENCE["Atom"] - 0.5) + + # WARNING: this is dangerous for Triton, which has C-style modulus + def _print_FloorDiv(self, expr: sympy.Expr) -> str: + x, div = (self.parenthesize(arg, PRECEDENCE["Atom"] - 0.5) for arg in expr.args) + return f"{x} // {div}" + + # WARNING: this is dangerous for Triton, when lhs, rhs > 2**53, Python + # does a special algorithm + def _print_IntTrueDiv(self, expr: sympy.Expr) -> str: + return self.stringify(expr.args, " / ", PRECEDENCE["Atom"] - 0.5) + + def _helper_sqrt(self, expr: sympy.Expr) -> str: + return f"math.sqrt({self._print(expr)})" + + def _print_OpaqueUnaryFn_sqrt(self, expr: sympy.Expr) -> str: + return self._helper_sqrt(expr.args[0]) + + def _print_FloatPow(self, expr: sympy.Expr) -> str: + return self.stringify(expr.args, " ** ", PRECEDENCE["Pow"]) + + # TODO: Not sure this works with Triton, even when base/exp are integral + def _print_PowByNatural(self, expr: sympy.Expr) -> str: + return self.stringify(expr.args, " ** ", PRECEDENCE["Pow"]) + + def _print_floor(self, expr: sympy.Expr) -> str: + if len(expr.args) != 1: + raise AssertionError("floor expects exactly one argument") + return f"math.floor({self._print(expr.args[0])})" + + def _print_FloorToInt(self, expr: sympy.Expr) -> str: + if len(expr.args) != 1: + raise AssertionError("FloorToInt expects exactly one argument") + return f"math.floor({self._print(expr.args[0])})" + + def _print_TruncToInt(self, expr: sympy.Expr) -> str: + if len(expr.args) != 1: + raise AssertionError("TruncToInt expects exactly one argument") + # This also could have been int(), they'll do the same thing for float + return f"math.trunc({self._print(expr.args[0])})" + + def _print_ceiling(self, expr: sympy.Expr) -> str: + if len(expr.args) != 1: + raise AssertionError("ceiling expects exactly one argument") + return f"math.ceil({self._print(expr.args[0])})" + + def _print_CeilToInt(self, expr: sympy.Expr) -> str: + if len(expr.args) != 1: + raise AssertionError("CeilToInt expects exactly one argument") + return f"math.ceil({self._print(expr.args[0])})" + + def _print_Abs(self, expr: sympy.Expr) -> str: + if len(expr.args) != 1: + raise AssertionError("Abs expects exactly one argument") + return f"abs({self._print(expr.args[0])})" + + # NB: It's expected that we've made explicit any promotion in the sympy + # expression, so it doesn't matter that Python max/min doesn't perform + # promotion + def _print_Max(self, expr: sympy.Expr) -> str: + if len(expr.args) < 2: + raise AssertionError("Max expects at least two arguments") + return f"max({', '.join(map(self._print, expr.args))})" + + def _print_Min(self, expr: sympy.Expr) -> str: + if len(expr.args) < 2: + raise AssertionError("Min expects at least two arguments") + return f"min({', '.join(map(self._print, expr.args))})" + + def _print_OpaqueUnaryFn_cos(self, expr: sympy.Expr) -> str: + if len(expr.args) != 1: + raise AssertionError("cos expects exactly one argument") + return f"math.cos({self._print(expr.args[0])})" + + def _print_OpaqueUnaryFn_cosh(self, expr: sympy.Expr) -> str: + if len(expr.args) != 1: + raise AssertionError("cosh expects exactly one argument") + return f"math.cosh({self._print(expr.args[0])})" + + def _print_OpaqueUnaryFn_acos(self, expr: sympy.Expr) -> str: + if len(expr.args) != 1: + raise AssertionError("acos expects exactly one argument") + return f"math.acos({self._print(expr.args[0])})" + + def _print_OpaqueUnaryFn_sin(self, expr: sympy.Expr) -> str: + if len(expr.args) != 1: + raise AssertionError("sin expects exactly one argument") + return f"math.sin({self._print(expr.args[0])})" + + def _print_OpaqueUnaryFn_sinh(self, expr: sympy.Expr) -> str: + if len(expr.args) != 1: + raise AssertionError("sinh expects exactly one argument") + return f"math.sinh({self._print(expr.args[0])})" + + def _print_OpaqueUnaryFn_asin(self, expr: sympy.Expr) -> str: + if len(expr.args) != 1: + raise AssertionError("asin expects exactly one argument") + return f"math.asin({self._print(expr.args[0])})" + + def _print_OpaqueUnaryFn_tan(self, expr: sympy.Expr) -> str: + if len(expr.args) != 1: + raise AssertionError("tan expects exactly one argument") + return f"math.tan({self._print(expr.args[0])})" + + def _print_OpaqueUnaryFn_tanh(self, expr: sympy.Expr) -> str: + if len(expr.args) != 1: + raise AssertionError("tanh expects exactly one argument") + return f"math.tanh({self._print(expr.args[0])})" + + def _print_OpaqueUnaryFn_atan(self, expr: sympy.Expr) -> str: + if len(expr.args) != 1: + raise AssertionError("atan expects exactly one argument") + return f"math.atan({self._print(expr.args[0])})" + + def _print_OpaqueUnaryFn_log2(self, expr: sympy.Expr) -> str: + if len(expr.args) != 1: + raise AssertionError("log2 expects exactly one argument") + return f"math.log2({self._print(expr.args[0])})" + + def _print_RoundToInt(self, expr: sympy.Expr) -> str: + if len(expr.args) != 1: + raise AssertionError("RoundToInt expects exactly one argument") + return f"round({self._print(expr.args[0])})" + + def _print_RoundDecimal(self, expr: sympy.Expr) -> str: + if len(expr.args) != 2: + raise AssertionError("RoundDecimal expects exactly two arguments") + number, ndigits = expr.args + if not isinstance(ndigits, sympy.Integer): + raise TypeError("ndigits must be an instance of sympy.Integer") + return f"round({self._print(number)}, {ndigits})" + + def _print_Piecewise(self, expr: sympy.Expr) -> str: + # Convert Piecewise(expr_cond_pairs) to nested ternary expressions + # Piecewise((e1, c1), (e2, c2), ..., (eN, cN)) + # becomes: e1 if c1 else (e2 if c2 else (... else eN)) + result: str | None = None + for expr_i, cond_i in reversed(expr.args): + expr_str = self._print(expr_i) + if cond_i == True: # noqa: E712 + # This is the default case + result = expr_str + else: + cond_str = self._print(cond_i) + if result is None: + result = expr_str + else: + result = f"({expr_str} if {cond_str} else {result})" + return result if result else "0" + + +class CppPrinter(ExprPrinter): + def _print_Integer(self, expr: sympy.Expr) -> str: + suffix = "LL" if sys.platform in ["darwin", "win32"] else "L" + i = int(expr) + if i > INDEX_TYPE_MAX or i < INDEX_TYPE_MIN: + raise OverflowError(f"{i} too big to convert to {INDEX_TYPE}") + elif i == INDEX_TYPE_MIN: + if i != (-1) << 63: + raise AssertionError("unexpected minimum index type value") + # Writing -9223372036854775808L makes the value overflow + # as it is parsed as -(9223372036854775808L) by the C/C++ compiler + return f"(-1{suffix} << 63)" + return f"{i}{suffix}" + + def _print_Where(self, expr: sympy.Expr) -> str: + c, p, q = ( + self.parenthesize(arg, PRECEDENCE["Atom"] - 0.5) for arg in expr.args + ) + return f"{c} ? {p} : {q}" + + def _print_Piecewise(self, expr: sympy.Expr) -> str: + # Convert Piecewise(expr_cond_pairs) to nested ternary operators + # Piecewise((e1, c1), (e2, c2), ..., (eN, cN)) + # becomes: c1 ? e1 : (c2 ? e2 : (... : eN)) + result: str | None = None + for expr_i, cond_i in reversed(expr.args): + expr_str = self.parenthesize(expr_i, PRECEDENCE["Atom"] - 0.5) + if cond_i == True: # noqa: E712 + # This is the default case + result = expr_str + else: + cond_str = self.parenthesize(cond_i, PRECEDENCE["Atom"] - 0.5) + if result is None: + result = expr_str + else: + result = f"{cond_str} ? {expr_str} : {result}" + return f"({result})" if result else "0" + + def _print_ModularIndexing(self, expr: sympy.Expr) -> str: + x, div, mod = expr.args + x = self.doprint(x) + if div != 1: + div = self.doprint(div) + if expr.is_integer: + x = f"c10::div_floor_integer(static_cast({x}), static_cast({div}))" + else: + x = f"c10::div_floor_floating(static_cast({x}), static_cast({div}))" + mod = self.doprint(mod) + return f"(static_cast<{INDEX_TYPE}>({x}) % static_cast<{INDEX_TYPE}>({mod}))" + + def _print_FloorDiv(self, expr: sympy.Expr) -> str: + x, div = expr.args + x = self.doprint(x) + div = self.doprint(div) + if expr.is_integer: + return f"c10::div_floor_integer(static_cast({x}), static_cast({div}))" + return f"c10::div_floor_floating(static_cast({x}), static_cast({div}))" + + def _print_floor(self, expr: sympy.Expr) -> str: + if len(expr.args) != 1: + raise AssertionError("floor expects exactly one argument") + r = f"std::floor({self._print(expr.args[0])})" + return f"static_cast<{INDEX_TYPE}>({r})" if expr.is_integer else r + + def _print_FloorToInt(self, expr: sympy.Expr) -> str: + if len(expr.args) != 1: + raise AssertionError("FloorToInt expects exactly one argument") + r = f"std::floor({self._print(expr.args[0])})" + return f"static_cast<{INDEX_TYPE}>({r})" if expr.is_integer else r + + def _print_TruncToInt(self, expr: sympy.Expr) -> str: + if len(expr.args) != 1: + raise AssertionError("TruncToInt expects exactly one argument") + r = f"std::trunc({self._print(expr.args[0])})" + return f"static_cast<{INDEX_TYPE}>({r})" + + def _print_TruncToFloat(self, expr: sympy.Expr) -> str: + if len(expr.args) != 1: + raise AssertionError("TruncToFloat expects exactly one argument") + return f"std::trunc({self._print(expr.args[0])})" + + def _print_ToFloat(self, expr: sympy.Expr) -> str: + if len(expr.args) != 1: + raise AssertionError("ToFloat expects exactly one argument") + return f"static_cast({self._print(expr.args[0])})" + + def _print_PythonMod(self, expr: sympy.Expr) -> str: + x, div = expr.args + x = self.doprint(x) + div = self.doprint(div) + return f"c10::div_mod({x}, {div})" + + def _print_IntTrueDiv(self, expr: sympy.Expr) -> str: + lhs, rhs = expr.args + # TODO: This is only accurate up to 2**53 + return f"static_cast({self._print(lhs)}) / static_cast({self._print(rhs)})" + + # TODO: PowByNatural: we need to implement our own int-int pow. Do NOT + # use std::pow, that operates on floats + def _print_PowByNatural(self, expr: sympy.Expr) -> str: + # Implement the special-case of 2**x for now + base, exp = expr.args + if base == 2: + return f"(1 << ({self._print(exp)}))" + raise NotImplementedError( + f"_print_PowByNatural not implemented for {type(self)}" + ) + + def _print_FloatPow(self, expr: sympy.Expr) -> str: + base, exp = expr.args + return f"std::pow({self._print(base)}, {self._print(exp)})" + + def _print_Pow(self, expr: sympy.Expr) -> str: + # Uses float constants to perform FP div + base, exp = expr.args + + if exp == 0.5 or exp == -0.5: + base = self._print(base) + return f"std::sqrt({base})" if exp == 0.5 else f"1.0/std::sqrt({base})" + if exp.is_integer: + exp = int(exp) + if exp > 0: + r = self.stringify([base] * exp, "*", PRECEDENCE["Mul"]) + elif exp < -1: + r = ( + "1.0/(" + + self.stringify([base] * abs(exp), "*", PRECEDENCE["Mul"]) + + ")" + ) + elif exp == -1: + r = "1.0/" + self._print(base) + else: # exp == 0 + r = "1.0" + + return f"static_cast<{INDEX_TYPE}>({r})" if expr.is_integer else r + else: + # TODO: float vs double + return f"std::pow({base}, {float(exp)})" + + def _print_Rational(self, expr: sympy.Expr) -> str: + # Uses float constants to perform FP div + if expr.q == 1: + r = f"{expr.p}" + else: + r = f"{expr.p}.0/{expr.q}.0" + return f"static_cast<{INDEX_TYPE}>({r})" if expr.is_integer else r + + def _print_ceiling(self, expr: sympy.Expr) -> str: + if len(expr.args) != 1: + raise AssertionError("ceiling expects exactly one argument") + r = f"std::ceil({self._print(expr.args[0])})" + return f"static_cast<{INDEX_TYPE}>({r})" if expr.is_integer else r + + def _print_CeilToInt(self, expr: sympy.Expr) -> str: + if len(expr.args) != 1: + raise AssertionError("CeilToInt expects exactly one argument") + r = f"std::ceil({self._print(expr.args[0])})" + return f"static_cast<{INDEX_TYPE}>({r})" if expr.is_integer else r + + def _print_Min(self, expr: sympy.Expr) -> str: + args = [self._print(a) for a in expr.args] + if len(args) == 2: + return f"std::min(static_cast<{INDEX_TYPE}>({args[0]}), static_cast<{INDEX_TYPE}>({args[1]}))" + else: + # Initializer list overload + il = "{" + ", ".join(args) + "}" + return f"std::min<{INDEX_TYPE}>({il})" + + def _print_Max(self, expr: sympy.Expr) -> str: + args = [self._print(a) for a in expr.args] + if len(args) == 2: + return f"std::max(static_cast<{INDEX_TYPE}>({args[0]}), static_cast<{INDEX_TYPE}>({args[1]}))" + else: + # Initializer list overload + il = "{" + ", ".join(args) + "}" + return f"std::max<{INDEX_TYPE}>({il})" + + def _print_Abs(self, expr: sympy.Expr) -> str: + if len(expr.args) != 1: + raise AssertionError("Abs expects exactly one argument") + return f"std::abs({self._print(expr.args[0])})" + + def _print_OpaqueUnaryFn_cos(self, expr: sympy.Expr) -> str: + if len(expr.args) != 1: + raise AssertionError("cos expects exactly one argument") + return f"std::cos({self._print(expr.args[0])})" + + def _print_OpaqueUnaryFn_cosh(self, expr: sympy.Expr) -> str: + if len(expr.args) != 1: + raise AssertionError("cosh expects exactly one argument") + return f"std::cosh({self._print(expr.args[0])})" + + def _print_OpaqueUnaryFn_acos(self, expr: sympy.Expr) -> str: + if len(expr.args) != 1: + raise AssertionError("acos expects exactly one argument") + return f"std::acos({self._print(expr.args[0])})" + + def _print_OpaqueUnaryFn_sin(self, expr: sympy.Expr) -> str: + if len(expr.args) != 1: + raise AssertionError("sin expects exactly one argument") + return f"math.sin({self._print(expr.args[0])})" + + def _print_OpaqueUnaryFn_sinh(self, expr: sympy.Expr) -> str: + if len(expr.args) != 1: + raise AssertionError("sinh expects exactly one argument") + return f"std::sinh({self._print(expr.args[0])})" + + def _print_OpaqueUnaryFn_asin(self, expr: sympy.Expr) -> str: + if len(expr.args) != 1: + raise AssertionError("asin expects exactly one argument") + return f"std::asin({self._print(expr.args[0])})" + + def _print_OpaqueUnaryFn_tan(self, expr: sympy.Expr) -> str: + if len(expr.args) != 1: + raise AssertionError("tan expects exactly one argument") + return f"std::tan({self._print(expr.args[0])})" + + def _print_OpaqueUnaryFn_tanh(self, expr: sympy.Expr) -> str: + if len(expr.args) != 1: + raise AssertionError("tanh expects exactly one argument") + return f"std::tanh({self._print(expr.args[0])})" + + def _print_OpaqueUnaryFn_atan(self, expr: sympy.Expr) -> str: + if len(expr.args) != 1: + raise AssertionError("atan expects exactly one argument") + return f"std::atan({self._print(expr.args[0])})" + + def _print_OpaqueUnaryFn_sqrt(self, expr: sympy.Expr) -> str: + return f"std::sqrt({self._print(expr.args[0])})" + + def _print_OpaqueUnaryFn_log2(self, expr: sympy.Expr) -> str: + return f"std::log2({self._print(expr.args[0])})" + + def _print_RoundToInt(self, expr: sympy.Expr) -> str: + if len(expr.args) != 1: + raise AssertionError("RoundToInt expects exactly one argument") + # TODO: dispatch to llrint depending on index type + return f"std::lrint({self._print(expr.args[0])})" + + def _print_RoundDecimal(self, expr: sympy.Expr) -> str: + if len(expr.args) != 2: + raise AssertionError("RoundDecimal expects exactly two arguments") + number, ndigits = expr.args + if number.is_integer: + # ndigits < 0 should have been filtered by the sympy function + if ndigits >= 0: + raise AssertionError("ndigits must be negative for integer inputs") + raise ValueError( + f"For integer inputs, only non-negative ndigits are currently supported, but got {ndigits}." + ) + number_str = self.parenthesize(number, PRECEDENCE["Mul"]) + return f"static_cast(std::nearbyint(1e{ndigits} * {number_str}) * 1e{-ndigits})" + + def _print_BooleanTrue(self, expr: sympy.Expr) -> str: + return "true" + + def _print_BooleanFalse(self, expr: sympy.Expr) -> str: + return "false" + + def _print_Infinity(self, expr: sympy.Expr) -> str: + return "std::numeric_limits::infinity()" + + def _print_NegativeInfinity(self, expr: sympy.Expr) -> str: + return f"-{self._print_Infinity(expr)}" diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_sympy/reference.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_sympy/reference.py new file mode 100644 index 0000000000000000000000000000000000000000..015285eaaa1b6e8d59c57a5c943e7f2c73768a4f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_sympy/reference.py @@ -0,0 +1,600 @@ +# mypy: allow-untyped-defs +import math +import operator +from typing import NoReturn + +import sympy + +import torch +from torch.utils._sympy.functions import ( + _keep_float, + BitwiseFn_bitwise_and, + BitwiseFn_bitwise_or, + BitwiseFn_bitwise_xor, + FloatPow, + FloatTrueDiv, + FloorDiv, + IntTrueDiv, + Max, + Min, + Mod, + OpaqueUnaryFn_exp, + OpaqueUnaryFn_log, + OpaqueUnaryFn_log2, + OpaqueUnaryFn_sqrt, + PowByNatural, + RoundDecimal, + RoundToInt, + ToFloat, + TruncToInt, +) + + +# The sympy interpretation of operators. It will also sometimes work with +# plain int/float, but if you do certain operations you will get out a +# sympy.Basic in the end. If you want the Python/FX traceable interpretation, +# check PythonReferenceAnalysis. +# NB: For magic methods this needs to use normal magic methods +# so that test_magic_methods works +class ReferenceAnalysis: + @staticmethod + def constant(c, dtype): + return sympy.sympify(c) + + @staticmethod + def or_(a, b): + return a | b + + @staticmethod + def and_(a, b): + return a & b + + @staticmethod + def eq(a, b): + if isinstance(a, sympy.Expr) or isinstance(b, sympy.Expr): + return sympy.Eq(a, b) + return a == b + + @classmethod + def ne(cls, a, b): + return cls.not_(cls.eq(a, b)) + + @staticmethod + def lt(a, b): + return a < b + + @staticmethod + def gt(a, b): + return a > b + + @staticmethod + def le(a, b): + return a <= b + + @staticmethod + def ge(a, b): + return a >= b + + @staticmethod + def not_(a): + if isinstance(a, bool): + raise AssertionError("not_ needs sympy expr") + return ~a + + @staticmethod + def reciprocal(x): + return FloatTrueDiv(1.0, x) + + @staticmethod + def square(x): + return PowByNatural(x, 2) + + @staticmethod + def trunc_to_int(x, dtype): + return TruncToInt(x) + + @staticmethod + def ceil_to_int(x, dtype): + return sympy.ceiling(x) + + @staticmethod + def floor_to_int(x, dtype): + return sympy.floor(x) + + @staticmethod + def floor(x): + return _keep_float(sympy.floor)(x) + + @staticmethod + def ceil(x): + return _keep_float(sympy.ceiling)(x) + + @staticmethod + def to_dtype(x, dtype): + if dtype == torch.float64: + return ToFloat(x) + raise NotImplementedError(f"to_dtype {dtype} NYI") + + @staticmethod + def mod(x, y): + return Mod(x, y) + + @staticmethod + def abs(x): + return abs(x) + + @staticmethod + def neg(x): + return -x + + @staticmethod + def truediv(a, b): + return FloatTrueDiv(a, b) + + @staticmethod + def int_truediv(a, b): + return IntTrueDiv(a, b) + + @staticmethod + def floordiv(a, b): + return FloorDiv(a, b) + + @staticmethod + def truncdiv(a, b) -> NoReturn: + raise NotImplementedError("TODO: truncdiv") + + @staticmethod + def add(a, b): + return _keep_float(operator.add)(a, b) + + @classmethod + def sym_sum(cls, args): + return sympy.Add(*args) + + @staticmethod + def mul(a, b): + return _keep_float(operator.mul)(a, b) + + @staticmethod + def sub(a, b): + return _keep_float(operator.sub)(a, b) + + @staticmethod + def exp(x): + return OpaqueUnaryFn_exp(x) + + @staticmethod + def log(x): + return OpaqueUnaryFn_log(x) + + @staticmethod + def log2(x): + return OpaqueUnaryFn_log2(x) + + @staticmethod + def sqrt(x): + return OpaqueUnaryFn_sqrt(x) + + @staticmethod + def pow(a, b): + # pyrefly: ignore [bad-argument-type] + return _keep_float(FloatPow)(a, b) + + @staticmethod + def pow_by_natural(a, b): + return PowByNatural(a, b) + + @staticmethod + def minimum(a, b): + return Min(a, b) + + @staticmethod + def maximum(a, b): + return Max(a, b) + + @staticmethod + def round_to_int(a, dtype): + return RoundToInt(a) + + @staticmethod + def round_decimal(a, b): + return RoundDecimal(a, b) + + @staticmethod + def bitwise_and(a, b): + return BitwiseFn_bitwise_and(a, b) + + @staticmethod + def bitwise_or(a, b): + return BitwiseFn_bitwise_or(a, b) + + @staticmethod + def bitwise_xor(a, b): + return BitwiseFn_bitwise_xor(a, b) + + +# Unlike ReferenceAnalysis, does NOT sympyify, instead, works with plain +# Python types and is FX traceable. Inheritance here is purely for code +# sharing (TODO: considering splitting out a BaseReferenceAnalysis). +class PythonReferenceAnalysis(ReferenceAnalysis): + @staticmethod + def constant(c, dtype): + if dtype is torch.int64: + return int(c) + elif dtype is torch.double: + return float(c) + elif dtype is torch.bool: + return bool(c) + else: + raise AssertionError(f"unrecognized dtype {dtype}") + + @staticmethod + def not_(a): + return torch.sym_not(a) + + @classmethod + def sym_sum(cls, args): + if len(args) == 0: + return 0 + if len(args) == 1: + return args[0] + acc = cls.add(args[0], args[1]) + for i in range(2, len(args)): + acc = cls.add(acc, args[i]) + return acc + + @staticmethod + def floordiv(a, b): + return a // b + + @staticmethod + def mod(x, y): + return x % y + + @staticmethod + def python_mod(x, y): + return x % y + + @staticmethod + def truncdiv(a, b): + return a / b + + @staticmethod + def to_dtype(x, dtype): + if dtype == torch.float64: + return torch.sym_float(x) + raise NotImplementedError(f"to_dtype {dtype} NYI") + + @staticmethod + def exp(x) -> NoReturn: + raise AssertionError("exp is not valid shape sympy expr") + + @staticmethod + def log(x) -> NoReturn: + raise AssertionError("log is not valid shape sympy expr") + + @staticmethod + def log2(x): + return torch._sym_log2(x) # type: ignore[attr-defined] + + @staticmethod + def sqrt(x): + return torch._sym_sqrt(x) # type: ignore[attr-defined] + + @staticmethod + def minimum(a, b): + return torch.sym_min(a, b) + + @staticmethod + def maximum(a, b): + return torch.sym_max(a, b) + + @staticmethod + def floor_to_int(x, dtype): + return math.floor(x) + + @staticmethod + def ceil_to_int(x, dtype): + return math.ceil(x) + + @staticmethod + def floor(x): + return float(math.floor(x)) + + @staticmethod + def ceil(x): + return float(math.ceil(x)) + + @staticmethod + def truediv(a, b): + return a / b + + @staticmethod + def pow(a, b): + return a**b + + @staticmethod + def pow_by_natural(a, b): + # Pray that safe_pow is not needed here lol. In particular, this + # never participates in VR low/high ranges, so overflow should be + # unlikely + return a**b + + @staticmethod + def round_to_int(a, dtype): + return round(a) + + @staticmethod + def round_decimal(a, b): + return round(a, ndigits=b) + + @staticmethod + def bitwise_and(a, b): + return a & b + + @staticmethod + def bitwise_or(a, b): + return a | b + + @staticmethod + def bitwise_xor(a, b): + return a ^ b + + +# Like PythonReferenceAnalysis, but some export-unfriendly choices of +# operators to make things faster +class OptimizedPythonReferenceAnalysis(PythonReferenceAnalysis): + @staticmethod + def sym_sum(args): + return torch.sym_sum(args) + + +def _to_dtype(x: torch.Tensor, dtype: torch.dtype) -> torch.Tensor: + return torch.ops.prims.convert_element_type.default(x, dtype) + + +# Suppose we have some int/float arguments. This diagram commutes: +# +# int/float -- PythonReferenceAnalysis.op --> int/float +# | | +# | | +# torch.tensor(..., dtype=torch.int64/torch.float64) +# | | +# V V +# Tensor -- TensorReferenceAnalysis.op --> Tensor +# +# NB: int before and after must be representable in int64 (we will +# insert guards accordingly.) +# +# This is guaranteed to be FX traceable with OpOverloads only. +class TensorReferenceAnalysis: + # NB: This is actually dead, because with Proxy tracing the factory + # function isn't traced correctly. Here for completeness. + @staticmethod + def constant(c, dtype): + d: int | float | bool + if dtype is torch.int64: + d = int(c) + elif dtype is torch.double: + d = float(c) + elif dtype is torch.bool: + d = bool(c) + else: + raise AssertionError(f"unrecognized dtype {dtype}") + return torch.ops.aten.scalar_tensor.default(d, dtype=dtype) + + @staticmethod + def or_(a, b): + return torch.ops.aten.logical_or.default(a, b) + + @staticmethod + def and_(a, b): + return torch.ops.aten.logical_and.default(a, b) + + @staticmethod + def bitwise_and(a, b): + return torch.ops.aten.bitwise_and(a, b) + + @staticmethod + def bitwise_or(a, b): + return torch.ops.aten.bitwise_or(a, b) + + @staticmethod + def bitwise_xor(a, b): + return torch.ops.aten.bitwise_xor(a, b) + + @staticmethod + def eq(a, b): + return torch.ops.aten.eq.Tensor(a, b) + + @classmethod + def ne(cls, a, b): + return torch.ops.aten.ne.Tensor(a, b) + + @staticmethod + def lt(a, b): + return torch.ops.aten.lt.Tensor(a, b) + + @staticmethod + def gt(a, b): + return torch.ops.aten.gt.Tensor(a, b) + + @staticmethod + def le(a, b): + return torch.ops.aten.le.Tensor(a, b) + + @staticmethod + def ge(a, b): + return torch.ops.aten.ge.Tensor(a, b) + + @staticmethod + def not_(a): + return torch.ops.aten.logical_not.default(a) + + @staticmethod + def reciprocal(x): + return torch.ops.aten.reciprocal.default(x) + + @staticmethod + def square(x): + # TODO: maybe composite implicit autograd doesn't work here? + return torch.ops.aten.square.default(x) + + @staticmethod + def trunc_to_int(x, dtype): + return _to_dtype(torch.ops.aten.trunc.default(x), dtype) + + @staticmethod + def ceil_to_int(x, dtype): + return _to_dtype(torch.ops.aten.ceil.default(x), dtype) + + @staticmethod + def floor_to_int(x, dtype): + return _to_dtype(torch.ops.aten.floor.default(x), dtype) + + @staticmethod + def floor(x): + return torch.ops.aten.floor.default(x) + + @staticmethod + def ceil(x): + return torch.ops.aten.ceil.default(x) + + @staticmethod + def to_dtype(x, dtype): + return _to_dtype(x, dtype) + + @staticmethod + def mod(x, y) -> NoReturn: + # TODO: https://github.com/pytorch/pytorch/pull/133654 + raise NotImplementedError( + "no C-style modulus operation available from frontend atm" + ) + + @staticmethod + def abs(x): + return torch.ops.aten.abs.default(x) + + @staticmethod + def neg(x): + return torch.ops.aten.neg.default(x) + + @staticmethod + def truediv(a, b): + return torch.ops.aten.true_divide.Tensor(a, b) + + @staticmethod + def int_truediv(a, b): + raise NotImplementedError( + "Python int truediv difficult to implement in PyTorch atm" + ) + + # TODO: This is wrong, CPython has a custom implementation of true + # division that results in higher precision when the floats are + # sufficiently large. Short term fix: add a guard here + return torch.ops.aten.true_divide.default( + _to_dtype(a, torch.float64), _to_dtype(b, torch.float64) + ) + + @staticmethod + def floordiv(a, b): + return torch.ops.aten.div.Tensor_mode(a, b, rounding_mode="floor") + + @staticmethod + def truncdiv(a, b) -> NoReturn: + raise NotImplementedError( + "no C-style truncdiv operation available from frontend atm" + ) + + @staticmethod + def add(a, b): + return torch.ops.aten.add.Tensor(a, b) + + @staticmethod + def mul(a, b): + return torch.ops.aten.mul.Tensor(a, b) + + @staticmethod + def sub(a, b): + return torch.ops.aten.sub.Tensor(a, b) + + @staticmethod + def exp(x): + return torch.ops.aten.exp.default(x) + + @staticmethod + def log(x): + return torch.ops.aten.log.default(x) + + @staticmethod + def log2(x): + return torch.ops.aten.log2.default(x) + + @staticmethod + def sqrt(x): + return torch.ops.aten.sqrt.default(x) + + @staticmethod + def sin(x): + return torch.ops.aten.sin.default(x) + + @staticmethod + def cos(x): + return torch.ops.aten.cos.default(x) + + @staticmethod + def tanh(x): + return torch.ops.aten.tanh.default(x) + + @staticmethod + def sinh(x): + return torch.ops.aten.sinh.default(x) + + @staticmethod + def cosh(x): + return torch.ops.aten.cosh.default(x) + + @staticmethod + def tan(x): + return torch.ops.aten.tan.default(x) + + @staticmethod + def acos(x): + return torch.ops.aten.acos.default(x) + + @staticmethod + def atan(x): + return torch.ops.aten.atan.default(x) + + @staticmethod + def asin(x): + return torch.ops.aten.asin.default(x) + + @staticmethod + def pow(a, b): + return torch.ops.aten.pow.Tensor_Tensor(a, b) + + @staticmethod + def pow_by_natural(a, b): + # NB: pow handles int x int fine + return torch.ops.aten.pow.Tensor_Tensor(a, b) + + @staticmethod + def minimum(a, b): + return torch.ops.aten.minimum.default(a, b) + + @staticmethod + def maximum(a, b): + return torch.ops.aten.maximum.default(a, b) + + @staticmethod + def round_to_int(a, dtype): + return torch.ops.aten.round.default(a) + + @staticmethod + def round_decimal(a, b) -> NoReturn: + raise NotImplementedError( + "round decimal doesn't support Tensor second argument atm" + ) + + # return torch.ops.aten.round.decimals(a, b) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_sympy/singleton_int.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_sympy/singleton_int.py new file mode 100644 index 0000000000000000000000000000000000000000..57d5615e552711a490e306ebc97a260a55251c21 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_sympy/singleton_int.py @@ -0,0 +1,96 @@ +# mypy: allow-untyped-defs +import sympy +from sympy.multipledispatch import dispatch + + +__all__ = ["SingletonInt"] + + +class SingletonInt(sympy.AtomicExpr): + # This is probably not super important unless we are in multiple dispatch + # situations with other more exotic Expr types. + _op_priority = 99999 + + def __new__(cls, *args, coeff=None, **kwargs): + instance = super().__new__(cls, *args, **kwargs) + return instance + + # The semantics of this class should match that of NestedIntSymNodeImpl in + # c10/core/NestedIntSymNodeImpl.h + def __init__(self, val, *, coeff=1) -> None: + self._val = val + self._coeff = coeff + super().__init__() + + # See NOTE [ Inequalities with nested int ] + def _eval_Eq(self, other): + if ( + isinstance(other, SingletonInt) + and other._val == self._val + and self._coeff == other._coeff + ): + return sympy.true + else: + return sympy.false + + # This is necessary so that calling expr.free_symbols on exprs that contain + # this Singleton does not error + @property + def free_symbols(self): + return set() + + def __mul__(self, other): + if isinstance(other, SingletonInt): + raise ValueError( + "SingletonInt cannot be multiplied by another SingletonInt" + ) + return SingletonInt(self._val, coeff=self._coeff * other) + + def __rmul__(self, other): + if isinstance(other, SingletonInt): + raise ValueError( + "SingletonInt cannot be multiplied by another SingletonInt" + ) + return SingletonInt(self._val, coeff=self._coeff * other) + + # Make sure we promptly raise an error instead of falling back to building + # an expression tree. There are probably more ops, how can we be exhaustive? + def __add__(self, other): + raise NotImplementedError("NYI") + + def __sub__(self, other): + raise NotImplementedError("NYI") + + def __truediv__(self, other): + raise NotImplementedError("NYI") + + def __floordiv__(self, other): + raise NotImplementedError("NYI") + + def __mod__(self, other): + raise NotImplementedError("NYI") + + +# See NOTE [ Inequalities with nested int ] +@dispatch(sympy.Integer, SingletonInt) +def _eval_is_ge(a, b): + if a < 2: + return sympy.false + raise ValueError("Symbolic SingletonInt: Relation is indeterminate") + + +@dispatch(SingletonInt, sympy.Integer) # type: ignore[no-redef] +def _eval_is_ge(a, b): # noqa: F811 + if b <= 2: + return sympy.true + raise ValueError("Symbolic SingletonInt: Relation is indeterminate") + + +@dispatch(SingletonInt, SingletonInt) # type: ignore[no-redef] +def _eval_is_ge(a, b): # noqa: F811 + if a._val == b._val: + if a._coeff >= b._coeff: + return sympy.true + else: + return sympy.false + raise ValueError("Symbolic SingletonInt: Relation is indeterminate") diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_sympy/solve.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_sympy/solve.py new file mode 100644 index 0000000000000000000000000000000000000000..3bd5e1484601ffa1c7c2743ffa228c536cd54fb5 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_sympy/solve.py @@ -0,0 +1,179 @@ +import logging + +import sympy + +from torch.utils._sympy.functions import FloorDiv + + +log = logging.getLogger(__name__) + +_MIRROR_REL_OP: dict[type[sympy.Basic], type[sympy.Rel]] = { + sympy.Eq: sympy.Eq, + sympy.Ne: sympy.Ne, + sympy.Ge: sympy.Le, + sympy.Gt: sympy.Lt, + sympy.Le: sympy.Ge, + sympy.Lt: sympy.Gt, +} + +INEQUALITY_TYPES = (sympy.Gt, sympy.Ge, sympy.Lt, sympy.Le) + + +def mirror_rel_op(type: type) -> type[sympy.Rel] | None: + return _MIRROR_REL_OP.get(type) + + +# Tries to simplify 'expr', so as to leave only 'thing' in the left-hand side. +# +# Returns a tuple of: +# 1. The simplified expression +# 2. The expression on the right-hand side +# +# Returns 'None' if it can't reach a state where the only thing in the left +# hand side is 'thing'. +# +# 'trials': number of times 'try_solve' will try to isolate 'thing' to the +# left-hand side. +# +# 'floordiv_inequality': flag to enable conversion of 'FloorDiv' into +# inequalities. +def try_solve( + expr: sympy.Basic, + thing: sympy.Basic, + trials: int = 5, + floordiv_inequality: bool = True, +) -> tuple[sympy.Rel, sympy.Expr] | None: + mirror = mirror_rel_op(type(expr)) + + # Ignore unsupported expressions: + # - Those that are not relational operations + # - Those that don't have a mirror (just avoiding unexpected classes) + if not isinstance(expr, sympy.Rel) or mirror is None: + log.debug("expression with unsupported type: %s", type(expr)) + return None + + lhs_has_thing = expr.lhs.has(thing) + rhs_has_thing = expr.rhs.has(thing) + + # Give up when 'thing' appears on both sides of the relational expression. + # That is because, as is, we assume the thing we are trying to isolate is + # only on the right-hand side. + if lhs_has_thing and rhs_has_thing: + log.debug("thing (%s) found in both sides of expression: %s", thing, expr) + return None + + # Try considering both LHS and RHS by mirroring the original expression: + # a < b ==> b > a + expressions = [] + + # Add each version of 'expr' if 'thing' is in its left-hand side. + if lhs_has_thing: + expressions.append(expr) + if rhs_has_thing: + expressions.append(mirror(expr.rhs, expr.lhs)) + + for e in expressions: + if e is None: + continue + + if not isinstance(e, sympy.Rel): + raise AssertionError("expected sympy.Rel") + + for _ in range(trials): + trial = _try_isolate_lhs(e, thing, floordiv_inequality=floordiv_inequality) + # Stop if there was no change in this trial. + if trial == e: + break + e = trial # type: ignore[assignment] + + # Return if we were able to isolate 'thing' on the left-hand side. + if isinstance(e, sympy.Rel) and e.lhs == thing: + log.debug("solved: %s ---> %s", expr, e) + return e, e.rhs + + return None + + +def _try_isolate_lhs( + e: sympy.Basic, thing: sympy.Basic, floordiv_inequality: bool +) -> sympy.Basic: + op = type(e) + + if isinstance(e, sympy.Rel): + # Move any constants in the left-hand side to the right-hand side. + lhs_not_thing = ( + sum(a for a in e.lhs.args if not a.has(thing)) + if isinstance(e.lhs, sympy.Add) + else 0 + ) + e = op(e.lhs - lhs_not_thing, e.rhs - lhs_not_thing) # type: ignore[attr-defined] + + # Divide both sides by the factors that don't contain thing. + if isinstance(e, sympy.Rel) and isinstance(e.lhs, sympy.Mul): + lhs, rhs = e.args + other = sympy.Mul(*[a for a in lhs.args if not a.has(thing)]) + + # If we can't tell whether 'other' is negative or positive, we do nothing. + # That is because we don't know whether we have mirror the operation or not. + # We also divide only when we know 'rhs' is not zero. + if not (isinstance(e, INEQUALITY_TYPES) and other.is_negative is None) and not ( + not isinstance(e, INEQUALITY_TYPES) and rhs.is_zero + ): + # Divide both sides by 'other'. + lhs = lhs / other + rhs = rhs / other + + # If 'e' is an inequality and 'other' is negative, we have to + # mirror the expression. + if isinstance(e, INEQUALITY_TYPES) and other.is_negative: + op = mirror_rel_op(op) # type: ignore[assignment] + + if op is None: + raise AssertionError("expected op to be not None") + e = op(lhs, rhs) + + ################################################################################ + # left-hand side is FloorDiv + ################################################################################ + # + # Given the expression: a // b op c + # where 'op' is a relational operation, these rules only work if: + # - b > 0 + # - c is an integer + if ( + floordiv_inequality + and isinstance(e, sympy.Rel) + and isinstance(e.lhs, FloorDiv) + and e.lhs.divisor.is_positive + and e.rhs.is_integer + ): + # a // b == expr + # => a >= (b * expr) and a < (b * (expr + 1)) + if isinstance(e, sympy.Eq): + numerator, denominator = e.lhs.args + return sympy.And( + sympy.Ge(numerator, (e.rhs * denominator)), + sympy.Lt(numerator, ((e.rhs + 1) * denominator)), + ) + # a // b != expr + # => a < (b * expr) or a >= (b * (expr + 1)) + if isinstance(e, sympy.Ne): + numerator, denominator = e.lhs.args + return sympy.Or( + sympy.Lt(numerator, (e.rhs * denominator)), + sympy.Ge(numerator, ((e.rhs + 1) * denominator)), + ) + # The transformations below only work if b is positive. + # Note: we only have this information for constants. + # a // b > expr => a >= b * (expr + 1) + # a // b >= expr => a >= b * expr + if isinstance(e, (sympy.Gt, sympy.Ge)): + quotient = e.rhs if isinstance(e, sympy.Ge) else (e.rhs + 1) + return sympy.Ge(e.lhs.args[0], (quotient * e.lhs.args[1])) + # a // b < expr => a < b * expr + # a // b <= expr => a < b * (expr + 1) + if isinstance(e, (sympy.Lt, sympy.Le)): + quotient = e.rhs if isinstance(e, sympy.Lt) else (e.rhs + 1) + return sympy.Lt(e.lhs.args[0], (quotient * e.lhs.args[1])) + + return e diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_sympy/symbol.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_sympy/symbol.py new file mode 100644 index 0000000000000000000000000000000000000000..61a7c147458e03e2eaf1704a42335e357eb69be7 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_sympy/symbol.py @@ -0,0 +1,101 @@ +# mypy: allow-untyped-defs +""" +This file contains canonical definitions for our symbol naming conventions, +across torch.fx.experimental.symbolic_shapes and torch._inductor. The +intention is: + +1. To make it easily greppable where all the sites we use a prefix are +2. Make it possible to easily tell if we can introduce a new prefix without + introducing a conflict + +You can occasionally test if prefixes have been hardcoded by renaming prefixes +in this file and seeing what breaks. +""" + +from collections.abc import Iterable +from enum import auto, Enum + +import sympy + + +class SymT(Enum): + SIZE = auto() + FLOAT = auto() + UNBACKED_INT = auto() + UNBACKED_FLOAT = auto() + # Inductor: The intermediates in inner_fn tmp0, one generated per ops call. + # If one of these shows up in an indexing expression, that means an + # indirect load is happening. + TMP = auto() + # Inductor: Placeholder variable that is later replaced with TMP + INDIRECT = auto() + # Inductor: Some size expressions are replaced with a precomputed size ps0 + # which is computed host side, and then directly reused in the kernel, so + # we don't repeatedly recompute it on device. + PRECOMPUTED_SIZE = auto() + # Inductor: An indexing variable i0 in loops IR which ranges over non-reduced + # dim in the loop + INDEX = auto() + # Inductor: A reduction indexing (r0, r1) variables in loops IR which ranges over + # reduced dim(s) in the loop + R0_INDEX = auto() + R1_INDEX = auto() + # Inductor: In templated kernels torch._inductor.kernel, we have a hook to + # store the final output and append epilogue fusions. To do this, we must + # know what the indexes the outputs range over. NB: These will also + # advertise as INDEX, this is... probably OK? + TEMPLATE_INDEX = auto() + # Inductor: iteration domain for blockIdx.x/blockIdx.y + XBLOCK = auto() + YBLOCK = auto() + ZBLOCK = auto() + # Inductor: this is used solely for dynamic_reshape_indexer + VIEW = auto() + # Alternate (non-modular) indexing used in halide kernels + HALIDE = auto() + + +# Invariant: there must not be a prefix which is a prefix of another string, +# as this introduces ambiguity +prefix_str = { + SymT.SIZE: "s", # integer + SymT.UNBACKED_INT: "u", # integer + # Prefix z here is chosen to avoid false aliasing in symbol_is_type test + # DO NOT add a "z" type. You also need to avoid conflicts on these + # prefixes but this is somewhat easier to manage + SymT.FLOAT: "zf", + SymT.UNBACKED_FLOAT: "zuf", + SymT.TMP: "tmp", + SymT.PRECOMPUTED_SIZE: "ps", + SymT.INDEX: "i", + SymT.R0_INDEX: "r0_", + SymT.R1_INDEX: "r1_", + SymT.TEMPLATE_INDEX: "idx", + SymT.XBLOCK: "x", + SymT.YBLOCK: "y", + SymT.ZBLOCK: "z", + SymT.INDIRECT: "indirect", # false aliasing? + SymT.VIEW: "view", + SymT.HALIDE: "h", +} + + +def make_symbol(prefix: SymT, idx: int, **kwargs) -> sympy.Symbol: + # TODO: maybe put the assumptions here directly + return sympy.Symbol(f"{prefix_str[prefix]}{idx}", **kwargs) + + +# This type is a little wider than it should be, because free_symbols says +# that it contains Basic, rather than Symbol +def symbol_is_type(sym: sympy.Basic, prefix: SymT | Iterable[SymT]) -> bool: + if not isinstance(sym, sympy.Symbol): + raise AssertionError("expected sympy.Symbol") + name_str = sym.name.lower() # Match capitalized names like XBLOCK, RBLOCK + if isinstance(prefix, SymT): + return name_str.startswith(prefix_str[prefix]) + else: + return name_str.startswith(tuple(prefix_str[p] for p in prefix)) + + +def free_symbol_is_type(e: sympy.Expr, prefix: SymT | Iterable[SymT]) -> bool: + return any(symbol_is_type(v, prefix) for v in e.free_symbols) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_sympy/value_ranges.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_sympy/value_ranges.py new file mode 100644 index 0000000000000000000000000000000000000000..ddfd086a10aa7f023cef849b3da875a722d20505 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_sympy/value_ranges.py @@ -0,0 +1,1145 @@ +# mypy: allow-untyped-defs +from __future__ import annotations + +import dataclasses +import functools +import itertools +import logging +import math +import operator +from collections.abc import Callable +from typing import Generic, overload, SupportsFloat, TYPE_CHECKING, TypeGuard, TypeVar +from typing_extensions import TypeIs + +import sympy +from sympy.logic.boolalg import Boolean as SympyBoolean, BooleanAtom + +import torch +from torch._logging import LazyString +from torch._prims_common import dtype_to_type + +from .functions import ( + _keep_float, + FloatTrueDiv, + FloorDiv, + IntTrueDiv, + OpaqueUnaryFn_exp, + OpaqueUnaryFn_log, + OpaqueUnaryFn_log2, + OpaqueUnaryFn_sqrt, + PowByNatural, + RoundDecimal, + RoundToInt, + safe_pow, + ToFloat, + TruncToFloat, + TruncToInt, +) +from .interp import sympy_interp +from .numbers import int_oo, IntInfinity, NegativeIntInfinity + + +log = logging.getLogger(__name__) + +__all__ = ["ValueRanges", "bound_sympy"] + +_T = TypeVar("_T", sympy.Expr, SympyBoolean) + + +class ValueRangeError(RuntimeError): + pass + + +# Like sympify, but supports less stuff, and also ensures that direct +# sympy expressions don't have free variables +def simple_sympify(e): + if isinstance(e, bool): + return sympy.true if e else sympy.false + elif isinstance(e, int): + return sympy.Integer(e) + elif isinstance(e, float): + # infinity is special; we use it to bracket integers as well + if math.isinf(e): + return sympy.oo if e > 0 else -sympy.oo + return sympy.Float(e) + elif isinstance(e, sympy.Expr): + if not getattr(e, "is_number", False): + raise AssertionError(e) + # NaNs can occur when doing things like 0 * sympy.oo, but it is better + # if the operator notices this and takes care of it, because sometimes + # the NaN is inappropriate (for example, for ints, the [-oo, oo] range + # should go to zero when multiplied with [0, 0]) + if e == sympy.nan: + raise AssertionError("sympy expression is NaN") + return e + elif isinstance(e, BooleanAtom): + return e + else: + raise AssertionError(f"not simple sympy type {type(e)}: {e}") + + +# Sympy atomics only. Unlike <=, it also works on Sympy bools. +def sympy_generic_le(lower, upper): + if isinstance(lower, sympy.Expr): + if not isinstance(upper, sympy.Expr): + raise AssertionError( + "upper must be a sympy.Expr when lower is a sympy.Expr" + ) + # instead of lower <= upper, we do upper >= lower since upper is mostly int_oo + # and we have better code paths there. + return upper >= lower + else: + # only negative condition is True > False + if not isinstance(lower, SympyBoolean) or not isinstance(upper, SympyBoolean): + raise AssertionError((lower, upper)) + return not (lower and not upper) + + +def vr_is_bool(vr: ValueRanges[_T]) -> TypeGuard[ValueRanges[SympyBoolean]]: + return vr.is_bool + + +def vr_is_expr(vr: ValueRanges[_T]) -> TypeGuard[ValueRanges[sympy.Expr]]: + return not vr.is_bool + + +def is_sympy_integer(value) -> TypeIs[sympy.Integer]: + return isinstance(value, sympy.Integer) + + +ExprIn = int | float | sympy.Expr +BoolIn = bool | SympyBoolean +AllIn = ExprIn | BoolIn +ExprFn = Callable[[sympy.Expr], sympy.Expr] +ExprFn2 = Callable[[sympy.Expr, sympy.Expr], sympy.Expr] +BoolFn = Callable[[SympyBoolean], SympyBoolean] +BoolFn2 = Callable[[SympyBoolean, SympyBoolean], SympyBoolean] +AllFn = ExprFn | BoolFn +AllFn2 = ExprFn2 | BoolFn2 + + +@dataclasses.dataclass(frozen=True) +class ValueRanges(Generic[_T]): + if TYPE_CHECKING: + # ruff doesn't understand circular references but mypy does + # pyrefly: ignore [unbound-name] + ExprVR = ValueRanges[sympy.Expr] # noqa: F821 + # pyrefly: ignore [unbound-name] + BoolVR = ValueRanges[SympyBoolean] # noqa: F821 + AllVR = ExprVR | BoolVR + + # Although the type signature here suggests you can pass any + # sympy expression, in practice the analysis here only works + # with constant sympy expressions + lower: _T + upper: _T + is_bool: bool + is_int: bool + is_float: bool + + def __repr__(self) -> str: + return f"VR[{self.lower}, {self.upper}]" + + @overload + def __init__( + self: ValueRanges[sympy.Expr], + lower: ExprIn, + upper: ExprIn, + ) -> None: ... + + @overload + def __init__( # type: ignore[misc] + self: ValueRanges[SympyBoolean], + lower: BoolIn, + upper: BoolIn, + ) -> None: ... + + def __init__(self, lower: AllIn, upper: AllIn) -> None: + lower = simple_sympify(lower) + upper = simple_sympify(upper) + # TODO: when the bounds have free variables, this may be + # nontrivial to actually verify + try: + if not sympy_generic_le(lower, upper): + raise ValueRangeError(f"Invalid ranges [{lower}:{upper}]") + except TypeError as e: + raise TypeError(f"Could not compare {lower} <= {upper}") from e + + is_bool_lower = isinstance(lower, SympyBoolean) + is_bool_upper = isinstance(upper, SympyBoolean) + if is_bool_lower != is_bool_upper: + raise AssertionError((lower, upper)) + + # Warning: is_int/is_float is best effort. We do pretty well in + # Dynamo, but in Inductor these attributes are often wrong because we + # are not very rigorous in dtype analysis. This is also why we need + # the flexible analysis for is_int: sometimes a sympy.oo pops in for + # an integer bound. I would /like/ for us not to do this, but it's + # too hard to push the invariant through right now. + if isinstance(lower, sympy.Integer) and upper == sympy.oo: + upper = int_oo + if isinstance(upper, sympy.Integer) and lower == -sympy.oo: + lower = -int_oo + # NB: [-int_oo, -int_oo] and [int_oo, int_oo] are allowed + integer_types = (sympy.Integer, NegativeIntInfinity, IntInfinity) + is_int_lower = isinstance(lower, integer_types) + is_int_upper = isinstance(upper, integer_types) + + # Because this is a frozen class + object.__setattr__(self, "lower", lower) + object.__setattr__(self, "upper", upper) + # Unlike bool/int in Python, we don't report bools are ints + # + # NB: is_bool_lower == is_bool_upper, so we only need to check one + object.__setattr__(self, "is_bool", is_bool_lower) + object.__setattr__( + self, + "is_int", + not self.is_bool and is_int_lower and is_int_upper, + ) + """ + # This assert is just impossible right now, too many sympy bugs + if self.is_int: + # NB: sympy will sometimes randomly lose the float-ness of zero, + # so we also need to account for that in the assertion here. + # See also https://github.com/sympy/sympy/issues/26620 + assert isinstance(lower, sympy.Integer) or lower in [-sympy.oo, 0], ( + lower, + upper, + ) + assert isinstance(upper, sympy.Integer) or upper in [sympy.oo, 0], (lower, upper) + """ + # NB: [-oo, oo] always advertises as float! + object.__setattr__(self, "is_float", not self.is_bool and not self.is_int) + if not self.is_bool and not self.is_int and not self.is_float: + raise AssertionError((lower, upper)) + + def boolify(self) -> ValueRanges[SympyBoolean]: + if vr_is_bool(self): + return self + elif self == ValueRanges.unknown(): + return ValueRanges.unknown_bool() + else: + raise AssertionError(f"not bool like {self}") + + def __contains__(self, x: AllIn) -> bool: + return ValueRanges.wrap(x).issubset(self) + + def issubset(self, other): + if other is self.unknown_int(): + return True + return sympy_generic_le(other.lower, self.lower) and sympy_generic_le( + self.upper, other.upper + ) + + def tighten(self, other) -> ValueRanges: + """Given two ValueRanges, returns their intersection""" + return self & other + + # Intersection + @overload + def __and__( + self: ValueRanges[sympy.Expr], + other: ValueRanges[sympy.Expr], + ) -> ValueRanges[sympy.Expr]: ... + + @overload + def __and__( # type: ignore[misc] + self: ValueRanges[SympyBoolean], + other: ValueRanges[SympyBoolean], + ) -> ValueRanges[SympyBoolean]: ... + + def __and__(self: AllVR, other: AllVR) -> AllVR: + if other in (ValueRanges.unknown(), ValueRanges.unknown_int()): + return self + if self in (ValueRanges.unknown(), ValueRanges.unknown_int()): + return other + if self.is_bool != other.is_bool: + raise AssertionError((self, other)) + if self.is_int != other.is_int: + raise AssertionError((self, other)) + if self.is_float != other.is_float: + raise AssertionError((self, other)) + if self.is_bool: + return ValueRanges( + sympy.Or(self.lower, other.lower), sympy.And(self.upper, other.upper) + ) + else: + return ValueRanges( + sympy.Max(self.lower, other.lower), sympy.Min(self.upper, other.upper) + ) + + # Union + @overload + def __or__( + self: ValueRanges[sympy.Expr], + other: ValueRanges[sympy.Expr], + ) -> ValueRanges[sympy.Expr]: ... + + @overload + def __or__( # type: ignore[misc] + self: ValueRanges[SympyBoolean], + other: ValueRanges[SympyBoolean], + ) -> ValueRanges[SympyBoolean]: ... + + def __or__(self: AllVR, other: AllVR) -> AllVR: + if ValueRanges.unknown() in (self, other): + return ValueRanges.unknown() + if self.is_bool != other.is_bool: + raise AssertionError((self, other)) + if self.is_int != other.is_int: + raise AssertionError((self, other)) + if self.is_float != other.is_float: + raise AssertionError((self, other)) + if self.is_bool: + return ValueRanges( + sympy.And(self.lower, other.lower), sympy.Or(self.upper, other.upper) + ) + else: + return ValueRanges( + sympy.Min(self.lower, other.lower), sympy.Max(self.upper, other.upper) + ) + + def is_singleton(self) -> bool: + return self.lower == self.upper + + @staticmethod + @functools.cache + def unknown() -> ValueRanges[sympy.Expr]: + return ValueRanges(-sympy.oo, sympy.oo) + + @staticmethod + @functools.cache + def unknown_int() -> ValueRanges[sympy.Expr]: + return ValueRanges(-int_oo, int_oo) + + @staticmethod + @functools.cache + def unknown_bool() -> ValueRanges[SympyBoolean]: + return ValueRanges(sympy.false, sympy.true) + + @overload + @staticmethod + # work around the fact that bool and int overlap + def wrap(arg: ExprIn | ExprVR) -> ExprVR: # type: ignore[overload-overlap] + ... + + @overload + @staticmethod + def wrap(arg: BoolIn | BoolVR) -> BoolVR: # type: ignore[misc] + ... + + @staticmethod + def wrap(arg: AllIn | AllVR) -> AllVR: + if isinstance(arg, ValueRanges): + return arg + if isinstance(arg, float) and math.isnan(arg): + return ValueRanges.unknown() + # arg is either ExprIn or BoolIn, but we don't know it here + return ValueRanges(arg, arg) # type: ignore[arg-type] + + @staticmethod + def increasing_map(x: ExprIn | ExprVR, fn: ExprFn) -> ExprVR: + """Increasing: x <= y => f(x) <= f(y).""" + x = ValueRanges.wrap(x) + return ValueRanges(fn(x.lower), fn(x.upper)) + + @overload + @staticmethod + def decreasing_map(x: ExprIn | ExprVR, fn: ExprFn) -> ExprVR: ... + + @overload + @staticmethod + def decreasing_map(x: BoolIn | BoolVR, fn: BoolFn) -> BoolVR: # type: ignore[misc] + ... + + @staticmethod + def decreasing_map(x: AllIn | AllVR, fn: AllFn) -> AllVR: + """Decreasing: x <= y => f(x) >= f(y).""" + x = ValueRanges.wrap(x) + # consistently either Expr or Bool, but we don't know it here + return ValueRanges(fn(x.upper), fn(x.lower)) # type: ignore[arg-type] + + @staticmethod + def monotone_map(x: ExprIn | ExprVR, fn: ExprFn) -> ExprVR: + """It's increasing or decreasing.""" + x = ValueRanges.wrap(x) + l = fn(x.lower) + u = fn(x.upper) + return ValueRanges(min(l, u), max(l, u)) + + @staticmethod + def convex_min_zero_map(x: ExprIn | ExprVR, fn: ExprFn) -> ExprVR: + """Fn is convex and has a minimum at 0.""" + x = ValueRanges.wrap(x) + if 0 in x: + upper = max(fn(x.lower), fn(x.upper)) + upper = simple_sympify(upper) + if isinstance(upper, sympy.Float) or upper == sympy.oo: + return ValueRanges(0.0, upper) + return ValueRanges(0, upper) + return ValueRanges.monotone_map(x, fn) + + @overload + @staticmethod + def coordinatewise_increasing_map( + x: ExprIn | ExprVR, + y: ExprIn | ExprVR, + fn: ExprFn2, + ) -> ExprVR: ... + + @overload + @staticmethod + def coordinatewise_increasing_map( # type: ignore[misc] + x: BoolIn | BoolVR, + y: BoolIn | BoolVR, + fn: BoolFn2, + ) -> BoolVR: ... + + @staticmethod + def coordinatewise_increasing_map( + x: AllIn | AllVR, + y: AllIn | AllVR, + fn: AllFn2, + ) -> AllVR: + """ + It's increasing on each coordinate. + + Mathematically: + For every 1 <= i <= n and x_i <= y_i we have that + f(x1, .., xn) <= f(x1, , yi, ..., xn) + """ + x, y = ValueRanges.wrap(x), ValueRanges.wrap(y) + return ValueRanges( + fn(x.lower, y.lower), # type: ignore[arg-type] + fn(x.upper, y.upper), # type: ignore[arg-type] + ) + + @classmethod + def coordinatewise_monotone_map(cls, x, y, fn): + """It's increasing or decreasing on each coordinate.""" + x, y = cls.wrap(x), cls.wrap(y) + products = [ + fn(a, b) + for a, b in itertools.product([x.lower, x.upper], [y.lower, y.upper]) + ] + return ValueRanges(min(products), max(products)) + + +class SymPyValueRangeAnalysis: + """ + It gives bounds on a SymPy operator given bounds on its arguments + See the function `bound_sympy` for a function that applies this logic to a full SymPy expression + """ + + @staticmethod + def constant(value, dtype): + if isinstance(value, ValueRanges): + if not value.is_singleton(): + raise AssertionError("ValueRanges must be a singleton for constant()") + value = value.lower + # NB: value is NOT a sympy expression, it's a constant! + is_python = isinstance(value, (int, float, bool)) + if not is_python and not isinstance( + value, (BooleanAtom, sympy.Integer, sympy.Number) + ): + raise AssertionError(f"not a supported constant type: {type(value)}") + + # using nan makes subsequent computation throw, and for the purposes of optimization + # returning -math.inf - math.inf is equivalent to giving up + if isinstance(value, SupportsFloat) and math.isnan(value): + if dtype == torch.bool: + return ValueRanges.unknown_bool() + elif dtype.is_floating_point: + return ValueRanges.unknown() + else: + return ValueRanges.unknown_int() + + if is_python: + type_ = dtype_to_type(dtype) + value = type_(value) + else: + # We do a type check on a best-effort basis + # We don't want to force a cast to sympy.Float if the value is Rational to avoid losing precision + if dtype == torch.bool: + if not isinstance(value, BooleanAtom): + raise AssertionError("expected BooleanAtom for bool dtype") + elif dtype.is_floating_point: + if value.is_finite and not value.is_real: + raise AssertionError( + "expected float-like sympy value for float dtype" + ) + else: + # dtype is intXX + if not getattr(value, "is_integer", False): + raise AssertionError("expected integer sympy value for int dtype") + + r = ValueRanges.wrap(value) + return r + + @staticmethod + def to_dtype(a, dtype, src_dtype=None): + if dtype == torch.float64: + # pyrefly: ignore [bad-argument-type] + return ValueRanges.increasing_map(a, ToFloat) + elif dtype == torch.bool: + return ValueRanges.unknown_bool() + elif not dtype.is_floating_point: + return ValueRanges.unknown_int() + return ValueRanges.unknown() + + @staticmethod + def trunc_to_int(a, dtype): + # pyrefly: ignore [bad-argument-type] + return ValueRanges.increasing_map(a, TruncToInt) + + @staticmethod + def not_(a): + a = ValueRanges.wrap(a) + a = a.boolify() + if not a.is_bool: + raise AssertionError("not_ expects a boolean ValueRanges") + return ValueRanges.decreasing_map(a, sympy.Not) + + @staticmethod + def or_(a, b): + return ValueRanges.coordinatewise_increasing_map(a, b, sympy.Or) + + @staticmethod + def and_(a, b): + return ValueRanges.coordinatewise_increasing_map(a, b, sympy.And) + + @staticmethod + def _bool_to_int(x): + if x.is_singleton(): + return ValueRanges.wrap(sympy.Integer(1 if x.lower else 0)) + else: + return ValueRanges(sympy.Integer(0), sympy.Integer(1)) + + @classmethod + def bitwise_and(cls, a, b): + a, b = ValueRanges.wrap(a), ValueRanges.wrap(b) + if a.is_bool and b.is_bool: + return cls.and_(a, b) + if a.is_bool: + a = cls._bool_to_int(a) + if b.is_bool: + b = cls._bool_to_int(b) + lower = min(a.lower, b.lower) + if lower < 0 and lower != -sympy.oo and lower != -int_oo: + # If both lower bounds are negative, then bits start like + # 1...10..., so the smallest possible value is 1...101...1. + # Thus, we need to find the next smallest power of 2 (inclusive). + try: + lower = -(1 << int(-lower - 1).bit_length()) + except Exception: + lower = -int_oo + else: + lower = 0 + return ValueRanges(lower, max(a.upper, b.upper)) + + @classmethod + def bitwise_or(cls, a, b): + a, b = ValueRanges.wrap(a), ValueRanges.wrap(b) + if a.is_bool and b.is_bool: + return cls.or_(a, b) + if a.is_bool: + a = cls._bool_to_int(a) + if b.is_bool: + b = cls._bool_to_int(b) + upper = max(a.upper, b.upper) + if upper == 0: + upper = 0 + elif upper > 0 and upper != sympy.oo and upper != int_oo: + # If both upper bounds are positive, then the largest + # possible value is 01...1, so we need to find + # next largest power of 2 (exclusive), minus 1 + try: + upper = (1 << int(upper).bit_length()) - 1 + except Exception: + upper = int_oo + elif upper < 0: + upper = -1 + return ValueRanges(min(a.lower, b.lower), upper) + + @classmethod + def bitwise_xor(cls, a, b): + a, b = ValueRanges.wrap(a), ValueRanges.wrap(b) + if a.is_bool and b.is_bool: + bounds = { + a.lower ^ b.lower, + a.lower ^ b.upper, + a.upper ^ b.lower, + a.upper ^ b.upper, + } + + has_false = any(bound == sympy.false for bound in bounds) + has_true = any(bound == sympy.true for bound in bounds) + + if has_false and has_true: + lower, upper = sympy.false, sympy.true + elif has_true: + lower = upper = sympy.true + elif has_false: + lower = upper = sympy.false + else: + raise AssertionError(f"Non-boolean xor result: {bounds}") + + return ValueRanges(lower, upper) + if a.is_bool: + a = cls._bool_to_int(a) + if b.is_bool: + b = cls._bool_to_int(b) + if ( + a.lower == a.upper + and b.lower == b.upper + and is_sympy_integer(a.lower) + and is_sympy_integer(b.lower) + ): + value_range = a.lower ^ b.lower + return ValueRanges(value_range, value_range) + return ValueRanges(-int_oo, int_oo) + + @staticmethod + def eq(a, b): + a = ValueRanges.wrap(a) + b = ValueRanges.wrap(b) + if a.is_singleton() and b.is_singleton() and a.lower == b.lower: + return ValueRanges.wrap(sympy.true) + elif a.lower > b.upper or b.lower > a.upper: # ranges disjoint + return ValueRanges.wrap(sympy.false) + return ValueRanges(sympy.false, sympy.true) + + @classmethod + def ne(cls, a, b): + return cls.not_(cls.eq(a, b)) + + @classmethod + def identity(cls, a): + return ValueRanges.wrap(a) + + @classmethod + def lt(cls, a, b): + a = ValueRanges.wrap(a) + b = ValueRanges.wrap(b) + if a.is_bool != b.is_bool: + raise AssertionError( + "operands must both be boolean ValueRanges or both non-boolean" + ) + if a.is_bool: + return cls.and_(cls.not_(a), b) + else: + if a.upper < b.lower: + return ValueRanges.wrap(sympy.true) + elif a.lower >= b.upper: + return ValueRanges.wrap(sympy.false) + return ValueRanges(sympy.false, sympy.true) + + @classmethod + def gt(cls, a, b): + return cls.lt(b, a) + + @classmethod + def le(cls, a, b): + return cls.not_(cls.gt(a, b)) + + @classmethod + def ge(cls, a, b): + return cls.not_(cls.lt(a, b)) + + @staticmethod + def add(a, b): + return ValueRanges.coordinatewise_increasing_map( + a, b, _keep_float(operator.add) + ) + + @classmethod + def mul(cls, a, b): + a = ValueRanges.wrap(a) + b = ValueRanges.wrap(b) + + if a.is_bool != b.is_bool: + raise AssertionError( + "operands must both be boolean ValueRanges or both non-boolean" + ) + if a.is_bool: + return cls.and_(a, b) + + def safe_mul(a, b): + # Make unknown() * wrap(0.0) == wrap(0.0) + if a == 0.0 or a == 0: + return a + elif b == 0.0 or b == 0: + return b + else: + return a * b + + return ValueRanges.coordinatewise_monotone_map(a, b, _keep_float(safe_mul)) + + @staticmethod + def int_truediv(a, b): + a = ValueRanges.wrap(a) + b = ValueRanges.wrap(b) + if 0 in b or ((-int_oo in a or int_oo in a) and (-int_oo in b or int_oo in b)): + return ValueRanges.unknown() + else: + return ValueRanges.coordinatewise_monotone_map( + a, + b, + # pyrefly: ignore [bad-argument-type] + _keep_float(IntTrueDiv), + ) + + @staticmethod + def truediv(a, b): + a = ValueRanges.wrap(a) + b = ValueRanges.wrap(b) + if 0 in b or ( + (-sympy.oo in a or sympy.oo in a) and (-sympy.oo in b or sympy.oo in b) + ): + return ValueRanges.unknown() + else: + return ValueRanges.coordinatewise_monotone_map( + a, + b, + # pyrefly: ignore [bad-argument-type] + _keep_float(FloatTrueDiv), + ) + + @staticmethod + def floordiv(a, b): + a = ValueRanges.wrap(a) + b = ValueRanges.wrap(b) + + # TODO We shall assume division is always valid probably. + if 0 in b: + if b.lower >= 0 and a.lower >= 0: + return ValueRanges(0, int_oo) + if b.upper <= 0 and a.upper <= 0: + return ValueRanges(0, int_oo) + if b.upper <= 0 and a.lower >= 0: + return ValueRanges(-int_oo, 0) + if b.lower >= 0 and a.upper <= 0: + return ValueRanges(-int_oo, 0) + return ValueRanges.unknown_int() + products = [] + for x, y in itertools.product([a.lower, a.upper], [b.lower, b.upper]): + r = FloorDiv(x, y) + if r is sympy.nan: + products.append((sympy.sign(x) * sympy.sign(y)) * int_oo) + else: + products.append(r) + + return ValueRanges(min(products), max(products)) + + @classmethod + def mod(cls, x, y): + x = ValueRanges.wrap(x) + y = ValueRanges.wrap(y) + # nb. We implement C semantics + + def c_mod(a, b): + ret = abs(a) % abs(b) + if a < 0: + ret *= -1 + return ret + + def c_div(a, b): + x = a / b + return sympy.Integer(x) if x.is_finite and x not in (int_oo, -int_oo) else x + + if 0 in y: + return ValueRanges.unknown_int() + elif y.is_singleton(): + y_val = abs(y.lower) + # If it wraps, we need to take the whole interval + + # The function is locally linear if they are in the same class + if c_div(x.lower, y_val) == c_div(x.upper, y_val): + return ValueRanges.increasing_map(x, lambda u: c_mod(u, y_val)) + if x.upper < 0: + # Negative case + return ValueRanges(-y_val + 1, 0) + elif x.lower > 0: + # Positive case + return ValueRanges(0, y_val - 1) + else: + # Mixed case + lower = max(-y_val + 1, x.lower) + upper = min(y_val - 1, x.upper) + return ValueRanges(lower, upper) + else: + # Too difficult, we bail out + upper = cls.abs(y).upper - 1 + return ValueRanges(-upper, upper) + + @classmethod + def python_mod(cls, x, y): + """Python-style modulo: result has same sign as divisor. + + Assumes valid input where y is never 0. + - When y > 0: result is in [0, y - 1] + - When y < 0: result is in [y + 1, 0] + """ + + x = ValueRanges.wrap(x) + y = ValueRanges.wrap(y) + if x.lower >= 0 and y.lower >= 0: + return SymPyValueRangeAnalysis.mod(x, y) + lower = y.lower + 1 if y.lower < 0 else 0 + upper = y.upper - 1 if y.upper > 0 else 0 + return ValueRanges(lower, upper) + + @classmethod + def modular_indexing(cls, a, b, c): + return cls.mod(cls.floordiv(a, b), c) + + @classmethod + def is_non_overlapping_and_dense_indicator(cls, *args): + return ValueRanges.unknown_int() + + @classmethod + def pow_by_natural(cls, a, b): + a = ValueRanges.wrap(a) + b = ValueRanges.wrap(b) + if a.is_singleton() and b.is_singleton(): + return ValueRanges.wrap(safe_pow(a.lower, b.lower)) + # NB: Exclude zero, because zero is special + elif a.lower >= 1: + # We should know that b >= 0 but we may have forgotten this fact due + # to replacements, so don't assert it, but DO clamp it to prevent + # degenerate problems + # pyrefly: ignore [no-matching-overload] + return ValueRanges.coordinatewise_increasing_map( + a, b & ValueRanges(0, int_oo), PowByNatural + ) + elif b.is_singleton(): + if b.lower % 2 == 0: + # x^n where n is even + return ValueRanges.convex_min_zero_map( + a, lambda x: safe_pow(x, b.lower) + ) + else: + # x^n where n is odd + return ValueRanges.increasing_map(a, lambda x: safe_pow(x, b.lower)) + else: + # a is potentially negative, and we don't know if the exponent is + # even or odd. So just conservatively set the upper and lower + # bound based on what the maximum absolute value could be, in both + # directions + max_base = max(a.upper, -a.lower) + return ValueRanges( + -(safe_pow(max_base, b.upper)), safe_pow(max_base, b.upper) + ) + + @classmethod + def pow(cls, a, b): + return ValueRanges.unknown() + + # We could implement all this, but for floating point pow, is there + # really a point? + """ + a = ValueRanges.wrap(a) + b = ValueRanges.wrap(b) + + # Not implemented yet. It's a bit tricky + # If you want to implement it, compute the partial derivatives of a ** b + # and check the ranges where the function is increasing / decreasing + # Another non-tight way of doing this is defaulting to doing noting that for a > 0, a ** b == exp(b * log(a)) + # If this second option is implemented, by carefult about the types and possible infinities here and there. + if not b.is_singleton(): + return ValueRanges.unknown() + + b = b.lower + if a.is_singleton(): + a = a.lower + r = a**b + if not r.is_finite: + return ValueRanges.unknown() + return ValueRanges.wrap(r) + + if b == 0: + if not a.lower.is_finite: + return ValueRanges.unknown() + return ValueRanges.wrap(1.0) + + if b < 0: + a = cls.reciprocal(a) + b = -b + + if a == ValueRanges.unknown(): + return ValueRanges.unknown() + + # If the base is positive, then we're good, otherwise nothing's defined + if a.lower >= 0: + return ValueRanges.increasing_map(a, lambda x: x**b) + else: + return ValueRanges.unknown() + """ + + @staticmethod + def reciprocal(x): + """Needed as it's used in pow, but it won't appear on a SymPy expression""" + x = ValueRanges.wrap(x) + if 0 in x: + return ValueRanges.unknown() + else: + return ValueRanges.decreasing_map(x, lambda y: FloatTrueDiv(1.0, y)) # type: ignore[operator] + + @staticmethod + def abs(x): + return ValueRanges.convex_min_zero_map(x, abs) + + @staticmethod + def exp(x): + return ValueRanges.increasing_map(x, OpaqueUnaryFn_exp) + + @staticmethod + def log(x): + x = ValueRanges.wrap(x) + if x.lower <= 0: + return ValueRanges.unknown() + return ValueRanges.increasing_map(x, OpaqueUnaryFn_log) + + @staticmethod + def log2(x): + x = ValueRanges.wrap(x) + if x.lower <= 0: + return ValueRanges.unknown() + return ValueRanges.increasing_map(x, OpaqueUnaryFn_log2) + + @classmethod + def minimum(cls, a, b): + return cls.min_or_max(a, b, sympy.Min) + + @classmethod + def maximum(cls, a, b): + return cls.min_or_max(a, b, sympy.Max) + + @staticmethod + def min_or_max(a, b, fn): + a = ValueRanges.wrap(a) + b = ValueRanges.wrap(b) + return ValueRanges.coordinatewise_increasing_map(a, b, fn) + + @classmethod + def floor_to_int(cls, x, dtype): + return ValueRanges.increasing_map(x, sympy.functions.elementary.integers.floor) + + @classmethod + def ceil_to_int(cls, x, dtype): + return ValueRanges.increasing_map( + x, sympy.functions.elementary.integers.ceiling + ) + + # I think these implementations are sound. The hazard here is that sympy + # will carry out the floor/ceil at too high precision and then something + # bad will happen when we convert it to float. + # + # For truncation, the implementation is clearly sound, because the desired + # target float is always exactly representable, since you're just chopping + # off bits the mantissa. But what about ceil/floor? + # + # The important constraint here is that we're not defining floor on + # arbitrary real numbers, only representable float numbers. So we can + # take advantage of the fact that before we reach the first + # unrepresentable integer in floating point space, we have the range of + # numbers corresponding to exponent zero: all integers, with no fractional + # amounts. floor/ceil is an identity operation in this case. In the + # range below here, representable floating point numbers are spaced + # exactly 1/2 apart, and notably, both the floor/ceil are defined floating + # point numbers. There is no "gap" as you step up to the next exponent. + + @classmethod + def floor(cls, x): + return ValueRanges.increasing_map( + x, _keep_float(sympy.functions.elementary.integers.floor) + ) + + @classmethod + def ceil(cls, x): + return ValueRanges.increasing_map( + x, _keep_float(sympy.functions.elementary.integers.ceiling) + ) + + @classmethod + def round_decimal(cls, number, ndigits): + if not ndigits.is_singleton(): + return ValueRanges.unknown() + + ndigits = ndigits.lower + # We can't use functools.partial here since sympy doesn't support keyword arguments, but we have to bind + # the second parameter. + fn = lambda number: RoundDecimal(number, ndigits) # type: ignore[misc, assignment] # noqa: E731 + + return ValueRanges.increasing_map(number, fn) + + @classmethod + def round_to_int(cls, number, dtype): + # pyrefly: ignore [bad-argument-type] + return ValueRanges.increasing_map(number, RoundToInt) + + # It's used in some models on symints + @staticmethod + def sqrt(x): + x = ValueRanges.wrap(x) + if x.lower < 0: + return ValueRanges.unknown() + return ValueRanges.increasing_map(x, OpaqueUnaryFn_sqrt) + + @staticmethod + def where(a, b, c): + b = ValueRanges.wrap(b) + c = ValueRanges.wrap(c) + a = a.boolify() + # We sometimes write unknown without specifying the type correctly + # In particular, we do that when initialising the bounds for loads in bounds.py + if b.is_bool != c.is_bool and ValueRanges.unknown() not in (b, c): + raise AssertionError( + "where() requires b and c to have the same boolean-ness or allow unknown()" + ) + if b.is_bool: + return ValueRanges(sympy.And(b.lower, c.lower), sympy.Or(b.upper, c.upper)) + else: + return ValueRanges(sympy.Min(b.lower, c.lower), sympy.Max(b.upper, c.upper)) + + # expr_cond_pair is used to represent a single (expr, condition) pair in piecewise. + # We just return the value range of the expression and its corresponding condition as a tuple + # and defer the analysis to piecewise + @staticmethod + def expr_cond_pair(a, b): + b = b.boolify() + return (a, b) + + # piecewise function can be used to convert a SymBool to SymInt: + # int_expr = Piecewise((1, bool_expr), (0, True)), it evaluates to 1 when sym_bool is True and 0 otherwise. + # + # ranges is a sequence of (expr_range, condition_range) pairs. The range pair is constructed in expr_cond_pair. + # The ValueRange of Piecewise is just the union of all expr ranges whose condition expr can be True. + @staticmethod + def piecewise(*ranges): + init_range = None + for expr_range, cond_range in ranges: + if sympy.true in cond_range: + if init_range is None: + init_range = expr_range + else: + init_range = init_range | expr_range + return init_range + + @staticmethod + def cos(x): + # TODO: We should tighten value ranges + # If input range span is pi + 2*pi*k, then output range is (-1, 1) + # otherwise the minimum of the value of the function on the extremes + return ValueRanges(-1.0, 1.0) + + @staticmethod + def cosh(x): + return ValueRanges(0.0, sympy.oo) + """ + x = ValueRanges.wrap(x) + if x.lower > 0: + return ValueRanges.increasing_map(x, OpaqueUnaryFn_cosh) + elif x.upper < 0: + return ValueRanges.decreasing_map(x, OpaqueUnaryFn_cosh) + return ValueRanges(0.0, sympy.oo) + """ + + @staticmethod + def sin(x): + # TODO: We should tighten value ranges + # See details on cos + return ValueRanges(-1.0, 1.0) + + @staticmethod + def sinh(x): + # return ValueRanges.increasing_map(x, OpaqueUnaryFn_sinh) + return ValueRanges(-sympy.oo, sympy.oo) + + @staticmethod + def tan(x): + return ValueRanges(-sympy.oo, sympy.oo) + + @staticmethod + def tanh(x): + # return ValueRanges.increasing_map(x, OpaqueUnaryFn_tanh) + return ValueRanges(-sympy.oo, sympy.oo) + + @staticmethod + def asin(x): + return ValueRanges(-sympy.oo, sympy.oo) + """ + x = ValueRanges.wrap(x) + if -1 <= x.lower and x.upper <= 1: + return ValueRanges.increasing_map(x, OpaqueUnaryFn_asinh) + return ValueRanges.unknown() + """ + + @staticmethod + def acos(x): + return ValueRanges(-sympy.oo, sympy.oo) + """ + x = ValueRanges.wrap(x) + if -1 <= x.lower and x.upper <= 1: + return ValueRanges.decreasing_map(x, OpaqueUnaryFn_acos) + return ValueRanges.unknown() + """ + + @staticmethod + def atan(x): + return ValueRanges(-sympy.oo, sympy.oo) + # return ValueRanges.increasing_map(x, OpaqueUnaryFn_atan) + + @staticmethod + def trunc(x): + # pyrefly: ignore [bad-argument-type] + return ValueRanges.increasing_map(x, TruncToFloat) + + +def bound_sympy( + expr: sympy.Expr, ranges: dict[sympy.Symbol, ValueRanges] | None = None +) -> ValueRanges: + log.debug( + "bound_sympy(%s)%s", + expr, + LazyString( + lambda: ( + "\n" + + "\n".join( + f" {k}: {r}" for k, r in ranges.items() if k in expr.free_symbols + ) + if ranges + else "" + ) + ), + ) + if isinstance(expr, sympy.Number): + return ValueRanges.wrap(expr) + + ranges = ranges or {} + + # If there's a tracing context, augment available constrained ranges. + context = torch._guards.TracingContext.try_get() + if context and context.fake_mode and context.fake_mode.shape_env: + if ranges: + ranges = {**context.fake_mode.shape_env.var_to_range, **ranges} + else: + ranges = context.fake_mode.shape_env.var_to_range + + def missing_handler(s): + if s.is_integer: # type: ignore[attr-defined] + if s.is_positive: # type: ignore[attr-defined] + vr = ValueRanges(1, int_oo) + elif s.is_nonnegative: # type: ignore[attr-defined] + vr = ValueRanges(0, int_oo) + else: + vr = ValueRanges.unknown_int() + else: + # Don't bother trying very hard here + vr = ValueRanges.unknown() + return vr + + return sympy_interp( + SymPyValueRangeAnalysis, ranges, expr, missing_handler=missing_handler + ) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_thunk.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_thunk.py new file mode 100644 index 0000000000000000000000000000000000000000..b5ab598077f4e8d3d9de9169a1352918771f07f6 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_thunk.py @@ -0,0 +1,29 @@ +from collections.abc import Callable +from typing import Generic, TypeVar + + +R = TypeVar("R") + + +class Thunk(Generic[R]): + """ + A simple lazy evaluation implementation that lets you delay + execution of a function. It properly handles releasing the + function once it is forced. + """ + + f: Callable[[], R] | None + r: R | None + + __slots__ = ["f", "r"] + + def __init__(self, f: Callable[[], R]) -> None: + self.f = f + self.r = None + + def force(self) -> R: + if self.f is None: + return self.r # type: ignore[return-value] + self.r = self.f() + self.f = None + return self.r diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_traceback.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_traceback.py new file mode 100644 index 0000000000000000000000000000000000000000..f5415002092a23350f7d7d3436388d34b1eb9501 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_traceback.py @@ -0,0 +1,260 @@ +# mypy: allow-untyped-defs +import contextlib +import inspect +import os.path +import tempfile +import traceback +from types import TracebackType + + +# This file contains utilities for ensuring dynamically compile()'d +# code fragments display their line numbers in backtraces. +# +# The constraints: +# +# - We don't have control over the user exception printer (in particular, +# we cannot assume the linecache trick will work, c.f. +# https://stackoverflow.com/q/50515651/23845 ) +# +# - We don't want to create temporary files every time we compile() +# some code; file creation should happen lazily only at exception +# time. Arguably, you *should* be willing to write out your +# generated Python code to file system, but in some situations +# (esp. library code) it would violate user expectation to write +# to the file system, so we try to avoid it. In particular, we'd +# like to keep the files around, so users can open up the files +# mentioned in the trace; if the file is invisible, we want to +# avoid clogging up the filesystem. +# +# If this is not a constraint for you, there is a substantially simpler +# way to implement the functionality in this PR: instead of using +# eval/exec directly, just always write a Python file to filesystem +# and compile that. +# +# - You have control over a context where the compiled code will get +# executed, so that we can interpose while the stack is unwinding +# (otherwise, we have no way to interpose on the exception printing +# process.) +# +# There are two things you have to do to make use of the utilities here: +# +# - When you compile your source code, you must save its string source +# in its f_globals under the magic name "__compile_source__" +# +# - Before running the compiled code, enter the +# report_compile_source_on_error() context manager. + + +@contextlib.contextmanager +def report_compile_source_on_error(): + try: + yield + except Exception as exc: + tb = exc.__traceback__ + + # Walk the traceback, looking for frames that have + # source attached + stack = [] + while tb is not None: + filename = tb.tb_frame.f_code.co_filename + source = tb.tb_frame.f_globals.get("__compile_source__") + + if filename == "" and source is not None: + # What black magic are we doing here? Intuitively, what + # we would like to do is overwrite the co_filename on any + # frames that were generated from exec/eval so that they + # point to a temporary file that has the actual line + # information, so Python's default error printer can print + # useful line information on it. + # + # Writing out the temporary file is easy. But overwriting + # co_filename is not! You can't modify the code object + # associated with a frame. You can, however, reconstruct + # a traceback with entirely new frames from scratch, so that's + # what we do. But there's another problem, which is how to + # make the frame? + # + # The black magic is we make a frankenstein frame and code + # object which resembles the original frame/code enough so + # that it will print properly under traceback and the default + # error printer, but IT IS NOT THE ORIGINAL FRAME (you + # couldn't, e.g., execute its code with different variables + # and expect it to work.) + + # Don't delete the temporary file so the user can inspect it + # TODO: This creates a temporary file for every frame, but we + # technically only need one per distinct __compile_source__ + with tempfile.NamedTemporaryFile( + mode="w", delete=False, suffix=".py" + ) as f: + f.write(source) + # Create a frame. Python doesn't let you construct + # FrameType directly, so just make one with compile + frame = tb.tb_frame + code = compile("__inspect_currentframe()", f.name, "eval") + code = code.replace(co_name=frame.f_code.co_name) + # Python 3.11 only + if hasattr(frame.f_code, "co_linetable"): + # We can't copy ALL of the metadata over, because you + # can cause Python to segfault this way. What exactly + # do we need? We need enough information for + # traceback to be able to print the exception + # correctly. Code reading Lib/traceback.py reveals + # that traceback calls code.co_positions() in order to + # get the augmented line/col numbers. Objects/codeobject.c, + # specifically _PyCode_InitAddressRange, reveals that + # this iterator is initialized from co_linetable and + # co_firstfileno. So copy these we must! + code = code.replace( # type: ignore[call-arg] + co_linetable=frame.f_code.co_linetable, # type: ignore[attr-defined] + co_firstlineno=frame.f_code.co_firstlineno, # type: ignore[attr-defined] + ) + fake_frame = eval( + code, + frame.f_globals, + {**frame.f_locals, "__inspect_currentframe": inspect.currentframe}, + ) + fake_tb = TracebackType(None, fake_frame, tb.tb_lasti, tb.tb_lineno) + stack.append(fake_tb) + else: + stack.append(tb) + + tb = tb.tb_next + + # Reconstruct the linked list + tb_next = None + for tb in reversed(stack): + tb.tb_next = tb_next + tb_next = tb + + raise exc.with_traceback(tb_next) # noqa: B904 + + +def shorten_filename(fn, *, base=None): + """Shorten a source filepath, with the assumption that torch/ subdirectories don't need to be shown to user.""" + if base is None: + base = os.path.dirname(os.path.dirname(__file__)) + # Truncate torch/foo.py to foo.py + try: + prefix = os.path.commonpath([fn, base]) + except ValueError: + return fn + else: + return fn[len(prefix) + 1 :] + + +def format_frame(frame, *, base=None, line=False) -> str: + """ + Format a FrameSummary in a short way, without printing full absolute path or code. + + The idea is the result fits on a single line. + """ + extra_line = "" + if line: + extra_line = f"{frame.line} # " + return f"{extra_line}{shorten_filename(frame.filename, base=base)}:{frame.lineno} in {frame.name}" + + +def format_traceback_short(tb): + """Format a TracebackType in a short way, printing only the inner-most frame.""" + return format_frame(traceback.extract_tb(tb)[-1]) + + +class CapturedTraceback: + __slots__ = ["tb", "skip"] + + def __init__(self, tb, skip=0) -> None: + self.tb = tb + self.skip = skip + + def cleanup(self) -> None: + self.tb = None + + def summary(self): + import torch._C._profiler + + if self.tb is None: + # TODO: Maybe indicate that the traceback was elided? + return traceback.StackSummary() + + return _extract_symbolized_tb( + torch._C._profiler.symbolize_tracebacks([self.tb])[0], self.skip + ) + + def __getstate__(self): + return ( + None, + { + "tb": None, # TB is not pickleable + "skip": self.skip, + }, + ) + + @staticmethod + def extract(*, script=False, cpp=False, skip=0): + """ + Like traceback.extract_stack(), but faster (approximately 20x faster); it + is fast enough that you can unconditionally log stacks this way as part of + normal execution. It returns a torch._C._profiler.CapturedTraceback + object that must be formatted specially with format_captured_tb. + + By default, this only reports Python backtraces (like extract_stack). You + can set the script/cpp kwargs to also turn on TorchScript/C++ trace + reporting. + """ + import torch._C._profiler + + if script or cpp: + if skip != 0: + raise AssertionError("skip with script/cpp NYI") + + return CapturedTraceback( + torch._C._profiler.gather_traceback(python=True, script=script, cpp=cpp), + # Elide extract() frame if we don't have script/cpp frames. If + # we do have those frames, it doesn't work so force zero. + 0 if script or cpp else skip + 1, + ) + + def format(self): + """ + Formats a single torch._C._profiler.CapturedTraceback into a list of + strings equivalent to the output of traceback.format_list. Note that if + pass it CapturedTraceback with C++ traces, it is better not to use this + function and use the batch formatting API format_captured_tbs to amortize + the cost of symbolization + """ + return traceback.format_list(self.summary()) + + @staticmethod + def format_all(tbs): + """ + Bulk version of CapturedTraceback.format. Returns a list of list of strings. + """ + import torch._C._profiler + + # Directly populate tracebacks that already have cached summaries + rs: list[list[str] | None] = [] + delayed_idxs = [] + for i, tb in enumerate(tbs): + if tb.tb is None: + rs.append([]) + else: + rs.append(None) + delayed_idxs.append(i) + + torch._C._profiler.symbolize_tracebacks([tbs[i].tb for i in delayed_idxs]) + for i in delayed_idxs: + rs[i] = traceback.format_list(tbs[i].summary()) + + return rs + + +def _extract_symbolized_tb(tb, skip): + """ + Given a symbolized traceback from symbolize_tracebacks, return a StackSummary object of + pre-processed stack trace entries. + """ + stack = traceback.StackSummary() + for f in reversed(tb[skip:]): + stack.append(traceback.FrameSummary(f["filename"], f["line"], f["name"])) + return stack diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_triton.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_triton.py new file mode 100644 index 0000000000000000000000000000000000000000..98de7bbcc5868b3850a5633a4165d4d965ee262e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_triton.py @@ -0,0 +1,204 @@ +import functools +import hashlib +from typing import Any + + +@functools.cache +def has_triton_package() -> bool: + try: + import triton # noqa: F401 + + return True + except ImportError: + return False + + +@functools.cache +def get_triton_version(fallback: tuple[int, int] = (0, 0)) -> tuple[int, int]: + try: + import triton + + major, minor = tuple(int(v) for v in triton.__version__.split(".")[:2]) + return (major, minor) + except ImportError: + return fallback + + +@functools.cache +def _device_supports_tma() -> bool: + import torch + + return ( + torch.cuda.is_available() + and torch.cuda.get_device_capability() >= (9, 0) + and not torch.version.hip + ) + + +@functools.cache +def has_triton_experimental_host_tma() -> bool: + if has_triton_package(): + if _device_supports_tma(): + try: + from triton.tools.experimental_descriptor import ( # noqa: F401 + create_1d_tma_descriptor, + create_2d_tma_descriptor, + ) + + try: + from triton.tools.experimental_descriptor import enable_in_pytorch + + return enable_in_pytorch() + except ImportError: + return True + except ImportError: + pass + + return False + + +@functools.cache +def has_triton_tensor_descriptor_host_tma() -> bool: + if has_triton_package(): + if _device_supports_tma(): + try: + from triton.tools.tensor_descriptor import ( # noqa: F401 + TensorDescriptor, + ) + + return True + except ImportError: + pass + + return False + + +@functools.cache +def has_triton_tma() -> bool: + return has_triton_tensor_descriptor_host_tma() or has_triton_experimental_host_tma() + + +@functools.cache +def has_triton_tma_device() -> bool: + if has_triton_package(): + import torch + + if ( + torch.cuda.is_available() + and torch.cuda.get_device_capability() >= (9, 0) + and not torch.version.hip + ) or torch.xpu.is_available(): + # old API + try: + from triton.language.extra.cuda import ( # noqa: F401 + experimental_device_tensormap_create1d, + experimental_device_tensormap_create2d, + ) + + return True + except ImportError: + pass + + # new API + try: + from triton.language import make_tensor_descriptor # noqa: F401 + + return True + except ImportError: + pass + + return False + + +@functools.cache +def has_datacenter_blackwell_tma_device() -> bool: + import torch + + if ( + torch.cuda.is_available() + and torch.cuda.get_device_capability() >= (10, 0) + and torch.cuda.get_device_capability() < (11, 0) + and not torch.version.hip + ): + return has_triton_tma_device() and has_triton_tensor_descriptor_host_tma() + + return False + + +@functools.lru_cache(None) +def has_triton_stable_tma_api() -> bool: + if has_triton_package(): + import torch + + if ( + torch.cuda.is_available() + and torch.cuda.get_device_capability() >= (9, 0) + and not torch.version.hip + ) or torch.xpu.is_available(): + try: + from triton.language import make_tensor_descriptor # noqa: F401 + + return True + except ImportError: + pass + return False + + +@functools.cache +def has_triton() -> bool: + if not has_triton_package(): + return False + + from torch._inductor.config import triton_disable_device_detection + + if triton_disable_device_detection: + return False + + from torch._dynamo.device_interface import get_interface_for_device + + def cuda_extra_check(device_interface: Any) -> bool: + return device_interface.Worker.get_device_properties().major >= 7 + + def cpu_extra_check(device_interface: Any) -> bool: + import triton.backends + + return "cpu" in triton.backends.backends + + def _return_true(device_interface: Any) -> bool: + return True + + triton_supported_devices = { + "cuda": cuda_extra_check, + "xpu": _return_true, + "cpu": cpu_extra_check, + "mtia": _return_true, + } + + def is_device_compatible_with_triton() -> bool: + for device, extra_check in triton_supported_devices.items(): + device_interface = get_interface_for_device(device) + if device_interface.is_available() and extra_check(device_interface): + return True + return False + + return is_device_compatible_with_triton() + + +@functools.cache +def triton_backend() -> Any: + from triton.compiler.compiler import make_backend + from triton.runtime.driver import driver + + target = driver.active.get_current_target() + return make_backend(target) + + +@functools.cache +def triton_hash_with_backend() -> str: + from torch._inductor.runtime.triton_compat import triton_key + + backend = triton_backend() + key = f"{triton_key()}-{backend.hash()}" + + # Hash is upper case so that it can't contain any Python keywords. + return hashlib.sha256(key.encode("utf-8")).hexdigest().upper() diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_typing_utils.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_typing_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..f28c9f94100b76cfb75f6d300c2a5ecaae325fa8 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_typing_utils.py @@ -0,0 +1,14 @@ +"""Miscellaneous utilities to aid with typing.""" + +from typing import TypeVar + + +# Helper to turn Optional[T] into T when we know None either isn't +# possible or should trigger an exception. +T = TypeVar("T") + + +def not_none(obj: T | None) -> T: + if obj is None: + raise TypeError("Invariant encountered: value was None when it should not be") + return obj diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_zip.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_zip.py new file mode 100644 index 0000000000000000000000000000000000000000..c4bfbcb0b9b637f82fba7c9722cd6fbc5690555c --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/_zip.py @@ -0,0 +1,86 @@ +# mypy: allow-untyped-defs +import argparse +import glob +import os +from pathlib import Path +from zipfile import ZipFile + + +# Exclude some standard library modules to: +# 1. Slim down the final zipped file size +# 2. Remove functionality we don't want to support. +DENY_LIST = [ + # Interface to unix databases + "dbm", + # ncurses bindings (terminal interfaces) + "curses", + # Tcl/Tk GUI + "tkinter", + "tkinter", + # Tests for the standard library + "test", + "tests", + "idle_test", + "__phello__.foo.py", + # importlib frozen modules. These are already baked into CPython. + "_bootstrap.py", + "_bootstrap_external.py", +] + +strip_file_dir = "" + + +def remove_prefix(text, prefix): + if text.startswith(prefix): + return text[len(prefix) :] + return text + + +def write_to_zip(file_path, strip_file_path, zf, prepend_str="") -> None: + stripped_file_path = prepend_str + remove_prefix(file_path, strip_file_dir + "/") + path = Path(stripped_file_path) + if path.name in DENY_LIST: + return + zf.write(file_path, stripped_file_path) + + +def main() -> None: + global strip_file_dir + parser = argparse.ArgumentParser(description="Zip py source") + parser.add_argument("paths", nargs="*", help="Paths to zip.") + parser.add_argument( + "--install-dir", "--install_dir", help="Root directory for all output files" + ) + parser.add_argument( + "--strip-dir", + "--strip_dir", + help="The absolute directory we want to remove from zip", + ) + parser.add_argument( + "--prepend-str", + "--prepend_str", + help="A string to prepend onto all paths of a file in the zip", + default="", + ) + parser.add_argument("--zip-name", "--zip_name", help="Output zip name") + + args = parser.parse_args() + + zip_file_name = args.install_dir + "/" + args.zip_name + strip_file_dir = args.strip_dir + prepend_str = args.prepend_str + with ZipFile(zip_file_name, mode="w") as zf: + for p in sorted(args.paths): + if os.path.isdir(p): + files = glob.glob(p + "/**/*.py", recursive=True) + for file_path in sorted(files): + # strip the absolute path + write_to_zip( + file_path, strip_file_dir + "/", zf, prepend_str=prepend_str + ) + else: + write_to_zip(p, strip_file_dir + "/", zf, prepend_str=prepend_str) + + +if __name__ == "__main__": + main() # pragma: no cover diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/backcompat/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/backcompat/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f6ec989be1e078ba857d30b06a91e1dc54131e4b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/backcompat/__init__.py @@ -0,0 +1,27 @@ +# mypy: allow-untyped-defs +from torch._C import ( + _get_backcompat_broadcast_warn, + _get_backcompat_keepdim_warn, + _set_backcompat_broadcast_warn, + _set_backcompat_keepdim_warn, +) + + +class Warning: + def __init__(self, setter, getter) -> None: + self.setter = setter + self.getter = getter + + def set_enabled(self, value) -> None: + self.setter(value) + + def get_enabled(self): + return self.getter() + + enabled = property(get_enabled, set_enabled) + + +broadcast_warning = Warning( + _set_backcompat_broadcast_warn, _get_backcompat_broadcast_warn +) +keepdim_warning = Warning(_set_backcompat_keepdim_warn, _get_backcompat_keepdim_warn) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/backend_registration.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/backend_registration.py new file mode 100644 index 0000000000000000000000000000000000000000..2300306d22d2d5f246aecbc85e5cd25f85b609cf --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/backend_registration.py @@ -0,0 +1,521 @@ +# mypy: allow-untyped-defs + +import torch +from torch._C import _get_privateuse1_backend_name, _rename_privateuse1_backend +from torch.overrides import handle_torch_function, has_torch_function_unary + + +__all__ = [ + "rename_privateuse1_backend", + "generate_methods_for_privateuse1_backend", +] + +# TODO: Should use `torch._C._get_privateuse1_backend_name()` to get +# renamed-backend name for `privateuse1`, but the func will cause an +# error with torch.jit.script, so we use the global variable named +# `_privateuse1_backend_name`. +_privateuse1_backend_name = "privateuseone" + + +def rename_privateuse1_backend(backend_name: str) -> None: + r""" + Rename the privateuse1 backend device to make it more convenient to use as a device name within PyTorch APIs. + + The steps are: + + (1) (In C++) implement kernels for various torch operations, and register them + to the PrivateUse1 dispatch key. + (2) (In python) call torch.utils.rename_privateuse1_backend("foo") + + You can now use "foo" as an ordinary device string in python. + + Note: this API can only be called once per process. Attempting to change + the external backend after it's already been set will result in an error. + + Note(AMP): If you want to support AMP on your device, you can register a custom backend module. + The backend must register a custom backend module with ``torch._register_device_module("foo", BackendModule)``. + BackendModule needs to have the following API's: + + (1) ``get_amp_supported_dtype() -> List[torch.dtype]`` + get the supported dtypes on your "foo" device in AMP, maybe the "foo" device supports one more dtype. + + Note(random): If you want to support to set seed for your device, BackendModule needs to have the following API's: + + (1) ``_is_in_bad_fork() -> bool`` + Return ``True`` if now it is in bad_fork, else return ``False``. + + (2) ``manual_seed_all(seed int) -> None`` + Sets the seed for generating random numbers for your devices. + + (3) ``device_count() -> int`` + Returns the number of "foo"s available. + + (4) ``get_rng_state(device: Union[int, str, torch.device] = 'foo') -> Tensor`` + Returns a list of ByteTensor representing the random number states of all devices. + + (5) ``set_rng_state(new_state: Tensor, device: Union[int, str, torch.device] = 'foo') -> None`` + Sets the random number generator state of the specified "foo" device. + + And there are some common funcs: + + (1) ``is_available() -> bool`` + Returns a bool indicating if "foo" is currently available. + + (2) ``current_device() -> int`` + Returns the index of a currently selected device. + + For more details, see https://pytorch.org/tutorials/advanced/extend_dispatcher.html#get-a-dispatch-key-for-your-backend + For an existing example, see https://github.com/bdhirsh/pytorch_open_registration_example + + Example:: + + >>> # xdoctest: +SKIP("failing") + >>> torch.utils.rename_privateuse1_backend("foo") + # This will work, assuming that you've implemented the right C++ kernels + # to implement torch.ones. + >>> a = torch.ones(2, device="foo") + + """ + _rename_privateuse1_backend(backend_name) + global _privateuse1_backend_name + _privateuse1_backend_name = backend_name + + +def _check_register_once(module, attr) -> None: + if hasattr(module, attr): + raise RuntimeError( + f"The custom device module of {module} has already been registered with {attr}" + ) + + +def _normalization_device( + custom_backend_name: str, device: int | str | torch.device | None = None +) -> int: + def _get_current_device_index(): + _get_device_index = "current_device" + if hasattr(torch, custom_backend_name) and hasattr( + getattr(torch, custom_backend_name), _get_device_index + ): + return getattr(getattr(torch, custom_backend_name), _get_device_index)() + else: + # The default device index is 0. + return 0 + + if device is None: + return _get_current_device_index() + # if isinstance(device, str), this means that the parameter passed in is in the string format "foo:0" + # convert str object to torch.device object, and then process it uniformly + elif isinstance(device, str): + device = torch.device(device) + + # variable device can only be torch.device type or int type + if isinstance(device, torch.device): + if device.type != custom_backend_name: + raise RuntimeError(f"Invalid device, must be {custom_backend_name} device") + elif device.index is None: + device_idx = _get_current_device_index() + else: + device_idx = device.index + # if isinstance(device, int), we can take the index number directly + else: + device_idx = device + return device_idx + + +def _generate_tensor_methods_for_privateuse1_backend(custom_backend_name: str) -> None: + @property # type: ignore[misc] + def wrap_tensor_backend(self: torch.Tensor) -> bool: + if has_torch_function_unary(self): + # TODO mypy doesn't support @property, see: https://github.com/python/mypy/issues/6185 + return handle_torch_function(wrap_tensor_backend.__get__, (self,), self) # type: ignore[attr-defined] + return self.device.type == custom_backend_name + + _check_register_once(torch.Tensor, f"is_{custom_backend_name}") + wrap_tensor_backend.fget.__name__ = f"is_{custom_backend_name}" # type: ignore[attr-defined] + setattr(torch.Tensor, f"is_{custom_backend_name}", wrap_tensor_backend) + + def wrap_tensor_to( + self: torch.Tensor, + device: int | torch.device | None = None, + non_blocking=False, + **kwargs, + ) -> torch.Tensor: + r"""Perform Tensor device conversion. Call the to operator implementation. + + .. note:: + If the ``self`` Tensor already + has the correct :class:`torch.device`, then ``self`` is returned. + Otherwise, the returned tensor is a copy of ``self`` with the desired :class:`torch.device`. + + Args: + device (int, optional): if specified, all parameters will be copied to that device + non_blocking (bool): If ``True`` and the source is in pinned memory, + the copy will be asynchronous with respect to the host. Otherwise, + the argument has no effect. + **kwargs (dict): For compatibility, may contain the key ``memory_format`` argument. + """ + if has_torch_function_unary(self): + return handle_torch_function( + wrap_tensor_to, + (self,), + self, + device=device, + non_blocking=False, + **kwargs, + ) + device_idx = _normalization_device(custom_backend_name, device) + return self.to( + device=torch.device(f"{custom_backend_name}:{device_idx}"), + non_blocking=non_blocking, + **kwargs, + ) + + _check_register_once(torch.Tensor, custom_backend_name) + wrap_tensor_to.__name__ = custom_backend_name + setattr(torch.Tensor, custom_backend_name, wrap_tensor_to) + + +def _generate_module_methods_for_privateuse1_backend(custom_backend_name: str) -> None: + # Generate Module attributes and methods depends on Tensor methods, + # so we need to check whether Tensor methods is already registered. + if not hasattr(torch.Tensor, custom_backend_name): + raise RuntimeError( + f"Can not automatically generate {custom_backend_name}() method for torch.nn.Module." + f"Because torch.Tensor doesn't has the method {custom_backend_name}()." + f"For this error, you can try setting for_tensor=True." + ) + + def wrap_module_to( + self: torch.nn.modules.module.T, + device: int | torch.device | None = None, + ) -> torch.nn.modules.module.T: + r"""Move all model parameters and buffers to the custom device. + + This also makes associated parameters and buffers different objects. So + it should be called before constructing optimizer if the module will + live on device while being optimized. + + .. note:: + This method modifies the module in-place. + + Args: + device (int, optional): if specified, all parameters will be copied to that device + """ + # pyrefly: ignore [missing-attribute] + return self._apply(lambda t: getattr(t, custom_backend_name)(device)) + + _check_register_once(torch.nn.Module, custom_backend_name) + setattr(torch.nn.Module, custom_backend_name, wrap_module_to) + + +def _generate_packed_sequence_methods_for_privateuse1_backend( + custom_backend_name: str, +) -> None: + # Generate PackedSequence Module attributes and methods depends on Tensor methods, + # so we need to check whether Tensor methods is already registered. + if not hasattr(torch.Tensor, f"is_{custom_backend_name}") or not hasattr( + torch.Tensor, custom_backend_name + ): + raise RuntimeError( + f"Can not automatically generate is_{custom_backend_name}() or " + f"{custom_backend_name}() method for torch.nn.utils.rnn.PackedSequence." + f"Because torch.Tensor doesn't has the method is_{custom_backend_name}()" + f"or {custom_backend_name}()." + f"For this error, you can try setting for_tensor=True." + ) + + @property # type: ignore[misc] + def wrap_tensor_backend(self: torch.nn.utils.rnn.PackedSequence) -> bool: + return self.data.device.type == custom_backend_name + + _check_register_once(torch.nn.utils.rnn.PackedSequence, f"is_{custom_backend_name}") + setattr( + torch.nn.utils.rnn.PackedSequence, + f"is_{custom_backend_name}", + wrap_tensor_backend, + ) + + def wrap_module_to( + self: torch.nn.utils.rnn.PackedSequence, *args, **kwargs + ) -> torch.nn.utils.rnn.PackedSequence: + r"""Move all model parameters and buffers to the custom device. + + This also makes associated parameters and buffers different objects. So + it should be called before constructing optimizer if the module will + live on device while being optimized. + + .. note:: + This method modifies the module in-place. + + Args: + device (int, optional): if specified, all parameters will be copied to that device + """ + ex = torch.tensor((), dtype=self.data.dtype, device=self.data.device).to( + # pyrefly: ignore [not-iterable] + *args, + **kwargs, + ) + if ex.device.type == custom_backend_name: + # pyrefly: ignore [not-iterable] + return self.to(*args, **kwargs) + kwargs.update({"device": custom_backend_name}) + # pyrefly: ignore [not-iterable] + return self.to(*args, **kwargs) + + _check_register_once(torch.nn.utils.rnn.PackedSequence, custom_backend_name) + setattr(torch.nn.utils.rnn.PackedSequence, custom_backend_name, wrap_module_to) + + +def _generate_storage_methods_for_privateuse1_backend( + custom_backend_name: str, unsupported_dtype: list[torch.dtype] | None = None +) -> None: + # Attribute is registered in the _StorageBase class + # and UntypedStorage obtains through inheritance. + @property # type: ignore[misc] + def wrap_storage_backend(self: torch.storage._StorageBase) -> bool: + r"""Return the internal :class:`torch.UntypedStorage`.""" + return self.device.type == custom_backend_name + + _check_register_once(torch.storage._StorageBase, f"is_{custom_backend_name}") + setattr( + torch.storage._StorageBase, f"is_{custom_backend_name}", wrap_storage_backend + ) + + def wrap_storage_to(self, device=None, non_blocking=False): + r"""Return a copy of this object in custom device memory. + + If this object is already in device memory and on the correct device, then + no copy is performed and the original object is returned. + + Args: + device (int): The destination device id. Defaults to the current device. + non_blocking (bool): If ``True`` and the source is in pinned memory, + the copy will be asynchronous with respect to the host. Otherwise, + the argument has no effect. + """ + # There should be a judgment related to storage device and a judgment related to storage type, + # but it depends on the extended function, so this part is temporarily omitted in the automatic generation. + device_idx = _normalization_device(custom_backend_name, device) + + if getattr(self, f"is_{custom_backend_name}"): + # storage has already on expected device. + if self.get_device() == device_idx: + return self + # For sparse storage, custom need to extend the implementation by themselves. + if self.is_sparse: + raise RuntimeError( + f"Can not support a sparse storage move to {custom_backend_name} backend" + ) + # create untyped_storage and copy data + untyped_storage = torch.UntypedStorage( + self.size(), device=torch.device(f"{custom_backend_name}:{device_idx}") + ) + untyped_storage.copy_(self, non_blocking) + return untyped_storage + + _check_register_once(torch.storage._StorageBase, custom_backend_name) + setattr(torch.storage._StorageBase, custom_backend_name, wrap_storage_to) + + # Register the corresponding attribute for the TypedStorage class. + # When the TypedStorage class is removed, the registration is also removed. + + @property # type: ignore[misc] + def wrap_typed_storage_backend(self: torch.storage.TypedStorage) -> bool: + torch.storage._warn_typed_storage_removal() + return self._untyped_storage.device.type == custom_backend_name + + _check_register_once(torch.TypedStorage, f"is_{custom_backend_name}") + setattr( + torch.storage.TypedStorage, + f"is_{custom_backend_name}", + wrap_typed_storage_backend, + ) + + def wrap_typed_storage_to( + self: torch.storage.TypedStorage, device=None, non_blocking=False, **kwargs + ) -> torch.storage.TypedStorage: + torch.storage._warn_typed_storage_removal() + if unsupported_dtype and self.dtype in unsupported_dtype: + raise RuntimeError( + f"Cannot create {custom_backend_name} storage " + f"as {self.dtype} dtype is not supported by this backend" + ) + custom_backend_storage: torch.UntypedStorage = getattr( + self._untyped_storage, custom_backend_name + )(device, non_blocking, **kwargs) + return self._new_wrapped_storage(custom_backend_storage) + + _check_register_once(torch.TypedStorage, custom_backend_name) + setattr(torch.TypedStorage, custom_backend_name, wrap_typed_storage_to) + + +def generate_methods_for_privateuse1_backend( + for_tensor: bool = True, + for_module: bool = True, + for_packed_sequence: bool = True, + for_storage: bool = False, + unsupported_dtype: list[torch.dtype] | None = None, +) -> None: + r""" + Automatically generate attributes and methods for the custom backend after rename privateuse1 backend. + + In the default scenario, storage-related methods will not be generated automatically. + + When you implement kernels for various torch operations, and register them to the PrivateUse1 dispatch key. + And call the function torch.rename_privateuse1_backend("foo") to rename your backend name. + At this point, you can easily register specific methods and attributes by calling this function. + Just like torch.Tensor.foo(), torch.Tensor.is_foo, torch.Storage.foo(), torch.Storage.is_foo. + + Note: We recommend you use generic functions (check devices are equal or to(device=)). + We provide these methods for convenience only and they will be "monkey patched" onto the objects + and so will not be properly typed. For Storage methods generate, if you need to support sparse data storage, + you need to extend the implementation yourself. + + Args: + for_tensor (bool): whether register related methods for torch.Tensor class. + for_module (bool): whether register related methods for torch.nn.Module class. + for_storage (bool): whether register related methods for torch.Storage class. + unsupported_dtype (List[torch.dtype]): takes effect only when the storage method needs to be generated, + indicating that the storage does not support the torch.dtype type. + + Example:: + + >>> # xdoctest: +SKIP("failing") + >>> torch.utils.rename_privateuse1_backend("foo") + >>> torch.utils.generate_methods_for_privateuse1_backend() + # Then automatically generate backend-related attributes and methods. + >>> a = torch.tensor(2).foo() + >>> a.is_foo + >>> hasattr(torch.nn.Module, 'foo') + """ + custom_backend_name = _get_privateuse1_backend_name() + + if for_tensor: + _generate_tensor_methods_for_privateuse1_backend(custom_backend_name) + + if for_module: + _generate_module_methods_for_privateuse1_backend(custom_backend_name) + + if for_storage: + _generate_storage_methods_for_privateuse1_backend( + custom_backend_name, unsupported_dtype + ) + + if for_packed_sequence: + _generate_packed_sequence_methods_for_privateuse1_backend(custom_backend_name) + + +def _get_custom_mod_func(func_name: str): + r""" + Return the func named `func_name` defined in custom device module. If not defined, + return `None`. And the func is registered with `torch.utils.rename_privateuse1_backend('foo')` + and `torch._register_device_module('foo', BackendModule)`. + If the custom device module or the func is not defined, it will give warning or error message. + Args: + func_name (str): return the callable func named func_name defined in custom device module. + Example:: + class DummyfooModule: + @staticmethod + def is_available(): + return True + @staticmethod + def func_name(*args, **kwargs): + .... + torch.utils.rename_privateuse1_backend("foo") + torch._register_device_module("foo", DummyfooModule) + foo_is_available_func = torch.utils.backend_registration._get_custom_mod_func("is_available") + if foo_is_available_func: + foo_is_available = foo_is_available_func() + func_ = torch.utils.backend_registration._get_custom_mod_func("func_name") + if func_: + result = func_(*args, **kwargs) + Attention: This function is not meant to be used directly by users, which is why + it is marked as private. It is a convenience function for backend implementers to + more easily call the hooks into their backend extensions. + """ + if not isinstance(func_name, str): + raise AssertionError(f"func_name must be `str`, but got `{type(func_name)}`.") + backend_name = _get_privateuse1_backend_name() + custom_device_mod = getattr(torch, backend_name, None) + function = getattr(custom_device_mod, func_name, None) + if custom_device_mod is None or function is None: + message = f"Try to call torch.{backend_name}.{func_name}. The backend must register a custom backend " + message += f"module with `torch._register_device_module('{backend_name}', BackendModule)`. And " + message += f"BackendModule needs to have the following API's:\n `{func_name}(*args, **kwargs)`. \n" + raise RuntimeError(message) + return function + + +class _DummyBackendModule: + def is_initialized(self) -> bool: + return True + + def is_available(self) -> bool: + return True + + def current_device(self) -> int: + return 0 + + def _is_in_bad_fork(self) -> bool: + return False + + def manual_seed_all(self, seed: int) -> None: + pass + + def device_count(self) -> int: + return 1 + + +class _DummyPrivateUse1Hook(torch._C._acc.PrivateUse1Hooks): + def is_available(self) -> bool: + return True + + def has_primary_context(self, dev_id) -> bool: + return True + + def is_built(self) -> bool: + return True + + +class _DummyDeviceGuard(torch._C._acc.DeviceGuard): + def type_(self): + return torch._C._autograd.DeviceType.PrivateUse1 + + +def _setup_privateuseone_for_python_backend( + rename=None, backend_module=None, hook=None, device_guard=None +) -> None: + """This function will prepare the PrivateUse1 dispatch key to be used as a python backend. + + WARNING: this API is experimental and might change without notice. + + Formally, this registers things that Pytorch expects a registered backend + in C++ to have: including device guards, hooks, and backend modules and what not. + + after this call, one can use `torch.library` to write Ops for this dispatch key + and expect it to behave like a backend registered in C++. + + See the unit test at test/test_privateuseone_python_backend.py for more details. + + Args: + rename: str | None, if passed in, we will rename privateuseone backend to + the name given. + backend_module: object | None, if passed in None, we will use DummyBackendModule + hook: object | None, if passed in None, we will use DummyPrivateUse1Hook + device_guard: object | None, if passed in None, we will use DummyDeviceGuard + """ + # NOTE: the ordering of which these functions are called is important. + if rename is not None: + torch.utils.rename_privateuse1_backend(rename) + else: + rename = "privateuseone" + torch.utils.generate_methods_for_privateuse1_backend() + if backend_module is None: + backend_module = _DummyBackendModule() + if hook is None: + hook = _DummyPrivateUse1Hook() + if device_guard is None: + device_guard = _DummyDeviceGuard() + torch._register_device_module(rename, backend_module) + torch._C._acc.register_python_privateuseone_hook(hook) + torch._C._acc.register_python_privateuseone_device_guard(device_guard) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9e814aaf4671ca35484c43bc38677849d02a81ec --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/__init__.py @@ -0,0 +1,6 @@ +from torch.utils.benchmark.utils.common import * # noqa: F403 +from torch.utils.benchmark.utils.timer import * # noqa: F403 +from torch.utils.benchmark.utils.compare import * # noqa: F403 +from torch.utils.benchmark.utils.fuzzer import * # noqa: F403 +from torch.utils.benchmark.utils.valgrind_wrapper.timer_interface import * # noqa: F403 +from torch.utils.benchmark.utils.sparse_fuzzer import * # noqa: F403 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/examples/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/examples/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/examples/compare.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/examples/compare.py new file mode 100644 index 0000000000000000000000000000000000000000..1c266e7cf9a6e604c94dfb28f19f31f1649220f4 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/examples/compare.py @@ -0,0 +1,99 @@ +# mypy: allow-untyped-defs +"""Example of Timer and Compare APIs: + +$ python -m examples.compare +""" + +import pickle +import sys +import time + +import torch + +import torch.utils.benchmark as benchmark_utils + + +class FauxTorch: + """Emulate different versions of pytorch. + + In normal circumstances this would be done with multiple processes + writing serialized measurements, but this simplifies that model to + make the example clearer. + """ + def __init__(self, real_torch, extra_ns_per_element) -> None: + self._real_torch = real_torch + self._extra_ns_per_element = extra_ns_per_element + + def extra_overhead(self, result): + # time.sleep has a ~65 us overhead, so only fake a + # per-element overhead if numel is large enough. + numel = int(result.numel()) + if numel > 5000: + time.sleep(numel * self._extra_ns_per_element * 1e-9) + return result + + def add(self, *args, **kwargs): + return self.extra_overhead(self._real_torch.add(*args, **kwargs)) + + def mul(self, *args, **kwargs): + return self.extra_overhead(self._real_torch.mul(*args, **kwargs)) + + def cat(self, *args, **kwargs): + return self.extra_overhead(self._real_torch.cat(*args, **kwargs)) + + def matmul(self, *args, **kwargs): + return self.extra_overhead(self._real_torch.matmul(*args, **kwargs)) + + +def main() -> None: + tasks = [ + ("add", "add", "torch.add(x, y)"), + ("add", "add (extra +0)", "torch.add(x, y + zero)"), + ] + + serialized_results = [] + repeats = 2 + timers = [ + benchmark_utils.Timer( + stmt=stmt, + globals={ + "torch": torch if branch == "master" else FauxTorch(torch, overhead_ns), + "x": torch.ones((size, 4)), + "y": torch.ones((1, 4)), + "zero": torch.zeros(()), + }, + label=label, + sub_label=sub_label, + description=f"size: {size}", + env=branch, + num_threads=num_threads, + ) + for branch, overhead_ns in [("master", None), ("my_branch", 1), ("severe_regression", 5)] + for label, sub_label, stmt in tasks + for size in [1, 10, 100, 1000, 10000, 50000] + for num_threads in [1, 4] + ] + + for i, timer in enumerate(timers * repeats): + serialized_results.append(pickle.dumps( + timer.blocked_autorange(min_run_time=0.05) + )) + print(f"\r{i + 1} / {len(timers) * repeats}", end="") + sys.stdout.flush() + print() + + comparison = benchmark_utils.Compare([ + pickle.loads(i) for i in serialized_results + ]) + + print("== Unformatted " + "=" * 80 + "\n" + "/" * 95 + "\n") + comparison.print() + + print("== Formatted " + "=" * 80 + "\n" + "/" * 93 + "\n") + comparison.trim_significant_figures() + comparison.colorize() + comparison.print() + + +if __name__ == "__main__": + main() diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/examples/fuzzer.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/examples/fuzzer.py new file mode 100644 index 0000000000000000000000000000000000000000..80a4e733928d8b059919d847da1b461d55dd7402 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/examples/fuzzer.py @@ -0,0 +1,86 @@ +# mypy: allow-untyped-defs +"""Example of the Timer and Fuzzer APIs: + +$ python -m examples.fuzzer +""" + +import sys + +import torch.utils.benchmark as benchmark_utils + + +def main() -> None: + add_fuzzer = benchmark_utils.Fuzzer( + parameters=[ + [ + benchmark_utils.FuzzedParameter( + name=f"k{i}", + minval=16, + maxval=16 * 1024, + distribution="loguniform", + ) for i in range(3) + ], + benchmark_utils.FuzzedParameter( + name="d", + distribution={2: 0.6, 3: 0.4}, + ), + ], + tensors=[ + [ + benchmark_utils.FuzzedTensor( + name=name, + size=("k0", "k1", "k2"), + dim_parameter="d", + probability_contiguous=0.75, + min_elements=64 * 1024, + max_elements=128 * 1024, + ) for name in ("x", "y") + ], + ], + seed=0, + ) + + n = 250 + measurements = [] + for i, (tensors, tensor_properties, _) in enumerate(add_fuzzer.take(n=n)): + x, x_order = tensors["x"], str(tensor_properties["x"]["order"]) + y, y_order = tensors["y"], str(tensor_properties["y"]["order"]) + shape = ", ".join(tuple(f'{i:>4}' for i in x.shape)) + + description = "".join([ + f"{x.numel():>7} | {shape:<16} | ", + f"{'contiguous' if x.is_contiguous() else x_order:<12} | ", + f"{'contiguous' if y.is_contiguous() else y_order:<12} | ", + ]) + + timer = benchmark_utils.Timer( + stmt="x + y", + globals=tensors, + description=description, + ) + + measurements.append(timer.blocked_autorange(min_run_time=0.1)) + measurements[-1].metadata = {"numel": x.numel()} + print(f"\r{i + 1} / {n}", end="") + sys.stdout.flush() + print() + + # More string munging to make pretty output. + print(f"Average attempts per valid config: {1. / (1. - add_fuzzer.rejection_rate):.1f}") + + def time_fn(m): + return m.median / m.metadata["numel"] + measurements.sort(key=time_fn) + + template = f"{{:>6}}{' ' * 19}Size Shape{' ' * 13}X order Y order\n{'-' * 80}" + print(template.format("Best:")) + for m in measurements[:15]: + print(f"{time_fn(m) * 1e9:>4.1f} ns / element {m.description}") + + print("\n" + template.format("Worst:")) + for m in measurements[-15:]: + print(f"{time_fn(m) * 1e9:>4.1f} ns / element {m.description}") + + +if __name__ == "__main__": + main() diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/examples/op_benchmark.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/examples/op_benchmark.py new file mode 100644 index 0000000000000000000000000000000000000000..f65599ee18a4f2c4a0d35b514c8f87725affae01 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/examples/op_benchmark.py @@ -0,0 +1,107 @@ +# mypy: allow-untyped-defs +"""Example use of Timer and op fuzzers to measure kernel performance. + +$ python -m examples.op_benchmark +""" + +import numpy as np +import torch + +from torch.utils.benchmark import Timer +from torch.utils.benchmark.op_fuzzers.binary import BinaryOpFuzzer +from torch.utils.benchmark.op_fuzzers.unary import UnaryOpFuzzer +import operator + + +_MEASURE_TIME = 1.0 + + +def assert_dicts_equal(dict_0, dict_1) -> None: + """Builtin dict comparison will not compare numpy arrays. + e.g. + x = {"a": np.ones((2, 1))} + x == x # Raises ValueError + """ + if set(dict_0.keys()) != set(dict_0.keys()): + raise AssertionError("dicts must have the same keys") + if all(np.all(v != dict_1[k]) for k, v in dict_0.items() if k != "dtype"): + raise AssertionError("dict values differ for keys other than 'dtype'") + + +def run(n, stmt, fuzzer_cls) -> None: + float_iter = fuzzer_cls(seed=0, dtype=torch.float32).take(n) + int_iter = fuzzer_cls(seed=0, dtype=torch.int32).take(n) + raw_results = [] + for i, (float_values, int_values) in enumerate(zip(float_iter, int_iter, strict=True)): + float_tensors, float_tensor_params, float_params = float_values + int_tensors, int_tensor_params, int_params = int_values + + # This benchmark assumes that the two fuzzers generate identically + # sized and strided Tensors, since the same seed is used. + assert_dicts_equal(float_params, int_params) + assert_dicts_equal(float_tensor_params["x"], int_tensor_params["x"]) + + float_measurement, int_measurement = ( + Timer( + stmt, + globals=tensors, + ).blocked_autorange(min_run_time=_MEASURE_TIME) + for tensors in (float_tensors, int_tensors) + ) + + descriptions = [] + for name in float_tensors: + shape_str = "(" + ", ".join([ + f"2 ** {int(np.log2(i))}" + if 2 ** int(np.log2(i)) == i and i > 1 + else str(i) + for i in float_tensors[name].shape + ]) + ")" + order = float_tensor_params[name]["order"] + order_str = ("" if all(order == np.arange(len(order))) else str(tuple(order))) + steps = float_tensor_params[name]["steps"] + steps_str = str(steps) if sum(steps) > len(steps) else "" + descriptions.append((name, shape_str, order_str, steps_str)) + raw_results.append((float_measurement, int_measurement, descriptions)) + + print(f"\r{i + 1} / {n}", end="") + print() + + parsed_results, name_len, shape_len, order_len, steps_len = [], 0, 0, 0, 0 + for float_measurement, int_measurement, descriptions in raw_results: + t_float = float_measurement.median * 1e6 + t_int = int_measurement.median * 1e6 + rel_diff = abs(t_float - t_int) / (t_float + t_int) * 2 + parsed_results.append((t_float, t_int, rel_diff, descriptions)) + for name, shape, order, steps in descriptions: + name_len = max(name_len, len(name)) + shape_len = max(shape_len, len(shape)) + order_len = max(order_len, len(order)) + steps_len = max(steps_len, len(steps)) + + parsed_results.sort(key=operator.itemgetter(2)) + + print(f"stmt: {stmt}") + print(f" diff faster{'':>17}{' ' * name_len} ", end="") + print(f"{'shape'.ljust(shape_len)}{'':>16}{'order'.ljust(order_len)}", end="") + print(f" steps\n{'-' * 100}") + for results, spacer in [(parsed_results[:10], "..."), (parsed_results[-10:], "")]: + for t_float, t_int, rel_diff, descriptions in results: + time_str = [f"{rel_diff * 100:>4.1f}% {'int' if t_int < t_float else 'float':<20}"] + time_str.extend(["".ljust(len(time_str[0])) for _ in descriptions[:-1]]) + for t_str, (name, shape, order, steps) in zip(time_str, descriptions, strict=True): + name = f"{name}:".ljust(name_len + 1) + shape = shape.ljust(shape_len + 10) + order = order.ljust(order_len) + print(f"{t_str} {name} {shape}| {order} | {steps}") + print(spacer) + + +def main() -> None: + run(n=100, stmt="torch.median(x, dim=0)", fuzzer_cls=UnaryOpFuzzer) + run(n=100, stmt="torch.square(x)", fuzzer_cls=UnaryOpFuzzer) + run(n=100, stmt="x + y", fuzzer_cls=BinaryOpFuzzer) + + +if __name__ == "__main__": + main() diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/examples/simple_timeit.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/examples/simple_timeit.py new file mode 100644 index 0000000000000000000000000000000000000000..8137d4d8791975b46b1314c2f3a05ed048dbdcd3 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/examples/simple_timeit.py @@ -0,0 +1,25 @@ +"""Trivial use of Timer API: + +$ python -m examples.simple_timeit +""" + +import torch + +import torch.utils.benchmark as benchmark_utils + + +def main() -> None: + timer = benchmark_utils.Timer( + stmt="x + y", + globals={"x": torch.ones((4, 8)), "y": torch.ones((1, 8))}, + label="Broadcasting add (4x8)", + ) + + for i in range(3): + print(f"Run: {i}\n{'-' * 40}") + print(f"timeit:\n{timer.timeit(10000)}\n") + print(f"autorange:\n{timer.blocked_autorange()}\n\n") + + +if __name__ == "__main__": + main() diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/examples/spectral_ops_fuzz_test.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/examples/spectral_ops_fuzz_test.py new file mode 100644 index 0000000000000000000000000000000000000000..81a33c34bc8229a44838ea93c29af34895061c53 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/examples/spectral_ops_fuzz_test.py @@ -0,0 +1,114 @@ +# mypy: allow-untyped-defs +"""Microbenchmarks for the torch.fft module""" +from argparse import ArgumentParser +from collections import namedtuple +from collections.abc import Iterable + +import torch +import torch.fft +from torch.utils import benchmark +from torch.utils.benchmark.op_fuzzers.spectral import SpectralOpFuzzer + + +def _dim_options(ndim): + if ndim == 1: + return [None] + elif ndim == 2: + return [0, 1, None] + elif ndim == 3: + return [0, 1, 2, (0, 1), (0, 2), None] + raise ValueError(f"Expected ndim in range 1-3, got {ndim}") + + +def run_benchmark(name: str, function: object, dtype: torch.dtype, seed: int, device: str, samples: int, + probability_regular: float): + cuda = device == 'cuda' + spectral_fuzzer = SpectralOpFuzzer(seed=seed, dtype=dtype, cuda=cuda, + probability_regular=probability_regular) + results = [] + for tensors, tensor_params, params in spectral_fuzzer.take(samples): + shape = [params['k0'], params['k1'], params['k2']][:params['ndim']] + str_shape = ' x '.join([f"{s:<4}" for s in shape]) + sub_label = f"{str_shape} {'' if tensor_params['x']['is_contiguous'] else '(discontiguous)'}" + for dim in _dim_options(params['ndim']): + for nthreads in (1, 4, 16) if not cuda else (1,): + measurement = benchmark.Timer( + stmt='func(x, dim=dim)', + globals={'func': function, 'x': tensors['x'], 'dim': dim}, + label=f"{name}_{device}", + sub_label=sub_label, + description=f"dim={dim}", + num_threads=nthreads, + ).blocked_autorange(min_run_time=1) + measurement.metadata = { + 'name': name, + 'device': device, + 'dim': dim, + 'shape': shape, + } + measurement.metadata.update(tensor_params['x']) + results.append(measurement) + return results + + +Benchmark = namedtuple('Benchmark', ['name', 'function', 'dtype']) +BENCHMARKS = [ + Benchmark('fft_real', torch.fft.fftn, torch.float32), + Benchmark('fft_complex', torch.fft.fftn, torch.complex64), + Benchmark('ifft', torch.fft.ifftn, torch.complex64), + Benchmark('rfft', torch.fft.rfftn, torch.float32), + Benchmark('irfft', torch.fft.irfftn, torch.complex64), +] +BENCHMARK_MAP = {b.name: b for b in BENCHMARKS} +BENCHMARK_NAMES = [b.name for b in BENCHMARKS] +DEVICE_NAMES = ['cpu', 'cuda'] + +def _output_csv(file, results) -> None: + file.write('benchmark,device,num_threads,numel,shape,contiguous,dim,mean (us),median (us),iqr (us)\n') + for measurement in results: + metadata = measurement.metadata + device, dim, shape, name, numel, contiguous = ( + metadata['device'], metadata['dim'], metadata['shape'], + metadata['name'], metadata['numel'], metadata['is_contiguous']) + + if isinstance(dim, Iterable): + dim_str = '-'.join(str(d) for d in dim) + else: + dim_str = str(dim) + shape_str = 'x'.join(str(s) for s in shape) + + print(name, device, measurement.task_spec.num_threads, numel, shape_str, contiguous, dim_str, # type: ignore[possibly-undefined] + measurement.mean * 1e6, measurement.median * 1e6, measurement.iqr * 1e6, + sep=',', file=file) + + +if __name__ == '__main__': + parser = ArgumentParser(description=__doc__) + parser.add_argument('--device', type=str, choices=DEVICE_NAMES, nargs='+', default=DEVICE_NAMES) + parser.add_argument('--bench', type=str, choices=BENCHMARK_NAMES, nargs='+', default=BENCHMARK_NAMES) + parser.add_argument('--seed', type=int, default=0) + parser.add_argument('--samples', type=int, default=10) + parser.add_argument('--probability-regular', '--probability_regular', type=float, default=1.0) + parser.add_argument('-o', '--output', type=str) + args = parser.parse_args() + + num_benchmarks = len(args.device) * len(args.bench) + i = 0 + results = [] + for device in args.device: + for bench in (BENCHMARK_MAP[b] for b in args.bench): + results += run_benchmark( + name=bench.name, function=bench.function, dtype=bench.dtype, + seed=args.seed, device=device, samples=args.samples, + probability_regular=args.probability_regular) + i += 1 + print(f'Completed {bench.name} benchmark on {device} ({i} of {num_benchmarks})') + + if args.output is not None: + with open(args.output, 'w') as f: + _output_csv(f, results) + + compare = benchmark.Compare(results) + compare.trim_significant_figures() + compare.colorize() + compare.print() diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/op_fuzzers/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/op_fuzzers/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/op_fuzzers/binary.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/op_fuzzers/binary.py new file mode 100644 index 0000000000000000000000000000000000000000..e53c310111bec8166e6090f351e39153dbe400aa --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/op_fuzzers/binary.py @@ -0,0 +1,107 @@ +# mypy: allow-untyped-defs +import numpy as np +import torch + +from torch.utils.benchmark import Fuzzer, FuzzedParameter, ParameterAlias, FuzzedTensor + + +_MIN_DIM_SIZE = 16 +_MAX_DIM_SIZE = 16 * 1024 ** 2 +_POW_TWO_SIZES = tuple(2 ** i for i in range( + int(np.log2(_MIN_DIM_SIZE)), + int(np.log2(_MAX_DIM_SIZE)) + 1, +)) + + +class BinaryOpFuzzer(Fuzzer): + def __init__(self, seed, dtype=torch.float32, cuda=False) -> None: + super().__init__( + parameters=[ + # Dimensionality of x and y. (e.g. 1D, 2D, or 3D.) + FuzzedParameter("dim", distribution={1: 0.3, 2: 0.4, 3: 0.3}, strict=True), + + # Shapes for `x` and `y`. + # It is important to test all shapes, however + # powers of two are especially important and therefore + # warrant special attention. This is done by generating + # both a value drawn from all integers between the min and + # max allowed values, and another from only the powers of two + # (both distributions are loguniform) and then randomly + # selecting between the two. + # Moreover, `y` will occasionally have singleton + # dimensions in order to test broadcasting. + [ + FuzzedParameter( + name=f"k_any_{i}", + minval=_MIN_DIM_SIZE, + maxval=_MAX_DIM_SIZE, + distribution="loguniform", + ) for i in range(3) + ], + [ + FuzzedParameter( + name=f"k_pow2_{i}", + distribution={size: 1. / len(_POW_TWO_SIZES) for size in _POW_TWO_SIZES} + ) for i in range(3) + ], + [ + FuzzedParameter( + name=f"k{i}", + distribution={ + ParameterAlias(f"k_any_{i}"): 0.8, + ParameterAlias(f"k_pow2_{i}"): 0.2, + }, + strict=True, + ) for i in range(3) + ], + + [ + FuzzedParameter( + name=f"y_k{i}", + distribution={ + ParameterAlias(f"k{i}"): 0.8, + 1: 0.2, + }, + strict=True, + ) for i in range(3) + ], + + # Steps for `x` and `y`. (Benchmarks strided memory access.) + [ + FuzzedParameter( + name=f"{name}_step_{i}", + distribution={1: 0.8, 2: 0.06, 4: 0.06, 8: 0.04, 16: 0.04}, + ) + for i in range(3) + for name in ("x", "y") + ], + + # Repeatable entropy for downstream applications. + FuzzedParameter(name="random_value", minval=0, maxval=2 ** 32 - 1, distribution="uniform"), + ], + tensors=[ + FuzzedTensor( + name="x", + size=("k0", "k1", "k2"), + steps=("x_step_0", "x_step_1", "x_step_2"), + probability_contiguous=0.75, + min_elements=4 * 1024, + max_elements=32 * 1024 ** 2, + max_allocation_bytes=2 * 1024**3, # 2 GB + dim_parameter="dim", + dtype=dtype, + cuda=cuda, + ), + FuzzedTensor( + name="y", + size=("y_k0", "y_k1", "y_k2"), + steps=("x_step_0", "x_step_1", "x_step_2"), + probability_contiguous=0.75, + max_allocation_bytes=2 * 1024**3, # 2 GB + dim_parameter="dim", + dtype=dtype, + cuda=cuda, + ), + ], + seed=seed, + ) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/op_fuzzers/sparse_binary.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/op_fuzzers/sparse_binary.py new file mode 100644 index 0000000000000000000000000000000000000000..8e6269464e0d53d2c3c51ed5406d7c88598fec79 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/op_fuzzers/sparse_binary.py @@ -0,0 +1,107 @@ +# mypy: allow-untyped-defs +import numpy as np +import torch + +from torch.utils.benchmark import Fuzzer, FuzzedParameter, ParameterAlias, FuzzedSparseTensor + + +_MIN_DIM_SIZE = 16 +_MAX_DIM_SIZE = 16 * 1024 ** 2 +_POW_TWO_SIZES = tuple(2 ** i for i in range( + int(np.log2(_MIN_DIM_SIZE)), + int(np.log2(_MAX_DIM_SIZE)) + 1, +)) + + +class BinaryOpSparseFuzzer(Fuzzer): + def __init__(self, seed, dtype=torch.float32, cuda=False) -> None: + super().__init__( + parameters=[ + # Dimensionality of x and y. (e.g. 1D, 2D, or 3D.) + FuzzedParameter("dim_parameter", distribution={1: 0.3, 2: 0.4, 3: 0.3}, strict=True), + FuzzedParameter( + name="sparse_dim", + distribution={1: 0.4, 2: 0.4, 3: 0.2}, + strict=True + ), + # Shapes for `x` and `y`. + # It is important to test all shapes, however + # powers of two are especially important and therefore + # warrant special attention. This is done by generating + # both a value drawn from all integers between the min and + # max allowed values, and another from only the powers of two + # (both distributions are loguniform) and then randomly + # selecting between the two. + # Moreover, `y` will occasionally have singleton + # dimensions in order to test broadcasting. + [ + FuzzedParameter( + name=f"k_any_{i}", + minval=_MIN_DIM_SIZE, + maxval=_MAX_DIM_SIZE, + distribution="loguniform", + ) for i in range(3) + ], + [ + FuzzedParameter( + name=f"k_pow2_{i}", + distribution={size: 1. / len(_POW_TWO_SIZES) for size in _POW_TWO_SIZES} + ) for i in range(3) + ], + [ + FuzzedParameter( + name=f"k{i}", + distribution={ + ParameterAlias(f"k_any_{i}"): 0.8, + ParameterAlias(f"k_pow2_{i}"): 0.2, + }, + strict=True, + ) for i in range(3) + ], + [ + FuzzedParameter( + name=f"y_k{i}", + distribution={ + ParameterAlias(f"k{i}"): 1.0}, + strict=True, + ) for i in range(3) + ], + FuzzedParameter( + name="density", + distribution={0.1: 0.4, 0.05: 0.3, 0.01: 0.3}, + ), + FuzzedParameter( + name="coalesced", + distribution={True: 0.5, False: 0.5}, + ), + # Repeatable entropy for downstream applications. + FuzzedParameter(name="random_value", minval=0, maxval=2 ** 32 - 1, distribution="uniform"), + ], + tensors=[ + FuzzedSparseTensor( + name="x", + size=("k0", "k1", "k2"), + dim_parameter="dim_parameter", + sparse_dim="sparse_dim", + density="density", + coalesced="coalesced", + min_elements=4 * 1024, + max_elements=32 * 1024 ** 2, + dtype=dtype, + cuda=cuda, + ), + FuzzedSparseTensor( + name="y", + size=("y_k0", "y_k1", "y_k2"), + dim_parameter="dim_parameter", + sparse_dim="sparse_dim", + density="density", + coalesced="coalesced", + min_elements=4 * 1024, + max_elements=32 * 1024 ** 2, + dtype=dtype, + cuda=cuda, + ), + ], + seed=seed, + ) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/op_fuzzers/sparse_unary.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/op_fuzzers/sparse_unary.py new file mode 100644 index 0000000000000000000000000000000000000000..18921becd078cb3140a1705078dd57f4a597a2ec --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/op_fuzzers/sparse_unary.py @@ -0,0 +1,92 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING + +import numpy as np +import torch + +if TYPE_CHECKING: + from torch.types import _dtype + +from torch.utils.benchmark import Fuzzer, FuzzedParameter, ParameterAlias, FuzzedSparseTensor + +__all__ = ["UnaryOpSparseFuzzer"] + +_MIN_DIM_SIZE = 16 +_MAX_DIM_SIZE = 16 * 1024 ** 2 +_POW_TWO_SIZES = tuple(2 ** i for i in range( + int(np.log2(_MIN_DIM_SIZE)), + int(np.log2(_MAX_DIM_SIZE)) + 1, +)) + +class UnaryOpSparseFuzzer(Fuzzer): + def __init__(self, seed: int | None, dtype: _dtype | None = None, cuda: bool = False) -> None: + if dtype is None: + dtype = getattr(torch, 'float32', None) + super().__init__( + parameters=[ + # Sparse dim parameter of x. (e.g. 1D, 2D, or 3D.) + FuzzedParameter("dim_parameter", distribution={1: 0.3, 2: 0.4, 3: 0.3}, strict=True), + FuzzedParameter( + name="sparse_dim", + distribution={1: 0.4, 2: 0.4, 3: 0.2}, + strict=True + ), + # Shapes for `x`. + # It is important to test all shapes, however + # powers of two are especially important and therefore + # warrant special attention. This is done by generating + # both a value drawn from all integers between the min and + # max allowed values, and another from only the powers of two + # (both distributions are loguniform) and then randomly + # selecting between the two. + [ + FuzzedParameter( + name=f"k_any_{i}", + minval=_MIN_DIM_SIZE, + maxval=_MAX_DIM_SIZE, + distribution="loguniform", + ) for i in range(3) + ], + [ + FuzzedParameter( + name=f"k_pow2_{i}", + distribution={size: 1. / len(_POW_TWO_SIZES) for size in _POW_TWO_SIZES} + ) for i in range(3) + ], + [ + FuzzedParameter( + name=f"k{i}", + distribution={ + ParameterAlias(f"k_any_{i}"): 0.8, + ParameterAlias(f"k_pow2_{i}"): 0.2, + }, + strict=True, + ) for i in range(3) + ], + FuzzedParameter( + name="density", + distribution={0.1: 0.4, 0.05: 0.3, 0.01: 0.3}, + ), + FuzzedParameter( + name="coalesced", + distribution={True: 0.5, False: 0.5}, + ), + FuzzedParameter(name="random_value", minval=0, maxval=2 ** 32 - 1, distribution="uniform"), + ], + tensors=[ + FuzzedSparseTensor( + name="x", + size=("k0", "k1", "k2"), + dim_parameter="dim_parameter", + sparse_dim="sparse_dim", + min_elements=4 * 1024, + max_elements=32 * 1024 ** 2, + density="density", + coalesced="coalesced", + dtype=dtype, + cuda=cuda, + ), + ], + seed=seed, + ) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/op_fuzzers/spectral.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/op_fuzzers/spectral.py new file mode 100644 index 0000000000000000000000000000000000000000..c324e338dca5da3d2b8b9a55e7d89f108d6783dd --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/op_fuzzers/spectral.py @@ -0,0 +1,94 @@ +# mypy: allow-untyped-defs +import math + +import torch +from torch.utils import benchmark +from torch.utils.benchmark import FuzzedParameter, FuzzedTensor, ParameterAlias + + +__all__ = ['SpectralOpFuzzer'] + +MIN_DIM_SIZE = 16 +MAX_DIM_SIZE = 16 * 1024 + +def power_range(upper_bound, base): + return (base ** i for i in range(int(math.log(upper_bound, base)) + 1)) + +# List of regular numbers from MIN_DIM_SIZE to MAX_DIM_SIZE +# These numbers factorize into multiples of prime factors 2, 3, and 5 only +# and are usually the fastest in FFT implementations. +REGULAR_SIZES = [] +for i in power_range(MAX_DIM_SIZE, 2): + for j in power_range(MAX_DIM_SIZE // i, 3): + ij = i * j + for k in power_range(MAX_DIM_SIZE // ij, 5): + ijk = ij * k + if ijk > MIN_DIM_SIZE: + REGULAR_SIZES.append(ijk) +REGULAR_SIZES.sort() + +class SpectralOpFuzzer(benchmark.Fuzzer): + def __init__(self, *, seed: int, dtype=torch.float64, + cuda: bool = False, probability_regular: float = 1.0) -> None: + super().__init__( + parameters=[ + # Dimensionality of x. (e.g. 1D, 2D, or 3D.) + FuzzedParameter("ndim", distribution={1: 0.3, 2: 0.4, 3: 0.3}, strict=True), + + # Shapes for `x`. + # It is important to test all shapes, however + # regular sizes are especially important to the FFT and therefore + # warrant special attention. This is done by generating + # both a value drawn from all integers between the min and + # max allowed values, and another from only the regular numbers + # (both distributions are loguniform) and then randomly + # selecting between the two. + [ + FuzzedParameter( + name=f"k_any_{i}", + minval=MIN_DIM_SIZE, + maxval=MAX_DIM_SIZE, + distribution="loguniform", + ) for i in range(3) + ], + [ + FuzzedParameter( + name=f"k_regular_{i}", + distribution={size: 1. / len(REGULAR_SIZES) for size in REGULAR_SIZES} + ) for i in range(3) + ], + [ + FuzzedParameter( + name=f"k{i}", + distribution={ + ParameterAlias(f"k_regular_{i}"): probability_regular, + ParameterAlias(f"k_any_{i}"): 1 - probability_regular, + }, + strict=True, + ) for i in range(3) + ], + + # Steps for `x`. (Benchmarks strided memory access.) + [ + FuzzedParameter( + name=f"step_{i}", + distribution={1: 0.8, 2: 0.06, 4: 0.06, 8: 0.04, 16: 0.04}, + ) for i in range(3) + ], + ], + tensors=[ + FuzzedTensor( + name="x", + size=("k0", "k1", "k2"), + steps=("step_0", "step_1", "step_2"), + probability_contiguous=0.75, + min_elements=4 * 1024, + max_elements=32 * 1024 ** 2, + max_allocation_bytes=2 * 1024**3, # 2 GB + dim_parameter="ndim", + dtype=dtype, + cuda=cuda, + ), + ], + seed=seed, + ) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/op_fuzzers/unary.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/op_fuzzers/unary.py new file mode 100644 index 0000000000000000000000000000000000000000..6008adfe459218cd0e239efede5a3f1cd35ee61b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/op_fuzzers/unary.py @@ -0,0 +1,82 @@ +# mypy: allow-untyped-defs +import numpy as np +import torch + +from torch.utils.benchmark import Fuzzer, FuzzedParameter, ParameterAlias, FuzzedTensor + + +_MIN_DIM_SIZE = 16 +_MAX_DIM_SIZE = 16 * 1024 ** 2 +_POW_TWO_SIZES = tuple(2 ** i for i in range( + int(np.log2(_MIN_DIM_SIZE)), + int(np.log2(_MAX_DIM_SIZE)) + 1, +)) + + +class UnaryOpFuzzer(Fuzzer): + def __init__(self, seed, dtype=torch.float32, cuda=False) -> None: + super().__init__( + parameters=[ + # Dimensionality of x. (e.g. 1D, 2D, or 3D.) + FuzzedParameter("dim", distribution={1: 0.3, 2: 0.4, 3: 0.3}, strict=True), + + # Shapes for `x`. + # It is important to test all shapes, however + # powers of two are especially important and therefore + # warrant special attention. This is done by generating + # both a value drawn from all integers between the min and + # max allowed values, and another from only the powers of two + # (both distributions are loguniform) and then randomly + # selecting between the two. + [ + FuzzedParameter( + name=f"k_any_{i}", + minval=_MIN_DIM_SIZE, + maxval=_MAX_DIM_SIZE, + distribution="loguniform", + ) for i in range(3) + ], + [ + FuzzedParameter( + name=f"k_pow2_{i}", + distribution={size: 1. / len(_POW_TWO_SIZES) for size in _POW_TWO_SIZES} + ) for i in range(3) + ], + [ + FuzzedParameter( + name=f"k{i}", + distribution={ + ParameterAlias(f"k_any_{i}"): 0.8, + ParameterAlias(f"k_pow2_{i}"): 0.2, + }, + strict=True, + ) for i in range(3) + ], + + # Steps for `x`. (Benchmarks strided memory access.) + [ + FuzzedParameter( + name=f"x_step_{i}", + distribution={1: 0.8, 2: 0.06, 4: 0.06, 8: 0.04, 16: 0.04}, + ) for i in range(3) + ], + + # Repeatable entropy for downstream applications. + FuzzedParameter(name="random_value", minval=0, maxval=2 ** 32 - 1, distribution="uniform"), + ], + tensors=[ + FuzzedTensor( + name="x", + size=("k0", "k1", "k2"), + steps=("x_step_0", "x_step_1", "x_step_2"), + probability_contiguous=0.75, + min_elements=4 * 1024, + max_elements=32 * 1024 ** 2, + max_allocation_bytes=2 * 1024**3, # 2 GB + dim_parameter="dim", + dtype=dtype, + cuda=cuda, + ), + ], + seed=seed, + ) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/_stubs.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/_stubs.py new file mode 100644 index 0000000000000000000000000000000000000000..c91e3d12b29e1c050edbadaebb877d7fc0761e57 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/_stubs.py @@ -0,0 +1,42 @@ +from typing import Any +from collections.abc import Callable +from typing_extensions import Protocol, runtime_checkable + + +class TimerClass(Protocol): + """This is the portion of the `timeit.Timer` API used by benchmark utils.""" + def __init__( + self, + stmt: str, + setup: str, + timer: Callable[[], float], + globals: dict[str, Any], + **kwargs: Any, + ) -> None: + ... + + def timeit(self, number: int) -> float: + ... + + +@runtime_checkable +class TimeitModuleType(Protocol): + """Modules generated from `timeit_template.cpp`.""" + def timeit(self, number: int) -> float: + ... + + +class CallgrindModuleType(Protocol): + """Replicates the valgrind endpoints in `torch._C`. + + These bindings are used to collect Callgrind profiles on earlier versions + of PyTorch and will eventually be removed. + """ + __file__: str + __name__: str + + def _valgrind_supported_platform(self) -> bool: + ... + + def _valgrind_toggle(self) -> None: + ... diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/common.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/common.py new file mode 100644 index 0000000000000000000000000000000000000000..d4f328d19083f0fc92da79e34d70a68b8ef891ff --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/common.py @@ -0,0 +1,359 @@ +"""Base shared classes and utilities.""" + +import collections +import contextlib +import dataclasses +import os +import shutil +import tempfile +import textwrap +import time +from typing import cast, Any +from collections.abc import Iterable, Iterator +import uuid + +import torch + + +__all__ = ["TaskSpec", "Measurement", "select_unit", "unit_to_english", "trim_sigfig", "ordered_unique", "set_torch_threads"] + + +_MAX_SIGNIFICANT_FIGURES = 4 +_MIN_CONFIDENCE_INTERVAL = 25e-9 # 25 ns + +# Measurement will include a warning if the distribution is suspect. All +# runs are expected to have some variation; these parameters set the +# thresholds. +_IQR_WARN_THRESHOLD = 0.1 +_IQR_GROSS_WARN_THRESHOLD = 0.25 + + +@dataclasses.dataclass(init=True, repr=False, eq=True, frozen=True) +class TaskSpec: + """Container for information used to define a Timer. (except globals)""" + stmt: str + setup: str + global_setup: str = "" + label: str | None = None + sub_label: str | None = None + description: str | None = None + env: str | None = None + num_threads: int = 1 + + @property + def title(self) -> str: + """Best effort attempt at a string label for the measurement.""" + if self.label is not None: + return self.label + (f": {self.sub_label}" if self.sub_label else "") + elif "\n" not in self.stmt: + return self.stmt + (f": {self.sub_label}" if self.sub_label else "") + return ( + f"stmt:{f' ({self.sub_label})' if self.sub_label else ''}\n" + f"{textwrap.indent(self.stmt, ' ')}" + ) + + def setup_str(self) -> str: + return ( + "" if (self.setup == "pass" or not self.setup) + else f"setup:\n{textwrap.indent(self.setup, ' ')}" if "\n" in self.setup + else f"setup: {self.setup}" + ) + + def summarize(self) -> str: + """Build TaskSpec portion of repr string for other containers.""" + sections = [ + self.title, + self.description or "", + self.setup_str(), + ] + return "\n".join([f"{i}\n" if "\n" in i else i for i in sections if i]) + +_TASKSPEC_FIELDS = tuple(i.name for i in dataclasses.fields(TaskSpec)) + + +@dataclasses.dataclass(init=True, repr=False) +class Measurement: + """The result of a Timer measurement. + + This class stores one or more measurements of a given statement. It is + serializable and provides several convenience methods + (including a detailed __repr__) for downstream consumers. + """ + number_per_run: int + raw_times: list[float] + task_spec: TaskSpec + metadata: dict[Any, Any] | None = None # Reserved for user payloads. + + def __post_init__(self) -> None: + self._sorted_times: tuple[float, ...] = () + self._warnings: tuple[str, ...] = () + self._median: float = -1.0 + self._mean: float = -1.0 + self._p25: float = -1.0 + self._p75: float = -1.0 + + def __getattr__(self, name: str) -> Any: + # Forward TaskSpec fields for convenience. + if name in _TASKSPEC_FIELDS: + return getattr(self.task_spec, name) + return super().__getattribute__(name) + + # ========================================================================= + # == Convenience methods for statistics =================================== + # ========================================================================= + # + # These methods use raw time divided by number_per_run; this is an + # extrapolation and hides the fact that different number_per_run will + # result in different amortization of overheads, however if Timer has + # selected an appropriate number_per_run then this is a non-issue, and + # forcing users to handle that division would result in a poor experience. + @property + def times(self) -> list[float]: + return [t / self.number_per_run for t in self.raw_times] + + @property + def median(self) -> float: + self._lazy_init() + return self._median + + @property + def mean(self) -> float: + self._lazy_init() + return self._mean + + @property + def iqr(self) -> float: + self._lazy_init() + return self._p75 - self._p25 + + @property + def significant_figures(self) -> int: + """Approximate significant figure estimate. + + This property is intended to give a convenient way to estimate the + precision of a measurement. It only uses the interquartile region to + estimate statistics to try to mitigate skew from the tails, and + uses a static z value of 1.645 since it is not expected to be used + for small values of `n`, so z can approximate `t`. + + The significant figure estimation used in conjunction with the + `trim_sigfig` method to provide a more human interpretable data + summary. __repr__ does not use this method; it simply displays raw + values. Significant figure estimation is intended for `Compare`. + """ + self._lazy_init() + n_total = len(self._sorted_times) + lower_bound = int(n_total // 4) + upper_bound = int(torch.tensor(3 * n_total / 4).ceil()) + interquartile_points: tuple[float, ...] = self._sorted_times[lower_bound:upper_bound] + std = torch.tensor(interquartile_points).std(unbiased=False).item() + sqrt_n = torch.tensor(len(interquartile_points)).sqrt().item() + + # Rough estimates. These are by no means statistically rigorous. + confidence_interval = max(1.645 * std / sqrt_n, _MIN_CONFIDENCE_INTERVAL) + relative_ci = torch.tensor(self._median / confidence_interval).log10().item() + num_significant_figures = int(torch.tensor(relative_ci).floor()) + return min(max(num_significant_figures, 1), _MAX_SIGNIFICANT_FIGURES) + + @property + def has_warnings(self) -> bool: + self._lazy_init() + return bool(self._warnings) + + def _lazy_init(self) -> None: + if self.raw_times and not self._sorted_times: + self._sorted_times = tuple(sorted(self.times)) + _sorted_times = torch.tensor(self._sorted_times, dtype=torch.float64) + self._median = _sorted_times.quantile(.5).item() + self._mean = _sorted_times.mean().item() + self._p25 = _sorted_times.quantile(.25).item() + self._p75 = _sorted_times.quantile(.75).item() + + def add_warning(msg: str) -> None: + rel_iqr = self.iqr / self.median * 100 + self._warnings += ( + f" WARNING: Interquartile range is {rel_iqr:.1f}% " + f"of the median measurement.\n {msg}", + ) + + if not self.meets_confidence(_IQR_GROSS_WARN_THRESHOLD): + add_warning("This suggests significant environmental influence.") + elif not self.meets_confidence(_IQR_WARN_THRESHOLD): + add_warning("This could indicate system fluctuation.") + + + def meets_confidence(self, threshold: float = _IQR_WARN_THRESHOLD) -> bool: + return self.iqr / self.median < threshold + + @property + def title(self) -> str: + return self.task_spec.title + + @property + def env(self) -> str: + return ( + "Unspecified env" if self.taskspec.env is None + else cast(str, self.taskspec.env) + ) + + @property + def as_row_name(self) -> str: + return self.sub_label or self.stmt or "[Unknown]" + + def __repr__(self) -> str: + """ + Example repr: + + Broadcasting add (4x8) + Median: 5.73 us + IQR: 2.25 us (4.01 to 6.26) + 372 measurements, 100 runs per measurement, 1 thread + WARNING: Interquartile range is 39.4% of the median measurement. + This suggests significant environmental influence. + """ + self._lazy_init() + skip_line, newline = "MEASUREMENT_REPR_SKIP_LINE", "\n" + n = len(self._sorted_times) + time_unit, time_scale = select_unit(self._median) + iqr_filter = '' if n >= 4 else skip_line + + repr_str = f""" +{super().__repr__()} +{self.task_spec.summarize()} + {'Median: ' if n > 1 else ''}{self._median / time_scale:.2f} {time_unit} + {iqr_filter}IQR: {self.iqr / time_scale:.2f} {time_unit} ({self._p25 / time_scale:.2f} to {self._p75 / time_scale:.2f}) + {n} measurement{'s' if n > 1 else ''}, {self.number_per_run} runs {'per measurement,' if n > 1 else ','} {self.num_threads} thread{'s' if self.num_threads > 1 else ''} +{newline.join(self._warnings)}""".strip() # noqa: B950 + + return "\n".join(l for l in repr_str.splitlines(keepends=False) if skip_line not in l) + + @staticmethod + def merge(measurements: Iterable["Measurement"]) -> list["Measurement"]: + """Convenience method for merging replicates. + + Merge will extrapolate times to `number_per_run=1` and will not + transfer any metadata. (Since it might differ between replicates) + """ + grouped_measurements: collections.defaultdict[TaskSpec, list[Measurement]] = collections.defaultdict(list) + for m in measurements: + grouped_measurements[m.task_spec].append(m) + + def merge_group(task_spec: TaskSpec, group: list["Measurement"]) -> "Measurement": + times: list[float] = [] + for m in group: + # Different measurements could have different `number_per_run`, + # so we call `.times` which normalizes the results. + times.extend(m.times) + + return Measurement( + number_per_run=1, + raw_times=times, + task_spec=task_spec, + metadata=None, + ) + + return [merge_group(t, g) for t, g in grouped_measurements.items()] + + +def select_unit(t: float) -> tuple[str, float]: + """Determine how to scale times for O(1) magnitude. + + This utility is used to format numbers for human consumption. + """ + time_unit = {-3: "ns", -2: "us", -1: "ms"}.get(int(torch.tensor(t).log10().item() // 3), "s") + time_scale = {"ns": 1e-9, "us": 1e-6, "ms": 1e-3, "s": 1}[time_unit] + return time_unit, time_scale + + +def unit_to_english(u: str) -> str: + return { + "ns": "nanosecond", + "us": "microsecond", + "ms": "millisecond", + "s": "second", + }[u] + + +def trim_sigfig(x: float, n: int) -> float: + """Trim `x` to `n` significant figures. (e.g. 3.14159, 2 -> 3.10000)""" + if n != int(n): + raise AssertionError("Number of significant figures must be an integer") + magnitude = int(torch.tensor(x).abs().log10().ceil().item()) + scale = 10 ** (magnitude - n) + return float(torch.tensor(x / scale).round() * scale) + + +def ordered_unique(elements: Iterable[Any]) -> list[Any]: + return list(collections.OrderedDict(dict.fromkeys(elements)).keys()) + + +@contextlib.contextmanager +def set_torch_threads(n: int) -> Iterator[None]: + prior_num_threads = torch.get_num_threads() + try: + torch.set_num_threads(n) + yield + finally: + torch.set_num_threads(prior_num_threads) + + +def _make_temp_dir(prefix: str | None = None, gc_dev_shm: bool = False) -> str: + """Create a temporary directory. The caller is responsible for cleanup. + + This function is conceptually similar to `tempfile.mkdtemp`, but with + the key additional feature that it will use shared memory if the + `BENCHMARK_USE_DEV_SHM` environment variable is set. This is an + implementation detail, but an important one for cases where many Callgrind + measurements are collected at once. (Such as when collecting + microbenchmarks.) + + This is an internal utility, and is exported solely so that microbenchmarks + can reuse the util. + """ + use_dev_shm: bool = (os.getenv("BENCHMARK_USE_DEV_SHM") or "").lower() in ("1", "true") + if use_dev_shm: + root = "/dev/shm/pytorch_benchmark_utils" + if os.name != "posix": + raise AssertionError(f"tmpfs (/dev/shm) is POSIX only, current platform is {os.name}") + if not os.path.exists("/dev/shm"): + raise AssertionError("This system does not appear to support tmpfs (/dev/shm).") + os.makedirs(root, exist_ok=True) + + # Because we're working in shared memory, it is more important than + # usual to clean up ALL intermediate files. However we don't want every + # worker to walk over all outstanding directories, so instead we only + # check when we are sure that it won't lead to contention. + if gc_dev_shm: + for i in os.listdir(root): + owner_file = os.path.join(root, i, "owner.pid") + if not os.path.exists(owner_file): + continue + + with open(owner_file) as f: + owner_pid = int(f.read()) + + if owner_pid == os.getpid(): + continue + + try: + # https://stackoverflow.com/questions/568271/how-to-check-if-there-exists-a-process-with-a-given-pid-in-python + os.kill(owner_pid, 0) + + except OSError: + print(f"Detected that {os.path.join(root, i)} was orphaned in shared memory. Cleaning up.") + shutil.rmtree(os.path.join(root, i)) + + else: + root = tempfile.gettempdir() + + # We include the time so names sort by creation time, and add a UUID + # to ensure we don't collide. + name = f"{prefix or tempfile.gettempprefix()}__{int(time.time())}__{uuid.uuid4()}" + path = os.path.join(root, name) + os.makedirs(path, exist_ok=False) + + if use_dev_shm: + with open(os.path.join(path, "owner.pid"), "w") as f: + f.write(str(os.getpid())) + + return path diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/compare.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/compare.py new file mode 100644 index 0000000000000000000000000000000000000000..c1e232e6e04260f277254c9b181c63dfeaadee62 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/compare.py @@ -0,0 +1,345 @@ +# mypy: allow-untyped-defs +"""Display class to aggregate and print the results of many measurements.""" +import collections +import enum +import itertools as it + +from torch.utils.benchmark.utils import common +from torch import tensor as _tensor +import operator + +__all__ = ["Colorize", "Compare"] + +BEST = "\033[92m" +GOOD = "\033[34m" +BAD = "\033[2m\033[91m" +VERY_BAD = "\033[31m" +BOLD = "\033[1m" +TERMINATE = "\033[0m" + + +class Colorize(enum.Enum): + NONE = "none" + COLUMNWISE = "columnwise" + ROWWISE = "rowwise" + + +# Classes to separate internal bookkeeping from what is rendered. +class _Column: + def __init__( + self, + grouped_results: list[tuple[common.Measurement | None, ...]], + time_scale: float, + time_unit: str, + trim_significant_figures: bool, + highlight_warnings: bool, + ) -> None: + self._grouped_results = grouped_results + self._flat_results = [*it.chain.from_iterable(grouped_results)] + self._time_scale = time_scale + self._time_unit = time_unit + self._trim_significant_figures = trim_significant_figures + self._highlight_warnings = ( + highlight_warnings + and any(r.has_warnings for r in self._flat_results if r) + ) + leading_digits = [ + int(_tensor(r.median / self._time_scale).log10().ceil()) if r else None + for r in self._flat_results + ] + unit_digits = max(d for d in leading_digits if d is not None) + decimal_digits = min( + max(m.significant_figures - digits, 0) + for digits, m in zip(leading_digits, self._flat_results, strict=True) + if (m is not None) and (digits is not None) + ) if self._trim_significant_figures else 1 + length = unit_digits + decimal_digits + (1 if decimal_digits else 0) + self._template = f"{{:>{length}.{decimal_digits}f}}{{:>{7 if self._highlight_warnings else 0}}}" + + def get_results_for(self, group): + return self._grouped_results[group] + + def num_to_str(self, value: float | None, estimated_sigfigs: int, spread: float | None): + if value is None: + return " " * len(self.num_to_str(1, estimated_sigfigs, None)) + + if self._trim_significant_figures: + value = common.trim_sigfig(value, estimated_sigfigs) + + return self._template.format( + value, + f" (! {spread * 100:.0f}%)" if self._highlight_warnings and spread is not None else "") + + +def optional_min(seq): + l = list(seq) + return None if len(l) == 0 else min(l) + + +class _Row: + def __init__(self, results, row_group, render_env, env_str_len, + row_name_str_len, time_scale, colorize, num_threads=None) -> None: + super().__init__() + self._results = results + self._row_group = row_group + self._render_env = render_env + self._env_str_len = env_str_len + self._row_name_str_len = row_name_str_len + self._time_scale = time_scale + self._colorize = colorize + self._columns: tuple[_Column, ...] = () + self._num_threads = num_threads + + def register_columns(self, columns: tuple[_Column, ...]) -> None: + self._columns = columns + + def as_column_strings(self): + concrete_results = [r for r in self._results if r is not None] + env = f"({concrete_results[0].env})" if self._render_env else "" + env = env.ljust(self._env_str_len + 4) + output = [" " + env + concrete_results[0].as_row_name] + for m, col in zip(self._results, self._columns or (), strict=False): + if m is None: + output.append(col.num_to_str(None, 1, None)) + else: + output.append(col.num_to_str( + m.median / self._time_scale, + m.significant_figures, + m.iqr / m.median if m.has_warnings else None + )) + return output + + @staticmethod + def color_segment(segment, value, best_value): + if value <= best_value * 1.01 or value <= best_value + 100e-9: + return BEST + BOLD + segment + TERMINATE * 2 + if value <= best_value * 1.1: + return GOOD + BOLD + segment + TERMINATE * 2 + if value >= best_value * 5: + return VERY_BAD + BOLD + segment + TERMINATE * 2 + if value >= best_value * 2: + return BAD + segment + TERMINATE * 2 + + return segment + + def row_separator(self, overall_width): + return ( + [f"{self._num_threads} threads: ".ljust(overall_width, "-")] + if self._num_threads is not None else [] + ) + + def finalize_column_strings(self, column_strings, col_widths): + best_values = [-1 for _ in column_strings] + if self._colorize == Colorize.ROWWISE: + row_min = min(r.median for r in self._results if r is not None) + best_values = [row_min for _ in column_strings] + elif self._colorize == Colorize.COLUMNWISE: + best_values = [ + optional_min(r.median for r in column.get_results_for(self._row_group) if r is not None) + for column in (self._columns or ()) + ] + + row_contents = [column_strings[0].ljust(col_widths[0])] + for col_str, width, result, best_value in zip(column_strings[1:], col_widths[1:], self._results, best_values, strict=False): + col_str = col_str.center(width) + if self._colorize != Colorize.NONE and result is not None and best_value is not None: + col_str = self.color_segment(col_str, result.median, best_value) + row_contents.append(col_str) + return row_contents + + +class Table: + def __init__( + self, + results: list[common.Measurement], + colorize: Colorize, + trim_significant_figures: bool, + highlight_warnings: bool + ) -> None: + if len({r.label for r in results}) != 1: + raise AssertionError("All results must share the same label") + + self.results = results + self._colorize = colorize + self._trim_significant_figures = trim_significant_figures + self._highlight_warnings = highlight_warnings + self.label = results[0].label + self.time_unit, self.time_scale = common.select_unit( + min(r.median for r in results) + ) + + self.row_keys = common.ordered_unique([self.row_fn(i) for i in results]) + self.row_keys.sort(key=operator.itemgetter(slice(2))) # preserve stmt order + self.column_keys = common.ordered_unique([self.col_fn(i) for i in results]) + self.rows, self.columns = self.populate_rows_and_columns() + + @staticmethod + def row_fn(m: common.Measurement) -> tuple[int, str | None, str]: + return m.num_threads, m.env, m.as_row_name + + @staticmethod + def col_fn(m: common.Measurement) -> str | None: + return m.description + + def populate_rows_and_columns(self) -> tuple[tuple[_Row, ...], tuple[_Column, ...]]: + rows: list[_Row] = [] + columns: list[_Column] = [] + ordered_results: list[list[common.Measurement | None]] = [ + [None for _ in self.column_keys] + for _ in self.row_keys + ] + row_position = {key: i for i, key in enumerate(self.row_keys)} + col_position = {key: i for i, key in enumerate(self.column_keys)} + for r in self.results: + i = row_position[self.row_fn(r)] + j = col_position[self.col_fn(r)] + ordered_results[i][j] = r + + unique_envs = {r.env for r in self.results} + render_env = len(unique_envs) > 1 + env_str_len = max(len(i) for i in unique_envs) if render_env else 0 + + row_name_str_len = max(len(r.as_row_name) for r in self.results) + + prior_num_threads = -1 + prior_env = "" + row_group = -1 + rows_by_group: list[list[list[common.Measurement | None]]] = [] + for (num_threads, env, _), row in zip(self.row_keys, ordered_results, strict=True): + thread_transition = (num_threads != prior_num_threads) + if thread_transition: + prior_num_threads = num_threads + prior_env = "" + row_group += 1 + rows_by_group.append([]) + rows.append( + _Row( + results=row, + row_group=row_group, + render_env=(render_env and env != prior_env), + env_str_len=env_str_len, + row_name_str_len=row_name_str_len, + time_scale=self.time_scale, + colorize=self._colorize, + num_threads=num_threads if thread_transition else None, + ) + ) + rows_by_group[-1].append(row) + prior_env = env + + for i in range(len(self.column_keys)): + grouped_results = [tuple(row[i] for row in g) for g in rows_by_group] + column = _Column( + grouped_results=grouped_results, + time_scale=self.time_scale, + time_unit=self.time_unit, + trim_significant_figures=self._trim_significant_figures, + highlight_warnings=self._highlight_warnings,) + columns.append(column) + + rows_tuple, columns_tuple = tuple(rows), tuple(columns) + for ri in rows_tuple: + ri.register_columns(columns_tuple) + return rows_tuple, columns_tuple + + def render(self) -> str: + string_rows = [[""] + self.column_keys] + string_rows.extend(r.as_column_strings() for r in self.rows) + num_cols = max(len(i) for i in string_rows) + for sr in string_rows: + sr.extend(["" for _ in range(num_cols - len(sr))]) + + col_widths = [max(len(j) for j in i) for i in zip(*string_rows, strict=True)] + finalized_columns = [" | ".join(i.center(w) for i, w in zip(string_rows[0], col_widths, strict=True))] + overall_width = len(finalized_columns[0]) + for string_row, row in zip(string_rows[1:], self.rows, strict=True): + finalized_columns.extend(row.row_separator(overall_width)) + finalized_columns.append(" | ".join(row.finalize_column_strings(string_row, col_widths))) + + newline = "\n" + has_warnings = self._highlight_warnings and any(ri.has_warnings for ri in self.results) + return f""" +[{(' ' + (self.label or '') + ' ').center(overall_width - 2, '-')}] +{newline.join(finalized_columns)} + +Times are in {common.unit_to_english(self.time_unit)}s ({self.time_unit}). +{'(! XX%) Measurement has high variance, where XX is the IQR / median * 100.' + newline if has_warnings else ""}"""[1:] + + +class Compare: + """Helper class for displaying the results of many measurements in a + formatted table. + + The table format is based on the information fields provided in + :class:`torch.utils.benchmark.Timer` (`description`, `label`, `sub_label`, + `num_threads`, etc). + + The table can be directly printed using :meth:`print` or casted as a `str`. + + For a full tutorial on how to use this class, see: + https://pytorch.org/tutorials/recipes/recipes/benchmark.html + + Args: + results: List of Measurement to display. + """ + def __init__(self, results: list[common.Measurement]) -> None: + self._results: list[common.Measurement] = [] + self.extend_results(results) + self._trim_significant_figures = False + self._colorize = Colorize.NONE + self._highlight_warnings = False + + def __str__(self) -> str: + return "\n".join(self._render()) + + def extend_results(self, results) -> None: + """Append results to already stored ones. + + All added results must be instances of ``Measurement``. + """ + for r in results: + if not isinstance(r, common.Measurement): + raise ValueError( + "Expected an instance of `Measurement`, " f"got {type(r)} instead." + ) + self._results.extend(results) + + def trim_significant_figures(self) -> None: + """Enables trimming of significant figures when building the formatted table.""" + self._trim_significant_figures = True + + def colorize(self, rowwise=False) -> None: + """Colorize formatted table. + + Colorize columnwise by default. + """ + self._colorize = Colorize.ROWWISE if rowwise else Colorize.COLUMNWISE + + def highlight_warnings(self) -> None: + """Enables warning highlighting when building formatted table.""" + self._highlight_warnings = True + + def print(self) -> None: + """Print formatted table""" + print(str(self)) + + def _render(self): + results = common.Measurement.merge(self._results) + grouped_results = self._group_by_label(results) + output = [self._layout(group) for group in grouped_results.values()] + return output + + def _group_by_label(self, results: list[common.Measurement]): + grouped_results: collections.defaultdict[str, list[common.Measurement]] = collections.defaultdict(list) + for r in results: + grouped_results[r.label].append(r) + return grouped_results + + def _layout(self, results: list[common.Measurement]): + table = Table( + results, + self._colorize, + self._trim_significant_figures, + self._highlight_warnings + ) + return table.render() diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/compile.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/compile.py new file mode 100644 index 0000000000000000000000000000000000000000..dd15a582a274980bea4aff22f7325ccf562ecb13 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/compile.py @@ -0,0 +1,195 @@ +# mypy: allow-untyped-defs +from typing import Any, cast +from collections.abc import Callable + +import torch +import torch._dynamo +from torch._dynamo.testing import CompileCounterWithBackend +from torch.utils.benchmark import Timer + + +__all__ = ["bench_all", "benchmark_compile"] + + +_warned_tensor_cores = False +_default_float_32_precision = torch.get_float32_matmul_precision() + +try: + + from tabulate import tabulate + + HAS_TABULATE = True +except ModuleNotFoundError: + HAS_TABULATE = False + tabulate = None # type: ignore[assignment] + print("tabulate is not installed, please pip install tabulate to use this utility") + +if HAS_TABULATE: + def _enable_tensor_cores() -> None: + global _warned_tensor_cores + + if torch.cuda.is_available(): + if torch.backends.cuda.matmul.allow_tf32 is False and torch.cuda.get_device_capability() >= (8, 0): + torch.set_float32_matmul_precision("high") + if not _warned_tensor_cores: + print("Your GPU supports tensor cores") + print("we will enable it automatically by setting `torch.set_float32_matmul_precision('high')`") + _warned_tensor_cores = True + + def _disable_tensor_cores() -> None: + torch.set_float32_matmul_precision(_default_float_32_precision) + + def bench_loop( + model: torch.nn.Module | Callable, + sample_input: torch.Tensor | Any, + num_iters: int = 5, + optimizer: torch.optim.Optimizer | None = None, + loss_fn: Callable | None = None, + ): + # Define the statement and setup for the benchmark + if optimizer and loss_fn: + # Training mode + stmt = """ + output = model(sample_input) + loss = loss_fn(output) if loss_fn else output.sum() + loss.backward() + optimizer.step() + optimizer.zero_grad() + """ + else: + # Inference mode + stmt = "model(sample_input)" + + # Create the Timer object + timer = Timer( + stmt=stmt, + globals={"model": model, "sample_input": sample_input, "optimizer": optimizer, "loss_fn": loss_fn}, + ) + + + result = timer.timeit(number=num_iters) + + # Get the average time per iteration in milliseconds + avg_time = result.mean * 1000 + return round(avg_time, 2) + + def benchmark_compile( + model: torch.nn.Module | Callable, + sample_input: torch.Tensor | Any, + num_iters: int = 5, + backend: str | None = None, + mode: str | None = "default", + optimizer: torch.optim.Optimizer | None = None, + loss_fn : torch.nn.Module | Callable | None = None, + ): + """ + Use this utility to benchmark torch.compile + """ + if backend: + try: + torch._dynamo.reset() + compile_counter_with_backend = CompileCounterWithBackend(backend) + opt_model = torch.compile(model, backend=compile_counter_with_backend, mode=mode) + + # Compilation only happens after the first inference + compilation_time = bench_loop(opt_model, sample_input, 1, optimizer, loss_fn) + + running_time = bench_loop(opt_model, sample_input, num_iters, optimizer, loss_fn) + + if compile_counter_with_backend.frame_count == 0: + raise RuntimeError("No compilation occurred during benchmarking.") + + if compile_counter_with_backend.frame_count > 1: + raise RuntimeError("Recompilation occurred during benchmarking.") + + except Exception as e: + print(e) + print(f"Failed to compile {backend} with mode {mode}") + return None, None + else: + opt_model = model + compilation_time = None + running_time = bench_loop(opt_model, sample_input, num_iters, optimizer, loss_fn) + + compilation_time = round(compilation_time, 2) if compilation_time else None + running_time = round(running_time, 2) if running_time else None + + + return compilation_time, running_time + + + def bench_all( + model : torch.nn.Module | Callable, + sample_input: torch.Tensor | Any, + num_iters : int = 5, + optimizer: torch.optim.Optimizer | None = None, + loss_fn : torch.nn.Module | Callable | None = None, + ): + """ + This is a simple utility that can be used to benchmark torch.compile + In particular it ensures that your GPU is setup to use tensor cores if it supports its + It also tries out all the main backends and prints a table of results so you can easily compare them all + Many of the backendds have their own optional dependencies so please pip install them separately + + You will get one table for inference and another for training + If you'd like to leverage this utility for training make sure to pass in a torch.optim.Optimizer + + The important warnings are + Your GPU supports tensor cores + we will enable it automatically by setting `torch.set_float32_matmul_precision('high')` + + If a compilation fails for any reason including the dependency not being included + then we will print Failed to compile {backend} with mode {mode} + """ + field_names = ["Train/Inference", "Backend", "Mode", "Compilation Time", "Average Running Time"] + table = [] + + + eager_time = None + torch._dynamo.reset() + _, eager_time = benchmark_compile(model, sample_input, num_iters, None, None, optimizer) + table.append( + [("Training" if optimizer else "Inference"), "Eager", "-", "-", f"{eager_time} ms"] + ) + + for backend in torch._dynamo.list_backends(): + + if backend == "inductor": + mode_options = cast(list[str | None], list(torch._inductor.list_mode_options().keys())) + [None] + for mode in mode_options: + if mode == "default": + continue + torch._dynamo.reset() + try: + if torch.cuda.is_available(): + _enable_tensor_cores() + compilation_time, running_time = benchmark_compile( + model, sample_input, num_iters, backend, mode, optimizer, loss_fn) + finally: + if torch.cuda.is_available(): + _disable_tensor_cores() + table.append([ + ("Training" if optimizer else "Inference"), + # pyrefly: ignore [redundant-condition] + backend if backend else "-", + mode if mode is not None else "-", + f"{compilation_time} ms " if compilation_time else "-", + f"{running_time} ms " if running_time else "-", + ]) + + else: + torch._dynamo.reset() + compilation_time, running_time = benchmark_compile( + model, sample_input, num_iters, backend, None, optimizer, loss_fn) + + if running_time is not None: + table.append([ + ("Training" if optimizer else "Inference"), + backend, "-", + f"{compilation_time} ms " or "-", + f"{running_time} ms ", + ]) + + + # pyrefly: ignore [not-callable] + return tabulate(table, headers=field_names, tablefmt="github") diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/cpp_jit.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/cpp_jit.py new file mode 100644 index 0000000000000000000000000000000000000000..a298146ce17c7ff6f303b4d76c4c96ba786ae774 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/cpp_jit.py @@ -0,0 +1,175 @@ +"""JIT C++ strings into executables.""" +import atexit +import os +import re +import shutil +import textwrap +import threading +from typing import Any + +import torch +from torch.utils.benchmark.utils._stubs import CallgrindModuleType, TimeitModuleType +from torch.utils.benchmark.utils.common import _make_temp_dir +from torch.utils import cpp_extension + + +LOCK = threading.Lock() +SOURCE_ROOT = os.path.split(os.path.abspath(__file__))[0] + +# We calculate uuid once at import time so that separate processes will have +# separate build roots, but threads will share the same build root. +# `cpp_extension` uses build root as part of the cache key, so per-invocation +# uuid's (e.g. different build root per _compile_template call) would lead to +# a 0% cache hit rate and spurious recompilation. Consider the following: +# ``` +# setup = "auto x = torch::ones({1024, 1024});" +# stmt = "torch::mm(x, x);" +# for num_threads in [1, 2, 4, 8]: +# print(Timer(stmt, setup, num_threads=num_threads, language="c++").blocked_autorange()) +# ```` +# `setup` and `stmt` do not change, so we can reuse the executable from the +# first pass through the loop. +_BUILD_ROOT: str | None = None + +def _get_build_root() -> str: + global _BUILD_ROOT + if _BUILD_ROOT is None: + _BUILD_ROOT = _make_temp_dir(prefix="benchmark_utils_jit_build") + # pyrefly: ignore [missing-argument] + atexit.register(shutil.rmtree, _BUILD_ROOT) + return _BUILD_ROOT + + +# BACK_TESTING_NOTE: +# There are two workflows where this code could be used. One is the obvious +# case where someone simply builds or installs PyTorch and uses Timer. +# The other is that the entire `torch/utils/benchmark` folder from a CURRENT +# PyTorch checkout is copy-pasted into a much OLDER version of the PyTorch +# source code. This is what we refer to here as "back testing". The rationale +# is that we might want to use current tooling to study some aspect of an +# earlier version of PyTorch. (e.g. a regression.) +# +# The problem is that Timer relies on several aspects of core PyTorch, namely +# some binding functions for Valgrind symbols in `torch._C` and the +# `torch.__config__._cxx_flags()` method. If we were to naively copy code +# around this wouldn't work as the symbols of interest aren't present in +# earlier versions of PyTorch. In order to work around this, we must add back +# testing shims. These shims will never activate during normal use, but will +# allow Timer to function outside of the "correct" version of PyTorch by +# emulating functionality that was added later. +# +# These shims are temporary, and as Timer becomes more integrated with +# PyTorch the cost and complexity of such shims will increase. Once back +# testing is no longer required (which is to say we have done enough historic +# analysis and the shims no longer justify their maintenance and code +# complexity costs) back testing paths will be removed. + +CXX_FLAGS: list[str] | None +if hasattr(torch.__config__, "_cxx_flags"): + try: + CXX_FLAGS = torch.__config__._cxx_flags().strip().split() + if CXX_FLAGS is not None and "-g" not in CXX_FLAGS: + CXX_FLAGS.append("-g") + # remove "-W" flags to allow build benchmarks + # with a relaxed constraint of compiler versions + if CXX_FLAGS is not None: + CXX_FLAGS = list(filter(lambda x: not x.startswith("-W"), CXX_FLAGS)) + + except RuntimeError: + # We are in FBCode. + CXX_FLAGS = None +else: + # FIXME: Remove when back testing is no longer required. + CXX_FLAGS = ["-O2", "-fPIC", "-g"] + +EXTRA_INCLUDE_PATHS: list[str] = [os.path.join(SOURCE_ROOT, "valgrind_wrapper")] +CONDA_PREFIX = os.getenv("CONDA_PREFIX") +if CONDA_PREFIX is not None: + # Load will automatically search /usr/include, but not conda include. + EXTRA_INCLUDE_PATHS.append(os.path.join(CONDA_PREFIX, "include")) + + +COMPAT_CALLGRIND_BINDINGS: CallgrindModuleType | None = None +def get_compat_bindings() -> CallgrindModuleType: + with LOCK: + global COMPAT_CALLGRIND_BINDINGS + if COMPAT_CALLGRIND_BINDINGS is None: + COMPAT_CALLGRIND_BINDINGS = cpp_extension.load( + name="callgrind_bindings", + sources=[os.path.join( + SOURCE_ROOT, + "valgrind_wrapper", + "compat_bindings.cpp" + )], + extra_cflags=CXX_FLAGS, + extra_include_paths=EXTRA_INCLUDE_PATHS, + ) + return COMPAT_CALLGRIND_BINDINGS + + +def _compile_template( + *, + stmt: str, + setup: str, + global_setup: str, + src: str, + is_standalone: bool +) -> Any: + for before, after, indentation in ( + ("// GLOBAL_SETUP_TEMPLATE_LOCATION", global_setup, 0), + ("// SETUP_TEMPLATE_LOCATION", setup, 4), + ("// STMT_TEMPLATE_LOCATION", stmt, 8) + ): + # C++ doesn't care about indentation so this code isn't load + # bearing the way it is with Python, but this makes the source + # look nicer if a human has to look at it. + src = re.sub( + before, + textwrap.indent(after, " " * indentation)[indentation:], + src + ) + + # We want to isolate different Timers. However `cpp_extension` will + # cache builds which will significantly reduce the cost of repeated + # invocations. + with LOCK: + name = f"timer_cpp_{abs(hash(src))}" + build_dir = os.path.join(_get_build_root(), name) + os.makedirs(build_dir, exist_ok=True) + + src_path = os.path.join(build_dir, "timer_src.cpp") + with open(src_path, "w") as f: + f.write(src) + + # `cpp_extension` has its own locking scheme, so we don't need our lock. + return cpp_extension.load( + name=name, + sources=[src_path], + build_directory=build_dir, + extra_cflags=CXX_FLAGS, + extra_include_paths=EXTRA_INCLUDE_PATHS, + is_python_module=not is_standalone, + is_standalone=is_standalone, + ) + + +def compile_timeit_template(*, stmt: str, setup: str, global_setup: str) -> TimeitModuleType: + template_path: str = os.path.join(SOURCE_ROOT, "timeit_template.cpp") + with open(template_path) as f: + src: str = f.read() + + module = _compile_template(stmt=stmt, setup=setup, global_setup=global_setup, src=src, is_standalone=False) + if not isinstance(module, TimeitModuleType): + raise AssertionError("compiled module is not a TimeitModuleType") + return module + + +def compile_callgrind_template(*, stmt: str, setup: str, global_setup: str) -> str: + template_path: str = os.path.join(SOURCE_ROOT, "valgrind_wrapper", "timer_callgrind_template.cpp") + with open(template_path) as f: + src: str = f.read() + + target = _compile_template(stmt=stmt, setup=setup, global_setup=global_setup, src=src, is_standalone=True) + if not isinstance(target, str): + raise AssertionError("compiled target path is not a string") + return target diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/fuzzer.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/fuzzer.py new file mode 100644 index 0000000000000000000000000000000000000000..38f771d23632efd27239e460591d923be3ee59fc --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/fuzzer.py @@ -0,0 +1,469 @@ +# mypy: allow-untyped-defs +import functools +import itertools as it +from typing import Any +from collections.abc import Callable + +import torch + + +__all__ = [ + "Fuzzer", + "FuzzedParameter", "ParameterAlias", + "FuzzedTensor", +] + + +_DISTRIBUTIONS = ( + "loguniform", + "uniform", +) + + +class FuzzedParameter: + """Specification for a parameter to be generated during fuzzing.""" + def __init__( + self, + name: str, + minval: int | float | None = None, + maxval: int | float | None = None, + distribution: str | dict[Any, float] | None = None, + strict: bool = False, + ) -> None: + """ + Args: + name: + A string name with which to identify the parameter. + FuzzedTensors can reference this string in their + specifications. + minval: + The lower bound for the generated value. See the description + of `distribution` for type behavior. + maxval: + The upper bound for the generated value. Type behavior is + identical to `minval`. + distribution: + Specifies the distribution from which this parameter should + be drawn. There are three possibilities: + - "loguniform" + Samples between `minval` and `maxval` (inclusive) such + that the probabilities are uniform in log space. As a + concrete example, if minval=1 and maxval=100, a sample + is as likely to fall in [1, 10) as it is [10, 100]. + - "uniform" + Samples are chosen with uniform probability between + `minval` and `maxval` (inclusive). If either `minval` + or `maxval` is a float then the distribution is the + continuous uniform distribution; otherwise samples + are constrained to the integers. + - dict: + If a dict is passed, the keys are taken to be choices + for the variables and the values are interpreted as + probabilities. (And must sum to one.) + If a dict is passed, `minval` and `maxval` must not be set. + Otherwise, they must be set. + strict: + If a parameter is strict, it will not be included in the + iterative resampling process which Fuzzer uses to find a + valid parameter configuration. This allows an author to + prevent skew from resampling for a given parameter (for + instance, a low size limit could inadvertently bias towards + Tensors with fewer dimensions) at the cost of more iterations + when generating parameters. + """ + self._name = name + self._minval = minval + self._maxval = maxval + self._distribution = self._check_distribution(distribution) + self.strict = strict + + @property + def name(self): + return self._name + + def sample(self, state): + if self._distribution == "loguniform": + return self._loguniform(state) + + if self._distribution == "uniform": + return self._uniform(state) + + if isinstance(self._distribution, dict): + return self._custom_distribution(state) + + def _check_distribution(self, distribution): + if not isinstance(distribution, dict): + if distribution not in _DISTRIBUTIONS: + raise AssertionError(f"Unknown distribution: {distribution}") + else: + if any(i < 0 for i in distribution.values()): + raise AssertionError("Probabilities cannot be negative") + if not abs(sum(distribution.values()) - 1) > 1e-5: + raise AssertionError("Distribution is not normalized") + if self._minval is not None: + raise AssertionError("When passing a custom distribution, 'minval' must be None") + if self._maxval is not None: + raise AssertionError("When passing a custom distribution, 'maxval' must be None") + + return distribution + + def _loguniform(self, state): + import numpy as np + output = int(2 ** state.uniform( + low=np.log2(self._minval) if self._minval is not None else None, + high=np.log2(self._maxval) if self._maxval is not None else None, + )) + if self._minval is not None and output < self._minval: + return self._minval + if self._maxval is not None and output > self._maxval: + return self._maxval + return output + + def _uniform(self, state): + if isinstance(self._minval, int) and isinstance(self._maxval, int): + return int(state.randint(low=self._minval, high=self._maxval + 1)) + return state.uniform(low=self._minval, high=self._maxval) + + def _custom_distribution(self, state): + import numpy as np + # If we directly pass the keys to `choice`, numpy will convert + # them to numpy dtypes. + index = state.choice( + np.arange(len(self._distribution)), + p=tuple(self._distribution.values())) + return list(self._distribution.keys())[index] + + +class ParameterAlias: + """Indicates that a parameter should alias the value of another parameter. + + When used in conjunction with a custom distribution, this allows fuzzed + tensors to represent a broader range of behaviors. For example, the + following sometimes produces Tensors which broadcast: + + Fuzzer( + parameters=[ + FuzzedParameter("x_len", 4, 1024, distribution="uniform"), + + # `y` will either be size one, or match the size of `x`. + FuzzedParameter("y_len", distribution={ + 0.5: 1, + 0.5: ParameterAlias("x_len") + }), + ], + tensors=[ + FuzzedTensor("x", size=("x_len",)), + FuzzedTensor("y", size=("y_len",)), + ], + ) + + Chains of alias' are allowed, but may not contain cycles. + """ + def __init__(self, alias_to) -> None: + self.alias_to = alias_to + + def __repr__(self) -> str: + return f"ParameterAlias[alias_to: {self.alias_to}]" + + +def dtype_size(dtype): + if dtype == torch.bool: + return 1 + if dtype.is_floating_point or dtype.is_complex: + return int(torch.finfo(dtype).bits / 8) + return int(torch.iinfo(dtype).bits / 8) + + +def prod(values, base=1): + """np.prod can overflow, so for sizes the product should be done in Python. + + Even though np.prod type promotes to int64, it can still overflow in which + case the negative value will pass the size check and OOM when attempting to + actually allocate the Tensor. + """ + return functools.reduce(lambda x, y: int(x) * int(y), values, base) + + +class FuzzedTensor: + def __init__( + self, + name: str, + size: tuple[str | int, ...], + steps: tuple[str | int, ...] | None = None, + probability_contiguous: float = 0.5, + min_elements: int | None = None, + max_elements: int | None = None, + max_allocation_bytes: int | None = None, + dim_parameter: str | None = None, + roll_parameter: str | None = None, + dtype=torch.float32, + cuda=False, + tensor_constructor: Callable | None = None + ) -> None: + """ + Args: + name: + A string identifier for the generated Tensor. + size: + A tuple of integers or strings specifying the size of the generated + Tensor. String values will replaced with a concrete int during the + generation process, while ints are simply passed as literals. + steps: + An optional tuple with the same length as `size`. This indicates + that a larger Tensor should be allocated, and then sliced to + produce the generated Tensor. For instance, if size is (4, 8) + and steps is (1, 4), then a tensor `t` of size (4, 32) will be + created and then `t[:, ::4]` will be used. (Allowing one to test + Tensors with strided memory.) + probability_contiguous: + A number between zero and one representing the chance that the + generated Tensor has a contiguous memory layout. This is achieved by + randomly permuting the shape of a Tensor, calling `.contiguous()`, + and then permuting back. This is applied before `steps`, which can + also cause a Tensor to be non-contiguous. + min_elements: + The minimum number of parameters that this Tensor must have for a + set of parameters to be valid. (Otherwise they are resampled.) + max_elements: + Like `min_elements`, but setting an upper bound. + max_allocation_bytes: + Like `max_elements`, but for the size of Tensor that must be + allocated prior to slicing for `steps` (if applicable). For + example, a FloatTensor with size (1024, 1024) and steps (4, 4) + would have 1M elements, but would require a 64 MB allocation. + dim_parameter: + The length of `size` and `steps` will be truncated to this value. + This allows Tensors of varying dimensions to be generated by the + Fuzzer. + dtype: + The PyTorch dtype of the generated Tensor. + cuda: + Whether to place the Tensor on a GPU. + tensor_constructor: + Callable which will be used instead of the default Tensor + construction method. This allows the author to enforce properties + of the Tensor (e.g. it can only have certain values). The dtype and + concrete shape of the Tensor to be created will be passed, and + concrete values of all parameters will be passed as kwargs. Note + that transformations to the result (permuting, slicing) will be + performed by the Fuzzer; the tensor_constructor is only responsible + for creating an appropriately sized Tensor. + """ + self._name = name + self._size = size + self._steps = steps + self._probability_contiguous = probability_contiguous + self._min_elements = min_elements + self._max_elements = max_elements + self._max_allocation_bytes = max_allocation_bytes + self._dim_parameter = dim_parameter + self._dtype = dtype + self._cuda = cuda + self._tensor_constructor = tensor_constructor + + @property + def name(self): + return self._name + + @staticmethod + def default_tensor_constructor(size, dtype, **kwargs): + if dtype.is_floating_point or dtype.is_complex: + return torch.rand(size=size, dtype=dtype, device="cpu") + else: + return torch.randint(1, 127, size=size, dtype=dtype, device="cpu") + + def _make_tensor(self, params, state): + import numpy as np + size, steps, allocation_size = self._get_size_and_steps(params) + constructor = ( + self._tensor_constructor or + self.default_tensor_constructor + ) + + raw_tensor = constructor(size=allocation_size, dtype=self._dtype, **params) + if self._cuda: + raw_tensor = raw_tensor.cuda() + + # Randomly permute the Tensor and call `.contiguous()` to force re-ordering + # of the memory, and then permute it back to the original shape. + dim = len(size) + order = np.arange(dim) + if state.rand() > self._probability_contiguous: + while dim > 1 and np.all(order == np.arange(dim)): + order = state.permutation(raw_tensor.dim()) + + raw_tensor = raw_tensor.permute(tuple(order)).contiguous() + raw_tensor = raw_tensor.permute(tuple(np.argsort(order))) + + slices = [slice(0, size * step, step) for size, step in zip(size, steps, strict=True)] + tensor = raw_tensor[tuple(slices)] + + properties = { + "numel": int(tensor.numel()), + "order": order, + "steps": steps, + "is_contiguous": tensor.is_contiguous(), + "dtype": str(self._dtype), + } + + return tensor, properties + + def _get_size_and_steps(self, params): + dim = ( + params[self._dim_parameter] + if self._dim_parameter is not None + else len(self._size) + ) + + def resolve(values, dim): + """Resolve values into concrete integers.""" + values = tuple(params.get(i, i) for i in values) + if len(values) > dim: + values = values[:dim] + if len(values) < dim: + values = values + tuple(1 for _ in range(dim - len(values))) + return values + + size = resolve(self._size, dim) + steps = resolve(self._steps or (), dim) + allocation_size = tuple(size_i * step_i for size_i, step_i in zip(size, steps, strict=True)) + return size, steps, allocation_size + + def satisfies_constraints(self, params) -> bool: + size, _, allocation_size = self._get_size_and_steps(params) + # Product is computed in Python to avoid integer overflow. + num_elements = prod(size) + if num_elements < 0: + raise AssertionError("Computed number of elements is negative") + + allocation_bytes = prod(allocation_size, base=dtype_size(self._dtype)) + + def nullable_greater(left, right): + if left is None or right is None: + return False + return left > right + + return not any(( + nullable_greater(num_elements, self._max_elements), + nullable_greater(self._min_elements, num_elements), + nullable_greater(allocation_bytes, self._max_allocation_bytes), + )) + + +class Fuzzer: + def __init__( + self, + parameters: list[FuzzedParameter | list[FuzzedParameter]], + tensors: list[FuzzedTensor | list[FuzzedTensor]], + constraints: list[Callable] | None = None, + seed: int | None = None + ) -> None: + """ + Args: + parameters: + List of FuzzedParameters which provide specifications + for generated parameters. Iterable elements will be + unpacked, though arbitrary nested structures will not. + tensors: + List of FuzzedTensors which define the Tensors which + will be created each step based on the parameters for + that step. Iterable elements will be unpacked, though + arbitrary nested structures will not. + constraints: + List of callables. They will be called with params + as kwargs, and if any of them return False the current + set of parameters will be rejected. + seed: + Seed for the RandomState used by the Fuzzer. This will + also be used to set the PyTorch random seed so that random + ops will create reproducible Tensors. + """ + import numpy as np + if seed is None: + seed = int(np.random.RandomState().randint(0, 2 ** 32 - 1, dtype=np.int64)) + self._seed = seed + self._parameters = Fuzzer._unpack(parameters, FuzzedParameter) + self._tensors = Fuzzer._unpack(tensors, FuzzedTensor) + self._constraints = constraints or () + + p_names = {p.name for p in self._parameters} + t_names = {t.name for t in self._tensors} + name_overlap = p_names.intersection(t_names) + if name_overlap: + raise ValueError(f"Duplicate names in parameters and tensors: {name_overlap}") + + self._rejections = 0 + self._total_generated = 0 + + @staticmethod + def _unpack(values, cls): + return tuple(it.chain.from_iterable( + [[i] if isinstance(i, cls) else i for i in values] + )) + + def take(self, n): + import numpy as np + state = np.random.RandomState(self._seed) + torch.manual_seed(state.randint(low=0, high=2 ** 63, dtype=np.int64)) + for _ in range(n): + params = self._generate(state) + tensors = {} + tensor_properties = {} + for t in self._tensors: + tensor, properties = t._make_tensor(params, state) + tensors[t.name] = tensor + tensor_properties[t.name] = properties + yield tensors, tensor_properties, params + + @property + def rejection_rate(self): + if not self._total_generated: + return 0. + return self._rejections / self._total_generated + + def _generate(self, state): + strict_params: dict[str, float | int | ParameterAlias] = {} + for _ in range(1000): + candidate_params: dict[str, float | int | ParameterAlias] = {} + for p in self._parameters: + if p.strict: + if p.name in strict_params: + candidate_params[p.name] = strict_params[p.name] + else: + candidate_params[p.name] = p.sample(state) + strict_params[p.name] = candidate_params[p.name] + else: + candidate_params[p.name] = p.sample(state) + + candidate_params = self._resolve_aliases(candidate_params) + + self._total_generated += 1 + if not all(f(candidate_params) for f in self._constraints): + self._rejections += 1 + continue + + if not all(t.satisfies_constraints(candidate_params) for t in self._tensors): + self._rejections += 1 + continue + + return candidate_params + raise ValueError("Failed to generate a set of valid parameters.") + + @staticmethod + def _resolve_aliases(params): + params = dict(params) + alias_count = sum(isinstance(v, ParameterAlias) for v in params.values()) + + keys = list(params.keys()) + while alias_count: + for k in keys: + v = params[k] + if isinstance(v, ParameterAlias): + params[k] = params[v.alias_to] + alias_count_new = sum(isinstance(v, ParameterAlias) for v in params.values()) + if alias_count == alias_count_new: + raise ValueError(f"ParameterAlias cycle detected\n{params}") + + alias_count = alias_count_new + + return params diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/sparse_fuzzer.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/sparse_fuzzer.py new file mode 100644 index 0000000000000000000000000000000000000000..a2a573b9b44fdc2ee3c5141d8badc75a2b484a78 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/sparse_fuzzer.py @@ -0,0 +1,126 @@ +# mypy: allow-untyped-defs +from numbers import Number +import torch +from torch.utils.benchmark import FuzzedTensor +import math + +class FuzzedSparseTensor(FuzzedTensor): + def __init__( + self, + name: str, + size: tuple[str | int, ...], + min_elements: int | None = None, + max_elements: int | None = None, + dim_parameter: str | None = None, + sparse_dim: str | None = None, + nnz: str | None = None, + density: str | None = None, + coalesced: str | None = None, + dtype=torch.float32, + cuda=False + ) -> None: + """ + Args: + name: + A string identifier for the generated Tensor. + size: + A tuple of integers or strings specifying the size of the generated + Tensor. String values will replaced with a concrete int during the + generation process, while ints are simply passed as literals. + min_elements: + The minimum number of parameters that this Tensor must have for a + set of parameters to be valid. (Otherwise they are resampled.) + max_elements: + Like `min_elements`, but setting an upper bound. + dim_parameter: + The length of `size` will be truncated to this value. + This allows Tensors of varying dimensions to be generated by the + Fuzzer. + sparse_dim: + The number of sparse dimensions in a sparse tensor. + density: + This value allows tensors of varying sparsities to be generated by the Fuzzer. + coalesced: + The sparse tensor format permits uncoalesced sparse tensors, + where there may be duplicate coordinates in the indices. + dtype: + The PyTorch dtype of the generated Tensor. + cuda: + Whether to place the Tensor on a GPU. + """ + super().__init__(name=name, size=size, min_elements=min_elements, + max_elements=max_elements, dim_parameter=dim_parameter, dtype=dtype, cuda=cuda) + self._density = density + self._coalesced = coalesced + self._sparse_dim = sparse_dim + + @staticmethod + def sparse_tensor_constructor(size, dtype, sparse_dim, nnz, is_coalesced): + """sparse_tensor_constructor creates a sparse tensor with coo format. + + Note that when `is_coalesced` is False, the number of elements is doubled but the number of indices + represents the same amount of number of non zeros `nnz`, i.e, this is virtually the same tensor + with the same sparsity pattern. Moreover, most of the sparse operation will use coalesce() method + and what we want here is to get a sparse tensor with the same `nnz` even if this is coalesced or not. + + In the other hand when `is_coalesced` is True the number of elements is reduced in the coalescing process + by an unclear amount however the probability to generate duplicates indices are low for most of the cases. + This decision was taken on purpose to maintain the construction cost as low as possible. + """ + if isinstance(size, Number): + size = [size] * sparse_dim + if all(size[d] <= 0 for d in range(sparse_dim)) and nnz != 0: + raise AssertionError('invalid arguments') + v_size = [nnz] + list(size[sparse_dim:]) + if dtype.is_floating_point: + v = torch.rand(size=v_size, dtype=dtype, device="cpu") + else: + v = torch.randint(1, 127, size=v_size, dtype=dtype, device="cpu") + + i = torch.rand(sparse_dim, nnz, device="cpu") + i.mul_(torch.tensor(size[:sparse_dim]).unsqueeze(1).to(i)) + i = i.to(torch.long) + + if not is_coalesced: + v = torch.cat([v, torch.randn_like(v)], 0) + i = torch.cat([i, i], 1) + + x = torch.sparse_coo_tensor(i, v, torch.Size(size)) + if is_coalesced: + x = x.coalesce() + return x + + def _make_tensor(self, params, state): + # pyrefly: ignore [missing-attribute] + size, _, _ = self._get_size_and_steps(params) + density = params['density'] + nnz = math.ceil(sum(size) * density) + if nnz > sum(size): + raise AssertionError('nnz cannot exceed total number of elements') + + is_coalesced = params['coalesced'] + sparse_dim = params['sparse_dim'] if self._sparse_dim else len(size) + sparse_dim = min(sparse_dim, len(size)) + # pyrefly: ignore [missing-attribute] + tensor = self.sparse_tensor_constructor(size, self._dtype, sparse_dim, nnz, is_coalesced) + + # pyrefly: ignore [missing-attribute] + if self._cuda: + tensor = tensor.cuda() + sparse_dim = tensor.sparse_dim() + dense_dim = tensor.dense_dim() + is_hybrid = len(size[sparse_dim:]) > 0 + + properties = { + "numel": int(tensor.numel()), + "shape": tensor.size(), + "is_coalesced": tensor.is_coalesced(), + "density": density, + "sparsity": 1.0 - density, + "sparse_dim": sparse_dim, + "dense_dim": dense_dim, + "is_hybrid": is_hybrid, + # pyrefly: ignore [missing-attribute] + "dtype": str(self._dtype), + } + return tensor, properties diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/timeit_template.cpp b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/timeit_template.cpp new file mode 100644 index 0000000000000000000000000000000000000000..30b6f79c0b5aebca676035ac0b7c08cfce639b23 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/timeit_template.cpp @@ -0,0 +1,43 @@ +/* C++ template for Timer.timeit + +This template will be consumed by `cpp_jit.py`, and will replace: + `GLOBAL_SETUP_TEMPLATE_LOCATION`, + `SETUP_TEMPLATE_LOCATION` + and + `STMT_TEMPLATE_LOCATION` +sections with user provided statements. +*/ +#include + +#include +#include +#include +#include + +// Global setup. (e.g. #includes) +// GLOBAL_SETUP_TEMPLATE_LOCATION + +double timeit(int n) { + pybind11::gil_scoped_release no_gil; + + // Setup + // SETUP_TEMPLATE_LOCATION + + { + // Warmup + // STMT_TEMPLATE_LOCATION + } + + // Main loop + auto start_time = std::chrono::high_resolution_clock::now(); + for (const auto loop_idx : c10::irange(n)) { + (void)loop_idx; + // STMT_TEMPLATE_LOCATION + } + auto end_time = std::chrono::high_resolution_clock::now(); + return std::chrono::duration(end_time - start_time).count(); +} + +PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { + m.def("timeit", &timeit); +} diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/timer.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/timer.py new file mode 100644 index 0000000000000000000000000000000000000000..f131261b8f36d08e4d9ef87605f379c4215d63ea --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/timer.py @@ -0,0 +1,533 @@ +"""Timer class based on the timeit.Timer class, but torch aware.""" +import enum +import timeit +import textwrap +from typing import overload, Any, NoReturn +from collections.abc import Callable + +import torch +from torch.utils.benchmark.utils import common, cpp_jit +from torch.utils.benchmark.utils._stubs import TimerClass, TimeitModuleType +from torch.utils.benchmark.utils.valgrind_wrapper import timer_interface as valgrind_timer_interface + + +__all__ = ["Timer", "timer", "Language"] + + +if torch.accelerator.is_available(): + def timer() -> float: + torch.accelerator.synchronize() + return timeit.default_timer() +else: + timer = timeit.default_timer + + +class Language(enum.Enum): + PYTHON = 0 + CPP = 1 + + +class CPPTimer: + def __init__( + self, + stmt: str, + setup: str, + global_setup: str, + timer: Callable[[], float], + globals: dict[str, Any], + ) -> None: + if timer is not timeit.default_timer: + raise NotImplementedError( + "PyTorch was built with accelerators and an accelerator is present; however " + "Timer does not yet support accelerator measurements. If your " + "code is CPU only, pass `timer=timeit.default_timer` to the " + "Timer's constructor to indicate this. (Note that this will " + "produce incorrect results if an accelerator is in fact used, as " + "Timer will not synchronize the accelerator.)" + ) + + if globals: + raise ValueError("C++ timing does not support globals.") + + self._stmt: str = textwrap.dedent(stmt) + self._setup: str = textwrap.dedent(setup) + self._global_setup: str = textwrap.dedent(global_setup) + self._timeit_module: TimeitModuleType | None = None + + def timeit(self, number: int) -> float: + if self._timeit_module is None: + self._timeit_module = cpp_jit.compile_timeit_template( + stmt=self._stmt, + setup=self._setup, + global_setup=self._global_setup, + ) + + return self._timeit_module.timeit(number) + + +class Timer: + """Helper class for measuring execution time of PyTorch statements. + + For a full tutorial on how to use this class, see: + https://pytorch.org/tutorials/recipes/recipes/benchmark.html + + The PyTorch Timer is based on `timeit.Timer` (and in fact uses + `timeit.Timer` internally), but with several key differences: + + 1) Runtime aware: + Timer will perform warmups (important as some elements of PyTorch are + lazily initialized), set threadpool size so that comparisons are + apples-to-apples, and synchronize asynchronous accelerator functions when + necessary. + + 2) Focus on replicates: + When measuring code, and particularly complex kernels / models, + run-to-run variation is a significant confounding factor. It is + expected that all measurements should include replicates to quantify + noise and allow median computation, which is more robust than mean. + To that effect, this class deviates from the `timeit` API by + conceptually merging `timeit.Timer.repeat` and `timeit.Timer.autorange`. + (Exact algorithms are discussed in method docstrings.) The `timeit` + method is replicated for cases where an adaptive strategy is not + desired. + + 3) Optional metadata: + When defining a Timer, one can optionally specify `label`, `sub_label`, + `description`, and `env`. (Defined later) These fields are included in + the representation of result object and by the `Compare` class to group + and display results for comparison. + + 4) Instruction counts + In addition to wall times, Timer can run a statement under Callgrind + and report instructions executed. + + Directly analogous to `timeit.Timer` constructor arguments: + + `stmt`, `setup`, `timer`, `globals` + + PyTorch Timer specific constructor arguments: + + `label`, `sub_label`, `description`, `env`, `num_threads` + + Args: + stmt: Code snippet to be run in a loop and timed. + + setup: Optional setup code. Used to define variables used in `stmt` + + global_setup: (C++ only) + Code which is placed at the top level of the file for things like + `#include` statements. + + timer: + Callable which returns the current time. If PyTorch was built + without accelerators or there is no accelerator present, this defaults to + `timeit.default_timer`; otherwise it will synchronize accelerators before + measuring the time. + + globals: + A dict which defines the global variables when `stmt` is being + executed. This is the other method for providing variables which + `stmt` needs. + + label: + String which summarizes `stmt`. For instance, if `stmt` is + "torch.nn.functional.relu(torch.add(x, 1, out=out))" + one might set label to "ReLU(x + 1)" to improve readability. + + sub_label: + Provide supplemental information to disambiguate measurements + with identical stmt or label. For instance, in our example + above sub_label might be "float" or "int", so that it is easy + to differentiate: + "ReLU(x + 1): (float)" + + "ReLU(x + 1): (int)" + when printing Measurements or summarizing using `Compare`. + + description: + String to distinguish measurements with identical label and + sub_label. The principal use of `description` is to signal to + `Compare` the columns of data. For instance one might set it + based on the input size to create a table of the form: :: + + | n=1 | n=4 | ... + ------------- ... + ReLU(x + 1): (float) | ... | ... | ... + ReLU(x + 1): (int) | ... | ... | ... + + + using `Compare`. It is also included when printing a Measurement. + + env: + This tag indicates that otherwise identical tasks were run in + different environments, and are therefore not equivalent, for + instance when A/B testing a change to a kernel. `Compare` will + treat Measurements with different `env` specification as distinct + when merging replicate runs. + + num_threads: + The size of the PyTorch threadpool when executing `stmt`. Single + threaded performance is important as both a key inference workload + and a good indicator of intrinsic algorithmic efficiency, so the + default is set to one. This is in contrast to the default PyTorch + threadpool size which tries to utilize all cores. + """ + + _timer_cls: type[TimerClass] = timeit.Timer + + def __init__( + self, + stmt: str = "pass", + setup: str = "pass", + global_setup: str = "", + timer: Callable[[], float] = timer, + globals: dict[str, Any] | None = None, + label: str | None = None, + sub_label: str | None = None, + description: str | None = None, + env: str | None = None, + num_threads: int = 1, + language: Language | str = Language.PYTHON, + ) -> None: + if not isinstance(stmt, str): + raise ValueError("Currently only a `str` stmt is supported.") + + # We copy `globals` to prevent mutations from leaking. + # (For instance, `eval` adds the `__builtins__` key) + self._globals = dict(globals or {}) + + timer_kwargs = {} + if language in (Language.PYTHON, "py", "python"): + # Include `torch` if not specified as a convenience feature. + self._globals.setdefault("torch", torch) + self._language: Language = Language.PYTHON + if global_setup: + raise ValueError( + f"global_setup is C++ only, got `{global_setup}`. Most " + "likely this code can simply be moved to `setup`." + ) + + elif language in (Language.CPP, "cpp", "c++"): + if self._timer_cls is not timeit.Timer: + raise AssertionError("_timer_cls has already been swapped.") + self._timer_cls = CPPTimer + setup = ("" if setup == "pass" else setup) + self._language = Language.CPP + timer_kwargs["global_setup"] = global_setup + + else: + raise ValueError(f"Invalid language `{language}`.") + + # Convenience adjustment so that multi-line code snippets defined in + # functions do not IndentationError (Python) or look odd (C++). The + # leading newline removal is for the initial newline that appears when + # defining block strings. For instance: + # textwrap.dedent(""" + # print("This is a stmt") + # """) + # produces '\nprint("This is a stmt")\n'. + # + # Stripping this down to 'print("This is a stmt")' doesn't change + # what gets executed, but it makes __repr__'s nicer. + stmt = textwrap.dedent(stmt) + stmt = (stmt[1:] if stmt and stmt[0] == "\n" else stmt).rstrip() + setup = textwrap.dedent(setup) + setup = (setup[1:] if setup and setup[0] == "\n" else setup).rstrip() + + # pyrefly: ignore [bad-instantiation] + self._timer = self._timer_cls( + stmt=stmt, + setup=setup, + timer=timer, + globals=valgrind_timer_interface.CopyIfCallgrind.unwrap_all(self._globals), + **timer_kwargs, + ) + self._task_spec = common.TaskSpec( + stmt=stmt, + setup=setup, + global_setup=global_setup, + label=label, + sub_label=sub_label, + description=description, + env=env, + num_threads=num_threads, + ) + + def _timeit(self, number: int) -> float: + # Even calling a timer in C++ takes ~50 ns, so no real operation should + # take less than 1 ns. (And this prevents divide by zero errors.) + return max(self._timer.timeit(number), 1e-9) + + def timeit(self, number: int = 1000000) -> common.Measurement: + """Mirrors the semantics of timeit.Timer.timeit(). + + Execute the main statement (`stmt`) `number` times. + https://docs.python.org/3/library/timeit.html#timeit.Timer.timeit + """ + with common.set_torch_threads(self._task_spec.num_threads): + # Warmup + self._timeit(number=max(int(number // 100), 2)) + + return common.Measurement( + number_per_run=number, + raw_times=[self._timeit(number=number)], + task_spec=self._task_spec + ) + + def repeat(self, repeat: int = -1, number: int = -1) -> None: + raise NotImplementedError("See `Timer.blocked_autorange.`") + + def autorange(self, callback: Callable[[int, float], NoReturn] | None = None) -> None: + raise NotImplementedError("See `Timer.blocked_autorange.`") + + def _threaded_measurement_loop( + self, + number: int, + time_hook: Callable[[], float], + stop_hook: Callable[[list[float]], bool], + min_run_time: float, + max_run_time: float | None = None, + callback: Callable[[int, float], NoReturn] | None = None + ) -> list[float]: + total_time = 0.0 + can_stop = False + times: list[float] = [] + with common.set_torch_threads(self._task_spec.num_threads): + while (total_time < min_run_time) or (not can_stop): + time_spent = time_hook() + times.append(time_spent) + total_time += time_spent + if callback: + callback(number, time_spent) + can_stop = stop_hook(times) + if max_run_time and total_time > max_run_time: + break + return times + + def _estimate_block_size(self, min_run_time: float) -> int: + with common.set_torch_threads(self._task_spec.num_threads): + # Estimate the block size needed for measurement to be negligible + # compared to the inner loop. This also serves as a warmup. + overhead = torch.tensor([self._timeit(0) for _ in range(5)]).median().item() + number = 1 + while True: + time_taken = self._timeit(number) + relative_overhead = overhead / time_taken + if relative_overhead <= 1e-4 and time_taken >= min_run_time / 1000: + break + if time_taken > min_run_time: + break + # Avoid overflow in C++ pybind11 interface + if number * 10 > 2147483647: + break + number *= 10 + return number + + def blocked_autorange( + self, + callback: Callable[[int, float], NoReturn] | None = None, + min_run_time: float = 0.2, + ) -> common.Measurement: + """Measure many replicates while keeping timer overhead to a minimum. + + At a high level, blocked_autorange executes the following pseudo-code:: + + `setup` + + total_time = 0 + while total_time < min_run_time + start = timer() + for _ in range(block_size): + `stmt` + total_time += (timer() - start) + + Note the variable `block_size` in the inner loop. The choice of block + size is important to measurement quality, and must balance two + competing objectives: + + 1) A small block size results in more replicates and generally + better statistics. + + 2) A large block size better amortizes the cost of `timer` + invocation, and results in a less biased measurement. This is + important because accelerator synchronization time is non-trivial + (order single to low double digit microseconds) and would + otherwise bias the measurement. + + blocked_autorange sets block_size by running a warmup period, + increasing block size until timer overhead is less than 0.1% of + the overall computation. This value is then used for the main + measurement loop. + + Returns: + A `Measurement` object that contains measured runtimes and + repetition counts, and can be used to compute statistics. + (mean, median, etc.) + """ + number = self._estimate_block_size(min_run_time) + + def time_hook() -> float: + return self._timeit(number) + + def stop_hook(times: list[float]) -> bool: + return True + + times = self._threaded_measurement_loop( + number, time_hook, stop_hook, + min_run_time=min_run_time, + callback=callback) + + return common.Measurement( + number_per_run=number, + raw_times=times, + task_spec=self._task_spec + ) + + def adaptive_autorange( + self, + threshold: float = 0.1, + *, + min_run_time: float = 0.01, + max_run_time: float = 10.0, + callback: Callable[[int, float], NoReturn] | None = None, + ) -> common.Measurement: + """Similar to `blocked_autorange` but also checks for variablility in measurements + and repeats until iqr/median is smaller than `threshold` or `max_run_time` is reached. + + + At a high level, adaptive_autorange executes the following pseudo-code:: + + `setup` + + times = [] + while times.sum < max_run_time + start = timer() + for _ in range(block_size): + `stmt` + times.append(timer() - start) + + enough_data = len(times)>3 and times.sum > min_run_time + small_iqr=times.iqr/times.mean float: + return self._timeit(number) + + def stop_hook(times: list[float]) -> bool: + if len(times) > 3: + return common.Measurement( + number_per_run=number, + raw_times=times, + task_spec=self._task_spec + ).meets_confidence(threshold=threshold) + return False + times = self._threaded_measurement_loop( + number, time_hook, stop_hook, min_run_time, max_run_time, callback=callback) + + return common.Measurement( + number_per_run=number, + raw_times=times, + task_spec=self._task_spec + ) + + @overload + def collect_callgrind( + self, + number: int, + *, + repeats: None, + collect_baseline: bool, + retain_out_file: bool, + ) -> valgrind_timer_interface.CallgrindStats: + ... + + @overload + def collect_callgrind( + self, + number: int, + *, + repeats: int, + collect_baseline: bool, + retain_out_file: bool, + ) -> tuple[valgrind_timer_interface.CallgrindStats, ...]: + ... + + def collect_callgrind( + self, + number: int = 100, + *, + repeats: int | None = None, + collect_baseline: bool = True, + retain_out_file: bool = False, + ) -> Any: + """Collect instruction counts using Callgrind. + + Unlike wall times, instruction counts are deterministic + (modulo non-determinism in the program itself and small amounts of + jitter from the Python interpreter.) This makes them ideal for detailed + performance analysis. This method runs `stmt` in a separate process + so that Valgrind can instrument the program. Performance is severely + degraded due to the instrumentation, however this is ameliorated by + the fact that a small number of iterations is generally sufficient to + obtain good measurements. + + In order to use this method `valgrind`, `callgrind_control`, and + `callgrind_annotate` must be installed. + + Because there is a process boundary between the caller (this process) + and the `stmt` execution, `globals` cannot contain arbitrary in-memory + data structures. (Unlike timing methods) Instead, globals are + restricted to builtins, `nn.Modules`'s, and TorchScripted functions/modules + to reduce the surprise factor from serialization and subsequent + deserialization. The `GlobalsBridge` class provides more detail on this + subject. Take particular care with nn.Modules: they rely on pickle and + you may need to add an import to `setup` for them to transfer properly. + + By default, a profile for an empty statement will be collected and + cached to indicate how many instructions are from the Python loop which + drives `stmt`. + + Returns: + A `CallgrindStats` object which provides instruction counts and + some basic facilities for analyzing and manipulating results. + """ + if not isinstance(self._task_spec.stmt, str): + raise ValueError("`collect_callgrind` currently only supports string `stmt`") + + if repeats is not None and repeats < 1: + raise ValueError("If specified, `repeats` must be >= 1") + + # Check that the statement is valid. It doesn't guarantee success, but it's much + # simpler and quicker to raise an exception for a faulty `stmt` or `setup` in + # the parent process rather than the valgrind subprocess. + self._timeit(1) + is_python = (self._language == Language.PYTHON) + if not is_python and self._globals: + raise AssertionError("_timer globals are only supported for Python timers") + result = valgrind_timer_interface.wrapper_singleton().collect_callgrind( + task_spec=self._task_spec, + globals=self._globals, + number=number, + repeats=repeats or 1, + collect_baseline=collect_baseline and is_python, + is_python=is_python, + retain_out_file=retain_out_file, + ) + + return (result[0] if repeats is None else result) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/valgrind_wrapper/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/valgrind_wrapper/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/valgrind_wrapper/callgrind.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/valgrind_wrapper/callgrind.h new file mode 100644 index 0000000000000000000000000000000000000000..f078cc82b95daf94d2bea51f1e1b1a8c12daea23 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/valgrind_wrapper/callgrind.h @@ -0,0 +1,129 @@ + +/* + ---------------------------------------------------------------- + + Notice that the following BSD-style license applies to this one + file (callgrind.h) only. The rest of Valgrind is licensed under the + terms of the GNU General Public License, version 2, unless + otherwise indicated. See the COPYING file in the source + distribution for details. + + ---------------------------------------------------------------- + + This file is part of callgrind, a valgrind tool for cache simulation + and call tree tracing. + + Copyright (C) 2003-2017 Josef Weidendorfer. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. The origin of this software must not be misrepresented; you must + not claim that you wrote the original software. If you use this + software in a product, an acknowledgment in the product + documentation would be appreciated but is not required. + + 3. Altered source versions must be plainly marked as such, and must + not be misrepresented as being the original software. + + 4. The name of the author may not be used to endorse or promote + products derived from this software without specific prior written + permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + ---------------------------------------------------------------- + + Notice that the above BSD-style license applies to this one file + (callgrind.h) only. The entire rest of Valgrind is licensed under + the terms of the GNU General Public License, version 2. See the + COPYING file in the source distribution for details. + + ---------------------------------------------------------------- +*/ + +#ifndef __CALLGRIND_H +#define __CALLGRIND_H + +#include "valgrind.h" + +/* !! ABIWARNING !! ABIWARNING !! ABIWARNING !! ABIWARNING !! + This enum comprises an ABI exported by Valgrind to programs + which use client requests. DO NOT CHANGE THE ORDER OF THESE + ENTRIES, NOR DELETE ANY -- add new ones at the end. + + The identification ('C','T') for Callgrind has historical + reasons: it was called "Calltree" before. Besides, ('C','G') would + clash with cachegrind. + */ + +typedef + enum { + VG_USERREQ__DUMP_STATS = VG_USERREQ_TOOL_BASE('C','T'), + VG_USERREQ__ZERO_STATS, + VG_USERREQ__TOGGLE_COLLECT, + VG_USERREQ__DUMP_STATS_AT, + VG_USERREQ__START_INSTRUMENTATION, + VG_USERREQ__STOP_INSTRUMENTATION + } Vg_CallgrindClientRequest; + +/* Dump current state of cost centers, and zero them afterwards */ +#define CALLGRIND_DUMP_STATS \ + VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DUMP_STATS, \ + 0, 0, 0, 0, 0) + +/* Dump current state of cost centers, and zero them afterwards. + The argument is appended to a string stating the reason which triggered + the dump. This string is written as a description field into the + profile data dump. */ +#define CALLGRIND_DUMP_STATS_AT(pos_str) \ + VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DUMP_STATS_AT, \ + pos_str, 0, 0, 0, 0) + +/* Zero cost centers */ +#define CALLGRIND_ZERO_STATS \ + VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__ZERO_STATS, \ + 0, 0, 0, 0, 0) + +/* Toggles collection state. + The collection state specifies whether the happening of events + should be noted or if they are to be ignored. Events are noted + by increment of counters in a cost center */ +#define CALLGRIND_TOGGLE_COLLECT \ + VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__TOGGLE_COLLECT, \ + 0, 0, 0, 0, 0) + +/* Start full callgrind instrumentation if not already switched on. + When cache simulation is done, it will flush the simulated cache; + this will lead to an artificial cache warmup phase afterwards with + cache misses which would not have happened in reality. */ +#define CALLGRIND_START_INSTRUMENTATION \ + VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__START_INSTRUMENTATION, \ + 0, 0, 0, 0, 0) + +/* Stop full callgrind instrumentation if not already switched off. + This flushes Valgrinds translation cache, and does no additional + instrumentation afterwards, which effectivly will run at the same + speed as the "none" tool (ie. at minimal slowdown). + Use this to bypass Callgrind aggregation for uninteresting code parts. + To start Callgrind in this mode to ignore the setup phase, use + the option "--instr-atstart=no". */ +#define CALLGRIND_STOP_INSTRUMENTATION \ + VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__STOP_INSTRUMENTATION, \ + 0, 0, 0, 0, 0) + +#endif /* __CALLGRIND_H */ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/valgrind_wrapper/compat_bindings.cpp b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/valgrind_wrapper/compat_bindings.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cd41f0de092f0b1488c8945edf2af80c6f9b596c --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/valgrind_wrapper/compat_bindings.cpp @@ -0,0 +1,35 @@ +/* Used to collect profiles of old versions of PyTorch. */ +#include +#include + +bool _valgrind_supported_platform() { +#if defined(NVALGRIND) + return false; +#else + return true; +#endif +} + +void _valgrind_toggle() { +#if defined(NVALGRIND) + TORCH_CHECK(false, "Valgrind is not supported."); +#else + CALLGRIND_TOGGLE_COLLECT; +#endif +} + +void _valgrind_toggle_and_dump_stats() { +#if defined(NVALGRIND) + TORCH_CHECK(false, "Valgrind is not supported."); +#else + // NB: See note in Module.cpp + CALLGRIND_TOGGLE_COLLECT; + CALLGRIND_DUMP_STATS; +#endif +} + +PYBIND11_MODULE(callgrind_bindings, m) { + m.def("_valgrind_supported_platform", &_valgrind_supported_platform); + m.def("_valgrind_toggle", &_valgrind_toggle); + m.def("_valgrind_toggle_and_dump_stats", &_valgrind_dump_stats); +} diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/valgrind_wrapper/timer_callgrind_template.cpp b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/valgrind_wrapper/timer_callgrind_template.cpp new file mode 100644 index 0000000000000000000000000000000000000000..587685c7df7445b299c35462307f47cf6012a00d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/valgrind_wrapper/timer_callgrind_template.cpp @@ -0,0 +1,68 @@ +/* C++ template for Timer.collect_callgrind + +This template will be consumed by `cpp_jit.py`, and will replace: + `GLOBAL_SETUP_TEMPLATE_LOCATION`, + `SETUP_TEMPLATE_LOCATION` + and + `STMT_TEMPLATE_LOCATION` +sections with user provided statements. +*/ + +#include +#include +#include + +#include + +// Global setup. (e.g. #includes) +// GLOBAL_SETUP_TEMPLATE_LOCATION + +#if defined(NVALGRIND) +static_assert(false); +#endif + +int main(int argc, char* argv[]) { + // This file should only be called inside of `Timer`, so we can adopt a + // very simple and rigid argument parsing scheme. + TORCH_CHECK(argc == 9); + TORCH_CHECK(std::string(argv[1]) == "--number"); + auto number = std::stoi(argv[2]); + + TORCH_CHECK( + std::string(argv[3]) == "--number-warmup" || + std::string(argv[3]) == "--number_warmup"); + auto number_warmup = std::stoi(argv[4]); + + TORCH_CHECK(std::string(argv[5]) == "--repeats"); + auto repeats = std::stoi(argv[6]); + + TORCH_CHECK( + std::string(argv[7]) == "--number-threads" || + std::string(argv[7]) == "--number_threads"); + auto number_threads = std::stoi(argv[8]); + torch::set_num_threads(number_threads); + + // Setup + // SETUP_TEMPLATE_LOCATION + + // Warmup + for (const auto i : c10::irange(number_warmup)) { + (void)i; + // STMT_TEMPLATE_LOCATION + } + + // Main loop + for (const auto repeat : c10::irange(repeats)) { + (void)repeat; + CALLGRIND_TOGGLE_COLLECT; + + for (const auto i : c10::irange(number)) { + (void)i; + // STMT_TEMPLATE_LOCATION + } + + // NB: See note in Module.cpp + CALLGRIND_TOGGLE_COLLECT; + CALLGRIND_DUMP_STATS; + } +} diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/valgrind_wrapper/timer_interface.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/valgrind_wrapper/timer_interface.py new file mode 100644 index 0000000000000000000000000000000000000000..17ecea8bbb5598db967e8213b5bbd9c0fd8562f3 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/valgrind_wrapper/timer_interface.py @@ -0,0 +1,919 @@ +"""Intermediate layer between `Timer` and `valgrind`.""" +import collections +import enum +import dataclasses +import itertools as it +import os +import pickle +import re +import shutil +import subprocess +import sys +import textwrap +from typing import ( + cast, Any, NamedTuple, + Union, TYPE_CHECKING) +from collections.abc import Callable +from collections.abc import Iterator + +import torch +from torch.utils.benchmark.utils import common, cpp_jit +from torch.utils.benchmark.utils._stubs import CallgrindModuleType +import operator + + +__all__ = ["FunctionCount", "FunctionCounts", "CallgrindStats", "CopyIfCallgrind"] + + +if TYPE_CHECKING: + CompletedProcessType = subprocess.CompletedProcess[str] +else: + CompletedProcessType = subprocess.CompletedProcess + + +class FunctionCount(NamedTuple): + # TODO(#105471): Rename the count field + count: int # type: ignore[assignment] + function: str + + +@dataclasses.dataclass(repr=False, eq=False, frozen=True) +class FunctionCounts: + """Container for manipulating Callgrind results. + + It supports: + 1) Addition and subtraction to combine or diff results. + 2) Tuple-like indexing. + 3) A `denoise` function which strips CPython calls which are known to + be non-deterministic and quite noisy. + 4) Two higher order methods (`filter` and `transform`) for custom + manipulation. + """ + _data: tuple[FunctionCount, ...] + inclusive: bool + truncate_rows: bool = True + + # For normal use, torch._tensor_str.PRINT_OPTS.linewidth determines + # the print settings. This is simply to allow hermetic unit tests. + _linewidth: int | None = None + + def __iter__(self) -> Iterator[FunctionCount]: + yield from self._data + + def __len__(self) -> int: + return len(self._data) + + def __getitem__(self, item: Any) -> Union[FunctionCount, "FunctionCounts"]: + data: FunctionCount | tuple[FunctionCount, ...] = self._data[item] + return ( + FunctionCounts(cast(tuple[FunctionCount, ...], data), self.inclusive, truncate_rows=False) + if isinstance(data, tuple) else data + ) + + def __repr__(self) -> str: + count_len = 0 + for c, _ in self: + # Account for sign in string length. + count_len = max(count_len, len(str(c)) + int(c < 0)) + + lines = [] + linewidth = self._linewidth or torch._tensor_str.PRINT_OPTS.linewidth + fn_str_len = max(linewidth - count_len - 4, 40) + for c, fn in self: + if len(fn) > fn_str_len: + left_len = int((fn_str_len - 5) // 2) + fn = fn[:left_len] + " ... " + fn[-(fn_str_len - left_len - 5):] + lines.append(f" {c:>{count_len}} {fn}") + + if self.truncate_rows and len(lines) > 18: + lines = lines[:9] + ["...".rjust(count_len + 2)] + lines[-9:] + + if not self.inclusive: + lines.extend(["", f"Total: {self.sum()}"]) + + return "\n".join([super().__repr__()] + lines) + + def __add__( + self, + other: "FunctionCounts", + ) -> "FunctionCounts": + return self._merge(other, lambda c: c) + + def __sub__( + self, + other: "FunctionCounts", + ) -> "FunctionCounts": + return self._merge(other, operator.neg) + + def __mul__(self, other: int | float) -> "FunctionCounts": + return self._from_dict({ + fn: int(c * other) for c, fn in self._data + }, self.inclusive) + + def transform(self, map_fn: Callable[[str], str]) -> "FunctionCounts": + """Apply `map_fn` to all of the function names. + + This can be used to regularize function names (e.g. stripping irrelevant + parts of the file path), coalesce entries by mapping multiple functions + to the same name (in which case the counts are added together), etc. + """ + counts: collections.defaultdict[str, int] = collections.defaultdict(int) + for c, fn in self._data: + counts[map_fn(fn)] += c + + return self._from_dict(counts, self.inclusive) + + def filter(self, filter_fn: Callable[[str], bool]) -> "FunctionCounts": + """Keep only the elements where `filter_fn` applied to function name returns True.""" + return FunctionCounts(tuple(i for i in self if filter_fn(i.function)), self.inclusive) + + def sum(self) -> int: + return sum(c for c, _ in self) + + def denoise(self) -> "FunctionCounts": + """Remove known noisy instructions. + + Several instructions in the CPython interpreter are rather noisy. These + instructions involve unicode to dictionary lookups which Python uses to + map variable names. FunctionCounts is generally a content agnostic + container, however this is sufficiently important for obtaining + reliable results to warrant an exception.""" + return self.filter(lambda fn: "dictobject.c:lookdict_unicode" not in fn) + + def _merge( + self, + second: "FunctionCounts", + merge_fn: Callable[[int], int] + ) -> "FunctionCounts": + if self.inclusive != second.inclusive: + raise AssertionError("Cannot merge inclusive and exclusive counts.") + counts: collections.defaultdict[str, int] = collections.defaultdict(int) + for c, fn in self: + counts[fn] += c + + for c, fn in second: + counts[fn] += merge_fn(c) + + return self._from_dict(counts, self.inclusive) + + @staticmethod + def _from_dict(counts: dict[str, int], inclusive: bool) -> "FunctionCounts": + flat_counts = (FunctionCount(c, fn) for fn, c in counts.items() if c) + return FunctionCounts(tuple(sorted(flat_counts, reverse=True)), inclusive) + + +@dataclasses.dataclass(repr=False, eq=False, frozen=True) +class CallgrindStats: + """Top level container for Callgrind results collected by Timer. + + Manipulation is generally done using the FunctionCounts class, which is + obtained by calling `CallgrindStats.stats(...)`. Several convenience + methods are provided as well; the most significant is + `CallgrindStats.as_standardized()`. + """ + task_spec: common.TaskSpec + number_per_run: int + built_with_debug_symbols: bool + baseline_inclusive_stats: FunctionCounts + baseline_exclusive_stats: FunctionCounts + stmt_inclusive_stats: FunctionCounts + stmt_exclusive_stats: FunctionCounts + stmt_callgrind_out: str | None + + def __repr__(self) -> str: + base_stats = self.baseline_exclusive_stats + output = f""" +{super().__repr__()} +{self.task_spec.summarize()} + {'':>25}All{'':>10}Noisy symbols removed + Instructions: {self.counts(denoise=False):>12}{'':>15}{self.counts(denoise=True):>12} + Baseline: {base_stats.sum():>12}{'':>15}{base_stats.denoise().sum():>12} +{self.number_per_run} runs per measurement, {self.task_spec.num_threads} thread{'s' if self.task_spec.num_threads > 1 else ''} +""".strip() + if not self.built_with_debug_symbols: + output += textwrap.dedent(""" + Warning: PyTorch was not built with debug symbols. + Source information may be limited. Rebuild with + REL_WITH_DEB_INFO=1 for more detailed results.""") + return output + + def stats(self, inclusive: bool = False) -> FunctionCounts: + """Returns detailed function counts. + + Conceptually, the FunctionCounts returned can be thought of as a tuple + of (count, path_and_function_name) tuples. + + `inclusive` matches the semantics of callgrind. If True, the counts + include instructions executed by children. `inclusive=True` is useful + for identifying hot spots in code; `inclusive=False` is useful for + reducing noise when diffing counts from two different runs. (See + CallgrindStats.delta(...) for more details) + """ + return self.stmt_inclusive_stats if inclusive else self.stmt_exclusive_stats + + def counts(self, *, denoise: bool = False) -> int: + """Returns the total number of instructions executed. + + See `FunctionCounts.denoise()` for an explanation of the `denoise` arg. + """ + stats = self.stmt_exclusive_stats + return (stats.denoise() if denoise else stats).sum() + + # FIXME: Once 3.7 is the minimum version, type annotate `other` per PEP 563 + def delta( + self, + other: "CallgrindStats", + inclusive: bool = False, + ) -> FunctionCounts: + """Diff two sets of counts. + + One common reason to collect instruction counts is to determine the + the effect that a particular change will have on the number of instructions + needed to perform some unit of work. If a change increases that number, the + next logical question is "why". This generally involves looking at what part + if the code increased in instruction count. This function automates that + process so that one can easily diff counts on both an inclusive and + exclusive basis. + """ + return self.stats(inclusive=inclusive) - other.stats(inclusive=inclusive) + + def as_standardized(self) -> "CallgrindStats": + """Strip library names and some prefixes from function strings. + + When comparing two different sets of instruction counts, on stumbling + block can be path prefixes. Callgrind includes the full filepath + when reporting a function (as it should). However, this can cause + issues when diffing profiles. If a key component such as Python + or PyTorch was built in separate locations in the two profiles, which + can result in something resembling:: + + 23234231 /tmp/first_build_dir/thing.c:foo(...) + 9823794 /tmp/first_build_dir/thing.c:bar(...) + ... + 53453 .../aten/src/Aten/...:function_that_actually_changed(...) + ... + -9823794 /tmp/second_build_dir/thing.c:bar(...) + -23234231 /tmp/second_build_dir/thing.c:foo(...) + + Stripping prefixes can ameliorate this issue by regularizing the + strings and causing better cancellation of equivalent call sites + when diffing. + """ + def strip(stats: FunctionCounts) -> FunctionCounts: + transforms = ( + # PyTorch may have been built in different locations. + (r"^.+build/\.\./", "build/../"), + (r"^.+/" + re.escape("build/aten/"), "build/aten/"), + + # "Python" and "Objects" come from CPython. + (r"^.+/" + re.escape("Python/"), "Python/"), + (r"^.+/" + re.escape("Objects/"), "Objects/"), + + # Strip library name. e.g. `libtorch.so` + (r"\s\[.+\]$", ""), + ) + + for before, after in transforms: + stats = stats.transform(lambda fn: re.sub(before, after, fn)) + + return stats + + return CallgrindStats( + task_spec=self.task_spec, + number_per_run=self.number_per_run, + built_with_debug_symbols=self.built_with_debug_symbols, + baseline_inclusive_stats=strip(self.baseline_inclusive_stats), + baseline_exclusive_stats=strip(self.baseline_exclusive_stats), + stmt_inclusive_stats=strip(self.stmt_inclusive_stats), + stmt_exclusive_stats=strip(self.stmt_exclusive_stats), + + # `as_standardized` will change symbol names, so the contents will + # no longer map directly to `callgrind.out` + stmt_callgrind_out=None, + ) + + +class Serialization(enum.Enum): + PICKLE = 0 + TORCH = 1 + TORCH_JIT = 2 + + +_GLOBALS_ALLOWED_TYPES: dict[Serialization, tuple[Any, ...]] = { + Serialization.PICKLE: (str, bytes, bool, int, float, complex), + Serialization.TORCH_JIT: (torch.jit.ScriptFunction, torch.jit.ScriptModule), + Serialization.TORCH: (torch.nn.Module,), +} + + +class CopyIfCallgrind: + """Signal that a global may be replaced with a deserialized copy. + + See `GlobalsBridge` for why this matters. + """ + def __init__(self, value: Any, *, setup: str | None = None) -> None: + for method, supported_types in _GLOBALS_ALLOWED_TYPES.items(): + if any(isinstance(value, t) for t in supported_types): + self._value: Any = value + self._setup: str | None = setup + self._serialization: Serialization = method + break + else: + supported_str = "\n".join([ + getattr(t, "__name__", repr(t)) + for t in it.chain(_GLOBALS_ALLOWED_TYPES.values())]) + + raise ValueError( + f"Unsupported type: {type(value)}\n" + f"`collect_callgrind` restricts globals to the following types:\n" + f"{textwrap.indent(supported_str, ' ')}" + ) + + @property + def value(self) -> Any: + return self._value + + @property + def setup(self) -> str | None: + return self._setup + + @property + def serialization(self) -> Serialization: + return self._serialization + + @staticmethod + def unwrap_all(globals: dict[str, Any]) -> dict[str, Any]: + return { + k: (v.value if isinstance(v, CopyIfCallgrind) else v) + for k, v in globals.items() + } + + +class GlobalsBridge: + """Handle the transfer of (certain) globals when collecting Callgrind statistics. + + Key takeaway: Any globals passed must be wrapped in `CopyIfCallgrind` to + work with `Timer.collect_callgrind`. + + Consider the following code snippet: + ``` + import pickle + import timeit + + class Counter: + value = 0 + + def __call__(self): + self.value += 1 + + counter = Counter() + timeit.Timer("counter()", globals={"counter": counter}).timeit(10) + print(counter.value) # 10 + + timeit.Timer( + "counter()", + globals={"counter": pickle.loads(pickle.dumps(counter))} + ).timeit(20) + print(counter.value) # Still 10 + ``` + + In the first case, `stmt` is executed using the objects in `globals`; + however, the addition of serialization and deserialization changes the + semantics and may meaningfully change behavior. + + This is a practical consideration when collecting Callgrind statistics. + Unlike `exec` based execution (which `timeit` uses under the hood) which + can share in-memory data structures with the caller, Callgrind collection + requires an entirely new process in order to run under Valgrind. This means + that any data structures used for statement execution will have to be + serialized and deserialized in the subprocess. + + In order to avoid surprising semantics from (user invisible) process + boundaries, what can be passed through `globals` is severely restricted + for `Timer.collect_callgrind`. It is expected that most setup should be + achievable (albeit perhaps less ergonomically) by passing a `setup` + string. + + There are, however, exceptions. One such class are TorchScripted functions. + Because they require a concrete file with source code it is not possible + to define them using a `setup` string. Another group are torch.nn.Modules, + whose construction can be complex and prohibitively cumbersome to coerce + into a `setup` string. Finally, most builtin types are sufficiently well + behaved and sufficiently common to warrant allowing as well. (e.g. + `globals={"n": 1}` is very convenient.) + + Fortunately, all have well defined serialization semantics. This class + is responsible for enabling the Valgrind subprocess to use elements in + `globals` so long as they are an allowed type. + + Caveats: + The user is required to acknowledge this serialization by wrapping + elements in `globals` with `CopyIfCallgrind`. + + While ScriptFunction and ScriptModule are expected to save and load + quite robustly, it is up to the user to ensure that an nn.Module can + un-pickle successfully. + + `torch.Tensor` and `np.ndarray` are deliberately excluded. The + serialization/deserialization process perturbs the representation of a + tensor in ways that could result in incorrect measurements. For example, + if a tensor lives in pinned CPU memory, this fact would not be preserved + by a dump, and that will in turn change the performance of certain CUDA + operations. + """ + + def __init__(self, globals: dict[str, Any], data_dir: str) -> None: + self._globals: dict[str, CopyIfCallgrind] = {} + self._data_dir = data_dir + if not os.path.exists(data_dir): + os.mkdir(data_dir) + + if globals.get("torch", torch) is not torch: + raise ValueError("`collect_callgrind` does not support mocking out `torch`.") + + for name, value in globals.items(): + if name in ("torch", "__builtins__"): + # Torch will be imported by the collection script, and + # __builtins__ is added by Timer. + continue + + if not isinstance(value, CopyIfCallgrind): + raise ValueError( + "`collect_callgrind` requires that globals be wrapped in " + "`CopyIfCallgrind` so that serialization is explicit." + ) + + self._globals[name] = value + + def construct(self) -> str: + load_lines = [] + for name, wrapped_value in self._globals.items(): + if wrapped_value.setup is not None: + # pyrefly: ignore [bad-argument-type] + load_lines.append(textwrap.dedent(wrapped_value.setup)) + + if wrapped_value.serialization == Serialization.PICKLE: + path = os.path.join(self._data_dir, f"{name}.pkl") + load_lines.append( + # pyrefly: ignore [bad-argument-type] + f"with open({repr(path)}, 'rb') as f:\n {name} = pickle.load(f)") + with open(path, "wb") as f: + pickle.dump(wrapped_value.value, f) + + elif wrapped_value.serialization == Serialization.TORCH: + path = os.path.join(self._data_dir, f"{name}.pt") + # TODO: Figure out if we can use torch.serialization.add_safe_globals here + # Using weights_only=False after the change in + # https://dev-discuss.pytorch.org/t/bc-breaking-change-torch-load-is-being-flipped-to-use-weights-only-true-by-default-in-the-nightlies-after-137602/2573 + # pyrefly: ignore [bad-argument-type] + load_lines.append(f"{name} = torch.load({repr(path)}, weights_only=False)") + torch.save(wrapped_value.value, path) + + elif wrapped_value.serialization == Serialization.TORCH_JIT: + path = os.path.join(self._data_dir, f"{name}.pt") + # pyrefly: ignore [bad-argument-type] + load_lines.append(f"{name} = torch.jit.load({repr(path)})") + with open(path, "wb") as f: + torch.jit.save(wrapped_value.value, f) # type: ignore[no-untyped-call] + + else: + raise NotImplementedError( + f"Unknown serialization method: {wrapped_value.serialization}") + + return "\n".join(load_lines) + + +class _ValgrindWrapper: + def __init__(self) -> None: + self._bindings_module: CallgrindModuleType | None = None + valgrind_symbols = ( + "_valgrind_supported_platform", + "_valgrind_toggle", + "_valgrind_toggle_and_dump_stats", + ) + if all(hasattr(torch._C, symbol) for symbol in valgrind_symbols): + self._supported_platform: bool = torch._C._valgrind_supported_platform() + + else: + print("Callgrind bindings are not present in `torch._C`. JIT-ing bindings.") + self._bindings_module = cpp_jit.get_compat_bindings() + if not all(hasattr(self._bindings_module, symbol) for symbol in valgrind_symbols): + raise AssertionError("JIT-compiled callgrind bindings are missing required symbols") + self._supported_platform = self._bindings_module._valgrind_supported_platform() + + self._commands_available: dict[str, bool] = {} + if self._supported_platform: + # Only bother checking on supported platforms. + for cmd in ("valgrind", "callgrind_control", "callgrind_annotate"): + self._commands_available[cmd] = not subprocess.run( + ["which", cmd], + capture_output=True, + check=False, + ).returncode + + self._build_type: str | None = None + build_search = re.search("BUILD_TYPE=(.+),", torch.__config__.show()) # type: ignore[no-untyped-call] + if build_search is not None: + self._build_type = build_search.groups()[0].split(",")[0] + + def _validate(self) -> None: + if not self._supported_platform: + raise OSError("Valgrind is not supported on this platform.") + + missing_cmds = [cmd for cmd, available in self._commands_available.items() if not available] + if missing_cmds: + raise OSError("Missing: " + ", ".join(missing_cmds)) + + def collect_callgrind( + self, + task_spec: common.TaskSpec, + globals: dict[str, Any], + *, + number: int, + repeats: int, + collect_baseline: bool, + is_python: bool, + retain_out_file: bool, + ) -> tuple[CallgrindStats, ...]: + """Collect stats, and attach a reference run which can be used to filter interpreter overhead.""" + self._validate() + if not is_python and collect_baseline: + raise AssertionError("collect_baseline is only supported for Python timers") + + *task_stats, baseline_stats = self._invoke( + task_spec=task_spec, + globals=globals, + number=number, + repeats=repeats, + collect_baseline=collect_baseline, + is_python=is_python, + retain_out_file=retain_out_file, + ) + if len(task_stats) != repeats: + raise AssertionError("Unexpected number of task stats returned from _invoke") + + return tuple( + CallgrindStats( + task_spec=task_spec, + number_per_run=number, + built_with_debug_symbols=self._build_type == "RelWithDebInfo", + baseline_inclusive_stats=baseline_stats[0], + baseline_exclusive_stats=baseline_stats[1], + stmt_inclusive_stats=stmt_inclusive_stats, + stmt_exclusive_stats=stmt_exclusive_stats, + stmt_callgrind_out=out_contents, + ) + for stmt_inclusive_stats, stmt_exclusive_stats, out_contents in task_stats + ) + + def _invoke( + self, + *, + task_spec: common.TaskSpec, + globals: dict[str, Any], + number: int, + repeats: int, + collect_baseline: bool, + is_python: bool, + retain_out_file: bool, + ) -> tuple[tuple[FunctionCounts, FunctionCounts, str | None], ...]: + """Core invocation method for Callgrind collection. + + Valgrind operates by effectively replacing the CPU with an emulated + version which allows it to instrument any code at the cost of severe + performance degradation. This has the practical effect that in order + to collect Callgrind statistics, a new process has to be created + running under `valgrind`. The steps for this process are: + + 1) Create a scratch directory. + 2) Codegen a run script. (_ValgrindWrapper._construct_script) + Inside the run script: + * Validate that Python and torch match the parent process + * Validate that it is indeed running under valgrind + * Execute `setup` and warm up `stmt` + * Begin collecting stats + * Run the `stmt` loop + * Stop collecting stats + 3) Parse the run results. + 4) Cleanup the scratch directory. + """ + working_dir = common._make_temp_dir(prefix="callgrind") + data_dir = os.path.join(working_dir, "data") + script_file = os.path.join(working_dir, "timer_callgrind.py") + callgrind_out = os.path.join(working_dir, "callgrind.out") + error_log = os.path.join(working_dir, "error.txt") + stat_log = os.path.join(working_dir, "callgrind_stat.txt") + stdout_stderr_log = os.path.join(working_dir, "stdout_stderr.log") + + def run(args: list[str], **kwargs: Any) -> tuple[CompletedProcessType, str]: + # https://thraxil.org/users/anders/posts/2008/03/13/Subprocess-Hanging-PIPE-is-your-enemy/ + with open(stdout_stderr_log, "wb") as f_stdout_stderr: + invocation = subprocess.run( + args, + stdout=f_stdout_stderr, + stderr=subprocess.STDOUT, + **kwargs, + ) + with open(stdout_stderr_log) as f: + return invocation, f.read() + + try: + if is_python: + if self._bindings_module is not None: + shutil.copy( + self._bindings_module.__file__, + os.path.join(working_dir, os.path.split(self._bindings_module.__file__)[1]) + ) + + script_file = os.path.join(working_dir, "timer_callgrind.py") + with open(script_file, "w") as f: + f.write(self._construct_script( + task_spec, + globals=GlobalsBridge(globals, data_dir), + number=number, + repeats=repeats, + collect_baseline=collect_baseline, + error_log=error_log, + stat_log=stat_log, + bindings=self._bindings_module)) + + run_loop_cmd = ["python", script_file] + else: + if collect_baseline: + raise AssertionError("collect_baseline must be False for non-Python timers") + run_loop_exec = cpp_jit.compile_callgrind_template( + stmt=task_spec.stmt, + setup=task_spec.setup, + global_setup=task_spec.global_setup, + ) + run_loop_cmd = [ + run_loop_exec, + "--number", str(number), + "--number-warmup", str(min(number, 10)), + "--repeats", str(repeats), + "--number-threads", str(task_spec.num_threads), + ] + + valgrind_invocation, valgrind_invocation_output = run([ + "valgrind", + "--tool=callgrind", + f"--callgrind-out-file={callgrind_out}", + "--dump-line=yes", + "--dump-instr=yes", + "--instr-atstart=yes", + "--collect-atstart=no", + ] + run_loop_cmd) + + if valgrind_invocation.returncode: + error_report = "" + if os.path.exists(error_log): + with open(error_log) as f: + error_report = f.read() + if not error_report: + error_report = "Unknown error.\n" + valgrind_invocation_output + + raise OSError(f"Failed to collect callgrind profile:\n{error_report}") + + def parse_output(fpath: str, inclusive: bool) -> FunctionCounts: + _annotate_invocation, annotate_invocation_output = run([ + "callgrind_annotate", + f"--inclusive={'yes' if inclusive else 'no'}", + "--threshold=100", + "--show-percs=no", + fpath + ], check=True) + + total_pattern = re.compile(r"^([0-9,]+)\s+PROGRAM TOTALS") + begin_pattern = re.compile(r"Ir\s+file:function") + function_pattern = re.compile(r"^\s*([0-9,]+)\s+(.+:.+)$") + + class ScanState(enum.Enum): + SCANNING_FOR_TOTAL = 0 + SCANNING_FOR_START = 1 + PARSING = 2 + + scan_state = ScanState.SCANNING_FOR_TOTAL + fn_counts = [] + for l in annotate_invocation_output.splitlines(keepends=False): + if scan_state == ScanState.SCANNING_FOR_TOTAL: + total_match = total_pattern.match(l) + if total_match: + program_totals = int(total_match.groups()[0].replace(",", "")) + scan_state = ScanState.SCANNING_FOR_START + + elif scan_state == ScanState.SCANNING_FOR_START: + if begin_pattern.match(l): + scan_state = ScanState.PARSING + + else: + if scan_state != ScanState.PARSING: + raise AssertionError("Failed to enter PARSING state while parsing callgrind_annotate output") + fn_match = function_pattern.match(l) + if fn_match: + ir_str, file_function = fn_match.groups() + ir = int(ir_str.replace(",", "")) + if ir == program_totals: # type: ignore[possibly-undefined] + # Callgrind includes some top level red herring symbols when + # a program dumps multiple profiles. + continue + fn_counts.append(FunctionCount(ir, file_function)) + + elif re.match(r"-+", l): + # Ignore heading separator lines. + continue + + else: + break + + if scan_state != ScanState.PARSING: + raise AssertionError(f"Failed to parse {fpath}") + return FunctionCounts(tuple(sorted(fn_counts, reverse=True)), inclusive=inclusive) + + def read_results(i: int) -> tuple[FunctionCounts, FunctionCounts, str | None]: + if i == repeats and not collect_baseline: + # Null baseline. + return ( + FunctionCounts((), inclusive=True), + FunctionCounts((), inclusive=False), + None, + ) + + fpath = f"{callgrind_out}.{i + 1}" # Callgrind one-indexes files. + callgrind_out_contents: str | None = None + if retain_out_file: + with open(fpath) as f: + callgrind_out_contents = f.read() + + return ( + parse_output(fpath, inclusive=True), + parse_output(fpath, inclusive=False), + callgrind_out_contents + ) + + return tuple(read_results(i) for i in range(repeats + 1)) + finally: + shutil.rmtree(working_dir) + + @staticmethod + def _construct_script( + task_spec: common.TaskSpec, + globals: GlobalsBridge, + *, + number: int, + repeats: int, + collect_baseline: bool, + error_log: str, + stat_log: str, + bindings: CallgrindModuleType | None, + ) -> str: + def block_stmt(stmt: str, indent: int = 0) -> str: + """Partially unroll benchmark loop. + + The naive template looks something like: + "for _ in range({number}): {stmt}" + + However a loop in Python is surprisingly expensive, and significantly + increases the number of background Python instructions. So instead we + partially unroll the loops, with a block size of 100 chosen to keep + the instruction overhead from `range` low while also not ballooning + the size of the generated file. + """ + block_size = 100 + loop_count = number // block_size + if loop_count == 1: + # There is no point in having `for _ in range(1): ...` rather + # than just `...`, and this lets us save shave a few background + # instructions. + loop_count = 0 + remainder = number - block_size * loop_count + blocked_stmt = "" + + if loop_count: + unrolled_stmts = textwrap.indent("\n".join([stmt] * block_size), " " * 4) + blocked_stmt += f"for _ in range({loop_count}):\n{unrolled_stmts}\n" + + if remainder: + blocked_stmt += "\n".join([stmt] * remainder) + + return textwrap.indent(blocked_stmt, " " * indent) + + pass_baseline = ( + "callgrind_bindings._valgrind_toggle()\n" + f"{block_stmt('pass')}\n" + "callgrind_bindings._valgrind_toggle_and_dump_stats()" + ) + + return textwrap.dedent(r""" + import gc + import os + import pickle + import subprocess + import sys + import time + + # Mitigate https://github.com/pytorch/pytorch/issues/37377 + # which can sometimes cause the subprocess call to fail. + import numpy as np + + import torch + torch.set_num_threads({num_threads}) + + {bindings_import} + + PID = os.getpid() + + def log_failure(msg): + with open({error_log_repr}, "wt") as f: + f.write(msg) + sys.exit(1) + + def check_result(completed_process): + if completed_process.returncode: + log_failure(f"Command failed: {{' '.join(completed_process.args)}}") + return completed_process + + # ============================================================================= + # == Check that subprocess matches parent ===================================== + # ============================================================================= + if os.path.realpath(sys.executable) != "{parent_interpreter}": + log_failure( + "Interpreter mismatch:\n" + f" {{os.path.realpath(sys.executable)}}\n vs.\n {parent_interpreter}" + ) + + if torch.__file__ != "{torch_file}": + log_failure( + "PyTorch does not match expected file:\n" + f" {{torch.__file__}}\n vs.\n {torch_file}" + ) + + # ============================================================================= + # == User specified setup ===================================================== + # ============================================================================= + # Load serialized globals + {load_globals} + + # User setup str + {setup} + + for _ in range({warmup_number}): + {indented_stmt} + + # ============================================================================= + # == Callgrind management ===================================================== + # ============================================================================= + with open("{stat_log}", "wb") as stat_file: + # If many instances of callgrind are running at once, the output of + # `callgrind_control` may exceed 16kb which would cause `subprocess.PIPE` + # to deadlock. So instead we use a file. + callgrind_stat = check_result(subprocess.run( + ["callgrind_control", "--stat"], + stdout=stat_file, + stderr=subprocess.STDOUT, + )) + + with open("{stat_log}", "rt") as stat_file: + stat_lines = stat_file.read().splitlines() + + if f"PID {{PID}}: python {{__file__}}" not in stat_lines: + log_failure("Process does not appear to be running callgrind.") + + gc.collect() + time.sleep(0.01) + + # ============================================================================= + # == User code block ========================================================== + # ============================================================================= + for _ in range({repeats}): + callgrind_bindings._valgrind_toggle() + {blocked_stmt} + callgrind_bindings._valgrind_toggle_and_dump_stats() + gc.collect() + + {baseline} + """).strip().format( + indented_stmt=textwrap.indent(task_spec.stmt, " " * 4), + blocked_stmt=block_stmt(task_spec.stmt, indent=4), + baseline=(pass_baseline if collect_baseline else ""), + number=number, + repeats=repeats, + load_globals=globals.construct(), + setup=task_spec.setup, + warmup_number=min(number, 10), + num_threads=task_spec.num_threads, + error_log_repr=repr(error_log), + stat_log=stat_log, + parent_interpreter=os.path.realpath(sys.executable), + torch_file=torch.__file__, + bindings_import=( + "import torch._C as callgrind_bindings" if bindings is None + else f"import {bindings.__name__} as callgrind_bindings"), + ) + + +CALLGRIND_SINGLETON: _ValgrindWrapper | None = None +def wrapper_singleton() -> _ValgrindWrapper: + global CALLGRIND_SINGLETON + if CALLGRIND_SINGLETON is None: + CALLGRIND_SINGLETON = _ValgrindWrapper() + return CALLGRIND_SINGLETON diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/valgrind_wrapper/valgrind.h b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/valgrind_wrapper/valgrind.h new file mode 100644 index 0000000000000000000000000000000000000000..d33dd30932aa86b8284cb93d0e29ec646e820197 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/benchmark/utils/valgrind_wrapper/valgrind.h @@ -0,0 +1,7157 @@ +/* -*- c -*- + ---------------------------------------------------------------- + + Notice that the following BSD-style license applies to this one + file (valgrind.h) only. The rest of Valgrind is licensed under the + terms of the GNU General Public License, version 2, unless + otherwise indicated. See the COPYING file in the source + distribution for details. + + ---------------------------------------------------------------- + + This file is part of Valgrind, a dynamic binary instrumentation + framework. + + Copyright (C) 2000-2017 Julian Seward. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. The origin of this software must not be misrepresented; you must + not claim that you wrote the original software. If you use this + software in a product, an acknowledgment in the product + documentation would be appreciated but is not required. + + 3. Altered source versions must be plainly marked as such, and must + not be misrepresented as being the original software. + + 4. The name of the author may not be used to endorse or promote + products derived from this software without specific prior written + permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + ---------------------------------------------------------------- + + Notice that the above BSD-style license applies to this one file + (valgrind.h) only. The entire rest of Valgrind is licensed under + the terms of the GNU General Public License, version 2. See the + COPYING file in the source distribution for details. + + ---------------------------------------------------------------- +*/ + + +/* This file is for inclusion into client (your!) code. + + You can use these macros to manipulate and query Valgrind's + execution inside your own programs. + + The resulting executables will still run without Valgrind, just a + little bit more slowly than they otherwise would, but otherwise + unchanged. When not running on valgrind, each client request + consumes very few (eg. 7) instructions, so the resulting performance + loss is negligible unless you plan to execute client requests + millions of times per second. Nevertheless, if that is still a + problem, you can compile with the NVALGRIND symbol defined (gcc + -DNVALGRIND) so that client requests are not even compiled in. */ + +#ifndef __VALGRIND_H +#define __VALGRIND_H + + +/* ------------------------------------------------------------------ */ +/* VERSION NUMBER OF VALGRIND */ +/* ------------------------------------------------------------------ */ + +/* Specify Valgrind's version number, so that user code can + conditionally compile based on our version number. Note that these + were introduced at version 3.6 and so do not exist in version 3.5 + or earlier. The recommended way to use them to check for "version + X.Y or later" is (eg) + +#if defined(__VALGRIND_MAJOR__) && defined(__VALGRIND_MINOR__) \ + && (__VALGRIND_MAJOR__ > 3 \ + || (__VALGRIND_MAJOR__ == 3 && __VALGRIND_MINOR__ >= 6)) +*/ +#define __VALGRIND_MAJOR__ 3 +#define __VALGRIND_MINOR__ 17 + + +#include + +/* Nb: this file might be included in a file compiled with -ansi. So + we can't use C++ style "//" comments nor the "asm" keyword (instead + use "__asm__"). */ + +/* Derive some tags indicating what the target platform is. Note + that in this file we're using the compiler's CPP symbols for + identifying architectures, which are different to the ones we use + within the rest of Valgrind. Note, __powerpc__ is active for both + 32 and 64-bit PPC, whereas __powerpc64__ is only active for the + latter (on Linux, that is). + + Misc note: how to find out what's predefined in gcc by default: + gcc -Wp,-dM somefile.c +*/ +#undef PLAT_x86_darwin +#undef PLAT_amd64_darwin +#undef PLAT_x86_win32 +#undef PLAT_amd64_win64 +#undef PLAT_x86_linux +#undef PLAT_amd64_linux +#undef PLAT_ppc32_linux +#undef PLAT_ppc64be_linux +#undef PLAT_ppc64le_linux +#undef PLAT_arm_linux +#undef PLAT_arm64_linux +#undef PLAT_s390x_linux +#undef PLAT_mips32_linux +#undef PLAT_mips64_linux +#undef PLAT_nanomips_linux +#undef PLAT_x86_solaris +#undef PLAT_amd64_solaris + + +#if defined(__APPLE__) && defined(__i386__) +# define PLAT_x86_darwin 1 +#elif defined(__APPLE__) && defined(__x86_64__) +# define PLAT_amd64_darwin 1 +#elif (defined(__MINGW32__) && defined(__i386__)) \ + || defined(__CYGWIN32__) \ + || (defined(_WIN32) && defined(_M_IX86)) +# define PLAT_x86_win32 1 +#elif (defined(__MINGW32__) && defined(__x86_64__)) \ + || (defined(_WIN32) && defined(_M_X64)) +/* __MINGW32__ and _WIN32 are defined in 64 bit mode as well. */ +# define PLAT_amd64_win64 1 +#elif defined(__linux__) && defined(__i386__) +# define PLAT_x86_linux 1 +#elif defined(__linux__) && defined(__x86_64__) && !defined(__ILP32__) +# define PLAT_amd64_linux 1 +#elif defined(__linux__) && defined(__powerpc__) && !defined(__powerpc64__) +# define PLAT_ppc32_linux 1 +#elif defined(__linux__) && defined(__powerpc__) && defined(__powerpc64__) && _CALL_ELF != 2 +/* Big Endian uses ELF version 1 */ +# define PLAT_ppc64be_linux 1 +#elif defined(__linux__) && defined(__powerpc__) && defined(__powerpc64__) && _CALL_ELF == 2 +/* Little Endian uses ELF version 2 */ +# define PLAT_ppc64le_linux 1 +#elif defined(__linux__) && defined(__arm__) && !defined(__aarch64__) +# define PLAT_arm_linux 1 +#elif defined(__linux__) && defined(__aarch64__) && !defined(__arm__) +# define PLAT_arm64_linux 1 +#elif defined(__linux__) && defined(__s390__) && defined(__s390x__) +# define PLAT_s390x_linux 1 +#elif defined(__linux__) && defined(__mips__) && (__mips==64) +# define PLAT_mips64_linux 1 +#elif defined(__linux__) && defined(__mips__) && (__mips==32) +# define PLAT_mips32_linux 1 +#elif defined(__linux__) && defined(__nanomips__) +# define PLAT_nanomips_linux 1 +#elif defined(__sun) && defined(__i386__) +# define PLAT_x86_solaris 1 +#elif defined(__sun) && defined(__x86_64__) +# define PLAT_amd64_solaris 1 +#else +/* If we're not compiling for our target platform, don't generate + any inline asms. */ +# if !defined(NVALGRIND) +# define NVALGRIND 1 +# endif +#endif + + +/* ------------------------------------------------------------------ */ +/* ARCHITECTURE SPECIFICS for SPECIAL INSTRUCTIONS. There is nothing */ +/* in here of use to end-users -- skip to the next section. */ +/* ------------------------------------------------------------------ */ + +/* + * VALGRIND_DO_CLIENT_REQUEST(): a statement that invokes a Valgrind client + * request. Accepts both pointers and integers as arguments. + * + * VALGRIND_DO_CLIENT_REQUEST_STMT(): a statement that invokes a Valgrind + * client request that does not return a value. + + * VALGRIND_DO_CLIENT_REQUEST_EXPR(): a C expression that invokes a Valgrind + * client request and whose value equals the client request result. Accepts + * both pointers and integers as arguments. Note that such calls are not + * necessarily pure functions -- they may have side effects. + */ + +#define VALGRIND_DO_CLIENT_REQUEST(_zzq_rlval, _zzq_default, \ + _zzq_request, _zzq_arg1, _zzq_arg2, \ + _zzq_arg3, _zzq_arg4, _zzq_arg5) \ + do { (_zzq_rlval) = VALGRIND_DO_CLIENT_REQUEST_EXPR((_zzq_default), \ + (_zzq_request), (_zzq_arg1), (_zzq_arg2), \ + (_zzq_arg3), (_zzq_arg4), (_zzq_arg5)); } while (0) + +#define VALGRIND_DO_CLIENT_REQUEST_STMT(_zzq_request, _zzq_arg1, \ + _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5) \ + do { (void) VALGRIND_DO_CLIENT_REQUEST_EXPR(0, \ + (_zzq_request), (_zzq_arg1), (_zzq_arg2), \ + (_zzq_arg3), (_zzq_arg4), (_zzq_arg5)); } while (0) + +#if defined(NVALGRIND) + +/* Define NVALGRIND to completely remove the Valgrind magic sequence + from the compiled code (analogous to NDEBUG's effects on + assert()) */ +#define VALGRIND_DO_CLIENT_REQUEST_EXPR( \ + _zzq_default, _zzq_request, \ + _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5) \ + (_zzq_default) + +#else /* ! NVALGRIND */ + +/* The following defines the magic code sequences which the JITter + spots and handles magically. Don't look too closely at them as + they will rot your brain. + + The assembly code sequences for all architectures is in this one + file. This is because this file must be stand-alone, and we don't + want to have multiple files. + + For VALGRIND_DO_CLIENT_REQUEST, we must ensure that the default + value gets put in the return slot, so that everything works when + this is executed not under Valgrind. Args are passed in a memory + block, and so there's no intrinsic limit to the number that could + be passed, but it's currently five. + + The macro args are: + _zzq_rlval result lvalue + _zzq_default default value (result returned when running on real CPU) + _zzq_request request code + _zzq_arg1..5 request params + + The other two macros are used to support function wrapping, and are + a lot simpler. VALGRIND_GET_NR_CONTEXT returns the value of the + guest's NRADDR pseudo-register and whatever other information is + needed to safely run the call original from the wrapper: on + ppc64-linux, the R2 value at the divert point is also needed. This + information is abstracted into a user-visible type, OrigFn. + + VALGRIND_CALL_NOREDIR_* behaves the same as the following on the + guest, but guarantees that the branch instruction will not be + redirected: x86: call *%eax, amd64: call *%rax, ppc32/ppc64: + branch-and-link-to-r11. VALGRIND_CALL_NOREDIR is just text, not a + complete inline asm, since it needs to be combined with more magic + inline asm stuff to be useful. +*/ + +/* ----------------- x86-{linux,darwin,solaris} ---------------- */ + +#if defined(PLAT_x86_linux) || defined(PLAT_x86_darwin) \ + || (defined(PLAT_x86_win32) && defined(__GNUC__)) \ + || defined(PLAT_x86_solaris) + +typedef + struct { + unsigned int nraddr; /* where's the code? */ + } + OrigFn; + +#define __SPECIAL_INSTRUCTION_PREAMBLE \ + "roll $3, %%edi ; roll $13, %%edi\n\t" \ + "roll $29, %%edi ; roll $19, %%edi\n\t" + +#define VALGRIND_DO_CLIENT_REQUEST_EXPR( \ + _zzq_default, _zzq_request, \ + _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5) \ + __extension__ \ + ({volatile unsigned int _zzq_args[6]; \ + volatile unsigned int _zzq_result; \ + _zzq_args[0] = (unsigned int)(_zzq_request); \ + _zzq_args[1] = (unsigned int)(_zzq_arg1); \ + _zzq_args[2] = (unsigned int)(_zzq_arg2); \ + _zzq_args[3] = (unsigned int)(_zzq_arg3); \ + _zzq_args[4] = (unsigned int)(_zzq_arg4); \ + _zzq_args[5] = (unsigned int)(_zzq_arg5); \ + __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ + /* %EDX = client_request ( %EAX ) */ \ + "xchgl %%ebx,%%ebx" \ + : "=d" (_zzq_result) \ + : "a" (&_zzq_args[0]), "0" (_zzq_default) \ + : "cc", "memory" \ + ); \ + _zzq_result; \ + }) + +#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval) \ + { volatile OrigFn* _zzq_orig = &(_zzq_rlval); \ + volatile unsigned int __addr; \ + __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ + /* %EAX = guest_NRADDR */ \ + "xchgl %%ecx,%%ecx" \ + : "=a" (__addr) \ + : \ + : "cc", "memory" \ + ); \ + _zzq_orig->nraddr = __addr; \ + } + +#define VALGRIND_CALL_NOREDIR_EAX \ + __SPECIAL_INSTRUCTION_PREAMBLE \ + /* call-noredir *%EAX */ \ + "xchgl %%edx,%%edx\n\t" + +#define VALGRIND_VEX_INJECT_IR() \ + do { \ + __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ + "xchgl %%edi,%%edi\n\t" \ + : : : "cc", "memory" \ + ); \ + } while (0) + +#endif /* PLAT_x86_linux || PLAT_x86_darwin || (PLAT_x86_win32 && __GNUC__) + || PLAT_x86_solaris */ + +/* ------------------------- x86-Win32 ------------------------- */ + +#if defined(PLAT_x86_win32) && !defined(__GNUC__) + +typedef + struct { + unsigned int nraddr; /* where's the code? */ + } + OrigFn; + +#if defined(_MSC_VER) + +#define __SPECIAL_INSTRUCTION_PREAMBLE \ + __asm rol edi, 3 __asm rol edi, 13 \ + __asm rol edi, 29 __asm rol edi, 19 + +#define VALGRIND_DO_CLIENT_REQUEST_EXPR( \ + _zzq_default, _zzq_request, \ + _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5) \ + valgrind_do_client_request_expr((uintptr_t)(_zzq_default), \ + (uintptr_t)(_zzq_request), (uintptr_t)(_zzq_arg1), \ + (uintptr_t)(_zzq_arg2), (uintptr_t)(_zzq_arg3), \ + (uintptr_t)(_zzq_arg4), (uintptr_t)(_zzq_arg5)) + +static __inline uintptr_t +valgrind_do_client_request_expr(uintptr_t _zzq_default, uintptr_t _zzq_request, + uintptr_t _zzq_arg1, uintptr_t _zzq_arg2, + uintptr_t _zzq_arg3, uintptr_t _zzq_arg4, + uintptr_t _zzq_arg5) +{ + volatile uintptr_t _zzq_args[6]; + volatile unsigned int _zzq_result; + _zzq_args[0] = (uintptr_t)(_zzq_request); + _zzq_args[1] = (uintptr_t)(_zzq_arg1); + _zzq_args[2] = (uintptr_t)(_zzq_arg2); + _zzq_args[3] = (uintptr_t)(_zzq_arg3); + _zzq_args[4] = (uintptr_t)(_zzq_arg4); + _zzq_args[5] = (uintptr_t)(_zzq_arg5); + __asm { __asm lea eax, _zzq_args __asm mov edx, _zzq_default + __SPECIAL_INSTRUCTION_PREAMBLE + /* %EDX = client_request ( %EAX ) */ + __asm xchg ebx,ebx + __asm mov _zzq_result, edx + } + return _zzq_result; +} + +#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval) \ + { volatile OrigFn* _zzq_orig = &(_zzq_rlval); \ + volatile unsigned int __addr; \ + __asm { __SPECIAL_INSTRUCTION_PREAMBLE \ + /* %EAX = guest_NRADDR */ \ + __asm xchg ecx,ecx \ + __asm mov __addr, eax \ + } \ + _zzq_orig->nraddr = __addr; \ + } + +#define VALGRIND_CALL_NOREDIR_EAX ERROR + +#define VALGRIND_VEX_INJECT_IR() \ + do { \ + __asm { __SPECIAL_INSTRUCTION_PREAMBLE \ + __asm xchg edi,edi \ + } \ + } while (0) + +#else +#error Unsupported compiler. +#endif + +#endif /* PLAT_x86_win32 */ + +/* ----------------- amd64-{linux,darwin,solaris} --------------- */ + +#if defined(PLAT_amd64_linux) || defined(PLAT_amd64_darwin) \ + || defined(PLAT_amd64_solaris) \ + || (defined(PLAT_amd64_win64) && defined(__GNUC__)) + +typedef + struct { + unsigned long int nraddr; /* where's the code? */ + } + OrigFn; + +#define __SPECIAL_INSTRUCTION_PREAMBLE \ + "rolq $3, %%rdi ; rolq $13, %%rdi\n\t" \ + "rolq $61, %%rdi ; rolq $51, %%rdi\n\t" + +#define VALGRIND_DO_CLIENT_REQUEST_EXPR( \ + _zzq_default, _zzq_request, \ + _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5) \ + __extension__ \ + ({ volatile unsigned long int _zzq_args[6]; \ + volatile unsigned long int _zzq_result; \ + _zzq_args[0] = (unsigned long int)(_zzq_request); \ + _zzq_args[1] = (unsigned long int)(_zzq_arg1); \ + _zzq_args[2] = (unsigned long int)(_zzq_arg2); \ + _zzq_args[3] = (unsigned long int)(_zzq_arg3); \ + _zzq_args[4] = (unsigned long int)(_zzq_arg4); \ + _zzq_args[5] = (unsigned long int)(_zzq_arg5); \ + __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ + /* %RDX = client_request ( %RAX ) */ \ + "xchgq %%rbx,%%rbx" \ + : "=d" (_zzq_result) \ + : "a" (&_zzq_args[0]), "0" (_zzq_default) \ + : "cc", "memory" \ + ); \ + _zzq_result; \ + }) + +#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval) \ + { volatile OrigFn* _zzq_orig = &(_zzq_rlval); \ + volatile unsigned long int __addr; \ + __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ + /* %RAX = guest_NRADDR */ \ + "xchgq %%rcx,%%rcx" \ + : "=a" (__addr) \ + : \ + : "cc", "memory" \ + ); \ + _zzq_orig->nraddr = __addr; \ + } + +#define VALGRIND_CALL_NOREDIR_RAX \ + __SPECIAL_INSTRUCTION_PREAMBLE \ + /* call-noredir *%RAX */ \ + "xchgq %%rdx,%%rdx\n\t" + +#define VALGRIND_VEX_INJECT_IR() \ + do { \ + __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ + "xchgq %%rdi,%%rdi\n\t" \ + : : : "cc", "memory" \ + ); \ + } while (0) + +#endif /* PLAT_amd64_linux || PLAT_amd64_darwin || PLAT_amd64_solaris */ + +/* ------------------------- amd64-Win64 ------------------------- */ + +#if defined(PLAT_amd64_win64) && !defined(__GNUC__) + +#error Unsupported compiler. + +#endif /* PLAT_amd64_win64 */ + +/* ------------------------ ppc32-linux ------------------------ */ + +#if defined(PLAT_ppc32_linux) + +typedef + struct { + unsigned int nraddr; /* where's the code? */ + } + OrigFn; + +#define __SPECIAL_INSTRUCTION_PREAMBLE \ + "rlwinm 0,0,3,0,31 ; rlwinm 0,0,13,0,31\n\t" \ + "rlwinm 0,0,29,0,31 ; rlwinm 0,0,19,0,31\n\t" + +#define VALGRIND_DO_CLIENT_REQUEST_EXPR( \ + _zzq_default, _zzq_request, \ + _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5) \ + \ + __extension__ \ + ({ unsigned int _zzq_args[6]; \ + unsigned int _zzq_result; \ + unsigned int* _zzq_ptr; \ + _zzq_args[0] = (unsigned int)(_zzq_request); \ + _zzq_args[1] = (unsigned int)(_zzq_arg1); \ + _zzq_args[2] = (unsigned int)(_zzq_arg2); \ + _zzq_args[3] = (unsigned int)(_zzq_arg3); \ + _zzq_args[4] = (unsigned int)(_zzq_arg4); \ + _zzq_args[5] = (unsigned int)(_zzq_arg5); \ + _zzq_ptr = _zzq_args; \ + __asm__ volatile("mr 3,%1\n\t" /*default*/ \ + "mr 4,%2\n\t" /*ptr*/ \ + __SPECIAL_INSTRUCTION_PREAMBLE \ + /* %R3 = client_request ( %R4 ) */ \ + "or 1,1,1\n\t" \ + "mr %0,3" /*result*/ \ + : "=b" (_zzq_result) \ + : "b" (_zzq_default), "b" (_zzq_ptr) \ + : "cc", "memory", "r3", "r4"); \ + _zzq_result; \ + }) + +#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval) \ + { volatile OrigFn* _zzq_orig = &(_zzq_rlval); \ + unsigned int __addr; \ + __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ + /* %R3 = guest_NRADDR */ \ + "or 2,2,2\n\t" \ + "mr %0,3" \ + : "=b" (__addr) \ + : \ + : "cc", "memory", "r3" \ + ); \ + _zzq_orig->nraddr = __addr; \ + } + +#define VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ + __SPECIAL_INSTRUCTION_PREAMBLE \ + /* branch-and-link-to-noredir *%R11 */ \ + "or 3,3,3\n\t" + +#define VALGRIND_VEX_INJECT_IR() \ + do { \ + __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ + "or 5,5,5\n\t" \ + ); \ + } while (0) + +#endif /* PLAT_ppc32_linux */ + +/* ------------------------ ppc64-linux ------------------------ */ + +#if defined(PLAT_ppc64be_linux) + +typedef + struct { + unsigned long int nraddr; /* where's the code? */ + unsigned long int r2; /* what tocptr do we need? */ + } + OrigFn; + +#define __SPECIAL_INSTRUCTION_PREAMBLE \ + "rotldi 0,0,3 ; rotldi 0,0,13\n\t" \ + "rotldi 0,0,61 ; rotldi 0,0,51\n\t" + +#define VALGRIND_DO_CLIENT_REQUEST_EXPR( \ + _zzq_default, _zzq_request, \ + _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5) \ + \ + __extension__ \ + ({ unsigned long int _zzq_args[6]; \ + unsigned long int _zzq_result; \ + unsigned long int* _zzq_ptr; \ + _zzq_args[0] = (unsigned long int)(_zzq_request); \ + _zzq_args[1] = (unsigned long int)(_zzq_arg1); \ + _zzq_args[2] = (unsigned long int)(_zzq_arg2); \ + _zzq_args[3] = (unsigned long int)(_zzq_arg3); \ + _zzq_args[4] = (unsigned long int)(_zzq_arg4); \ + _zzq_args[5] = (unsigned long int)(_zzq_arg5); \ + _zzq_ptr = _zzq_args; \ + __asm__ volatile("mr 3,%1\n\t" /*default*/ \ + "mr 4,%2\n\t" /*ptr*/ \ + __SPECIAL_INSTRUCTION_PREAMBLE \ + /* %R3 = client_request ( %R4 ) */ \ + "or 1,1,1\n\t" \ + "mr %0,3" /*result*/ \ + : "=b" (_zzq_result) \ + : "b" (_zzq_default), "b" (_zzq_ptr) \ + : "cc", "memory", "r3", "r4"); \ + _zzq_result; \ + }) + +#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval) \ + { volatile OrigFn* _zzq_orig = &(_zzq_rlval); \ + unsigned long int __addr; \ + __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ + /* %R3 = guest_NRADDR */ \ + "or 2,2,2\n\t" \ + "mr %0,3" \ + : "=b" (__addr) \ + : \ + : "cc", "memory", "r3" \ + ); \ + _zzq_orig->nraddr = __addr; \ + __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ + /* %R3 = guest_NRADDR_GPR2 */ \ + "or 4,4,4\n\t" \ + "mr %0,3" \ + : "=b" (__addr) \ + : \ + : "cc", "memory", "r3" \ + ); \ + _zzq_orig->r2 = __addr; \ + } + +#define VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ + __SPECIAL_INSTRUCTION_PREAMBLE \ + /* branch-and-link-to-noredir *%R11 */ \ + "or 3,3,3\n\t" + +#define VALGRIND_VEX_INJECT_IR() \ + do { \ + __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ + "or 5,5,5\n\t" \ + ); \ + } while (0) + +#endif /* PLAT_ppc64be_linux */ + +#if defined(PLAT_ppc64le_linux) + +typedef + struct { + unsigned long int nraddr; /* where's the code? */ + unsigned long int r2; /* what tocptr do we need? */ + } + OrigFn; + +#define __SPECIAL_INSTRUCTION_PREAMBLE \ + "rotldi 0,0,3 ; rotldi 0,0,13\n\t" \ + "rotldi 0,0,61 ; rotldi 0,0,51\n\t" + +#define VALGRIND_DO_CLIENT_REQUEST_EXPR( \ + _zzq_default, _zzq_request, \ + _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5) \ + \ + __extension__ \ + ({ unsigned long int _zzq_args[6]; \ + unsigned long int _zzq_result; \ + unsigned long int* _zzq_ptr; \ + _zzq_args[0] = (unsigned long int)(_zzq_request); \ + _zzq_args[1] = (unsigned long int)(_zzq_arg1); \ + _zzq_args[2] = (unsigned long int)(_zzq_arg2); \ + _zzq_args[3] = (unsigned long int)(_zzq_arg3); \ + _zzq_args[4] = (unsigned long int)(_zzq_arg4); \ + _zzq_args[5] = (unsigned long int)(_zzq_arg5); \ + _zzq_ptr = _zzq_args; \ + __asm__ volatile("mr 3,%1\n\t" /*default*/ \ + "mr 4,%2\n\t" /*ptr*/ \ + __SPECIAL_INSTRUCTION_PREAMBLE \ + /* %R3 = client_request ( %R4 ) */ \ + "or 1,1,1\n\t" \ + "mr %0,3" /*result*/ \ + : "=b" (_zzq_result) \ + : "b" (_zzq_default), "b" (_zzq_ptr) \ + : "cc", "memory", "r3", "r4"); \ + _zzq_result; \ + }) + +#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval) \ + { volatile OrigFn* _zzq_orig = &(_zzq_rlval); \ + unsigned long int __addr; \ + __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ + /* %R3 = guest_NRADDR */ \ + "or 2,2,2\n\t" \ + "mr %0,3" \ + : "=b" (__addr) \ + : \ + : "cc", "memory", "r3" \ + ); \ + _zzq_orig->nraddr = __addr; \ + __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ + /* %R3 = guest_NRADDR_GPR2 */ \ + "or 4,4,4\n\t" \ + "mr %0,3" \ + : "=b" (__addr) \ + : \ + : "cc", "memory", "r3" \ + ); \ + _zzq_orig->r2 = __addr; \ + } + +#define VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ + __SPECIAL_INSTRUCTION_PREAMBLE \ + /* branch-and-link-to-noredir *%R12 */ \ + "or 3,3,3\n\t" + +#define VALGRIND_VEX_INJECT_IR() \ + do { \ + __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ + "or 5,5,5\n\t" \ + ); \ + } while (0) + +#endif /* PLAT_ppc64le_linux */ + +/* ------------------------- arm-linux ------------------------- */ + +#if defined(PLAT_arm_linux) + +typedef + struct { + unsigned int nraddr; /* where's the code? */ + } + OrigFn; + +#define __SPECIAL_INSTRUCTION_PREAMBLE \ + "mov r12, r12, ror #3 ; mov r12, r12, ror #13 \n\t" \ + "mov r12, r12, ror #29 ; mov r12, r12, ror #19 \n\t" + +#define VALGRIND_DO_CLIENT_REQUEST_EXPR( \ + _zzq_default, _zzq_request, \ + _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5) \ + \ + __extension__ \ + ({volatile unsigned int _zzq_args[6]; \ + volatile unsigned int _zzq_result; \ + _zzq_args[0] = (unsigned int)(_zzq_request); \ + _zzq_args[1] = (unsigned int)(_zzq_arg1); \ + _zzq_args[2] = (unsigned int)(_zzq_arg2); \ + _zzq_args[3] = (unsigned int)(_zzq_arg3); \ + _zzq_args[4] = (unsigned int)(_zzq_arg4); \ + _zzq_args[5] = (unsigned int)(_zzq_arg5); \ + __asm__ volatile("mov r3, %1\n\t" /*default*/ \ + "mov r4, %2\n\t" /*ptr*/ \ + __SPECIAL_INSTRUCTION_PREAMBLE \ + /* R3 = client_request ( R4 ) */ \ + "orr r10, r10, r10\n\t" \ + "mov %0, r3" /*result*/ \ + : "=r" (_zzq_result) \ + : "r" (_zzq_default), "r" (&_zzq_args[0]) \ + : "cc","memory", "r3", "r4"); \ + _zzq_result; \ + }) + +#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval) \ + { volatile OrigFn* _zzq_orig = &(_zzq_rlval); \ + unsigned int __addr; \ + __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ + /* R3 = guest_NRADDR */ \ + "orr r11, r11, r11\n\t" \ + "mov %0, r3" \ + : "=r" (__addr) \ + : \ + : "cc", "memory", "r3" \ + ); \ + _zzq_orig->nraddr = __addr; \ + } + +#define VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ + __SPECIAL_INSTRUCTION_PREAMBLE \ + /* branch-and-link-to-noredir *%R4 */ \ + "orr r12, r12, r12\n\t" + +#define VALGRIND_VEX_INJECT_IR() \ + do { \ + __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ + "orr r9, r9, r9\n\t" \ + : : : "cc", "memory" \ + ); \ + } while (0) + +#endif /* PLAT_arm_linux */ + +/* ------------------------ arm64-linux ------------------------- */ + +#if defined(PLAT_arm64_linux) + +typedef + struct { + unsigned long int nraddr; /* where's the code? */ + } + OrigFn; + +#define __SPECIAL_INSTRUCTION_PREAMBLE \ + "ror x12, x12, #3 ; ror x12, x12, #13 \n\t" \ + "ror x12, x12, #51 ; ror x12, x12, #61 \n\t" + +#define VALGRIND_DO_CLIENT_REQUEST_EXPR( \ + _zzq_default, _zzq_request, \ + _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5) \ + \ + __extension__ \ + ({volatile unsigned long int _zzq_args[6]; \ + volatile unsigned long int _zzq_result; \ + _zzq_args[0] = (unsigned long int)(_zzq_request); \ + _zzq_args[1] = (unsigned long int)(_zzq_arg1); \ + _zzq_args[2] = (unsigned long int)(_zzq_arg2); \ + _zzq_args[3] = (unsigned long int)(_zzq_arg3); \ + _zzq_args[4] = (unsigned long int)(_zzq_arg4); \ + _zzq_args[5] = (unsigned long int)(_zzq_arg5); \ + __asm__ volatile("mov x3, %1\n\t" /*default*/ \ + "mov x4, %2\n\t" /*ptr*/ \ + __SPECIAL_INSTRUCTION_PREAMBLE \ + /* X3 = client_request ( X4 ) */ \ + "orr x10, x10, x10\n\t" \ + "mov %0, x3" /*result*/ \ + : "=r" (_zzq_result) \ + : "r" ((unsigned long int)(_zzq_default)), \ + "r" (&_zzq_args[0]) \ + : "cc","memory", "x3", "x4"); \ + _zzq_result; \ + }) + +#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval) \ + { volatile OrigFn* _zzq_orig = &(_zzq_rlval); \ + unsigned long int __addr; \ + __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ + /* X3 = guest_NRADDR */ \ + "orr x11, x11, x11\n\t" \ + "mov %0, x3" \ + : "=r" (__addr) \ + : \ + : "cc", "memory", "x3" \ + ); \ + _zzq_orig->nraddr = __addr; \ + } + +#define VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ + __SPECIAL_INSTRUCTION_PREAMBLE \ + /* branch-and-link-to-noredir X8 */ \ + "orr x12, x12, x12\n\t" + +#define VALGRIND_VEX_INJECT_IR() \ + do { \ + __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ + "orr x9, x9, x9\n\t" \ + : : : "cc", "memory" \ + ); \ + } while (0) + +#endif /* PLAT_arm64_linux */ + +/* ------------------------ s390x-linux ------------------------ */ + +#if defined(PLAT_s390x_linux) + +typedef + struct { + unsigned long int nraddr; /* where's the code? */ + } + OrigFn; + +/* __SPECIAL_INSTRUCTION_PREAMBLE will be used to identify Valgrind specific + * code. This detection is implemented in platform specific toIR.c + * (e.g. VEX/priv/guest_s390_decoder.c). + */ +#define __SPECIAL_INSTRUCTION_PREAMBLE \ + "lr 15,15\n\t" \ + "lr 1,1\n\t" \ + "lr 2,2\n\t" \ + "lr 3,3\n\t" + +#define __CLIENT_REQUEST_CODE "lr 2,2\n\t" +#define __GET_NR_CONTEXT_CODE "lr 3,3\n\t" +#define __CALL_NO_REDIR_CODE "lr 4,4\n\t" +#define __VEX_INJECT_IR_CODE "lr 5,5\n\t" + +#define VALGRIND_DO_CLIENT_REQUEST_EXPR( \ + _zzq_default, _zzq_request, \ + _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5) \ + __extension__ \ + ({volatile unsigned long int _zzq_args[6]; \ + volatile unsigned long int _zzq_result; \ + _zzq_args[0] = (unsigned long int)(_zzq_request); \ + _zzq_args[1] = (unsigned long int)(_zzq_arg1); \ + _zzq_args[2] = (unsigned long int)(_zzq_arg2); \ + _zzq_args[3] = (unsigned long int)(_zzq_arg3); \ + _zzq_args[4] = (unsigned long int)(_zzq_arg4); \ + _zzq_args[5] = (unsigned long int)(_zzq_arg5); \ + __asm__ volatile(/* r2 = args */ \ + "lgr 2,%1\n\t" \ + /* r3 = default */ \ + "lgr 3,%2\n\t" \ + __SPECIAL_INSTRUCTION_PREAMBLE \ + __CLIENT_REQUEST_CODE \ + /* results = r3 */ \ + "lgr %0, 3\n\t" \ + : "=d" (_zzq_result) \ + : "a" (&_zzq_args[0]), "0" (_zzq_default) \ + : "cc", "2", "3", "memory" \ + ); \ + _zzq_result; \ + }) + +#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval) \ + { volatile OrigFn* _zzq_orig = &(_zzq_rlval); \ + volatile unsigned long int __addr; \ + __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ + __GET_NR_CONTEXT_CODE \ + "lgr %0, 3\n\t" \ + : "=a" (__addr) \ + : \ + : "cc", "3", "memory" \ + ); \ + _zzq_orig->nraddr = __addr; \ + } + +#define VALGRIND_CALL_NOREDIR_R1 \ + __SPECIAL_INSTRUCTION_PREAMBLE \ + __CALL_NO_REDIR_CODE + +#define VALGRIND_VEX_INJECT_IR() \ + do { \ + __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ + __VEX_INJECT_IR_CODE); \ + } while (0) + +#endif /* PLAT_s390x_linux */ + +/* ------------------------- mips32-linux ---------------- */ + +#if defined(PLAT_mips32_linux) + +typedef + struct { + unsigned int nraddr; /* where's the code? */ + } + OrigFn; + +/* .word 0x342 + * .word 0x742 + * .word 0xC2 + * .word 0x4C2*/ +#define __SPECIAL_INSTRUCTION_PREAMBLE \ + "srl $0, $0, 13\n\t" \ + "srl $0, $0, 29\n\t" \ + "srl $0, $0, 3\n\t" \ + "srl $0, $0, 19\n\t" + +#define VALGRIND_DO_CLIENT_REQUEST_EXPR( \ + _zzq_default, _zzq_request, \ + _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5) \ + __extension__ \ + ({ volatile unsigned int _zzq_args[6]; \ + volatile unsigned int _zzq_result; \ + _zzq_args[0] = (unsigned int)(_zzq_request); \ + _zzq_args[1] = (unsigned int)(_zzq_arg1); \ + _zzq_args[2] = (unsigned int)(_zzq_arg2); \ + _zzq_args[3] = (unsigned int)(_zzq_arg3); \ + _zzq_args[4] = (unsigned int)(_zzq_arg4); \ + _zzq_args[5] = (unsigned int)(_zzq_arg5); \ + __asm__ volatile("move $11, %1\n\t" /*default*/ \ + "move $12, %2\n\t" /*ptr*/ \ + __SPECIAL_INSTRUCTION_PREAMBLE \ + /* T3 = client_request ( T4 ) */ \ + "or $13, $13, $13\n\t" \ + "move %0, $11\n\t" /*result*/ \ + : "=r" (_zzq_result) \ + : "r" (_zzq_default), "r" (&_zzq_args[0]) \ + : "$11", "$12", "memory"); \ + _zzq_result; \ + }) + +#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval) \ + { volatile OrigFn* _zzq_orig = &(_zzq_rlval); \ + volatile unsigned int __addr; \ + __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ + /* %t9 = guest_NRADDR */ \ + "or $14, $14, $14\n\t" \ + "move %0, $11" /*result*/ \ + : "=r" (__addr) \ + : \ + : "$11" \ + ); \ + _zzq_orig->nraddr = __addr; \ + } + +#define VALGRIND_CALL_NOREDIR_T9 \ + __SPECIAL_INSTRUCTION_PREAMBLE \ + /* call-noredir *%t9 */ \ + "or $15, $15, $15\n\t" + +#define VALGRIND_VEX_INJECT_IR() \ + do { \ + __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ + "or $11, $11, $11\n\t" \ + ); \ + } while (0) + + +#endif /* PLAT_mips32_linux */ + +/* ------------------------- mips64-linux ---------------- */ + +#if defined(PLAT_mips64_linux) + +typedef + struct { + unsigned long nraddr; /* where's the code? */ + } + OrigFn; + +/* dsll $0,$0, 3 + * dsll $0,$0, 13 + * dsll $0,$0, 29 + * dsll $0,$0, 19*/ +#define __SPECIAL_INSTRUCTION_PREAMBLE \ + "dsll $0,$0, 3 ; dsll $0,$0,13\n\t" \ + "dsll $0,$0,29 ; dsll $0,$0,19\n\t" + +#define VALGRIND_DO_CLIENT_REQUEST_EXPR( \ + _zzq_default, _zzq_request, \ + _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5) \ + __extension__ \ + ({ volatile unsigned long int _zzq_args[6]; \ + volatile unsigned long int _zzq_result; \ + _zzq_args[0] = (unsigned long int)(_zzq_request); \ + _zzq_args[1] = (unsigned long int)(_zzq_arg1); \ + _zzq_args[2] = (unsigned long int)(_zzq_arg2); \ + _zzq_args[3] = (unsigned long int)(_zzq_arg3); \ + _zzq_args[4] = (unsigned long int)(_zzq_arg4); \ + _zzq_args[5] = (unsigned long int)(_zzq_arg5); \ + __asm__ volatile("move $11, %1\n\t" /*default*/ \ + "move $12, %2\n\t" /*ptr*/ \ + __SPECIAL_INSTRUCTION_PREAMBLE \ + /* $11 = client_request ( $12 ) */ \ + "or $13, $13, $13\n\t" \ + "move %0, $11\n\t" /*result*/ \ + : "=r" (_zzq_result) \ + : "r" (_zzq_default), "r" (&_zzq_args[0]) \ + : "$11", "$12", "memory"); \ + _zzq_result; \ + }) + +#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval) \ + { volatile OrigFn* _zzq_orig = &(_zzq_rlval); \ + volatile unsigned long int __addr; \ + __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ + /* $11 = guest_NRADDR */ \ + "or $14, $14, $14\n\t" \ + "move %0, $11" /*result*/ \ + : "=r" (__addr) \ + : \ + : "$11"); \ + _zzq_orig->nraddr = __addr; \ + } + +#define VALGRIND_CALL_NOREDIR_T9 \ + __SPECIAL_INSTRUCTION_PREAMBLE \ + /* call-noredir $25 */ \ + "or $15, $15, $15\n\t" + +#define VALGRIND_VEX_INJECT_IR() \ + do { \ + __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ + "or $11, $11, $11\n\t" \ + ); \ + } while (0) + +#endif /* PLAT_mips64_linux */ + +#if defined(PLAT_nanomips_linux) + +typedef + struct { + unsigned int nraddr; /* where's the code? */ + } + OrigFn; +/* + 8000 c04d srl zero, zero, 13 + 8000 c05d srl zero, zero, 29 + 8000 c043 srl zero, zero, 3 + 8000 c053 srl zero, zero, 19 +*/ + +#define __SPECIAL_INSTRUCTION_PREAMBLE "srl[32] $zero, $zero, 13 \n\t" \ + "srl[32] $zero, $zero, 29 \n\t" \ + "srl[32] $zero, $zero, 3 \n\t" \ + "srl[32] $zero, $zero, 19 \n\t" + +#define VALGRIND_DO_CLIENT_REQUEST_EXPR( \ + _zzq_default, _zzq_request, \ + _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5) \ + __extension__ \ + ({ volatile unsigned int _zzq_args[6]; \ + volatile unsigned int _zzq_result; \ + _zzq_args[0] = (unsigned int)(_zzq_request); \ + _zzq_args[1] = (unsigned int)(_zzq_arg1); \ + _zzq_args[2] = (unsigned int)(_zzq_arg2); \ + _zzq_args[3] = (unsigned int)(_zzq_arg3); \ + _zzq_args[4] = (unsigned int)(_zzq_arg4); \ + _zzq_args[5] = (unsigned int)(_zzq_arg5); \ + __asm__ volatile("move $a7, %1\n\t" /* default */ \ + "move $t0, %2\n\t" /* ptr */ \ + __SPECIAL_INSTRUCTION_PREAMBLE \ + /* $a7 = client_request( $t0 ) */ \ + "or[32] $t0, $t0, $t0\n\t" \ + "move %0, $a7\n\t" /* result */ \ + : "=r" (_zzq_result) \ + : "r" (_zzq_default), "r" (&_zzq_args[0]) \ + : "$a7", "$t0", "memory"); \ + _zzq_result; \ + }) + +#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval) \ + { volatile OrigFn* _zzq_orig = &(_zzq_rlval); \ + volatile unsigned long int __addr; \ + __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ + /* $a7 = guest_NRADDR */ \ + "or[32] $t1, $t1, $t1\n\t" \ + "move %0, $a7" /*result*/ \ + : "=r" (__addr) \ + : \ + : "$a7"); \ + _zzq_orig->nraddr = __addr; \ + } + +#define VALGRIND_CALL_NOREDIR_T9 \ + __SPECIAL_INSTRUCTION_PREAMBLE \ + /* call-noredir $25 */ \ + "or[32] $t2, $t2, $t2\n\t" + +#define VALGRIND_VEX_INJECT_IR() \ + do { \ + __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ + "or[32] $t3, $t3, $t3\n\t" \ + ); \ + } while (0) + +#endif +/* Insert assembly code for other platforms here... */ + +#endif /* NVALGRIND */ + + +/* ------------------------------------------------------------------ */ +/* PLATFORM SPECIFICS for FUNCTION WRAPPING. This is all very */ +/* ugly. It's the least-worst tradeoff I can think of. */ +/* ------------------------------------------------------------------ */ + +/* This section defines magic (a.k.a appalling-hack) macros for doing + guaranteed-no-redirection macros, so as to get from function + wrappers to the functions they are wrapping. The whole point is to + construct standard call sequences, but to do the call itself with a + special no-redirect call pseudo-instruction that the JIT + understands and handles specially. This section is long and + repetitious, and I can't see a way to make it shorter. + + The naming scheme is as follows: + + CALL_FN_{W,v}_{v,W,WW,WWW,WWWW,5W,6W,7W,etc} + + 'W' stands for "word" and 'v' for "void". Hence there are + different macros for calling arity 0, 1, 2, 3, 4, etc, functions, + and for each, the possibility of returning a word-typed result, or + no result. +*/ + +/* Use these to write the name of your wrapper. NOTE: duplicates + VG_WRAP_FUNCTION_Z{U,Z} in pub_tool_redir.h. NOTE also: inserts + the default behaviour equivalance class tag "0000" into the name. + See pub_tool_redir.h for details -- normally you don't need to + think about this, though. */ + +/* Use an extra level of macroisation so as to ensure the soname/fnname + args are fully macro-expanded before pasting them together. */ +#define VG_CONCAT4(_aa,_bb,_cc,_dd) _aa##_bb##_cc##_dd + +#define I_WRAP_SONAME_FNNAME_ZU(soname,fnname) \ + VG_CONCAT4(_vgw00000ZU_,soname,_,fnname) + +#define I_WRAP_SONAME_FNNAME_ZZ(soname,fnname) \ + VG_CONCAT4(_vgw00000ZZ_,soname,_,fnname) + +/* Use this macro from within a wrapper function to collect the + context (address and possibly other info) of the original function. + Once you have that you can then use it in one of the CALL_FN_ + macros. The type of the argument _lval is OrigFn. */ +#define VALGRIND_GET_ORIG_FN(_lval) VALGRIND_GET_NR_CONTEXT(_lval) + +/* Also provide end-user facilities for function replacement, rather + than wrapping. A replacement function differs from a wrapper in + that it has no way to get hold of the original function being + called, and hence no way to call onwards to it. In a replacement + function, VALGRIND_GET_ORIG_FN always returns zero. */ + +#define I_REPLACE_SONAME_FNNAME_ZU(soname,fnname) \ + VG_CONCAT4(_vgr00000ZU_,soname,_,fnname) + +#define I_REPLACE_SONAME_FNNAME_ZZ(soname,fnname) \ + VG_CONCAT4(_vgr00000ZZ_,soname,_,fnname) + +/* Derivatives of the main macros below, for calling functions + returning void. */ + +#define CALL_FN_v_v(fnptr) \ + do { volatile unsigned long _junk; \ + CALL_FN_W_v(_junk,fnptr); } while (0) + +#define CALL_FN_v_W(fnptr, arg1) \ + do { volatile unsigned long _junk; \ + CALL_FN_W_W(_junk,fnptr,arg1); } while (0) + +#define CALL_FN_v_WW(fnptr, arg1,arg2) \ + do { volatile unsigned long _junk; \ + CALL_FN_W_WW(_junk,fnptr,arg1,arg2); } while (0) + +#define CALL_FN_v_WWW(fnptr, arg1,arg2,arg3) \ + do { volatile unsigned long _junk; \ + CALL_FN_W_WWW(_junk,fnptr,arg1,arg2,arg3); } while (0) + +#define CALL_FN_v_WWWW(fnptr, arg1,arg2,arg3,arg4) \ + do { volatile unsigned long _junk; \ + CALL_FN_W_WWWW(_junk,fnptr,arg1,arg2,arg3,arg4); } while (0) + +#define CALL_FN_v_5W(fnptr, arg1,arg2,arg3,arg4,arg5) \ + do { volatile unsigned long _junk; \ + CALL_FN_W_5W(_junk,fnptr,arg1,arg2,arg3,arg4,arg5); } while (0) + +#define CALL_FN_v_6W(fnptr, arg1,arg2,arg3,arg4,arg5,arg6) \ + do { volatile unsigned long _junk; \ + CALL_FN_W_6W(_junk,fnptr,arg1,arg2,arg3,arg4,arg5,arg6); } while (0) + +#define CALL_FN_v_7W(fnptr, arg1,arg2,arg3,arg4,arg5,arg6,arg7) \ + do { volatile unsigned long _junk; \ + CALL_FN_W_7W(_junk,fnptr,arg1,arg2,arg3,arg4,arg5,arg6,arg7); } while (0) + +/* ----------------- x86-{linux,darwin,solaris} ---------------- */ + +#if defined(PLAT_x86_linux) || defined(PLAT_x86_darwin) \ + || defined(PLAT_x86_solaris) + +/* These regs are trashed by the hidden call. No need to mention eax + as gcc can already see that, plus causes gcc to bomb. */ +#define __CALLER_SAVED_REGS /*"eax"*/ "ecx", "edx" + +/* Macros to save and align the stack before making a function + call and restore it afterwards as gcc may not keep the stack + pointer aligned if it doesn't realise calls are being made + to other functions. */ + +#define VALGRIND_ALIGN_STACK \ + "movl %%esp,%%edi\n\t" \ + "andl $0xfffffff0,%%esp\n\t" +#define VALGRIND_RESTORE_STACK \ + "movl %%edi,%%esp\n\t" + +/* These CALL_FN_ macros assume that on x86-linux, sizeof(unsigned + long) == 4. */ + +#define CALL_FN_W_v(lval, orig) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[1]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "movl (%%eax), %%eax\n\t" /* target->%eax */ \ + VALGRIND_CALL_NOREDIR_EAX \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=a" (_res) \ + : /*in*/ "a" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "edi" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_W(lval, orig, arg1) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[2]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "subl $12, %%esp\n\t" \ + "pushl 4(%%eax)\n\t" \ + "movl (%%eax), %%eax\n\t" /* target->%eax */ \ + VALGRIND_CALL_NOREDIR_EAX \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=a" (_res) \ + : /*in*/ "a" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "edi" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_WW(lval, orig, arg1,arg2) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[3]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "subl $8, %%esp\n\t" \ + "pushl 8(%%eax)\n\t" \ + "pushl 4(%%eax)\n\t" \ + "movl (%%eax), %%eax\n\t" /* target->%eax */ \ + VALGRIND_CALL_NOREDIR_EAX \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=a" (_res) \ + : /*in*/ "a" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "edi" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[4]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "subl $4, %%esp\n\t" \ + "pushl 12(%%eax)\n\t" \ + "pushl 8(%%eax)\n\t" \ + "pushl 4(%%eax)\n\t" \ + "movl (%%eax), %%eax\n\t" /* target->%eax */ \ + VALGRIND_CALL_NOREDIR_EAX \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=a" (_res) \ + : /*in*/ "a" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "edi" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[5]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "pushl 16(%%eax)\n\t" \ + "pushl 12(%%eax)\n\t" \ + "pushl 8(%%eax)\n\t" \ + "pushl 4(%%eax)\n\t" \ + "movl (%%eax), %%eax\n\t" /* target->%eax */ \ + VALGRIND_CALL_NOREDIR_EAX \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=a" (_res) \ + : /*in*/ "a" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "edi" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[6]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "subl $12, %%esp\n\t" \ + "pushl 20(%%eax)\n\t" \ + "pushl 16(%%eax)\n\t" \ + "pushl 12(%%eax)\n\t" \ + "pushl 8(%%eax)\n\t" \ + "pushl 4(%%eax)\n\t" \ + "movl (%%eax), %%eax\n\t" /* target->%eax */ \ + VALGRIND_CALL_NOREDIR_EAX \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=a" (_res) \ + : /*in*/ "a" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "edi" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[7]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "subl $8, %%esp\n\t" \ + "pushl 24(%%eax)\n\t" \ + "pushl 20(%%eax)\n\t" \ + "pushl 16(%%eax)\n\t" \ + "pushl 12(%%eax)\n\t" \ + "pushl 8(%%eax)\n\t" \ + "pushl 4(%%eax)\n\t" \ + "movl (%%eax), %%eax\n\t" /* target->%eax */ \ + VALGRIND_CALL_NOREDIR_EAX \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=a" (_res) \ + : /*in*/ "a" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "edi" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[8]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "subl $4, %%esp\n\t" \ + "pushl 28(%%eax)\n\t" \ + "pushl 24(%%eax)\n\t" \ + "pushl 20(%%eax)\n\t" \ + "pushl 16(%%eax)\n\t" \ + "pushl 12(%%eax)\n\t" \ + "pushl 8(%%eax)\n\t" \ + "pushl 4(%%eax)\n\t" \ + "movl (%%eax), %%eax\n\t" /* target->%eax */ \ + VALGRIND_CALL_NOREDIR_EAX \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=a" (_res) \ + : /*in*/ "a" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "edi" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[9]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + _argvec[8] = (unsigned long)(arg8); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "pushl 32(%%eax)\n\t" \ + "pushl 28(%%eax)\n\t" \ + "pushl 24(%%eax)\n\t" \ + "pushl 20(%%eax)\n\t" \ + "pushl 16(%%eax)\n\t" \ + "pushl 12(%%eax)\n\t" \ + "pushl 8(%%eax)\n\t" \ + "pushl 4(%%eax)\n\t" \ + "movl (%%eax), %%eax\n\t" /* target->%eax */ \ + VALGRIND_CALL_NOREDIR_EAX \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=a" (_res) \ + : /*in*/ "a" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "edi" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8,arg9) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[10]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + _argvec[8] = (unsigned long)(arg8); \ + _argvec[9] = (unsigned long)(arg9); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "subl $12, %%esp\n\t" \ + "pushl 36(%%eax)\n\t" \ + "pushl 32(%%eax)\n\t" \ + "pushl 28(%%eax)\n\t" \ + "pushl 24(%%eax)\n\t" \ + "pushl 20(%%eax)\n\t" \ + "pushl 16(%%eax)\n\t" \ + "pushl 12(%%eax)\n\t" \ + "pushl 8(%%eax)\n\t" \ + "pushl 4(%%eax)\n\t" \ + "movl (%%eax), %%eax\n\t" /* target->%eax */ \ + VALGRIND_CALL_NOREDIR_EAX \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=a" (_res) \ + : /*in*/ "a" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "edi" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8,arg9,arg10) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[11]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + _argvec[8] = (unsigned long)(arg8); \ + _argvec[9] = (unsigned long)(arg9); \ + _argvec[10] = (unsigned long)(arg10); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "subl $8, %%esp\n\t" \ + "pushl 40(%%eax)\n\t" \ + "pushl 36(%%eax)\n\t" \ + "pushl 32(%%eax)\n\t" \ + "pushl 28(%%eax)\n\t" \ + "pushl 24(%%eax)\n\t" \ + "pushl 20(%%eax)\n\t" \ + "pushl 16(%%eax)\n\t" \ + "pushl 12(%%eax)\n\t" \ + "pushl 8(%%eax)\n\t" \ + "pushl 4(%%eax)\n\t" \ + "movl (%%eax), %%eax\n\t" /* target->%eax */ \ + VALGRIND_CALL_NOREDIR_EAX \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=a" (_res) \ + : /*in*/ "a" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "edi" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5, \ + arg6,arg7,arg8,arg9,arg10, \ + arg11) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[12]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + _argvec[8] = (unsigned long)(arg8); \ + _argvec[9] = (unsigned long)(arg9); \ + _argvec[10] = (unsigned long)(arg10); \ + _argvec[11] = (unsigned long)(arg11); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "subl $4, %%esp\n\t" \ + "pushl 44(%%eax)\n\t" \ + "pushl 40(%%eax)\n\t" \ + "pushl 36(%%eax)\n\t" \ + "pushl 32(%%eax)\n\t" \ + "pushl 28(%%eax)\n\t" \ + "pushl 24(%%eax)\n\t" \ + "pushl 20(%%eax)\n\t" \ + "pushl 16(%%eax)\n\t" \ + "pushl 12(%%eax)\n\t" \ + "pushl 8(%%eax)\n\t" \ + "pushl 4(%%eax)\n\t" \ + "movl (%%eax), %%eax\n\t" /* target->%eax */ \ + VALGRIND_CALL_NOREDIR_EAX \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=a" (_res) \ + : /*in*/ "a" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "edi" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5, \ + arg6,arg7,arg8,arg9,arg10, \ + arg11,arg12) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[13]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + _argvec[8] = (unsigned long)(arg8); \ + _argvec[9] = (unsigned long)(arg9); \ + _argvec[10] = (unsigned long)(arg10); \ + _argvec[11] = (unsigned long)(arg11); \ + _argvec[12] = (unsigned long)(arg12); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "pushl 48(%%eax)\n\t" \ + "pushl 44(%%eax)\n\t" \ + "pushl 40(%%eax)\n\t" \ + "pushl 36(%%eax)\n\t" \ + "pushl 32(%%eax)\n\t" \ + "pushl 28(%%eax)\n\t" \ + "pushl 24(%%eax)\n\t" \ + "pushl 20(%%eax)\n\t" \ + "pushl 16(%%eax)\n\t" \ + "pushl 12(%%eax)\n\t" \ + "pushl 8(%%eax)\n\t" \ + "pushl 4(%%eax)\n\t" \ + "movl (%%eax), %%eax\n\t" /* target->%eax */ \ + VALGRIND_CALL_NOREDIR_EAX \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=a" (_res) \ + : /*in*/ "a" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "edi" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#endif /* PLAT_x86_linux || PLAT_x86_darwin || PLAT_x86_solaris */ + +/* ---------------- amd64-{linux,darwin,solaris} --------------- */ + +#if defined(PLAT_amd64_linux) || defined(PLAT_amd64_darwin) \ + || defined(PLAT_amd64_solaris) + +/* ARGREGS: rdi rsi rdx rcx r8 r9 (the rest on stack in R-to-L order) */ + +/* These regs are trashed by the hidden call. */ +#define __CALLER_SAVED_REGS /*"rax",*/ "rcx", "rdx", "rsi", \ + "rdi", "r8", "r9", "r10", "r11" + +/* This is all pretty complex. It's so as to make stack unwinding + work reliably. See bug 243270. The basic problem is the sub and + add of 128 of %rsp in all of the following macros. If gcc believes + the CFA is in %rsp, then unwinding may fail, because what's at the + CFA is not what gcc "expected" when it constructs the CFIs for the + places where the macros are instantiated. + + But we can't just add a CFI annotation to increase the CFA offset + by 128, to match the sub of 128 from %rsp, because we don't know + whether gcc has chosen %rsp as the CFA at that point, or whether it + has chosen some other register (eg, %rbp). In the latter case, + adding a CFI annotation to change the CFA offset is simply wrong. + + So the solution is to get hold of the CFA using + __builtin_dwarf_cfa(), put it in a known register, and add a + CFI annotation to say what the register is. We choose %rbp for + this (perhaps perversely), because: + + (1) %rbp is already subject to unwinding. If a new register was + chosen then the unwinder would have to unwind it in all stack + traces, which is expensive, and + + (2) %rbp is already subject to precise exception updates in the + JIT. If a new register was chosen, we'd have to have precise + exceptions for it too, which reduces performance of the + generated code. + + However .. one extra complication. We can't just whack the result + of __builtin_dwarf_cfa() into %rbp and then add %rbp to the + list of trashed registers at the end of the inline assembly + fragments; gcc won't allow %rbp to appear in that list. Hence + instead we need to stash %rbp in %r15 for the duration of the asm, + and say that %r15 is trashed instead. gcc seems happy to go with + that. + + Oh .. and this all needs to be conditionalised so that it is + unchanged from before this commit, when compiled with older gccs + that don't support __builtin_dwarf_cfa. Furthermore, since + this header file is freestanding, it has to be independent of + config.h, and so the following conditionalisation cannot depend on + configure time checks. + + Although it's not clear from + 'defined(__GNUC__) && defined(__GCC_HAVE_DWARF2_CFI_ASM)', + this expression excludes Darwin. + .cfi directives in Darwin assembly appear to be completely + different and I haven't investigated how they work. + + For even more entertainment value, note we have to use the + completely undocumented __builtin_dwarf_cfa(), which appears to + really compute the CFA, whereas __builtin_frame_address(0) claims + to but actually doesn't. See + https://bugs.kde.org/show_bug.cgi?id=243270#c47 +*/ +#if defined(__GNUC__) && defined(__GCC_HAVE_DWARF2_CFI_ASM) +# define __FRAME_POINTER \ + ,"r"(__builtin_dwarf_cfa()) +# define VALGRIND_CFI_PROLOGUE \ + "movq %%rbp, %%r15\n\t" \ + "movq %2, %%rbp\n\t" \ + ".cfi_remember_state\n\t" \ + ".cfi_def_cfa rbp, 0\n\t" +# define VALGRIND_CFI_EPILOGUE \ + "movq %%r15, %%rbp\n\t" \ + ".cfi_restore_state\n\t" +#else +# define __FRAME_POINTER +# define VALGRIND_CFI_PROLOGUE +# define VALGRIND_CFI_EPILOGUE +#endif + +/* Macros to save and align the stack before making a function + call and restore it afterwards as gcc may not keep the stack + pointer aligned if it doesn't realise calls are being made + to other functions. */ + +#define VALGRIND_ALIGN_STACK \ + "movq %%rsp,%%r14\n\t" \ + "andq $0xfffffffffffffff0,%%rsp\n\t" +#define VALGRIND_RESTORE_STACK \ + "movq %%r14,%%rsp\n\t" + +/* These CALL_FN_ macros assume that on amd64-linux, sizeof(unsigned + long) == 8. */ + +/* NB 9 Sept 07. There is a nasty kludge here in all these CALL_FN_ + macros. In order not to trash the stack redzone, we need to drop + %rsp by 128 before the hidden call, and restore afterwards. The + nastyness is that it is only by luck that the stack still appears + to be unwindable during the hidden call - since then the behaviour + of any routine using this macro does not match what the CFI data + says. Sigh. + + Why is this important? Imagine that a wrapper has a stack + allocated local, and passes to the hidden call, a pointer to it. + Because gcc does not know about the hidden call, it may allocate + that local in the redzone. Unfortunately the hidden call may then + trash it before it comes to use it. So we must step clear of the + redzone, for the duration of the hidden call, to make it safe. + + Probably the same problem afflicts the other redzone-style ABIs too + (ppc64-linux); but for those, the stack is + self describing (none of this CFI nonsense) so at least messing + with the stack pointer doesn't give a danger of non-unwindable + stack. */ + +#define CALL_FN_W_v(lval, orig) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[1]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + __asm__ volatile( \ + VALGRIND_CFI_PROLOGUE \ + VALGRIND_ALIGN_STACK \ + "subq $128,%%rsp\n\t" \ + "movq (%%rax), %%rax\n\t" /* target->%rax */ \ + VALGRIND_CALL_NOREDIR_RAX \ + VALGRIND_RESTORE_STACK \ + VALGRIND_CFI_EPILOGUE \ + : /*out*/ "=a" (_res) \ + : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_W(lval, orig, arg1) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[2]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + __asm__ volatile( \ + VALGRIND_CFI_PROLOGUE \ + VALGRIND_ALIGN_STACK \ + "subq $128,%%rsp\n\t" \ + "movq 8(%%rax), %%rdi\n\t" \ + "movq (%%rax), %%rax\n\t" /* target->%rax */ \ + VALGRIND_CALL_NOREDIR_RAX \ + VALGRIND_RESTORE_STACK \ + VALGRIND_CFI_EPILOGUE \ + : /*out*/ "=a" (_res) \ + : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_WW(lval, orig, arg1,arg2) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[3]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + __asm__ volatile( \ + VALGRIND_CFI_PROLOGUE \ + VALGRIND_ALIGN_STACK \ + "subq $128,%%rsp\n\t" \ + "movq 16(%%rax), %%rsi\n\t" \ + "movq 8(%%rax), %%rdi\n\t" \ + "movq (%%rax), %%rax\n\t" /* target->%rax */ \ + VALGRIND_CALL_NOREDIR_RAX \ + VALGRIND_RESTORE_STACK \ + VALGRIND_CFI_EPILOGUE \ + : /*out*/ "=a" (_res) \ + : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[4]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + __asm__ volatile( \ + VALGRIND_CFI_PROLOGUE \ + VALGRIND_ALIGN_STACK \ + "subq $128,%%rsp\n\t" \ + "movq 24(%%rax), %%rdx\n\t" \ + "movq 16(%%rax), %%rsi\n\t" \ + "movq 8(%%rax), %%rdi\n\t" \ + "movq (%%rax), %%rax\n\t" /* target->%rax */ \ + VALGRIND_CALL_NOREDIR_RAX \ + VALGRIND_RESTORE_STACK \ + VALGRIND_CFI_EPILOGUE \ + : /*out*/ "=a" (_res) \ + : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[5]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + __asm__ volatile( \ + VALGRIND_CFI_PROLOGUE \ + VALGRIND_ALIGN_STACK \ + "subq $128,%%rsp\n\t" \ + "movq 32(%%rax), %%rcx\n\t" \ + "movq 24(%%rax), %%rdx\n\t" \ + "movq 16(%%rax), %%rsi\n\t" \ + "movq 8(%%rax), %%rdi\n\t" \ + "movq (%%rax), %%rax\n\t" /* target->%rax */ \ + VALGRIND_CALL_NOREDIR_RAX \ + VALGRIND_RESTORE_STACK \ + VALGRIND_CFI_EPILOGUE \ + : /*out*/ "=a" (_res) \ + : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[6]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + __asm__ volatile( \ + VALGRIND_CFI_PROLOGUE \ + VALGRIND_ALIGN_STACK \ + "subq $128,%%rsp\n\t" \ + "movq 40(%%rax), %%r8\n\t" \ + "movq 32(%%rax), %%rcx\n\t" \ + "movq 24(%%rax), %%rdx\n\t" \ + "movq 16(%%rax), %%rsi\n\t" \ + "movq 8(%%rax), %%rdi\n\t" \ + "movq (%%rax), %%rax\n\t" /* target->%rax */ \ + VALGRIND_CALL_NOREDIR_RAX \ + VALGRIND_RESTORE_STACK \ + VALGRIND_CFI_EPILOGUE \ + : /*out*/ "=a" (_res) \ + : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[7]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + __asm__ volatile( \ + VALGRIND_CFI_PROLOGUE \ + VALGRIND_ALIGN_STACK \ + "subq $128,%%rsp\n\t" \ + "movq 48(%%rax), %%r9\n\t" \ + "movq 40(%%rax), %%r8\n\t" \ + "movq 32(%%rax), %%rcx\n\t" \ + "movq 24(%%rax), %%rdx\n\t" \ + "movq 16(%%rax), %%rsi\n\t" \ + "movq 8(%%rax), %%rdi\n\t" \ + "movq (%%rax), %%rax\n\t" /* target->%rax */ \ + VALGRIND_CALL_NOREDIR_RAX \ + VALGRIND_RESTORE_STACK \ + VALGRIND_CFI_EPILOGUE \ + : /*out*/ "=a" (_res) \ + : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[8]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + __asm__ volatile( \ + VALGRIND_CFI_PROLOGUE \ + VALGRIND_ALIGN_STACK \ + "subq $136,%%rsp\n\t" \ + "pushq 56(%%rax)\n\t" \ + "movq 48(%%rax), %%r9\n\t" \ + "movq 40(%%rax), %%r8\n\t" \ + "movq 32(%%rax), %%rcx\n\t" \ + "movq 24(%%rax), %%rdx\n\t" \ + "movq 16(%%rax), %%rsi\n\t" \ + "movq 8(%%rax), %%rdi\n\t" \ + "movq (%%rax), %%rax\n\t" /* target->%rax */ \ + VALGRIND_CALL_NOREDIR_RAX \ + VALGRIND_RESTORE_STACK \ + VALGRIND_CFI_EPILOGUE \ + : /*out*/ "=a" (_res) \ + : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[9]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + _argvec[8] = (unsigned long)(arg8); \ + __asm__ volatile( \ + VALGRIND_CFI_PROLOGUE \ + VALGRIND_ALIGN_STACK \ + "subq $128,%%rsp\n\t" \ + "pushq 64(%%rax)\n\t" \ + "pushq 56(%%rax)\n\t" \ + "movq 48(%%rax), %%r9\n\t" \ + "movq 40(%%rax), %%r8\n\t" \ + "movq 32(%%rax), %%rcx\n\t" \ + "movq 24(%%rax), %%rdx\n\t" \ + "movq 16(%%rax), %%rsi\n\t" \ + "movq 8(%%rax), %%rdi\n\t" \ + "movq (%%rax), %%rax\n\t" /* target->%rax */ \ + VALGRIND_CALL_NOREDIR_RAX \ + VALGRIND_RESTORE_STACK \ + VALGRIND_CFI_EPILOGUE \ + : /*out*/ "=a" (_res) \ + : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8,arg9) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[10]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + _argvec[8] = (unsigned long)(arg8); \ + _argvec[9] = (unsigned long)(arg9); \ + __asm__ volatile( \ + VALGRIND_CFI_PROLOGUE \ + VALGRIND_ALIGN_STACK \ + "subq $136,%%rsp\n\t" \ + "pushq 72(%%rax)\n\t" \ + "pushq 64(%%rax)\n\t" \ + "pushq 56(%%rax)\n\t" \ + "movq 48(%%rax), %%r9\n\t" \ + "movq 40(%%rax), %%r8\n\t" \ + "movq 32(%%rax), %%rcx\n\t" \ + "movq 24(%%rax), %%rdx\n\t" \ + "movq 16(%%rax), %%rsi\n\t" \ + "movq 8(%%rax), %%rdi\n\t" \ + "movq (%%rax), %%rax\n\t" /* target->%rax */ \ + VALGRIND_CALL_NOREDIR_RAX \ + VALGRIND_RESTORE_STACK \ + VALGRIND_CFI_EPILOGUE \ + : /*out*/ "=a" (_res) \ + : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8,arg9,arg10) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[11]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + _argvec[8] = (unsigned long)(arg8); \ + _argvec[9] = (unsigned long)(arg9); \ + _argvec[10] = (unsigned long)(arg10); \ + __asm__ volatile( \ + VALGRIND_CFI_PROLOGUE \ + VALGRIND_ALIGN_STACK \ + "subq $128,%%rsp\n\t" \ + "pushq 80(%%rax)\n\t" \ + "pushq 72(%%rax)\n\t" \ + "pushq 64(%%rax)\n\t" \ + "pushq 56(%%rax)\n\t" \ + "movq 48(%%rax), %%r9\n\t" \ + "movq 40(%%rax), %%r8\n\t" \ + "movq 32(%%rax), %%rcx\n\t" \ + "movq 24(%%rax), %%rdx\n\t" \ + "movq 16(%%rax), %%rsi\n\t" \ + "movq 8(%%rax), %%rdi\n\t" \ + "movq (%%rax), %%rax\n\t" /* target->%rax */ \ + VALGRIND_CALL_NOREDIR_RAX \ + VALGRIND_RESTORE_STACK \ + VALGRIND_CFI_EPILOGUE \ + : /*out*/ "=a" (_res) \ + : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8,arg9,arg10,arg11) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[12]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + _argvec[8] = (unsigned long)(arg8); \ + _argvec[9] = (unsigned long)(arg9); \ + _argvec[10] = (unsigned long)(arg10); \ + _argvec[11] = (unsigned long)(arg11); \ + __asm__ volatile( \ + VALGRIND_CFI_PROLOGUE \ + VALGRIND_ALIGN_STACK \ + "subq $136,%%rsp\n\t" \ + "pushq 88(%%rax)\n\t" \ + "pushq 80(%%rax)\n\t" \ + "pushq 72(%%rax)\n\t" \ + "pushq 64(%%rax)\n\t" \ + "pushq 56(%%rax)\n\t" \ + "movq 48(%%rax), %%r9\n\t" \ + "movq 40(%%rax), %%r8\n\t" \ + "movq 32(%%rax), %%rcx\n\t" \ + "movq 24(%%rax), %%rdx\n\t" \ + "movq 16(%%rax), %%rsi\n\t" \ + "movq 8(%%rax), %%rdi\n\t" \ + "movq (%%rax), %%rax\n\t" /* target->%rax */ \ + VALGRIND_CALL_NOREDIR_RAX \ + VALGRIND_RESTORE_STACK \ + VALGRIND_CFI_EPILOGUE \ + : /*out*/ "=a" (_res) \ + : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8,arg9,arg10,arg11,arg12) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[13]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + _argvec[8] = (unsigned long)(arg8); \ + _argvec[9] = (unsigned long)(arg9); \ + _argvec[10] = (unsigned long)(arg10); \ + _argvec[11] = (unsigned long)(arg11); \ + _argvec[12] = (unsigned long)(arg12); \ + __asm__ volatile( \ + VALGRIND_CFI_PROLOGUE \ + VALGRIND_ALIGN_STACK \ + "subq $128,%%rsp\n\t" \ + "pushq 96(%%rax)\n\t" \ + "pushq 88(%%rax)\n\t" \ + "pushq 80(%%rax)\n\t" \ + "pushq 72(%%rax)\n\t" \ + "pushq 64(%%rax)\n\t" \ + "pushq 56(%%rax)\n\t" \ + "movq 48(%%rax), %%r9\n\t" \ + "movq 40(%%rax), %%r8\n\t" \ + "movq 32(%%rax), %%rcx\n\t" \ + "movq 24(%%rax), %%rdx\n\t" \ + "movq 16(%%rax), %%rsi\n\t" \ + "movq 8(%%rax), %%rdi\n\t" \ + "movq (%%rax), %%rax\n\t" /* target->%rax */ \ + VALGRIND_CALL_NOREDIR_RAX \ + VALGRIND_RESTORE_STACK \ + VALGRIND_CFI_EPILOGUE \ + : /*out*/ "=a" (_res) \ + : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#endif /* PLAT_amd64_linux || PLAT_amd64_darwin || PLAT_amd64_solaris */ + +/* ------------------------ ppc32-linux ------------------------ */ + +#if defined(PLAT_ppc32_linux) + +/* This is useful for finding out about the on-stack stuff: + + extern int f9 ( int,int,int,int,int,int,int,int,int ); + extern int f10 ( int,int,int,int,int,int,int,int,int,int ); + extern int f11 ( int,int,int,int,int,int,int,int,int,int,int ); + extern int f12 ( int,int,int,int,int,int,int,int,int,int,int,int ); + + int g9 ( void ) { + return f9(11,22,33,44,55,66,77,88,99); + } + int g10 ( void ) { + return f10(11,22,33,44,55,66,77,88,99,110); + } + int g11 ( void ) { + return f11(11,22,33,44,55,66,77,88,99,110,121); + } + int g12 ( void ) { + return f12(11,22,33,44,55,66,77,88,99,110,121,132); + } +*/ + +/* ARGREGS: r3 r4 r5 r6 r7 r8 r9 r10 (the rest on stack somewhere) */ + +/* These regs are trashed by the hidden call. */ +#define __CALLER_SAVED_REGS \ + "lr", "ctr", "xer", \ + "cr0", "cr1", "cr2", "cr3", "cr4", "cr5", "cr6", "cr7", \ + "r0", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", \ + "r11", "r12", "r13" + +/* Macros to save and align the stack before making a function + call and restore it afterwards as gcc may not keep the stack + pointer aligned if it doesn't realise calls are being made + to other functions. */ + +#define VALGRIND_ALIGN_STACK \ + "mr 28,1\n\t" \ + "rlwinm 1,1,0,0,27\n\t" +#define VALGRIND_RESTORE_STACK \ + "mr 1,28\n\t" + +/* These CALL_FN_ macros assume that on ppc32-linux, + sizeof(unsigned long) == 4. */ + +#define CALL_FN_W_v(lval, orig) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[1]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 11,%1\n\t" \ + "lwz 11,0(11)\n\t" /* target->r11 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ + VALGRIND_RESTORE_STACK \ + "mr %0,3" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_W(lval, orig, arg1) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[2]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)arg1; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 11,%1\n\t" \ + "lwz 3,4(11)\n\t" /* arg1->r3 */ \ + "lwz 11,0(11)\n\t" /* target->r11 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ + VALGRIND_RESTORE_STACK \ + "mr %0,3" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_WW(lval, orig, arg1,arg2) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[3]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)arg1; \ + _argvec[2] = (unsigned long)arg2; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 11,%1\n\t" \ + "lwz 3,4(11)\n\t" /* arg1->r3 */ \ + "lwz 4,8(11)\n\t" \ + "lwz 11,0(11)\n\t" /* target->r11 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ + VALGRIND_RESTORE_STACK \ + "mr %0,3" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[4]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)arg1; \ + _argvec[2] = (unsigned long)arg2; \ + _argvec[3] = (unsigned long)arg3; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 11,%1\n\t" \ + "lwz 3,4(11)\n\t" /* arg1->r3 */ \ + "lwz 4,8(11)\n\t" \ + "lwz 5,12(11)\n\t" \ + "lwz 11,0(11)\n\t" /* target->r11 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ + VALGRIND_RESTORE_STACK \ + "mr %0,3" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[5]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)arg1; \ + _argvec[2] = (unsigned long)arg2; \ + _argvec[3] = (unsigned long)arg3; \ + _argvec[4] = (unsigned long)arg4; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 11,%1\n\t" \ + "lwz 3,4(11)\n\t" /* arg1->r3 */ \ + "lwz 4,8(11)\n\t" \ + "lwz 5,12(11)\n\t" \ + "lwz 6,16(11)\n\t" /* arg4->r6 */ \ + "lwz 11,0(11)\n\t" /* target->r11 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ + VALGRIND_RESTORE_STACK \ + "mr %0,3" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[6]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)arg1; \ + _argvec[2] = (unsigned long)arg2; \ + _argvec[3] = (unsigned long)arg3; \ + _argvec[4] = (unsigned long)arg4; \ + _argvec[5] = (unsigned long)arg5; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 11,%1\n\t" \ + "lwz 3,4(11)\n\t" /* arg1->r3 */ \ + "lwz 4,8(11)\n\t" \ + "lwz 5,12(11)\n\t" \ + "lwz 6,16(11)\n\t" /* arg4->r6 */ \ + "lwz 7,20(11)\n\t" \ + "lwz 11,0(11)\n\t" /* target->r11 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ + VALGRIND_RESTORE_STACK \ + "mr %0,3" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[7]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)arg1; \ + _argvec[2] = (unsigned long)arg2; \ + _argvec[3] = (unsigned long)arg3; \ + _argvec[4] = (unsigned long)arg4; \ + _argvec[5] = (unsigned long)arg5; \ + _argvec[6] = (unsigned long)arg6; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 11,%1\n\t" \ + "lwz 3,4(11)\n\t" /* arg1->r3 */ \ + "lwz 4,8(11)\n\t" \ + "lwz 5,12(11)\n\t" \ + "lwz 6,16(11)\n\t" /* arg4->r6 */ \ + "lwz 7,20(11)\n\t" \ + "lwz 8,24(11)\n\t" \ + "lwz 11,0(11)\n\t" /* target->r11 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ + VALGRIND_RESTORE_STACK \ + "mr %0,3" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[8]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)arg1; \ + _argvec[2] = (unsigned long)arg2; \ + _argvec[3] = (unsigned long)arg3; \ + _argvec[4] = (unsigned long)arg4; \ + _argvec[5] = (unsigned long)arg5; \ + _argvec[6] = (unsigned long)arg6; \ + _argvec[7] = (unsigned long)arg7; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 11,%1\n\t" \ + "lwz 3,4(11)\n\t" /* arg1->r3 */ \ + "lwz 4,8(11)\n\t" \ + "lwz 5,12(11)\n\t" \ + "lwz 6,16(11)\n\t" /* arg4->r6 */ \ + "lwz 7,20(11)\n\t" \ + "lwz 8,24(11)\n\t" \ + "lwz 9,28(11)\n\t" \ + "lwz 11,0(11)\n\t" /* target->r11 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ + VALGRIND_RESTORE_STACK \ + "mr %0,3" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[9]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)arg1; \ + _argvec[2] = (unsigned long)arg2; \ + _argvec[3] = (unsigned long)arg3; \ + _argvec[4] = (unsigned long)arg4; \ + _argvec[5] = (unsigned long)arg5; \ + _argvec[6] = (unsigned long)arg6; \ + _argvec[7] = (unsigned long)arg7; \ + _argvec[8] = (unsigned long)arg8; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 11,%1\n\t" \ + "lwz 3,4(11)\n\t" /* arg1->r3 */ \ + "lwz 4,8(11)\n\t" \ + "lwz 5,12(11)\n\t" \ + "lwz 6,16(11)\n\t" /* arg4->r6 */ \ + "lwz 7,20(11)\n\t" \ + "lwz 8,24(11)\n\t" \ + "lwz 9,28(11)\n\t" \ + "lwz 10,32(11)\n\t" /* arg8->r10 */ \ + "lwz 11,0(11)\n\t" /* target->r11 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ + VALGRIND_RESTORE_STACK \ + "mr %0,3" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8,arg9) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[10]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)arg1; \ + _argvec[2] = (unsigned long)arg2; \ + _argvec[3] = (unsigned long)arg3; \ + _argvec[4] = (unsigned long)arg4; \ + _argvec[5] = (unsigned long)arg5; \ + _argvec[6] = (unsigned long)arg6; \ + _argvec[7] = (unsigned long)arg7; \ + _argvec[8] = (unsigned long)arg8; \ + _argvec[9] = (unsigned long)arg9; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 11,%1\n\t" \ + "addi 1,1,-16\n\t" \ + /* arg9 */ \ + "lwz 3,36(11)\n\t" \ + "stw 3,8(1)\n\t" \ + /* args1-8 */ \ + "lwz 3,4(11)\n\t" /* arg1->r3 */ \ + "lwz 4,8(11)\n\t" \ + "lwz 5,12(11)\n\t" \ + "lwz 6,16(11)\n\t" /* arg4->r6 */ \ + "lwz 7,20(11)\n\t" \ + "lwz 8,24(11)\n\t" \ + "lwz 9,28(11)\n\t" \ + "lwz 10,32(11)\n\t" /* arg8->r10 */ \ + "lwz 11,0(11)\n\t" /* target->r11 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ + VALGRIND_RESTORE_STACK \ + "mr %0,3" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8,arg9,arg10) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[11]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)arg1; \ + _argvec[2] = (unsigned long)arg2; \ + _argvec[3] = (unsigned long)arg3; \ + _argvec[4] = (unsigned long)arg4; \ + _argvec[5] = (unsigned long)arg5; \ + _argvec[6] = (unsigned long)arg6; \ + _argvec[7] = (unsigned long)arg7; \ + _argvec[8] = (unsigned long)arg8; \ + _argvec[9] = (unsigned long)arg9; \ + _argvec[10] = (unsigned long)arg10; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 11,%1\n\t" \ + "addi 1,1,-16\n\t" \ + /* arg10 */ \ + "lwz 3,40(11)\n\t" \ + "stw 3,12(1)\n\t" \ + /* arg9 */ \ + "lwz 3,36(11)\n\t" \ + "stw 3,8(1)\n\t" \ + /* args1-8 */ \ + "lwz 3,4(11)\n\t" /* arg1->r3 */ \ + "lwz 4,8(11)\n\t" \ + "lwz 5,12(11)\n\t" \ + "lwz 6,16(11)\n\t" /* arg4->r6 */ \ + "lwz 7,20(11)\n\t" \ + "lwz 8,24(11)\n\t" \ + "lwz 9,28(11)\n\t" \ + "lwz 10,32(11)\n\t" /* arg8->r10 */ \ + "lwz 11,0(11)\n\t" /* target->r11 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ + VALGRIND_RESTORE_STACK \ + "mr %0,3" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8,arg9,arg10,arg11) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[12]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)arg1; \ + _argvec[2] = (unsigned long)arg2; \ + _argvec[3] = (unsigned long)arg3; \ + _argvec[4] = (unsigned long)arg4; \ + _argvec[5] = (unsigned long)arg5; \ + _argvec[6] = (unsigned long)arg6; \ + _argvec[7] = (unsigned long)arg7; \ + _argvec[8] = (unsigned long)arg8; \ + _argvec[9] = (unsigned long)arg9; \ + _argvec[10] = (unsigned long)arg10; \ + _argvec[11] = (unsigned long)arg11; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 11,%1\n\t" \ + "addi 1,1,-32\n\t" \ + /* arg11 */ \ + "lwz 3,44(11)\n\t" \ + "stw 3,16(1)\n\t" \ + /* arg10 */ \ + "lwz 3,40(11)\n\t" \ + "stw 3,12(1)\n\t" \ + /* arg9 */ \ + "lwz 3,36(11)\n\t" \ + "stw 3,8(1)\n\t" \ + /* args1-8 */ \ + "lwz 3,4(11)\n\t" /* arg1->r3 */ \ + "lwz 4,8(11)\n\t" \ + "lwz 5,12(11)\n\t" \ + "lwz 6,16(11)\n\t" /* arg4->r6 */ \ + "lwz 7,20(11)\n\t" \ + "lwz 8,24(11)\n\t" \ + "lwz 9,28(11)\n\t" \ + "lwz 10,32(11)\n\t" /* arg8->r10 */ \ + "lwz 11,0(11)\n\t" /* target->r11 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ + VALGRIND_RESTORE_STACK \ + "mr %0,3" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8,arg9,arg10,arg11,arg12) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[13]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)arg1; \ + _argvec[2] = (unsigned long)arg2; \ + _argvec[3] = (unsigned long)arg3; \ + _argvec[4] = (unsigned long)arg4; \ + _argvec[5] = (unsigned long)arg5; \ + _argvec[6] = (unsigned long)arg6; \ + _argvec[7] = (unsigned long)arg7; \ + _argvec[8] = (unsigned long)arg8; \ + _argvec[9] = (unsigned long)arg9; \ + _argvec[10] = (unsigned long)arg10; \ + _argvec[11] = (unsigned long)arg11; \ + _argvec[12] = (unsigned long)arg12; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 11,%1\n\t" \ + "addi 1,1,-32\n\t" \ + /* arg12 */ \ + "lwz 3,48(11)\n\t" \ + "stw 3,20(1)\n\t" \ + /* arg11 */ \ + "lwz 3,44(11)\n\t" \ + "stw 3,16(1)\n\t" \ + /* arg10 */ \ + "lwz 3,40(11)\n\t" \ + "stw 3,12(1)\n\t" \ + /* arg9 */ \ + "lwz 3,36(11)\n\t" \ + "stw 3,8(1)\n\t" \ + /* args1-8 */ \ + "lwz 3,4(11)\n\t" /* arg1->r3 */ \ + "lwz 4,8(11)\n\t" \ + "lwz 5,12(11)\n\t" \ + "lwz 6,16(11)\n\t" /* arg4->r6 */ \ + "lwz 7,20(11)\n\t" \ + "lwz 8,24(11)\n\t" \ + "lwz 9,28(11)\n\t" \ + "lwz 10,32(11)\n\t" /* arg8->r10 */ \ + "lwz 11,0(11)\n\t" /* target->r11 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ + VALGRIND_RESTORE_STACK \ + "mr %0,3" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#endif /* PLAT_ppc32_linux */ + +/* ------------------------ ppc64-linux ------------------------ */ + +#if defined(PLAT_ppc64be_linux) + +/* ARGREGS: r3 r4 r5 r6 r7 r8 r9 r10 (the rest on stack somewhere) */ + +/* These regs are trashed by the hidden call. */ +#define __CALLER_SAVED_REGS \ + "lr", "ctr", "xer", \ + "cr0", "cr1", "cr2", "cr3", "cr4", "cr5", "cr6", "cr7", \ + "r0", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", \ + "r11", "r12", "r13" + +/* Macros to save and align the stack before making a function + call and restore it afterwards as gcc may not keep the stack + pointer aligned if it doesn't realise calls are being made + to other functions. */ + +#define VALGRIND_ALIGN_STACK \ + "mr 28,1\n\t" \ + "rldicr 1,1,0,59\n\t" +#define VALGRIND_RESTORE_STACK \ + "mr 1,28\n\t" + +/* These CALL_FN_ macros assume that on ppc64-linux, sizeof(unsigned + long) == 8. */ + +#define CALL_FN_W_v(lval, orig) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[3+0]; \ + volatile unsigned long _res; \ + /* _argvec[0] holds current r2 across the call */ \ + _argvec[1] = (unsigned long)_orig.r2; \ + _argvec[2] = (unsigned long)_orig.nraddr; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 11,%1\n\t" \ + "std 2,-16(11)\n\t" /* save tocptr */ \ + "ld 2,-8(11)\n\t" /* use nraddr's tocptr */ \ + "ld 11, 0(11)\n\t" /* target->r11 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ + "mr 11,%1\n\t" \ + "mr %0,3\n\t" \ + "ld 2,-16(11)\n\t" /* restore tocptr */ \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[2]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_W(lval, orig, arg1) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[3+1]; \ + volatile unsigned long _res; \ + /* _argvec[0] holds current r2 across the call */ \ + _argvec[1] = (unsigned long)_orig.r2; \ + _argvec[2] = (unsigned long)_orig.nraddr; \ + _argvec[2+1] = (unsigned long)arg1; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 11,%1\n\t" \ + "std 2,-16(11)\n\t" /* save tocptr */ \ + "ld 2,-8(11)\n\t" /* use nraddr's tocptr */ \ + "ld 3, 8(11)\n\t" /* arg1->r3 */ \ + "ld 11, 0(11)\n\t" /* target->r11 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ + "mr 11,%1\n\t" \ + "mr %0,3\n\t" \ + "ld 2,-16(11)\n\t" /* restore tocptr */ \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[2]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_WW(lval, orig, arg1,arg2) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[3+2]; \ + volatile unsigned long _res; \ + /* _argvec[0] holds current r2 across the call */ \ + _argvec[1] = (unsigned long)_orig.r2; \ + _argvec[2] = (unsigned long)_orig.nraddr; \ + _argvec[2+1] = (unsigned long)arg1; \ + _argvec[2+2] = (unsigned long)arg2; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 11,%1\n\t" \ + "std 2,-16(11)\n\t" /* save tocptr */ \ + "ld 2,-8(11)\n\t" /* use nraddr's tocptr */ \ + "ld 3, 8(11)\n\t" /* arg1->r3 */ \ + "ld 4, 16(11)\n\t" /* arg2->r4 */ \ + "ld 11, 0(11)\n\t" /* target->r11 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ + "mr 11,%1\n\t" \ + "mr %0,3\n\t" \ + "ld 2,-16(11)\n\t" /* restore tocptr */ \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[2]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[3+3]; \ + volatile unsigned long _res; \ + /* _argvec[0] holds current r2 across the call */ \ + _argvec[1] = (unsigned long)_orig.r2; \ + _argvec[2] = (unsigned long)_orig.nraddr; \ + _argvec[2+1] = (unsigned long)arg1; \ + _argvec[2+2] = (unsigned long)arg2; \ + _argvec[2+3] = (unsigned long)arg3; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 11,%1\n\t" \ + "std 2,-16(11)\n\t" /* save tocptr */ \ + "ld 2,-8(11)\n\t" /* use nraddr's tocptr */ \ + "ld 3, 8(11)\n\t" /* arg1->r3 */ \ + "ld 4, 16(11)\n\t" /* arg2->r4 */ \ + "ld 5, 24(11)\n\t" /* arg3->r5 */ \ + "ld 11, 0(11)\n\t" /* target->r11 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ + "mr 11,%1\n\t" \ + "mr %0,3\n\t" \ + "ld 2,-16(11)\n\t" /* restore tocptr */ \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[2]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[3+4]; \ + volatile unsigned long _res; \ + /* _argvec[0] holds current r2 across the call */ \ + _argvec[1] = (unsigned long)_orig.r2; \ + _argvec[2] = (unsigned long)_orig.nraddr; \ + _argvec[2+1] = (unsigned long)arg1; \ + _argvec[2+2] = (unsigned long)arg2; \ + _argvec[2+3] = (unsigned long)arg3; \ + _argvec[2+4] = (unsigned long)arg4; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 11,%1\n\t" \ + "std 2,-16(11)\n\t" /* save tocptr */ \ + "ld 2,-8(11)\n\t" /* use nraddr's tocptr */ \ + "ld 3, 8(11)\n\t" /* arg1->r3 */ \ + "ld 4, 16(11)\n\t" /* arg2->r4 */ \ + "ld 5, 24(11)\n\t" /* arg3->r5 */ \ + "ld 6, 32(11)\n\t" /* arg4->r6 */ \ + "ld 11, 0(11)\n\t" /* target->r11 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ + "mr 11,%1\n\t" \ + "mr %0,3\n\t" \ + "ld 2,-16(11)\n\t" /* restore tocptr */ \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[2]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[3+5]; \ + volatile unsigned long _res; \ + /* _argvec[0] holds current r2 across the call */ \ + _argvec[1] = (unsigned long)_orig.r2; \ + _argvec[2] = (unsigned long)_orig.nraddr; \ + _argvec[2+1] = (unsigned long)arg1; \ + _argvec[2+2] = (unsigned long)arg2; \ + _argvec[2+3] = (unsigned long)arg3; \ + _argvec[2+4] = (unsigned long)arg4; \ + _argvec[2+5] = (unsigned long)arg5; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 11,%1\n\t" \ + "std 2,-16(11)\n\t" /* save tocptr */ \ + "ld 2,-8(11)\n\t" /* use nraddr's tocptr */ \ + "ld 3, 8(11)\n\t" /* arg1->r3 */ \ + "ld 4, 16(11)\n\t" /* arg2->r4 */ \ + "ld 5, 24(11)\n\t" /* arg3->r5 */ \ + "ld 6, 32(11)\n\t" /* arg4->r6 */ \ + "ld 7, 40(11)\n\t" /* arg5->r7 */ \ + "ld 11, 0(11)\n\t" /* target->r11 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ + "mr 11,%1\n\t" \ + "mr %0,3\n\t" \ + "ld 2,-16(11)\n\t" /* restore tocptr */ \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[2]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[3+6]; \ + volatile unsigned long _res; \ + /* _argvec[0] holds current r2 across the call */ \ + _argvec[1] = (unsigned long)_orig.r2; \ + _argvec[2] = (unsigned long)_orig.nraddr; \ + _argvec[2+1] = (unsigned long)arg1; \ + _argvec[2+2] = (unsigned long)arg2; \ + _argvec[2+3] = (unsigned long)arg3; \ + _argvec[2+4] = (unsigned long)arg4; \ + _argvec[2+5] = (unsigned long)arg5; \ + _argvec[2+6] = (unsigned long)arg6; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 11,%1\n\t" \ + "std 2,-16(11)\n\t" /* save tocptr */ \ + "ld 2,-8(11)\n\t" /* use nraddr's tocptr */ \ + "ld 3, 8(11)\n\t" /* arg1->r3 */ \ + "ld 4, 16(11)\n\t" /* arg2->r4 */ \ + "ld 5, 24(11)\n\t" /* arg3->r5 */ \ + "ld 6, 32(11)\n\t" /* arg4->r6 */ \ + "ld 7, 40(11)\n\t" /* arg5->r7 */ \ + "ld 8, 48(11)\n\t" /* arg6->r8 */ \ + "ld 11, 0(11)\n\t" /* target->r11 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ + "mr 11,%1\n\t" \ + "mr %0,3\n\t" \ + "ld 2,-16(11)\n\t" /* restore tocptr */ \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[2]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[3+7]; \ + volatile unsigned long _res; \ + /* _argvec[0] holds current r2 across the call */ \ + _argvec[1] = (unsigned long)_orig.r2; \ + _argvec[2] = (unsigned long)_orig.nraddr; \ + _argvec[2+1] = (unsigned long)arg1; \ + _argvec[2+2] = (unsigned long)arg2; \ + _argvec[2+3] = (unsigned long)arg3; \ + _argvec[2+4] = (unsigned long)arg4; \ + _argvec[2+5] = (unsigned long)arg5; \ + _argvec[2+6] = (unsigned long)arg6; \ + _argvec[2+7] = (unsigned long)arg7; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 11,%1\n\t" \ + "std 2,-16(11)\n\t" /* save tocptr */ \ + "ld 2,-8(11)\n\t" /* use nraddr's tocptr */ \ + "ld 3, 8(11)\n\t" /* arg1->r3 */ \ + "ld 4, 16(11)\n\t" /* arg2->r4 */ \ + "ld 5, 24(11)\n\t" /* arg3->r5 */ \ + "ld 6, 32(11)\n\t" /* arg4->r6 */ \ + "ld 7, 40(11)\n\t" /* arg5->r7 */ \ + "ld 8, 48(11)\n\t" /* arg6->r8 */ \ + "ld 9, 56(11)\n\t" /* arg7->r9 */ \ + "ld 11, 0(11)\n\t" /* target->r11 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ + "mr 11,%1\n\t" \ + "mr %0,3\n\t" \ + "ld 2,-16(11)\n\t" /* restore tocptr */ \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[2]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[3+8]; \ + volatile unsigned long _res; \ + /* _argvec[0] holds current r2 across the call */ \ + _argvec[1] = (unsigned long)_orig.r2; \ + _argvec[2] = (unsigned long)_orig.nraddr; \ + _argvec[2+1] = (unsigned long)arg1; \ + _argvec[2+2] = (unsigned long)arg2; \ + _argvec[2+3] = (unsigned long)arg3; \ + _argvec[2+4] = (unsigned long)arg4; \ + _argvec[2+5] = (unsigned long)arg5; \ + _argvec[2+6] = (unsigned long)arg6; \ + _argvec[2+7] = (unsigned long)arg7; \ + _argvec[2+8] = (unsigned long)arg8; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 11,%1\n\t" \ + "std 2,-16(11)\n\t" /* save tocptr */ \ + "ld 2,-8(11)\n\t" /* use nraddr's tocptr */ \ + "ld 3, 8(11)\n\t" /* arg1->r3 */ \ + "ld 4, 16(11)\n\t" /* arg2->r4 */ \ + "ld 5, 24(11)\n\t" /* arg3->r5 */ \ + "ld 6, 32(11)\n\t" /* arg4->r6 */ \ + "ld 7, 40(11)\n\t" /* arg5->r7 */ \ + "ld 8, 48(11)\n\t" /* arg6->r8 */ \ + "ld 9, 56(11)\n\t" /* arg7->r9 */ \ + "ld 10, 64(11)\n\t" /* arg8->r10 */ \ + "ld 11, 0(11)\n\t" /* target->r11 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ + "mr 11,%1\n\t" \ + "mr %0,3\n\t" \ + "ld 2,-16(11)\n\t" /* restore tocptr */ \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[2]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8,arg9) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[3+9]; \ + volatile unsigned long _res; \ + /* _argvec[0] holds current r2 across the call */ \ + _argvec[1] = (unsigned long)_orig.r2; \ + _argvec[2] = (unsigned long)_orig.nraddr; \ + _argvec[2+1] = (unsigned long)arg1; \ + _argvec[2+2] = (unsigned long)arg2; \ + _argvec[2+3] = (unsigned long)arg3; \ + _argvec[2+4] = (unsigned long)arg4; \ + _argvec[2+5] = (unsigned long)arg5; \ + _argvec[2+6] = (unsigned long)arg6; \ + _argvec[2+7] = (unsigned long)arg7; \ + _argvec[2+8] = (unsigned long)arg8; \ + _argvec[2+9] = (unsigned long)arg9; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 11,%1\n\t" \ + "std 2,-16(11)\n\t" /* save tocptr */ \ + "ld 2,-8(11)\n\t" /* use nraddr's tocptr */ \ + "addi 1,1,-128\n\t" /* expand stack frame */ \ + /* arg9 */ \ + "ld 3,72(11)\n\t" \ + "std 3,112(1)\n\t" \ + /* args1-8 */ \ + "ld 3, 8(11)\n\t" /* arg1->r3 */ \ + "ld 4, 16(11)\n\t" /* arg2->r4 */ \ + "ld 5, 24(11)\n\t" /* arg3->r5 */ \ + "ld 6, 32(11)\n\t" /* arg4->r6 */ \ + "ld 7, 40(11)\n\t" /* arg5->r7 */ \ + "ld 8, 48(11)\n\t" /* arg6->r8 */ \ + "ld 9, 56(11)\n\t" /* arg7->r9 */ \ + "ld 10, 64(11)\n\t" /* arg8->r10 */ \ + "ld 11, 0(11)\n\t" /* target->r11 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ + "mr 11,%1\n\t" \ + "mr %0,3\n\t" \ + "ld 2,-16(11)\n\t" /* restore tocptr */ \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[2]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8,arg9,arg10) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[3+10]; \ + volatile unsigned long _res; \ + /* _argvec[0] holds current r2 across the call */ \ + _argvec[1] = (unsigned long)_orig.r2; \ + _argvec[2] = (unsigned long)_orig.nraddr; \ + _argvec[2+1] = (unsigned long)arg1; \ + _argvec[2+2] = (unsigned long)arg2; \ + _argvec[2+3] = (unsigned long)arg3; \ + _argvec[2+4] = (unsigned long)arg4; \ + _argvec[2+5] = (unsigned long)arg5; \ + _argvec[2+6] = (unsigned long)arg6; \ + _argvec[2+7] = (unsigned long)arg7; \ + _argvec[2+8] = (unsigned long)arg8; \ + _argvec[2+9] = (unsigned long)arg9; \ + _argvec[2+10] = (unsigned long)arg10; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 11,%1\n\t" \ + "std 2,-16(11)\n\t" /* save tocptr */ \ + "ld 2,-8(11)\n\t" /* use nraddr's tocptr */ \ + "addi 1,1,-128\n\t" /* expand stack frame */ \ + /* arg10 */ \ + "ld 3,80(11)\n\t" \ + "std 3,120(1)\n\t" \ + /* arg9 */ \ + "ld 3,72(11)\n\t" \ + "std 3,112(1)\n\t" \ + /* args1-8 */ \ + "ld 3, 8(11)\n\t" /* arg1->r3 */ \ + "ld 4, 16(11)\n\t" /* arg2->r4 */ \ + "ld 5, 24(11)\n\t" /* arg3->r5 */ \ + "ld 6, 32(11)\n\t" /* arg4->r6 */ \ + "ld 7, 40(11)\n\t" /* arg5->r7 */ \ + "ld 8, 48(11)\n\t" /* arg6->r8 */ \ + "ld 9, 56(11)\n\t" /* arg7->r9 */ \ + "ld 10, 64(11)\n\t" /* arg8->r10 */ \ + "ld 11, 0(11)\n\t" /* target->r11 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ + "mr 11,%1\n\t" \ + "mr %0,3\n\t" \ + "ld 2,-16(11)\n\t" /* restore tocptr */ \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[2]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8,arg9,arg10,arg11) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[3+11]; \ + volatile unsigned long _res; \ + /* _argvec[0] holds current r2 across the call */ \ + _argvec[1] = (unsigned long)_orig.r2; \ + _argvec[2] = (unsigned long)_orig.nraddr; \ + _argvec[2+1] = (unsigned long)arg1; \ + _argvec[2+2] = (unsigned long)arg2; \ + _argvec[2+3] = (unsigned long)arg3; \ + _argvec[2+4] = (unsigned long)arg4; \ + _argvec[2+5] = (unsigned long)arg5; \ + _argvec[2+6] = (unsigned long)arg6; \ + _argvec[2+7] = (unsigned long)arg7; \ + _argvec[2+8] = (unsigned long)arg8; \ + _argvec[2+9] = (unsigned long)arg9; \ + _argvec[2+10] = (unsigned long)arg10; \ + _argvec[2+11] = (unsigned long)arg11; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 11,%1\n\t" \ + "std 2,-16(11)\n\t" /* save tocptr */ \ + "ld 2,-8(11)\n\t" /* use nraddr's tocptr */ \ + "addi 1,1,-144\n\t" /* expand stack frame */ \ + /* arg11 */ \ + "ld 3,88(11)\n\t" \ + "std 3,128(1)\n\t" \ + /* arg10 */ \ + "ld 3,80(11)\n\t" \ + "std 3,120(1)\n\t" \ + /* arg9 */ \ + "ld 3,72(11)\n\t" \ + "std 3,112(1)\n\t" \ + /* args1-8 */ \ + "ld 3, 8(11)\n\t" /* arg1->r3 */ \ + "ld 4, 16(11)\n\t" /* arg2->r4 */ \ + "ld 5, 24(11)\n\t" /* arg3->r5 */ \ + "ld 6, 32(11)\n\t" /* arg4->r6 */ \ + "ld 7, 40(11)\n\t" /* arg5->r7 */ \ + "ld 8, 48(11)\n\t" /* arg6->r8 */ \ + "ld 9, 56(11)\n\t" /* arg7->r9 */ \ + "ld 10, 64(11)\n\t" /* arg8->r10 */ \ + "ld 11, 0(11)\n\t" /* target->r11 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ + "mr 11,%1\n\t" \ + "mr %0,3\n\t" \ + "ld 2,-16(11)\n\t" /* restore tocptr */ \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[2]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8,arg9,arg10,arg11,arg12) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[3+12]; \ + volatile unsigned long _res; \ + /* _argvec[0] holds current r2 across the call */ \ + _argvec[1] = (unsigned long)_orig.r2; \ + _argvec[2] = (unsigned long)_orig.nraddr; \ + _argvec[2+1] = (unsigned long)arg1; \ + _argvec[2+2] = (unsigned long)arg2; \ + _argvec[2+3] = (unsigned long)arg3; \ + _argvec[2+4] = (unsigned long)arg4; \ + _argvec[2+5] = (unsigned long)arg5; \ + _argvec[2+6] = (unsigned long)arg6; \ + _argvec[2+7] = (unsigned long)arg7; \ + _argvec[2+8] = (unsigned long)arg8; \ + _argvec[2+9] = (unsigned long)arg9; \ + _argvec[2+10] = (unsigned long)arg10; \ + _argvec[2+11] = (unsigned long)arg11; \ + _argvec[2+12] = (unsigned long)arg12; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 11,%1\n\t" \ + "std 2,-16(11)\n\t" /* save tocptr */ \ + "ld 2,-8(11)\n\t" /* use nraddr's tocptr */ \ + "addi 1,1,-144\n\t" /* expand stack frame */ \ + /* arg12 */ \ + "ld 3,96(11)\n\t" \ + "std 3,136(1)\n\t" \ + /* arg11 */ \ + "ld 3,88(11)\n\t" \ + "std 3,128(1)\n\t" \ + /* arg10 */ \ + "ld 3,80(11)\n\t" \ + "std 3,120(1)\n\t" \ + /* arg9 */ \ + "ld 3,72(11)\n\t" \ + "std 3,112(1)\n\t" \ + /* args1-8 */ \ + "ld 3, 8(11)\n\t" /* arg1->r3 */ \ + "ld 4, 16(11)\n\t" /* arg2->r4 */ \ + "ld 5, 24(11)\n\t" /* arg3->r5 */ \ + "ld 6, 32(11)\n\t" /* arg4->r6 */ \ + "ld 7, 40(11)\n\t" /* arg5->r7 */ \ + "ld 8, 48(11)\n\t" /* arg6->r8 */ \ + "ld 9, 56(11)\n\t" /* arg7->r9 */ \ + "ld 10, 64(11)\n\t" /* arg8->r10 */ \ + "ld 11, 0(11)\n\t" /* target->r11 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ + "mr 11,%1\n\t" \ + "mr %0,3\n\t" \ + "ld 2,-16(11)\n\t" /* restore tocptr */ \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[2]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#endif /* PLAT_ppc64be_linux */ + +/* ------------------------- ppc64le-linux ----------------------- */ +#if defined(PLAT_ppc64le_linux) + +/* ARGREGS: r3 r4 r5 r6 r7 r8 r9 r10 (the rest on stack somewhere) */ + +/* These regs are trashed by the hidden call. */ +#define __CALLER_SAVED_REGS \ + "lr", "ctr", "xer", \ + "cr0", "cr1", "cr2", "cr3", "cr4", "cr5", "cr6", "cr7", \ + "r0", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", \ + "r11", "r12", "r13" + +/* Macros to save and align the stack before making a function + call and restore it afterwards as gcc may not keep the stack + pointer aligned if it doesn't realise calls are being made + to other functions. */ + +#define VALGRIND_ALIGN_STACK \ + "mr 28,1\n\t" \ + "rldicr 1,1,0,59\n\t" +#define VALGRIND_RESTORE_STACK \ + "mr 1,28\n\t" + +/* These CALL_FN_ macros assume that on ppc64-linux, sizeof(unsigned + long) == 8. */ + +#define CALL_FN_W_v(lval, orig) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[3+0]; \ + volatile unsigned long _res; \ + /* _argvec[0] holds current r2 across the call */ \ + _argvec[1] = (unsigned long)_orig.r2; \ + _argvec[2] = (unsigned long)_orig.nraddr; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 12,%1\n\t" \ + "std 2,-16(12)\n\t" /* save tocptr */ \ + "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ + "ld 12, 0(12)\n\t" /* target->r12 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ + "mr 12,%1\n\t" \ + "mr %0,3\n\t" \ + "ld 2,-16(12)\n\t" /* restore tocptr */ \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[2]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_W(lval, orig, arg1) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[3+1]; \ + volatile unsigned long _res; \ + /* _argvec[0] holds current r2 across the call */ \ + _argvec[1] = (unsigned long)_orig.r2; \ + _argvec[2] = (unsigned long)_orig.nraddr; \ + _argvec[2+1] = (unsigned long)arg1; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 12,%1\n\t" \ + "std 2,-16(12)\n\t" /* save tocptr */ \ + "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ + "ld 3, 8(12)\n\t" /* arg1->r3 */ \ + "ld 12, 0(12)\n\t" /* target->r12 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ + "mr 12,%1\n\t" \ + "mr %0,3\n\t" \ + "ld 2,-16(12)\n\t" /* restore tocptr */ \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[2]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_WW(lval, orig, arg1,arg2) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[3+2]; \ + volatile unsigned long _res; \ + /* _argvec[0] holds current r2 across the call */ \ + _argvec[1] = (unsigned long)_orig.r2; \ + _argvec[2] = (unsigned long)_orig.nraddr; \ + _argvec[2+1] = (unsigned long)arg1; \ + _argvec[2+2] = (unsigned long)arg2; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 12,%1\n\t" \ + "std 2,-16(12)\n\t" /* save tocptr */ \ + "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ + "ld 3, 8(12)\n\t" /* arg1->r3 */ \ + "ld 4, 16(12)\n\t" /* arg2->r4 */ \ + "ld 12, 0(12)\n\t" /* target->r12 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ + "mr 12,%1\n\t" \ + "mr %0,3\n\t" \ + "ld 2,-16(12)\n\t" /* restore tocptr */ \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[2]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[3+3]; \ + volatile unsigned long _res; \ + /* _argvec[0] holds current r2 across the call */ \ + _argvec[1] = (unsigned long)_orig.r2; \ + _argvec[2] = (unsigned long)_orig.nraddr; \ + _argvec[2+1] = (unsigned long)arg1; \ + _argvec[2+2] = (unsigned long)arg2; \ + _argvec[2+3] = (unsigned long)arg3; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 12,%1\n\t" \ + "std 2,-16(12)\n\t" /* save tocptr */ \ + "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ + "ld 3, 8(12)\n\t" /* arg1->r3 */ \ + "ld 4, 16(12)\n\t" /* arg2->r4 */ \ + "ld 5, 24(12)\n\t" /* arg3->r5 */ \ + "ld 12, 0(12)\n\t" /* target->r12 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ + "mr 12,%1\n\t" \ + "mr %0,3\n\t" \ + "ld 2,-16(12)\n\t" /* restore tocptr */ \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[2]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[3+4]; \ + volatile unsigned long _res; \ + /* _argvec[0] holds current r2 across the call */ \ + _argvec[1] = (unsigned long)_orig.r2; \ + _argvec[2] = (unsigned long)_orig.nraddr; \ + _argvec[2+1] = (unsigned long)arg1; \ + _argvec[2+2] = (unsigned long)arg2; \ + _argvec[2+3] = (unsigned long)arg3; \ + _argvec[2+4] = (unsigned long)arg4; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 12,%1\n\t" \ + "std 2,-16(12)\n\t" /* save tocptr */ \ + "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ + "ld 3, 8(12)\n\t" /* arg1->r3 */ \ + "ld 4, 16(12)\n\t" /* arg2->r4 */ \ + "ld 5, 24(12)\n\t" /* arg3->r5 */ \ + "ld 6, 32(12)\n\t" /* arg4->r6 */ \ + "ld 12, 0(12)\n\t" /* target->r12 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ + "mr 12,%1\n\t" \ + "mr %0,3\n\t" \ + "ld 2,-16(12)\n\t" /* restore tocptr */ \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[2]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[3+5]; \ + volatile unsigned long _res; \ + /* _argvec[0] holds current r2 across the call */ \ + _argvec[1] = (unsigned long)_orig.r2; \ + _argvec[2] = (unsigned long)_orig.nraddr; \ + _argvec[2+1] = (unsigned long)arg1; \ + _argvec[2+2] = (unsigned long)arg2; \ + _argvec[2+3] = (unsigned long)arg3; \ + _argvec[2+4] = (unsigned long)arg4; \ + _argvec[2+5] = (unsigned long)arg5; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 12,%1\n\t" \ + "std 2,-16(12)\n\t" /* save tocptr */ \ + "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ + "ld 3, 8(12)\n\t" /* arg1->r3 */ \ + "ld 4, 16(12)\n\t" /* arg2->r4 */ \ + "ld 5, 24(12)\n\t" /* arg3->r5 */ \ + "ld 6, 32(12)\n\t" /* arg4->r6 */ \ + "ld 7, 40(12)\n\t" /* arg5->r7 */ \ + "ld 12, 0(12)\n\t" /* target->r12 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ + "mr 12,%1\n\t" \ + "mr %0,3\n\t" \ + "ld 2,-16(12)\n\t" /* restore tocptr */ \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[2]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[3+6]; \ + volatile unsigned long _res; \ + /* _argvec[0] holds current r2 across the call */ \ + _argvec[1] = (unsigned long)_orig.r2; \ + _argvec[2] = (unsigned long)_orig.nraddr; \ + _argvec[2+1] = (unsigned long)arg1; \ + _argvec[2+2] = (unsigned long)arg2; \ + _argvec[2+3] = (unsigned long)arg3; \ + _argvec[2+4] = (unsigned long)arg4; \ + _argvec[2+5] = (unsigned long)arg5; \ + _argvec[2+6] = (unsigned long)arg6; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 12,%1\n\t" \ + "std 2,-16(12)\n\t" /* save tocptr */ \ + "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ + "ld 3, 8(12)\n\t" /* arg1->r3 */ \ + "ld 4, 16(12)\n\t" /* arg2->r4 */ \ + "ld 5, 24(12)\n\t" /* arg3->r5 */ \ + "ld 6, 32(12)\n\t" /* arg4->r6 */ \ + "ld 7, 40(12)\n\t" /* arg5->r7 */ \ + "ld 8, 48(12)\n\t" /* arg6->r8 */ \ + "ld 12, 0(12)\n\t" /* target->r12 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ + "mr 12,%1\n\t" \ + "mr %0,3\n\t" \ + "ld 2,-16(12)\n\t" /* restore tocptr */ \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[2]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[3+7]; \ + volatile unsigned long _res; \ + /* _argvec[0] holds current r2 across the call */ \ + _argvec[1] = (unsigned long)_orig.r2; \ + _argvec[2] = (unsigned long)_orig.nraddr; \ + _argvec[2+1] = (unsigned long)arg1; \ + _argvec[2+2] = (unsigned long)arg2; \ + _argvec[2+3] = (unsigned long)arg3; \ + _argvec[2+4] = (unsigned long)arg4; \ + _argvec[2+5] = (unsigned long)arg5; \ + _argvec[2+6] = (unsigned long)arg6; \ + _argvec[2+7] = (unsigned long)arg7; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 12,%1\n\t" \ + "std 2,-16(12)\n\t" /* save tocptr */ \ + "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ + "ld 3, 8(12)\n\t" /* arg1->r3 */ \ + "ld 4, 16(12)\n\t" /* arg2->r4 */ \ + "ld 5, 24(12)\n\t" /* arg3->r5 */ \ + "ld 6, 32(12)\n\t" /* arg4->r6 */ \ + "ld 7, 40(12)\n\t" /* arg5->r7 */ \ + "ld 8, 48(12)\n\t" /* arg6->r8 */ \ + "ld 9, 56(12)\n\t" /* arg7->r9 */ \ + "ld 12, 0(12)\n\t" /* target->r12 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ + "mr 12,%1\n\t" \ + "mr %0,3\n\t" \ + "ld 2,-16(12)\n\t" /* restore tocptr */ \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[2]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[3+8]; \ + volatile unsigned long _res; \ + /* _argvec[0] holds current r2 across the call */ \ + _argvec[1] = (unsigned long)_orig.r2; \ + _argvec[2] = (unsigned long)_orig.nraddr; \ + _argvec[2+1] = (unsigned long)arg1; \ + _argvec[2+2] = (unsigned long)arg2; \ + _argvec[2+3] = (unsigned long)arg3; \ + _argvec[2+4] = (unsigned long)arg4; \ + _argvec[2+5] = (unsigned long)arg5; \ + _argvec[2+6] = (unsigned long)arg6; \ + _argvec[2+7] = (unsigned long)arg7; \ + _argvec[2+8] = (unsigned long)arg8; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 12,%1\n\t" \ + "std 2,-16(12)\n\t" /* save tocptr */ \ + "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ + "ld 3, 8(12)\n\t" /* arg1->r3 */ \ + "ld 4, 16(12)\n\t" /* arg2->r4 */ \ + "ld 5, 24(12)\n\t" /* arg3->r5 */ \ + "ld 6, 32(12)\n\t" /* arg4->r6 */ \ + "ld 7, 40(12)\n\t" /* arg5->r7 */ \ + "ld 8, 48(12)\n\t" /* arg6->r8 */ \ + "ld 9, 56(12)\n\t" /* arg7->r9 */ \ + "ld 10, 64(12)\n\t" /* arg8->r10 */ \ + "ld 12, 0(12)\n\t" /* target->r12 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ + "mr 12,%1\n\t" \ + "mr %0,3\n\t" \ + "ld 2,-16(12)\n\t" /* restore tocptr */ \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[2]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8,arg9) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[3+9]; \ + volatile unsigned long _res; \ + /* _argvec[0] holds current r2 across the call */ \ + _argvec[1] = (unsigned long)_orig.r2; \ + _argvec[2] = (unsigned long)_orig.nraddr; \ + _argvec[2+1] = (unsigned long)arg1; \ + _argvec[2+2] = (unsigned long)arg2; \ + _argvec[2+3] = (unsigned long)arg3; \ + _argvec[2+4] = (unsigned long)arg4; \ + _argvec[2+5] = (unsigned long)arg5; \ + _argvec[2+6] = (unsigned long)arg6; \ + _argvec[2+7] = (unsigned long)arg7; \ + _argvec[2+8] = (unsigned long)arg8; \ + _argvec[2+9] = (unsigned long)arg9; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 12,%1\n\t" \ + "std 2,-16(12)\n\t" /* save tocptr */ \ + "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ + "addi 1,1,-128\n\t" /* expand stack frame */ \ + /* arg9 */ \ + "ld 3,72(12)\n\t" \ + "std 3,96(1)\n\t" \ + /* args1-8 */ \ + "ld 3, 8(12)\n\t" /* arg1->r3 */ \ + "ld 4, 16(12)\n\t" /* arg2->r4 */ \ + "ld 5, 24(12)\n\t" /* arg3->r5 */ \ + "ld 6, 32(12)\n\t" /* arg4->r6 */ \ + "ld 7, 40(12)\n\t" /* arg5->r7 */ \ + "ld 8, 48(12)\n\t" /* arg6->r8 */ \ + "ld 9, 56(12)\n\t" /* arg7->r9 */ \ + "ld 10, 64(12)\n\t" /* arg8->r10 */ \ + "ld 12, 0(12)\n\t" /* target->r12 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ + "mr 12,%1\n\t" \ + "mr %0,3\n\t" \ + "ld 2,-16(12)\n\t" /* restore tocptr */ \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[2]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8,arg9,arg10) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[3+10]; \ + volatile unsigned long _res; \ + /* _argvec[0] holds current r2 across the call */ \ + _argvec[1] = (unsigned long)_orig.r2; \ + _argvec[2] = (unsigned long)_orig.nraddr; \ + _argvec[2+1] = (unsigned long)arg1; \ + _argvec[2+2] = (unsigned long)arg2; \ + _argvec[2+3] = (unsigned long)arg3; \ + _argvec[2+4] = (unsigned long)arg4; \ + _argvec[2+5] = (unsigned long)arg5; \ + _argvec[2+6] = (unsigned long)arg6; \ + _argvec[2+7] = (unsigned long)arg7; \ + _argvec[2+8] = (unsigned long)arg8; \ + _argvec[2+9] = (unsigned long)arg9; \ + _argvec[2+10] = (unsigned long)arg10; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 12,%1\n\t" \ + "std 2,-16(12)\n\t" /* save tocptr */ \ + "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ + "addi 1,1,-128\n\t" /* expand stack frame */ \ + /* arg10 */ \ + "ld 3,80(12)\n\t" \ + "std 3,104(1)\n\t" \ + /* arg9 */ \ + "ld 3,72(12)\n\t" \ + "std 3,96(1)\n\t" \ + /* args1-8 */ \ + "ld 3, 8(12)\n\t" /* arg1->r3 */ \ + "ld 4, 16(12)\n\t" /* arg2->r4 */ \ + "ld 5, 24(12)\n\t" /* arg3->r5 */ \ + "ld 6, 32(12)\n\t" /* arg4->r6 */ \ + "ld 7, 40(12)\n\t" /* arg5->r7 */ \ + "ld 8, 48(12)\n\t" /* arg6->r8 */ \ + "ld 9, 56(12)\n\t" /* arg7->r9 */ \ + "ld 10, 64(12)\n\t" /* arg8->r10 */ \ + "ld 12, 0(12)\n\t" /* target->r12 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ + "mr 12,%1\n\t" \ + "mr %0,3\n\t" \ + "ld 2,-16(12)\n\t" /* restore tocptr */ \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[2]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8,arg9,arg10,arg11) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[3+11]; \ + volatile unsigned long _res; \ + /* _argvec[0] holds current r2 across the call */ \ + _argvec[1] = (unsigned long)_orig.r2; \ + _argvec[2] = (unsigned long)_orig.nraddr; \ + _argvec[2+1] = (unsigned long)arg1; \ + _argvec[2+2] = (unsigned long)arg2; \ + _argvec[2+3] = (unsigned long)arg3; \ + _argvec[2+4] = (unsigned long)arg4; \ + _argvec[2+5] = (unsigned long)arg5; \ + _argvec[2+6] = (unsigned long)arg6; \ + _argvec[2+7] = (unsigned long)arg7; \ + _argvec[2+8] = (unsigned long)arg8; \ + _argvec[2+9] = (unsigned long)arg9; \ + _argvec[2+10] = (unsigned long)arg10; \ + _argvec[2+11] = (unsigned long)arg11; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 12,%1\n\t" \ + "std 2,-16(12)\n\t" /* save tocptr */ \ + "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ + "addi 1,1,-144\n\t" /* expand stack frame */ \ + /* arg11 */ \ + "ld 3,88(12)\n\t" \ + "std 3,112(1)\n\t" \ + /* arg10 */ \ + "ld 3,80(12)\n\t" \ + "std 3,104(1)\n\t" \ + /* arg9 */ \ + "ld 3,72(12)\n\t" \ + "std 3,96(1)\n\t" \ + /* args1-8 */ \ + "ld 3, 8(12)\n\t" /* arg1->r3 */ \ + "ld 4, 16(12)\n\t" /* arg2->r4 */ \ + "ld 5, 24(12)\n\t" /* arg3->r5 */ \ + "ld 6, 32(12)\n\t" /* arg4->r6 */ \ + "ld 7, 40(12)\n\t" /* arg5->r7 */ \ + "ld 8, 48(12)\n\t" /* arg6->r8 */ \ + "ld 9, 56(12)\n\t" /* arg7->r9 */ \ + "ld 10, 64(12)\n\t" /* arg8->r10 */ \ + "ld 12, 0(12)\n\t" /* target->r12 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ + "mr 12,%1\n\t" \ + "mr %0,3\n\t" \ + "ld 2,-16(12)\n\t" /* restore tocptr */ \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[2]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8,arg9,arg10,arg11,arg12) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[3+12]; \ + volatile unsigned long _res; \ + /* _argvec[0] holds current r2 across the call */ \ + _argvec[1] = (unsigned long)_orig.r2; \ + _argvec[2] = (unsigned long)_orig.nraddr; \ + _argvec[2+1] = (unsigned long)arg1; \ + _argvec[2+2] = (unsigned long)arg2; \ + _argvec[2+3] = (unsigned long)arg3; \ + _argvec[2+4] = (unsigned long)arg4; \ + _argvec[2+5] = (unsigned long)arg5; \ + _argvec[2+6] = (unsigned long)arg6; \ + _argvec[2+7] = (unsigned long)arg7; \ + _argvec[2+8] = (unsigned long)arg8; \ + _argvec[2+9] = (unsigned long)arg9; \ + _argvec[2+10] = (unsigned long)arg10; \ + _argvec[2+11] = (unsigned long)arg11; \ + _argvec[2+12] = (unsigned long)arg12; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "mr 12,%1\n\t" \ + "std 2,-16(12)\n\t" /* save tocptr */ \ + "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ + "addi 1,1,-144\n\t" /* expand stack frame */ \ + /* arg12 */ \ + "ld 3,96(12)\n\t" \ + "std 3,120(1)\n\t" \ + /* arg11 */ \ + "ld 3,88(12)\n\t" \ + "std 3,112(1)\n\t" \ + /* arg10 */ \ + "ld 3,80(12)\n\t" \ + "std 3,104(1)\n\t" \ + /* arg9 */ \ + "ld 3,72(12)\n\t" \ + "std 3,96(1)\n\t" \ + /* args1-8 */ \ + "ld 3, 8(12)\n\t" /* arg1->r3 */ \ + "ld 4, 16(12)\n\t" /* arg2->r4 */ \ + "ld 5, 24(12)\n\t" /* arg3->r5 */ \ + "ld 6, 32(12)\n\t" /* arg4->r6 */ \ + "ld 7, 40(12)\n\t" /* arg5->r7 */ \ + "ld 8, 48(12)\n\t" /* arg6->r8 */ \ + "ld 9, 56(12)\n\t" /* arg7->r9 */ \ + "ld 10, 64(12)\n\t" /* arg8->r10 */ \ + "ld 12, 0(12)\n\t" /* target->r12 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ + "mr 12,%1\n\t" \ + "mr %0,3\n\t" \ + "ld 2,-16(12)\n\t" /* restore tocptr */ \ + VALGRIND_RESTORE_STACK \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[2]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#endif /* PLAT_ppc64le_linux */ + +/* ------------------------- arm-linux ------------------------- */ + +#if defined(PLAT_arm_linux) + +/* These regs are trashed by the hidden call. */ +#define __CALLER_SAVED_REGS "r0", "r1", "r2", "r3","r4", "r12", "r14" + +/* Macros to save and align the stack before making a function + call and restore it afterwards as gcc may not keep the stack + pointer aligned if it doesn't realise calls are being made + to other functions. */ + +/* This is a bit tricky. We store the original stack pointer in r10 + as it is callee-saves. gcc doesn't allow the use of r11 for some + reason. Also, we can't directly "bic" the stack pointer in thumb + mode since r13 isn't an allowed register number in that context. + So use r4 as a temporary, since that is about to get trashed + anyway, just after each use of this macro. Side effect is we need + to be very careful about any future changes, since + VALGRIND_ALIGN_STACK simply assumes r4 is usable. */ +#define VALGRIND_ALIGN_STACK \ + "mov r10, sp\n\t" \ + "mov r4, sp\n\t" \ + "bic r4, r4, #7\n\t" \ + "mov sp, r4\n\t" +#define VALGRIND_RESTORE_STACK \ + "mov sp, r10\n\t" + +/* These CALL_FN_ macros assume that on arm-linux, sizeof(unsigned + long) == 4. */ + +#define CALL_FN_W_v(lval, orig) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[1]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "ldr r4, [%1] \n\t" /* target->r4 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ + VALGRIND_RESTORE_STACK \ + "mov %0, r0\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_W(lval, orig, arg1) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[2]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "ldr r0, [%1, #4] \n\t" \ + "ldr r4, [%1] \n\t" /* target->r4 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ + VALGRIND_RESTORE_STACK \ + "mov %0, r0\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_WW(lval, orig, arg1,arg2) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[3]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "ldr r0, [%1, #4] \n\t" \ + "ldr r1, [%1, #8] \n\t" \ + "ldr r4, [%1] \n\t" /* target->r4 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ + VALGRIND_RESTORE_STACK \ + "mov %0, r0\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[4]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "ldr r0, [%1, #4] \n\t" \ + "ldr r1, [%1, #8] \n\t" \ + "ldr r2, [%1, #12] \n\t" \ + "ldr r4, [%1] \n\t" /* target->r4 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ + VALGRIND_RESTORE_STACK \ + "mov %0, r0\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[5]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "ldr r0, [%1, #4] \n\t" \ + "ldr r1, [%1, #8] \n\t" \ + "ldr r2, [%1, #12] \n\t" \ + "ldr r3, [%1, #16] \n\t" \ + "ldr r4, [%1] \n\t" /* target->r4 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ + VALGRIND_RESTORE_STACK \ + "mov %0, r0" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[6]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "sub sp, sp, #4 \n\t" \ + "ldr r0, [%1, #20] \n\t" \ + "push {r0} \n\t" \ + "ldr r0, [%1, #4] \n\t" \ + "ldr r1, [%1, #8] \n\t" \ + "ldr r2, [%1, #12] \n\t" \ + "ldr r3, [%1, #16] \n\t" \ + "ldr r4, [%1] \n\t" /* target->r4 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ + VALGRIND_RESTORE_STACK \ + "mov %0, r0" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[7]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "ldr r0, [%1, #20] \n\t" \ + "ldr r1, [%1, #24] \n\t" \ + "push {r0, r1} \n\t" \ + "ldr r0, [%1, #4] \n\t" \ + "ldr r1, [%1, #8] \n\t" \ + "ldr r2, [%1, #12] \n\t" \ + "ldr r3, [%1, #16] \n\t" \ + "ldr r4, [%1] \n\t" /* target->r4 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ + VALGRIND_RESTORE_STACK \ + "mov %0, r0" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[8]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "sub sp, sp, #4 \n\t" \ + "ldr r0, [%1, #20] \n\t" \ + "ldr r1, [%1, #24] \n\t" \ + "ldr r2, [%1, #28] \n\t" \ + "push {r0, r1, r2} \n\t" \ + "ldr r0, [%1, #4] \n\t" \ + "ldr r1, [%1, #8] \n\t" \ + "ldr r2, [%1, #12] \n\t" \ + "ldr r3, [%1, #16] \n\t" \ + "ldr r4, [%1] \n\t" /* target->r4 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ + VALGRIND_RESTORE_STACK \ + "mov %0, r0" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[9]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + _argvec[8] = (unsigned long)(arg8); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "ldr r0, [%1, #20] \n\t" \ + "ldr r1, [%1, #24] \n\t" \ + "ldr r2, [%1, #28] \n\t" \ + "ldr r3, [%1, #32] \n\t" \ + "push {r0, r1, r2, r3} \n\t" \ + "ldr r0, [%1, #4] \n\t" \ + "ldr r1, [%1, #8] \n\t" \ + "ldr r2, [%1, #12] \n\t" \ + "ldr r3, [%1, #16] \n\t" \ + "ldr r4, [%1] \n\t" /* target->r4 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ + VALGRIND_RESTORE_STACK \ + "mov %0, r0" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8,arg9) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[10]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + _argvec[8] = (unsigned long)(arg8); \ + _argvec[9] = (unsigned long)(arg9); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "sub sp, sp, #4 \n\t" \ + "ldr r0, [%1, #20] \n\t" \ + "ldr r1, [%1, #24] \n\t" \ + "ldr r2, [%1, #28] \n\t" \ + "ldr r3, [%1, #32] \n\t" \ + "ldr r4, [%1, #36] \n\t" \ + "push {r0, r1, r2, r3, r4} \n\t" \ + "ldr r0, [%1, #4] \n\t" \ + "ldr r1, [%1, #8] \n\t" \ + "ldr r2, [%1, #12] \n\t" \ + "ldr r3, [%1, #16] \n\t" \ + "ldr r4, [%1] \n\t" /* target->r4 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ + VALGRIND_RESTORE_STACK \ + "mov %0, r0" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8,arg9,arg10) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[11]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + _argvec[8] = (unsigned long)(arg8); \ + _argvec[9] = (unsigned long)(arg9); \ + _argvec[10] = (unsigned long)(arg10); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "ldr r0, [%1, #40] \n\t" \ + "push {r0} \n\t" \ + "ldr r0, [%1, #20] \n\t" \ + "ldr r1, [%1, #24] \n\t" \ + "ldr r2, [%1, #28] \n\t" \ + "ldr r3, [%1, #32] \n\t" \ + "ldr r4, [%1, #36] \n\t" \ + "push {r0, r1, r2, r3, r4} \n\t" \ + "ldr r0, [%1, #4] \n\t" \ + "ldr r1, [%1, #8] \n\t" \ + "ldr r2, [%1, #12] \n\t" \ + "ldr r3, [%1, #16] \n\t" \ + "ldr r4, [%1] \n\t" /* target->r4 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ + VALGRIND_RESTORE_STACK \ + "mov %0, r0" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5, \ + arg6,arg7,arg8,arg9,arg10, \ + arg11) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[12]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + _argvec[8] = (unsigned long)(arg8); \ + _argvec[9] = (unsigned long)(arg9); \ + _argvec[10] = (unsigned long)(arg10); \ + _argvec[11] = (unsigned long)(arg11); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "sub sp, sp, #4 \n\t" \ + "ldr r0, [%1, #40] \n\t" \ + "ldr r1, [%1, #44] \n\t" \ + "push {r0, r1} \n\t" \ + "ldr r0, [%1, #20] \n\t" \ + "ldr r1, [%1, #24] \n\t" \ + "ldr r2, [%1, #28] \n\t" \ + "ldr r3, [%1, #32] \n\t" \ + "ldr r4, [%1, #36] \n\t" \ + "push {r0, r1, r2, r3, r4} \n\t" \ + "ldr r0, [%1, #4] \n\t" \ + "ldr r1, [%1, #8] \n\t" \ + "ldr r2, [%1, #12] \n\t" \ + "ldr r3, [%1, #16] \n\t" \ + "ldr r4, [%1] \n\t" /* target->r4 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ + VALGRIND_RESTORE_STACK \ + "mov %0, r0" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5, \ + arg6,arg7,arg8,arg9,arg10, \ + arg11,arg12) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[13]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + _argvec[8] = (unsigned long)(arg8); \ + _argvec[9] = (unsigned long)(arg9); \ + _argvec[10] = (unsigned long)(arg10); \ + _argvec[11] = (unsigned long)(arg11); \ + _argvec[12] = (unsigned long)(arg12); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "ldr r0, [%1, #40] \n\t" \ + "ldr r1, [%1, #44] \n\t" \ + "ldr r2, [%1, #48] \n\t" \ + "push {r0, r1, r2} \n\t" \ + "ldr r0, [%1, #20] \n\t" \ + "ldr r1, [%1, #24] \n\t" \ + "ldr r2, [%1, #28] \n\t" \ + "ldr r3, [%1, #32] \n\t" \ + "ldr r4, [%1, #36] \n\t" \ + "push {r0, r1, r2, r3, r4} \n\t" \ + "ldr r0, [%1, #4] \n\t" \ + "ldr r1, [%1, #8] \n\t" \ + "ldr r2, [%1, #12] \n\t" \ + "ldr r3, [%1, #16] \n\t" \ + "ldr r4, [%1] \n\t" /* target->r4 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ + VALGRIND_RESTORE_STACK \ + "mov %0, r0" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#endif /* PLAT_arm_linux */ + +/* ------------------------ arm64-linux ------------------------ */ + +#if defined(PLAT_arm64_linux) + +/* These regs are trashed by the hidden call. */ +#define __CALLER_SAVED_REGS \ + "x0", "x1", "x2", "x3","x4", "x5", "x6", "x7", "x8", "x9", \ + "x10", "x11", "x12", "x13", "x14", "x15", "x16", "x17", \ + "x18", "x19", "x20", "x30", \ + "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v8", "v9", \ + "v10", "v11", "v12", "v13", "v14", "v15", "v16", "v17", \ + "v18", "v19", "v20", "v21", "v22", "v23", "v24", "v25", \ + "v26", "v27", "v28", "v29", "v30", "v31" + +/* x21 is callee-saved, so we can use it to save and restore SP around + the hidden call. */ +#define VALGRIND_ALIGN_STACK \ + "mov x21, sp\n\t" \ + "bic sp, x21, #15\n\t" +#define VALGRIND_RESTORE_STACK \ + "mov sp, x21\n\t" + +/* These CALL_FN_ macros assume that on arm64-linux, + sizeof(unsigned long) == 8. */ + +#define CALL_FN_W_v(lval, orig) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[1]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "ldr x8, [%1] \n\t" /* target->x8 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ + VALGRIND_RESTORE_STACK \ + "mov %0, x0\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_W(lval, orig, arg1) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[2]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "ldr x0, [%1, #8] \n\t" \ + "ldr x8, [%1] \n\t" /* target->x8 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ + VALGRIND_RESTORE_STACK \ + "mov %0, x0\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_WW(lval, orig, arg1,arg2) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[3]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "ldr x0, [%1, #8] \n\t" \ + "ldr x1, [%1, #16] \n\t" \ + "ldr x8, [%1] \n\t" /* target->x8 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ + VALGRIND_RESTORE_STACK \ + "mov %0, x0\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[4]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "ldr x0, [%1, #8] \n\t" \ + "ldr x1, [%1, #16] \n\t" \ + "ldr x2, [%1, #24] \n\t" \ + "ldr x8, [%1] \n\t" /* target->x8 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ + VALGRIND_RESTORE_STACK \ + "mov %0, x0\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[5]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "ldr x0, [%1, #8] \n\t" \ + "ldr x1, [%1, #16] \n\t" \ + "ldr x2, [%1, #24] \n\t" \ + "ldr x3, [%1, #32] \n\t" \ + "ldr x8, [%1] \n\t" /* target->x8 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ + VALGRIND_RESTORE_STACK \ + "mov %0, x0" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[6]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "ldr x0, [%1, #8] \n\t" \ + "ldr x1, [%1, #16] \n\t" \ + "ldr x2, [%1, #24] \n\t" \ + "ldr x3, [%1, #32] \n\t" \ + "ldr x4, [%1, #40] \n\t" \ + "ldr x8, [%1] \n\t" /* target->x8 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ + VALGRIND_RESTORE_STACK \ + "mov %0, x0" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[7]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "ldr x0, [%1, #8] \n\t" \ + "ldr x1, [%1, #16] \n\t" \ + "ldr x2, [%1, #24] \n\t" \ + "ldr x3, [%1, #32] \n\t" \ + "ldr x4, [%1, #40] \n\t" \ + "ldr x5, [%1, #48] \n\t" \ + "ldr x8, [%1] \n\t" /* target->x8 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ + VALGRIND_RESTORE_STACK \ + "mov %0, x0" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[8]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "ldr x0, [%1, #8] \n\t" \ + "ldr x1, [%1, #16] \n\t" \ + "ldr x2, [%1, #24] \n\t" \ + "ldr x3, [%1, #32] \n\t" \ + "ldr x4, [%1, #40] \n\t" \ + "ldr x5, [%1, #48] \n\t" \ + "ldr x6, [%1, #56] \n\t" \ + "ldr x8, [%1] \n\t" /* target->x8 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ + VALGRIND_RESTORE_STACK \ + "mov %0, x0" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[9]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + _argvec[8] = (unsigned long)(arg8); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "ldr x0, [%1, #8] \n\t" \ + "ldr x1, [%1, #16] \n\t" \ + "ldr x2, [%1, #24] \n\t" \ + "ldr x3, [%1, #32] \n\t" \ + "ldr x4, [%1, #40] \n\t" \ + "ldr x5, [%1, #48] \n\t" \ + "ldr x6, [%1, #56] \n\t" \ + "ldr x7, [%1, #64] \n\t" \ + "ldr x8, [%1] \n\t" /* target->x8 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ + VALGRIND_RESTORE_STACK \ + "mov %0, x0" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8,arg9) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[10]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + _argvec[8] = (unsigned long)(arg8); \ + _argvec[9] = (unsigned long)(arg9); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "sub sp, sp, #0x20 \n\t" \ + "ldr x0, [%1, #8] \n\t" \ + "ldr x1, [%1, #16] \n\t" \ + "ldr x2, [%1, #24] \n\t" \ + "ldr x3, [%1, #32] \n\t" \ + "ldr x4, [%1, #40] \n\t" \ + "ldr x5, [%1, #48] \n\t" \ + "ldr x6, [%1, #56] \n\t" \ + "ldr x7, [%1, #64] \n\t" \ + "ldr x8, [%1, #72] \n\t" \ + "str x8, [sp, #0] \n\t" \ + "ldr x8, [%1] \n\t" /* target->x8 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ + VALGRIND_RESTORE_STACK \ + "mov %0, x0" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8,arg9,arg10) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[11]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + _argvec[8] = (unsigned long)(arg8); \ + _argvec[9] = (unsigned long)(arg9); \ + _argvec[10] = (unsigned long)(arg10); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "sub sp, sp, #0x20 \n\t" \ + "ldr x0, [%1, #8] \n\t" \ + "ldr x1, [%1, #16] \n\t" \ + "ldr x2, [%1, #24] \n\t" \ + "ldr x3, [%1, #32] \n\t" \ + "ldr x4, [%1, #40] \n\t" \ + "ldr x5, [%1, #48] \n\t" \ + "ldr x6, [%1, #56] \n\t" \ + "ldr x7, [%1, #64] \n\t" \ + "ldr x8, [%1, #72] \n\t" \ + "str x8, [sp, #0] \n\t" \ + "ldr x8, [%1, #80] \n\t" \ + "str x8, [sp, #8] \n\t" \ + "ldr x8, [%1] \n\t" /* target->x8 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ + VALGRIND_RESTORE_STACK \ + "mov %0, x0" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8,arg9,arg10,arg11) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[12]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + _argvec[8] = (unsigned long)(arg8); \ + _argvec[9] = (unsigned long)(arg9); \ + _argvec[10] = (unsigned long)(arg10); \ + _argvec[11] = (unsigned long)(arg11); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "sub sp, sp, #0x30 \n\t" \ + "ldr x0, [%1, #8] \n\t" \ + "ldr x1, [%1, #16] \n\t" \ + "ldr x2, [%1, #24] \n\t" \ + "ldr x3, [%1, #32] \n\t" \ + "ldr x4, [%1, #40] \n\t" \ + "ldr x5, [%1, #48] \n\t" \ + "ldr x6, [%1, #56] \n\t" \ + "ldr x7, [%1, #64] \n\t" \ + "ldr x8, [%1, #72] \n\t" \ + "str x8, [sp, #0] \n\t" \ + "ldr x8, [%1, #80] \n\t" \ + "str x8, [sp, #8] \n\t" \ + "ldr x8, [%1, #88] \n\t" \ + "str x8, [sp, #16] \n\t" \ + "ldr x8, [%1] \n\t" /* target->x8 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ + VALGRIND_RESTORE_STACK \ + "mov %0, x0" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8,arg9,arg10,arg11, \ + arg12) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[13]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + _argvec[8] = (unsigned long)(arg8); \ + _argvec[9] = (unsigned long)(arg9); \ + _argvec[10] = (unsigned long)(arg10); \ + _argvec[11] = (unsigned long)(arg11); \ + _argvec[12] = (unsigned long)(arg12); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ + "sub sp, sp, #0x30 \n\t" \ + "ldr x0, [%1, #8] \n\t" \ + "ldr x1, [%1, #16] \n\t" \ + "ldr x2, [%1, #24] \n\t" \ + "ldr x3, [%1, #32] \n\t" \ + "ldr x4, [%1, #40] \n\t" \ + "ldr x5, [%1, #48] \n\t" \ + "ldr x6, [%1, #56] \n\t" \ + "ldr x7, [%1, #64] \n\t" \ + "ldr x8, [%1, #72] \n\t" \ + "str x8, [sp, #0] \n\t" \ + "ldr x8, [%1, #80] \n\t" \ + "str x8, [sp, #8] \n\t" \ + "ldr x8, [%1, #88] \n\t" \ + "str x8, [sp, #16] \n\t" \ + "ldr x8, [%1, #96] \n\t" \ + "str x8, [sp, #24] \n\t" \ + "ldr x8, [%1] \n\t" /* target->x8 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ + VALGRIND_RESTORE_STACK \ + "mov %0, x0" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#endif /* PLAT_arm64_linux */ + +/* ------------------------- s390x-linux ------------------------- */ + +#if defined(PLAT_s390x_linux) + +/* Similar workaround as amd64 (see above), but we use r11 as frame + pointer and save the old r11 in r7. r11 might be used for + argvec, therefore we copy argvec in r1 since r1 is clobbered + after the call anyway. */ +#if defined(__GNUC__) && defined(__GCC_HAVE_DWARF2_CFI_ASM) +# define __FRAME_POINTER \ + ,"d"(__builtin_dwarf_cfa()) +# define VALGRIND_CFI_PROLOGUE \ + ".cfi_remember_state\n\t" \ + "lgr 1,%1\n\t" /* copy the argvec pointer in r1 */ \ + "lgr 7,11\n\t" \ + "lgr 11,%2\n\t" \ + ".cfi_def_cfa r11, 0\n\t" +# define VALGRIND_CFI_EPILOGUE \ + "lgr 11, 7\n\t" \ + ".cfi_restore_state\n\t" +#else +# define __FRAME_POINTER +# define VALGRIND_CFI_PROLOGUE \ + "lgr 1,%1\n\t" +# define VALGRIND_CFI_EPILOGUE +#endif + +/* Nb: On s390 the stack pointer is properly aligned *at all times* + according to the s390 GCC maintainer. (The ABI specification is not + precise in this regard.) Therefore, VALGRIND_ALIGN_STACK and + VALGRIND_RESTORE_STACK are not defined here. */ + +/* These regs are trashed by the hidden call. Note that we overwrite + r14 in s390_irgen_noredir (VEX/priv/guest_s390_irgen.c) to give the + function a proper return address. All others are ABI defined call + clobbers. */ +#if defined(__VX__) || defined(__S390_VX__) +#define __CALLER_SAVED_REGS "0", "1", "2", "3", "4", "5", "14", \ + "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", \ + "v8", "v9", "v10", "v11", "v12", "v13", "v14", "v15", \ + "v16", "v17", "v18", "v19", "v20", "v21", "v22", "v23", \ + "v24", "v25", "v26", "v27", "v28", "v29", "v30", "v31" +#else +#define __CALLER_SAVED_REGS "0", "1", "2", "3", "4", "5", "14", \ + "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7" +#endif + +/* Nb: Although r11 is modified in the asm snippets below (inside + VALGRIND_CFI_PROLOGUE) it is not listed in the clobber section, for + two reasons: + (1) r11 is restored in VALGRIND_CFI_EPILOGUE, so effectively it is not + modified + (2) GCC will complain that r11 cannot appear inside a clobber section, + when compiled with -O -fno-omit-frame-pointer + */ + +#define CALL_FN_W_v(lval, orig) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[1]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + __asm__ volatile( \ + VALGRIND_CFI_PROLOGUE \ + "aghi 15,-160\n\t" \ + "lg 1, 0(1)\n\t" /* target->r1 */ \ + VALGRIND_CALL_NOREDIR_R1 \ + "aghi 15,160\n\t" \ + VALGRIND_CFI_EPILOGUE \ + "lgr %0, 2\n\t" \ + : /*out*/ "=d" (_res) \ + : /*in*/ "d" (&_argvec[0]) __FRAME_POINTER \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"7" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +/* The call abi has the arguments in r2-r6 and stack */ +#define CALL_FN_W_W(lval, orig, arg1) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[2]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)arg1; \ + __asm__ volatile( \ + VALGRIND_CFI_PROLOGUE \ + "aghi 15,-160\n\t" \ + "lg 2, 8(1)\n\t" \ + "lg 1, 0(1)\n\t" \ + VALGRIND_CALL_NOREDIR_R1 \ + "aghi 15,160\n\t" \ + VALGRIND_CFI_EPILOGUE \ + "lgr %0, 2\n\t" \ + : /*out*/ "=d" (_res) \ + : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"7" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_WW(lval, orig, arg1, arg2) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[3]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)arg1; \ + _argvec[2] = (unsigned long)arg2; \ + __asm__ volatile( \ + VALGRIND_CFI_PROLOGUE \ + "aghi 15,-160\n\t" \ + "lg 2, 8(1)\n\t" \ + "lg 3,16(1)\n\t" \ + "lg 1, 0(1)\n\t" \ + VALGRIND_CALL_NOREDIR_R1 \ + "aghi 15,160\n\t" \ + VALGRIND_CFI_EPILOGUE \ + "lgr %0, 2\n\t" \ + : /*out*/ "=d" (_res) \ + : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"7" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_WWW(lval, orig, arg1, arg2, arg3) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[4]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)arg1; \ + _argvec[2] = (unsigned long)arg2; \ + _argvec[3] = (unsigned long)arg3; \ + __asm__ volatile( \ + VALGRIND_CFI_PROLOGUE \ + "aghi 15,-160\n\t" \ + "lg 2, 8(1)\n\t" \ + "lg 3,16(1)\n\t" \ + "lg 4,24(1)\n\t" \ + "lg 1, 0(1)\n\t" \ + VALGRIND_CALL_NOREDIR_R1 \ + "aghi 15,160\n\t" \ + VALGRIND_CFI_EPILOGUE \ + "lgr %0, 2\n\t" \ + : /*out*/ "=d" (_res) \ + : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"7" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_WWWW(lval, orig, arg1, arg2, arg3, arg4) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[5]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)arg1; \ + _argvec[2] = (unsigned long)arg2; \ + _argvec[3] = (unsigned long)arg3; \ + _argvec[4] = (unsigned long)arg4; \ + __asm__ volatile( \ + VALGRIND_CFI_PROLOGUE \ + "aghi 15,-160\n\t" \ + "lg 2, 8(1)\n\t" \ + "lg 3,16(1)\n\t" \ + "lg 4,24(1)\n\t" \ + "lg 5,32(1)\n\t" \ + "lg 1, 0(1)\n\t" \ + VALGRIND_CALL_NOREDIR_R1 \ + "aghi 15,160\n\t" \ + VALGRIND_CFI_EPILOGUE \ + "lgr %0, 2\n\t" \ + : /*out*/ "=d" (_res) \ + : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"7" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_5W(lval, orig, arg1, arg2, arg3, arg4, arg5) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[6]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)arg1; \ + _argvec[2] = (unsigned long)arg2; \ + _argvec[3] = (unsigned long)arg3; \ + _argvec[4] = (unsigned long)arg4; \ + _argvec[5] = (unsigned long)arg5; \ + __asm__ volatile( \ + VALGRIND_CFI_PROLOGUE \ + "aghi 15,-160\n\t" \ + "lg 2, 8(1)\n\t" \ + "lg 3,16(1)\n\t" \ + "lg 4,24(1)\n\t" \ + "lg 5,32(1)\n\t" \ + "lg 6,40(1)\n\t" \ + "lg 1, 0(1)\n\t" \ + VALGRIND_CALL_NOREDIR_R1 \ + "aghi 15,160\n\t" \ + VALGRIND_CFI_EPILOGUE \ + "lgr %0, 2\n\t" \ + : /*out*/ "=d" (_res) \ + : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"6","7" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_6W(lval, orig, arg1, arg2, arg3, arg4, arg5, \ + arg6) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[7]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)arg1; \ + _argvec[2] = (unsigned long)arg2; \ + _argvec[3] = (unsigned long)arg3; \ + _argvec[4] = (unsigned long)arg4; \ + _argvec[5] = (unsigned long)arg5; \ + _argvec[6] = (unsigned long)arg6; \ + __asm__ volatile( \ + VALGRIND_CFI_PROLOGUE \ + "aghi 15,-168\n\t" \ + "lg 2, 8(1)\n\t" \ + "lg 3,16(1)\n\t" \ + "lg 4,24(1)\n\t" \ + "lg 5,32(1)\n\t" \ + "lg 6,40(1)\n\t" \ + "mvc 160(8,15), 48(1)\n\t" \ + "lg 1, 0(1)\n\t" \ + VALGRIND_CALL_NOREDIR_R1 \ + "aghi 15,168\n\t" \ + VALGRIND_CFI_EPILOGUE \ + "lgr %0, 2\n\t" \ + : /*out*/ "=d" (_res) \ + : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"6","7" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_7W(lval, orig, arg1, arg2, arg3, arg4, arg5, \ + arg6, arg7) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[8]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)arg1; \ + _argvec[2] = (unsigned long)arg2; \ + _argvec[3] = (unsigned long)arg3; \ + _argvec[4] = (unsigned long)arg4; \ + _argvec[5] = (unsigned long)arg5; \ + _argvec[6] = (unsigned long)arg6; \ + _argvec[7] = (unsigned long)arg7; \ + __asm__ volatile( \ + VALGRIND_CFI_PROLOGUE \ + "aghi 15,-176\n\t" \ + "lg 2, 8(1)\n\t" \ + "lg 3,16(1)\n\t" \ + "lg 4,24(1)\n\t" \ + "lg 5,32(1)\n\t" \ + "lg 6,40(1)\n\t" \ + "mvc 160(8,15), 48(1)\n\t" \ + "mvc 168(8,15), 56(1)\n\t" \ + "lg 1, 0(1)\n\t" \ + VALGRIND_CALL_NOREDIR_R1 \ + "aghi 15,176\n\t" \ + VALGRIND_CFI_EPILOGUE \ + "lgr %0, 2\n\t" \ + : /*out*/ "=d" (_res) \ + : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"6","7" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_8W(lval, orig, arg1, arg2, arg3, arg4, arg5, \ + arg6, arg7 ,arg8) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[9]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)arg1; \ + _argvec[2] = (unsigned long)arg2; \ + _argvec[3] = (unsigned long)arg3; \ + _argvec[4] = (unsigned long)arg4; \ + _argvec[5] = (unsigned long)arg5; \ + _argvec[6] = (unsigned long)arg6; \ + _argvec[7] = (unsigned long)arg7; \ + _argvec[8] = (unsigned long)arg8; \ + __asm__ volatile( \ + VALGRIND_CFI_PROLOGUE \ + "aghi 15,-184\n\t" \ + "lg 2, 8(1)\n\t" \ + "lg 3,16(1)\n\t" \ + "lg 4,24(1)\n\t" \ + "lg 5,32(1)\n\t" \ + "lg 6,40(1)\n\t" \ + "mvc 160(8,15), 48(1)\n\t" \ + "mvc 168(8,15), 56(1)\n\t" \ + "mvc 176(8,15), 64(1)\n\t" \ + "lg 1, 0(1)\n\t" \ + VALGRIND_CALL_NOREDIR_R1 \ + "aghi 15,184\n\t" \ + VALGRIND_CFI_EPILOGUE \ + "lgr %0, 2\n\t" \ + : /*out*/ "=d" (_res) \ + : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"6","7" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_9W(lval, orig, arg1, arg2, arg3, arg4, arg5, \ + arg6, arg7 ,arg8, arg9) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[10]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)arg1; \ + _argvec[2] = (unsigned long)arg2; \ + _argvec[3] = (unsigned long)arg3; \ + _argvec[4] = (unsigned long)arg4; \ + _argvec[5] = (unsigned long)arg5; \ + _argvec[6] = (unsigned long)arg6; \ + _argvec[7] = (unsigned long)arg7; \ + _argvec[8] = (unsigned long)arg8; \ + _argvec[9] = (unsigned long)arg9; \ + __asm__ volatile( \ + VALGRIND_CFI_PROLOGUE \ + "aghi 15,-192\n\t" \ + "lg 2, 8(1)\n\t" \ + "lg 3,16(1)\n\t" \ + "lg 4,24(1)\n\t" \ + "lg 5,32(1)\n\t" \ + "lg 6,40(1)\n\t" \ + "mvc 160(8,15), 48(1)\n\t" \ + "mvc 168(8,15), 56(1)\n\t" \ + "mvc 176(8,15), 64(1)\n\t" \ + "mvc 184(8,15), 72(1)\n\t" \ + "lg 1, 0(1)\n\t" \ + VALGRIND_CALL_NOREDIR_R1 \ + "aghi 15,192\n\t" \ + VALGRIND_CFI_EPILOGUE \ + "lgr %0, 2\n\t" \ + : /*out*/ "=d" (_res) \ + : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"6","7" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_10W(lval, orig, arg1, arg2, arg3, arg4, arg5, \ + arg6, arg7 ,arg8, arg9, arg10) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[11]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)arg1; \ + _argvec[2] = (unsigned long)arg2; \ + _argvec[3] = (unsigned long)arg3; \ + _argvec[4] = (unsigned long)arg4; \ + _argvec[5] = (unsigned long)arg5; \ + _argvec[6] = (unsigned long)arg6; \ + _argvec[7] = (unsigned long)arg7; \ + _argvec[8] = (unsigned long)arg8; \ + _argvec[9] = (unsigned long)arg9; \ + _argvec[10] = (unsigned long)arg10; \ + __asm__ volatile( \ + VALGRIND_CFI_PROLOGUE \ + "aghi 15,-200\n\t" \ + "lg 2, 8(1)\n\t" \ + "lg 3,16(1)\n\t" \ + "lg 4,24(1)\n\t" \ + "lg 5,32(1)\n\t" \ + "lg 6,40(1)\n\t" \ + "mvc 160(8,15), 48(1)\n\t" \ + "mvc 168(8,15), 56(1)\n\t" \ + "mvc 176(8,15), 64(1)\n\t" \ + "mvc 184(8,15), 72(1)\n\t" \ + "mvc 192(8,15), 80(1)\n\t" \ + "lg 1, 0(1)\n\t" \ + VALGRIND_CALL_NOREDIR_R1 \ + "aghi 15,200\n\t" \ + VALGRIND_CFI_EPILOGUE \ + "lgr %0, 2\n\t" \ + : /*out*/ "=d" (_res) \ + : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"6","7" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_11W(lval, orig, arg1, arg2, arg3, arg4, arg5, \ + arg6, arg7 ,arg8, arg9, arg10, arg11) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[12]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)arg1; \ + _argvec[2] = (unsigned long)arg2; \ + _argvec[3] = (unsigned long)arg3; \ + _argvec[4] = (unsigned long)arg4; \ + _argvec[5] = (unsigned long)arg5; \ + _argvec[6] = (unsigned long)arg6; \ + _argvec[7] = (unsigned long)arg7; \ + _argvec[8] = (unsigned long)arg8; \ + _argvec[9] = (unsigned long)arg9; \ + _argvec[10] = (unsigned long)arg10; \ + _argvec[11] = (unsigned long)arg11; \ + __asm__ volatile( \ + VALGRIND_CFI_PROLOGUE \ + "aghi 15,-208\n\t" \ + "lg 2, 8(1)\n\t" \ + "lg 3,16(1)\n\t" \ + "lg 4,24(1)\n\t" \ + "lg 5,32(1)\n\t" \ + "lg 6,40(1)\n\t" \ + "mvc 160(8,15), 48(1)\n\t" \ + "mvc 168(8,15), 56(1)\n\t" \ + "mvc 176(8,15), 64(1)\n\t" \ + "mvc 184(8,15), 72(1)\n\t" \ + "mvc 192(8,15), 80(1)\n\t" \ + "mvc 200(8,15), 88(1)\n\t" \ + "lg 1, 0(1)\n\t" \ + VALGRIND_CALL_NOREDIR_R1 \ + "aghi 15,208\n\t" \ + VALGRIND_CFI_EPILOGUE \ + "lgr %0, 2\n\t" \ + : /*out*/ "=d" (_res) \ + : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"6","7" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_12W(lval, orig, arg1, arg2, arg3, arg4, arg5, \ + arg6, arg7 ,arg8, arg9, arg10, arg11, arg12)\ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[13]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)arg1; \ + _argvec[2] = (unsigned long)arg2; \ + _argvec[3] = (unsigned long)arg3; \ + _argvec[4] = (unsigned long)arg4; \ + _argvec[5] = (unsigned long)arg5; \ + _argvec[6] = (unsigned long)arg6; \ + _argvec[7] = (unsigned long)arg7; \ + _argvec[8] = (unsigned long)arg8; \ + _argvec[9] = (unsigned long)arg9; \ + _argvec[10] = (unsigned long)arg10; \ + _argvec[11] = (unsigned long)arg11; \ + _argvec[12] = (unsigned long)arg12; \ + __asm__ volatile( \ + VALGRIND_CFI_PROLOGUE \ + "aghi 15,-216\n\t" \ + "lg 2, 8(1)\n\t" \ + "lg 3,16(1)\n\t" \ + "lg 4,24(1)\n\t" \ + "lg 5,32(1)\n\t" \ + "lg 6,40(1)\n\t" \ + "mvc 160(8,15), 48(1)\n\t" \ + "mvc 168(8,15), 56(1)\n\t" \ + "mvc 176(8,15), 64(1)\n\t" \ + "mvc 184(8,15), 72(1)\n\t" \ + "mvc 192(8,15), 80(1)\n\t" \ + "mvc 200(8,15), 88(1)\n\t" \ + "mvc 208(8,15), 96(1)\n\t" \ + "lg 1, 0(1)\n\t" \ + VALGRIND_CALL_NOREDIR_R1 \ + "aghi 15,216\n\t" \ + VALGRIND_CFI_EPILOGUE \ + "lgr %0, 2\n\t" \ + : /*out*/ "=d" (_res) \ + : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"6","7" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + + +#endif /* PLAT_s390x_linux */ + +/* ------------------------- mips32-linux ----------------------- */ + +#if defined(PLAT_mips32_linux) + +/* These regs are trashed by the hidden call. */ +#define __CALLER_SAVED_REGS "$2", "$3", "$4", "$5", "$6", \ +"$7", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ +"$25", "$31" + +/* These CALL_FN_ macros assume that on mips-linux, sizeof(unsigned + long) == 4. */ + +#define CALL_FN_W_v(lval, orig) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[1]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + __asm__ volatile( \ + "subu $29, $29, 8 \n\t" \ + "sw $28, 0($29) \n\t" \ + "sw $31, 4($29) \n\t" \ + "subu $29, $29, 16 \n\t" \ + "lw $25, 0(%1) \n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ + "addu $29, $29, 16\n\t" \ + "lw $28, 0($29) \n\t" \ + "lw $31, 4($29) \n\t" \ + "addu $29, $29, 8 \n\t" \ + "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_W(lval, orig, arg1) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[2]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + __asm__ volatile( \ + "subu $29, $29, 8 \n\t" \ + "sw $28, 0($29) \n\t" \ + "sw $31, 4($29) \n\t" \ + "subu $29, $29, 16 \n\t" \ + "lw $4, 4(%1) \n\t" /* arg1*/ \ + "lw $25, 0(%1) \n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ + "addu $29, $29, 16 \n\t" \ + "lw $28, 0($29) \n\t" \ + "lw $31, 4($29) \n\t" \ + "addu $29, $29, 8 \n\t" \ + "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_WW(lval, orig, arg1,arg2) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[3]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + __asm__ volatile( \ + "subu $29, $29, 8 \n\t" \ + "sw $28, 0($29) \n\t" \ + "sw $31, 4($29) \n\t" \ + "subu $29, $29, 16 \n\t" \ + "lw $4, 4(%1) \n\t" \ + "lw $5, 8(%1) \n\t" \ + "lw $25, 0(%1) \n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ + "addu $29, $29, 16 \n\t" \ + "lw $28, 0($29) \n\t" \ + "lw $31, 4($29) \n\t" \ + "addu $29, $29, 8 \n\t" \ + "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[4]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + __asm__ volatile( \ + "subu $29, $29, 8 \n\t" \ + "sw $28, 0($29) \n\t" \ + "sw $31, 4($29) \n\t" \ + "subu $29, $29, 16 \n\t" \ + "lw $4, 4(%1) \n\t" \ + "lw $5, 8(%1) \n\t" \ + "lw $6, 12(%1) \n\t" \ + "lw $25, 0(%1) \n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ + "addu $29, $29, 16 \n\t" \ + "lw $28, 0($29) \n\t" \ + "lw $31, 4($29) \n\t" \ + "addu $29, $29, 8 \n\t" \ + "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[5]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + __asm__ volatile( \ + "subu $29, $29, 8 \n\t" \ + "sw $28, 0($29) \n\t" \ + "sw $31, 4($29) \n\t" \ + "subu $29, $29, 16 \n\t" \ + "lw $4, 4(%1) \n\t" \ + "lw $5, 8(%1) \n\t" \ + "lw $6, 12(%1) \n\t" \ + "lw $7, 16(%1) \n\t" \ + "lw $25, 0(%1) \n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ + "addu $29, $29, 16 \n\t" \ + "lw $28, 0($29) \n\t" \ + "lw $31, 4($29) \n\t" \ + "addu $29, $29, 8 \n\t" \ + "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[6]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + __asm__ volatile( \ + "subu $29, $29, 8 \n\t" \ + "sw $28, 0($29) \n\t" \ + "sw $31, 4($29) \n\t" \ + "lw $4, 20(%1) \n\t" \ + "subu $29, $29, 24\n\t" \ + "sw $4, 16($29) \n\t" \ + "lw $4, 4(%1) \n\t" \ + "lw $5, 8(%1) \n\t" \ + "lw $6, 12(%1) \n\t" \ + "lw $7, 16(%1) \n\t" \ + "lw $25, 0(%1) \n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ + "addu $29, $29, 24 \n\t" \ + "lw $28, 0($29) \n\t" \ + "lw $31, 4($29) \n\t" \ + "addu $29, $29, 8 \n\t" \ + "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) +#define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[7]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + __asm__ volatile( \ + "subu $29, $29, 8 \n\t" \ + "sw $28, 0($29) \n\t" \ + "sw $31, 4($29) \n\t" \ + "lw $4, 20(%1) \n\t" \ + "subu $29, $29, 32\n\t" \ + "sw $4, 16($29) \n\t" \ + "lw $4, 24(%1) \n\t" \ + "nop\n\t" \ + "sw $4, 20($29) \n\t" \ + "lw $4, 4(%1) \n\t" \ + "lw $5, 8(%1) \n\t" \ + "lw $6, 12(%1) \n\t" \ + "lw $7, 16(%1) \n\t" \ + "lw $25, 0(%1) \n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ + "addu $29, $29, 32 \n\t" \ + "lw $28, 0($29) \n\t" \ + "lw $31, 4($29) \n\t" \ + "addu $29, $29, 8 \n\t" \ + "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[8]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + __asm__ volatile( \ + "subu $29, $29, 8 \n\t" \ + "sw $28, 0($29) \n\t" \ + "sw $31, 4($29) \n\t" \ + "lw $4, 20(%1) \n\t" \ + "subu $29, $29, 32\n\t" \ + "sw $4, 16($29) \n\t" \ + "lw $4, 24(%1) \n\t" \ + "sw $4, 20($29) \n\t" \ + "lw $4, 28(%1) \n\t" \ + "sw $4, 24($29) \n\t" \ + "lw $4, 4(%1) \n\t" \ + "lw $5, 8(%1) \n\t" \ + "lw $6, 12(%1) \n\t" \ + "lw $7, 16(%1) \n\t" \ + "lw $25, 0(%1) \n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ + "addu $29, $29, 32 \n\t" \ + "lw $28, 0($29) \n\t" \ + "lw $31, 4($29) \n\t" \ + "addu $29, $29, 8 \n\t" \ + "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[9]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + _argvec[8] = (unsigned long)(arg8); \ + __asm__ volatile( \ + "subu $29, $29, 8 \n\t" \ + "sw $28, 0($29) \n\t" \ + "sw $31, 4($29) \n\t" \ + "lw $4, 20(%1) \n\t" \ + "subu $29, $29, 40\n\t" \ + "sw $4, 16($29) \n\t" \ + "lw $4, 24(%1) \n\t" \ + "sw $4, 20($29) \n\t" \ + "lw $4, 28(%1) \n\t" \ + "sw $4, 24($29) \n\t" \ + "lw $4, 32(%1) \n\t" \ + "sw $4, 28($29) \n\t" \ + "lw $4, 4(%1) \n\t" \ + "lw $5, 8(%1) \n\t" \ + "lw $6, 12(%1) \n\t" \ + "lw $7, 16(%1) \n\t" \ + "lw $25, 0(%1) \n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ + "addu $29, $29, 40 \n\t" \ + "lw $28, 0($29) \n\t" \ + "lw $31, 4($29) \n\t" \ + "addu $29, $29, 8 \n\t" \ + "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8,arg9) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[10]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + _argvec[8] = (unsigned long)(arg8); \ + _argvec[9] = (unsigned long)(arg9); \ + __asm__ volatile( \ + "subu $29, $29, 8 \n\t" \ + "sw $28, 0($29) \n\t" \ + "sw $31, 4($29) \n\t" \ + "lw $4, 20(%1) \n\t" \ + "subu $29, $29, 40\n\t" \ + "sw $4, 16($29) \n\t" \ + "lw $4, 24(%1) \n\t" \ + "sw $4, 20($29) \n\t" \ + "lw $4, 28(%1) \n\t" \ + "sw $4, 24($29) \n\t" \ + "lw $4, 32(%1) \n\t" \ + "sw $4, 28($29) \n\t" \ + "lw $4, 36(%1) \n\t" \ + "sw $4, 32($29) \n\t" \ + "lw $4, 4(%1) \n\t" \ + "lw $5, 8(%1) \n\t" \ + "lw $6, 12(%1) \n\t" \ + "lw $7, 16(%1) \n\t" \ + "lw $25, 0(%1) \n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ + "addu $29, $29, 40 \n\t" \ + "lw $28, 0($29) \n\t" \ + "lw $31, 4($29) \n\t" \ + "addu $29, $29, 8 \n\t" \ + "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8,arg9,arg10) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[11]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + _argvec[8] = (unsigned long)(arg8); \ + _argvec[9] = (unsigned long)(arg9); \ + _argvec[10] = (unsigned long)(arg10); \ + __asm__ volatile( \ + "subu $29, $29, 8 \n\t" \ + "sw $28, 0($29) \n\t" \ + "sw $31, 4($29) \n\t" \ + "lw $4, 20(%1) \n\t" \ + "subu $29, $29, 48\n\t" \ + "sw $4, 16($29) \n\t" \ + "lw $4, 24(%1) \n\t" \ + "sw $4, 20($29) \n\t" \ + "lw $4, 28(%1) \n\t" \ + "sw $4, 24($29) \n\t" \ + "lw $4, 32(%1) \n\t" \ + "sw $4, 28($29) \n\t" \ + "lw $4, 36(%1) \n\t" \ + "sw $4, 32($29) \n\t" \ + "lw $4, 40(%1) \n\t" \ + "sw $4, 36($29) \n\t" \ + "lw $4, 4(%1) \n\t" \ + "lw $5, 8(%1) \n\t" \ + "lw $6, 12(%1) \n\t" \ + "lw $7, 16(%1) \n\t" \ + "lw $25, 0(%1) \n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ + "addu $29, $29, 48 \n\t" \ + "lw $28, 0($29) \n\t" \ + "lw $31, 4($29) \n\t" \ + "addu $29, $29, 8 \n\t" \ + "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5, \ + arg6,arg7,arg8,arg9,arg10, \ + arg11) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[12]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + _argvec[8] = (unsigned long)(arg8); \ + _argvec[9] = (unsigned long)(arg9); \ + _argvec[10] = (unsigned long)(arg10); \ + _argvec[11] = (unsigned long)(arg11); \ + __asm__ volatile( \ + "subu $29, $29, 8 \n\t" \ + "sw $28, 0($29) \n\t" \ + "sw $31, 4($29) \n\t" \ + "lw $4, 20(%1) \n\t" \ + "subu $29, $29, 48\n\t" \ + "sw $4, 16($29) \n\t" \ + "lw $4, 24(%1) \n\t" \ + "sw $4, 20($29) \n\t" \ + "lw $4, 28(%1) \n\t" \ + "sw $4, 24($29) \n\t" \ + "lw $4, 32(%1) \n\t" \ + "sw $4, 28($29) \n\t" \ + "lw $4, 36(%1) \n\t" \ + "sw $4, 32($29) \n\t" \ + "lw $4, 40(%1) \n\t" \ + "sw $4, 36($29) \n\t" \ + "lw $4, 44(%1) \n\t" \ + "sw $4, 40($29) \n\t" \ + "lw $4, 4(%1) \n\t" \ + "lw $5, 8(%1) \n\t" \ + "lw $6, 12(%1) \n\t" \ + "lw $7, 16(%1) \n\t" \ + "lw $25, 0(%1) \n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ + "addu $29, $29, 48 \n\t" \ + "lw $28, 0($29) \n\t" \ + "lw $31, 4($29) \n\t" \ + "addu $29, $29, 8 \n\t" \ + "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5, \ + arg6,arg7,arg8,arg9,arg10, \ + arg11,arg12) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[13]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + _argvec[8] = (unsigned long)(arg8); \ + _argvec[9] = (unsigned long)(arg9); \ + _argvec[10] = (unsigned long)(arg10); \ + _argvec[11] = (unsigned long)(arg11); \ + _argvec[12] = (unsigned long)(arg12); \ + __asm__ volatile( \ + "subu $29, $29, 8 \n\t" \ + "sw $28, 0($29) \n\t" \ + "sw $31, 4($29) \n\t" \ + "lw $4, 20(%1) \n\t" \ + "subu $29, $29, 56\n\t" \ + "sw $4, 16($29) \n\t" \ + "lw $4, 24(%1) \n\t" \ + "sw $4, 20($29) \n\t" \ + "lw $4, 28(%1) \n\t" \ + "sw $4, 24($29) \n\t" \ + "lw $4, 32(%1) \n\t" \ + "sw $4, 28($29) \n\t" \ + "lw $4, 36(%1) \n\t" \ + "sw $4, 32($29) \n\t" \ + "lw $4, 40(%1) \n\t" \ + "sw $4, 36($29) \n\t" \ + "lw $4, 44(%1) \n\t" \ + "sw $4, 40($29) \n\t" \ + "lw $4, 48(%1) \n\t" \ + "sw $4, 44($29) \n\t" \ + "lw $4, 4(%1) \n\t" \ + "lw $5, 8(%1) \n\t" \ + "lw $6, 12(%1) \n\t" \ + "lw $7, 16(%1) \n\t" \ + "lw $25, 0(%1) \n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ + "addu $29, $29, 56 \n\t" \ + "lw $28, 0($29) \n\t" \ + "lw $31, 4($29) \n\t" \ + "addu $29, $29, 8 \n\t" \ + "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#endif /* PLAT_mips32_linux */ + +/* ------------------------- nanomips-linux -------------------- */ + +#if defined(PLAT_nanomips_linux) + +/* These regs are trashed by the hidden call. */ +#define __CALLER_SAVED_REGS "$t4", "$t5", "$a0", "$a1", "$a2", \ +"$a3", "$a4", "$a5", "$a6", "$a7", "$t0", "$t1", "$t2", "$t3", \ +"$t8","$t9", "$at" + +/* These CALL_FN_ macros assume that on mips-linux, sizeof(unsigned + long) == 4. */ + +#define CALL_FN_W_v(lval, orig) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[1]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + __asm__ volatile( \ + "lw $t9, 0(%1)\n\t" \ + VALGRIND_CALL_NOREDIR_T9 \ + "move %0, $a0\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_W(lval, orig, arg1) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[2]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + __asm__ volatile( \ + "lw $t9, 0(%1)\n\t" \ + "lw $a0, 4(%1)\n\t" \ + VALGRIND_CALL_NOREDIR_T9 \ + "move %0, $a0\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_WW(lval, orig, arg1,arg2) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[3]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + __asm__ volatile( \ + "lw $t9, 0(%1)\n\t" \ + "lw $a0, 4(%1)\n\t" \ + "lw $a1, 8(%1)\n\t" \ + VALGRIND_CALL_NOREDIR_T9 \ + "move %0, $a0\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[4]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + __asm__ volatile( \ + "lw $t9, 0(%1)\n\t" \ + "lw $a0, 4(%1)\n\t" \ + "lw $a1, 8(%1)\n\t" \ + "lw $a2,12(%1)\n\t" \ + VALGRIND_CALL_NOREDIR_T9 \ + "move %0, $a0\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[5]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + __asm__ volatile( \ + "lw $t9, 0(%1)\n\t" \ + "lw $a0, 4(%1)\n\t" \ + "lw $a1, 8(%1)\n\t" \ + "lw $a2,12(%1)\n\t" \ + "lw $a3,16(%1)\n\t" \ + VALGRIND_CALL_NOREDIR_T9 \ + "move %0, $a0\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[6]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + __asm__ volatile( \ + "lw $t9, 0(%1)\n\t" \ + "lw $a0, 4(%1)\n\t" \ + "lw $a1, 8(%1)\n\t" \ + "lw $a2,12(%1)\n\t" \ + "lw $a3,16(%1)\n\t" \ + "lw $a4,20(%1)\n\t" \ + VALGRIND_CALL_NOREDIR_T9 \ + "move %0, $a0\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) +#define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[7]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + __asm__ volatile( \ + "lw $t9, 0(%1)\n\t" \ + "lw $a0, 4(%1)\n\t" \ + "lw $a1, 8(%1)\n\t" \ + "lw $a2,12(%1)\n\t" \ + "lw $a3,16(%1)\n\t" \ + "lw $a4,20(%1)\n\t" \ + "lw $a5,24(%1)\n\t" \ + VALGRIND_CALL_NOREDIR_T9 \ + "move %0, $a0\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[8]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + __asm__ volatile( \ + "lw $t9, 0(%1)\n\t" \ + "lw $a0, 4(%1)\n\t" \ + "lw $a1, 8(%1)\n\t" \ + "lw $a2,12(%1)\n\t" \ + "lw $a3,16(%1)\n\t" \ + "lw $a4,20(%1)\n\t" \ + "lw $a5,24(%1)\n\t" \ + "lw $a6,28(%1)\n\t" \ + VALGRIND_CALL_NOREDIR_T9 \ + "move %0, $a0\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[9]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + _argvec[8] = (unsigned long)(arg8); \ + __asm__ volatile( \ + "lw $t9, 0(%1)\n\t" \ + "lw $a0, 4(%1)\n\t" \ + "lw $a1, 8(%1)\n\t" \ + "lw $a2,12(%1)\n\t" \ + "lw $a3,16(%1)\n\t" \ + "lw $a4,20(%1)\n\t" \ + "lw $a5,24(%1)\n\t" \ + "lw $a6,28(%1)\n\t" \ + "lw $a7,32(%1)\n\t" \ + VALGRIND_CALL_NOREDIR_T9 \ + "move %0, $a0\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8,arg9) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[10]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + _argvec[8] = (unsigned long)(arg8); \ + _argvec[9] = (unsigned long)(arg9); \ + __asm__ volatile( \ + "addiu $sp, $sp, -16 \n\t" \ + "lw $t9,36(%1) \n\t" \ + "sw $t9, 0($sp) \n\t" \ + "lw $t9, 0(%1) \n\t" \ + "lw $a0, 4(%1) \n\t" \ + "lw $a1, 8(%1) \n\t" \ + "lw $a2,12(%1) \n\t" \ + "lw $a3,16(%1) \n\t" \ + "lw $a4,20(%1) \n\t" \ + "lw $a5,24(%1) \n\t" \ + "lw $a6,28(%1) \n\t" \ + "lw $a7,32(%1) \n\t" \ + VALGRIND_CALL_NOREDIR_T9 \ + "move %0, $a0 \n\t" \ + "addiu $sp, $sp, 16 \n\t" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8,arg9,arg10) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[11]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + _argvec[8] = (unsigned long)(arg8); \ + _argvec[9] = (unsigned long)(arg9); \ + _argvec[10] = (unsigned long)(arg10); \ + __asm__ volatile( \ + "addiu $sp, $sp, -16 \n\t" \ + "lw $t9,36(%1) \n\t" \ + "sw $t9, 0($sp) \n\t" \ + "lw $t9,40(%1) \n\t" \ + "sw $t9, 4($sp) \n\t" \ + "lw $t9, 0(%1) \n\t" \ + "lw $a0, 4(%1) \n\t" \ + "lw $a1, 8(%1) \n\t" \ + "lw $a2,12(%1) \n\t" \ + "lw $a3,16(%1) \n\t" \ + "lw $a4,20(%1) \n\t" \ + "lw $a5,24(%1) \n\t" \ + "lw $a6,28(%1) \n\t" \ + "lw $a7,32(%1) \n\t" \ + VALGRIND_CALL_NOREDIR_T9 \ + "move %0, $a0 \n\t" \ + "addiu $sp, $sp, 16 \n\t" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5, \ + arg6,arg7,arg8,arg9,arg10, \ + arg11) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[12]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + _argvec[8] = (unsigned long)(arg8); \ + _argvec[9] = (unsigned long)(arg9); \ + _argvec[10] = (unsigned long)(arg10); \ + _argvec[11] = (unsigned long)(arg11); \ + __asm__ volatile( \ + "addiu $sp, $sp, -16 \n\t" \ + "lw $t9,36(%1) \n\t" \ + "sw $t9, 0($sp) \n\t" \ + "lw $t9,40(%1) \n\t" \ + "sw $t9, 4($sp) \n\t" \ + "lw $t9,44(%1) \n\t" \ + "sw $t9, 8($sp) \n\t" \ + "lw $t9, 0(%1) \n\t" \ + "lw $a0, 4(%1) \n\t" \ + "lw $a1, 8(%1) \n\t" \ + "lw $a2,12(%1) \n\t" \ + "lw $a3,16(%1) \n\t" \ + "lw $a4,20(%1) \n\t" \ + "lw $a5,24(%1) \n\t" \ + "lw $a6,28(%1) \n\t" \ + "lw $a7,32(%1) \n\t" \ + VALGRIND_CALL_NOREDIR_T9 \ + "move %0, $a0 \n\t" \ + "addiu $sp, $sp, 16 \n\t" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5, \ + arg6,arg7,arg8,arg9,arg10, \ + arg11,arg12) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[13]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + _argvec[8] = (unsigned long)(arg8); \ + _argvec[9] = (unsigned long)(arg9); \ + _argvec[10] = (unsigned long)(arg10); \ + _argvec[11] = (unsigned long)(arg11); \ + _argvec[12] = (unsigned long)(arg12); \ + __asm__ volatile( \ + "addiu $sp, $sp, -16 \n\t" \ + "lw $t9,36(%1) \n\t" \ + "sw $t9, 0($sp) \n\t" \ + "lw $t9,40(%1) \n\t" \ + "sw $t9, 4($sp) \n\t" \ + "lw $t9,44(%1) \n\t" \ + "sw $t9, 8($sp) \n\t" \ + "lw $t9,48(%1) \n\t" \ + "sw $t9,12($sp) \n\t" \ + "lw $t9, 0(%1) \n\t" \ + "lw $a0, 4(%1) \n\t" \ + "lw $a1, 8(%1) \n\t" \ + "lw $a2,12(%1) \n\t" \ + "lw $a3,16(%1) \n\t" \ + "lw $a4,20(%1) \n\t" \ + "lw $a5,24(%1) \n\t" \ + "lw $a6,28(%1) \n\t" \ + "lw $a7,32(%1) \n\t" \ + VALGRIND_CALL_NOREDIR_T9 \ + "move %0, $a0 \n\t" \ + "addiu $sp, $sp, 16 \n\t" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +#endif /* PLAT_nanomips_linux */ + +/* ------------------------- mips64-linux ------------------------- */ + +#if defined(PLAT_mips64_linux) + +/* These regs are trashed by the hidden call. */ +#define __CALLER_SAVED_REGS "$2", "$3", "$4", "$5", "$6", \ +"$7", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ +"$25", "$31" + +/* These CALL_FN_ macros assume that on mips64-linux, + sizeof(long long) == 8. */ + +#define MIPS64_LONG2REG_CAST(x) ((long long)(long)x) + +#define CALL_FN_W_v(lval, orig) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long long _argvec[1]; \ + volatile unsigned long long _res; \ + _argvec[0] = MIPS64_LONG2REG_CAST(_orig.nraddr); \ + __asm__ volatile( \ + "ld $25, 0(%1)\n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ + "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) (long)_res; \ + } while (0) + +#define CALL_FN_W_W(lval, orig, arg1) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long long _argvec[2]; \ + volatile unsigned long long _res; \ + _argvec[0] = MIPS64_LONG2REG_CAST(_orig.nraddr); \ + _argvec[1] = MIPS64_LONG2REG_CAST(arg1); \ + __asm__ volatile( \ + "ld $4, 8(%1)\n\t" /* arg1*/ \ + "ld $25, 0(%1)\n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ + "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) (long)_res; \ + } while (0) + +#define CALL_FN_W_WW(lval, orig, arg1,arg2) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long long _argvec[3]; \ + volatile unsigned long long _res; \ + _argvec[0] = _orig.nraddr; \ + _argvec[1] = MIPS64_LONG2REG_CAST(arg1); \ + _argvec[2] = MIPS64_LONG2REG_CAST(arg2); \ + __asm__ volatile( \ + "ld $4, 8(%1)\n\t" \ + "ld $5, 16(%1)\n\t" \ + "ld $25, 0(%1)\n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ + "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) (long)_res; \ + } while (0) + + +#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long long _argvec[4]; \ + volatile unsigned long long _res; \ + _argvec[0] = _orig.nraddr; \ + _argvec[1] = MIPS64_LONG2REG_CAST(arg1); \ + _argvec[2] = MIPS64_LONG2REG_CAST(arg2); \ + _argvec[3] = MIPS64_LONG2REG_CAST(arg3); \ + __asm__ volatile( \ + "ld $4, 8(%1)\n\t" \ + "ld $5, 16(%1)\n\t" \ + "ld $6, 24(%1)\n\t" \ + "ld $25, 0(%1)\n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ + "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) (long)_res; \ + } while (0) + +#define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long long _argvec[5]; \ + volatile unsigned long long _res; \ + _argvec[0] = MIPS64_LONG2REG_CAST(_orig.nraddr); \ + _argvec[1] = MIPS64_LONG2REG_CAST(arg1); \ + _argvec[2] = MIPS64_LONG2REG_CAST(arg2); \ + _argvec[3] = MIPS64_LONG2REG_CAST(arg3); \ + _argvec[4] = MIPS64_LONG2REG_CAST(arg4); \ + __asm__ volatile( \ + "ld $4, 8(%1)\n\t" \ + "ld $5, 16(%1)\n\t" \ + "ld $6, 24(%1)\n\t" \ + "ld $7, 32(%1)\n\t" \ + "ld $25, 0(%1)\n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ + "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) (long)_res; \ + } while (0) + +#define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long long _argvec[6]; \ + volatile unsigned long long _res; \ + _argvec[0] = MIPS64_LONG2REG_CAST(_orig.nraddr); \ + _argvec[1] = MIPS64_LONG2REG_CAST(arg1); \ + _argvec[2] = MIPS64_LONG2REG_CAST(arg2); \ + _argvec[3] = MIPS64_LONG2REG_CAST(arg3); \ + _argvec[4] = MIPS64_LONG2REG_CAST(arg4); \ + _argvec[5] = MIPS64_LONG2REG_CAST(arg5); \ + __asm__ volatile( \ + "ld $4, 8(%1)\n\t" \ + "ld $5, 16(%1)\n\t" \ + "ld $6, 24(%1)\n\t" \ + "ld $7, 32(%1)\n\t" \ + "ld $8, 40(%1)\n\t" \ + "ld $25, 0(%1)\n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ + "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) (long)_res; \ + } while (0) + +#define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long long _argvec[7]; \ + volatile unsigned long long _res; \ + _argvec[0] = MIPS64_LONG2REG_CAST(_orig.nraddr); \ + _argvec[1] = MIPS64_LONG2REG_CAST(arg1); \ + _argvec[2] = MIPS64_LONG2REG_CAST(arg2); \ + _argvec[3] = MIPS64_LONG2REG_CAST(arg3); \ + _argvec[4] = MIPS64_LONG2REG_CAST(arg4); \ + _argvec[5] = MIPS64_LONG2REG_CAST(arg5); \ + _argvec[6] = MIPS64_LONG2REG_CAST(arg6); \ + __asm__ volatile( \ + "ld $4, 8(%1)\n\t" \ + "ld $5, 16(%1)\n\t" \ + "ld $6, 24(%1)\n\t" \ + "ld $7, 32(%1)\n\t" \ + "ld $8, 40(%1)\n\t" \ + "ld $9, 48(%1)\n\t" \ + "ld $25, 0(%1)\n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ + "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) (long)_res; \ + } while (0) + +#define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long long _argvec[8]; \ + volatile unsigned long long _res; \ + _argvec[0] = MIPS64_LONG2REG_CAST(_orig.nraddr); \ + _argvec[1] = MIPS64_LONG2REG_CAST(arg1); \ + _argvec[2] = MIPS64_LONG2REG_CAST(arg2); \ + _argvec[3] = MIPS64_LONG2REG_CAST(arg3); \ + _argvec[4] = MIPS64_LONG2REG_CAST(arg4); \ + _argvec[5] = MIPS64_LONG2REG_CAST(arg5); \ + _argvec[6] = MIPS64_LONG2REG_CAST(arg6); \ + _argvec[7] = MIPS64_LONG2REG_CAST(arg7); \ + __asm__ volatile( \ + "ld $4, 8(%1)\n\t" \ + "ld $5, 16(%1)\n\t" \ + "ld $6, 24(%1)\n\t" \ + "ld $7, 32(%1)\n\t" \ + "ld $8, 40(%1)\n\t" \ + "ld $9, 48(%1)\n\t" \ + "ld $10, 56(%1)\n\t" \ + "ld $25, 0(%1) \n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ + "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) (long)_res; \ + } while (0) + +#define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long long _argvec[9]; \ + volatile unsigned long long _res; \ + _argvec[0] = MIPS64_LONG2REG_CAST(_orig.nraddr); \ + _argvec[1] = MIPS64_LONG2REG_CAST(arg1); \ + _argvec[2] = MIPS64_LONG2REG_CAST(arg2); \ + _argvec[3] = MIPS64_LONG2REG_CAST(arg3); \ + _argvec[4] = MIPS64_LONG2REG_CAST(arg4); \ + _argvec[5] = MIPS64_LONG2REG_CAST(arg5); \ + _argvec[6] = MIPS64_LONG2REG_CAST(arg6); \ + _argvec[7] = MIPS64_LONG2REG_CAST(arg7); \ + _argvec[8] = MIPS64_LONG2REG_CAST(arg8); \ + __asm__ volatile( \ + "ld $4, 8(%1)\n\t" \ + "ld $5, 16(%1)\n\t" \ + "ld $6, 24(%1)\n\t" \ + "ld $7, 32(%1)\n\t" \ + "ld $8, 40(%1)\n\t" \ + "ld $9, 48(%1)\n\t" \ + "ld $10, 56(%1)\n\t" \ + "ld $11, 64(%1)\n\t" \ + "ld $25, 0(%1) \n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ + "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) (long)_res; \ + } while (0) + +#define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8,arg9) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long long _argvec[10]; \ + volatile unsigned long long _res; \ + _argvec[0] = MIPS64_LONG2REG_CAST(_orig.nraddr); \ + _argvec[1] = MIPS64_LONG2REG_CAST(arg1); \ + _argvec[2] = MIPS64_LONG2REG_CAST(arg2); \ + _argvec[3] = MIPS64_LONG2REG_CAST(arg3); \ + _argvec[4] = MIPS64_LONG2REG_CAST(arg4); \ + _argvec[5] = MIPS64_LONG2REG_CAST(arg5); \ + _argvec[6] = MIPS64_LONG2REG_CAST(arg6); \ + _argvec[7] = MIPS64_LONG2REG_CAST(arg7); \ + _argvec[8] = MIPS64_LONG2REG_CAST(arg8); \ + _argvec[9] = MIPS64_LONG2REG_CAST(arg9); \ + __asm__ volatile( \ + "dsubu $29, $29, 8\n\t" \ + "ld $4, 72(%1)\n\t" \ + "sd $4, 0($29)\n\t" \ + "ld $4, 8(%1)\n\t" \ + "ld $5, 16(%1)\n\t" \ + "ld $6, 24(%1)\n\t" \ + "ld $7, 32(%1)\n\t" \ + "ld $8, 40(%1)\n\t" \ + "ld $9, 48(%1)\n\t" \ + "ld $10, 56(%1)\n\t" \ + "ld $11, 64(%1)\n\t" \ + "ld $25, 0(%1)\n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ + "daddu $29, $29, 8\n\t" \ + "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) (long)_res; \ + } while (0) + +#define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ + arg7,arg8,arg9,arg10) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long long _argvec[11]; \ + volatile unsigned long long _res; \ + _argvec[0] = MIPS64_LONG2REG_CAST(_orig.nraddr); \ + _argvec[1] = MIPS64_LONG2REG_CAST(arg1); \ + _argvec[2] = MIPS64_LONG2REG_CAST(arg2); \ + _argvec[3] = MIPS64_LONG2REG_CAST(arg3); \ + _argvec[4] = MIPS64_LONG2REG_CAST(arg4); \ + _argvec[5] = MIPS64_LONG2REG_CAST(arg5); \ + _argvec[6] = MIPS64_LONG2REG_CAST(arg6); \ + _argvec[7] = MIPS64_LONG2REG_CAST(arg7); \ + _argvec[8] = MIPS64_LONG2REG_CAST(arg8); \ + _argvec[9] = MIPS64_LONG2REG_CAST(arg9); \ + _argvec[10] = MIPS64_LONG2REG_CAST(arg10); \ + __asm__ volatile( \ + "dsubu $29, $29, 16\n\t" \ + "ld $4, 72(%1)\n\t" \ + "sd $4, 0($29)\n\t" \ + "ld $4, 80(%1)\n\t" \ + "sd $4, 8($29)\n\t" \ + "ld $4, 8(%1)\n\t" \ + "ld $5, 16(%1)\n\t" \ + "ld $6, 24(%1)\n\t" \ + "ld $7, 32(%1)\n\t" \ + "ld $8, 40(%1)\n\t" \ + "ld $9, 48(%1)\n\t" \ + "ld $10, 56(%1)\n\t" \ + "ld $11, 64(%1)\n\t" \ + "ld $25, 0(%1)\n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ + "daddu $29, $29, 16\n\t" \ + "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) (long)_res; \ + } while (0) + +#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5, \ + arg6,arg7,arg8,arg9,arg10, \ + arg11) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long long _argvec[12]; \ + volatile unsigned long long _res; \ + _argvec[0] = MIPS64_LONG2REG_CAST(_orig.nraddr); \ + _argvec[1] = MIPS64_LONG2REG_CAST(arg1); \ + _argvec[2] = MIPS64_LONG2REG_CAST(arg2); \ + _argvec[3] = MIPS64_LONG2REG_CAST(arg3); \ + _argvec[4] = MIPS64_LONG2REG_CAST(arg4); \ + _argvec[5] = MIPS64_LONG2REG_CAST(arg5); \ + _argvec[6] = MIPS64_LONG2REG_CAST(arg6); \ + _argvec[7] = MIPS64_LONG2REG_CAST(arg7); \ + _argvec[8] = MIPS64_LONG2REG_CAST(arg8); \ + _argvec[9] = MIPS64_LONG2REG_CAST(arg9); \ + _argvec[10] = MIPS64_LONG2REG_CAST(arg10); \ + _argvec[11] = MIPS64_LONG2REG_CAST(arg11); \ + __asm__ volatile( \ + "dsubu $29, $29, 24\n\t" \ + "ld $4, 72(%1)\n\t" \ + "sd $4, 0($29)\n\t" \ + "ld $4, 80(%1)\n\t" \ + "sd $4, 8($29)\n\t" \ + "ld $4, 88(%1)\n\t" \ + "sd $4, 16($29)\n\t" \ + "ld $4, 8(%1)\n\t" \ + "ld $5, 16(%1)\n\t" \ + "ld $6, 24(%1)\n\t" \ + "ld $7, 32(%1)\n\t" \ + "ld $8, 40(%1)\n\t" \ + "ld $9, 48(%1)\n\t" \ + "ld $10, 56(%1)\n\t" \ + "ld $11, 64(%1)\n\t" \ + "ld $25, 0(%1)\n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ + "daddu $29, $29, 24\n\t" \ + "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) (long)_res; \ + } while (0) + +#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5, \ + arg6,arg7,arg8,arg9,arg10, \ + arg11,arg12) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long long _argvec[13]; \ + volatile unsigned long long _res; \ + _argvec[0] = MIPS64_LONG2REG_CAST(_orig.nraddr); \ + _argvec[1] = MIPS64_LONG2REG_CAST(arg1); \ + _argvec[2] = MIPS64_LONG2REG_CAST(arg2); \ + _argvec[3] = MIPS64_LONG2REG_CAST(arg3); \ + _argvec[4] = MIPS64_LONG2REG_CAST(arg4); \ + _argvec[5] = MIPS64_LONG2REG_CAST(arg5); \ + _argvec[6] = MIPS64_LONG2REG_CAST(arg6); \ + _argvec[7] = MIPS64_LONG2REG_CAST(arg7); \ + _argvec[8] = MIPS64_LONG2REG_CAST(arg8); \ + _argvec[9] = MIPS64_LONG2REG_CAST(arg9); \ + _argvec[10] = MIPS64_LONG2REG_CAST(arg10); \ + _argvec[11] = MIPS64_LONG2REG_CAST(arg11); \ + _argvec[12] = MIPS64_LONG2REG_CAST(arg12); \ + __asm__ volatile( \ + "dsubu $29, $29, 32\n\t" \ + "ld $4, 72(%1)\n\t" \ + "sd $4, 0($29)\n\t" \ + "ld $4, 80(%1)\n\t" \ + "sd $4, 8($29)\n\t" \ + "ld $4, 88(%1)\n\t" \ + "sd $4, 16($29)\n\t" \ + "ld $4, 96(%1)\n\t" \ + "sd $4, 24($29)\n\t" \ + "ld $4, 8(%1)\n\t" \ + "ld $5, 16(%1)\n\t" \ + "ld $6, 24(%1)\n\t" \ + "ld $7, 32(%1)\n\t" \ + "ld $8, 40(%1)\n\t" \ + "ld $9, 48(%1)\n\t" \ + "ld $10, 56(%1)\n\t" \ + "ld $11, 64(%1)\n\t" \ + "ld $25, 0(%1)\n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ + "daddu $29, $29, 32\n\t" \ + "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "r" (&_argvec[0]) \ + : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) (long)_res; \ + } while (0) + +#endif /* PLAT_mips64_linux */ + +/* ------------------------------------------------------------------ */ +/* ARCHITECTURE INDEPENDENT MACROS for CLIENT REQUESTS. */ +/* */ +/* ------------------------------------------------------------------ */ + +/* Some request codes. There are many more of these, but most are not + exposed to end-user view. These are the public ones, all of the + form 0x1000 + small_number. + + Core ones are in the range 0x00000000--0x0000ffff. The non-public + ones start at 0x2000. +*/ + +/* These macros are used by tools -- they must be public, but don't + embed them into other programs. */ +#define VG_USERREQ_TOOL_BASE(a,b) \ + ((unsigned int)(((a)&0xff) << 24 | ((b)&0xff) << 16)) +#define VG_IS_TOOL_USERREQ(a, b, v) \ + (VG_USERREQ_TOOL_BASE(a,b) == ((v) & 0xffff0000)) + +/* !! ABIWARNING !! ABIWARNING !! ABIWARNING !! ABIWARNING !! + This enum comprises an ABI exported by Valgrind to programs + which use client requests. DO NOT CHANGE THE NUMERIC VALUES OF THESE + ENTRIES, NOR DELETE ANY -- add new ones at the end of the most + relevant group. */ +typedef + enum { VG_USERREQ__RUNNING_ON_VALGRIND = 0x1001, + VG_USERREQ__DISCARD_TRANSLATIONS = 0x1002, + + /* These allow any function to be called from the simulated + CPU but run on the real CPU. Nb: the first arg passed to + the function is always the ThreadId of the running + thread! So CLIENT_CALL0 actually requires a 1 arg + function, etc. */ + VG_USERREQ__CLIENT_CALL0 = 0x1101, + VG_USERREQ__CLIENT_CALL1 = 0x1102, + VG_USERREQ__CLIENT_CALL2 = 0x1103, + VG_USERREQ__CLIENT_CALL3 = 0x1104, + + /* Can be useful in regression testing suites -- eg. can + send Valgrind's output to /dev/null and still count + errors. */ + VG_USERREQ__COUNT_ERRORS = 0x1201, + + /* Allows the client program and/or gdbserver to execute a monitor + command. */ + VG_USERREQ__GDB_MONITOR_COMMAND = 0x1202, + + /* Allows the client program to change a dynamic command line + option. */ + VG_USERREQ__CLO_CHANGE = 0x1203, + + /* These are useful and can be interpreted by any tool that + tracks malloc() et al, by using vg_replace_malloc.c. */ + VG_USERREQ__MALLOCLIKE_BLOCK = 0x1301, + VG_USERREQ__RESIZEINPLACE_BLOCK = 0x130b, + VG_USERREQ__FREELIKE_BLOCK = 0x1302, + /* Memory pool support. */ + VG_USERREQ__CREATE_MEMPOOL = 0x1303, + VG_USERREQ__DESTROY_MEMPOOL = 0x1304, + VG_USERREQ__MEMPOOL_ALLOC = 0x1305, + VG_USERREQ__MEMPOOL_FREE = 0x1306, + VG_USERREQ__MEMPOOL_TRIM = 0x1307, + VG_USERREQ__MOVE_MEMPOOL = 0x1308, + VG_USERREQ__MEMPOOL_CHANGE = 0x1309, + VG_USERREQ__MEMPOOL_EXISTS = 0x130a, + + /* Allow printfs to valgrind log. */ + /* The first two pass the va_list argument by value, which + assumes it is the same size as or smaller than a UWord, + which generally isn't the case. Hence are deprecated. + The second two pass the vargs by reference and so are + immune to this problem. */ + /* both :: char* fmt, va_list vargs (DEPRECATED) */ + VG_USERREQ__PRINTF = 0x1401, + VG_USERREQ__PRINTF_BACKTRACE = 0x1402, + /* both :: char* fmt, va_list* vargs */ + VG_USERREQ__PRINTF_VALIST_BY_REF = 0x1403, + VG_USERREQ__PRINTF_BACKTRACE_VALIST_BY_REF = 0x1404, + + /* Stack support. */ + VG_USERREQ__STACK_REGISTER = 0x1501, + VG_USERREQ__STACK_DEREGISTER = 0x1502, + VG_USERREQ__STACK_CHANGE = 0x1503, + + /* Wine support */ + VG_USERREQ__LOAD_PDB_DEBUGINFO = 0x1601, + + /* Querying of debug info. */ + VG_USERREQ__MAP_IP_TO_SRCLOC = 0x1701, + + /* Disable/enable error reporting level. Takes a single + Word arg which is the delta to this thread's error + disablement indicator. Hence 1 disables or further + disables errors, and -1 moves back towards enablement. + Other values are not allowed. */ + VG_USERREQ__CHANGE_ERR_DISABLEMENT = 0x1801, + + /* Some requests used for Valgrind internal, such as + self-test or self-hosting. */ + /* Initialise IR injection */ + VG_USERREQ__VEX_INIT_FOR_IRI = 0x1901, + /* Used by Inner Valgrind to inform Outer Valgrind where to + find the list of inner guest threads */ + VG_USERREQ__INNER_THREADS = 0x1902 + } Vg_ClientRequest; + +#if !defined(__GNUC__) +# define __extension__ /* */ +#endif + + +/* Returns the number of Valgrinds this code is running under. That + is, 0 if running natively, 1 if running under Valgrind, 2 if + running under Valgrind which is running under another Valgrind, + etc. */ +#define RUNNING_ON_VALGRIND \ + (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* if not */, \ + VG_USERREQ__RUNNING_ON_VALGRIND, \ + 0, 0, 0, 0, 0) \ + + +/* Discard translation of code in the range [_qzz_addr .. _qzz_addr + + _qzz_len - 1]. Useful if you are debugging a JITter or some such, + since it provides a way to make sure valgrind will retranslate the + invalidated area. Returns no value. */ +#define VALGRIND_DISCARD_TRANSLATIONS(_qzz_addr,_qzz_len) \ + VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DISCARD_TRANSLATIONS, \ + _qzz_addr, _qzz_len, 0, 0, 0) + +#define VALGRIND_INNER_THREADS(_qzz_addr) \ + VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__INNER_THREADS, \ + _qzz_addr, 0, 0, 0, 0) + + +/* These requests are for getting Valgrind itself to print something. + Possibly with a backtrace. This is a really ugly hack. The return value + is the number of characters printed, excluding the "**** " part at the + start and the backtrace (if present). */ + +#if defined(__GNUC__) || defined(__INTEL_COMPILER) && !defined(_MSC_VER) +/* Modern GCC will optimize the static routine out if unused, + and unused attribute will shut down warnings about it. */ +static int VALGRIND_PRINTF(const char *format, ...) + __attribute__((format(__printf__, 1, 2), __unused__)); +#endif +static int +#if defined(_MSC_VER) +__inline +#endif +VALGRIND_PRINTF(const char *format, ...) +{ +#if defined(NVALGRIND) + (void)format; + return 0; +#else /* NVALGRIND */ +#if defined(_MSC_VER) || defined(__MINGW64__) + uintptr_t _qzz_res; +#else + unsigned long _qzz_res; +#endif + va_list vargs; + va_start(vargs, format); +#if defined(_MSC_VER) || defined(__MINGW64__) + _qzz_res = VALGRIND_DO_CLIENT_REQUEST_EXPR(0, + VG_USERREQ__PRINTF_VALIST_BY_REF, + (uintptr_t)format, + (uintptr_t)&vargs, + 0, 0, 0); +#else + _qzz_res = VALGRIND_DO_CLIENT_REQUEST_EXPR(0, + VG_USERREQ__PRINTF_VALIST_BY_REF, + (unsigned long)format, + (unsigned long)&vargs, + 0, 0, 0); +#endif + va_end(vargs); + return (int)_qzz_res; +#endif /* NVALGRIND */ +} + +#if defined(__GNUC__) || defined(__INTEL_COMPILER) && !defined(_MSC_VER) +static int VALGRIND_PRINTF_BACKTRACE(const char *format, ...) + __attribute__((format(__printf__, 1, 2), __unused__)); +#endif +static int +#if defined(_MSC_VER) +__inline +#endif +VALGRIND_PRINTF_BACKTRACE(const char *format, ...) +{ +#if defined(NVALGRIND) + (void)format; + return 0; +#else /* NVALGRIND */ +#if defined(_MSC_VER) || defined(__MINGW64__) + uintptr_t _qzz_res; +#else + unsigned long _qzz_res; +#endif + va_list vargs; + va_start(vargs, format); +#if defined(_MSC_VER) || defined(__MINGW64__) + _qzz_res = VALGRIND_DO_CLIENT_REQUEST_EXPR(0, + VG_USERREQ__PRINTF_BACKTRACE_VALIST_BY_REF, + (uintptr_t)format, + (uintptr_t)&vargs, + 0, 0, 0); +#else + _qzz_res = VALGRIND_DO_CLIENT_REQUEST_EXPR(0, + VG_USERREQ__PRINTF_BACKTRACE_VALIST_BY_REF, + (unsigned long)format, + (unsigned long)&vargs, + 0, 0, 0); +#endif + va_end(vargs); + return (int)_qzz_res; +#endif /* NVALGRIND */ +} + + +/* These requests allow control to move from the simulated CPU to the + real CPU, calling an arbitrary function. + + Note that the current ThreadId is inserted as the first argument. + So this call: + + VALGRIND_NON_SIMD_CALL2(f, arg1, arg2) + + requires f to have this signature: + + Word f(Word tid, Word arg1, Word arg2) + + where "Word" is a word-sized type. + + Note that these client requests are not entirely reliable. For example, + if you call a function with them that subsequently calls printf(), + there's a high chance Valgrind will crash. Generally, your prospects of + these working are made higher if the called function does not refer to + any global variables, and does not refer to any libc or other functions + (printf et al). Any kind of entanglement with libc or dynamic linking is + likely to have a bad outcome, for tricky reasons which we've grappled + with a lot in the past. +*/ +#define VALGRIND_NON_SIMD_CALL0(_qyy_fn) \ + VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */, \ + VG_USERREQ__CLIENT_CALL0, \ + _qyy_fn, \ + 0, 0, 0, 0) + +#define VALGRIND_NON_SIMD_CALL1(_qyy_fn, _qyy_arg1) \ + VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */, \ + VG_USERREQ__CLIENT_CALL1, \ + _qyy_fn, \ + _qyy_arg1, 0, 0, 0) + +#define VALGRIND_NON_SIMD_CALL2(_qyy_fn, _qyy_arg1, _qyy_arg2) \ + VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */, \ + VG_USERREQ__CLIENT_CALL2, \ + _qyy_fn, \ + _qyy_arg1, _qyy_arg2, 0, 0) + +#define VALGRIND_NON_SIMD_CALL3(_qyy_fn, _qyy_arg1, _qyy_arg2, _qyy_arg3) \ + VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */, \ + VG_USERREQ__CLIENT_CALL3, \ + _qyy_fn, \ + _qyy_arg1, _qyy_arg2, \ + _qyy_arg3, 0) + + +/* Counts the number of errors that have been recorded by a tool. Nb: + the tool must record the errors with VG_(maybe_record_error)() or + VG_(unique_error)() for them to be counted. */ +#define VALGRIND_COUNT_ERRORS \ + (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR( \ + 0 /* default return */, \ + VG_USERREQ__COUNT_ERRORS, \ + 0, 0, 0, 0, 0) + +/* Several Valgrind tools (Memcheck, Massif, Helgrind, DRD) rely on knowing + when heap blocks are allocated in order to give accurate results. This + happens automatically for the standard allocator functions such as + malloc(), calloc(), realloc(), memalign(), new, new[], free(), delete, + delete[], etc. + + But if your program uses a custom allocator, this doesn't automatically + happen, and Valgrind will not do as well. For example, if you allocate + superblocks with mmap() and then allocates chunks of the superblocks, all + Valgrind's observations will be at the mmap() level and it won't know that + the chunks should be considered separate entities. In Memcheck's case, + that means you probably won't get heap block overrun detection (because + there won't be redzones marked as unaddressable) and you definitely won't + get any leak detection. + + The following client requests allow a custom allocator to be annotated so + that it can be handled accurately by Valgrind. + + VALGRIND_MALLOCLIKE_BLOCK marks a region of memory as having been allocated + by a malloc()-like function. For Memcheck (an illustrative case), this + does two things: + + - It records that the block has been allocated. This means any addresses + within the block mentioned in error messages will be + identified as belonging to the block. It also means that if the block + isn't freed it will be detected by the leak checker. + + - It marks the block as being addressable and undefined (if 'is_zeroed' is + not set), or addressable and defined (if 'is_zeroed' is set). This + controls how accesses to the block by the program are handled. + + 'addr' is the start of the usable block (ie. after any + redzone), 'sizeB' is its size. 'rzB' is the redzone size if the allocator + can apply redzones -- these are blocks of padding at the start and end of + each block. Adding redzones is recommended as it makes it much more likely + Valgrind will spot block overruns. `is_zeroed' indicates if the memory is + zeroed (or filled with another predictable value), as is the case for + calloc(). + + VALGRIND_MALLOCLIKE_BLOCK should be put immediately after the point where a + heap block -- that will be used by the client program -- is allocated. + It's best to put it at the outermost level of the allocator if possible; + for example, if you have a function my_alloc() which calls + internal_alloc(), and the client request is put inside internal_alloc(), + stack traces relating to the heap block will contain entries for both + my_alloc() and internal_alloc(), which is probably not what you want. + + For Memcheck users: if you use VALGRIND_MALLOCLIKE_BLOCK to carve out + custom blocks from within a heap block, B, that has been allocated with + malloc/calloc/new/etc, then block B will be *ignored* during leak-checking + -- the custom blocks will take precedence. + + VALGRIND_FREELIKE_BLOCK is the partner to VALGRIND_MALLOCLIKE_BLOCK. For + Memcheck, it does two things: + + - It records that the block has been deallocated. This assumes that the + block was annotated as having been allocated via + VALGRIND_MALLOCLIKE_BLOCK. Otherwise, an error will be issued. + + - It marks the block as being unaddressable. + + VALGRIND_FREELIKE_BLOCK should be put immediately after the point where a + heap block is deallocated. + + VALGRIND_RESIZEINPLACE_BLOCK informs a tool about reallocation. For + Memcheck, it does four things: + + - It records that the size of a block has been changed. This assumes that + the block was annotated as having been allocated via + VALGRIND_MALLOCLIKE_BLOCK. Otherwise, an error will be issued. + + - If the block shrunk, it marks the freed memory as being unaddressable. + + - If the block grew, it marks the new area as undefined and defines a red + zone past the end of the new block. + + - The V-bits of the overlap between the old and the new block are preserved. + + VALGRIND_RESIZEINPLACE_BLOCK should be put after allocation of the new block + and before deallocation of the old block. + + In many cases, these three client requests will not be enough to get your + allocator working well with Memcheck. More specifically, if your allocator + writes to freed blocks in any way then a VALGRIND_MAKE_MEM_UNDEFINED call + will be necessary to mark the memory as addressable just before the zeroing + occurs, otherwise you'll get a lot of invalid write errors. For example, + you'll need to do this if your allocator recycles freed blocks, but it + zeroes them before handing them back out (via VALGRIND_MALLOCLIKE_BLOCK). + Alternatively, if your allocator reuses freed blocks for allocator-internal + data structures, VALGRIND_MAKE_MEM_UNDEFINED calls will also be necessary. + + Really, what's happening is a blurring of the lines between the client + program and the allocator... after VALGRIND_FREELIKE_BLOCK is called, the + memory should be considered unaddressable to the client program, but the + allocator knows more than the rest of the client program and so may be able + to safely access it. Extra client requests are necessary for Valgrind to + understand the distinction between the allocator and the rest of the + program. + + Ignored if addr == 0. +*/ +#define VALGRIND_MALLOCLIKE_BLOCK(addr, sizeB, rzB, is_zeroed) \ + VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MALLOCLIKE_BLOCK, \ + addr, sizeB, rzB, is_zeroed, 0) + +/* See the comment for VALGRIND_MALLOCLIKE_BLOCK for details. + Ignored if addr == 0. +*/ +#define VALGRIND_RESIZEINPLACE_BLOCK(addr, oldSizeB, newSizeB, rzB) \ + VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__RESIZEINPLACE_BLOCK, \ + addr, oldSizeB, newSizeB, rzB, 0) + +/* See the comment for VALGRIND_MALLOCLIKE_BLOCK for details. + Ignored if addr == 0. +*/ +#define VALGRIND_FREELIKE_BLOCK(addr, rzB) \ + VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__FREELIKE_BLOCK, \ + addr, rzB, 0, 0, 0) + +/* Create a memory pool. */ +#define VALGRIND_CREATE_MEMPOOL(pool, rzB, is_zeroed) \ + VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CREATE_MEMPOOL, \ + pool, rzB, is_zeroed, 0, 0) + +/* Create a memory pool with some flags specifying extended behaviour. + When flags is zero, the behaviour is identical to VALGRIND_CREATE_MEMPOOL. + + The flag VALGRIND_MEMPOOL_METAPOOL specifies that the pieces of memory + associated with the pool using VALGRIND_MEMPOOL_ALLOC will be used + by the application as superblocks to dole out MALLOC_LIKE blocks using + VALGRIND_MALLOCLIKE_BLOCK. In other words, a meta pool is a "2 levels" + pool : first level is the blocks described by VALGRIND_MEMPOOL_ALLOC. + The second level blocks are described using VALGRIND_MALLOCLIKE_BLOCK. + Note that the association between the pool and the second level blocks + is implicit : second level blocks will be located inside first level + blocks. It is necessary to use the VALGRIND_MEMPOOL_METAPOOL flag + for such 2 levels pools, as otherwise valgrind will detect overlapping + memory blocks, and will abort execution (e.g. during leak search). + + Such a meta pool can also be marked as an 'auto free' pool using the flag + VALGRIND_MEMPOOL_AUTO_FREE, which must be OR-ed together with the + VALGRIND_MEMPOOL_METAPOOL. For an 'auto free' pool, VALGRIND_MEMPOOL_FREE + will automatically free the second level blocks that are contained + inside the first level block freed with VALGRIND_MEMPOOL_FREE. + In other words, calling VALGRIND_MEMPOOL_FREE will cause implicit calls + to VALGRIND_FREELIKE_BLOCK for all the second level blocks included + in the first level block. + Note: it is an error to use the VALGRIND_MEMPOOL_AUTO_FREE flag + without the VALGRIND_MEMPOOL_METAPOOL flag. +*/ +#define VALGRIND_MEMPOOL_AUTO_FREE 1 +#define VALGRIND_MEMPOOL_METAPOOL 2 +#define VALGRIND_CREATE_MEMPOOL_EXT(pool, rzB, is_zeroed, flags) \ + VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CREATE_MEMPOOL, \ + pool, rzB, is_zeroed, flags, 0) + +/* Destroy a memory pool. */ +#define VALGRIND_DESTROY_MEMPOOL(pool) \ + VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DESTROY_MEMPOOL, \ + pool, 0, 0, 0, 0) + +/* Associate a piece of memory with a memory pool. */ +#define VALGRIND_MEMPOOL_ALLOC(pool, addr, size) \ + VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MEMPOOL_ALLOC, \ + pool, addr, size, 0, 0) + +/* Disassociate a piece of memory from a memory pool. */ +#define VALGRIND_MEMPOOL_FREE(pool, addr) \ + VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MEMPOOL_FREE, \ + pool, addr, 0, 0, 0) + +/* Disassociate any pieces outside a particular range. */ +#define VALGRIND_MEMPOOL_TRIM(pool, addr, size) \ + VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MEMPOOL_TRIM, \ + pool, addr, size, 0, 0) + +/* Resize and/or move a piece associated with a memory pool. */ +#define VALGRIND_MOVE_MEMPOOL(poolA, poolB) \ + VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MOVE_MEMPOOL, \ + poolA, poolB, 0, 0, 0) + +/* Resize and/or move a piece associated with a memory pool. */ +#define VALGRIND_MEMPOOL_CHANGE(pool, addrA, addrB, size) \ + VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MEMPOOL_CHANGE, \ + pool, addrA, addrB, size, 0) + +/* Return 1 if a mempool exists, else 0. */ +#define VALGRIND_MEMPOOL_EXISTS(pool) \ + (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0, \ + VG_USERREQ__MEMPOOL_EXISTS, \ + pool, 0, 0, 0, 0) + +/* Mark a piece of memory as being a stack. Returns a stack id. + start is the lowest addressable stack byte, end is the highest + addressable stack byte. */ +#define VALGRIND_STACK_REGISTER(start, end) \ + (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0, \ + VG_USERREQ__STACK_REGISTER, \ + start, end, 0, 0, 0) + +/* Unmark the piece of memory associated with a stack id as being a + stack. */ +#define VALGRIND_STACK_DEREGISTER(id) \ + VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__STACK_DEREGISTER, \ + id, 0, 0, 0, 0) + +/* Change the start and end address of the stack id. + start is the new lowest addressable stack byte, end is the new highest + addressable stack byte. */ +#define VALGRIND_STACK_CHANGE(id, start, end) \ + VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__STACK_CHANGE, \ + id, start, end, 0, 0) + +/* Load PDB debug info for Wine PE image_map. */ +#define VALGRIND_LOAD_PDB_DEBUGINFO(fd, ptr, total_size, delta) \ + VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__LOAD_PDB_DEBUGINFO, \ + fd, ptr, total_size, delta, 0) + +/* Map a code address to a source file name and line number. buf64 + must point to a 64-byte buffer in the caller's address space. The + result will be dumped in there and is guaranteed to be zero + terminated. If no info is found, the first byte is set to zero. */ +#define VALGRIND_MAP_IP_TO_SRCLOC(addr, buf64) \ + (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0, \ + VG_USERREQ__MAP_IP_TO_SRCLOC, \ + addr, buf64, 0, 0, 0) + +/* Disable error reporting for this thread. Behaves in a stack like + way, so you can safely call this multiple times provided that + VALGRIND_ENABLE_ERROR_REPORTING is called the same number of times + to re-enable reporting. The first call of this macro disables + reporting. Subsequent calls have no effect except to increase the + number of VALGRIND_ENABLE_ERROR_REPORTING calls needed to re-enable + reporting. Child threads do not inherit this setting from their + parents -- they are always created with reporting enabled. */ +#define VALGRIND_DISABLE_ERROR_REPORTING \ + VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CHANGE_ERR_DISABLEMENT, \ + 1, 0, 0, 0, 0) + +/* Re-enable error reporting, as per comments on + VALGRIND_DISABLE_ERROR_REPORTING. */ +#define VALGRIND_ENABLE_ERROR_REPORTING \ + VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CHANGE_ERR_DISABLEMENT, \ + -1, 0, 0, 0, 0) + +/* Execute a monitor command from the client program. + If a connection is opened with GDB, the output will be sent + according to the output mode set for vgdb. + If no connection is opened, output will go to the log output. + Returns 1 if command not recognised, 0 otherwise. */ +#define VALGRIND_MONITOR_COMMAND(command) \ + VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__GDB_MONITOR_COMMAND, \ + command, 0, 0, 0, 0) + + +/* Change the value of a dynamic command line option. + Note that unknown or not dynamically changeable options + will cause a warning message to be output. */ +#define VALGRIND_CLO_CHANGE(option) \ + VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CLO_CHANGE, \ + option, 0, 0, 0, 0) + + +#undef PLAT_x86_darwin +#undef PLAT_amd64_darwin +#undef PLAT_x86_win32 +#undef PLAT_amd64_win64 +#undef PLAT_x86_linux +#undef PLAT_amd64_linux +#undef PLAT_ppc32_linux +#undef PLAT_ppc64be_linux +#undef PLAT_ppc64le_linux +#undef PLAT_arm_linux +#undef PLAT_s390x_linux +#undef PLAT_mips32_linux +#undef PLAT_mips64_linux +#undef PLAT_nanomips_linux +#undef PLAT_x86_solaris +#undef PLAT_amd64_solaris + +#endif /* __VALGRIND_H */ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/bundled_inputs.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/bundled_inputs.py new file mode 100644 index 0000000000000000000000000000000000000000..e91129a03864b4ef6547702a349ca79410fe2b4a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/bundled_inputs.py @@ -0,0 +1,472 @@ +#!/usr/bin/env python3 +# mypy: allow-untyped-defs +from typing import Any, TypeVar, NamedTuple +from collections.abc import Callable, Sequence +import textwrap +import torch +from torch._C import TupleType, ListType +from torch.jit._recursive import wrap_cpp_module + + +T = TypeVar("T") + +MAX_RAW_TENSOR_SIZE = 16 + +class InflatableArg(NamedTuple): + """Helper type for bundled inputs. + + 'value' is the compressed/deflated input that is stored in the model. Value + must be of the same type as the argument to the function that it is a deflated + input for. + + 'fmt' is a formatable code string that is executed to inflate the compressed data into + the appropriate input. It can use 'value' as an input to the format str. It must result + in a value of the same type as 'value'. + + 'fmt_fn' is a formatable function code string that is executed to inflate the compressed + data into the appropriate input. It must result in a value of the same type as 'value'. + The function name should be the formatable part of the string. + + Note: Only top level InflatableArgs can be inflated. i.e. you cannot place + an inflatable arg inside of some other structure. You should instead create + an inflatable arg such that the fmt code string returns the full structure + of your input. + """ + + value: Any + fmt: str = "{}" + fmt_fn: str = "" + + +def bundle_inputs( + model: torch.jit.ScriptModule, + inputs: Sequence[tuple[Any, ...]] | None | dict[Callable, Sequence[tuple[Any, ...]] | None], + info: list[str] | dict[Callable, list[str]] | None = None, + *, + _receive_inflate_expr: list[str] | None = None, +) -> torch.jit.ScriptModule: + """Create and return a copy of the specified model with inputs attached. + + The original model is not mutated or changed in any way. + + Models with bundled inputs can be invoked in a uniform manner by + benchmarking and code coverage tools. + + If inputs is passed in as a list then the inputs will be bundled for 'forward'. + If inputs is instead passed in as a map then all the methods specified in the map + will have their corresponding inputs bundled. Info should match watchever type is + chosen for the inputs. + + The returned model will support the following methods: + + `get_all_bundled_inputs_for_() -> List[Tuple[Any, ...]]` + Returns a list of tuples suitable for passing to the model like + `for inp in model.get_all_bundled_inputs_for_foo(): model.foo(*inp)` + + `get_bundled_inputs_functions_and_info() -> Dict[str, Dict[str: List[str]]]` + Returns a dictionary mapping function names to a metadata dictionary. + This nested dictionary maps preset strings like: + 'get_inputs_function_name' -> the name of a function attribute in this model that can be + run to get back a list of inputs corresponding to that function. + 'info' -> the user provided extra information about the bundled inputs + + If forward has bundled inputs then these following functions will also be defined on the returned module: + + `get_all_bundled_inputs() -> List[Tuple[Any, ...]]` + Returns a list of tuples suitable for passing to the model like + `for inp in model.get_all_bundled_inputs(): model(*inp)` + + `get_num_bundled_inputs() -> int` + Equivalent to `len(model.get_all_bundled_inputs())`, + but slightly easier to call from C++. + + Inputs can be specified in one of two ways: + + - The model can define `_generate_bundled_inputs_for_`. + If the user chooses this method inputs[] should map to None + + - The `inputs` argument to this function can be a dictionary mapping functions to a + list of inputs, of the same form that will be returned by get_all_bundled_inputs_for_. + Alternatively if only bundling inputs for forward the map can be omitted and a singular list of inputs + can be provided instead. + + The type of the inputs is List[Tuple[Any, ...]]. The outer list corresponds with a + list of inputs, the inner tuple is the list of args that together make up one input. + For inputs of functions that take one arg, this will be a tuple of length one. The Any, ... + is the actual data that makes up the args, e.g. a tensor. + + Info is an optional parameter that maps functions to a list of strings providing extra information about that + function's bundled inputs. Alternatively if only bundling inputs for forward the map can be omitted and + a singular list of information can be provided instead. This could be descriptions, expected outputs, etc. + - Ex: info={model.forward : ['man eating icecream', 'an airplane', 'a dog']} + + This function will attempt to optimize arguments so that (e.g.) + arguments like `torch.zeros(1000)` will be represented compactly. + Only top-level arguments will be optimized. + Tensors in lists or tuples will not. + """ + if not isinstance(model, torch.jit.ScriptModule): + raise Exception("Only ScriptModule is supported.") # noqa: TRY002 + + ignored_methods, ignored_attrs = _get_bundled_inputs_attributes_and_methods(model) + clone = torch._C._hack_do_not_use_clone_module_with_class( # type: ignore[attr-defined] + model._c, + ignored_methods, + ignored_attrs, + ) + + # The above cloning function returns a torch._C.scriptmodule and we need a torch.jit.scriptmodule. + # Fortunately there is a function in _recursive that does exactly that conversion. + cloned_module = wrap_cpp_module(clone) + if isinstance(inputs, dict): + if not isinstance(info, dict) and info is not None: + raise AssertionError("If inputs is a dict, info must be a dict or None") + augment_many_model_functions_with_bundled_inputs(cloned_module, inputs, _receive_inflate_expr, info) + else: + if not isinstance(info, list) and info is not None: + raise AssertionError("If inputs is a list, info must be a list or None") + augment_model_with_bundled_inputs(cloned_module, inputs, _receive_inflate_expr, info) + return cloned_module + +def augment_model_with_bundled_inputs( + model: torch.jit.ScriptModule, + inputs: Sequence[tuple[Any, ...]] | None = None, + _receive_inflate_expr: list[str] | None = None, # For debugging. + info: list[str] | None = None, # Optional argument to provide info about forward or its inputs + skip_size_check=False, +) -> None: + """Add bundled sample inputs to a model for the forward function. + + Models with bundled inputs can be invoked in a uniform manner by + benchmarking and code coverage tools. + + Augmented models will support the following methods: + + `get_all_bundled_inputs() -> List[Tuple[Any, ...]]` + Returns a list of tuples suitable for passing to the model like + `for inp in model.get_all_bundled_inputs(): model(*inp)` + + `get_num_bundled_inputs() -> int` + Equivalent to `len(model.get_all_bundled_inputs())`, + but slightly easier to call from C++. + + `get_bundled_inputs_functions_and_info() -> Dict[str, Dict[str: List[str]]]` + Returns a dictionary mapping function names to a metadata dictionary. + This nested dictionary maps preset strings like: + 'get_inputs_function_name' -> the name of a function attribute in this model that can be + run to get back a list of inputs corresponding to that function. + 'info' -> the user provided extra information about the bundled inputs + + Inputs can be specified in one of two ways: + + - The model can define `_generate_bundled_inputs_for_forward`. + If the user chooses this method inputs should be None + + - `inputs` is a list of inputs of form List[Tuple[Any, ...]]. A list of tuples where the elements + of each tuple are the args that make up one input. + """ + if not isinstance(model, torch.jit.ScriptModule): + raise Exception("Only ScriptModule is supported.") # noqa: TRY002 + + forward: Callable = model.forward + + # Sometimes forward won't have a name attached so just in case + if not hasattr(forward, "__name__"): + forward.__name__ = 'forward' + augment_many_model_functions_with_bundled_inputs( + model, + inputs={forward : inputs}, + _receive_inflate_expr=_receive_inflate_expr, + info={forward : info} if info else None, + skip_size_check=skip_size_check, + ) + + +def augment_many_model_functions_with_bundled_inputs( + model: torch.jit.ScriptModule, + inputs: dict[Callable, Sequence[tuple[Any, ...]] | None], + _receive_inflate_expr: list[str] | None = None, # For debugging. + info: dict[Callable, list[str]] | None = None, # Optional argument to provide info about the function or its inputs + skip_size_check=False, +) -> None: + """Add bundled sample inputs to a model for an arbitrary list of public functions. + + Models with bundled inputs can be invoked in a uniform manner by + benchmarking and code coverage tools. + + Augmented models will support the following methods: + + `get_all_bundled_inputs_for_() -> List[Tuple[Any, ...]]` + Returns a list of tuples suitable for passing to the model like + `for inp in model.get_all_bundled_inputs_for_foo(): model.foo(*inp)` + + `get_bundled_inputs_functions_and_info() -> Dict[str, Dict[str: List[str]]]` + Returns a dictionary mapping function names to a metadata dictionary. + This nested dictionary maps preset strings like: + 'get_inputs_function_name' -> the name of a function attribute in this model that can be + run to get back a list of inputs corresponding to that function. + 'info' -> the user provided extra information about the bundled inputs + + If forward has bundled inputs then these following functions are also defined: + + `get_all_bundled_inputs() -> List[Tuple[Any, ...]]` + Returns a list of tuples suitable for passing to the model like + `for inp in model.get_all_bundled_inputs(): model(*inp)` + + `get_num_bundled_inputs() -> int` + Equivalent to `len(model.get_all_bundled_inputs())`, + but slightly easier to call from C++. + + Inputs can be specified in one of two ways: + + - The model can define `_generate_bundled_inputs_for_`. + If the user chooses this method inputs[] should map to None + + - The `inputs` argument to this function can be a dictionary mapping functions to a + list of inputs, of the same form that will be returned by get_all_bundled_inputs_for_. + The type of the inputs is List[Tuple[Any, ...]]. The outer list corresponds with a + list of inputs, the inner tuple is the list of args that together make up one input. + For inputs of functions that take one arg, this will be a tuple of length one. The Any, ... + is the actual data that makes up the args, e.g. a tensor. + + Info is an optional parameter that maps functions to a list of strings providing extra information about that + function's bundled inputs. This could be descriptions, expected outputs, etc. + - Ex: info={model.forward : ['man eating icecream', 'an airplane', 'a dog']} + + This function will attempt to optimize arguments so that (e.g.) + arguments like `torch.zeros(1000)` will be represented compactly. + Only top-level arguments will be optimized. + Tensors in lists or tuples will not. + """ + if not isinstance(model, torch.jit.ScriptModule): + raise Exception("Only ScriptModule is supported.") # noqa: TRY002 + + if not inputs: + raise Exception("Please provide inputs for at least 1 function") # noqa: TRY002 + + if hasattr(model, "get_all_bundled_inputs") or hasattr(model, "get_bundled_inputs_functions_and_info"): + raise Exception( # noqa: TRY002 + "Models can only be augmented with bundled inputs once. " + "This Model seems to have already been augmented with " + "bundled inputs. Please start afresh with one that " + "doesn't have bundled inputs.", + ) + + get_bundled_inputs_functions_and_info_template = "" + + for function, input_list in inputs.items(): + if hasattr(function, "__name__"): + function_name = function.__name__ + else: + if hasattr(function, "name"): + function_name = function.name # type: ignore[attr-defined] + else: + raise Exception( # noqa: TRY002 + 'At least one of your functions has no attribute name please ensure all have one. m.foo.name = "foo"') + + + if input_list is not None and not isinstance(input_list, Sequence): + raise TypeError(f"Error inputs for function {function_name} is not a Sequence") + + function_arg_types = [arg.type for arg in function.schema.arguments[1:]] # type: ignore[attr-defined] + deflated_inputs_type: ListType = ListType(TupleType(function_arg_types)) + model._c._register_attribute(f"_bundled_inputs_deflated_{function_name}", deflated_inputs_type, []) + + if hasattr(model, "_generate_bundled_inputs_for_" + function_name): + if input_list is not None: + raise Exception( # noqa: TRY002 + f"inputs[{function_name}] is not None, but _generate_bundled_inputs_for_{function_name} is already defined" + ) + # Model author already defined _generate_bundled_inputs_for_. + elif input_list is None or len(input_list) == 0: + raise Exception( # noqa: TRY002 + f"inputs for {function_name} must be specified if " + f"_generate_bundled_inputs_for_{function_name} is not already defined" + ) + else: + # Iterate over the inputs and args in each input. + # Accumulate `deflated_inputs` as (possibly) compressed values + # and `parts` to be joined into the expression that unpacks them. + deflated_inputs = [] + parts = [] + for inp_idx, args in enumerate(input_list): + if not isinstance(args, tuple) and not isinstance(args, list): # type: ignore[arg-type] + raise TypeError( + f"Error bundled input for function {function_name} idx: {inp_idx} is not a Tuple or a List" + ) + deflated_args = [] + parts.append("(") + for arg_idx, arg in enumerate(args): + inflate_helper_fn_name = _get_inflate_helper_fn_name(arg_idx, inp_idx, function_name) + deflated, inflater, helper_definition = _inflate_expr( + arg, + f"deflated[{inp_idx}][{arg_idx}]", + inflate_helper_fn_name, + skip_size_check=skip_size_check, + ) + deflated_args.append(deflated) + parts.append(f" {inflater},") + if helper_definition: + model.define(textwrap.dedent(helper_definition)) + deflated_inputs.append(tuple(deflated_args)) + parts.append("),") + parts.append("") + expr = "\n".join(parts) + + # Back-channel return this expr for debugging. + if _receive_inflate_expr is not None: + _receive_inflate_expr.append(expr) + setattr(model, f"_bundled_inputs_deflated_{function_name}", deflated_inputs) + definition = textwrap.dedent(""" + def _generate_bundled_inputs_for_{name}(self): + deflated = self._bundled_inputs_deflated_{name} + return [ + {expr} + ] + """).format(expr=expr, name=function_name) + model.define(definition) + + # Define get_all_bundled_inputs_for_ that caches the generated inputs. + model.define(textwrap.dedent(""" + def get_all_bundled_inputs_for_{name}(self): + all_inputs = self._generate_bundled_inputs_for_{name}() + assert all_inputs is not None + return all_inputs + """).format(name=function_name)) + + # Add to the high level helper methods + inputs_info = repr(info[function]) if info and function in info else '[]' + get_bundled_inputs_functions_and_info_template += f""" + temp_dict : Dict[str,List[str]] = {{}} + info: List[str] = {inputs_info} + + temp_dict['info'] = info + temp_dict['get_inputs_function_name'] = ['get_all_bundled_inputs_for_{function_name}'] + all_inputs['{function_name}'] = temp_dict + """ + + # To ensure backwards compatibility and a streamlined api for forward these wrappers are provided + if function_name == 'forward': + model.define(textwrap.dedent(""" + def get_all_bundled_inputs(self): + return self.get_all_bundled_inputs_for_forward() + """)) + model.define(textwrap.dedent(""" + def get_num_bundled_inputs(self): + return len(self.get_all_bundled_inputs_for_forward()) + """)) + + # Define some high level helper methods that act on all bundled inputs + model.define(textwrap.dedent(f""" + def get_bundled_inputs_functions_and_info(self): + all_inputs : Dict[str, Dict[str,List[str]]] = {{}} + {get_bundled_inputs_functions_and_info_template} + return all_inputs + """)) + +def _inflate_expr( + arg: T, ref: str, inflate_helper_fn_name: str, skip_size_check: bool = False +) -> tuple[T | torch.Tensor, str, str | None]: + # Allow custom inflation expressions any object. + # For example, calling custom image-decoding ops. + # Or just use "{}" as the format string to ignore size limits. + if isinstance(arg, InflatableArg): + if arg.fmt_fn: + if arg.fmt not in ["{}", ""]: + raise Exception( # noqa: TRY002 + f"Bundled input argument at position '{ref}' has " + f"both arg.fmt_fn => \n{arg.fmt_fn} " + f"\n and arg.fmt => {arg.fmt}. " + "Please choose `arg.fmt` if the deflater is straightforward or " + "`arg.fmt_fn` if you need a function." + ) + + helper_definition = arg.fmt_fn.format(inflate_helper_fn_name) + expr = f"self.{inflate_helper_fn_name}({ref})" + + return arg.value, expr, helper_definition + else: + return arg.value, arg.fmt.format(ref), None + + if isinstance(arg, torch.Tensor): + # Small-storage tensors can just be saved directly. + if arg._typed_storage().size() <= MAX_RAW_TENSOR_SIZE or skip_size_check: + return arg, ref, None + # Small contiguous tensors can be cloned to have small storage. + # TODO: Should we do this even for non-contiguous tensors? + if arg.is_contiguous() and arg.numel() <= MAX_RAW_TENSOR_SIZE: + return arg.clone(), ref, None + # Example inputs commonly come from torch.zeros, torch.ones, or torch.full. + # These can be represented compactly. + for fmt in [torch.contiguous_format, torch.channels_last]: + if arg.is_contiguous(memory_format=fmt) and (arg == arg.flatten()[0]).all().item(): + return (arg.flatten()[0].clone().expand(*arg.size()), + f"{ref}.contiguous(memory_format={fmt})", None) + # Prevent big tensors from being bundled by default. + # TODO: Provide more useful diagnostics. + raise Exception( # noqa: TRY002 + f"Bundled input argument at position '{ref}' is " + f"a tensor with storage size {arg._typed_storage().size()}. " + f"You probably don't want to bundle this as an input. " + ) + else: + return arg, ref, None + +def _get_bundled_inputs_attributes_and_methods(script_module: torch.jit.ScriptModule) -> tuple[list[str], list[str]]: + methods: list[str] = [] + attributes: list[str] = [] + + # Has bundled inputs for forward + if hasattr(script_module, 'get_all_bundled_inputs'): + methods.append('get_all_bundled_inputs') + methods.append('get_num_bundled_inputs') + methods.append('run_on_bundled_input') + + if hasattr(script_module, 'get_bundled_inputs_functions_and_info'): + methods.append('get_bundled_inputs_functions_and_info') + all_info = script_module.get_bundled_inputs_functions_and_info() + for function_name in all_info: + methods.append("get_all_bundled_inputs_for_" + function_name) + methods.append("_generate_bundled_inputs_for_" + function_name) + attributes.append("_bundled_inputs_deflated_" + function_name) + + bundled_inputs_fn = getattr( + script_module, + f"get_all_bundled_inputs_for_{function_name}" + ) + num_bundled_inputs: int = len(bundled_inputs_fn()) + + # Check inflate helper functions for each function, argument and bundled input + func = getattr(script_module, function_name) + for arg_idx in range(len(func.schema.arguments) - 1): + for input_idx in range(num_bundled_inputs): + helper_fn_name = _get_inflate_helper_fn_name( + arg_idx=arg_idx, + input_idx=input_idx, + function_name=function_name + ) + # if the arg has an InflatableArg with fmt_fn, add the helper function name + if hasattr(script_module, helper_fn_name): + methods.append(helper_fn_name) + + return (methods, attributes) + + +def _get_inflate_helper_fn_name( + arg_idx: int, + input_idx: int, + function_name: str, +) -> str: + return f"_inflate_helper_for_{function_name}_input_{input_idx}_arg_{arg_idx}" + + + +def bundle_randn(*size, dtype=None): + """Generate a tensor that will be inflated with torch.randn.""" + stub = torch.zeros(1, dtype=dtype).expand(*size) + return InflatableArg(value=stub, fmt="torch.randn_like({})") + + +def bundle_large_tensor(t): + """Wrap a tensor to allow bundling regardless of size.""" + return InflatableArg(value=t, fmt="{}") diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/checkpoint.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/checkpoint.py new file mode 100644 index 0000000000000000000000000000000000000000..da74334025111c7edb932f99e983aaefbb1c0344 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/checkpoint.py @@ -0,0 +1,1669 @@ +# mypy: allow-untyped-defs +import contextlib +import platform +import uuid +import warnings +import weakref +from collections import defaultdict +from typing import * # noqa: F403 +import enum +from weakref import ReferenceType + +import torch +import torch.fx.traceback as fx_traceback +from torch.utils._pytree import tree_map +from torch.testing._internal.logging_tensor import capture_logs, LoggingTensorMode +from torch.utils._python_dispatch import TorchDispatchMode +from typing import NoReturn + +__all__ = [ + "checkpoint", + "checkpoint_sequential", + "CheckpointError", + "CheckpointFunction", + "check_backward_validity", + "detach_variable", + "get_device_states", + "set_device_states", + "noop_context_fn", + "set_checkpoint_early_stop", + "DefaultDeviceType", + "set_checkpoint_debug_enabled", + "CheckpointPolicy", + "SelectiveCheckpointContext", + "create_selective_checkpoint_contexts", + "SAC_IGNORED_OPS", + "GraphExecGroup", +] + +_DEFAULT_DETERMINISM_MODE = "default" + +_checkpoint_debug_enabled: Optional[bool] = None + + +@contextlib.contextmanager +def set_checkpoint_debug_enabled(enabled: Optional[bool]): + """ + Context manager that sets whether checkpoint should print additional debug + information when running. See the ``debug`` flag for + :func:`~torch.utils.checkpoint.checkpoint` for more information. Note that + when set, this context manager overrides the value of ``debug`` passed to + checkpoint. To defer to the local setting, pass ``None`` to this context. + + Args: + enabled (bool): Whether checkpoint should print debug information. + Default is 'None'. + """ + global _checkpoint_debug_enabled + try: + prev = _checkpoint_debug_enabled + _checkpoint_debug_enabled = enabled + yield + finally: + _checkpoint_debug_enabled = prev + + +def detach_variable(inputs: Tuple[Any, ...]) -> Tuple[torch.Tensor, ...]: + if isinstance(inputs, tuple): + out = [] + for inp in inputs: + if not isinstance(inp, torch.Tensor): + out.append(inp) + continue + + x = inp.detach() + x.requires_grad = inp.requires_grad + out.append(x) + return tuple(out) + else: + raise RuntimeError( + "Only tuple of tensors is supported. Got Unsupported input type: ", + type(inputs).__name__, + ) + + +def check_backward_validity(inputs: Iterable[Any]) -> None: + if not any(inp.requires_grad for inp in inputs if isinstance(inp, torch.Tensor)): + warnings.warn( + "None of the inputs have requires_grad=True. Gradients will be None", stacklevel=2 + ) + + +def _get_device_module(device="cuda"): + if device == "meta": + return torch.device("meta") + device_module = getattr(torch, device) + return device_module + + +class DefaultDeviceType: + r""" + A class that manages the default device type for checkpointing. + + If no non-CPU tensors are present, the default device type will + be used. The default value is 'cuda'. The device type is used in + the checkpointing process when determining which device states + to save and restore for recomputation. + """ + + _default_device_type: Optional[str] = None + + @staticmethod + def set_device_type(device: str = "cuda") -> None: + """ + Set the default device type for checkpointing. + + Args: + device (str): The device type to be set as default. Default is 'cuda'. + """ + DefaultDeviceType._default_device_type = device + + @staticmethod + def get_device_type() -> str: + """ + Get the current default device type for checkpointing. + + Returns: + str: The current default device type. + """ + if not DefaultDeviceType._default_device_type: + DefaultDeviceType._default_device_type = acc.type if (acc := torch.accelerator.current_accelerator(True)) else "cpu" + + return DefaultDeviceType._default_device_type + + +def _infer_device_type(*args): + device_types = [] + + def add_device_types(arg) -> None: + nonlocal device_types + if isinstance(arg, torch.Tensor) and arg.device.type != "cpu": + device_types.append(arg.device.type) + tree_map(add_device_types, args) + + device_types_set = set(device_types) + if len(device_types_set) > 1: + warnings.warn( + "Tensor arguments, excluding CPU tensors, are detected on at least two types of devices. " + "Device state will only be saved for devices of a single device type, and the remaining " + "devices will be ignored. Consequently, if any checkpointed functions involve randomness, " + "this may result in incorrect gradients. (Note that if CUDA devices are among the devices " + "detected, it will be prioritized; otherwise, the first device encountered will be selected.)" + f"\nDevice types: {sorted(device_types_set)} first device type: {device_types[0]}", stacklevel=2 + ) + if len(device_types) == 0: + return DefaultDeviceType.get_device_type() + elif "cuda" in device_types_set: + return "cuda" + else: + return device_types[0] + + +# We can't know if the run_fn will internally move some args to different devices, +# which would require logic to preserve rng states for those devices as well. +# We could paranoically stash and restore ALL the rng states for all visible devices, +# but that seems very wasteful for most cases. Compromise: Stash the RNG state for +# the device of all Tensor args. +# +# To consider: maybe get_device_states and set_device_states should reside in torch/random.py? +def get_device_states(*args) -> Tuple[List[int], List[torch.Tensor]]: + # This will not error out if "arg" is a CPU tensor or a non-tensor type because + # the conditionals short-circuit. + fwd_device_ids = [] + + def add_device_ids(arg) -> None: + nonlocal fwd_device_ids + if isinstance(arg, torch.Tensor) and arg.device.type not in {"cpu", "meta"}: + fwd_device_ids.append(arg.get_device()) + tree_map(add_device_ids, args) + + fwd_device_states = [] + device_module = _get_device_module(_infer_device_type(*args)) + for device_id in fwd_device_ids: + with device_module.device(device_id): + fwd_device_states.append(device_module.get_rng_state()) + + return fwd_device_ids, fwd_device_states + + +def set_device_states(devices, states, *, device_type=None) -> None: + """Sets random number generator states for the specified devices. + + Args: + devices: Device ids to set states for. + states: States to set. + device_type: ``device_type`` of the devices to set states for. Default + is the device returned by a call to ``DefaultDeviceType.get_device_type()``, + which is ``cuda`` if not changed by calling ``DefaultDeviceType::set_device_type()``. + """ + if device_type is None: + device_type = DefaultDeviceType.get_device_type() + if device_type == "meta": + return + device_module = _get_device_module(device_type) + for device, state in zip(devices, states, strict=False): + with device_module.device(device): + device_module.set_rng_state(state) + + +def _get_autocast_kwargs(device_type="cuda"): + if torch.amp.is_autocast_available(device_type): + device_autocast_kwargs = { + "enabled": torch.is_autocast_enabled(device_type), + "dtype": torch.get_autocast_dtype(device_type), + "cache_enabled": torch.is_autocast_cache_enabled(), + } + else: + device_autocast_kwargs = None + + cpu_autocast_kwargs = { + "enabled": torch.is_autocast_enabled('cpu'), + "dtype": torch.get_autocast_dtype('cpu'), + "cache_enabled": torch.is_autocast_cache_enabled(), + } + + return device_autocast_kwargs, cpu_autocast_kwargs + + +class CheckpointFunction(torch.autograd.Function): + @staticmethod + # pyrefly: ignore [bad-override] + def forward(ctx, run_function, preserve_rng_state, *args): + check_backward_validity(args) + ctx.run_function = run_function + ctx.preserve_rng_state = preserve_rng_state + # Accommodates the (remote) possibility that autocast is enabled for cpu AND gpu. + ctx.device_type = _infer_device_type(*args) + ctx.device_autocast_kwargs, ctx.cpu_autocast_kwargs = _get_autocast_kwargs( + ctx.device_type + ) + if preserve_rng_state: + ctx.fwd_cpu_state = torch.get_rng_state() + # Don't eagerly initialize the cuda context by accident. + # (If the user intends that the context is initialized later, within their + # run_function, we SHOULD actually stash the cuda state here. Unfortunately, + # we have no way to anticipate this will happen before we run the function.) + ctx.had_device_in_fwd = False + device_module = _get_device_module(ctx.device_type) + if getattr(device_module, "_initialized", False): + ctx.had_device_in_fwd = True + ctx.fwd_devices, ctx.fwd_device_states = get_device_states(*args) + + # Save non-tensor inputs in ctx, keep a placeholder None for tensors + # to be filled out during the backward. + ctx.inputs = [] + ctx.tensor_indices = [] + tensor_inputs = [] + for i, arg in enumerate(args): + if torch.is_tensor(arg): + tensor_inputs.append(arg) + ctx.tensor_indices.append(i) + ctx.inputs.append(None) + else: + ctx.inputs.append(arg) + + ctx.save_for_backward(*tensor_inputs) + + with torch.no_grad(): + outputs = run_function(*args) + return outputs + + @staticmethod + def backward(ctx, *args): + if not torch.autograd._is_checkpoint_valid(): + raise RuntimeError( + "When use_reentrant=True, torch.utils.checkpoint is incompatible" + " with .grad() or passing an `inputs` parameter to .backward()." + " To resolve this error, you can either set use_reentrant=False," + " or call .backward() without passing the `inputs` argument." + ) + # Copy the list to avoid modifying original list. + inputs = list(ctx.inputs) + tensor_indices = ctx.tensor_indices + tensors = ctx.saved_tensors + + # Fill in inputs with appropriate saved tensors. + for i, idx in enumerate(tensor_indices): + inputs[idx] = tensors[i] + + # Stash the surrounding rng state, and mimic the state that was + # present at this time during forward. Restore the surrounding state + # when we're done. + rng_devices = [] + if ctx.preserve_rng_state and ctx.had_device_in_fwd: + rng_devices = ctx.fwd_devices + with torch.random.fork_rng( + devices=rng_devices, enabled=ctx.preserve_rng_state, device_type=ctx.device_type + ): + if ctx.preserve_rng_state: + torch.set_rng_state(ctx.fwd_cpu_state) + if ctx.had_device_in_fwd: + set_device_states(ctx.fwd_devices, ctx.fwd_device_states, device_type=ctx.device_type) + detached_inputs = detach_variable(tuple(inputs)) + + device_autocast_ctx = torch.amp.autocast( + device_type=ctx.device_type, **ctx.device_autocast_kwargs + ) if torch.amp.is_autocast_available(ctx.device_type) else contextlib.nullcontext() + with torch.enable_grad(), device_autocast_ctx, torch.amp.autocast("cpu", **ctx.cpu_autocast_kwargs): # type: ignore[attr-defined] + outputs = ctx.run_function(*detached_inputs) + + if isinstance(outputs, torch.Tensor): + outputs = (outputs,) + + # run backward() with only tensor that requires grad + outputs_with_grad = [] + args_with_grad = [] + for i in range(len(outputs)): + if torch.is_tensor(outputs[i]) and outputs[i].requires_grad: + outputs_with_grad.append(outputs[i]) + args_with_grad.append(args[i]) + if len(outputs_with_grad) == 0: + raise RuntimeError( + "none of output has requires_grad=True," + " this checkpoint() is not necessary" + ) + torch.autograd.backward(outputs_with_grad, args_with_grad) + grads = tuple( + inp.grad if isinstance(inp, torch.Tensor) else None + for inp in detached_inputs + ) + + return (None, None) + grads + + +def noop_context_fn(): + return contextlib.nullcontext(), contextlib.nullcontext() + +# Note: [torch.compile and checkpoint] +# TorchDynamo does not step inside utils.checkpoint function. The flow +# looks likes this +# 1) TorchDynamo tries to wrap utils.checkpoint in a HigherOrderOp by +# speculatively checking if the forward function is safe to trace. +# 2) If yes, then Dynamo-generated Fx graph has the wrapped higher +# order op. As a result, TorchDynamo does not look inside utils.checkpoint. +# 3) If not, then TorchDynamo falls back to eager by performing a graph +# break. And here, the following disable wrapper ensures that +# TorchDynamo does not trigger again on the frames created by +# utils.checkpoint innards. +@torch._disable_dynamo +def checkpoint( + function, + *args, + use_reentrant: Optional[bool] = None, + context_fn: Callable[[], Tuple[ContextManager, ContextManager]] = noop_context_fn, + determinism_check: str = _DEFAULT_DETERMINISM_MODE, + debug: bool = False, + early_stop: bool = True, + **kwargs +): + r"""Checkpoint a model or part of the model. + + Activation checkpointing is a technique that trades compute for memory. + By default, tensors computed during the forward pass are kept alive until + they are used in gradient computations in the backward pass. To reduce this + memory usage, tensors produced in the passed :attr:`function` are not kept + alive until the backward pass. Instead, any passed tensors in :attr:`args` + are kept alive, and the unsaved tensors are recomputed by re-invoking + :attr:`function` in the backward pass as needed for gradient computation. + Activation checkpointing can be applied to any part of a model -- this is + sometimes described as "checkpointing" that part of the model. + + There are currently two checkpointing implementations available, determined + by the :attr:`use_reentrant` parameter. It is recommended that you use + ``use_reentrant=False``. Please refer the note below for a discussion of + their differences. + + .. warning:: + + If the :attr:`function` invocation during the backward pass differs + from the forward pass, e.g., due to a global variable, the checkpointed + version may not be equivalent, potentially causing an + error being raised or leading to silently incorrect gradients. + + .. warning:: + + The ``use_reentrant`` parameter should be passed explicitly. In version + 2.9 we will raise an exception if ``use_reentrant`` is not passed. + If you are using the ``use_reentrant=True`` variant, please refer to the + note below for important considerations and potential limitations. + + .. note:: + + The reentrant variant of checkpoint (``use_reentrant=True``) and + the non-reentrant variant of checkpoint (``use_reentrant=False``) + differ in the following ways: + + * Non-reentrant checkpoint stops recomputation as soon as all needed + intermediate activations have been recomputed. This feature is enabled + by default, but can be disabled with :func:`set_checkpoint_early_stop`. + Reentrant checkpoint always recomputes :attr:`function` in its + entirety during the backward pass. + + * The reentrant variant does not record the autograd graph during the + forward pass, as it runs with the forward pass under + :func:`torch.no_grad`. The non-reentrant version does record the + autograd graph, allowing one to perform backward on the graph within + checkpointed regions. + + * The reentrant checkpoint only supports the + :func:`torch.autograd.backward` API for the backward pass without its + `inputs` argument, while the non-reentrant version supports all ways + of performing the backward pass. + + * At least one input and output must have ``requires_grad=True`` for the + reentrant variant. If this condition is unmet, the checkpointed part + of the model will not have gradients. The non-reentrant version does + not have this requirement. + + * The reentrant version does not consider tensors in nested structures + (e.g., custom objects, lists, dicts, etc) as participating in + autograd, while the non-reentrant version does. + + * The reentrant checkpoint does not support checkpointed regions with + detached tensors from the computational graph, whereas the + non-reentrant version does. For the reentrant variant, if the + checkpointed segment contains tensors detached using ``detach()`` or + with :func:`torch.no_grad`, the backward pass will raise an error. + This is because ``checkpoint`` makes all the outputs require gradients + and this causes issues when a tensor is defined to have no gradient in + the model. To avoid this, detach the tensors outside of the + ``checkpoint`` function. + + Args: + function: describes what to run in the forward pass of the model or + part of the model. It should also know how to handle the inputs + passed as the tuple. For example, in LSTM, if user passes + ``(activation, hidden)``, :attr:`function` should correctly use the + first input as ``activation`` and the second input as ``hidden`` + args: tuple containing inputs to the :attr:`function` + + Keyword args: + preserve_rng_state(bool, optional): Omit stashing and restoring + the RNG state during each checkpoint. Note that under torch.compile, + this flag doesn't take effect and we always preserve RNG state. + Default: ``True`` + use_reentrant(bool): + specify whether to use the activation checkpoint variant that + requires reentrant autograd. This parameter should be passed + explicitly. In version 2.9 we will raise an exception if + ``use_reentrant`` is not passed. If ``use_reentrant=False``, + ``checkpoint`` will use an implementation that does not require + reentrant autograd. This allows ``checkpoint`` to support additional + functionality, such as working as expected with + ``torch.autograd.grad`` and support for keyword arguments input into + the checkpointed function. + context_fn(Callable, optional): A callable returning a tuple of two + context managers. The function and its recomputation will be run + under the first and second context managers respectively. + This argument is only supported if ``use_reentrant=False``. + determinism_check(str, optional): A string specifying the determinism + check to perform. By default it is set to ``"default"`` which + compares the shapes, dtypes, and devices of the recomputed tensors + against those the saved tensors. To turn off this check, specify + ``"none"``. Currently these are the only two supported values. + Please open an issue if you would like to see more determinism + checks. This argument is only supported if ``use_reentrant=False``, + if ``use_reentrant=True``, the determinism check is always disabled. + debug(bool, optional): If ``True``, error messages will also include + a trace of the operators ran during the original forward computation + as well as the recomputation. This argument is only supported if + ``use_reentrant=False``. + early_stop(bool, optional): If ``True``, non-reentrant checkpoint stops + recomputation as soon as it has computed all needed Tensors. This + argument is ignored if ``use_reentrant=True``. Can be overridden + globally using :func:`set_checkpoint_early_stop` context manager. + Default: ``True``. + + Returns: + Output of running :attr:`function` on :attr:`*args` + """ + if use_reentrant is None: + warnings.warn( + "torch.utils.checkpoint: the use_reentrant parameter should be " + "passed explicitly. Starting in PyTorch 2.9, calling checkpoint " + "without use_reentrant will raise an exception. use_reentrant=False is " + "recommended, but if you need to preserve the current default " + "behavior, you can pass use_reentrant=True. Refer to docs for more " + "details on the differences between the two variants.", + stacklevel=2 + ) + use_reentrant = True + + # Hack to mix *args with **kwargs in a python 2.7-compliant way + preserve = kwargs.pop("preserve_rng_state", True) + if kwargs and use_reentrant: + raise ValueError( + "Unexpected keyword arguments: " + ",".join(arg for arg in kwargs) + ) + + if use_reentrant: + if context_fn is not noop_context_fn or debug is not False: + raise ValueError( + "Passing `context_fn` or `debug` is only supported when " + "use_reentrant=False." + ) + return CheckpointFunction.apply(function, preserve, *args) + else: + gen = _checkpoint_without_reentrant_generator( + function, preserve, context_fn, determinism_check, debug, early_stop, *args, **kwargs + ) + # Runs pre-forward logic + next(gen) + ret = function(*args, **kwargs) + # Runs post-forward logic + try: + next(gen) + except StopIteration: + return ret + + +def checkpoint_sequential(functions, segments, input, use_reentrant=None, **kwargs): + r"""Checkpoint a sequential model to save memory. + + Sequential models execute a list of modules/functions in order + (sequentially). Therefore, we can divide such a model in various segments + and checkpoint each segment. All segments except the last will not store + the intermediate activations. The inputs of each checkpointed segment will + be saved for re-running the segment in the backward pass. + + .. warning:: + The ``use_reentrant`` parameter should be passed explicitly. In version + 2.9 we will raise an exception if ``use_reentrant`` is not passed. + If you are using the ``use_reentrant=True` variant, please see + :func:`~torch.utils.checkpoint.checkpoint` for + the important considerations and limitations of this variant. It is + recommended that you use ``use_reentrant=False``. + + .. warning: + Since PyTorch 1.4, it allows only one Tensor as the input and + intermediate outputs, just like :class:`torch.nn.Sequential`. + + Args: + functions: A :class:`torch.nn.Sequential` or the list of modules or + functions (comprising the model) to run sequentially. + segments: Number of chunks to create in the model + input: A Tensor that is input to :attr:`functions` + preserve_rng_state(bool, optional): Omit stashing and restoring + the RNG state during each checkpoint. + Default: ``True`` + use_reentrant(bool): + specify whether to use the activation checkpoint variant that + requires reentrant autograd. This parameter should be passed + explicitly. In version 2.5 we will raise an exception if + ``use_reentrant`` is not passed. If ``use_reentrant=False``, + ``checkpoint`` will use an implementation that does not require + reentrant autograd. This allows ``checkpoint`` to support additional + functionality, such as working as expected with + ``torch.autograd.grad`` and support for keyword arguments input into + the checkpointed function. + + Returns: + Output of running :attr:`functions` sequentially on :attr:`*inputs` + + Example: + >>> # xdoctest: +SKIP("stub") + >>> model = nn.Sequential(...) + >>> input_var = checkpoint_sequential(model, chunks, input_var) + """ + if use_reentrant is None: + warnings.warn( + "torch.utils.checkpoint.checkpoint_sequential: the use_reentrant " + "parameter should be passed explicitly. " + "In version 2.9 we will raise an exception if use_reentrant " + "is not passed. use_reentrant=False is " + "recommended, but if you need to preserve the current default " + "behavior, you can pass use_reentrant=True. Refer to docs for more " + "details on the differences between the two variants.", stacklevel=2 + ) + use_reentrant = True + + # Hack for keyword-only parameter in a python 2.7-compliant way + preserve = kwargs.pop("preserve_rng_state", True) + if kwargs: + raise ValueError( + "Unexpected keyword arguments: " + ",".join(arg for arg in kwargs) + ) + + def run_function(start, end, functions): + def forward(input): + for j in range(start, end + 1): + input = functions[j](input) + return input + + return forward + + if isinstance(functions, torch.nn.Sequential): + functions = list(functions.children()) + + segment_size = len(functions) // segments + # the last chunk has to be non-volatile + end = -1 + for start in range(0, segment_size * (segments - 1), segment_size): + end = start + segment_size - 1 + input = checkpoint( + run_function(start, end, functions), + input, + use_reentrant=use_reentrant, + preserve_rng_state=preserve, + ) + return run_function(end + 1, len(functions) - 1, functions)(input) + + +def _internal_assert(cond) -> None: + if not cond: + raise AssertionError( + "Something went unexpectedly wrong in activation checkpoint. " + "Please report this bug by filing an issue to PyTorch." + ) + + +# NOTE [ Nestable Checkpoint ] +# +# The semantics of nested checkpoint can be defined by two basic rules. +# Following the two rules leads to an important implication that is central +# to motivating the design. +# +# Rule 1. Saved tensors are managed by inner-most checkpoint only and hidden +# from any outer layers of checkpoint. +# +# Rule 2. The inputs of inner checkpoints are treated as tensors saved to its +# parent checkpoint. +# +# Implication: To recompute any given saved tensor, we need to recompute all of +# the checkpoints wrapping it. +# +# Why is this implied? To unpack a saved tensor X during backward we need to +# recompute the inner-most checkpoint (#1), and in order to recompute that +# checkpoint I need to have its inputs, which are managed by that checkpoint's +# parent (#2), which thus also needs to be recomputed first. Continue this line +# of reasoning and we realize that in order to unpack X, all checkpoints that +# were active at the time X was saved need to be recomputed. (unless we have +# already done so in that backward for some other saved tensor). +# +# In practice, we use a noop autograd Function to save inputs as saved tensors. +# During unpack calling ctx.saved_tensor triggers the parent checkpoint to +# recompute. +# +# Rule 3. We should start recomputation as if there are no checkpoints currently +# active. Checkpoints encountered during recomputation are still +# respected. +# +# When we start recomputation, we push the saved variable hook meant for +# recomputation on the stack. See examples in Rule 6 for more context. +# +# * * * * +# +# Beyond the basic semantics specific to nested checkpoint, we impose several +# more constraints that may apply to checkpointing in general. +# +# Rule 4. Lifetime of recomputed tensors +# +# Recomputed tensors are considered specific to particular invocations +# of backward and are always cleared immediately as they are unpacked +# Particularly, we require this to happen even if retain_graph=True. +# +# [ Implementation details of Rule 4 ] +# +# If we were okay with recomputed tensors staying alive after backward is run +# with retain_graph=True, we would store recomputed variables as the values of a +# WeakKeyDictionary and pack strong references to the keys, so that as we +# backward, those packed keys would be cleared as long as retain_graph=False. +# Clearing the packed key clears the corresponding entry in the WKD. +# +# If we wish recomputed variables to be immediately cleared as we unpack them in +# the retain_graph=True case, we cannot rely on the packed keys to be cleared by +# backward automatically. Instead of packing the strong reference to the key +# directly, we pack a container object, which we manually clear as we unpack. +# +# An important detail is that if a second backward happens, the second +# recomputation needs to reset the container with a newly created key. +# +# Rule 5. Stop recomputation as soon as we've recomputed the saved tensors we +# know we need. +# +# [ Implementation details of Rule 5 ] +# +# During recomputation, raise an exception if the number of recomputed tensors +# matches the number of tensors that we expected to recompute. We wrap the +# recomputation call with a try-catch to catch this specific exception. See +# Rule #6 below for some examples. +# +# Rule 6. We support doing backward inside checkpoint context +# +# [ retain_graph is True] +# +# def fn(x): +# y = x.sin() +# z = y.cos() +# gx, = torch.autograd.grad(z, x, retains_grad=True) +# return gx, z +# +# out = checkpoint(fn)(inp) +# out.backward() +# +# Because z is saved by cos while checkpoint is enabled, it would not be +# actually saved, and so the .grad() call inside must trigger a recomputation. +# +# During recomputation the "inner pack hook" has two responsibilities: +# +# 1) As usual, populating the WeakKeyDictionary storing recomputed tensors +# 2) Pack the actual tensor (detached) so that one may perform backward on the +# recomputed graph. The tensors saved to this graph will live until the end +# of recomputation, or die earlier if someone performs backward with +# retain_graph=False. +# +# More generally performing backward on the recomputed graph occurs in the +# following cases: +# - If backward is performed inside forward, +# - During the original forward IF early-stop is disabled +# - During the original backward +# - If there are multiple .grad()/.backward() calls, we would perform backward +# on the recomputed graph even if early-stop is enabled (see the example below) +# +# [ retain_graph is False ] +# +# The example below shows what happens if during recomputation we find that some +# of the tensors we are trying to recompute have already been cleared. +# +# Spoiler: we don't do anything special, we just skip over them! +# +# def fn(x): +# y = x.sin() # (1) +# z = y.cos() # (2) +# gx, = torch.autograd.grad(z, x) # (3) +# return x.cos() * gx # (4) +# +# out = checkpoint(fn)(inp) +# out.backward() # (5) +# +# 1, 2. Don't save x and y since we are inside a checkpoint. +# 3. Trigger a recompute of fn since x and y weren't saved. +# And depending on whether early stop is enabled, either stop at (2) or +# continue running the function. +# Because we are running backward with retain_graph=False, we clear x and y's +# holders. +# 4. Don't save x since we are inside a checkpoint. +# 5. Calling backward triggers another recompute of fn. During recompute, we see +# that x and y have already been cleared in the original graph as indicated +# by holder=None. We skip over them. We still save x at (4) (since its holder +# is still alive.) + +_enable_checkpoint_early_stop: Optional[bool] = None + + +@contextlib.contextmanager +def set_checkpoint_early_stop(enable: bool): + """Context manager that sets whether checkpoint should stop recomputation early. + + By default, non-reentrant checkpoint stops recomputation as soon as it + has computed all needed Tensors. This context manager can be used to disable + that feature if it is problematic for your specific application. + + This context manager only needs to be active when forward is run. It does + not need to be active during backward. + + Example:: + + >>> # xdoctest: +SKIP(failing) + >>> message = "saved tensors default hooks are disabled" + >>> with set_checkpoint_early_stop(False): + ... # Any checkpoint under this context manager will respect this + ... # context manager, even if its backward is performed outside. + ... out = checkpoint(fn, inputs) + ... + >>> out.backward() + """ + global _enable_checkpoint_early_stop + try: + prev = _enable_checkpoint_early_stop + _enable_checkpoint_early_stop = enable + yield + finally: + _enable_checkpoint_early_stop = prev + + +class _Handle: + pass + + +class _Holder: + def __init__(self) -> None: + self.handles: Dict[int, Optional[_Handle]] = {} + + +class _NoopSaveInputs(torch.autograd.Function): + @staticmethod + # pyrefly: ignore [bad-override] + def forward(*args): + return torch.empty((0,)) + + @staticmethod + def setup_context(ctx: Any, inputs: Tuple[Any, ...], output: Any) -> None: + # Only tensors can be saved with ctx.save_for_backward, everything else + # is captured by get_args, which is saved directly on ctx + tensor_indices, tensors = zip( + *[(i, o) for i, o in enumerate(inputs) if isinstance(o, torch.Tensor)], strict=False + ) + idx2saved_idx = {b: a for a, b in enumerate(tensor_indices)} + # args but with tensors replaced with None as placeholders + args = [None if isinstance(o, torch.Tensor) else o for o in inputs] + + def get_args(saved_tensors): + # restore the placeholders with the original tensors grabbed from + # ctx.saved_tensors (which may be saved on a parent checkpoint if + # this checkpoint is nested, and that would trigger a recursive + # unpack!) + ret = [ + saved_tensors[idx2saved_idx[i]] if i in tensor_indices else o + for i, o in enumerate(args) + ] + # grab the tail since we also saved the dummy to avoid having to explicitly + # handle the case where there are no tensor inputs + return ret[1:] + + ctx.get_args = get_args + ctx.save_for_backward(*tensors) + + @staticmethod + def backward(ctx, *grad_outputs) -> NoReturn: + raise AssertionError("Did not expect to backward on this graph") + + +class _CheckpointFrame: + def __init__(self, recompute_fn, early_stop, unpack_error_cb, metadata_fn) -> None: + self.recompute_fn = recompute_fn + self.input_saver = None + self.weak_holders: List[ReferenceType] = [] + # We store this as a weakkeydictionary so that in the case of a partial + # backward, the entries in the dict are cleared alongside the Holder + # which will be removed when the SavedVariable is cleared. + self.recomputed: DefaultDict[ + int, weakref.WeakKeyDictionary[_Handle, torch.Tensor] + ] = defaultdict(weakref.WeakKeyDictionary) + # We need both recomp_counter and recomputed since they can diverge + # https://github.com/pytorch/pytorch/pull/90105#discussion_r1135889885 + self.recomp_counter: DefaultDict[int, int] = defaultdict(int) + self.is_recomputed: DefaultDict[int, bool] = defaultdict(bool) + + # See Rule 5 + self.early_stop = early_stop + + # Debugging + self.metadata_fn = metadata_fn + self.unpack_error_cb = unpack_error_cb + self.x_metadatas = [] + self.forward_completed = False + self.ignore_saved_mismatch = False + + def check_recomputed_tensors_match(self, gid) -> None: + if self.ignore_saved_mismatch: + # TODO: we can probably make this check stricter by checking that + # the metadata of the first tensors still match. + return + # NOTE [ Error handling for checkpoint ] + # + # At a high level, we need to check that the tensors saved + # during original forward matches tensors saved during recompute + # This means handling 3 cases: + # + # 1. During recompute, more tensors were saved. + # + # Usually this is hidden due to the StopRecomputationError + # but if early stop is not enabled, or we would have errored + # anyway because there aren't enough weak_holders. But we + # do want to have a nice error. See the _recomputation_hook + # for details. + if not len(self.weak_holders) == self.recomp_counter[gid]: + # 2. During recompute, fewer tensors were saved + # + # We know that every time we save something do original forward + # we append to weak_holder, and every time we save a tensor + # during recompute we increment recompute_counter. + raise CheckpointError( + "torch.utils.checkpoint: A different number of tensors was saved " + "during the original forward and recomputation.\n" + f"Number of tensors saved during forward: {len(self.weak_holders)}\n" + f"Number of tensors saved during recomputation: {self.recomp_counter[gid]}.\n" + f"{_debug_tip_msg}" + ) + + # 3. During recompute, the same tensors were saved, but they + # have different metadata + nb_meta_different = [] + for idx, weak_holder in enumerate(self.weak_holders): + holder = weak_holder() + if holder is None: + continue + # We've seen all holders since we iterate over them in order + # For every holder that is still alive now, it must've been + # alive when we saw it during recompute, therefore, the + # gid must be set. + _internal_assert(gid in holder.handles) + # We know this is the first unpack, so it couldn't have been set + # to None yet. + _internal_assert(holder.handles[gid] is not None) + # We always set these together in the recomputation hook + _internal_assert(holder.handles[gid] in self.recomputed[gid]) + # see pack hook, x_metadata is 1:1 with weak_holders. + x_meta = self.x_metadatas[idx] + recomputed_x = self.recomputed[gid][holder.handles[gid]] + if x_meta != self.metadata_fn(recomputed_x): + nb_meta_different.append((idx, x_meta, self.metadata_fn(recomputed_x))) + + if len(nb_meta_different) > 0: + mismatched_tensors = "" + for idx, x_meta, recomputed_meta in nb_meta_different: + mismatched_tensors += ( + f"tensor at position {idx}:\n" + f"saved metadata: {x_meta}\n" + f"recomputed metadata: {recomputed_meta}\n" + ) + raise CheckpointError( + "torch.utils.checkpoint: Recomputed values for the following tensors " + "have different metadata than during the forward pass.\n" + f"{mismatched_tensors}.\n" + f"{_debug_tip_msg}" + ) + + +_debug_tip_msg = """ +Tip: To see a more detailed error message, either pass `debug=True` to +`torch.utils.checkpoint.checkpoint(...)` or wrap the code block +with `with torch.utils.checkpoint.set_checkpoint_debug_enabled(True):` to +enable checkpoint‑debug mode globally. +""" + + +_checkpoint_error_template = """ \ +An error happened while unpacking tensors; dumping logs of latest computation +because you passed `debug=True` to `torch.utils.checkpoint.checkpoint()`. +Scroll all the way down for guidance on how to navigate these logs. + ++~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ +| 1. Stack traces of the operators that ran in the original forward | ++------------------------------------------------------------------------------+ + +{forward_traces} ++~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ +| 2. Stack traces of the operators that ran during recomputation | ++------------------------------------------------------------------------------+ + +{recompute_traces} ++~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ +| 3. Log of operators in the original forward and recomputation | ++------------------------------------------------------------------------------+ +(Scroll up to correlate stack traces with each operation listed below. This + helps identify their source in the code.) + +IMPORTANT: Differences in "detach" calls between the original forward and the + recomputation are expected. They are introduced by the checkpointing + mechanism and can be ignored. + +Operations executed during the original forward: + +{forward_ops} + +Operations executed during recomputation: + +{recompute_ops} + ++------------------------------------------------------------------------------+ + ERROR: Detected non-determinism while running activation checkpointing + + You are seeing this error because you passed `debug=True` to checkpoint and + tensors to be saved during the original forward and differ between those saved + during recomputation. This can happen if different operators were ran in the + original forward and in the recomputation. + + To identify where the mismatch may be coming from, you can do the following: + + 1) Compare the operators ran during original forward and recomputation to + see where they differ. These operators are printed above in the order they + were executed. + + 2) Review the stack trace for each operator to locate its invocation source. + Each operator's stack trace is printed in their execution order. + + Note that the logs can be quite long. Here's how they are structured: + (Tip: you can Ctrl-f for these headers) + + 1. Stack traces of the operators that ran in the original forward + 2. Stack traces of the operators that ran during recomputation + 3. Log of operators in the original forward and recomputation + 4. Error message <--- You are here +-------------------------------------------------------------------------------- +""" + +class CheckpointError(RuntimeError): + pass + + +def _get_debug_context_and_cb() -> Tuple[Callable[[], Any], Callable[[CheckpointError], None]]: + # This function returns the context_fn and error_cb to be used by the + # checkpointing mechanism. error_cb is invoked when an error is detected + # during unpack. + + # record_context_cpp is not support on non-linux non-x86_64 platforms + cpp_tb = platform.machine() == 'x86_64' and platform.system() == 'Linux' + + class CaptureLogs: + def __init__(self) -> None: + self.logs = None + self.tbs = None + + def get_context_manager(self): + @contextlib.contextmanager + def logging_mode(): + with LoggingTensorMode(), \ + capture_logs(True, python_tb=True, script_tb=True, cpp_tb=cpp_tb) as logs_and_tb: + # pyrefly: ignore [bad-assignment] + self.logs, self.tbs = logs_and_tb + yield logs_and_tb + return logging_mode() + + capture_logs_fwd = CaptureLogs() + capture_logs_recompute = CaptureLogs() + + def unpack_error_cb(e: CheckpointError) -> NoReturn: + def get_str_tb(label, capture_logs): + out = "" + total_len = len(capture_logs.logs) + for i, (log, tb) in enumerate(zip(capture_logs.logs, capture_logs.tbs, strict=False)): + out += f"{log} ({i + 1} of {total_len} in {label})\n\n" + found_torch_dispatch = False + for line in tb: + # Start printing stack trace only after __torch_dispatch__ is found + is_torch_dispatch = line['name'] == '__torch_dispatch__' + if not found_torch_dispatch and not is_torch_dispatch: + continue + elif is_torch_dispatch: + found_torch_dispatch = True + continue + out += f"{line['filename']}:{line['line']}:{line['name']}\n" + out += "\n\n" + return out + if capture_logs_fwd.logs is None: + raise AssertionError("capture_logs_fwd.logs is None") + if capture_logs_recompute.logs is None: + raise AssertionError("capture_logs_recompute.logs is None") + raise CheckpointError( + _checkpoint_error_template.format( + forward_traces=get_str_tb("original", capture_logs_fwd), + recompute_traces=get_str_tb("recompute", capture_logs_recompute), + forward_ops="\n".join(capture_logs_fwd.logs), + recompute_ops="\n".join(capture_logs_recompute.logs) + ) + ) from e + + def context_fn(): + return capture_logs_fwd.get_context_manager(), capture_logs_recompute.get_context_manager() + + return context_fn, unpack_error_cb + +def _default_meta_extractor(x: torch.Tensor) -> Dict[str, Any]: + # These properties are fast to check, easy to understand + return { + "shape": x.shape, + "dtype": x.dtype, + "device": x.device + } + +_allowed_determinism_checks_to_fns: Dict[str, Callable[[torch.Tensor], Any]] = { + _DEFAULT_DETERMINISM_MODE: _default_meta_extractor, + "none": lambda _: None, +} + +# See Rule 5 +class _StopRecomputationError(Exception): + pass + + +class _recomputation_hook(torch.autograd.graph.saved_tensors_hooks): + def __init__(self, target_frame_ref: ReferenceType, gid: Union["GraphExecGroup", int]) -> None: + def pack_hook(x): + x = x.detach() if x.requires_grad else x + target_frame = target_frame_ref() + if target_frame is None: + raise AssertionError("Internal error: target_frame reference is None") + recomp_idx = target_frame.recomp_counter[gid] + target_frame.recomp_counter[gid] += 1 + + if recomp_idx >= len(target_frame.weak_holders): + if target_frame.early_stop: + raise AssertionError("Unexpected state: target_frame.early_stop is set") + if not target_frame.forward_completed: + # We run into this case when early stop is not enabled and do + # grad within checkpoint. + # We need to set this flag, so we don't error out later when + # we check if the number of tensors saved during forward and + # recomputation match. + target_frame.ignore_saved_mismatch = True + return x + raise CheckpointError( + "torch.utils.checkpoint: trying to save more tensors during " + "recomputation than during the original forward pass.\n" + f"{_debug_tip_msg}" + ) + + holder = target_frame.weak_holders[recomp_idx]() + + # This holder may have been cleared because someone may have called + # backward within forward. If so, we don't need to save. + if holder is not None: + _internal_assert(holder.handles.get(gid, None) is None) + holder.handles[gid] = _Handle() + target_frame.recomputed[gid][holder.handles[gid]] = x + + if target_frame.early_stop and target_frame.recomp_counter[gid] == len( + target_frame.weak_holders + ): + raise _StopRecomputationError + # See Rule 6: [ retain_graph is True ] above + return x + + def unpack_hook(x): + # See Rule 6: [ retain_graph is True ] above for an example of when + # the graph created during recomputation could be backwarded. + return x + + super().__init__(pack_hook, unpack_hook) + + +# torch._disable_dynamo creates a reference cycle with decorated function +# This function is used to ensure that the decorated function does not have +# a closure, so that other objects aren't also kept alive. +# https://github.com/pytorch/pytorch/issues/154642 +# Note: does not work when fn is compiled +@torch._disable_dynamo +def _run_fn_with_dynamo_disabled(fn, *args, **kwargs): + return fn(*args, **kwargs) + + +class _checkpoint_hook(torch.autograd.graph.saved_tensors_hooks): + def __init__(self, frame) -> None: + def pack_hook(x): + # See Rule 4 above + holder = _Holder() + frame.weak_holders.append(weakref.ref(holder)) + # Save metadata to detect non-determinism + if frame.metadata_fn is not None: + with torch.no_grad(): + frame.x_metadatas.append(frame.metadata_fn(x)) + return holder + + def unpack_hook(holder): + # First check if we're inside a GraphExecGroup context + gid: Union[GraphExecGroup, None, int] = GraphExecGroup._get_current_group() + if gid is None: + # Fallback to using the current graph task id + gid = torch._C._current_graph_task_id() + if gid == -1: + # generate a temporary id if we trigger unpack outside of a backward call + gid = int(uuid.uuid4()) + + if not frame.is_recomputed[gid]: + ctx = frame.input_saver.grad_fn + args = ctx.get_args(ctx.saved_tensors) + + try: + with _recomputation_hook( + weakref.ref(frame), gid + ), torch.autograd.enable_grad(): + # See Note: [compiled autograd and checkpoint unpack hook] + _run_fn_with_dynamo_disabled(frame.recompute_fn, *args) + except _StopRecomputationError: + pass + frame.is_recomputed[gid] = True + frame.check_recomputed_tensors_match(gid) + + _internal_assert(gid in holder.handles) + + if holder.handles[gid] is None: + extra = "" + if torch._C._get_graph_exec_group() is not None: + extra = ( + "Performing two backward calls that overlap (i.e. require the same " + "saved activation in order to compute gradients) is not allowed while " + "under the torch.utils.checkpoint.GraphExecGroup context. " + ) + raise CheckpointError( + "torch.utils.checkpoint: Unpack is being triggered for a tensor that was already " + f"unpacked once. {extra}If you are calling ctx.saved_tensors in backward, make sure " + "to do so only once. Otherwise please open an issue with details on your use case." + ) + _internal_assert(holder.handles[gid] in frame.recomputed[gid]) + ret = frame.recomputed[gid][holder.handles[gid]] + holder.handles[gid] = None + return ret + + if frame.unpack_error_cb is not None: + def unpack_hook_with_error_cb(holder): + try: + return unpack_hook(holder) + except CheckpointError as e: + frame.unpack_error_cb(e) + super().__init__(pack_hook, unpack_hook_with_error_cb) + else: + super().__init__(pack_hook, unpack_hook) + + +def _is_compiling(func, args, kwargs): + # Check if we are under AOTAutograd tracing + # Checking that a functional mode is active should always do what we want + return torch._C._get_dispatch_mode(torch._C._TorchDispatchModeKey.PROXY) is not None + + +class _VersionWrapper: + # Check that cached tensors are not mutated. + def __init__(self, val) -> None: + self.val: Union[torch.Tensor, Any] = val + self.version: Optional[int] = val._version if isinstance(val, torch.Tensor) else None + + def get_val(self, allow_cache_entry_mutation): + if self.version is not None and not allow_cache_entry_mutation: + if self.val._version != self.version: + # Can we give user a stack trace of where the mutation happened? + raise RuntimeError( + "Tensor cached during selective activation checkpoint has been mutated" + ) + return self.val + + +def _maybe_detach(x, any_ret_has_alias_info): + # We detach for two separate reasons: + # - For view ops, we need to ensure that when the tensor is returned from + # CachedDispatchMode, as_view sees that the AutogradMeta is nullptr + # - Avoid reference cycles + # For case 1, it is not enough to check whether x has differentiable dtype + # because non-differentiable dtype can have non-nullptr AutogradMeta, e.g. + # when the tensor is a view. + if isinstance(x, torch.Tensor) and (x.is_floating_point() or x.is_complex() or any_ret_has_alias_info): + with torch._C._SetExcludeDispatchKeyGuard(torch._C.DispatchKey.ADInplaceOrView, False): + # Ensure that view performed beneath autograd properly propagates + # version counter. TODO: Use reentrant_dispatch instead of + # manually manipulating dispatch keys. Using reentrant_dispatch + # would respect inference_mode, though that is not relevant for + # this case. + x = x.detach() + return x + + +class SelectiveCheckpointContext: + """ + Context passed to policy function during selective checkpointing. + + This class is used to pass relevant metadata to the policy function during + selective checkpointing. The metadata includes whether the current invocation + of the policy function is during recomputation or not. + + Example: + >>> # xdoctest: +SKIP(stub) + >>> + >>> def policy_fn(ctx, op, *args, **kwargs): + >>> print(ctx.is_recompute) + >>> + >>> context_fn = functools.partial(create_selective_checkpoint_contexts, policy_fn) + >>> + >>> out = torch.utils.checkpoint.checkpoint( + >>> fn, x, y, + >>> use_reentrant=False, + >>> context_fn=context_fn, + >>> ) + """ + def __init__(self, *, is_recompute) -> None: + self.is_recompute = is_recompute + + +class CheckpointPolicy(enum.Enum): + """ + Enum for specifying the policy for checkpointing during backpropagation. + + The following policies are supported: + + - ``{MUST,PREFER}_SAVE``: The operation's output will be saved during the forward + pass and will not be recomputed during the backward pass + - ``{MUST,PREFER}_RECOMPUTE``: The operation's output will not be saved during the + forward pass and will be recomputed during the backward pass + + Use ``MUST_*`` over ``PREFER_*`` to indicate that the policy should not be overridden + by other subsystems like `torch.compile`. + + .. note:: + A policy function that always returns ``PREFER_RECOMPUTE`` is + equivalent to vanilla checkpointing. + + A policy function that returns ``PREFER_SAVE`` every op is + NOT equivalent to not using checkpointing. Using such a policy would + save additional tensors not limited to ones that are actually needed for + gradient computation. + """ + MUST_SAVE = 0 + PREFER_SAVE = 1 + MUST_RECOMPUTE = 2 + PREFER_RECOMPUTE = 3 + + +def _policy_from_bool(b): + # For backward compatibility + return CheckpointPolicy.MUST_SAVE if b else CheckpointPolicy.PREFER_RECOMPUTE + + +SAC_IGNORED_OPS = { + # AC inserts different number of detach during forward and recompute. + torch.ops.aten.detach.default, + # AC's determinism check invokes additional metadata ops during forward. + # With subclasses involved, these metadata ops become dispatchable, this + # can result in incorrectness if these ops are selected cached. + torch.ops.prim.device.default, +} | set(torch._subclasses.functional_tensor.FunctionalTensor.metadata_fns) # type: ignore[has-type] + + +class _CachingTorchDispatchMode(TorchDispatchMode): + @classmethod + def ignore_compile_internals(cls): + return True + + # Used together with _CachedTorchDispatchMode to implement SAC. + def __init__(self, policy_fn, storage) -> None: + self.policy_fn = policy_fn + self.storage = storage + + def __torch_dispatch__(self, func, types, args=(), kwargs=None): + if func in SAC_IGNORED_OPS: + return func(*args, **kwargs) + + kwargs = {} if kwargs is None else kwargs + policy = self.policy_fn(SelectiveCheckpointContext(is_recompute=False), + func, *args, **kwargs) + if isinstance(policy, bool): + policy = _policy_from_bool(policy) + + is_compiling = _is_compiling(func, args, kwargs) + + if is_compiling: + # Overwrite each node's "recompute" tag to add in the user annotation. + fx_traceback.current_meta["recompute"] = policy + + out = func(*args, **kwargs) + + # HOPs don't support func._schema + # HOPs don't alias -> this is always true today and will be always true for a long time + # TODO HOPs don't mutate -> this is always true today but will not be true forever + if isinstance(func, torch._ops.HigherOrderOperator): + any_ret_has_alias_info = False + else: + any_ret_has_alias_info = any(ret.alias_info is not None for ret in func._schema.returns) + + if policy in (CheckpointPolicy.MUST_SAVE, CheckpointPolicy.PREFER_SAVE) or is_compiling: + self.storage[func].append(tree_map(lambda x: _VersionWrapper(_maybe_detach(x, any_ret_has_alias_info)), out)) + return out + +class _CachedTorchDispatchMode(TorchDispatchMode): + @classmethod + def ignore_compile_internals(cls): + return True + + # Used together with _CachedTorchDispatchMode to implement SAC. + def __init__(self, policy_fn, storage, allow_cache_entry_mutation) -> None: + self.policy_fn = policy_fn + self.storage = storage + self.allow_cache_entry_mutation = allow_cache_entry_mutation + + def __torch_dispatch__(self, func, types, args=(), kwargs=None): + if func in SAC_IGNORED_OPS: + return func(*args, **kwargs) + + kwargs = {} if kwargs is None else kwargs + policy = self.policy_fn(SelectiveCheckpointContext(is_recompute=True), + func, *args, **kwargs) + if isinstance(policy, bool): + policy = _policy_from_bool(policy) + + is_compiling = _is_compiling(func, args, kwargs) + + if policy in (CheckpointPolicy.MUST_SAVE, CheckpointPolicy.PREFER_SAVE) or is_compiling: + storage = self.storage.get(func) + if storage is None: + raise RuntimeError(f"{func} encountered during backward, but not found in storage") + if len(storage) == 0: + raise RuntimeError( + "Trying to backward an extra time. You are only allowed to backward once " + "on any region computed under selective activation checkpoint." + ) + out = tree_map(lambda x: x.get_val(self.allow_cache_entry_mutation), storage.pop(0)) + else: + out = func(*args, **kwargs) + return out + + +def create_selective_checkpoint_contexts(policy_fn_or_list, allow_cache_entry_mutation=False): + """ + Helper to avoid recomputing certain ops during activation checkpointing. + + Use this with `torch.utils.checkpoint.checkpoint` to control which + operations are recomputed during the backward pass. + + Args: + policy_fn_or_list (Callable or List): + - If a policy function is provided, it should accept a + :class:`SelectiveCheckpointContext`, the :class:`OpOverload`, args and + kwargs to the op, and return a :class:`CheckpointPolicy` enum value + indicating whether the execution of the op should be recomputed or not. + - If a list of operations is provided, it is equivalent to a policy + returning `CheckpointPolicy.MUST_SAVE` for the specified + operations and `CheckpointPolicy.PREFER_RECOMPUTE` for all other + operations. + allow_cache_entry_mutation (bool, optional): By default, an error is + raised if any tensors cached by selective activation checkpoint are + mutated in order to ensure correctness. If set to `True`, this check + is disabled. + Returns: + A tuple of two context managers. + + Example: + >>> # xdoctest: +REQUIRES(LINUX) + >>> import functools + >>> + >>> x = torch.rand(10, 10, requires_grad=True) + >>> y = torch.rand(10, 10, requires_grad=True) + >>> + >>> ops_to_save = [ + >>> torch.ops.aten.mm.default, + >>> ] + >>> + >>> def policy_fn(ctx, op, *args, **kwargs): + >>> if op in ops_to_save: + >>> return CheckpointPolicy.MUST_SAVE + >>> else: + >>> return CheckpointPolicy.PREFER_RECOMPUTE + >>> + >>> context_fn = functools.partial(create_selective_checkpoint_contexts, policy_fn) + >>> + >>> # or equivalently + >>> context_fn = functools.partial(create_selective_checkpoint_contexts, ops_to_save) + >>> + >>> def fn(x, y): + >>> return torch.sigmoid(torch.matmul(torch.matmul(x, y), y)) * y + >>> + >>> out = torch.utils.checkpoint.checkpoint( + >>> fn, x, y, + >>> use_reentrant=False, + >>> context_fn=context_fn, + >>> ) + """ + # NB: If grad_mode is disabled, checkpoint would not run forward under + # context_fn anyway, so proceed as usual. + if isinstance(policy_fn_or_list, list): + for op in policy_fn_or_list: + if not isinstance(op, (torch._ops.OpOverload, torch._ops.HigherOrderOperator)): + _extra_msg = ( + "Please update the OpOverloadPacket to a specific OpOverload." + "For example, if you have `torch.ops.aten.mm`, change it to `torch.ops.aten.mm.default`." + ) if isinstance(op, torch._ops.OpOverloadPacket) else "" + raise ValueError( + f"Expected op in `op_list` to be an OpOverload but got: {op} " + f"of type {type(op)}. {_extra_msg}" + ) + + def policy_fn(ctx, op, *args, **kwargs): + if op in policy_fn_or_list: + return CheckpointPolicy.MUST_SAVE + else: + return CheckpointPolicy.PREFER_RECOMPUTE + elif callable(policy_fn_or_list): + policy_fn = policy_fn_or_list + else: + raise TypeError("policy_fn_or_list must be either a function or a list of ops.") + + storage: Dict[Any, List[Any]] = defaultdict(list) + return ( + _CachingTorchDispatchMode(policy_fn, storage), + _CachedTorchDispatchMode(policy_fn, storage, allow_cache_entry_mutation), + ) + +# NB: this helper wraps fn before calling checkpoint_impl. kwargs and +# saving/restoring of global state is handled here. + +def _checkpoint_without_reentrant_generator( + fn, + preserve_rng_state=True, + context_fn: Callable[[], Tuple[ContextManager, ContextManager]] = noop_context_fn, + determinism_check: str = _DEFAULT_DETERMINISM_MODE, + debug: bool = False, + early_stop: bool = True, + *args, + **kwargs +): + """Checkpointing without reentrant autograd. + + Args: + fn: describes what to run in the forward pass of the model or + part of the model. It should also know how to handle the inputs + passed as the tuple. For example, in LSTM, if user passes + ``(activation, hidden)``, :attr:`function` should correctly use the + first input as ``activation`` and the second input as ``hidden`` + preserve_rng_state(bool, optional): Omit stashing and restoring + the RNG state during each checkpoint. + Default: ``True`` + context_fn(Callable, optional): A callable returning a tuple of two + context managers. The function and its recomputation will be run + under the first and second context managers respectively. + determinism_check(str, optional): A string specifying the determinism + check to perform. By default it is set to ``"default"`` which + compares the shapes, dtypes, and devices of the recomputed tensors + against those the saved tensors. To turn off this check, specify + ``"none"``. Currently these are the only two supported values. + Please open an issue if you would like to see more determinism + checks. + debug(bool, optional): If ``True``, error messages will also include + a trace of the operators ran during the original forward computation + as well as the recomputation. + early_stop(bool, optional): If ``True``, non-reentrant checkpoint stops + recomputation as soon as it has computed all needed Tensors. Can be + overridden globally using :func:`set_checkpoint_early_stop` context + manager. Default: ``True``. + *args: Arguments to pass in to the given ``function``. + **kwargs: Keyword arguments to pass into the given ``function``. + """ + unpack_error_cb = None + + if _checkpoint_debug_enabled if _checkpoint_debug_enabled is not None else debug: + if context_fn is not noop_context_fn: + raise ValueError( + "debug=True is incompatible with non-default context_fn" + ) + context_fn, unpack_error_cb = _get_debug_context_and_cb() + + if determinism_check in _allowed_determinism_checks_to_fns: + metadata_fn = _allowed_determinism_checks_to_fns[determinism_check] + else: + raise ValueError( + f"determinism_check should be one of {list(_allowed_determinism_checks_to_fns.keys())}, " + f"but got {determinism_check}" + ) + + device_type = _infer_device_type(*args) + device_module = _get_device_module(device_type) + forward_context, recompute_context = context_fn() + if _is_compiling(fn, args, kwargs) and context_fn is not noop_context_fn: + if ( + not isinstance(forward_context, TorchDispatchMode) + or not isinstance(recompute_context, TorchDispatchMode) + ): + raise AssertionError( + "In torch.compile mode, `context_fn` arg passed to `torch.utils.checkpoint` " + "must generate a tuple of two `TorchDispatchMode`s." + ) + # Accommodates the (remote) possibility that autocast is enabled for cpu AND gpu. + device_autocast_kwargs, cpu_autocast_kwargs = _get_autocast_kwargs(device_type=device_type) + + if preserve_rng_state: + fwd_cpu_state = torch.get_rng_state() + # Don't eagerly initialize the cuda context by accident. + # (If the user intends that the context is initialized later, within their + # run_function, we SHOULD actually stash the cuda state here. Unfortunately, + # we have no way to anticipate this will happen before we run the function. + # If they do so, we raise an error.) + had_device_in_fwd = False + if getattr(device_module, "_initialized", False): + had_device_in_fwd = True + fwd_devices, fwd_device_states = get_device_states(*args) + + def recompute_fn(*inputs) -> None: + kwargs, *args = inputs + # This will be called later during recomputation. This wrapping enables + # the necessary global state to be captured. + rng_devices = [] + if preserve_rng_state and had_device_in_fwd: + rng_devices = fwd_devices + with torch.random.fork_rng( + devices=rng_devices, enabled=preserve_rng_state, device_type=device_type + ): + if preserve_rng_state: + torch.set_rng_state(fwd_cpu_state) + if had_device_in_fwd: + set_device_states(fwd_devices, fwd_device_states, device_type=device_type) + + device_autocast_ctx = torch.amp.autocast( + device_type=device_type, **device_autocast_kwargs + ) if torch.amp.is_autocast_available(device_type) else contextlib.nullcontext() + with device_autocast_ctx, torch.amp.autocast("cpu", **cpu_autocast_kwargs), recompute_context: # type: ignore[attr-defined] + fn(*args, **kwargs) + + new_frame = _CheckpointFrame( + recompute_fn, + _enable_checkpoint_early_stop if _enable_checkpoint_early_stop is not None else early_stop, + unpack_error_cb, + metadata_fn + ) + dummy = torch.empty((0,), requires_grad=True) + new_frame.input_saver = _NoopSaveInputs.apply(dummy, kwargs, *args) + + # When ambient grad_mode is False + if new_frame.input_saver.grad_fn is None: + yield + return + + with _checkpoint_hook(new_frame), forward_context: + yield + new_frame.forward_completed = True + + if getattr(device_module, "_initialized", False) and \ + preserve_rng_state and not had_device_in_fwd: # type: ignore[possibly-undefined] + # Device was not initialized before running the forward, so we didn't + # stash the device state. + raise RuntimeError( + "PyTorch's device state was initialized in the forward pass " + "of a Checkpoint, which is not allowed. Please open an issue " + "if you need this feature." + ) + + return + + +class GraphExecGroup: + """Any checkpointed regions encountered by backward under the same instance + of this context manager will trigger recompute at most once, even if + there are multiple calls to backward. + + Backward calls under the same instance of this context manager must execute + over non-overlapping regions of the backward graph even if retain_graph=True. + In particular, any two backward call cannot use the same saved activation for + gradient computation. + + .. note:: + This context manager only affects checkpoint with use_reentrant=False, and + is a no-op otherwise. + """ + + def __enter__(self) -> "GraphExecGroup": + if torch._C._get_graph_exec_group() is not None: + raise RuntimeError( + "GraphExecGroup contexts cannot be nested. " + f"Already inside group {torch._C._get_graph_exec_group()}" + ) + torch._C._set_graph_exec_group(self) + return self + + def __exit__(self, *args: object) -> None: + torch._C._set_graph_exec_group(None) + + @classmethod + def _get_current_group(cls) -> Optional["GraphExecGroup"]: + # Private API to be used by utils like AC + return torch._C._get_graph_exec_group() + + +# Note: [compiled autograd and checkpoint unpack hook] +# When tracing via compiled autograd, this hook will be visible to the +# compiler if the forward of this checkpointed region ran in eager. +# If the forward had ran under compile, it would have been wrapped in a +# higher order op. See Note: [torch.compile and checkpoint]. +# +# Since we run the recomputation hook under a enable_grad context, +# AOTDispatch will trace a joint graph for this hook, and may +# save different activations than in eager. This conflicts with the +# strict activation count checks in `frame.check_recomputed_tensors_match`. +# So, we disable this hook to force it to recompute eager checkpointed regions +# in eager. This could be removed if we can disable the partitioner for this +# graph segment. diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/collect_env.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/collect_env.py new file mode 100644 index 0000000000000000000000000000000000000000..b566cd94e5d0314afc50150b24e2af7cb984a390 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/collect_env.py @@ -0,0 +1,944 @@ +# mypy: allow-untyped-defs + +# Unlike the rest of the PyTorch this file must be python2 compliant. +# This script outputs relevant system environment info +# Run it with `python collect_env.py` or `python -m torch.utils.collect_env` +import datetime +import json +import locale +import os +import re +import subprocess +import sys +from collections import namedtuple +from typing import cast as _cast, Dict as _Dict + + +try: + import torch + + TORCH_AVAILABLE = True +except (ImportError, NameError, AttributeError, OSError): + TORCH_AVAILABLE = False + +# System Environment Information +SystemEnv = namedtuple( + "SystemEnv", + [ + "torch_version", + "is_debug_build", + "cuda_compiled_version", + "gcc_version", + "clang_version", + "cmake_version", + "os", + "libc_version", + "python_version", + "python_platform", + "is_cuda_available", + "cuda_runtime_version", + "cuda_module_loading", + "nvidia_driver_version", + "nvidia_gpu_models", + "cudnn_version", + "is_xpu_available", + "pip_version", # 'pip' or 'pip3' + "pip_packages", + "conda_packages", + "hip_compiled_version", + "hip_runtime_version", + "miopen_runtime_version", + "caching_allocator_config", + "is_xnnpack_available", + "cpu_info", + ], +) + +COMMON_PATTERNS = [ + "torch", + "numpy", + "triton", + "optree", +] + +NVIDIA_PATTERNS = [ + "cuda-cudart", + "cuda-cupti", + "cuda-libraries", + "cuda-opencl", + "cuda-nvrtc", + "cuda-runtime", + "cublas", + "cudnn", + "cufft", + "curand", + "cusolver", + "cusparse", + "nccl", + "nvjitlink", + "nvtx", +] + +ONEAPI_PATTERNS = [ + "dpcpp-cpp-rt", + "intel-cmplr-lib-rt", + "intel-cmplr-lib-ur", + "intel-cmplr-lic-rt", + "intel-opencl-rt", + "intel-sycl-rt", + "mkl", + "onemkl-sycl-blas", + "onemkl-sycl-dft", + "onemkl-sycl-lapack", + "onemkl-sycl-rng", + "onemkl-sycl-sparse", + "intel-openmp", + "tbb", + "impi-rt", + "impi-devel", + "oneccl", + "oneccl-devel", + "intel-pti", + "umf", + "tcmlib", +] + +CONDA_PATTERNS = [ + "cudatoolkit", + "soumith", + "mkl", + "magma", +] + +PIP_PATTERNS = [ + "mypy", + "flake8", + "onnx", +] + + +def run(command): + """Return (return-code, stdout, stderr).""" + shell = type(command) is str + p = subprocess.Popen( + command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=shell + ) + raw_output, raw_err = p.communicate() + rc = p.returncode + if get_platform() == "win32": + enc = "oem" + else: + enc = locale.getpreferredencoding() + output = raw_output.decode(enc) + err = raw_err.decode(enc) + return rc, output.strip(), err.strip() + + +def run_and_read_all(run_lambda, command): + """Run command using run_lambda; reads and returns entire output if rc is 0.""" + rc, out, _ = run_lambda(command) + if rc != 0: + return None + return out + + +def run_and_parse_first_match(run_lambda, command, regex): + """Run command using run_lambda, returns the first regex match if it exists.""" + rc, out, _ = run_lambda(command) + if rc != 0: + return None + match = re.search(regex, out) + if match is None: + return None + return match.group(1) + + +def run_and_return_first_line(run_lambda, command): + """Run command using run_lambda and returns first line if output is not empty.""" + rc, out, _ = run_lambda(command) + if rc != 0: + return None + return out.split("\n")[0] + + +def get_conda_packages(run_lambda, patterns=None): + if patterns is None: + patterns = CONDA_PATTERNS + COMMON_PATTERNS + NVIDIA_PATTERNS + ONEAPI_PATTERNS + conda = os.environ.get("CONDA_EXE", "conda") + out = run_and_read_all(run_lambda, "{} list".format(conda)) + if out is None: + return out + + return "\n".join( + line + for line in out.splitlines() + if not line.startswith("#") and any(name in line for name in patterns) + ) + + +def get_gcc_version(run_lambda): + return run_and_parse_first_match(run_lambda, "gcc --version", r"gcc (.*)") + + +def get_clang_version(run_lambda): + return run_and_parse_first_match( + run_lambda, "clang --version", r"clang version (.*)" + ) + + +def get_cmake_version(run_lambda): + return run_and_parse_first_match(run_lambda, "cmake --version", r"cmake (.*)") + + +def get_nvidia_driver_version(run_lambda): + if get_platform() == "darwin": + cmd = "kextstat | grep -i cuda" + return run_and_parse_first_match( + run_lambda, cmd, r"com[.]nvidia[.]CUDA [(](.*?)[)]" + ) + smi = get_nvidia_smi() + return run_and_parse_first_match(run_lambda, smi, r"Driver Version: (.*?) ") + + +def get_gpu_info(run_lambda): + if get_platform() == "darwin" or ( + TORCH_AVAILABLE + and hasattr(torch.version, "hip") + and torch.version.hip is not None + ): + if TORCH_AVAILABLE and torch.cuda.is_available(): + if torch.version.hip is not None: + prop = torch.cuda.get_device_properties(0) + if hasattr(prop, "gcnArchName"): + gcnArch = " ({})".format(prop.gcnArchName) + else: + gcnArch = "NoGCNArchNameOnOldPyTorch" + else: + gcnArch = "" + return torch.cuda.get_device_name(None) + gcnArch + return None + smi = get_nvidia_smi() + uuid_regex = re.compile(r" \(UUID: .+?\)") + rc, out, _ = run_lambda(smi + " -L") + if rc != 0: + return None + # Anonymize GPUs by removing their UUID + return re.sub(uuid_regex, "", out) + + +def get_running_cuda_version(run_lambda): + return run_and_parse_first_match(run_lambda, "nvcc --version", r"release .+ V(.*)") + + +def get_cudnn_version(run_lambda): + """Return a list of libcudnn.so; it's hard to tell which one is being used.""" + if get_platform() == "win32": + system_root = os.environ.get("SYSTEMROOT", "C:\\Windows") + cuda_path = os.environ.get("CUDA_PATH", "%CUDA_PATH%") + where_cmd = os.path.join(system_root, "System32", "where") + cudnn_cmd = '{} /R "{}\\bin" cudnn*.dll'.format(where_cmd, cuda_path) + elif get_platform() == "darwin": + # CUDA libraries and drivers can be found in /usr/local/cuda/. See + # https://docs.nvidia.com/cuda/archive/9.0/cuda-installation-guide-mac-os-x/index.html#installation + # https://docs.nvidia.com/deeplearning/cudnn/installation/latest/ + # Use CUDNN_LIBRARY when cudnn library is installed elsewhere. + cudnn_cmd = "ls /usr/local/cuda/lib/libcudnn*" + else: + cudnn_cmd = 'ldconfig -p | grep libcudnn | rev | cut -d" " -f1 | rev' + rc, out, _ = run_lambda(cudnn_cmd) + # find will return 1 if there are permission errors or if not found + if len(out) == 0 or (rc != 1 and rc != 0): + l = os.environ.get("CUDNN_LIBRARY") + if l is not None and os.path.isfile(l): + return os.path.realpath(l) + return None + files_set = set() + for fn in out.split("\n"): + fn = os.path.realpath(fn) # eliminate symbolic links + if os.path.isfile(fn): + files_set.add(fn) + if not files_set: + return None + # Alphabetize the result because the order is non-deterministic otherwise + files = sorted(files_set) + if len(files) == 1: + return files[0] + result = "\n".join(files) + return "Probably one of the following:\n{}".format(result) + + +def get_nvidia_smi(): + # Note: nvidia-smi is currently available only on Windows and Linux + smi = "nvidia-smi" + if get_platform() == "win32": + system_root = os.environ.get("SYSTEMROOT", "C:\\Windows") + program_files_root = os.environ.get("PROGRAMFILES", "C:\\Program Files") + legacy_path = os.path.join( + program_files_root, "NVIDIA Corporation", "NVSMI", smi + ) + new_path = os.path.join(system_root, "System32", smi) + smis = [new_path, legacy_path] + for candidate_smi in smis: + if os.path.exists(candidate_smi): + smi = '"{}"'.format(candidate_smi) + break + return smi + + +def _detect_linux_pkg_manager(): + if get_platform() != "linux": + return "N/A" + for mgr_name in ["dpkg", "dnf", "yum", "zypper"]: + rc, _, _ = run(f"which {mgr_name}") + if rc == 0: + return mgr_name + return "N/A" + + +def get_linux_pkg_version(run_lambda, pkg_name): + pkg_mgr = _detect_linux_pkg_manager() + if pkg_mgr == "N/A": + return "N/A" + + grep_version = { + "dpkg": { + "field_index": 2, + "command": "dpkg -l | grep {}", + }, + "dnf": { + "field_index": 1, + "command": "dnf list | grep {}", + }, + "yum": { + "field_index": 1, + "command": "yum list | grep {}", + }, + "zypper": { + "field_index": 2, + "command": "zypper info {} | grep Version", + }, + } + + field_index: int = int(_cast(int, grep_version[pkg_mgr]["field_index"])) + cmd: str = str(grep_version[pkg_mgr]["command"]) + cmd = cmd.format(pkg_name) + ret = run_and_read_all(run_lambda, cmd) + if ret is None or ret == "": + return "N/A" + lst = re.sub(" +", " ", ret).split(" ") + if len(lst) <= field_index: + return "N/A" + return lst[field_index] + + +def get_intel_gpu_driver_version(run_lambda): + lst = [] + platform = get_platform() + if platform == "linux": + pkgs = { # type: ignore[var-annotated] + "dpkg": { + "intel-opencl-icd", + "libze1", + "level-zero", + }, + "dnf": { + "intel-opencl", + "level-zero", + }, + "yum": { + "intel-opencl", + "level-zero", + }, + "zypper": { + "intel-opencl", + "level-zero", + }, + }.get(_detect_linux_pkg_manager(), {}) + for pkg in pkgs: + ver = get_linux_pkg_version(run_lambda, pkg) + if ver != "N/A": + lst.append(f"* {pkg}:\t{ver}") + if platform in ["win32", "cygwin"]: + txt = run_and_read_all( + run_lambda, + 'powershell.exe "gwmi -Class Win32_PnpSignedDriver | where{$_.DeviceClass -eq \\"DISPLAY\\"\ + -and $_.Manufacturer -match \\"Intel\\"} | Select-Object -Property DeviceName,DriverVersion,DriverDate\ + | ConvertTo-Json"', + ) + try: + obj = json.loads(txt) + if type(obj) is list: + for o in obj: + lst.append( + f'* {o["DeviceName"]}: {o["DriverVersion"]} ({o["DriverDate"]})' + ) + else: + lst.append(f'* {obj["DriverVersion"]} ({obj["DriverDate"]})') + except ValueError as e: + lst.append(txt) + lst.append(str(e)) + return "\n".join(lst) + + +def get_intel_gpu_onboard(run_lambda): + lst: list[str] = [] + platform = get_platform() + if platform == "linux": + txt = run_and_read_all(run_lambda, "xpu-smi discovery -j") + if txt: + try: + obj = json.loads(txt) + device_list = obj.get("device_list", []) + if isinstance(device_list, list) and device_list: + lst.extend(f'* {device["device_name"]}' for device in device_list) + else: + lst.append("N/A") + except (ValueError, TypeError) as e: + lst.append(txt) + lst.append(str(e)) + else: + lst.append("N/A") + if platform in ["win32", "cygwin"]: + txt = run_and_read_all( + run_lambda, + 'powershell.exe "gwmi -Class Win32_PnpSignedDriver | where{$_.DeviceClass -eq \\"DISPLAY\\"\ + -and $_.Manufacturer -match \\"Intel\\"} | Select-Object -Property DeviceName | ConvertTo-Json"', + ) + if txt: + try: + obj = json.loads(txt) + if isinstance(obj, list) and obj: + lst.extend(f'* {device["DeviceName"]}' for device in obj) + else: + lst.append(f'* {obj.get("DeviceName", "N/A")}') + except ValueError as e: + lst.append(txt) + lst.append(str(e)) + else: + lst.append("N/A") + return "\n".join(lst) + + +def get_intel_gpu_detected(run_lambda): + if not TORCH_AVAILABLE or not hasattr(torch, "xpu"): + return "N/A" + + device_count = torch.xpu.device_count() + if device_count == 0: + return "N/A" + + devices = [ + f"* [{i}] {torch.xpu.get_device_properties(i)}" for i in range(device_count) + ] + return "\n".join(devices) + + +# example outputs of CPU infos +# * linux +# Architecture: x86_64 +# CPU op-mode(s): 32-bit, 64-bit +# Address sizes: 46 bits physical, 48 bits virtual +# Byte Order: Little Endian +# CPU(s): 128 +# On-line CPU(s) list: 0-127 +# Vendor ID: GenuineIntel +# Model name: Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz +# CPU family: 6 +# Model: 106 +# Thread(s) per core: 2 +# Core(s) per socket: 32 +# Socket(s): 2 +# Stepping: 6 +# BogoMIPS: 5799.78 +# Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr +# sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl +# xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq monitor ssse3 fma cx16 +# pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand +# hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced +# fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap +# avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 +# xsaves wbnoinvd ida arat avx512vbmi pku ospke avx512_vbmi2 gfni vaes vpclmulqdq +# avx512_vnni avx512_bitalg tme avx512_vpopcntdq rdpid md_clear flush_l1d arch_capabilities +# Virtualization features: +# Hypervisor vendor: KVM +# Virtualization type: full +# Caches (sum of all): +# L1d: 3 MiB (64 instances) +# L1i: 2 MiB (64 instances) +# L2: 80 MiB (64 instances) +# L3: 108 MiB (2 instances) +# NUMA: +# NUMA node(s): 2 +# NUMA node0 CPU(s): 0-31,64-95 +# NUMA node1 CPU(s): 32-63,96-127 +# Vulnerabilities: +# Itlb multihit: Not affected +# L1tf: Not affected +# Mds: Not affected +# Meltdown: Not affected +# Mmio stale data: Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown +# Retbleed: Not affected +# Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp +# Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization +# Spectre v2: Mitigation; Enhanced IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence +# Srbds: Not affected +# Tsx async abort: Not affected +# * win32 +# Architecture=9 +# CurrentClockSpeed=2900 +# DeviceID=CPU0 +# Family=179 +# L2CacheSize=40960 +# L2CacheSpeed= +# Manufacturer=GenuineIntel +# MaxClockSpeed=2900 +# Name=Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz +# ProcessorType=3 +# Revision=27142 +# +# Architecture=9 +# CurrentClockSpeed=2900 +# DeviceID=CPU1 +# Family=179 +# L2CacheSize=40960 +# L2CacheSpeed= +# Manufacturer=GenuineIntel +# MaxClockSpeed=2900 +# Name=Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz +# ProcessorType=3 +# Revision=27142 + + +def get_cpu_info(run_lambda): + rc, out, err = 0, "", "" + if get_platform() == "linux": + rc, out, err = run_lambda("lscpu") + elif get_platform() == "win32": + rc, out, err = run_lambda( + 'powershell.exe "gwmi -Class Win32_Processor | Select-Object -Property Name,Manufacturer,Family,\ + Architecture,ProcessorType,DeviceID,CurrentClockSpeed,MaxClockSpeed,L2CacheSize,L2CacheSpeed,Revision\ + | ConvertTo-Json"' + ) + if rc == 0: + lst = [] + try: + obj = json.loads(out) + if type(obj) is list: + for o in obj: + lst.append("----------------------") + lst.extend([f"{k}: {v}" for (k, v) in o.items()]) + else: + lst.extend([f"{k}: {v}" for (k, v) in obj.items()]) + except ValueError as e: + lst.append(out) + lst.append(str(e)) + out = "\n".join(lst) + elif get_platform() == "darwin": + rc, out, err = run_lambda("sysctl -n machdep.cpu.brand_string") + cpu_info = "None" + if rc == 0: + cpu_info = out + else: + cpu_info = err + return cpu_info + + +def get_platform(): + if sys.platform.startswith("linux"): + return "linux" + elif sys.platform.startswith("win32"): + return "win32" + elif sys.platform.startswith("cygwin"): + return "cygwin" + elif sys.platform.startswith("darwin"): + return "darwin" + else: + return sys.platform + + +def get_mac_version(run_lambda): + return run_and_parse_first_match(run_lambda, "sw_vers -productVersion", r"(.*)") + + +def get_windows_version(run_lambda): + ret = run_and_read_all( + run_lambda, + 'powershell.exe "gwmi -Class Win32_OperatingSystem | Select-Object -Property Caption,\ + OSArchitecture,Version | ConvertTo-Json"', + ) + try: + obj = json.loads(ret) + ret = f'{obj["Caption"]} ({obj["Version"]} {obj["OSArchitecture"]})' + except ValueError as e: + ret += f"\n{str(e)}" + return ret + + +def get_lsb_version(run_lambda): + return run_and_parse_first_match( + run_lambda, "lsb_release -a", r"Description:\t(.*)" + ) + + +def check_release_file(run_lambda): + return run_and_parse_first_match( + run_lambda, "cat /etc/*-release", r'PRETTY_NAME="(.*)"' + ) + + +def get_os(run_lambda): + from platform import machine + + platform = get_platform() + + if platform in ["win32", "cygwin"]: + return get_windows_version(run_lambda) + + if platform == "darwin": + version = get_mac_version(run_lambda) + if version is None: + return None + return "macOS {} ({})".format(version, machine()) + + if platform == "linux": + # Ubuntu/Debian based + desc = get_lsb_version(run_lambda) + if desc is not None: + return "{} ({})".format(desc, machine()) + + # Try reading /etc/*-release + desc = check_release_file(run_lambda) + if desc is not None: + return "{} ({})".format(desc, machine()) + + return "{} ({})".format(platform, machine()) + + # Unknown platform + return platform + + +def get_python_platform(): + import platform + + return platform.platform() + + +def get_libc_version(): + import platform + + if get_platform() != "linux": + return "N/A" + return "-".join(platform.libc_ver()) + + +def get_pip_packages(run_lambda, patterns=None): + """Return `pip list` output. Note: will also find conda-installed pytorch and numpy packages.""" + if patterns is None: + patterns = PIP_PATTERNS + COMMON_PATTERNS + NVIDIA_PATTERNS + ONEAPI_PATTERNS + + pip_version = "pip3" if sys.version_info.major == 3 else "pip" + + os.environ["PIP_DISABLE_PIP_VERSION_CHECK"] = "1" + # People generally have pip as `pip` or `pip3` + # But here it is invoked as `python -mpip` + out = run_and_read_all( + run_lambda, [sys.executable, "-mpip", "list", "--format=freeze"] + ) + if out is None: + return pip_version, out + + filtered_out = "\n".join( + line for line in out.splitlines() if any(name in line for name in patterns) + ) + + return pip_version, filtered_out + + +def get_cachingallocator_config() -> _Dict[str, str]: + """Return the caching allocator configuration from environment variables. + """ + # pyrefly: ignore [bad-return] + return { + var: os.environ.get(var) + for var in ( + "PYTORCH_CUDA_ALLOC_CONF", + "PYTORCH_HIP_ALLOC_CONF", + "PYTORCH_ALLOC_CONF", + ) + if os.environ.get(var) + } + + +def get_cuda_module_loading_config(): + if TORCH_AVAILABLE and torch.cuda.is_available(): + torch.cuda.init() + config = os.environ.get("CUDA_MODULE_LOADING", "") + return config + else: + return "N/A" + + +def is_xnnpack_available(): + if TORCH_AVAILABLE: + import torch.backends.xnnpack + + return str(torch.backends.xnnpack.enabled) # type: ignore[attr-defined] + else: + return "N/A" + + +def get_env_info(): + """ + Collects environment information to aid in debugging. + + The returned environment information contains details on torch version, is debug build + or not, cuda compiled version, gcc version, clang version, cmake version, operating + system, libc version, python version, python platform, CUDA availability, CUDA + runtime version, CUDA module loading config, GPU model and configuration, Nvidia + driver version, cuDNN version, pip version and versions of relevant pip and + conda packages, HIP runtime version, MIOpen runtime version, + Caching allocator config, XNNPACK availability and CPU information. + + Returns: + SystemEnv (namedtuple): A tuple containing various environment details + and system information. + """ + run_lambda = run + pip_version, pip_list_output = get_pip_packages(run_lambda) + + if TORCH_AVAILABLE: + version_str = torch.__version__ + debug_mode_str = str(torch.version.debug) + cuda_available_str = str(torch.cuda.is_available()) + cuda_version_str = torch.version.cuda + xpu_available_str = str(torch.xpu.is_available()) + if torch.xpu.is_available(): + xpu_available_str = ( + f"{xpu_available_str}\n" + + f"XPU used to build PyTorch: {torch.version.xpu}\n" + + f"Intel GPU driver version:\n{get_intel_gpu_driver_version(run_lambda)}\n" + + f"Intel GPU models onboard:\n{get_intel_gpu_onboard(run_lambda)}\n" + + f"Intel GPU models detected:\n{get_intel_gpu_detected(run_lambda)}" + ) + if ( + not hasattr(torch.version, "hip") or torch.version.hip is None + ): # cuda version + hip_compiled_version = hip_runtime_version = miopen_runtime_version = "N/A" + else: # HIP version + + def get_version_or_na(cfg, prefix): + _lst = [s.rsplit(None, 1)[-1] for s in cfg if prefix in s] + return _lst[0] if _lst else "N/A" + + cfg = torch._C._show_config().split("\n") + hip_runtime_version = get_version_or_na(cfg, "HIP Runtime") + miopen_runtime_version = get_version_or_na(cfg, "MIOpen") + cuda_version_str = "N/A" + hip_compiled_version = torch.version.hip + else: + version_str = debug_mode_str = cuda_available_str = cuda_version_str = xpu_available_str = "N/A" # type: ignore[assignment] + hip_compiled_version = hip_runtime_version = miopen_runtime_version = "N/A" + + sys_version = sys.version.replace("\n", " ") + + conda_packages = get_conda_packages(run_lambda) + + return SystemEnv( + torch_version=version_str, + is_debug_build=debug_mode_str, + python_version="{} ({}-bit runtime)".format( + sys_version, sys.maxsize.bit_length() + 1 + ), + python_platform=get_python_platform(), + is_cuda_available=cuda_available_str, + cuda_compiled_version=cuda_version_str, + cuda_runtime_version=get_running_cuda_version(run_lambda), + cuda_module_loading=get_cuda_module_loading_config(), + nvidia_gpu_models=get_gpu_info(run_lambda), + nvidia_driver_version=get_nvidia_driver_version(run_lambda), + cudnn_version=get_cudnn_version(run_lambda), + is_xpu_available=xpu_available_str, + hip_compiled_version=hip_compiled_version, + hip_runtime_version=hip_runtime_version, + miopen_runtime_version=miopen_runtime_version, + pip_version=pip_version, + pip_packages=pip_list_output, + conda_packages=conda_packages, + os=get_os(run_lambda), + libc_version=get_libc_version(), + gcc_version=get_gcc_version(run_lambda), + clang_version=get_clang_version(run_lambda), + cmake_version=get_cmake_version(run_lambda), + caching_allocator_config=get_cachingallocator_config(), + is_xnnpack_available=is_xnnpack_available(), + cpu_info=get_cpu_info(run_lambda), + ) + + +env_info_fmt = """ +PyTorch version: {torch_version} +Is debug build: {is_debug_build} +CUDA used to build PyTorch: {cuda_compiled_version} +ROCM used to build PyTorch: {hip_compiled_version} + +OS: {os} +GCC version: {gcc_version} +Clang version: {clang_version} +CMake version: {cmake_version} +Libc version: {libc_version} + +Python version: {python_version} +Python platform: {python_platform} +Is CUDA available: {is_cuda_available} +CUDA runtime version: {cuda_runtime_version} +CUDA_MODULE_LOADING set to: {cuda_module_loading} +GPU models and configuration: {nvidia_gpu_models} +Nvidia driver version: {nvidia_driver_version} +cuDNN version: {cudnn_version} +Is XPU available: {is_xpu_available} +HIP runtime version: {hip_runtime_version} +MIOpen runtime version: {miopen_runtime_version} +Is XNNPACK available: {is_xnnpack_available} +Caching allocator config: {caching_allocator_config} + +CPU: +{cpu_info} + +Versions of relevant libraries: +{pip_packages} +{conda_packages} +""".strip() + + +def pretty_str(envinfo): + def replace_nones(dct, replacement="Could not collect"): + for key in dct: + if dct[key] is not None: + continue + dct[key] = replacement + return dct + + def replace_bools(dct, true="Yes", false="No"): + for key in dct: + if dct[key] is True: + dct[key] = true + elif dct[key] is False: + dct[key] = false + return dct + + def prepend(text, tag="[prepend]"): + lines = text.split("\n") + updated_lines = [tag + line for line in lines] + return "\n".join(updated_lines) + + def replace_if_empty(text, replacement="No relevant packages"): + if text is not None and len(text) == 0: + return replacement + return text + + def maybe_start_on_next_line(string): + # If `string` is multiline, prepend a \n to it. + if string is not None and len(string.split("\n")) > 1: + return "\n{}\n".format(string) + return string + + mutable_dict = envinfo._asdict() + + # If nvidia_gpu_models is multiline, start on the next line + mutable_dict["nvidia_gpu_models"] = maybe_start_on_next_line( + envinfo.nvidia_gpu_models + ) + + # If the machine doesn't have CUDA, report some fields as 'No CUDA' + dynamic_cuda_fields = [ + "cuda_runtime_version", + "nvidia_gpu_models", + "nvidia_driver_version", + ] + all_cuda_fields = dynamic_cuda_fields + ["cudnn_version"] + all_dynamic_cuda_fields_missing = all( + mutable_dict[field] is None for field in dynamic_cuda_fields + ) + if ( + TORCH_AVAILABLE + and not torch.cuda.is_available() + and all_dynamic_cuda_fields_missing + ): + for field in all_cuda_fields: + mutable_dict[field] = "No CUDA" + if envinfo.cuda_compiled_version is None: + mutable_dict["cuda_compiled_version"] = "None" + + # Replace True with Yes, False with No + mutable_dict = replace_bools(mutable_dict) + + # Replace all None objects with 'Could not collect' + mutable_dict = replace_nones(mutable_dict) + + # If either of these are '', replace with 'No relevant packages' + mutable_dict["pip_packages"] = replace_if_empty(mutable_dict["pip_packages"]) + mutable_dict["conda_packages"] = replace_if_empty(mutable_dict["conda_packages"]) + + # Tag conda and pip packages with a prefix + # If they were previously None, they'll show up as ie '[conda] Could not collect' + if mutable_dict["pip_packages"]: + mutable_dict["pip_packages"] = prepend( + mutable_dict["pip_packages"], "[{}] ".format(envinfo.pip_version) + ) + if mutable_dict["conda_packages"]: + mutable_dict["conda_packages"] = prepend( + mutable_dict["conda_packages"], "[conda] " + ) + mutable_dict["cpu_info"] = envinfo.cpu_info + mutable_dict["caching_allocator_config"] = envinfo.caching_allocator_config + if not envinfo.caching_allocator_config: + mutable_dict["caching_allocator_config"] = "N/A" + return env_info_fmt.format(**mutable_dict) + + +def get_pretty_env_info(): + """ + Returns a pretty string of environment information. + + This function retrieves environment information by calling the `get_env_info` function + and then formats the information into a human-readable string. The retrieved environment + information is listed in the document of `get_env_info`. + This function is used in `python collect_env.py` that should be executed when reporting a bug. + + Returns: + str: A pretty string of the environment information. + """ + return pretty_str(get_env_info()) + + +def main() -> None: + print("Collecting environment information...") + output = get_pretty_env_info() + print(output) + + if ( + TORCH_AVAILABLE + and hasattr(torch, "utils") + and hasattr(torch.utils, "_crash_handler") + ): + minidump_dir = torch.utils._crash_handler.DEFAULT_MINIDUMP_DIR + if sys.platform == "linux" and os.path.exists(minidump_dir): + dumps = [ + os.path.join(minidump_dir, dump) for dump in os.listdir(minidump_dir) + ] + latest = max(dumps, key=os.path.getctime) + ctime = os.path.getctime(latest) + creation_time = datetime.datetime.fromtimestamp(ctime).strftime( + "%Y-%m-%d %H:%M:%S" + ) + msg = ( + "\n*** Detected a minidump at {} created on {}, ".format( + latest, creation_time + ) + + "if this is related to your bug please include it when you file a report ***" + ) + print(msg, file=sys.stderr) + + +if __name__ == "__main__": + main() diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/cpp_backtrace.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/cpp_backtrace.py new file mode 100644 index 0000000000000000000000000000000000000000..af4a7fcb63e263038255359c946a6a0d4a21dbd0 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/cpp_backtrace.py @@ -0,0 +1,12 @@ +# mypy: allow-untyped-defs +from torch._C import _get_cpp_backtrace + +def get_cpp_backtrace(frames_to_skip=0, maximum_number_of_frames=64) -> str: + r""" + Return a string containing the C++ stack trace of the current thread. + + Args: + frames_to_skip (int): the number of frames to skip from the top of the stack + maximum_number_of_frames (int): the maximum number of frames to return + """ + return _get_cpp_backtrace(frames_to_skip, maximum_number_of_frames) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/cpp_extension.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/cpp_extension.py new file mode 100644 index 0000000000000000000000000000000000000000..f29c382f0e3f30dc2472043f08273229c1a726c2 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/cpp_extension.py @@ -0,0 +1,3115 @@ +# mypy: allow-untyped-defs +import copy +import glob +import importlib +import importlib.abc +import os +import re +import shlex +import shutil +import setuptools +import subprocess +import sys +import sysconfig +import types +import collections +from pathlib import Path +import errno +import logging + +logger = logging.getLogger(__name__) + +import torch +import torch._appdirs +from .file_baton import FileBaton +from ._cpp_extension_versioner import ExtensionVersioner +from typing_extensions import deprecated +from torch.torch_version import TorchVersion, Version + + +from setuptools.command.build_ext import build_ext + +IS_WINDOWS = sys.platform == 'win32' +IS_MACOS = sys.platform.startswith('darwin') +IS_LINUX = sys.platform.startswith('linux') +LIB_EXT = '.pyd' if IS_WINDOWS else '.so' +EXEC_EXT = '.exe' if IS_WINDOWS else '' +CLIB_PREFIX = '' if IS_WINDOWS else 'lib' +CLIB_EXT = '.dll' if IS_WINDOWS else '.so' +SHARED_FLAG = '/DLL' if IS_WINDOWS else '-shared' + +_HERE = os.path.abspath(__file__) +_TORCH_PATH = os.path.dirname(os.path.dirname(_HERE)) +TORCH_LIB_PATH = os.path.join(_TORCH_PATH, 'lib') + + +SUBPROCESS_DECODE_ARGS = ('oem',) if IS_WINDOWS else () +MINIMUM_GCC_VERSION = (5, 0, 0) +MINIMUM_MSVC_VERSION = (19, 0, 24215) + +VersionRange = tuple[tuple[int, ...], tuple[int, ...]] +VersionMap = dict[str, VersionRange] +# The following values were taken from the following GitHub gist that +# summarizes the minimum valid major versions of g++/clang++ for each supported +# CUDA version: https://gist.github.com/ax3l/9489132 +# Or from include/crt/host_config.h in the CUDA SDK +# The second value is the exclusive(!) upper bound, i.e. min <= version < max +CUDA_GCC_VERSIONS: VersionMap = { + '11.0': (MINIMUM_GCC_VERSION, (10, 0)), + '11.1': (MINIMUM_GCC_VERSION, (11, 0)), + '11.2': (MINIMUM_GCC_VERSION, (11, 0)), + '11.3': (MINIMUM_GCC_VERSION, (11, 0)), + '11.4': ((6, 0, 0), (12, 0)), + '11.5': ((6, 0, 0), (12, 0)), + '11.6': ((6, 0, 0), (12, 0)), + '11.7': ((6, 0, 0), (12, 0)), +} + +MINIMUM_CLANG_VERSION = (3, 3, 0) +CUDA_CLANG_VERSIONS: VersionMap = { + '11.1': (MINIMUM_CLANG_VERSION, (11, 0)), + '11.2': (MINIMUM_CLANG_VERSION, (12, 0)), + '11.3': (MINIMUM_CLANG_VERSION, (12, 0)), + '11.4': (MINIMUM_CLANG_VERSION, (13, 0)), + '11.5': (MINIMUM_CLANG_VERSION, (13, 0)), + '11.6': (MINIMUM_CLANG_VERSION, (14, 0)), + '11.7': (MINIMUM_CLANG_VERSION, (14, 0)), +} + +__all__ = ["get_default_build_root", "check_compiler_ok_for_platform", "get_compiler_abi_compatibility_and_version", "BuildExtension", + "CppExtension", "CUDAExtension", "SyclExtension", "include_paths", "library_paths", "load", "load_inline", "is_ninja_available", + "verify_ninja_availability", "remove_extension_h_precompiler_headers", "get_cxx_compiler", "check_compiler_is_gcc"] +# Taken directly from python stdlib < 3.9 +# See https://github.com/pytorch/pytorch/issues/48617 +def _nt_quote_args(args: list[str] | None) -> list[str]: + """Quote command-line arguments for DOS/Windows conventions. + + Just wraps every argument which contains blanks in double quotes, and + returns a new argument list. + """ + # Cover None-type + if not args: + return [] + return [f'"{arg}"' if ' ' in arg else arg for arg in args] + +def _find_cuda_home() -> str | None: + """Find the CUDA install path.""" + # Guess #1 + cuda_home = os.environ.get('CUDA_HOME') or os.environ.get('CUDA_PATH') + if cuda_home is None: + # Guess #2 + nvcc_path = shutil.which("nvcc") + if nvcc_path is not None: + cuda_home = os.path.dirname(os.path.dirname(nvcc_path)) + else: + # Guess #3 + if IS_WINDOWS: + cuda_homes = glob.glob( + 'C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v*.*') + if len(cuda_homes) == 0: + cuda_home = '' + else: + cuda_home = cuda_homes[0] + else: + cuda_home = '/usr/local/cuda' + if not os.path.exists(cuda_home): + cuda_home = None + if cuda_home and not torch.cuda.is_available(): + logger.warning("No CUDA runtime is found, using CUDA_HOME='%s'", cuda_home) + return cuda_home + +def _find_rocm_home() -> str | None: + """Find the ROCm install path.""" + # Guess #1 + rocm_home = os.environ.get('ROCM_HOME') or os.environ.get('ROCM_PATH') + if rocm_home is None: + # Guess #2 + hipcc_path = shutil.which('hipcc') + if hipcc_path is not None: + rocm_home = os.path.dirname(os.path.dirname( + os.path.realpath(hipcc_path))) + # can be either /hip/bin/hipcc or /bin/hipcc + if os.path.basename(rocm_home) == 'hip': + rocm_home = os.path.dirname(rocm_home) + else: + # Guess #3 + fallback_path = '/opt/rocm' + if os.path.exists(fallback_path): + rocm_home = fallback_path + if rocm_home and torch.version.hip is None: + logger.warning("No ROCm runtime is found, using ROCM_HOME='%s'", rocm_home) + return rocm_home + +def _find_sycl_home() -> str | None: + sycl_home = None + icpx_path = shutil.which('icpx') + # Guess 1: for source code build developer/user, we'll have icpx in PATH, + # which will tell us the SYCL_HOME location. + if icpx_path is not None: + sycl_home = os.path.dirname(os.path.dirname( + os.path.realpath(icpx_path))) + + # Guess 2: for users install Pytorch with XPU support, the sycl runtime is + # inside intel-sycl-rt, which is automatically installed via pip dependency. + else: + try: + files = importlib.metadata.files('intel-sycl-rt') or [] + for f in files: + if f.name == "libsycl.so": + sycl_home = os.path.dirname(Path(f.locate()).parent.resolve()) + break + except importlib.metadata.PackageNotFoundError: + logger.warning("Trying to find SYCL_HOME from intel-sycl-rt package, but it is not installed.") + return sycl_home + +def _join_rocm_home(*paths) -> str: + """ + Join paths with ROCM_HOME, or raises an error if it ROCM_HOME is not set. + + This is basically a lazy way of raising an error for missing $ROCM_HOME + only once we need to get any ROCm-specific path. + """ + if ROCM_HOME is None: + raise OSError('ROCM_HOME environment variable is not set. ' + 'Please set it to your ROCm install root.') + return os.path.join(ROCM_HOME, *paths) + +def _join_sycl_home(*paths) -> str: + """ + Join paths with SYCL_HOME, or raises an error if it SYCL_HOME is not found. + + This is basically a lazy way of raising an error for missing SYCL_HOME + only once we need to get any SYCL-specific path. + """ + if SYCL_HOME is None: + raise OSError('SYCL runtime is not dected. Please setup the pytorch ' + 'prerequisites for Intel GPU following the instruction in ' + 'https://github.com/pytorch/pytorch?tab=readme-ov-file#intel-gpu-support ' + 'or install intel-sycl-rt via pip.') + + return os.path.join(SYCL_HOME, *paths) + + + +ABI_INCOMPATIBILITY_WARNING = ( + " !! WARNING !!" + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" + "Your compiler (%s) may be ABI-incompatible with PyTorch!" + "Please use a compiler that is ABI-compatible with GCC 5.0 and above." + "See https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html." + "See https://gist.github.com/goldsborough/d466f43e8ffc948ff92de7486c5216d6" + "for instructions on how to install GCC 5 or higher." + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" + " !! WARNING !!" +) +WRONG_COMPILER_WARNING = ( + " !! WARNING !!" + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" + "Your compiler (%s) is not compatible with the compiler Pytorch was" + "built with for this platform, which is %s on %s. Please" + "use %s to compile your extension. Alternatively, you may" + "compile PyTorch from source using %s, and then you can also use" + "%s to compile your extension." + "See https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md for help" + "with compiling PyTorch from source." + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" + " !! WARNING !!" +) +CUDA_MISMATCH_MESSAGE = ( + "The detected CUDA version (%s) mismatches the version that was used to compile" + "PyTorch (%s). Please make sure to use the same CUDA versions." +) +CUDA_MISMATCH_WARN = ( + "The detected CUDA version (%s) has a minor version mismatch with the version that was used to compile PyTorch (%s). Most likely this shouldn't be a problem." +) +CUDA_NOT_FOUND_MESSAGE = ( + "CUDA was not found on the system, please set the CUDA_HOME or the CUDA_PATH" + "environment variable or add NVCC to your system PATH. The extension compilation will fail." +) +ROCM_HOME = _find_rocm_home() if (torch.cuda._is_compiled() and torch.version.hip) else None +HIP_HOME = _join_rocm_home('hip') if ROCM_HOME else None +IS_HIP_EXTENSION = bool(ROCM_HOME is not None and torch.version.hip is not None) +ROCM_VERSION = None +if torch.version.hip is not None: + ROCM_VERSION = tuple(int(v) for v in torch.version.hip.split('.')[:2]) + +CUDA_HOME = _find_cuda_home() if (torch.cuda._is_compiled() and torch.version.cuda) else None +CUDNN_HOME = os.environ.get('CUDNN_HOME') or os.environ.get('CUDNN_PATH') +SYCL_HOME = _find_sycl_home() if torch.xpu._is_compiled() else None +WINDOWS_CUDA_HOME = os.environ.get('WINDOWS_CUDA_HOME') # used for AOTI cross-compilation + +# PyTorch releases have the version pattern major.minor.patch, whereas when +# PyTorch is built from source, we append the git commit hash, which gives +# it the below pattern. +BUILT_FROM_SOURCE_VERSION_PATTERN = re.compile(r'\d+\.\d+\.\d+\w+\+\w+') + +COMMON_MSVC_FLAGS = ['/MD', '/wd4819', '/wd4251', '/wd4244', '/wd4267', '/wd4275', '/wd4018', '/wd4190', '/wd4624', '/wd4067', '/wd4068', '/EHsc'] + +MSVC_IGNORE_CUDAFE_WARNINGS = [ + 'base_class_has_different_dll_interface', + 'field_without_dll_interface', + 'dll_interface_conflict_none_assumed', + 'dll_interface_conflict_dllexport_assumed' +] + +COMMON_NVCC_FLAGS = [ + '-D__CUDA_NO_HALF_OPERATORS__', + '-D__CUDA_NO_HALF_CONVERSIONS__', + '-D__CUDA_NO_BFLOAT16_CONVERSIONS__', + '-D__CUDA_NO_HALF2_OPERATORS__', + '--expt-relaxed-constexpr' +] + +COMMON_HIP_FLAGS = [ + '-D__HIP_PLATFORM_AMD__=1', + '-DUSE_ROCM=1', + '-DHIPBLAS_V2', +] + +if not IS_WINDOWS: + COMMON_HIP_FLAGS.append('-fPIC') + +COMMON_HIPCC_FLAGS = [ + '-DCUDA_HAS_FP16=1', + '-D__HIP_NO_HALF_OPERATORS__=1', + '-D__HIP_NO_HALF_CONVERSIONS__=1', + '-DHIP_ENABLE_WARP_SYNC_BUILTINS=1' +] + +if IS_WINDOWS: + # Compatibility flags, similar to those set in cmake/Dependencies.cmake. + COMMON_HIPCC_FLAGS.append('-fms-extensions') + # Suppress warnings about dllexport. + COMMON_HIPCC_FLAGS.append('-Wno-ignored-attributes') + + +def _get_icpx_version() -> str: + icpx = 'icx' if IS_WINDOWS else 'icpx' + compiler_info = subprocess.check_output([icpx, '--version']) + match = re.search(r'(\d+)\.(\d+)\.(\d+)', compiler_info.decode().strip()) + version = ['0', '0', '0'] if match is None else list(match.groups()) + version = list(map(int, version)) + if len(version) != 3: + raise AssertionError("Failed to parse DPC++ compiler version") + # Aligning version format with what torch.version.xpu() returns + return f"{version[0]}{version[1]:02}{version[2]:02}" + + +def _get_sycl_arch_list(): + if 'TORCH_XPU_ARCH_LIST' in os.environ: + return os.environ.get('TORCH_XPU_ARCH_LIST') + arch_list = torch.xpu.get_arch_list() + # Dropping dg2* archs since they lack hardware support for fp64 and require + # special consideration from the user. If needed these platforms can + # be requested thru TORCH_XPU_ARCH_LIST environment variable. + arch_list = [x for x in arch_list if not x.startswith('dg2')] + return ','.join(arch_list) + + +# If arch list returned by _get_sycl_arch_list() is empty, then sycl kernels will be compiled +# for default spir64 target and avoid device specific compilations entirely. Further, kernels +# will be JIT compiled at runtime. +def _append_sycl_targets_if_missing(cflags) -> None: + if any(flag.startswith('-fsycl-targets=') for flag in cflags): + # do nothing: user has manually specified sycl targets + return + if _get_sycl_arch_list() != '': + # AOT (spir64_gen) + JIT (spir64) + cflags.append('-fsycl-targets=spir64_gen,spir64') + else: + # JIT (spir64) + cflags.append('-fsycl-targets=spir64') + +def _get_sycl_device_flags(cflags): + # We need last occurrence of -fsycl-targets as it will be the one taking effect. + # So searching in reversed list. + flags = [f for f in reversed(cflags) if f.startswith('-fsycl-targets=')] + if not flags: + raise AssertionError("bug: -fsycl-targets should have been amended to cflags") + + arch_list = _get_sycl_arch_list() + if arch_list != '': + flags += [f'-Xs "-device {arch_list}"'] + return flags + +_COMMON_SYCL_FLAGS = [ + '-fsycl', +] + +_SYCL_DLINK_FLAGS = [ + *_COMMON_SYCL_FLAGS, + '-fsycl-link', + '--offload-compress', +] + +JIT_EXTENSION_VERSIONER = ExtensionVersioner() + +PLAT_TO_VCVARS = { + 'win32' : 'x86', + 'win-amd64' : 'x86_amd64', +} + +min_supported_cpython = "0x030A0000" # Python 3.10 hexcode + +def get_cxx_compiler(): + if IS_WINDOWS: + compiler = os.environ.get('CXX', 'cl') + else: + compiler = os.environ.get('CXX', 'c++') + return compiler + +def _is_binary_build() -> bool: + return not BUILT_FROM_SOURCE_VERSION_PATTERN.match(torch.version.__version__) + + +def _accepted_compilers_for_platform() -> list[str]: + # gnu-c++ and gnu-cc are the conda gcc compilers + return ['clang++', 'clang'] if IS_MACOS else ['g++', 'gcc', 'gnu-c++', 'gnu-cc', 'clang++', 'clang'] + +def _maybe_write(filename, new_content) -> None: + r''' + Equivalent to writing the content into the file but will not touch the file + if it already had the right content (to avoid triggering recompile). + ''' + if os.path.exists(filename): + with open(filename) as f: + content = f.read() + + if content == new_content: + # The file already contains the right thing! + return + + with open(filename, 'w') as source_file: + source_file.write(new_content) + +def get_default_build_root() -> str: + """ + Return the path to the root folder under which extensions will built. + + For each extension module built, there will be one folder underneath the + folder returned by this function. For example, if ``p`` is the path + returned by this function and ``ext`` the name of an extension, the build + folder for the extension will be ``p/ext``. + + This directory is **user-specific** so that multiple users on the same + machine won't meet permission issues. + """ + return os.path.realpath(torch._appdirs.user_cache_dir(appname='torch_extensions')) + + +def check_compiler_ok_for_platform(compiler: str) -> bool: + """ + Verify that the compiler is the expected one for the current platform. + + Args: + compiler (str): The compiler executable to check. + + Returns: + True if the compiler is gcc/g++ on Linux or clang/clang++ on macOS, + and always True for Windows. + """ + if IS_WINDOWS: + return True + compiler_path = shutil.which(compiler) + if compiler_path is None: + return False + # Use os.path.realpath to resolve any symlinks, in particular from 'c++' to e.g. 'g++'. + compiler_path = os.path.realpath(compiler_path) + # Check the compiler name + if any(name in compiler_path for name in _accepted_compilers_for_platform()): + return True + # If compiler wrapper is used try to infer the actual compiler by invoking it with -v flag + env = os.environ.copy() + env['LC_ALL'] = 'C' # Don't localize output + try: + version_string = subprocess.check_output([compiler, '-v'], stderr=subprocess.STDOUT, env=env).decode(*SUBPROCESS_DECODE_ARGS) + except subprocess.CalledProcessError: + # If '-v' fails, try '--version' + version_string = subprocess.check_output([compiler, '--version'], stderr=subprocess.STDOUT, env=env).decode(*SUBPROCESS_DECODE_ARGS) + if IS_LINUX: + # Check for 'gcc' or 'g++' for sccache wrapper + pattern = re.compile("^COLLECT_GCC=(.*)$", re.MULTILINE) + results = re.findall(pattern, version_string) + if len(results) != 1: + # Clang is also a supported compiler on Linux + # Though on Ubuntu it's sometimes called "Ubuntu clang version" + return 'clang version' in version_string + compiler_path = os.path.realpath(results[0].strip()) + # On RHEL/CentOS c++ is a gcc compiler wrapper + if os.path.basename(compiler_path) == 'c++' and 'gcc version' in version_string: + return True + return any(name in compiler_path for name in _accepted_compilers_for_platform()) + if IS_MACOS: + # Check for 'clang' or 'clang++' + return version_string.startswith("Apple clang") + return False + + +def get_compiler_abi_compatibility_and_version(compiler) -> tuple[bool, TorchVersion]: + """ + Determine if the given compiler is ABI-compatible with PyTorch alongside its version. + + Args: + compiler (str): The compiler executable name to check (e.g. ``g++``). + Must be executable in a shell process. + + Returns: + A tuple that contains a boolean that defines if the compiler is (likely) ABI-incompatible with PyTorch, + followed by a `TorchVersion` string that contains the compiler version separated by dots. + """ + if not _is_binary_build(): + return (True, TorchVersion('0.0.0')) + if os.environ.get('TORCH_DONT_CHECK_COMPILER_ABI') in ['ON', '1', 'YES', 'TRUE', 'Y']: + return (True, TorchVersion('0.0.0')) + + # First check if the compiler is one of the expected ones for the particular platform. + if not check_compiler_ok_for_platform(compiler): + logger.warning(WRONG_COMPILER_WARNING, compiler, _accepted_compilers_for_platform()[0], sys.platform, _accepted_compilers_for_platform()[0]) + return (False, TorchVersion('0.0.0')) + + if IS_MACOS: + # There is no particular minimum version we need for clang, so we're good here. + return (True, TorchVersion('0.0.0')) + try: + if IS_LINUX: + minimum_required_version = MINIMUM_GCC_VERSION + compiler_info = subprocess.check_output([compiler, '-dumpfullversion', '-dumpversion']) + else: + minimum_required_version = MINIMUM_MSVC_VERSION + compiler_info = subprocess.check_output(compiler, stderr=subprocess.STDOUT) + match = re.search(r'(\d+)\.(\d+)\.(\d+)', compiler_info.decode(*SUBPROCESS_DECODE_ARGS).strip()) + version = ['0', '0', '0'] if match is None else list(match.groups()) + except Exception: + _, error, _ = sys.exc_info() + logger.warning('Error checking compiler version for %s: %s', compiler, error) + return (False, TorchVersion('0.0.0')) + + # convert alphanumeric string to numeric string + # amdclang++ returns str like 0.0.0git, others return 0.0.0 + numeric_version = [re.sub(r'\D', '', v) for v in version] + + if tuple(map(int, numeric_version)) >= minimum_required_version: + return (True, TorchVersion('.'.join(numeric_version))) + + compiler = f'{compiler} {".".join(numeric_version)}' + logger.warning(ABI_INCOMPATIBILITY_WARNING, compiler) + + return (False, TorchVersion('.'.join(numeric_version))) + + +def _check_cuda_version(compiler_name: str, compiler_version: TorchVersion) -> None: + if not CUDA_HOME: + raise RuntimeError(CUDA_NOT_FOUND_MESSAGE) + + nvcc = os.path.join(CUDA_HOME, 'bin', 'nvcc.exe' if IS_WINDOWS else 'nvcc') + if not os.path.exists(nvcc): + raise FileNotFoundError(f"nvcc not found at '{nvcc}'. Ensure CUDA path '{CUDA_HOME}' is correct.") + + cuda_version_str = subprocess.check_output([nvcc, '--version']).strip().decode(*SUBPROCESS_DECODE_ARGS) + cuda_version = re.search(r'release (\d+[.]\d+)', cuda_version_str) + if cuda_version is None: + return + + cuda_str_version = cuda_version.group(1) + cuda_ver = Version(cuda_str_version) + if torch.version.cuda is None: + return + + torch_cuda_version = Version(torch.version.cuda) + if cuda_ver != torch_cuda_version: + # major/minor attributes are only available in setuptools>=49.4.0 + if getattr(cuda_ver, "major", None) is None: + raise ValueError("setuptools>=49.4.0 is required") + if cuda_ver.major != torch_cuda_version.major: + raise RuntimeError(CUDA_MISMATCH_MESSAGE, cuda_str_version, torch.version.cuda) + logger.warning(CUDA_MISMATCH_WARN, cuda_str_version, torch.version.cuda) + + if not (sys.platform.startswith('linux') and + os.environ.get('TORCH_DONT_CHECK_COMPILER_ABI') not in ['ON', '1', 'YES', 'TRUE', 'Y'] and + _is_binary_build()): + return + + cuda_compiler_bounds: VersionMap = CUDA_CLANG_VERSIONS if compiler_name.startswith('clang') else CUDA_GCC_VERSIONS + + if cuda_str_version not in cuda_compiler_bounds: + logger.warning('There are no %s version bounds defined for CUDA version %s', compiler_name, cuda_str_version) + else: + min_compiler_version, max_excl_compiler_version = cuda_compiler_bounds[cuda_str_version] + # Special case for 11.4.0, which has lower compiler bounds than 11.4.1 + if "V11.4.48" in cuda_version_str and cuda_compiler_bounds == CUDA_GCC_VERSIONS: + max_excl_compiler_version = (11, 0) + min_compiler_version_str = '.'.join(map(str, min_compiler_version)) + max_excl_compiler_version_str = '.'.join(map(str, max_excl_compiler_version)) + + version_bound_str = f'>={min_compiler_version_str}, <{max_excl_compiler_version_str}' + + if compiler_version < TorchVersion(min_compiler_version_str): + raise RuntimeError( + f'The current installed version of {compiler_name} ({compiler_version}) is less ' + f'than the minimum required version by CUDA {cuda_str_version} ({min_compiler_version_str}). ' + f'Please make sure to use an adequate version of {compiler_name} ({version_bound_str}).' + ) + if compiler_version >= TorchVersion(max_excl_compiler_version_str): + raise RuntimeError( + f'The current installed version of {compiler_name} ({compiler_version}) is greater ' + f'than the maximum required version by CUDA {cuda_str_version}. ' + f'Please make sure to use an adequate version of {compiler_name} ({version_bound_str}).' + ) + + +# Specify Visual Studio C runtime library for hipcc +def _set_hipcc_runtime_lib(is_standalone, debug) -> None: + if is_standalone: + if debug: + COMMON_HIP_FLAGS.append('-fms-runtime-lib=static_dbg') + else: + COMMON_HIP_FLAGS.append('-fms-runtime-lib=static') + else: + if debug: + COMMON_HIP_FLAGS.append('-fms-runtime-lib=dll_dbg') + else: + COMMON_HIP_FLAGS.append('-fms-runtime-lib=dll') + +def _append_sycl_std_if_no_std_present(cflags) -> None: + if not any(flag.startswith('-sycl-std=') for flag in cflags): + cflags.append('-sycl-std=2020') + + +def _wrap_sycl_host_flags(cflags): + host_cflags = [] + host_cxx = get_cxx_compiler() + if IS_WINDOWS: + for flag in cflags: + if flag.startswith("-I"): + flag = flag.replace("\\", "\\\\").replace("-I", "/I") + else: + flag = flag.replace("-D", "/D") + flag = flag.replace('"', '\\"') + host_cflags.append(flag) + joined_host_cflags = ' '.join(host_cflags) + + external_include = _join_sycl_home("include").replace("\\", "\\\\") + + # Some versions of DPC++ compiler pass paths to SYCL headers as user include paths (`-I`) rather + # than system paths (`-isystem`). This makes host compiler to report warnings encountered in the + # SYCL headers, such as deprecated warnings, even if warmed API is not actually used in the program. + # We expect that this issue will be addressed in the later version of DPC++ compiler. To workaround the + # issue now we wrap paths to SYCL headers in `/external:I`. Warning free compilation is especially important + # for Windows build as `/sdl` compilation flag assumes that and we will fail compilation otherwise. + wrapped_host_cflags = [ + f"-fsycl-host-compiler={host_cxx}", + f'-fsycl-host-compiler-options="\\"/external:I{external_include}\\" /external:W0 {joined_host_cflags}"', + ] + else: + joined_host_cflags = ' '.join(cflags) + wrapped_host_cflags = [ + f"-fsycl-host-compiler={host_cxx}", + shlex.quote(f"-fsycl-host-compiler-options={joined_host_cflags}"), + ] + return wrapped_host_cflags + + +class BuildExtension(build_ext): + """ + A custom :mod:`setuptools` build extension . + + This :class:`setuptools.build_ext` subclass takes care of passing the + minimum required compiler flags (e.g. ``-std=c++17``) as well as mixed + C++/CUDA/SYCL compilation (and support for CUDA/SYCL files in general). + + When using :class:`BuildExtension`, it is allowed to supply a dictionary + for ``extra_compile_args`` (rather than the usual list) that maps from + languages/compilers (the only expected values are ``cxx``, ``nvcc`` or + ``sycl``) to a list of additional compiler flags to supply to the compiler. + This makes it possible to supply different flags to the C++, CUDA and SYCL + compiler during mixed compilation. + + ``use_ninja`` (bool): If ``use_ninja`` is ``True`` (default), then we + attempt to build using the Ninja backend. Ninja greatly speeds up + compilation compared to the standard ``setuptools.build_ext``. + Fallbacks to the standard distutils backend if Ninja is not available. + + .. note:: + By default, the Ninja backend uses #CPUS + 2 workers to build the + extension. This may use up too many resources on some systems. One + can control the number of workers by setting the `MAX_JOBS` environment + variable to a non-negative number. + """ + + @classmethod + def with_options(cls, **options): + """Return a subclass with alternative constructor that extends any original keyword arguments to the original constructor with the given options.""" + class cls_with_options(cls): # type: ignore[misc, valid-type] + def __init__(self, *args, **kwargs) -> None: + kwargs.update(options) + super().__init__(*args, **kwargs) + + return cls_with_options + + def __init__(self, *args, **kwargs) -> None: + super().__init__(*args, **kwargs) + self.no_python_abi_suffix = kwargs.get("no_python_abi_suffix", False) + + self.use_ninja = kwargs.get('use_ninja', True) + if self.use_ninja: + # Test if we can use ninja. Fallback otherwise. + msg = ('Attempted to use ninja as the BuildExtension backend but ' + '%s. Falling back to using the slow distutils backend.') + if not is_ninja_available(): + logger.warning(msg, 'we could not find ninja.') + self.use_ninja = False + + def finalize_options(self) -> None: + super().finalize_options() + if self.use_ninja: + self.force = True + + def build_extensions(self) -> None: + compiler_name, compiler_version = self._check_abi() + + cuda_ext = False + sycl_ext = False + extension_iter = iter(self.extensions) + extension = next(extension_iter, None) + while not (cuda_ext and sycl_ext) and extension: + for source in extension.sources: + _, ext = os.path.splitext(source) + if ext == '.cu': + cuda_ext = True + elif ext == '.sycl': + sycl_ext = True + + # This check accounts on a case when cuda and sycl sources + # are mixed in the same extension. We can stop checking + # sources if both are found or there is no more sources. + if cuda_ext and sycl_ext: + break + + extension = next(extension_iter, None) + + if sycl_ext: + if not self.use_ninja: + raise AssertionError("ninja is required to build sycl extensions.") + + if cuda_ext and not IS_HIP_EXTENSION: + _check_cuda_version(compiler_name, compiler_version) + + for extension in self.extensions: + # Ensure at least an empty list of flags for 'cxx', 'nvcc' and 'sycl' when + # extra_compile_args is a dict. Otherwise, default torch flags do + # not get passed. Necessary when only one of 'cxx', 'nvcc' or 'sycl' is + # passed to extra_compile_args in CUDAExtension or SyclExtension, i.e. + # CUDAExtension(..., extra_compile_args={'cxx': [...]}) + # or + # CUDAExtension(..., extra_compile_args={'nvcc': [...]}) + if isinstance(extension.extra_compile_args, dict): + for ext in ['cxx', 'nvcc', 'sycl']: + if ext not in extension.extra_compile_args: + extension.extra_compile_args[ext] = [] + + self._add_compile_flag(extension, '-DTORCH_API_INCLUDE_EXTENSION_H') + + if IS_HIP_EXTENSION: + self._hipify_compile_flags(extension) + + if extension.py_limited_api: + # compile any extension that has passed in py_limited_api to the + # Extension constructor with the Py_LIMITED_API flag set to our + # min supported CPython version. + # See https://docs.python.org/3/c-api/stable.html#c.Py_LIMITED_API + self._add_compile_flag(extension, f'-DPy_LIMITED_API={min_supported_cpython}') + self._define_torch_extension_name(extension) + + if 'nvcc_dlink' in extension.extra_compile_args: + if not self.use_ninja: + raise AssertionError( + f"With dlink=True, ninja is required to build cuda extension {extension.name}." + ) + + # Register .cu, .cuh, .hip, .mm and .sycl as valid source extensions. + # NOTE: At the moment .sycl is not a standard extension for SYCL supported + # by compiler. Here we introduce a torch level convention that SYCL sources + # should have .sycl file extension. + self.compiler.src_extensions += ['.cu', '.cuh', '.hip', '.sycl'] + if torch.backends.mps.is_built(): + self.compiler.src_extensions += ['.mm'] + # Save the original _compile method for later. + if self.compiler.compiler_type == 'msvc': + self.compiler._cpp_extensions += ['.cu', '.cuh'] + original_compile = self.compiler.compile + original_spawn = self.compiler.spawn + else: + original_compile = self.compiler._compile + + def append_std17_if_no_std_present(cflags) -> None: + # NVCC does not allow multiple -std to be passed, so we avoid + # overriding the option if the user explicitly passed it. + cpp_format_prefix = '/{}:' if self.compiler.compiler_type == 'msvc' else '-{}=' + cpp_flag_prefix = cpp_format_prefix.format('std') + cpp_flag = cpp_flag_prefix + 'c++17' + if not any(flag.startswith(cpp_flag_prefix) for flag in cflags): + cflags.append(cpp_flag) + + def unix_cuda_flags(cflags): + cflags = (COMMON_NVCC_FLAGS + + ['--compiler-options', "'-fPIC'"] + + cflags + _get_cuda_arch_flags(cflags)) + + # NVCC does not allow multiple -ccbin/--compiler-bindir to be passed, so we avoid + # overriding the option if the user explicitly passed it. + _ccbin = os.getenv("CC") + if ( + _ccbin is not None + and not any(flag.startswith(('-ccbin', '--compiler-bindir')) for flag in cflags) + ): + cflags.extend(['-ccbin', _ccbin]) + + return cflags + + def convert_to_absolute_paths_inplace(paths) -> None: + # Helper function. See Note [Absolute include_dirs] + if paths is not None: + for i in range(len(paths)): + if not os.path.isabs(paths[i]): + paths[i] = os.path.abspath(paths[i]) + + def unix_wrap_single_compile(obj, src, ext, cc_args, extra_postargs, pp_opts) -> None: + # Copy before we make any modifications. + cflags = copy.deepcopy(extra_postargs) + try: + original_compiler = self.compiler.compiler_so + if _is_cuda_file(src): + nvcc = [_join_rocm_home('bin', 'hipcc') if IS_HIP_EXTENSION else _join_cuda_home('bin', 'nvcc')] + self.compiler.set_executable('compiler_so', nvcc) + if isinstance(cflags, dict): + cflags = cflags['nvcc'] + if IS_HIP_EXTENSION: + cflags = COMMON_HIPCC_FLAGS + cflags + _get_rocm_arch_flags(cflags) + else: + cflags = unix_cuda_flags(cflags) + elif isinstance(cflags, dict): + cflags = cflags['cxx'] + if IS_HIP_EXTENSION: + cflags = COMMON_HIP_FLAGS + cflags + append_std17_if_no_std_present(cflags) + + original_compile(obj, src, ext, cc_args, cflags, pp_opts) + finally: + # Put the original compiler back in place. + self.compiler.set_executable('compiler_so', original_compiler) + + def unix_wrap_ninja_compile(sources, + output_dir=None, + macros=None, + include_dirs=None, + debug=0, + extra_preargs=None, + extra_postargs=None, + depends=None): + r"""Compiles sources by outputting a ninja file and running it.""" + # NB: I copied some lines from self.compiler (which is an instance + # of distutils.UnixCCompiler). See the following link. + # https://github.com/python/cpython/blob/f03a8f8d5001963ad5b5b28dbd95497e9cc15596/Lib/distutils/ccompiler.py#L564-L567 # codespell:ignore + # This can be fragile, but a lot of other repos also do this + # (see https://github.com/search?q=_setup_compile&type=Code) + # so it is probably OK; we'll also get CI signal if/when + # we update our python version (which is when distutils can be + # upgraded) + + # Use absolute path for output_dir so that the object file paths + # (`objects`) get generated with absolute paths. + # pyrefly: ignore [no-matching-overload] + output_dir = os.path.abspath(output_dir) + + # See Note [Absolute include_dirs] + convert_to_absolute_paths_inplace(self.compiler.include_dirs) + + _, objects, extra_postargs, pp_opts, _ = \ + self.compiler._setup_compile(output_dir, macros, + include_dirs, sources, + depends, extra_postargs) + common_cflags = self.compiler._get_cc_args(pp_opts, debug, extra_preargs) + extra_cc_cflags = self.compiler.compiler_so[1:] + with_cuda = any(map(_is_cuda_file, sources)) + with_sycl = any(map(_is_sycl_file, sources)) + assert not (with_sycl and with_cuda) + + # extra_postargs can be either: + # - a dict mapping cxx/nvcc/sycl to extra flags + # - a list of extra flags. + if isinstance(extra_postargs, dict): + post_cflags = extra_postargs['cxx'] + else: + post_cflags = list(extra_postargs) + if IS_HIP_EXTENSION: + post_cflags = COMMON_HIP_FLAGS + post_cflags + append_std17_if_no_std_present(post_cflags) + + cuda_post_cflags = None + cuda_cflags = None + if with_cuda: + cuda_cflags = common_cflags + if isinstance(extra_postargs, dict): + cuda_post_cflags = extra_postargs['nvcc'] + else: + cuda_post_cflags = list(extra_postargs) + if IS_HIP_EXTENSION: + cuda_post_cflags = cuda_post_cflags + _get_rocm_arch_flags(cuda_post_cflags) + cuda_post_cflags = COMMON_HIP_FLAGS + COMMON_HIPCC_FLAGS + cuda_post_cflags + else: + cuda_post_cflags = unix_cuda_flags(cuda_post_cflags) + append_std17_if_no_std_present(cuda_post_cflags) + cuda_cflags = [shlex.quote(f) for f in cuda_cflags] + cuda_post_cflags = [shlex.quote(f) for f in cuda_post_cflags] + + if isinstance(extra_postargs, dict) and 'nvcc_dlink' in extra_postargs: + cuda_dlink_post_cflags = unix_cuda_flags(extra_postargs['nvcc_dlink']) + cuda_dlink_post_cflags = [shlex.quote(f) for f in cuda_dlink_post_cflags] + else: + cuda_dlink_post_cflags = None + + sycl_post_cflags = None + sycl_cflags = None + sycl_dlink_post_cflags = None + if with_sycl: + sycl_cflags = extra_cc_cflags + common_cflags + _COMMON_SYCL_FLAGS + if isinstance(extra_postargs, dict): + sycl_post_cflags = extra_postargs['sycl'] + else: + sycl_post_cflags = list(extra_postargs) + _append_sycl_targets_if_missing(sycl_post_cflags) + append_std17_if_no_std_present(sycl_cflags) + _append_sycl_std_if_no_std_present(sycl_cflags) + host_cflags = extra_cc_cflags + common_cflags + post_cflags + append_std17_if_no_std_present(host_cflags) + # escaping quoted arguments to pass them thru SYCL compiler + icpx_version = _get_icpx_version() + if int(icpx_version) >= 20250200: + host_cflags = [item.replace('"', '\\"') for item in host_cflags] + else: + host_cflags = [item.replace('"', '\\\\"') for item in host_cflags] + # Note the order: shlex.quote sycl_flags first, _wrap_sycl_host_flags + # second. Reason is that sycl host flags are quoted, space containing + # strings passed to SYCL compiler. + sycl_cflags = [shlex.quote(f) for f in sycl_cflags] + sycl_cflags += _wrap_sycl_host_flags(host_cflags) + sycl_dlink_post_cflags = _SYCL_DLINK_FLAGS.copy() + sycl_dlink_post_cflags += _get_sycl_device_flags(sycl_post_cflags) + sycl_post_cflags = [shlex.quote(f) for f in sycl_post_cflags] + + _write_ninja_file_and_compile_objects( + sources=sources, + objects=objects, + cflags=[shlex.quote(f) for f in extra_cc_cflags + common_cflags], + post_cflags=[shlex.quote(f) for f in post_cflags], + cuda_cflags=cuda_cflags, + cuda_post_cflags=cuda_post_cflags, + cuda_dlink_post_cflags=cuda_dlink_post_cflags, + sycl_cflags=sycl_cflags, + sycl_post_cflags=sycl_post_cflags, + sycl_dlink_post_cflags=sycl_dlink_post_cflags, + build_directory=output_dir, + verbose=True, + with_cuda=with_cuda, + with_sycl=with_sycl) + + # Return *all* object filenames, not just the ones we just built. + return objects + + def win_cuda_flags(cflags): + return (COMMON_NVCC_FLAGS + + cflags + _get_cuda_arch_flags(cflags)) + + def win_hip_flags(cflags): + return (COMMON_HIPCC_FLAGS + COMMON_HIP_FLAGS + cflags + _get_rocm_arch_flags(cflags)) + + def win_wrap_single_compile(sources, + output_dir=None, + macros=None, + include_dirs=None, + debug=0, + extra_preargs=None, + extra_postargs=None, + depends=None): + + self.cflags = copy.deepcopy(extra_postargs) + extra_postargs = None + + def spawn(cmd): + # Using regex to match src, obj and include files + src_regex = re.compile('/T(p|c)(.*)') + src_list = [ + m.group(2) for m in (src_regex.match(elem) for elem in cmd) + if m + ] + + obj_regex = re.compile('/Fo(.*)') # codespell:ignore + obj_list = [ + m.group(1) for m in (obj_regex.match(elem) for elem in cmd) + if m + ] + + include_regex = re.compile(r'((\-|\/)I.*)') + include_list = [ + m.group(1) + for m in (include_regex.match(elem) for elem in cmd) if m + ] + + if len(src_list) >= 1 and len(obj_list) >= 1: + src = src_list[0] + obj = obj_list[0] + if _is_cuda_file(src): + if IS_HIP_EXTENSION: + nvcc = _get_hipcc_path() + else: + nvcc = _join_cuda_home('bin', 'nvcc') + if isinstance(self.cflags, dict): + cflags = self.cflags['nvcc'] + elif isinstance(self.cflags, list): + cflags = self.cflags + else: + cflags = [] + + if IS_HIP_EXTENSION: + cflags = win_hip_flags(cflags) + else: + cflags = win_cuda_flags(cflags) + ['-std=c++17', '--use-local-env'] + for ignore_warning in MSVC_IGNORE_CUDAFE_WARNINGS: + cflags = ['-Xcudafe', '--diag_suppress=' + ignore_warning] + cflags + for flag in COMMON_MSVC_FLAGS: + cflags = ['-Xcompiler', flag] + cflags + cmd = [nvcc, '-c', src, '-o', obj] + include_list + cflags + elif isinstance(self.cflags, dict): + cflags = COMMON_MSVC_FLAGS + self.cflags['cxx'] + append_std17_if_no_std_present(cflags) + cmd += cflags + elif isinstance(self.cflags, list): + cflags = COMMON_MSVC_FLAGS + self.cflags + append_std17_if_no_std_present(cflags) + cmd += cflags + + return original_spawn(cmd) + + try: + self.compiler.spawn = spawn + return original_compile(sources, output_dir, macros, + include_dirs, debug, extra_preargs, + extra_postargs, depends) + finally: + self.compiler.spawn = original_spawn + + def win_wrap_ninja_compile(sources, + output_dir=None, + macros=None, + include_dirs=None, + debug=0, + extra_preargs=None, + extra_postargs=None, + depends=None, + is_standalone=False): + if not self.compiler.initialized: + self.compiler.initialize() + # pyrefly: ignore [no-matching-overload] + output_dir = os.path.abspath(output_dir) + + # Note [Absolute include_dirs] + # Convert relative path in self.compiler.include_dirs to absolute path if any. + # For ninja build, the build location is not local, but instead, the build happens + # in a script-created build folder. Thus, relative paths lose their correctness. + # To be consistent with jit extension, we allow user to enter relative include_dirs + # in setuptools.setup, and we convert the relative path to absolute path here. + convert_to_absolute_paths_inplace(self.compiler.include_dirs) + + _, objects, extra_postargs, pp_opts, _ = \ + self.compiler._setup_compile(output_dir, macros, + include_dirs, sources, + depends, extra_postargs) + # Replace space with \ when using hipcc (hipcc passes includes to clang without ""s so clang sees space in include paths as new argument) + if IS_HIP_EXTENSION: + pp_opts = ["-I{}".format(s[2:].replace(" ", "\\")) if s.startswith('-I') else s for s in pp_opts] + common_cflags = extra_preargs or [] + cflags = [] + if debug: + cflags.extend(self.compiler.compile_options_debug) + else: + cflags.extend(self.compiler.compile_options) + cflags = cflags + common_cflags + pp_opts + COMMON_MSVC_FLAGS + if IS_HIP_EXTENSION: + _set_hipcc_runtime_lib(is_standalone, debug) + common_cflags.extend(COMMON_HIP_FLAGS) + else: + common_cflags.extend(COMMON_MSVC_FLAGS) + with_cuda = any(map(_is_cuda_file, sources)) + with_sycl = any(map(_is_sycl_file, sources)) + assert not (with_sycl and with_cuda) + + # extra_postargs can be either: + # - a dict mapping cxx/nvcc to extra flags + # - a list of extra flags. + if isinstance(extra_postargs, dict): + post_cflags = extra_postargs['cxx'] + else: + post_cflags = list(extra_postargs) + if IS_HIP_EXTENSION: + post_cflags = COMMON_HIP_FLAGS + post_cflags + append_std17_if_no_std_present(post_cflags) + + cuda_post_cflags = None + cuda_cflags = None + if with_cuda: + cuda_cflags = ['-std=c++17'] + for common_cflag in common_cflags: + cuda_cflags.append('-Xcompiler') + cuda_cflags.append(common_cflag) + if not IS_HIP_EXTENSION: + cuda_cflags.append('--use-local-env') + for ignore_warning in MSVC_IGNORE_CUDAFE_WARNINGS: + cuda_cflags.append('-Xcudafe') + cuda_cflags.append('--diag_suppress=' + ignore_warning) + cuda_cflags.extend(pp_opts) + if isinstance(extra_postargs, dict): + cuda_post_cflags = extra_postargs['nvcc'] + else: + cuda_post_cflags = list(extra_postargs) + if IS_HIP_EXTENSION: + cuda_post_cflags = win_hip_flags(cuda_post_cflags) + else: + cuda_post_cflags = win_cuda_flags(cuda_post_cflags) + cflags = _nt_quote_args(cflags) + post_cflags = _nt_quote_args(post_cflags) + if with_cuda: + cuda_cflags = _nt_quote_args(cuda_cflags) + cuda_post_cflags = _nt_quote_args(cuda_post_cflags) + if isinstance(extra_postargs, dict) and 'nvcc_dlink' in extra_postargs: + cuda_dlink_post_cflags = win_cuda_flags(extra_postargs['nvcc_dlink']) + else: + cuda_dlink_post_cflags = None + + sycl_cflags = None + sycl_post_cflags = None + sycl_dlink_post_cflags = None + if with_sycl: + sycl_cflags = common_cflags + pp_opts + _COMMON_SYCL_FLAGS + if isinstance(extra_postargs, dict): + sycl_post_cflags = extra_postargs['sycl'] + else: + sycl_post_cflags = list(extra_postargs) + _append_sycl_targets_if_missing(sycl_post_cflags) + append_std17_if_no_std_present(sycl_cflags) + _append_sycl_std_if_no_std_present(sycl_cflags) + host_cflags = common_cflags + pp_opts + post_cflags + append_std17_if_no_std_present(host_cflags) + + sycl_cflags = _nt_quote_args(sycl_cflags) + host_cflags = _nt_quote_args(host_cflags) + + sycl_cflags += _wrap_sycl_host_flags(host_cflags) + sycl_dlink_post_cflags = _SYCL_DLINK_FLAGS.copy() + sycl_dlink_post_cflags += _get_sycl_device_flags(sycl_post_cflags) + sycl_post_cflags = _nt_quote_args(sycl_post_cflags) + + + _write_ninja_file_and_compile_objects( + sources=sources, + objects=objects, + cflags=cflags, + post_cflags=post_cflags, + cuda_cflags=cuda_cflags, + cuda_post_cflags=cuda_post_cflags, + cuda_dlink_post_cflags=cuda_dlink_post_cflags, + sycl_cflags=sycl_cflags, + sycl_post_cflags=sycl_post_cflags, + sycl_dlink_post_cflags=sycl_dlink_post_cflags, + build_directory=output_dir, + verbose=True, + with_cuda=with_cuda, + with_sycl=with_sycl) + + # Return *all* object filenames, not just the ones we just built. + return objects + # Monkey-patch the _compile or compile method. + # https://github.com/python/cpython/blob/dc0284ee8f7a270b6005467f26d8e5773d76e959/Lib/distutils/ccompiler.py#L511 # codespell:ignore + if self.compiler.compiler_type == 'msvc': + if self.use_ninja: + self.compiler.compile = win_wrap_ninja_compile + else: + self.compiler.compile = win_wrap_single_compile + else: + if self.use_ninja: + self.compiler.compile = unix_wrap_ninja_compile + else: + self.compiler._compile = unix_wrap_single_compile + + build_ext.build_extensions(self) + + def get_ext_filename(self, ext_name): + # Get the original shared library name. For Python 3, this name will be + # suffixed with ".so", where will be something like + # cpython-37m-x86_64-linux-gnu. + ext_filename = super().get_ext_filename(ext_name) + # If `no_python_abi_suffix` is `True`, we omit the Python 3 ABI + # component. This makes building shared libraries with setuptools that + # aren't Python modules nicer. + if self.no_python_abi_suffix: + # The parts will be e.g. ["my_extension", "cpython-37m-x86_64-linux-gnu", "so"]. + ext_filename_parts = ext_filename.split('.') + # Omit the second to last element. + without_abi = ext_filename_parts[:-2] + ext_filename_parts[-1:] + ext_filename = '.'.join(without_abi) + return ext_filename + + def _check_abi(self) -> tuple[str, TorchVersion]: + # On some platforms, like Windows, compiler_cxx is not available. + if hasattr(self.compiler, 'compiler_cxx'): + compiler = self.compiler.compiler_cxx[0] + else: + compiler = get_cxx_compiler() + _, version = get_compiler_abi_compatibility_and_version(compiler) + # Warn user if VC env is activated but `DISTUILS_USE_SDK` is not set. + if IS_WINDOWS and 'VSCMD_ARG_TGT_ARCH' in os.environ and 'DISTUTILS_USE_SDK' not in os.environ: + msg = ('It seems that the VC environment is activated but DISTUTILS_USE_SDK is not set.' + 'This may lead to multiple activations of the VC env.' + 'Please set `DISTUTILS_USE_SDK=1` and try again.') + raise UserWarning(msg) + return compiler, version + + def _add_compile_flag(self, extension, flag) -> None: + extension.extra_compile_args = copy.deepcopy(extension.extra_compile_args) + if isinstance(extension.extra_compile_args, dict): + for args in extension.extra_compile_args.values(): + args.append(flag) + else: + extension.extra_compile_args.append(flag) + + # Simple hipify, replace the first occurrence of CUDA with HIP + # in flags starting with "-" and containing "CUDA", but exclude -I flags + def _hipify_compile_flags(self, extension) -> None: + if isinstance(extension.extra_compile_args, dict) and 'nvcc' in extension.extra_compile_args: + modified_flags = [] + for flag in extension.extra_compile_args['nvcc']: + if flag.startswith("-") and "CUDA" in flag and not flag.startswith("-I"): + # check/split flag into flag and value + parts = flag.split("=", 1) + if len(parts) == 2: + flag_part, value_part = parts + # replace fist instance of "CUDA" with "HIP" only in the flag and not flag value + modified_flag_part = flag_part.replace("CUDA", "HIP", 1) + modified_flag = f"{modified_flag_part}={value_part}" + else: + # replace fist instance of "CUDA" with "HIP" in flag + modified_flag = flag.replace("CUDA", "HIP", 1) + modified_flags.append(modified_flag) + logger.info('Modified flag: %s -> %s', flag, modified_flag) + else: + modified_flags.append(flag) + extension.extra_compile_args['nvcc'] = modified_flags + + def _define_torch_extension_name(self, extension) -> None: + # pybind11 doesn't support dots in the names + # so in order to support extensions in the packages + # like torch._C, we take the last part of the string + # as the library name + names = extension.name.split('.') + name = names[-1] + define = f'-DTORCH_EXTENSION_NAME={name}' + self._add_compile_flag(extension, define) + + +def CppExtension(name, sources, *args, **kwargs): + """ + Create a :class:`setuptools.Extension` for C++. + + Convenience method that creates a :class:`setuptools.Extension` with the + bare minimum (but often sufficient) arguments to build a C++ extension. + + All arguments are forwarded to the :class:`setuptools.Extension` + constructor. Full list arguments can be found at + https://setuptools.pypa.io/en/latest/userguide/ext_modules.html#extension-api-reference + + .. warning:: + The PyTorch python API (as provided in libtorch_python) cannot be built + with the flag ``py_limited_api=True``. When this flag is passed, it is + the user's responsibility in their library to not use APIs from + libtorch_python (in particular pytorch/python bindings) and to only use + APIs from libtorch (aten objects, operators and the dispatcher). For + example, to give access to custom ops from python, the library should + register the ops through the dispatcher. + + Contrary to CPython setuptools, who does not define -DPy_LIMITED_API + as a compile flag when py_limited_api is specified as an option for + the "bdist_wheel" command in ``setup``, PyTorch does! We will specify + -DPy_LIMITED_API=min_supported_cpython to best enforce consistency, + safety, and sanity in order to encourage best practices. To target a + different version, set min_supported_cpython to the hexcode of the + CPython version of choice. + + Example: + >>> # xdoctest: +SKIP + >>> # xdoctest: +REQUIRES(env:TORCH_DOCTEST_CPP_EXT) + >>> from setuptools import setup + >>> from torch.utils.cpp_extension import BuildExtension, CppExtension + >>> setup( + ... name='extension', + ... ext_modules=[ + ... CppExtension( + ... name='extension', + ... sources=['extension.cpp'], + ... extra_compile_args=['-g'], + ... extra_link_args=['-Wl,--no-as-needed', '-lm']) + ... ], + ... cmdclass={ + ... 'build_ext': BuildExtension + ... }) + """ + include_dirs = kwargs.get('include_dirs', []) + include_dirs += include_paths() + kwargs['include_dirs'] = include_dirs + + library_dirs = kwargs.get('library_dirs', []) + library_dirs += library_paths() + kwargs['library_dirs'] = library_dirs + + libraries = kwargs.get('libraries', []) + libraries.append('c10') + libraries.append('torch') + libraries.append('torch_cpu') + if not kwargs.get('py_limited_api', False): + # torch_python uses more than the python limited api + libraries.append('torch_python') + if IS_WINDOWS: + libraries.append("sleef") + + kwargs['libraries'] = libraries + + kwargs['language'] = 'c++' + return setuptools.Extension(name, sources, *args, **kwargs) + + +def CUDAExtension(name, sources, *args, **kwargs): + """ + Create a :class:`setuptools.Extension` for CUDA/C++. + + Convenience method that creates a :class:`setuptools.Extension` with the + bare minimum (but often sufficient) arguments to build a CUDA/C++ + extension. This includes the CUDA include path, library path and runtime + library. + + All arguments are forwarded to the :class:`setuptools.Extension` + constructor. Full list arguments can be found at + https://setuptools.pypa.io/en/latest/userguide/ext_modules.html#extension-api-reference + + .. warning:: + The PyTorch python API (as provided in libtorch_python) cannot be built + with the flag ``py_limited_api=True``. When this flag is passed, it is + the user's responsibility in their library to not use APIs from + libtorch_python (in particular pytorch/python bindings) and to only use + APIs from libtorch (aten objects, operators and the dispatcher). For + example, to give access to custom ops from python, the library should + register the ops through the dispatcher. + + Contrary to CPython setuptools, who does not define -DPy_LIMITED_API + as a compile flag when py_limited_api is specified as an option for + the "bdist_wheel" command in ``setup``, PyTorch does! We will specify + -DPy_LIMITED_API=min_supported_cpython to best enforce consistency, + safety, and sanity in order to encourage best practices. To target a + different version, set min_supported_cpython to the hexcode of the + CPython version of choice. + + Example: + >>> # xdoctest: +SKIP + >>> # xdoctest: +REQUIRES(env:TORCH_DOCTEST_CPP_EXT) + >>> from setuptools import setup + >>> from torch.utils.cpp_extension import BuildExtension, CUDAExtension + >>> setup( + ... name='cuda_extension', + ... ext_modules=[ + ... CUDAExtension( + ... name='cuda_extension', + ... sources=['extension.cpp', 'extension_kernel.cu'], + ... extra_compile_args={'cxx': ['-g'], + ... 'nvcc': ['-O2']}, + ... extra_link_args=['-Wl,--no-as-needed', '-lcuda']) + ... ], + ... cmdclass={ + ... 'build_ext': BuildExtension + ... }) + + Compute capabilities: + + By default the extension will be compiled to run on all archs of the cards visible during the + building process of the extension, plus PTX. If down the road a new card is installed the + extension may need to be recompiled. If a visible card has a compute capability (CC) that's + newer than the newest version for which your nvcc can build fully-compiled binaries, PyTorch + will make nvcc fall back to building kernels with the newest version of PTX your nvcc does + support (see below for details on PTX). + + You can override the default behavior using `TORCH_CUDA_ARCH_LIST` to explicitly specify which + CCs you want the extension to support: + + ``TORCH_CUDA_ARCH_LIST="6.1 8.6" python build_my_extension.py`` + ``TORCH_CUDA_ARCH_LIST="5.2 6.0 6.1 7.0 7.5 8.0 8.6+PTX" python build_my_extension.py`` + + The +PTX option causes extension kernel binaries to include PTX instructions for the specified + CC. PTX is an intermediate representation that allows kernels to runtime-compile for any CC >= + the specified CC (for example, 8.6+PTX generates PTX that can runtime-compile for any GPU with + CC >= 8.6). This improves your binary's forward compatibility. However, relying on older PTX to + provide forward compat by runtime-compiling for newer CCs can modestly reduce performance on + those newer CCs. If you know exact CC(s) of the GPUs you want to target, you're always better + off specifying them individually. For example, if you want your extension to run on 8.0 and 8.6, + "8.0+PTX" would work functionally because it includes PTX that can runtime-compile for 8.6, but + "8.0 8.6" would be better. + + Note that while it's possible to include all supported archs, the more archs get included the + slower the building process will be, as it will build a separate kernel image for each arch. + + Note that CUDA-11.5 nvcc will hit internal compiler error while parsing torch/extension.h on Windows. + To workaround the issue, move python binding logic to pure C++ file. + + Example use: + #include + at::Tensor SigmoidAlphaBlendForwardCuda(....) + + Instead of: + #include + torch::Tensor SigmoidAlphaBlendForwardCuda(...) + + Currently open issue for nvcc bug: https://github.com/pytorch/pytorch/issues/69460 + Complete workaround code example: https://github.com/facebookresearch/pytorch3d/commit/cb170ac024a949f1f9614ffe6af1c38d972f7d48 + + Relocatable device code linking: + + If you want to reference device symbols across compilation units (across object files), + the object files need to be built with `relocatable device code` (-rdc=true or -dc). + An exception to this rule is "dynamic parallelism" (nested kernel launches) which is not used a lot anymore. + `Relocatable device code` is less optimized so it needs to be used only on object files that need it. + Using `-dlto` (Device Link Time Optimization) at the device code compilation step and `dlink` step + helps reduce the protentional perf degradation of `-rdc`. + Note that it needs to be used at both steps to be useful. + + If you have `rdc` objects you need to have an extra `-dlink` (device linking) step before the CPU symbol linking step. + There is also a case where `-dlink` is used without `-rdc`: + when an extension is linked against a static lib containing rdc-compiled objects + like the [NVSHMEM library](https://developer.nvidia.com/nvshmem). + + Note: Ninja is required to build a CUDA Extension with RDC linking. + + Example: + >>> # xdoctest: +SKIP + >>> # xdoctest: +REQUIRES(env:TORCH_DOCTEST_CPP_EXT) + >>> CUDAExtension( + ... name='cuda_extension', + ... sources=['extension.cpp', 'extension_kernel.cu'], + ... dlink=True, + ... dlink_libraries=["dlink_lib"], + ... extra_compile_args={'cxx': ['-g'], + ... 'nvcc': ['-O2', '-rdc=true']}) + """ + library_dirs = kwargs.get('library_dirs', []) + library_dirs += library_paths(device_type="cuda") + kwargs['library_dirs'] = library_dirs + + libraries = kwargs.get('libraries', []) + libraries.append('c10') + libraries.append('torch') + libraries.append('torch_cpu') + if not kwargs.get('py_limited_api', False): + # torch_python uses more than the python limited api + libraries.append('torch_python') + if IS_HIP_EXTENSION: + libraries.append('amdhip64') + libraries.append('c10_hip') + libraries.append('torch_hip') + else: + libraries.append('cudart') + libraries.append('c10_cuda') + libraries.append('torch_cuda') + kwargs['libraries'] = libraries + + include_dirs = kwargs.get('include_dirs', []) + + if IS_HIP_EXTENSION: + from .hipify import hipify_python + build_dir = os.getcwd() + hipify_result = hipify_python.hipify( + project_directory=build_dir, + output_directory=build_dir, + header_include_dirs=include_dirs, + includes=[os.path.join(build_dir, '*')], # limit scope to build_dir only + extra_files=[os.path.abspath(s) for s in sources], + show_detailed=True, + is_pytorch_extension=True, + hipify_extra_files_only=True, # don't hipify everything in includes path + ) + + hipified_sources = set() + for source in sources: + s_abs = os.path.abspath(source) + hipified_s_abs = (hipify_result[s_abs].hipified_path if (s_abs in hipify_result and + hipify_result[s_abs].hipified_path is not None) else s_abs) + # setup() arguments must *always* be /-separated paths relative to the setup.py directory, + # *never* absolute paths + hipified_sources.add(os.path.relpath(hipified_s_abs, build_dir)) + + sources = list(hipified_sources) + + include_dirs += include_paths(device_type="cuda") + kwargs['include_dirs'] = include_dirs + + kwargs['language'] = 'c++' + + dlink_libraries = kwargs.get('dlink_libraries', []) + dlink = kwargs.get('dlink', False) or dlink_libraries + if dlink: + extra_compile_args = kwargs.get('extra_compile_args', {}) + + extra_compile_args_dlink = extra_compile_args.get('nvcc_dlink', []) + extra_compile_args_dlink += ['-dlink'] + extra_compile_args_dlink += [f'-L{x}' for x in library_dirs] + extra_compile_args_dlink += [f'-l{x}' for x in dlink_libraries] + + if (torch.version.cuda is not None) and TorchVersion(torch.version.cuda) >= '11.2': + extra_compile_args_dlink += ['-dlto'] # Device Link Time Optimization started from cuda 11.2 + + extra_compile_args['nvcc_dlink'] = extra_compile_args_dlink + + kwargs['extra_compile_args'] = extra_compile_args + + return setuptools.Extension(name, sources, *args, **kwargs) + + +def SyclExtension(name, sources, *args, **kwargs): + r""" + Creates a :class:`setuptools.Extension` for SYCL/C++. + + Convenience method that creates a :class:`setuptools.Extension` with the + bare minimum (but often sufficient) arguments to build a SYCL/C++ + extension. + + All arguments are forwarded to the :class:`setuptools.Extension` + constructor. + + .. warning:: + The PyTorch python API (as provided in libtorch_python) cannot be built + with the flag ``py_limited_api=True``. When this flag is passed, it is + the user's responsibility in their library to not use APIs from + libtorch_python (in particular pytorch/python bindings) and to only use + APIs from libtorch (aten objects, operators and the dispatcher). For + example, to give access to custom ops from python, the library should + register the ops through the dispatcher. + + Contrary to CPython setuptools, who does not define -DPy_LIMITED_API + as a compile flag when py_limited_api is specified as an option for + the "bdist_wheel" command in ``setup``, PyTorch does! We will specify + -DPy_LIMITED_API=min_supported_cpython to best enforce consistency, + safety, and sanity in order to encourage best practices. To target a + different version, set min_supported_cpython to the hexcode of the + CPython version of choice. + + Example: + >>> # xdoctest: +SKIP + >>> # xdoctest: +REQUIRES(env:TORCH_DOCTEST_CPP_EXT) + >>> from torch.utils.cpp_extension import BuildExtension, SyclExtension + >>> setup( + ... name='xpu_extension', + ... ext_modules=[ + ... SyclExtension( + ... name='xpu_extension', + ... sources=['extension.cpp', 'extension_kernel.cpp'], + ... extra_compile_args={'cxx': ['-g', '-std=c++20', '-fPIC']}) + ... ], + ... cmdclass={ + ... 'build_ext': BuildExtension + ... }) + + By default the extension will be compiled to run on all archs of the cards visible during the + building process of the extension. If down the road a new card is installed the + extension may need to be recompiled. You can override the default behavior using + `TORCH_XPU_ARCH_LIST` to explicitly specify which device architectures you want the extension + to support: + + ``TORCH_XPU_ARCH_LIST="pvc,xe-lpg" python build_my_extension.py`` + + Note that while it's possible to include all supported archs, the more archs get included the + slower the building process will be, as it will build a separate kernel image for each arch. + + Note: Ninja is required to build SyclExtension. + """ + library_dirs = kwargs.get("library_dirs", []) + library_dirs += library_paths() + kwargs["library_dirs"] = library_dirs + + libraries = kwargs.get("libraries", []) + libraries.append("c10") + libraries.append("c10_xpu") + libraries.append("torch") + libraries.append("torch_cpu") + libraries.append("sycl") + if not kwargs.get('py_limited_api', False): + # torch_python uses more than the python limited api + libraries.append("torch_python") + libraries.append("torch_xpu") + kwargs["libraries"] = libraries + + include_dirs = kwargs.get("include_dirs", []) + include_dirs += include_paths(device_type="xpu") + kwargs["include_dirs"] = include_dirs + + kwargs["language"] = "c++" + + return setuptools.Extension(name, sources, *args, **kwargs) + +def include_paths(device_type: str = "cpu", torch_include_dirs=True) -> list[str]: + """ + Get the include paths required to build a C++ or CUDA or SYCL extension. + + Args: + device_type: Defaults to "cpu". + Returns: + A list of include path strings. + """ + paths = [] + lib_include = os.path.join(_TORCH_PATH, 'include') + if torch_include_dirs: + paths.extend([ + lib_include, + # Remove this once torch/torch.h is officially no longer supported for C++ extensions. + os.path.join(lib_include, 'torch', 'csrc', 'api', 'include'), + ]) + if device_type == "cuda" and IS_HIP_EXTENSION: + paths.append(os.path.join(lib_include, 'THH')) + paths.append(_join_rocm_home('include')) + elif device_type == "cuda": + cuda_home_include = _join_cuda_home('include') + # if we have the Debian/Ubuntu packages for cuda, we get /usr as cuda home. + # but gcc doesn't like having /usr/include passed explicitly + if cuda_home_include != '/usr/include': + paths.append(cuda_home_include) + + # Support CUDA_INC_PATH env variable supported by CMake files + if (cuda_inc_path := os.environ.get("CUDA_INC_PATH", None)) and \ + cuda_inc_path != '/usr/include': + + paths.append(cuda_inc_path) + if CUDNN_HOME is not None: + paths.append(os.path.join(CUDNN_HOME, 'include')) + elif device_type == "xpu": + paths.append(_join_sycl_home('include')) + paths.append(_join_sycl_home('include', 'sycl')) + return paths + + +def library_paths(device_type: str = "cpu", torch_include_dirs: bool = True, cross_target_platform: str | None = None) -> list[str]: + """ + Get the library paths required to build a C++ or CUDA extension. + + Args: + device_type: Defaults to "cpu". + + Returns: + A list of library path strings. + """ + + paths = [] + + if torch_include_dirs: + # We need to link against libtorch.so + paths.extend([TORCH_LIB_PATH]) + + if device_type == "cuda" and IS_HIP_EXTENSION: + lib_dir = 'lib' + paths.append(_join_rocm_home(lib_dir)) + if HIP_HOME is not None: + paths.append(os.path.join(HIP_HOME, 'lib')) + elif device_type == "cuda": + if cross_target_platform == "windows": + lib_dir = os.path.join('lib', 'x64') + if WINDOWS_CUDA_HOME is None: + raise RuntimeError("Need to set WINDOWS_CUDA_HOME for windows cross-compilation") + paths.append(os.path.join(WINDOWS_CUDA_HOME, lib_dir)) + else: + if IS_WINDOWS: + lib_dir = os.path.join('lib', 'x64') + else: + lib_dir = 'lib64' + if (not os.path.exists(_join_cuda_home(lib_dir)) and + os.path.exists(_join_cuda_home('lib'))): + # 64-bit CUDA may be installed in 'lib' (see e.g. gh-16955) + # Note that it's also possible both don't exist (see + # _find_cuda_home) - in that case we stay with 'lib64'. + lib_dir = 'lib' + + paths.append(_join_cuda_home(lib_dir)) + if CUDNN_HOME is not None: + paths.append(os.path.join(CUDNN_HOME, lib_dir)) + elif device_type == "xpu": + if IS_WINDOWS: + lib_dir = os.path.join('lib', 'x64') + else: + lib_dir = 'lib64' + if (not os.path.exists(_join_sycl_home(lib_dir)) and + os.path.exists(_join_sycl_home('lib'))): + lib_dir = 'lib' + + paths.append(_join_sycl_home(lib_dir)) + + return paths + + +def load(name, + sources: str | list[str], + extra_cflags=None, + extra_cuda_cflags=None, + extra_sycl_cflags=None, + extra_ldflags=None, + extra_include_paths=None, + build_directory=None, + verbose=False, + with_cuda: bool | None = None, + with_sycl: bool | None = None, + is_python_module=True, + is_standalone=False, + keep_intermediates=True): + """ + Load a PyTorch C++ extension just-in-time (JIT). + + To load an extension, a Ninja build file is emitted, which is used to + compile the given sources into a dynamic library. This library is + subsequently loaded into the current Python process as a module and + returned from this function, ready for use. + + By default, the directory to which the build file is emitted and the + resulting library compiled to is ``/torch_extensions/``, where + ```` is the temporary folder on the current platform and ```` + the name of the extension. This location can be overridden in two ways. + First, if the ``TORCH_EXTENSIONS_DIR`` environment variable is set, it + replaces ``/torch_extensions`` and all extensions will be compiled + into subfolders of this directory. Second, if the ``build_directory`` + argument to this function is supplied, it overrides the entire path, i.e. + the library will be compiled into that folder directly. + + To compile the sources, the default system compiler (``c++``) is used, + which can be overridden by setting the ``CXX`` environment variable. To pass + additional arguments to the compilation process, ``extra_cflags`` or + ``extra_ldflags`` can be provided. For example, to compile your extension + with optimizations, pass ``extra_cflags=['-O3']``. You can also use + ``extra_cflags`` to pass further include directories. + + CUDA support with mixed compilation is provided. Simply pass CUDA source + files (``.cu`` or ``.cuh``) along with other sources. Such files will be + detected and compiled with nvcc rather than the C++ compiler. This includes + passing the CUDA lib64 directory as a library directory, and linking + ``cudart``. You can pass additional flags to nvcc via + ``extra_cuda_cflags``, just like with ``extra_cflags`` for C++. Various + heuristics for finding the CUDA install directory are used, which usually + work fine. If not, setting the ``CUDA_HOME`` environment variable is the + safest option. + + SYCL support with mixed compilation is provided. Simply pass SYCL source + files (``.sycl``) along with other sources. Such files will be detected + and compiled with SYCL compiler (such as Intel DPC++ Compiler) rather + than the C++ compiler. You can pass additional flags to SYCL compiler + via ``extra_sycl_cflags``, just like with ``extra_cflags`` for C++. + SYCL compiler is expected to be found via system PATH environment + variable. + + Args: + name: The name of the extension to build. This MUST be the same as the + name of the pybind11 module! + sources: A list of relative or absolute paths to C++ source files. + extra_cflags: optional list of compiler flags to forward to the build. + extra_cuda_cflags: optional list of compiler flags to forward to nvcc + when building CUDA sources. + extra_sycl_cflags: optional list of compiler flags to forward to SYCL + compiler when building SYCL sources. + extra_ldflags: optional list of linker flags to forward to the build. + extra_include_paths: optional list of include directories to forward + to the build. + build_directory: optional path to use as build workspace. + verbose: If ``True``, turns on verbose logging of load steps. + with_cuda: Determines whether CUDA headers and libraries are added to + the build. If set to ``None`` (default), this value is + automatically determined based on the existence of ``.cu`` or + ``.cuh`` in ``sources``. Set it to `True`` to force CUDA headers + and libraries to be included. + with_sycl: Determines whether SYCL headers and libraries are added to + the build. If set to ``None`` (default), this value is + automatically determined based on the existence of ``.sycl`` in + ``sources``. Set it to `True`` to force SYCL headers and + libraries to be included. + is_python_module: If ``True`` (default), imports the produced shared + library as a Python module. If ``False``, behavior depends on + ``is_standalone``. + is_standalone: If ``False`` (default) loads the constructed extension + into the process as a plain dynamic library. If ``True``, build a + standalone executable. + + Returns: + If ``is_python_module`` is ``True``: + Returns the loaded PyTorch extension as a Python module. + + If ``is_python_module`` is ``False`` and ``is_standalone`` is ``False``: + Returns nothing. (The shared library is loaded into the process as + a side effect.) + + If ``is_standalone`` is ``True``. + Return the path to the executable. (On Windows, TORCH_LIB_PATH is + added to the PATH environment variable as a side effect.) + + Example: + >>> # xdoctest: +SKIP + >>> from torch.utils.cpp_extension import load + >>> module = load( + ... name='extension', + ... sources=['extension.cpp', 'extension_kernel.cu'], + ... extra_cflags=['-O2'], + ... verbose=True) + """ + return _jit_compile( + name, + [sources] if isinstance(sources, str) else sources, + extra_cflags, + extra_cuda_cflags, + extra_sycl_cflags, + extra_ldflags, + extra_include_paths, + build_directory or _get_build_directory(name, verbose), + verbose, + with_cuda, + with_sycl, + is_python_module, + is_standalone, + keep_intermediates=keep_intermediates) + +@deprecated("PyBind11 ABI handling is internal to PyBind11; this will be removed after PyTorch 2.9.0") +def _get_pybind11_abi_build_flags() -> list[str]: + return [] + +def check_compiler_is_gcc(compiler) -> bool: + if not IS_LINUX: + return False + + env = os.environ.copy() + env['LC_ALL'] = 'C' # Don't localize output + try: + version_string = subprocess.check_output([compiler, '-v'], stderr=subprocess.STDOUT, env=env).decode(*SUBPROCESS_DECODE_ARGS) + except Exception: + try: + version_string = subprocess.check_output([compiler, '--version'], stderr=subprocess.STDOUT, env=env).decode(*SUBPROCESS_DECODE_ARGS) + except Exception: + return False + # Check for GCC by verifying both COLLECT_GCC and gcc version string are present + # This works for c++, g++, gcc, and versioned variants like g++-13 + pattern = re.compile("^COLLECT_GCC=(.*)$", re.MULTILINE) + has_collect_gcc = pattern.search(version_string) is not None + if has_collect_gcc and 'gcc version' in version_string: + return True + return False + +def _check_and_build_extension_h_precompiler_headers( + extra_cflags, + extra_include_paths, + is_standalone=False) -> None: + r''' + Precompiled Headers(PCH) can pre-build the same headers and reduce build time for pytorch load_inline modules. + GCC official manual: https://gcc.gnu.org/onlinedocs/gcc-4.0.4/gcc/Precompiled-Headers.html + PCH only works when built pch file(header.h.gch) and build target have the same build parameters. So, We need + add a signature file to record PCH file parameters. If the build parameters(signature) changed, it should rebuild + PCH file. + + Note: + 1. Windows and MacOS have different PCH mechanism. We only support Linux currently. + 2. It only works on GCC/G++. + ''' + if not IS_LINUX: + return + + compiler = get_cxx_compiler() + + b_is_gcc = check_compiler_is_gcc(compiler) + if b_is_gcc is False: + return + + head_file = os.path.join(_TORCH_PATH, 'include', 'torch', 'extension.h') + head_file_pch = os.path.join(_TORCH_PATH, 'include', 'torch', 'extension.h.gch') + head_file_signature = os.path.join(_TORCH_PATH, 'include', 'torch', 'extension.h.sign') + + def listToString(s): + # initialize an empty string + string = "" + if s is None: + return string + + # traverse in the string + for element in s: + string += (element + ' ') + # return string + return string + + def format_precompiler_header_cmd(compiler, head_file, head_file_pch, common_cflags, torch_include_dirs, extra_cflags, extra_include_paths): + return re.sub( + r"[ \n]+", + " ", + f""" + {compiler} -x c++-header {head_file} -o {head_file_pch} {torch_include_dirs} {extra_include_paths} {extra_cflags} {common_cflags} + """, + ).strip() + + def command_to_signature(cmd): + signature = cmd.replace(' ', '_') + return signature + + def check_pch_signature_in_file(file_path, signature): + b_exist = os.path.isfile(file_path) + if b_exist is False: + return False + + with open(file_path) as file: + # read all content of a file + content = file.read() + # check if string present in a file + return signature == content + + def _create_if_not_exist(path_dir) -> None: + if not os.path.exists(path_dir): + try: + Path(path_dir).mkdir(parents=True, exist_ok=True) + except OSError as exc: # Guard against race condition + if exc.errno != errno.EEXIST: + raise RuntimeError(f"Fail to create path {path_dir}") from exc + + def write_pch_signature_to_file(file_path, pch_sign) -> None: + _create_if_not_exist(os.path.dirname(file_path)) + with open(file_path, "w") as f: + f.write(pch_sign) + f.close() + + def build_precompile_header(pch_cmd) -> None: + try: + subprocess.check_output(shlex.split(pch_cmd), stderr=subprocess.STDOUT) + except subprocess.CalledProcessError as e: + raise RuntimeError(f"Compile PreCompile Header fail, command: {pch_cmd}") from e + + extra_cflags_str = listToString(extra_cflags) + extra_include_paths_str = " ".join( + [f"-I{include}" for include in extra_include_paths] if extra_include_paths else [] + ) + + lib_include = os.path.join(_TORCH_PATH, 'include') + torch_include_dirs = [ + f"-I {lib_include}", + # Python.h + "-I {}".format(sysconfig.get_path("include")), + # torch/all.h + "-I {}".format(os.path.join(lib_include, 'torch', 'csrc', 'api', 'include')), + ] + + torch_include_dirs_str = listToString(torch_include_dirs) + + common_cflags = [] + if not is_standalone: + common_cflags += ['-DTORCH_API_INCLUDE_EXTENSION_H'] + + common_cflags += ['-std=c++17', '-fPIC'] + common_cflags_str = listToString(common_cflags) + + pch_cmd = format_precompiler_header_cmd(compiler, head_file, head_file_pch, common_cflags_str, torch_include_dirs_str, extra_cflags_str, extra_include_paths_str) + pch_sign = command_to_signature(pch_cmd) + + if os.path.isfile(head_file_pch) is not True: + build_precompile_header(pch_cmd) + write_pch_signature_to_file(head_file_signature, pch_sign) + else: + b_same_sign = check_pch_signature_in_file(head_file_signature, pch_sign) + if b_same_sign is False: + build_precompile_header(pch_cmd) + write_pch_signature_to_file(head_file_signature, pch_sign) + +def remove_extension_h_precompiler_headers() -> None: + def _remove_if_file_exists(path_file) -> None: + if os.path.exists(path_file): + os.remove(path_file) + + head_file_pch = os.path.join(_TORCH_PATH, 'include', 'torch', 'extension.h.gch') + head_file_signature = os.path.join(_TORCH_PATH, 'include', 'torch', 'extension.h.sign') + + _remove_if_file_exists(head_file_pch) + _remove_if_file_exists(head_file_signature) + +def load_inline(name, + cpp_sources, + cuda_sources=None, + sycl_sources=None, + functions=None, + extra_cflags=None, + extra_cuda_cflags=None, + extra_sycl_cflags=None, + extra_ldflags=None, + extra_include_paths=None, + build_directory=None, + verbose=False, + with_cuda=None, + with_sycl=None, + is_python_module=True, + with_pytorch_error_handling=True, + keep_intermediates=True, + use_pch=False, + no_implicit_headers=False): + r''' + Load a PyTorch C++ extension just-in-time (JIT) from string sources. + + This function behaves exactly like :func:`load`, but takes its sources as + strings rather than filenames. These strings are stored to files in the + build directory, after which the behavior of :func:`load_inline` is + identical to :func:`load`. + + See `the + tests `_ + for good examples of using this function. + + Sources may omit two required parts of a typical non-inline C++ extension: + the necessary header includes, as well as the (pybind11) binding code. More + precisely, strings passed to ``cpp_sources`` are first concatenated into a + single ``.cpp`` file. This file is then prepended with ``#include + `` + + Furthermore, if the ``functions`` argument is supplied, bindings will be + automatically generated for each function specified. ``functions`` can + either be a list of function names, or a dictionary mapping from function + names to docstrings. If a list is given, the name of each function is used + as its docstring. + + The sources in ``cuda_sources`` are concatenated into a separate ``.cu`` + file and prepended with ``torch/types.h``, ``cuda.h`` and + ``cuda_runtime.h`` includes. The ``.cpp`` and ``.cu`` files are compiled + separately, but ultimately linked into a single library. Note that no + bindings are generated for functions in ``cuda_sources`` per se. To bind + to a CUDA kernel, you must create a C++ function that calls it, and either + declare or define this C++ function in one of the ``cpp_sources`` (and + include its name in ``functions``). + + The sources in ``sycl_sources`` are concatenated into a separate ``.sycl`` + file and prepended with ``torch/types.h``, ``sycl/sycl.hpp`` includes. + The ``.cpp`` and ``.sycl`` files are compiled separately, but ultimately + linked into a single library. Note that no bindings are generated for + functions in ``sycl_sources`` per se. To bind to a SYCL kernel, you must + create a C++ function that calls it, and either declare or define this + C++ function in one of the ``cpp_sources`` (and include its name + in ``functions``). + + + + See :func:`load` for a description of arguments omitted below. + + Args: + cpp_sources: A string, or list of strings, containing C++ source code. + cuda_sources: A string, or list of strings, containing CUDA source code. + sycl_sources: A string, or list of strings, containing SYCL source code. + functions: A list of function names for which to generate function + bindings. If a dictionary is given, it should map function names to + docstrings (which are otherwise just the function names). + with_cuda: Determines whether CUDA headers and libraries are added to + the build. If set to ``None`` (default), this value is + automatically determined based on whether ``cuda_sources`` is + provided. Set it to ``True`` to force CUDA headers + and libraries to be included. + with_sycl: Determines whether SYCL headers and libraries are added to + the build. If set to ``None`` (default), this value is + automatically determined based on whether ``sycl_sources`` is + provided. Set it to ``True`` to force SYCL headers + and libraries to be included. + with_pytorch_error_handling: Determines whether pytorch error and + warning macros are handled by pytorch instead of pybind. To do + this, each function ``foo`` is called via an intermediary ``_safe_foo`` + function. This redirection might cause issues in obscure cases + of cpp. This flag should be set to ``False`` when this redirect + causes issues. + no_implicit_headers: If ``True``, skips automatically adding headers, most notably + ``#include `` and ``#include `` lines. + Use this option to improve cold start times when you + already include the necessary headers in your source code. Default: ``False``. + + Example: + >>> # xdoctest: +REQUIRES(env:TORCH_DOCTEST_CPP_EXT) + >>> from torch.utils.cpp_extension import load_inline + >>> source = """ + at::Tensor sin_add(at::Tensor x, at::Tensor y) { + return x.sin() + y.sin(); + } + """ + >>> module = load_inline(name='inline_extension', + ... cpp_sources=[source], + ... functions=['sin_add']) + + .. note:: + Since load_inline will just-in-time compile the source code, please ensure + that you have the right toolchains installed in the runtime. For example, + when loading C++, make sure a C++ compiler is available. If you're loading + a CUDA extension, you will need to additionally install the corresponding CUDA + toolkit (nvcc and any other dependencies your code has). Compiling toolchains + are not included when you install torch and must be additionally installed. + + During compiling, by default, the Ninja backend uses #CPUS + 2 workers to build + the extension. This may use up too many resources on some systems. One + can control the number of workers by setting the `MAX_JOBS` environment + variable to a non-negative number. + ''' + build_directory = build_directory or _get_build_directory(name, verbose) + + if isinstance(cpp_sources, str): + cpp_sources = [cpp_sources] + cuda_sources = cuda_sources or [] + if isinstance(cuda_sources, str): + cuda_sources = [cuda_sources] + sycl_sources = sycl_sources or [] + if isinstance(sycl_sources, str): + sycl_sources = [sycl_sources] + + if not no_implicit_headers: + cpp_sources.insert(0, '#include ') + + if use_pch is True: + # Using PreCompile Header('torch/extension.h') to reduce compile time. + _check_and_build_extension_h_precompiler_headers(extra_cflags, extra_include_paths) + else: + remove_extension_h_precompiler_headers() + + # If `functions` is supplied, we create the pybind11 bindings for the user. + # Here, `functions` is (or becomes, after some processing) a map from + # function names to function docstrings. + if functions is not None: + module_def = [] + module_def.append('PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {') + if isinstance(functions, str): + functions = [functions] + if isinstance(functions, list): + # Make the function docstring the same as the function name. + functions = {f: f for f in functions} + elif not isinstance(functions, dict): + raise ValueError(f"Expected 'functions' to be a list or dict, but was {type(functions)}") + for function_name, docstring in functions.items(): + if with_pytorch_error_handling: + module_def.append(f'm.def("{function_name}", torch::wrap_pybind_function({function_name}), "{docstring}");') + else: + module_def.append(f'm.def("{function_name}", {function_name}, "{docstring}");') + module_def.append('}') + cpp_sources += module_def + + cpp_source_path = os.path.join(build_directory, 'main.cpp') + _maybe_write(cpp_source_path, "\n".join(cpp_sources)) + + sources = [cpp_source_path] + + if cuda_sources: + if not no_implicit_headers: + cuda_sources.insert(0, '#include ') + cuda_sources.insert(1, '#include ') + cuda_sources.insert(2, '#include ') + + cuda_source_path = os.path.join(build_directory, 'cuda.cu') + _maybe_write(cuda_source_path, "\n".join(cuda_sources)) + + sources.append(cuda_source_path) + + if sycl_sources: + if not no_implicit_headers: + sycl_sources.insert(0, '#include ') + sycl_sources.insert(1, '#include ') + + sycl_source_path = os.path.join(build_directory, 'sycl.sycl') + _maybe_write(sycl_source_path, "\n".join(sycl_sources)) + + sources.append(sycl_source_path) + + return _jit_compile( + name, + sources, + extra_cflags, + extra_cuda_cflags, + extra_sycl_cflags, + extra_ldflags, + extra_include_paths, + build_directory, + verbose, + with_cuda, + with_sycl, + is_python_module, + is_standalone=False, + keep_intermediates=keep_intermediates) + + +def _jit_compile(name, + sources, + extra_cflags, + extra_cuda_cflags, + extra_sycl_cflags, + extra_ldflags, + extra_include_paths, + build_directory: str, + verbose: bool, + with_cuda: bool | None, + with_sycl: bool | None, + is_python_module, + is_standalone, + keep_intermediates=True) -> types.ModuleType | str: + if is_python_module and is_standalone: + raise ValueError("`is_python_module` and `is_standalone` are mutually exclusive.") + + if with_cuda is None: + with_cuda = any(map(_is_cuda_file, sources)) + with_cudnn = any('cudnn' in f for f in extra_ldflags or []) + if with_sycl is None: + with_sycl = any(map(_is_sycl_file, sources)) + assert not (with_sycl and with_cuda) + old_version = JIT_EXTENSION_VERSIONER.get_version(name) + version = JIT_EXTENSION_VERSIONER.bump_version_if_changed( + name, + sources, + build_arguments=[extra_cflags, extra_cuda_cflags, extra_ldflags, extra_include_paths], + build_directory=build_directory, + with_cuda=with_cuda, + with_sycl=with_sycl, + is_python_module=is_python_module, + is_standalone=is_standalone, + ) + if version > 0: + if version != old_version and verbose: + logger.info('The input conditions for extension module %s have changed.', name) + logger.info('Bumping to version %s and re-building as %s_v%s...', version, name, version) + name = f'{name}_v{version}' + + baton = FileBaton(os.path.join(build_directory, 'lock')) + if baton.try_acquire(): + try: + if version != old_version: + from .hipify import hipify_python + from .hipify.hipify_python import GeneratedFileCleaner + with GeneratedFileCleaner(keep_intermediates=keep_intermediates) as clean_ctx: + if IS_HIP_EXTENSION and (with_cuda or with_cudnn): + hipify_result = hipify_python.hipify( + project_directory=build_directory, + output_directory=build_directory, + header_include_dirs=(extra_include_paths if extra_include_paths is not None else []), + extra_files=[os.path.abspath(s) for s in sources], + ignores=[_join_rocm_home('*'), os.path.join(_TORCH_PATH, '*')], # no need to hipify ROCm or PyTorch headers + show_detailed=verbose, + show_progress=verbose, + is_pytorch_extension=True, + clean_ctx=clean_ctx + ) + + hipified_sources = set() + for source in sources: + s_abs = os.path.abspath(source) + hipified_sources.add(hipify_result[s_abs].hipified_path if s_abs in hipify_result else s_abs) + + sources = list(hipified_sources) + + _write_ninja_file_and_build_library( + name=name, + sources=sources, + extra_cflags=extra_cflags or [], + extra_cuda_cflags=extra_cuda_cflags or [], + extra_sycl_cflags=extra_sycl_cflags or [], + extra_ldflags=extra_ldflags or [], + extra_include_paths=extra_include_paths or [], + build_directory=build_directory, + verbose=verbose, + with_cuda=with_cuda, + with_sycl=with_sycl, + is_standalone=is_standalone) + elif verbose: + logger.debug('No modifications detected for re-loaded extension module %s, skipping build step...', name) + finally: + baton.release() + else: + baton.wait() + + if verbose: + logger.info('Loading extension module %s...', name) + + if is_standalone: + return _get_exec_path(name, build_directory) + + return _import_module_from_library(name, build_directory, is_python_module) + +def _get_hipcc_path(): + if IS_WINDOWS: + # mypy thinks ROCM_VERSION is None but it will never be None here + hipcc_exe = 'hipcc.exe' if ROCM_VERSION >= (6, 4) else 'hipcc.bat' # type: ignore[operator] + return _join_rocm_home('bin', hipcc_exe) + else: + return _join_rocm_home('bin', 'hipcc') + +def _write_ninja_file_and_compile_objects( + sources: list[str], + objects, + cflags, + post_cflags, + cuda_cflags, + cuda_post_cflags, + cuda_dlink_post_cflags, + sycl_cflags, + sycl_post_cflags, + sycl_dlink_post_cflags, + build_directory: str, + verbose: bool, + with_cuda: bool | None, + with_sycl: bool | None) -> None: + verify_ninja_availability() + + compiler = get_cxx_compiler() + + get_compiler_abi_compatibility_and_version(compiler) + if with_cuda is None: + with_cuda = any(map(_is_cuda_file, sources)) + if with_sycl is None: + with_sycl = any(map(_is_sycl_file, sources)) + assert not (with_sycl and with_cuda) + build_file_path = os.path.join(build_directory, 'build.ninja') + if verbose: + logger.debug('Emitting ninja build file %s...', build_file_path) + + # Create build_directory if it does not exist + if not os.path.exists(build_directory): + if verbose: + logger.debug('Creating directory %s...', build_directory) + # This is like mkdir -p, i.e. will also create parent directories. + os.makedirs(build_directory, exist_ok=True) + + _write_ninja_file( + path=build_file_path, + cflags=cflags, + post_cflags=post_cflags, + cuda_cflags=cuda_cflags, + cuda_post_cflags=cuda_post_cflags, + cuda_dlink_post_cflags=cuda_dlink_post_cflags, + sycl_cflags=sycl_cflags, + sycl_post_cflags=sycl_post_cflags, + sycl_dlink_post_cflags=sycl_dlink_post_cflags, + sources=sources, + objects=objects, + ldflags=None, + library_target=None, + with_cuda=with_cuda, + with_sycl=with_sycl) + if verbose: + logger.info('Compiling objects...') + _run_ninja_build( + build_directory, + verbose, + # It would be better if we could tell users the name of the extension + # that failed to build but there isn't a good way to get it here. + error_prefix='Error compiling objects for extension') + + +def _write_ninja_file_and_build_library( + name, + sources: list[str], + extra_cflags, + extra_cuda_cflags, + extra_sycl_cflags, + extra_ldflags, + extra_include_paths, + build_directory: str, + verbose: bool, + with_cuda: bool | None, + with_sycl: bool | None, + is_standalone: bool = False) -> None: + verify_ninja_availability() + + compiler = get_cxx_compiler() + + get_compiler_abi_compatibility_and_version(compiler) + if with_cuda is None: + with_cuda = any(map(_is_cuda_file, sources)) + if with_sycl is None: + with_sycl = any(map(_is_sycl_file, sources)) + assert not (with_sycl and with_cuda) + extra_ldflags = _prepare_ldflags( + extra_ldflags or [], + with_cuda, + with_sycl, + verbose, + is_standalone) + build_file_path = os.path.join(build_directory, 'build.ninja') + if verbose: + logger.debug('Emitting ninja build file %s...', build_file_path) + + # Create build_directory if it does not exist + if not os.path.exists(build_directory): + if verbose: + logger.debug('Creating directory %s...', build_directory) + # This is like mkdir -p, i.e. will also create parent directories. + os.makedirs(build_directory, exist_ok=True) + + # NOTE: Emitting a new ninja build file does not cause re-compilation if + # the sources did not change, so it's ok to re-emit (and it's fast). + _write_ninja_file_to_build_library( + path=build_file_path, + name=name, + sources=sources, + extra_cflags=extra_cflags or [], + extra_cuda_cflags=extra_cuda_cflags or [], + extra_sycl_cflags=extra_sycl_cflags or [], + extra_ldflags=extra_ldflags or [], + extra_include_paths=extra_include_paths or [], + with_cuda=with_cuda, + with_sycl=with_sycl, + is_standalone=is_standalone) + + if verbose: + logger.info('Building extension module %s...', name) + _run_ninja_build( + build_directory, + verbose, + error_prefix=f"Error building extension '{name}'") + + +def is_ninja_available() -> bool: + """Return ``True`` if the `ninja `_ build system is available on the system, ``False`` otherwise.""" + try: + subprocess.check_output(['ninja', '--version']) + except Exception: + return False + else: + return True + + +def verify_ninja_availability() -> None: + """Raise ``RuntimeError`` if `ninja `_ build system is not available on the system, does nothing otherwise.""" + if not is_ninja_available(): + raise RuntimeError("Ninja is required to load C++ extensions (pip install ninja to get it)") + + +def _prepare_ldflags(extra_ldflags, with_cuda, with_sycl, verbose, is_standalone): + if IS_WINDOWS: + python_lib_path = os.path.join(sys.base_exec_prefix, 'libs') + + extra_ldflags.append('c10.lib') + if with_cuda: + extra_ldflags.append('c10_hip.lib' if IS_HIP_EXTENSION else 'c10_cuda.lib') + if with_sycl: + extra_ldflags.append('c10_xpu.lib') + extra_ldflags.append('torch_cpu.lib') + if with_cuda: + extra_ldflags.append('torch_hip.lib' if IS_HIP_EXTENSION else 'torch_cuda.lib') + # /INCLUDE is used to ensure torch_cuda is linked against in a project that relies on it. + # Related issue: https://github.com/pytorch/pytorch/issues/31611 + extra_ldflags.append('-INCLUDE:?warp_size@cuda@at@@YAHXZ') + if with_sycl: + extra_ldflags.append('torch_xpu.lib') + extra_ldflags.append('torch.lib') + extra_ldflags.append(f'/LIBPATH:{TORCH_LIB_PATH}') + if not is_standalone: + extra_ldflags.append('torch_python.lib') + extra_ldflags.append(f'/LIBPATH:{python_lib_path}') + + else: + extra_ldflags.append(f'-L{TORCH_LIB_PATH}') + extra_ldflags.append('-lc10') + if with_cuda: + extra_ldflags.append('-lc10_hip' if IS_HIP_EXTENSION else '-lc10_cuda') + if with_sycl: + extra_ldflags.append('-lc10_xpu') + extra_ldflags.append('-ltorch_cpu') + if with_cuda: + extra_ldflags.append('-ltorch_hip' if IS_HIP_EXTENSION else '-ltorch_cuda') + if with_sycl: + extra_ldflags.append('-ltorch_xpu') + extra_ldflags.append('-ltorch') + if not is_standalone: + extra_ldflags.append('-ltorch_python') + + if is_standalone: + extra_ldflags.append(f"-Wl,-rpath,{TORCH_LIB_PATH}") + + if with_cuda: + if verbose: + logger.info('Detected CUDA files, patching ldflags') + if IS_WINDOWS and not IS_HIP_EXTENSION: + extra_ldflags.append(f'/LIBPATH:{_join_cuda_home("lib", "x64")}') + extra_ldflags.append('cudart.lib') + if CUDNN_HOME is not None: + extra_ldflags.append(f'/LIBPATH:{os.path.join(CUDNN_HOME, "lib", "x64")}') + elif not IS_HIP_EXTENSION: + extra_lib_dir = "lib64" + if (not os.path.exists(_join_cuda_home(extra_lib_dir)) and + os.path.exists(_join_cuda_home("lib"))): + # 64-bit CUDA may be installed in "lib" + # Note that it's also possible both don't exist (see _find_cuda_home) - in that case we stay with "lib64" + extra_lib_dir = "lib" + extra_ldflags.append(f'-L{_join_cuda_home(extra_lib_dir)}') + extra_ldflags.append('-lcudart') + if CUDNN_HOME is not None: + extra_ldflags.append(f'-L{os.path.join(CUDNN_HOME, "lib64")}') + elif IS_HIP_EXTENSION: + if IS_WINDOWS: + extra_ldflags.append(f'/LIBPATH:{_join_rocm_home("lib")}') + extra_ldflags.append('amdhip64.lib') + else: + extra_ldflags.append(f'-L{_join_rocm_home("lib")}') + extra_ldflags.append('-lamdhip64') + if with_sycl: + if IS_WINDOWS: + extra_ldflags.append(f'/LIBPATH:{_join_sycl_home("lib")}') + extra_ldflags.append('sycl.lib') + else: + extra_ldflags.append(f'-L{_join_sycl_home("lib")}') + extra_ldflags.append('-lsycl') + return extra_ldflags + + +def _get_cuda_arch_flags(cflags: list[str] | None = None) -> list[str]: + """ + Determine CUDA arch flags to use. + + For an arch, say "6.1", the added compile flag will be + ``-gencode=arch=compute_61,code=sm_61``. + For an added "+PTX", an additional + ``-gencode=arch=compute_xx,code=compute_xx`` is added. + + See select_compute_arch.cmake for corresponding named and supported arches + when building with CMake. + """ + # If cflags is given, there may already be user-provided arch flags in it + # (from `extra_compile_args`) + if cflags is not None: + for flag in cflags: + if 'TORCH_EXTENSION_NAME' in flag: + continue + if 'arch' in flag: + return [] + + # Note: keep combined names ("arch1+arch2") above single names, otherwise + # string replacement may not do the right thing + named_arches = collections.OrderedDict([ + ('Kepler+Tesla', '3.7'), + ('Kepler', '3.5+PTX'), + ('Maxwell+Tegra', '5.3'), + ('Maxwell', '5.0;5.2+PTX'), + ('Pascal', '6.0;6.1+PTX'), + ('Volta+Tegra', '7.2'), + ('Volta', '7.0+PTX'), + ('Turing', '7.5+PTX'), + ('Ampere+Tegra', '8.7'), + ('Ampere', '8.0;8.6+PTX'), + ('Ada', '8.9+PTX'), + ('Hopper', '9.0+PTX'), + ('Blackwell+Tegra', '11.0'), + ('Blackwell', '10.0;10.3;12.0;12.1+PTX'), + ]) + + supported_arches = ['3.5', '3.7', '5.0', '5.2', '5.3', '6.0', '6.1', '6.2', + '7.0', '7.2', '7.5', '8.0', '8.6', '8.7', '8.9', '9.0', '9.0a', + '10.0', '10.0a', '11.0', '11.0a', '10.3', '10.3a', '12.0', + '12.0a', '12.1', '12.1a'] + valid_arch_strings = supported_arches + [s + "+PTX" for s in supported_arches] + + # The default is sm_30 for CUDA 9.x and 10.x + # First check for an env var (same as used by the main setup.py) + # Can be one or more architectures, e.g. "6.1" or "3.5;5.2;6.0;6.1;7.0+PTX" + # See cmake/Modules_CUDA_fix/upstream/FindCUDA/select_compute_arch.cmake + _arch_list = os.environ.get('TORCH_CUDA_ARCH_LIST', None) + + # If not given or set as native, determine what's best for the GPU / CUDA version that can be found + if not _arch_list or _arch_list == "native": + arch_list = [] + # the assumption is that the extension should run on any of the currently visible cards, + # which could be of different types - therefore all archs for visible cards should be included + for i in range(torch.cuda.device_count()): + capability = torch.cuda.get_device_capability(i) + supported_sm = [int("".join(re.findall(r"\d+", arch.split('_')[1]))) + for arch in torch.cuda.get_arch_list() if 'sm_' in arch] + max_supported_sm = max((sm // 10, sm % 10) for sm in supported_sm) + # Capability of the device may be higher than what's supported by the user's + # NVCC, causing compilation error. User's NVCC is expected to match the one + # used to build pytorch, so we use the maximum supported capability of pytorch + # to clamp the capability. + capability = min(max_supported_sm, capability) + arch = f'{capability[0]}.{capability[1]}' + if arch not in arch_list: + arch_list.append(arch) + arch_list = sorted(arch_list) + arch_list[-1] += '+PTX' + + if not _arch_list: + # Only log on rank 0 in distributed settings to avoid spam + if not torch.distributed.is_available() or not torch.distributed.is_initialized() or torch.distributed.get_rank() == 0: + arch_list_str = ';'.join(arch_list) + logger.debug( + "TORCH_CUDA_ARCH_LIST is not set, using TORCH_CUDA_ARCH_LIST='%s' " + "for visible GPU architectures. Set os.environ['TORCH_CUDA_ARCH_LIST'] to override.", + arch_list_str) + else: + # Deal with lists that are ' ' separated (only deal with ';' after) + _arch_list = _arch_list.replace(' ', ';') + # Expand named arches + for named_arch, archival in named_arches.items(): + _arch_list = _arch_list.replace(named_arch, archival) + + arch_list = _arch_list.split(';') + + flags = [] + for arch in arch_list: + if arch not in valid_arch_strings: + raise ValueError(f"Unknown CUDA arch ({arch}) or GPU not supported") + else: + # Handle both single and double-digit architecture versions + version = arch.split('+')[0] # Remove "+PTX" if present + major, minor = version.split('.') + num = f"{major}{minor}" + flags.append(f'-gencode=arch=compute_{num},code=sm_{num}') + if arch.endswith('+PTX'): + flags.append(f'-gencode=arch=compute_{num},code=compute_{num}') + + return sorted(set(flags)) + + +def _get_rocm_arch_flags(cflags: list[str] | None = None) -> list[str]: + # If cflags is given, there may already be user-provided arch flags in it + # (from `extra_compile_args`). If user also specified -fgpu-rdc or -fno-gpu-rdc, we + # assume they know what they're doing. Otherwise, we force -fno-gpu-rdc default. + has_gpu_rdc_flag = False + if cflags is not None: + has_custom_flags = False + for flag in cflags: + if 'amdgpu-target' in flag or 'offload-arch' in flag: + has_custom_flags = True + elif 'gpu-rdc' in flag: + has_gpu_rdc_flag = True + if has_custom_flags: + return [] if has_gpu_rdc_flag else ['-fno-gpu-rdc'] + # Use same defaults as used for building PyTorch + # Allow env var to override, just like during initial cmake build. + _archs = os.environ.get('PYTORCH_ROCM_ARCH', None) + if not _archs: + archFlags = torch._C._cuda_getArchFlags() + if archFlags: + archs = archFlags.split() + else: + archs = [] + else: + archs = _archs.replace(' ', ';').split(';') + flags = [f'--offload-arch={arch}' for arch in archs] + flags += [] if has_gpu_rdc_flag else ['-fno-gpu-rdc'] + return flags + +def _get_build_directory(name: str, verbose: bool) -> str: + """ + Get the build directory for an extension. + + Args: + name: The name of the extension + verbose: Whether to print verbose information + + Returns: + The path to the build directory + """ + root_extensions_directory = os.environ.get('TORCH_EXTENSIONS_DIR') + if root_extensions_directory is None: + root_extensions_directory = get_default_build_root() + cu_str = ('cpu' if torch.version.cuda is None else + f'cu{torch.version.cuda.replace(".", "")}') + python_version = f'py{sys.version_info.major}{sys.version_info.minor}{getattr(sys, "abiflags", "")}' + build_folder = f'{python_version}_{cu_str}' + + root_extensions_directory = os.path.join( + root_extensions_directory, build_folder) + + if verbose: + logger.info('Using %s as PyTorch extensions root...', root_extensions_directory) + + build_directory = os.path.join(root_extensions_directory, name) + if not os.path.exists(build_directory): + if verbose: + logger.debug('Creating extension directory %s...', build_directory) + # This is like mkdir -p, i.e. will also create parent directories. + os.makedirs(build_directory, exist_ok=True) + + return build_directory + + +def _get_num_workers(verbose: bool) -> int | None: + max_jobs = os.environ.get('MAX_JOBS') + if max_jobs is not None and max_jobs.isdigit(): + if verbose: + logger.debug('Using envvar MAX_JOBS (%s) as the number of workers...', max_jobs) + return int(max_jobs) + if verbose: + logger.info( + 'Allowing ninja to set a default number of workers... ' + '(overridable by setting the environment variable MAX_JOBS=N)' + ) + return None + + +def _get_vc_env(vc_arch: str) -> dict[str, str]: + try: + from setuptools import distutils # type: ignore[attr-defined] + # pyrefly: ignore [missing-attribute] + return distutils._msvccompiler._get_vc_env(vc_arch) + except AttributeError: + try: + from setuptools._distutils import _msvccompiler + return _msvccompiler._get_vc_env(vc_arch) # type: ignore[attr-defined] + except AttributeError: + from setuptools._distutils.compilers.C import msvc + return msvc._get_vc_env(vc_arch) # type: ignore[attr-defined] + +def _run_ninja_build(build_directory: str, verbose: bool, error_prefix: str) -> None: + command = ['ninja', '-v'] + num_workers = _get_num_workers(verbose) + if num_workers is not None: + command.extend(['-j', str(num_workers)]) + env = os.environ.copy() + # Try to activate the vc env for the users + if IS_WINDOWS and 'VSCMD_ARG_TGT_ARCH' not in env: + from setuptools import distutils # type: ignore[attr-defined] + + plat_name = distutils.util.get_platform() + plat_spec = PLAT_TO_VCVARS[plat_name] + vc_env = {k.upper(): v for k, v in _get_vc_env(plat_spec).items()} + for k, v in env.items(): + uk = k.upper() + if uk not in vc_env: + vc_env[uk] = v + env = vc_env + try: + sys.stdout.flush() + sys.stderr.flush() + # Warning: don't pass stdout=None to subprocess.run to get output. + # subprocess.run assumes that sys.__stdout__ has not been modified and + # attempts to write to it by default. However, when we call _run_ninja_build + # from ahead-of-time cpp extensions, the following happens: + # 1) If the stdout encoding is not utf-8, setuptools detaches __stdout__. + # https://github.com/pypa/setuptools/blob/7e97def47723303fafabe48b22168bbc11bb4821/setuptools/dist.py#L1110 + # (it probably shouldn't do this) + # 2) subprocess.run (on POSIX, with no stdout override) relies on + # __stdout__ not being detached: + # https://github.com/python/cpython/blob/c352e6c7446c894b13643f538db312092b351789/Lib/subprocess.py#L1214 + # To work around this, we pass in the fileno directly and hope that + # it is valid. + stdout_fileno = 1 + subprocess.run( + command, + shell=IS_WINDOWS and IS_HIP_EXTENSION, + stdout=stdout_fileno if verbose else subprocess.PIPE, + stderr=subprocess.STDOUT, + cwd=build_directory, + check=True, + env=env) + except subprocess.CalledProcessError as e: + # Python 2 and 3 compatible way of getting the error object. + _, error, _ = sys.exc_info() + # error.output contains the stdout and stderr of the build attempt. + message = error_prefix + # `error` is a CalledProcessError (which has an `output`) attribute, but + # mypy thinks it's Optional[BaseException] and doesn't narrow + if hasattr(error, 'output') and error.output: # type: ignore[union-attr] + message += f": {error.output.decode(*SUBPROCESS_DECODE_ARGS)}" # type: ignore[union-attr] + raise RuntimeError(message) from e + + +def _get_exec_path(module_name, path): + if IS_WINDOWS and TORCH_LIB_PATH not in os.getenv('PATH', '').split(';'): + torch_lib_in_path = any( + os.path.exists(p) and os.path.samefile(p, TORCH_LIB_PATH) + for p in os.getenv('PATH', '').split(';') + ) + if not torch_lib_in_path: + os.environ['PATH'] = f"{TORCH_LIB_PATH};{os.getenv('PATH', '')}" + return os.path.join(path, f'{module_name}{EXEC_EXT}') + + +def _import_module_from_library(module_name, path, is_python_module): + filepath = os.path.join(path, f"{module_name}{LIB_EXT}") + if is_python_module: + # https://stackoverflow.com/questions/67631/how-to-import-a-module-given-the-full-path + spec = importlib.util.spec_from_file_location(module_name, filepath) + if spec is None: + raise AssertionError(f"Failed to create spec for module {module_name} at {filepath}") + module = importlib.util.module_from_spec(spec) + if not isinstance(spec.loader, importlib.abc.Loader): + raise AssertionError("spec.loader is not a valid importlib Loader") + spec.loader.exec_module(module) + return module + else: + torch.ops.load_library(filepath) + return filepath + + +def _write_ninja_file_to_build_library(path, + name, + sources, + extra_cflags, + extra_cuda_cflags, + extra_sycl_cflags, + extra_ldflags, + extra_include_paths, + with_cuda, + with_sycl, + is_standalone) -> None: + extra_cflags = [flag.strip() for flag in extra_cflags] + extra_cuda_cflags = [flag.strip() for flag in extra_cuda_cflags] + extra_sycl_cflags = [flag.strip() for flag in extra_sycl_cflags] + extra_ldflags = [flag.strip() for flag in extra_ldflags] + extra_include_paths = [flag.strip() for flag in extra_include_paths] + + # Turn into absolute paths so we can emit them into the ninja build + # file wherever it is. + user_includes = [os.path.abspath(file) for file in extra_include_paths] + + # include_paths() gives us the location of torch/extension.h + # TODO generalize with_cuda as specific device type. + if with_cuda: + system_includes = include_paths("cuda") + elif with_sycl: + system_includes = include_paths("xpu") + else: + system_includes = include_paths("cpu") + # sysconfig.get_path('include') gives us the location of Python.h + # Explicitly specify 'posix_prefix' scheme on non-Windows platforms to workaround error on some MacOS + # installations where default `get_path` points to non-existing `/Library/Python/M.m/include` folder + python_include_path = sysconfig.get_path('include', scheme='nt' if IS_WINDOWS else 'posix_prefix') + if python_include_path is not None: + system_includes.append(python_include_path) + + common_cflags = [] + if not is_standalone: + common_cflags.append(f'-DTORCH_EXTENSION_NAME={name}') + common_cflags.append('-DTORCH_API_INCLUDE_EXTENSION_H') + + # Windows does not understand `-isystem` and quotes flags later. + if IS_WINDOWS: + common_cflags += [f'-I{include}' for include in user_includes + system_includes] + else: + common_cflags += [f'-I{shlex.quote(include)}' for include in user_includes] + common_cflags += [f'-isystem {shlex.quote(include)}' for include in system_includes] + + if IS_WINDOWS: + COMMON_HIP_FLAGS.extend(['-fms-runtime-lib=dll']) + cflags = common_cflags + ['/std:c++17'] + extra_cflags + cflags += COMMON_MSVC_FLAGS + (COMMON_HIP_FLAGS if IS_HIP_EXTENSION else []) + cflags = _nt_quote_args(cflags) + else: + cflags = common_cflags + ['-fPIC', '-std=c++17'] + extra_cflags + + if with_cuda and IS_HIP_EXTENSION: + cuda_flags = ['-DWITH_HIP'] + common_cflags + extra_cflags + COMMON_HIP_FLAGS + COMMON_HIPCC_FLAGS + cuda_flags = cuda_flags + ['-std=c++17'] + cuda_flags += _get_rocm_arch_flags(cuda_flags) + cuda_flags += extra_cuda_cflags + if IS_WINDOWS: + cuda_flags = _nt_quote_args(cuda_flags) + elif with_cuda: + cuda_flags = common_cflags + COMMON_NVCC_FLAGS + _get_cuda_arch_flags(extra_cuda_cflags) + if IS_WINDOWS: + for flag in COMMON_MSVC_FLAGS: + cuda_flags = ['-Xcompiler', flag] + cuda_flags + for ignore_warning in MSVC_IGNORE_CUDAFE_WARNINGS: + cuda_flags = ['-Xcudafe', '--diag_suppress=' + ignore_warning] + cuda_flags + cuda_flags = cuda_flags + ['-std=c++17'] + cuda_flags = _nt_quote_args(cuda_flags) + cuda_flags += _nt_quote_args(extra_cuda_cflags) + else: + cuda_flags += ['--compiler-options', "'-fPIC'"] + cuda_flags += extra_cuda_cflags + if not any(flag.startswith('-std=') for flag in cuda_flags): + cuda_flags.append('-std=c++17') + cc_env = os.getenv("CC") + if cc_env is not None: + cuda_flags = ['-ccbin', cc_env] + cuda_flags + else: + cuda_flags = None + + if with_sycl: + sycl_cflags = cflags + _COMMON_SYCL_FLAGS + sycl_cflags += extra_sycl_cflags + _append_sycl_targets_if_missing(sycl_cflags) + _append_sycl_std_if_no_std_present(sycl_cflags) + host_cflags = cflags + # escaping quoted arguments to pass them thru SYCL compiler + icpx_version = _get_icpx_version() + if int(icpx_version) < 20250200: + host_cflags = [item.replace('\\"', '\\\\"') for item in host_cflags] + + sycl_cflags += _wrap_sycl_host_flags(host_cflags) + sycl_dlink_post_cflags = _SYCL_DLINK_FLAGS.copy() + sycl_dlink_post_cflags += _get_sycl_device_flags(sycl_cflags) + else: + sycl_cflags = None + sycl_dlink_post_cflags = None + + def object_file_path(source_file: str) -> str: + # '/path/to/file.cpp' -> 'file' + file_name = os.path.splitext(os.path.basename(source_file))[0] + if _is_cuda_file(source_file) and with_cuda: + # Use a different object filename in case a C++ and CUDA file have + # the same filename but different extension (.cpp vs. .cu). + target = f'{file_name}.cuda.o' + elif _is_sycl_file(source_file) and with_sycl: + target = f'{file_name}.sycl.o' + else: + target = f'{file_name}.o' + return target + + objects = [object_file_path(src) for src in sources] + ldflags = ([] if is_standalone else [SHARED_FLAG]) + extra_ldflags + + # The darwin linker needs explicit consent to ignore unresolved symbols. + if IS_MACOS: + ldflags.append('-undefined dynamic_lookup') + elif IS_WINDOWS: + ldflags = _nt_quote_args(ldflags) + + ext = EXEC_EXT if is_standalone else LIB_EXT + library_target = f'{name}{ext}' + + _write_ninja_file( + path=path, + cflags=cflags, + post_cflags=None, + cuda_cflags=cuda_flags, + cuda_post_cflags=None, + cuda_dlink_post_cflags=None, + sycl_cflags=sycl_cflags, + sycl_post_cflags=[], + sycl_dlink_post_cflags=sycl_dlink_post_cflags, + sources=sources, + objects=objects, + ldflags=ldflags, + library_target=library_target, + with_cuda=with_cuda, + with_sycl=with_sycl) + + +def _write_ninja_file(path, + cflags, + post_cflags, + cuda_cflags, + cuda_post_cflags, + cuda_dlink_post_cflags, + sycl_cflags, + sycl_post_cflags, + sycl_dlink_post_cflags, + sources, + objects, + ldflags, + library_target, + with_cuda, + with_sycl) -> None: + r"""Write a ninja file that does the desired compiling and linking. + + `path`: Where to write this file + `cflags`: list of flags to pass to $cxx. Can be None. + `post_cflags`: list of flags to append to the $cxx invocation. Can be None. + `cuda_cflags`: list of flags to pass to $nvcc. Can be None. + `cuda_post_cflags`: list of flags to append to the $nvcc invocation. Can be None. + `cuda_dlink_post_cflags`: list of flags to append to the $nvcc device code link invocation. Can be None. + `sycl_cflags`: list of flags to pass to SYCL compiler. Can be None. + `sycl_post_cflags`: list of flags to append to the SYCL compiler invocation. Can be None. + `sycl_dlink_post_cflags`: list of flags to append to the SYCL compiler device code link invocation. Can be None. +e. + `sources`: list of paths to source files + `objects`: list of desired paths to objects, one per source. + `ldflags`: list of flags to pass to linker. Can be None. + `library_target`: Name of the output library. Can be None; in that case, + we do no linking. + `with_cuda`: If we should be compiling with CUDA. + """ + def sanitize_flags(flags): + if flags is None: + return [] + else: + return [flag.strip() for flag in flags] + + cflags = sanitize_flags(cflags) + post_cflags = sanitize_flags(post_cflags) + cuda_cflags = sanitize_flags(cuda_cflags) + cuda_post_cflags = sanitize_flags(cuda_post_cflags) + cuda_dlink_post_cflags = sanitize_flags(cuda_dlink_post_cflags) + sycl_cflags = sanitize_flags(sycl_cflags) + sycl_post_cflags = sanitize_flags(sycl_post_cflags) + sycl_dlink_post_cflags = sanitize_flags(sycl_dlink_post_cflags) + ldflags = sanitize_flags(ldflags) + + # Sanity checks... + if len(sources) != len(objects): + raise AssertionError("sources and objects lists must be the same length") + if len(sources) == 0: + raise AssertionError("At least one source is required to build a library") + + compiler = get_cxx_compiler() + + # Version 1.3 is required for the `deps` directive. + config = ['ninja_required_version = 1.3'] + config.append(f'cxx = {compiler}') + if with_cuda or cuda_dlink_post_cflags: + if "PYTORCH_NVCC" in os.environ: + nvcc = os.getenv("PYTORCH_NVCC") # user can set nvcc compiler with ccache using the environment variable here + else: + if IS_HIP_EXTENSION: + nvcc = _get_hipcc_path() + else: + nvcc = _join_cuda_home('bin', 'nvcc') + config.append(f'nvcc = {nvcc}') + if with_sycl or sycl_dlink_post_cflags: + sycl = 'icx' if IS_WINDOWS else 'icpx' + config.append(f'sycl = {sycl}') + + if IS_HIP_EXTENSION: + post_cflags = COMMON_HIP_FLAGS + post_cflags + flags = [f'cflags = {" ".join(cflags)}'] + flags.append(f'post_cflags = {" ".join(post_cflags)}') + if with_cuda: + flags.append(f'cuda_cflags = {" ".join(cuda_cflags)}') + flags.append(f'cuda_post_cflags = {" ".join(cuda_post_cflags)}') + flags.append(f'cuda_dlink_post_cflags = {" ".join(cuda_dlink_post_cflags)}') + if with_sycl: + flags.append(f'sycl_cflags = {" ".join(sycl_cflags)}') + flags.append(f'sycl_post_cflags = {" ".join(sycl_post_cflags)}') + flags.append(f'sycl_dlink_post_cflags = {" ".join(sycl_dlink_post_cflags)}') + flags.append(f'ldflags = {" ".join(ldflags)}') + + # Turn into absolute paths so we can emit them into the ninja build + # file wherever it is. + sources = [os.path.abspath(file) for file in sources] + + # See https://ninja-build.org/build.ninja.html for reference. + compile_rule = ['rule compile'] + if IS_WINDOWS: + compiler_name = "$cxx" if IS_HIP_EXTENSION else "cl" + compile_rule.append( + f' command = {compiler_name} ' + '/showIncludes $cflags -c $in /Fo$out $post_cflags' # codespell:ignore + ) + if not IS_HIP_EXTENSION: + compile_rule.append(' deps = msvc') + else: + compile_rule.append( + ' command = $cxx -MMD -MF $out.d $cflags -c $in -o $out $post_cflags') + compile_rule.append(' depfile = $out.d') + compile_rule.append(' deps = gcc') + + if with_cuda: + cuda_compile_rule = ['rule cuda_compile'] + nvcc_gendeps = '' + # --generate-dependencies-with-compile is not supported by ROCm + # Nvcc flag `--generate-dependencies-with-compile` is not supported by sccache, which may increase build time. + if torch.version.cuda is not None and os.getenv('TORCH_EXTENSION_SKIP_NVCC_GEN_DEPENDENCIES', '0') != '1': + cuda_compile_rule.append(' depfile = $out.d') + cuda_compile_rule.append(' deps = gcc') + # Note: non-system deps with nvcc are only supported + # on Linux so use --generate-dependencies-with-compile + # to make this work on Windows too. + nvcc_gendeps = '--generate-dependencies-with-compile --dependency-output $out.d' + cuda_compile_rule.append( + f' command = $nvcc {nvcc_gendeps} $cuda_cflags -c $in -o $out $cuda_post_cflags') + + if with_sycl: + sycl_compile_rule = ['rule sycl_compile'] + # SYCL compiler does not recognize .sycl extension automatically, + # so we pass '-x c++' explicitly notifying compiler of file format + sycl_compile_rule.append( + ' command = $sycl $sycl_cflags -c -x c++ $in -o $out $sycl_post_cflags') + + + # Emit one build rule per source to enable incremental build. + build = [] + for source_file, object_file in zip(sources, objects, strict=True): + is_cuda_source = _is_cuda_file(source_file) and with_cuda + is_sycl_source = _is_sycl_file(source_file) and with_sycl + if is_cuda_source: + rule = 'cuda_compile' + elif is_sycl_source: + rule = 'sycl_compile' + else: + rule = 'compile' + if IS_WINDOWS: + source_file = source_file.replace(':', '$:') + object_file = object_file.replace(':', '$:') + source_file = source_file.replace(" ", "$ ") + object_file = object_file.replace(" ", "$ ") + build.append(f'build {object_file}: {rule} {source_file}') + + if cuda_dlink_post_cflags: + cuda_devlink_out = os.path.join(os.path.dirname(objects[0]), 'dlink.o') + cuda_devlink_rule = ['rule cuda_devlink'] + cuda_devlink_rule.append(' command = $nvcc $in -o $out $cuda_dlink_post_cflags') + cuda_devlink = [f'build {cuda_devlink_out}: cuda_devlink {" ".join(objects)}'] + objects += [cuda_devlink_out] + else: + cuda_devlink_rule, cuda_devlink = [], [] + + if sycl_dlink_post_cflags: + sycl_devlink_out = os.path.join(os.path.dirname(objects[0]), "sycl_dlink.o") + if IS_WINDOWS: + sycl_devlink_objects = [obj.replace(":", "$:") for obj in objects] + objects += [sycl_devlink_out] + sycl_devlink_out = sycl_devlink_out.replace(":", "$:") + else: + sycl_devlink_objects = list(objects) + objects += [sycl_devlink_out] + sycl_devlink_rule = ["rule sycl_devlink"] + sycl_devlink_rule.append( + " command = $sycl $in -o $out $sycl_dlink_post_cflags" + ) + sycl_devlink = [ + f"build {sycl_devlink_out}: sycl_devlink {' '.join(sycl_devlink_objects)}" + ] + else: + sycl_devlink_rule, sycl_devlink = [], [] + + if library_target is not None: + link_rule = ['rule link'] + if IS_WINDOWS: + cl_paths = subprocess.check_output(['where', + 'cl']).decode(*SUBPROCESS_DECODE_ARGS).split('\r\n') + if len(cl_paths) >= 1: + cl_path = os.path.dirname(cl_paths[0]).replace(':', '$:') + else: + raise RuntimeError("MSVC is required to load C++ extensions") + link_rule.append(f' command = "{cl_path}/link.exe" $in /nologo $ldflags /out:$out') + else: + link_rule.append(' command = $cxx $in $ldflags -o $out') + + link = [f'build {library_target}: link {" ".join(objects)}'] + + default = [f'default {library_target}'] + else: + link_rule, link, default = [], [], [] + + # 'Blocks' should be separated by newlines, for visual benefit. + blocks = [config, flags, compile_rule] + if with_cuda: + blocks.append(cuda_compile_rule) # type: ignore[possibly-undefined] + if with_sycl: + blocks.append(sycl_compile_rule) # type: ignore[possibly-undefined] + blocks += [cuda_devlink_rule, sycl_devlink_rule, link_rule, build, cuda_devlink, sycl_devlink, link, default] + content = "\n\n".join("\n".join(b) for b in blocks) + # Ninja requires a new lines at the end of the .ninja file + content += "\n" + _maybe_write(path, content) + +def _join_cuda_home(*paths) -> str: + """ + Join paths with CUDA_HOME, or raises an error if it CUDA_HOME is not set. + + This is basically a lazy way of raising an error for missing $CUDA_HOME + only once we need to get any CUDA-specific path. + """ + if CUDA_HOME is None: + raise OSError('CUDA_HOME environment variable is not set. ' + 'Please set it to your CUDA install root.') + return os.path.join(CUDA_HOME, *paths) + + +def _is_cuda_file(path: str) -> bool: + valid_ext = ['.cu', '.cuh'] + if IS_HIP_EXTENSION: + valid_ext.append('.hip') + return os.path.splitext(path)[1] in valid_ext + +def _is_sycl_file(path: str) -> bool: + valid_ext = ['.sycl'] + return os.path.splitext(path)[1] in valid_ext diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4ab5e7ce7f1c55a7b8bfff0bda646a4635231871 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/__init__.py @@ -0,0 +1,78 @@ +from torch.utils.data.dataloader import ( + _DatasetKind, + DataLoader, + default_collate, + default_convert, + get_worker_info, +) +from torch.utils.data.datapipes._decorator import ( + argument_validation, + functional_datapipe, + guaranteed_datapipes_determinism, + non_deterministic, + runtime_validation, + runtime_validation_disabled, +) +from torch.utils.data.datapipes.datapipe import ( + DataChunk, + DFIterDataPipe, + IterDataPipe, + MapDataPipe, +) +from torch.utils.data.dataset import ( + ChainDataset, + ConcatDataset, + Dataset, + IterableDataset, + random_split, + StackDataset, + Subset, + TensorDataset, +) +from torch.utils.data.distributed import DistributedSampler +from torch.utils.data.sampler import ( + BatchSampler, + RandomSampler, + Sampler, + SequentialSampler, + SubsetRandomSampler, + WeightedRandomSampler, +) + + +__all__ = [ + "BatchSampler", + "ChainDataset", + "ConcatDataset", + "DFIterDataPipe", + "DataChunk", + "DataLoader", + "Dataset", + "DistributedSampler", + "IterDataPipe", + "IterableDataset", + "MapDataPipe", + "RandomSampler", + "Sampler", + "SequentialSampler", + "StackDataset", + "Subset", + "SubsetRandomSampler", + "TensorDataset", + "WeightedRandomSampler", + "_DatasetKind", + "argument_validation", + "default_collate", + "default_convert", + "functional_datapipe", + "get_worker_info", + "guaranteed_datapipes_determinism", + "non_deterministic", + "random_split", + "runtime_validation", + "runtime_validation_disabled", +] + +# Please keep this list sorted +if __all__ != sorted(__all__): + raise AssertionError("__all__ is not sorted") diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/_utils/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/_utils/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..44111ef697b7188df38711db1add2b8e0de4a293 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/_utils/__init__.py @@ -0,0 +1,53 @@ +r"""Utility classes & functions for data loading. Code in this folder is mostly used by ../dataloder.py. + +A lot of multiprocessing is used in data loading, which only supports running +functions defined in global environment (py2 can't serialize static methods). +Therefore, for code tidiness we put these functions into different files in this +folder. +""" + +import atexit +import sys + +# old private location of the ExceptionWrapper that some users rely on: +from torch._utils import ExceptionWrapper + + +IS_WINDOWS = sys.platform == "win32" + + +MP_STATUS_CHECK_INTERVAL = 5.0 +r"""Interval (in seconds) to check status of processes to avoid hanging in + multiprocessing data loading. This is mainly used in getting data from + another process, in which case we need to periodically check whether the + sender is alive to prevent hanging.""" + + +python_exit_status = False +r"""Whether Python is shutting down. This flag is guaranteed to be set before +the Python core library resources are freed, but Python may already be exiting +for some time when this is set. + +Hook to set this flag is `_set_python_exit_flag`, and is inspired by a similar +hook in Python 3.7 multiprocessing library: +https://github.com/python/cpython/blob/d4d60134b29290049e28df54f23493de4f1824b6/Lib/multiprocessing/util.py#L277-L327 +""" + + +try: + import numpy + + HAS_NUMPY = True +except ModuleNotFoundError: + HAS_NUMPY = False + + +def _set_python_exit_flag() -> None: + global python_exit_status + python_exit_status = True + + +atexit.register(_set_python_exit_flag) + + +from . import collate, fetch, pin_memory, signal_handling, worker diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/_utils/collate.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/_utils/collate.py new file mode 100644 index 0000000000000000000000000000000000000000..733e84a9afae622a3d2f3bc7637184e31436d46c --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/_utils/collate.py @@ -0,0 +1,401 @@ +# mypy: allow-untyped-defs +r"""Contains definitions of the methods used by the _BaseDataLoaderIter workers. + +These methods are used to collate samples fetched from dataset into Tensor(s). +These **needs** to be in global scope since Py2 doesn't support serializing +static methods. + +`default_collate` and `default_convert` are exposed to users via 'dataloader.py'. +""" + +import collections +import contextlib +import copy +import re +from collections.abc import Callable + +import torch + + +np_str_obj_array_pattern = re.compile(r"[SaUO]") + + +def default_convert(data): + r""" + Convert each NumPy array element into a :class:`torch.Tensor`. + + If the input is a `Sequence`, `Collection`, or `Mapping`, it tries to convert each element inside to a :class:`torch.Tensor`. + If the input is not an NumPy array, it is left unchanged. + This is used as the default function for collation when both `batch_sampler` and `batch_size` + are NOT defined in :class:`~torch.utils.data.DataLoader`. + + The general input type to output type mapping is similar to that + of :func:`~torch.utils.data.default_collate`. See the description there for more details. + + Args: + data: a single data point to be converted + + Examples: + >>> # xdoctest: +SKIP + >>> # Example with `int` + >>> default_convert(0) + 0 + >>> # Example with NumPy array + >>> default_convert(np.array([0, 1])) + tensor([0, 1]) + >>> # Example with NamedTuple + >>> Point = namedtuple("Point", ["x", "y"]) + >>> default_convert(Point(0, 0)) + Point(x=0, y=0) + >>> default_convert(Point(np.array(0), np.array(0))) + Point(x=tensor(0), y=tensor(0)) + >>> # Example with List + >>> default_convert([np.array([0, 1]), np.array([2, 3])]) + [tensor([0, 1]), tensor([2, 3])] + """ + elem_type = type(data) + if isinstance(data, torch.Tensor): + return data + elif ( + elem_type.__module__ == "numpy" + and elem_type.__name__ != "str_" + and elem_type.__name__ != "string_" + ): + # array of string classes and object + if ( + elem_type.__name__ == "ndarray" + and np_str_obj_array_pattern.search(data.dtype.str) is not None + ): + return data + return torch.as_tensor(data) + elif isinstance(data, collections.abc.Mapping): + try: + if isinstance(data, collections.abc.MutableMapping): + # The mapping type may have extra properties, so we can't just + # use `type(data)(...)` to create the new mapping. + # Create a clone and update it if the mapping type is mutable. + clone = copy.copy(data) + clone.update({key: default_convert(data[key]) for key in data}) + return clone + else: + return elem_type({key: default_convert(data[key]) for key in data}) + except TypeError: + # The mapping type may not support `copy()` / `update(mapping)` + # or `__init__(iterable)`. + return {key: default_convert(data[key]) for key in data} + elif isinstance(data, tuple) and hasattr(data, "_fields"): # namedtuple + return elem_type(*(default_convert(d) for d in data)) + elif isinstance(data, tuple): + return [default_convert(d) for d in data] # Backwards compatibility. + elif isinstance(data, collections.abc.Sequence) and not isinstance( + data, (str, bytes) + ): + try: + if isinstance(data, collections.abc.MutableSequence): + # The sequence type may have extra properties, so we can't just + # use `type(data)(...)` to create the new sequence. + # Create a clone and update it if the sequence type is mutable. + clone = copy.copy(data) # type: ignore[arg-type] + for i, d in enumerate(data): + clone[i] = default_convert(d) + return clone + else: + return elem_type([default_convert(d) for d in data]) + except TypeError: + # The sequence type may not support `copy()` / `__setitem__(index, item)` + # or `__init__(iterable)` (e.g., `range`). + return [default_convert(d) for d in data] + else: + return data + + +default_collate_err_msg_format = ( + "default_collate: batch must contain tensors, numpy arrays, numbers, " + "dicts or lists; found {}" +) + + +def collate( + batch, + *, + collate_fn_map: dict[type | tuple[type, ...], Callable] | None = None, +): + r""" + General collate function that handles collection type of element within each batch. + + The function also opens function registry to deal with specific element types. `default_collate_fn_map` + provides default collate functions for tensors, numpy arrays, numbers and strings. + + Args: + batch: a single batch to be collated + collate_fn_map: Optional dictionary mapping from element type to the corresponding collate function. + If the element type isn't present in this dictionary, + this function will go through each key of the dictionary in the insertion order to + invoke the corresponding collate function if the element type is a subclass of the key. + + Examples: + >>> def collate_tensor_fn(batch, *, collate_fn_map): + ... # Extend this function to handle batch of tensors + ... return torch.stack(batch, 0) + >>> def custom_collate(batch): + ... collate_map = {torch.Tensor: collate_tensor_fn} + ... return collate(batch, collate_fn_map=collate_map) + >>> # Extend `default_collate` by in-place modifying `default_collate_fn_map` + >>> default_collate_fn_map.update({torch.Tensor: collate_tensor_fn}) + + Note: + Each collate function requires a positional argument for batch and a keyword argument + for the dictionary of collate functions as `collate_fn_map`. + """ + elem = batch[0] + elem_type = type(elem) + + if collate_fn_map is not None: + if elem_type in collate_fn_map: + return collate_fn_map[elem_type](batch, collate_fn_map=collate_fn_map) + + for collate_type in collate_fn_map: + if isinstance(elem, collate_type): + return collate_fn_map[collate_type]( + batch, collate_fn_map=collate_fn_map + ) + + if isinstance(elem, collections.abc.Mapping): + try: + if isinstance(elem, collections.abc.MutableMapping): + # The mapping type may have extra properties, so we can't just + # use `type(data)(...)` to create the new mapping. + # Create a clone and update it if the mapping type is mutable. + clone = copy.copy(elem) + clone.update( + { + key: collate( + [d[key] for d in batch], collate_fn_map=collate_fn_map + ) + for key in elem + } + ) + return clone + else: + return elem_type( + { + key: collate( + [d[key] for d in batch], collate_fn_map=collate_fn_map + ) + for key in elem + } + ) + except TypeError: + # The mapping type may not support `copy()` / `update(mapping)` + # or `__init__(iterable)`. + return { + key: collate([d[key] for d in batch], collate_fn_map=collate_fn_map) + for key in elem + } + elif isinstance(elem, tuple) and hasattr(elem, "_fields"): # namedtuple + return elem_type( + *( + collate(samples, collate_fn_map=collate_fn_map) + for samples in zip(*batch, strict=False) + ) + ) + elif isinstance(elem, collections.abc.Sequence): + # check to make sure that the elements in batch have consistent size + it = iter(batch) + elem_size = len(next(it)) + # pyrefly: ignore [not-iterable] + if not all(len(elem) == elem_size for elem in it): + raise RuntimeError("each element in list of batch should be of equal size") + transposed = list( + zip(*batch, strict=False) + ) # It may be accessed twice, so we use a list. + + if isinstance(elem, tuple): + return [ + collate(samples, collate_fn_map=collate_fn_map) + for samples in transposed + ] # Backwards compatibility. + else: + try: + if isinstance(elem, collections.abc.MutableSequence): + # The sequence type may have extra properties, so we can't just + # use `type(data)(...)` to create the new sequence. + # Create a clone and update it if the sequence type is mutable. + clone = copy.copy(elem) # type: ignore[arg-type] + for i, samples in enumerate(transposed): + clone[i] = collate(samples, collate_fn_map=collate_fn_map) + return clone + else: + return elem_type( + [ + collate(samples, collate_fn_map=collate_fn_map) + for samples in transposed + ] + ) + except TypeError: + # The sequence type may not support `copy()` / `__setitem__(index, item)` + # or `__init__(iterable)` (e.g., `range`). + return [ + collate(samples, collate_fn_map=collate_fn_map) + for samples in transposed + ] + + raise TypeError(default_collate_err_msg_format.format(elem_type)) + + +def collate_tensor_fn( + batch, + *, + collate_fn_map: dict[type | tuple[type, ...], Callable] | None = None, +): + elem = batch[0] + out = None + if elem.is_nested: + raise RuntimeError( + "Batches of nested tensors are not currently supported by the default collate_fn; " + "please provide a custom collate_fn to handle them appropriately." + ) + if elem.layout in { + torch.sparse_coo, + torch.sparse_csr, + torch.sparse_bsr, + torch.sparse_csc, + torch.sparse_bsc, + }: + raise RuntimeError( + "Batches of sparse tensors are not currently supported by the default collate_fn; " + "please provide a custom collate_fn to handle them appropriately." + ) + if torch.utils.data.get_worker_info() is not None: + # If we're in a background process, concatenate directly into a + # shared memory tensor to avoid an extra copy + numel = sum(x.numel() for x in batch) + storage = elem._typed_storage()._new_shared(numel, device=elem.device) + out = elem.new(storage).resize_(len(batch), *list(elem.size())) + return torch.stack(batch, 0, out=out) + + +def collate_numpy_array_fn( + batch, + *, + collate_fn_map: dict[type | tuple[type, ...], Callable] | None = None, +): + elem = batch[0] + # array of string classes and object + if np_str_obj_array_pattern.search(elem.dtype.str) is not None: + raise TypeError(default_collate_err_msg_format.format(elem.dtype)) + + return collate([torch.as_tensor(b) for b in batch], collate_fn_map=collate_fn_map) + + +def collate_numpy_scalar_fn( + batch, + *, + collate_fn_map: dict[type | tuple[type, ...], Callable] | None = None, +): + return torch.as_tensor(batch) + + +def collate_float_fn( + batch, + *, + collate_fn_map: dict[type | tuple[type, ...], Callable] | None = None, +): + return torch.tensor(batch, dtype=torch.float64) + + +def collate_int_fn( + batch, + *, + collate_fn_map: dict[type | tuple[type, ...], Callable] | None = None, +): + return torch.tensor(batch) + + +def collate_str_fn( + batch, + *, + collate_fn_map: dict[type | tuple[type, ...], Callable] | None = None, +): + return batch + + +default_collate_fn_map: dict[type | tuple[type, ...], Callable] = { + torch.Tensor: collate_tensor_fn +} +with contextlib.suppress(ImportError): + import numpy as np + + # For both ndarray and memmap (subclass of ndarray) + default_collate_fn_map[np.ndarray] = collate_numpy_array_fn + # See scalars hierarchy: https://numpy.org/doc/stable/reference/arrays.scalars.html + # Skip string scalars + default_collate_fn_map[(np.bool_, np.number, np.object_)] = collate_numpy_scalar_fn +default_collate_fn_map[float] = collate_float_fn +default_collate_fn_map[int] = collate_int_fn +default_collate_fn_map[str] = collate_str_fn +default_collate_fn_map[bytes] = collate_str_fn + + +def default_collate(batch): + r""" + Take in a batch of data and put the elements within the batch into a tensor with an additional outer dimension - batch size. + + The exact output type can be a :class:`torch.Tensor`, a `Sequence` of :class:`torch.Tensor`, a + Collection of :class:`torch.Tensor`, or left unchanged, depending on the input type. + This is used as the default function for collation when + `batch_size` or `batch_sampler` is defined in :class:`~torch.utils.data.DataLoader`. + + Here is the general input type (based on the type of the element within the batch) to output type mapping: + + * :class:`torch.Tensor` -> :class:`torch.Tensor` (with an added outer dimension batch size) + * NumPy Arrays -> :class:`torch.Tensor` + * `float` -> :class:`torch.Tensor` + * `int` -> :class:`torch.Tensor` + * `str` -> `str` (unchanged) + * `bytes` -> `bytes` (unchanged) + * `Mapping[K, V_i]` -> `Mapping[K, default_collate([V_1, V_2, ...])]` + * `NamedTuple[V1_i, V2_i, ...]` -> `NamedTuple[default_collate([V1_1, V1_2, ...]), + default_collate([V2_1, V2_2, ...]), ...]` + * `Sequence[V1_i, V2_i, ...]` -> `Sequence[default_collate([V1_1, V1_2, ...]), + default_collate([V2_1, V2_2, ...]), ...]` + + Args: + batch: a single batch to be collated + + Examples: + >>> # xdoctest: +SKIP + >>> # Example with a batch of `int`s: + >>> default_collate([0, 1, 2, 3]) + tensor([0, 1, 2, 3]) + >>> # Example with a batch of `str`s: + >>> default_collate(["a", "b", "c"]) + ['a', 'b', 'c'] + >>> # Example with `Map` inside the batch: + >>> default_collate([{"A": 0, "B": 1}, {"A": 100, "B": 100}]) + {'A': tensor([ 0, 100]), 'B': tensor([ 1, 100])} + >>> # Example with `NamedTuple` inside the batch: + >>> Point = namedtuple("Point", ["x", "y"]) + >>> default_collate([Point(0, 0), Point(1, 1)]) + Point(x=tensor([0, 1]), y=tensor([0, 1])) + >>> # Example with `Tuple` inside the batch: + >>> default_collate([(0, 1), (2, 3)]) + [tensor([0, 2]), tensor([1, 3])] + >>> # Example with `List` inside the batch: + >>> default_collate([[0, 1], [2, 3]]) + [tensor([0, 2]), tensor([1, 3])] + >>> # Two options to extend `default_collate` to handle specific type + >>> # Option 1: Write custom collate function and invoke `default_collate` + >>> def custom_collate(batch): + ... elem = batch[0] + ... if isinstance(elem, CustomType): # Some custom condition + ... return ... + ... else: # Fall back to `default_collate` + ... return default_collate(batch) + >>> # Option 2: In-place modify `default_collate_fn_map` + >>> def collate_customtype_fn(batch, *, collate_fn_map=None): + ... return ... + >>> default_collate_fn_map.update(CustomType, collate_customtype_fn) + >>> default_collate(batch) # Handle `CustomType` automatically + """ + return collate(batch, collate_fn_map=default_collate_fn_map) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py new file mode 100644 index 0000000000000000000000000000000000000000..9bcd0ec5b30731269fc304b5ef2e087d94dc3211 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py @@ -0,0 +1,57 @@ +# mypy: allow-untyped-defs +r"""Contains definitions of the methods used by the _BaseDataLoaderIter to fetch data from an iterable-style or map-style dataset. + +This logic is shared in both single- and multi-processing data loading. +""" + +from typing import NoReturn + + +class _BaseDatasetFetcher: + def __init__(self, dataset, auto_collation, collate_fn, drop_last) -> None: + self.dataset = dataset + self.auto_collation = auto_collation + self.collate_fn = collate_fn + self.drop_last = drop_last + + def fetch(self, possibly_batched_index) -> NoReturn: + raise NotImplementedError + + +class _IterableDatasetFetcher(_BaseDatasetFetcher): + def __init__(self, dataset, auto_collation, collate_fn, drop_last) -> None: + super().__init__(dataset, auto_collation, collate_fn, drop_last) + self.dataset_iter = iter(dataset) + self.ended = False + + def fetch(self, possibly_batched_index): + if self.ended: + raise StopIteration + + if self.auto_collation: + data = [] + for _ in possibly_batched_index: + try: + data.append(next(self.dataset_iter)) + except StopIteration: + self.ended = True + break + if len(data) == 0 or ( + self.drop_last and len(data) < len(possibly_batched_index) + ): + raise StopIteration + else: + data = next(self.dataset_iter) + return self.collate_fn(data) + + +class _MapDatasetFetcher(_BaseDatasetFetcher): + def fetch(self, possibly_batched_index): + if self.auto_collation: + if hasattr(self.dataset, "__getitems__") and self.dataset.__getitems__: + data = self.dataset.__getitems__(possibly_batched_index) + else: + data = [self.dataset[idx] for idx in possibly_batched_index] + else: + data = self.dataset[possibly_batched_index] + return self.collate_fn(data) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/_utils/pin_memory.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/_utils/pin_memory.py new file mode 100644 index 0000000000000000000000000000000000000000..a7646ea7677c1f770b413ae18ed055e79e41b189 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/_utils/pin_memory.py @@ -0,0 +1,102 @@ +# mypy: allow-untyped-defs +r"""Contains definitions of the methods used by the _BaseDataLoaderIter to put fetched tensors into pinned memory. + +These **needs** to be in global scope since Py2 doesn't support serializing +static methods. +""" + +import collections +import copy +import queue + +import torch +from torch._utils import ExceptionWrapper + +from . import MP_STATUS_CHECK_INTERVAL + + +def _pin_memory_loop(in_queue, out_queue, device_id, done_event, device) -> None: + # This setting is thread local, and prevents the copy in pin_memory from + # consuming all CPU cores. + torch.set_num_threads(1) + + torch.multiprocessing._set_thread_name("pt_data_pin") + torch.accelerator.set_device_index(device_id) + + def do_one_step() -> None: + try: + r = in_queue.get(timeout=MP_STATUS_CHECK_INTERVAL) + except queue.Empty: + return + idx, data = r + if not done_event.is_set() and not isinstance(data, ExceptionWrapper): + try: + data = pin_memory(data, device) + except Exception: + data = ExceptionWrapper( + where=f"in pin memory thread for device {device_id}" + ) + r = (idx, data) + while not done_event.is_set(): + try: + out_queue.put(r, timeout=MP_STATUS_CHECK_INTERVAL) + break + except queue.Full: + continue + + # See NOTE [ Data Loader Multiprocessing Shutdown Logic ] for details on the + # logic of this function. + while not done_event.is_set(): + # Make sure that we don't preserve any object from one iteration + # to the next + do_one_step() + + +def pin_memory(data, device=None): + if isinstance(data, torch.Tensor): + return data.pin_memory(device) + elif isinstance(data, (str, bytes)): + return data + elif isinstance(data, collections.abc.Mapping): + try: + if isinstance(data, collections.abc.MutableMapping): + # The sequence type may have extra properties, so we can't just + # use `type(data)(...)` to create the new sequence. + # Create a clone and update it if the sequence type is mutable. + clone = copy.copy(data) + clone.update( + {k: pin_memory(sample, device) for k, sample in data.items()} + ) + return clone + else: + return type(data)( + # pyrefly: ignore [bad-argument-count] + {k: pin_memory(sample, device) for k, sample in data.items()} + ) # type: ignore[call-arg] + except TypeError: + # The mapping type may not support `copy()` / `update(mapping)` + # or `__init__(iterable)`. + return {k: pin_memory(sample, device) for k, sample in data.items()} + elif isinstance(data, tuple): + if hasattr(data, "_fields"): # namedtuple + return type(data)(*(pin_memory(sample, device) for sample in data)) + return type(data)(pin_memory(sample, device) for sample in data) + elif isinstance(data, collections.abc.Sequence): + try: + if isinstance(data, collections.abc.MutableSequence): + # The sequence type may have extra properties, so we can't just + # use `type(data)(...)` to create the new sequence. + # Create a clone and update it if the sequence type is mutable. + clone = copy.copy(data) # type: ignore[arg-type] + for i, item in enumerate(data): + clone[i] = pin_memory(item, device) + return clone + return type(data)([pin_memory(sample, device) for sample in data]) # type: ignore[call-arg] + except TypeError: + # The sequence type may not support `copy()` / `__setitem__(index, item)` + # or `__init__(iterable)` (e.g., `range`). + return [pin_memory(sample, device) for sample in data] + elif hasattr(data, "pin_memory"): + return data.pin_memory() + else: + return data diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/_utils/signal_handling.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/_utils/signal_handling.py new file mode 100644 index 0000000000000000000000000000000000000000..abff09bc40819d83420a08e0b90d7ba816f4764f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/_utils/signal_handling.py @@ -0,0 +1,80 @@ +# mypy: allow-untyped-defs +r"""Signal handling for multiprocessing data loading. + +NOTE [ Signal handling in multiprocessing data loading ] + +In cases like DataLoader, if a worker process dies due to bus error/segfault +or just hang, the main process will hang waiting for data. This is difficult +to avoid on PyTorch side as it can be caused by limited shm, or other +libraries users call in the workers. In this file and `DataLoader.cpp`, we make +our best effort to provide some error message to users when such unfortunate +events happen. + +When a _BaseDataLoaderIter starts worker processes, their pids are registered in a +defined in `DataLoader.cpp`: id(_BaseDataLoaderIter) => Collection[ Worker pids ] +via `_set_worker_pids`. + +When an error happens in a worker process, the main process received a SIGCHLD, +and Python will eventually call the handler registered below +(in `_set_SIGCHLD_handler`). In the handler, the `_error_if_any_worker_fails` +call checks all registered worker pids and raise proper error message to +prevent main process from hanging waiting for data from worker. + +Additionally, at the beginning of each worker's `_utils.worker._worker_loop`, +`_set_worker_signal_handlers` is called to register critical signal handlers +(e.g., for SIGSEGV, SIGBUS, SIGFPE, SIGTERM) in C, which just prints an error +message to stderr before triggering the default handler. So a message will also +be printed from the worker process when it is killed by such signals. + +See NOTE [ Data Loader Multiprocessing Shutdown Logic ] for the reasoning of +this signal handling design and other mechanism we implement to make our +multiprocessing data loading robust to errors. +""" + +import signal +import threading + +# Some of the following imported functions are not used in this file, but are to +# be used `_utils.signal_handling.XXXXX`. +from torch._C import ( # noqa: F401 + _error_if_any_worker_fails, + _remove_worker_pids, + _set_worker_pids, + _set_worker_signal_handlers, +) + +from . import IS_WINDOWS + + +_SIGCHLD_handler_set = False +r"""Whether SIGCHLD handler is set for DataLoader worker failures. Only one +handler needs to be set for all DataLoaders in a process.""" + + +def _set_SIGCHLD_handler() -> None: + # Windows doesn't support SIGCHLD handler + if IS_WINDOWS: + return + # can't set signal in child threads + if not isinstance(threading.current_thread(), threading._MainThread): # type: ignore[attr-defined] + return + global _SIGCHLD_handler_set + if _SIGCHLD_handler_set: + return + previous_handler = signal.getsignal(signal.SIGCHLD) + if not callable(previous_handler): + # This doesn't catch default handler, but SIGCHLD default handler is a + # no-op. + previous_handler = None + + def handler(signum, frame) -> None: + # This following call uses `waitid` with WNOHANG from C side. Therefore, + # Python can still get and update the process status successfully. + _error_if_any_worker_fails() + if previous_handler is not None: + if not callable(previous_handler): + raise AssertionError("previous_handler is not callable") + previous_handler(signum, frame) + + signal.signal(signal.SIGCHLD, handler) + _SIGCHLD_handler_set = True diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/_utils/worker.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/_utils/worker.py new file mode 100644 index 0000000000000000000000000000000000000000..611aee4766bf451193152d9c6f20055889a2caae --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/_utils/worker.py @@ -0,0 +1,383 @@ +# mypy: allow-untyped-defs +r"""Contains definitions of the methods used by the _BaseDataLoaderIter workers. + +These **needs** to be in global scope since Py2 doesn't support serializing +static methods. +""" + +import os +import queue +import random +from dataclasses import dataclass +from typing import Optional, TYPE_CHECKING + +import torch +from torch._utils import ExceptionWrapper + +from . import HAS_NUMPY, IS_WINDOWS, MP_STATUS_CHECK_INTERVAL, signal_handling + + +if TYPE_CHECKING: + from torch.utils.data import Dataset + +if IS_WINDOWS: + import ctypes + from ctypes.wintypes import BOOL, DWORD, HANDLE + + # On Windows, the parent ID of the worker process remains unchanged when the manager process + # is gone, and the only way to check it through OS is to let the worker have a process handle + # of the manager and ask if the process status has changed. + class ManagerWatchdog: + def __init__(self) -> None: + self.manager_pid = os.getppid() + + # mypy cannot detect this code is windows only + self.kernel32 = ctypes.WinDLL("kernel32", use_last_error=True) # type: ignore[attr-defined] + self.kernel32.OpenProcess.argtypes = (DWORD, BOOL, DWORD) + self.kernel32.OpenProcess.restype = HANDLE + self.kernel32.WaitForSingleObject.argtypes = (HANDLE, DWORD) + self.kernel32.WaitForSingleObject.restype = DWORD + + # Value obtained from https://msdn.microsoft.com/en-us/library/ms684880.aspx + SYNCHRONIZE = 0x00100000 + self.manager_handle = self.kernel32.OpenProcess( + SYNCHRONIZE, 0, self.manager_pid + ) + + if not self.manager_handle: + raise ctypes.WinError(ctypes.get_last_error()) # type: ignore[attr-defined] + + self.manager_dead = False + + def is_alive(self) -> bool: + if not self.manager_dead: + # Value obtained from https://msdn.microsoft.com/en-us/library/windows/desktop/ms687032.aspx + self.manager_dead = ( + self.kernel32.WaitForSingleObject(self.manager_handle, 0) == 0 + ) + return not self.manager_dead + +else: + + class ManagerWatchdog: # type: ignore[no-redef] + def __init__(self) -> None: + self.manager_pid = os.getppid() + self.manager_dead = False + + def is_alive(self) -> bool: + if not self.manager_dead: + self.manager_dead = os.getppid() != self.manager_pid + return not self.manager_dead + + +_worker_info: Optional["WorkerInfo"] = None + + +class WorkerInfo: + id: int + num_workers: int + seed: int + dataset: "Dataset" + __initialized = False + + def __init__(self, **kwargs) -> None: + for k, v in kwargs.items(): + setattr(self, k, v) + self.__keys = tuple(kwargs.keys()) + self.__initialized = True + + def __setattr__(self, key, val) -> None: + if self.__initialized: + raise RuntimeError( + f"Cannot assign attributes to {self.__class__.__name__} objects" + ) + return super().__setattr__(key, val) + + def __repr__(self) -> str: + items = [f"{k}={getattr(self, k)}" for k in self.__keys] + return f"{self.__class__.__name__}({', '.join(items)})" + + +def get_worker_info() -> WorkerInfo | None: + r"""Returns the information about the current + :class:`~torch.utils.data.DataLoader` iterator worker process. + + When called in a worker, this returns an object guaranteed to have the + following attributes: + + * :attr:`id`: the current worker id. + * :attr:`num_workers`: the total number of workers. + * :attr:`seed`: the random seed set for the current worker. This value is + determined by main process RNG and the worker id. See + :class:`~torch.utils.data.DataLoader`'s documentation for more details. + * :attr:`dataset`: the copy of the dataset object in **this** process. Note + that this will be a different object in a different process than the one + in the main process. + + When called in the main process, this returns ``None``. + + .. note:: + When used in a :attr:`worker_init_fn` passed over to + :class:`~torch.utils.data.DataLoader`, this method can be useful to + set up each worker process differently, for instance, using ``worker_id`` + to configure the ``dataset`` object to only read a specific fraction of a + sharded dataset, or use ``seed`` to seed other libraries used in dataset + code. + """ + return _worker_info + + +r"""Dummy class used to signal the end of an IterableDataset""" + + +@dataclass(frozen=True) +class _IterableDatasetStopIteration: + worker_id: int + + +r"""Dummy class used to resume the fetching when worker reuse is enabled""" + + +@dataclass(frozen=True) +class _ResumeIteration: + seed: int | None = None + + +# The function `_generate_state` is adapted from `numpy.random.SeedSequence` +# from https://github.com/numpy/numpy/blob/main/numpy/random/bit_generator.pyx +# It's MIT licensed, here is the copyright: + +# Copyright (c) 2015 Melissa E. O'Neill +# Copyright (c) 2019 NumPy Developers +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + + +# This function generates an array of int32 as the seed for +# `numpy.random`, in order to prevent state collision due to same +# seed and algorithm for `numpy.random` and `random` modules. +# TODO: Implement `SeedSequence` like object for `torch.random` +def _generate_state(base_seed, worker_id): + INIT_A = 0x43B0D7E5 + MULT_A = 0x931E8875 + INIT_B = 0x8B51F9DD + MULT_B = 0x58F38DED + MIX_MULT_L = 0xCA01F9DD + MIX_MULT_R = 0x4973F715 + XSHIFT = 4 * 8 // 2 + MASK32 = 0xFFFFFFFF + + entropy = [worker_id, base_seed & MASK32, base_seed >> 32, 0] + pool = [0] * 4 + + hash_const_A = INIT_A + + def hash(value): + nonlocal hash_const_A + value = (value ^ hash_const_A) & MASK32 + hash_const_A = (hash_const_A * MULT_A) & MASK32 + value = (value * hash_const_A) & MASK32 + value = (value ^ (value >> XSHIFT)) & MASK32 + return value + + def mix(x, y): + result_x = (MIX_MULT_L * x) & MASK32 + result_y = (MIX_MULT_R * y) & MASK32 + result = (result_x - result_y) & MASK32 + result = (result ^ (result >> XSHIFT)) & MASK32 + return result + + # Add in the entropy to the pool. + for i in range(len(pool)): + pool[i] = hash(entropy[i]) + + # Mix all bits together so late bits can affect earlier bits. + for i_src in range(len(pool)): + for i_dst in range(len(pool)): + if i_src != i_dst: + pool[i_dst] = mix(pool[i_dst], hash(pool[i_src])) + + hash_const_B = INIT_B + state = [] + for i_dst in range(4): + data_val = pool[i_dst] + data_val = (data_val ^ hash_const_B) & MASK32 + hash_const_B = (hash_const_B * MULT_B) & MASK32 + data_val = (data_val * hash_const_B) & MASK32 + data_val = (data_val ^ (data_val >> XSHIFT)) & MASK32 + state.append(data_val) + return state + + +def _worker_loop( + dataset_kind, + dataset, + index_queue, + data_queue, + done_event, + auto_collation, + collate_fn, + drop_last, + base_seed, + init_fn, + worker_id, + num_workers, + persistent_workers, + shared_seed, +) -> None: + # See NOTE [ Data Loader Multiprocessing Shutdown Logic ] for details on the + # logic of this function. + + try: + # Initialize C side signal handlers for SIGBUS and SIGSEGV. Python signal + # module's handlers are executed after Python returns from C low-level + # handlers, likely when the same fatal signal had already happened + # again. + # https://docs.python.org/3/library/signal.html#execution-of-python-signal-handlers + signal_handling._set_worker_signal_handlers() + + torch.multiprocessing._set_thread_name("pt_data_worker") + + torch.set_num_threads(1) + seed = base_seed + worker_id + random.seed(seed) + torch.manual_seed(seed) + if HAS_NUMPY: + np_seed = _generate_state(base_seed, worker_id) + import numpy as np + + np.random.seed(np_seed) + + from torch.utils.data import IterDataPipe + from torch.utils.data.graph_settings import apply_random_seed + + shared_rng = torch.Generator() + if isinstance(dataset, IterDataPipe): + if shared_seed is None: + raise AssertionError( + "shared_seed must be provided for IterDataPipe workers" + ) + shared_rng.manual_seed(shared_seed) + dataset = apply_random_seed(dataset, shared_rng) + + global _worker_info + _worker_info = WorkerInfo( + id=worker_id, num_workers=num_workers, seed=seed, dataset=dataset + ) + + from torch.utils.data import _DatasetKind + + init_exception = None + + try: + if init_fn is not None: + init_fn(worker_id) + + fetcher = _DatasetKind.create_fetcher( + dataset_kind, dataset, auto_collation, collate_fn, drop_last + ) + except Exception: + init_exception = ExceptionWrapper( + where=f"in DataLoader worker process {worker_id}" + ) + + # When using Iterable mode, some worker can exit earlier than others due + # to the IterableDataset behaving differently for different workers. + # When such things happen, an `_IterableDatasetStopIteration` object is + # sent over to the main process with the ID of this worker, so that the + # main process won't send more tasks to this worker, and will send + # `None` to this worker to properly exit it. + # + # Note that we cannot set `done_event` from a worker as it is shared + # among all processes. Instead, we set the `iteration_end` flag to + # signify that the iterator is exhausted. When either `done_event` or + # `iteration_end` is set, we skip all processing step and just wait for + # `None`. + iteration_end = False + + watchdog = ManagerWatchdog() + + while watchdog.is_alive(): + try: + r = index_queue.get(timeout=MP_STATUS_CHECK_INTERVAL) + except queue.Empty: + continue + if isinstance(r, _ResumeIteration): + # Acknowledge the main process + data_queue.put((r, None)) + iteration_end = False + + if isinstance(dataset, IterDataPipe): + if r.seed is None: + raise AssertionError( + "resume iteration seed is None for IterDataPipe" + ) + shared_rng.manual_seed(r.seed) + dataset = apply_random_seed(dataset, shared_rng) + + # Recreate the fetcher for worker-reuse policy + fetcher = _DatasetKind.create_fetcher( + dataset_kind, dataset, auto_collation, collate_fn, drop_last + ) + continue + elif r is None: + # Received the final signal + if not done_event.is_set() and not iteration_end: + raise AssertionError( + "Received final signal but neither done_event nor iteration_end is set" + ) + break + elif done_event.is_set() or iteration_end: + # `done_event` is set. But I haven't received the final signal + # (None) yet. I will keep continuing until get it, and skip the + # processing steps. + continue + idx, index = r + data: _IterableDatasetStopIteration | ExceptionWrapper + if init_exception is not None: + data = init_exception + init_exception = None + else: + try: + data = fetcher.fetch(index) # type: ignore[possibly-undefined] + except Exception as e: + if ( + isinstance(e, StopIteration) + and dataset_kind == _DatasetKind.Iterable + ): + data = _IterableDatasetStopIteration(worker_id) + # Set `iteration_end` + # (1) to save future `next(...)` calls, and + # (2) to avoid sending multiple `_IterableDatasetStopIteration`s. + iteration_end = True + else: + # It is important that we don't store exc_info in a variable. + # `ExceptionWrapper` does the correct thing. + # See NOTE [ Python Traceback Reference Cycle Problem ] + data = ExceptionWrapper( + where=f"in DataLoader worker process {worker_id}" + ) + data_queue.put((idx, data)) + del data, idx, index, r # save memory + except KeyboardInterrupt: + # Main process will raise KeyboardInterrupt anyways. + pass + if done_event.is_set(): + data_queue.cancel_join_thread() + data_queue.close() diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/backward_compatibility.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/backward_compatibility.py new file mode 100644 index 0000000000000000000000000000000000000000..5b928aea69fa7a7033a82021c5f41e053ff962fa --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/backward_compatibility.py @@ -0,0 +1,11 @@ +# mypy: allow-untyped-defs +from typing_extensions import deprecated as _deprecated + + +@_deprecated( + "Usage of `backward_compatibility.worker_init_fn` is deprecated " + "as `DataLoader` automatically applies sharding in every worker", + category=FutureWarning, +) +def worker_init_fn(worker_id) -> None: + pass diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/dataloader.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/dataloader.py new file mode 100644 index 0000000000000000000000000000000000000000..9f2cd710faf6e7bc6df41e86169253f85357c83f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/dataloader.py @@ -0,0 +1,1707 @@ +# mypy: allow-untyped-defs +r"""Definition of the DataLoader and associated iterators that subclass _BaseDataLoaderIter. + +To support these two classes, in `./_utils` we define many utility methods and +functions to be run in multiprocessing. E.g., the data loading worker loop is +in `./_utils/worker.py`. +""" + +from __future__ import annotations + +import contextlib +import functools +import itertools +import logging +import multiprocessing as python_multiprocessing +import os +import queue +import threading +import warnings +from collections.abc import Callable +from typing import Any, Generic, NoReturn, TYPE_CHECKING, TypeVar +from typing_extensions import Self + +import torch +import torch.distributed as dist +import torch.utils.data.graph_settings +from torch._utils import ExceptionWrapper +from torch.utils.data import _utils +from torch.utils.data.datapipes.datapipe import ( + _IterDataPipeSerializationWrapper, + _MapDataPipeSerializationWrapper, + IterDataPipe, + MapDataPipe, +) +from torch.utils.data.dataset import Dataset, IterableDataset +from torch.utils.data.sampler import ( + BatchSampler, + RandomSampler, + Sampler, + SequentialSampler, +) + + +if TYPE_CHECKING: + from collections.abc import Iterable + +__all__ = [ + "DataLoader", + "get_worker_info", + "default_collate", + "default_convert", +] + + +_T = TypeVar("_T") +_T_co = TypeVar("_T_co", covariant=True) +_worker_init_fn_t = Callable[[int], None] + +# Ideally we would parameterize `DataLoader` by the return type of `collate_fn`, but there is currently no way to have that +# type parameter set to a default value if the user doesn't pass in a custom 'collate_fn'. +# See https://github.com/python/mypy/issues/3737. +_collate_fn_t = Callable[[list[_T]], Any] + + +# These functions used to be defined in this file. However, it was moved to +# _utils/collate.py. Although it is rather hard to access this from user land +# (one has to explicitly directly `import torch.utils.data.dataloader`), there +# probably is user code out there using it. This aliasing maintains BC in this +# aspect. +default_collate: _collate_fn_t = _utils.collate.default_collate +default_convert = _utils.collate.default_convert + +get_worker_info = _utils.worker.get_worker_info + +logger = logging.getLogger(__name__) + + +class _DatasetKind: + Map = 0 + Iterable = 1 + + @staticmethod + def create_fetcher(kind, dataset, auto_collation, collate_fn, drop_last): + if kind == _DatasetKind.Map: + return _utils.fetch._MapDatasetFetcher( + dataset, auto_collation, collate_fn, drop_last + ) + else: + return _utils.fetch._IterableDatasetFetcher( + dataset, auto_collation, collate_fn, drop_last + ) + + +class _InfiniteConstantSampler(Sampler): + r"""Analogous to ``itertools.repeat(None, None)``. + + Used as sampler for :class:`~torch.utils.data.IterableDataset`. + """ + + def __iter__(self): + while True: + yield None + + +def _get_distributed_settings(): + if dist.is_available() and dist.is_initialized(): + return dist.get_world_size(), dist.get_rank() + else: + return 1, 0 + + +def _sharding_worker_init_fn(worker_init_fn, world_size, rank_id, worker_id) -> None: + global_worker_id = worker_id + info = torch.utils.data.get_worker_info() + if info is None: + raise AssertionError("Worker info is None in sharding worker init function") + total_workers = info.num_workers + datapipe = info.dataset + if not isinstance(datapipe, (IterDataPipe, MapDataPipe)): + raise AssertionError( + "datapipe must be an instance of IterDataPipe or MapDataPipe" + ) + # To distribute elements across distributed process evenly, we should shard data on distributed + # processes first then shard on worker processes + total_workers *= world_size + global_worker_id = global_worker_id * world_size + rank_id + # For BC, use default SHARDING_PRIORITIES + torch.utils.data.graph_settings.apply_sharding( + datapipe, total_workers, global_worker_id + ) + if worker_init_fn is not None: + worker_init_fn(worker_id) + + +def _share_dist_seed(generator, pg): + _shared_seed = torch.empty((), dtype=torch.int64).random_(generator=generator) + if isinstance(pg, dist.ProcessGroup): + dist.broadcast(_shared_seed, src=0, group=pg) + return _shared_seed.item() + + +class DataLoader(Generic[_T_co]): + r""" + Data loader combines a dataset and a sampler, and provides an iterable over the given dataset. + + The :class:`~torch.utils.data.DataLoader` supports both map-style and + iterable-style datasets with single- or multi-process loading, customizing + loading order and optional automatic batching (collation) and memory pinning. + + See :py:mod:`torch.utils.data` documentation page for more details. + + Args: + dataset (Dataset): dataset from which to load the data. + batch_size (int, optional): how many samples per batch to load + (default: ``1``). + shuffle (bool, optional): set to ``True`` to have the data reshuffled + at every epoch (default: ``False``). + sampler (Sampler or Iterable, optional): defines the strategy to draw + samples from the dataset. Can be any ``Iterable`` with ``__len__`` + implemented. If specified, :attr:`shuffle` must not be specified. + batch_sampler (Sampler or Iterable, optional): like :attr:`sampler`, but + returns a batch of indices at a time. Mutually exclusive with + :attr:`batch_size`, :attr:`shuffle`, :attr:`sampler`, + and :attr:`drop_last`. + num_workers (int, optional): how many subprocesses to use for data + loading. ``0`` means that the data will be loaded in the main process. + (default: ``0``) + collate_fn (Callable, optional): merges a list of samples to form a + mini-batch of Tensor(s). Used when using batched loading from a + map-style dataset. + pin_memory (bool, optional): If ``True``, the data loader will copy Tensors + into device/CUDA pinned memory before returning them. If your data elements + are a custom type, or your :attr:`collate_fn` returns a batch that is a custom type, + see the example below. + drop_last (bool, optional): set to ``True`` to drop the last incomplete batch, + if the dataset size is not divisible by the batch size. If ``False`` and + the size of dataset is not divisible by the batch size, then the last batch + will be smaller. (default: ``False``) + timeout (numeric, optional): if positive, the timeout value for collecting a batch + from workers. Should always be non-negative. (default: ``0``) + worker_init_fn (Callable, optional): If not ``None``, this will be called on each + worker subprocess with the worker id (an int in ``[0, num_workers - 1]``) as + input, after seeding and before data loading. (default: ``None``) + multiprocessing_context (str or multiprocessing.context.BaseContext, optional): If + ``None``, the default + `multiprocessing context `_ # noqa: D401 + of your operating system will + be used. (default: ``None``) + generator (torch.Generator, optional): If not ``None``, this RNG will be used + by RandomSampler to generate random indexes and multiprocessing to generate + ``base_seed`` for workers. (default: ``None``) + prefetch_factor (int, optional, keyword-only arg): Number of batches loaded + in advance by each worker. ``2`` means there will be a total of + 2 * num_workers batches prefetched across all workers. (default value depends + on the set value for num_workers. If value of num_workers=0 default is ``None``. + Otherwise, if value of ``num_workers > 0`` default is ``2``). + persistent_workers (bool, optional): If ``True``, the data loader will not shut down + the worker processes after a dataset has been consumed once. This allows to + maintain the workers `Dataset` instances alive. (default: ``False``) + pin_memory_device (str, optional): Deprecated, the current :ref:`accelerator` + will be used as the device if ``pin_memory=True``. + in_order (bool, optional): If ``False``, the data loader will not enforce that batches + are returned in a first-in, first-out order. Only applies when ``num_workers > 0``. (default: ``True``) + + + .. warning:: If the ``spawn`` start method is used, :attr:`worker_init_fn` + cannot be an unpicklable object, e.g., a lambda function. See + :ref:`multiprocessing-best-practices` on more details related + to multiprocessing in PyTorch. + + .. warning:: ``len(dataloader)`` heuristic is based on the length of the sampler used. + When :attr:`dataset` is an :class:`~torch.utils.data.IterableDataset`, + it instead returns an estimate based on ``len(dataset) / batch_size``, with proper + rounding depending on :attr:`drop_last`, regardless of multi-process loading + configurations. This represents the best guess PyTorch can make because PyTorch + trusts user :attr:`dataset` code in correctly handling multi-process + loading to avoid duplicate data. + + However, if sharding results in multiple workers having incomplete last batches, + this estimate can still be inaccurate, because (1) an otherwise complete batch can + be broken into multiple ones and (2) more than one batch worth of samples can be + dropped when :attr:`drop_last` is set. Unfortunately, PyTorch can not detect such + cases in general. + + See `Dataset Types`_ for more details on these two types of datasets and how + :class:`~torch.utils.data.IterableDataset` interacts with + `Multi-process data loading`_. + + .. warning:: See :ref:`reproducibility`, and :ref:`dataloader-workers-random-seed`, and + :ref:`data-loading-randomness` notes for random seed related questions. + + .. warning:: Setting `in_order` to `False` can harm reproducibility and may lead to a skewed data + distribution being fed to the trainer in cases with imbalanced data. + """ + + dataset: Dataset[_T_co] + batch_size: int | None + num_workers: int + pin_memory: bool + drop_last: bool + timeout: float + sampler: Sampler | Iterable + pin_memory_device: str + prefetch_factor: int | None + _iterator: _BaseDataLoaderIter | None + __initialized = False + + def __init__( + self, + dataset: Dataset[_T_co], + batch_size: int | None = 1, + shuffle: bool | None = None, + sampler: Sampler | Iterable | None = None, + batch_sampler: Sampler[list] | Iterable[list] | None = None, + num_workers: int = 0, + collate_fn: _collate_fn_t | None = None, + pin_memory: bool = False, + drop_last: bool = False, + timeout: float = 0, + worker_init_fn: _worker_init_fn_t | None = None, + multiprocessing_context=None, + generator=None, + *, + prefetch_factor: int | None = None, + persistent_workers: bool = False, + pin_memory_device: str = "", + in_order: bool = True, + ) -> None: + torch._C._log_api_usage_once("python.data_loader") + + if num_workers < 0: + raise ValueError( + "num_workers option should be non-negative; " + "use num_workers=0 to disable multiprocessing." + ) + + if timeout < 0: + raise ValueError("timeout option should be non-negative") + + if num_workers == 0 and prefetch_factor is not None: + raise ValueError( + "prefetch_factor option could only be specified in multiprocessing." + "let num_workers > 0 to enable multiprocessing, otherwise set prefetch_factor to None." + ) + elif num_workers > 0 and prefetch_factor is None: + prefetch_factor = 2 + elif prefetch_factor is not None and prefetch_factor < 0: + raise ValueError("prefetch_factor option should be non-negative") + + if persistent_workers and num_workers == 0: + raise ValueError("persistent_workers option needs num_workers > 0") + + self.dataset = dataset + self.num_workers = num_workers + self.prefetch_factor = prefetch_factor + self.pin_memory = pin_memory + self.pin_memory_device = pin_memory_device + self.timeout = timeout + self.worker_init_fn = worker_init_fn + self.multiprocessing_context = multiprocessing_context + self.in_order = in_order + + # Adds forward compatibilities so classic DataLoader can work with DataPipes: + # _DataPipeSerializationWrapper container makes it easier to serialize without redefining pickler + if isinstance(self.dataset, IterDataPipe): + self.dataset = _IterDataPipeSerializationWrapper(self.dataset) + elif isinstance(self.dataset, MapDataPipe): + self.dataset = _MapDataPipeSerializationWrapper(self.dataset) + + # Arg-check dataset related before checking samplers because we want to + # tell users that iterable-style datasets are incompatible with custom + # samplers first, so that they don't learn that this combo doesn't work + # after spending time fixing the custom sampler errors. + if isinstance(dataset, IterableDataset): + self._dataset_kind = _DatasetKind.Iterable + # NOTE [ Custom Samplers and IterableDataset ] + # + # `IterableDataset` does not support custom `batch_sampler` or + # `sampler` since the key is irrelevant (unless we support + # generator-style dataset one day...). + # + # For `sampler`, we always create a dummy sampler. This is an + # infinite sampler even when the dataset may have an implemented + # finite `__len__` because in multi-process data loading, naive + # settings will return duplicated data (which may be desired), and + # thus using a sampler with length matching that of dataset will + # cause data lost (you may have duplicates of the first couple + # batches, but never see anything afterwards). Therefore, + # `Iterabledataset` always uses an infinite sampler, an instance of + # `_InfiniteConstantSampler` defined above. + # + # A custom `batch_sampler` essentially only controls the batch size. + # However, it is unclear how useful it would be since an iterable-style + # dataset can handle that within itself. Moreover, it is pointless + # in multi-process data loading as the assignment order of batches + # to workers is an implementation detail so users can not control + # how to batchify each worker's iterable. Thus, we disable this + # option. If this turns out to be useful in future, we can re-enable + # this, and support custom samplers that specify the assignments to + # specific workers. + if isinstance(dataset, IterDataPipe): + if shuffle is not None: + dataset = torch.utils.data.graph_settings.apply_shuffle_settings( + dataset, shuffle=shuffle + ) + # We cannot check `shuffle is not None` here, since previously `shuffle=False` was the default. + elif shuffle not in {False, None}: + raise ValueError( + f"DataLoader with IterableDataset: expected unspecified shuffle option, but got shuffle={shuffle}" + ) + + if sampler is not None: + # See NOTE [ Custom Samplers and IterableDataset ] + raise ValueError( + f"DataLoader with IterableDataset: expected unspecified sampler option, but got sampler={sampler}" + ) + elif batch_sampler is not None: + # See NOTE [ Custom Samplers and IterableDataset ] + raise ValueError( + "DataLoader with IterableDataset: expected unspecified " + f"batch_sampler option, but got batch_sampler={batch_sampler}" + ) + else: + shuffle = bool(shuffle) + self._dataset_kind = _DatasetKind.Map + + if sampler is not None and shuffle: + raise ValueError("sampler option is mutually exclusive with shuffle") + + if batch_sampler is not None: + # auto_collation with custom batch_sampler + if batch_size != 1 or shuffle or sampler is not None or drop_last: + raise ValueError( + "batch_sampler option is mutually exclusive " + "with batch_size, shuffle, sampler, and " + "drop_last" + ) + batch_size = None + drop_last = False + elif batch_size is None: + # no auto_collation + if drop_last: + raise ValueError( + "batch_size=None option disables auto-batching " + "and is mutually exclusive with drop_last" + ) + + if sampler is None: # give default samplers + if self._dataset_kind == _DatasetKind.Iterable: + # See NOTE [ Custom Samplers and IterableDataset ] + sampler = _InfiniteConstantSampler() + else: # map-style + if shuffle: + sampler = RandomSampler(dataset, generator=generator) # type: ignore[arg-type] + else: + sampler = SequentialSampler(dataset) # type: ignore[arg-type] + + if batch_size is not None and batch_sampler is None: + # auto_collation without custom batch_sampler + batch_sampler = BatchSampler(sampler, batch_size, drop_last) + + self.batch_size = batch_size + self.drop_last = drop_last + self.sampler = sampler + self.batch_sampler = batch_sampler + self.generator = generator + + if collate_fn is None: + if self._auto_collation: + collate_fn = _utils.collate.default_collate + else: + collate_fn = _utils.collate.default_convert + + self.collate_fn = collate_fn + self.persistent_workers = persistent_workers + + self.__initialized = True + self._IterableDataset_len_called = ( + None # See NOTE [ IterableDataset and __len__ ] + ) + + self._iterator = None + + self.check_worker_number_rationality() + + torch.set_vital("Dataloader", "enabled", "True") # type: ignore[attr-defined] + + def _get_iterator(self) -> _BaseDataLoaderIter: + if self.num_workers == 0: + return _SingleProcessDataLoaderIter(self) + else: + self.check_worker_number_rationality() + return _MultiProcessingDataLoaderIter(self) + + @property + def multiprocessing_context(self): + return self.__multiprocessing_context + + @multiprocessing_context.setter + def multiprocessing_context(self, multiprocessing_context) -> None: + if multiprocessing_context is not None: + if self.num_workers > 0: + if isinstance(multiprocessing_context, str): + valid_start_methods = torch.multiprocessing.get_all_start_methods() + if multiprocessing_context not in valid_start_methods: + raise ValueError( + "multiprocessing_context option " + f"should specify a valid start method in {valid_start_methods!r}, but got " + f"multiprocessing_context={multiprocessing_context!r}" + ) + multiprocessing_context = torch.multiprocessing.get_context( + multiprocessing_context + ) + + if not isinstance( + multiprocessing_context, python_multiprocessing.context.BaseContext + ): + raise TypeError( + "multiprocessing_context option should be a valid context " + "object or a string specifying the start method, but got " + f"multiprocessing_context={multiprocessing_context}" + ) + else: + raise ValueError( + "multiprocessing_context can only be used with " + "multi-process loading (num_workers > 0), but got " + f"num_workers={self.num_workers}" + ) + + self.__multiprocessing_context = multiprocessing_context + + def __setattr__(self, attr, val) -> None: + if self.__initialized and attr in ( + "batch_size", + "batch_sampler", + "sampler", + "drop_last", + "dataset", + "persistent_workers", + ): + raise ValueError( + f"{attr} attribute should not be set after {self.__class__.__name__} is initialized" + ) + + super().__setattr__(attr, val) + + def __iter__(self) -> _BaseDataLoaderIter: + # When using a single worker the returned iterator should be + # created every time to avoid resetting its state + # However, in the case of a multiple workers iterator + # the iterator is only created once in the lifetime of the + # DataLoader object so that workers can be reused + if self.persistent_workers and self.num_workers > 0: + if self._iterator is None: + self._iterator = self._get_iterator() + else: + self._iterator._reset(self) + return self._iterator + else: + return self._get_iterator() + + @property + def _auto_collation(self): + return self.batch_sampler is not None + + @property + def _index_sampler(self): + # The actual sampler used for generating indices for `_DatasetFetcher` + # (see _utils/fetch.py) to read data at each time. This would be + # `.batch_sampler` if in auto-collation mode, and `.sampler` otherwise. + # We can't change `.sampler` and `.batch_sampler` attributes for BC + # reasons. + if self._auto_collation: + return self.batch_sampler + else: + return self.sampler + + def __len__(self) -> int: + if self._dataset_kind == _DatasetKind.Iterable: + # NOTE [ IterableDataset and __len__ ] + # + # For `IterableDataset`, `__len__` could be inaccurate when one naively + # does multi-processing data loading, since the samples will be duplicated. + # However, no real use case should be actually using that behavior, so + # it should count as a user error. We should generally trust user + # code to do the proper thing (e.g., configure each replica differently + # in `__iter__`), and give us the correct `__len__` if they choose to + # implement it (this will still throw if the dataset does not implement + # a `__len__`). + # + # To provide a further warning, we track if `__len__` was called on the + # `DataLoader`, save the returned value in `self._len_called`, and warn + # if the iterator ends up yielding more than this number of samples. + + # Cannot statically verify that dataset is Sized + length = self._IterableDataset_len_called = len(self.dataset) # type: ignore[assignment, arg-type] + if ( + self.batch_size is not None + ): # IterableDataset doesn't allow custom sampler or batch_sampler + from math import ceil + + if self.drop_last: + length = length // self.batch_size + else: + length = ceil(length / self.batch_size) + return length + else: + return len(self._index_sampler) + + def check_worker_number_rationality(self) -> None: + # This function check whether the dataloader's worker number is rational based on + # current system's resource. Current rule is that if the number of workers this + # Dataloader will create is bigger than the number of logical cpus that is allowed to + # use, than we will pop up a warning to let user pay attention. + # + # eg. If current system has 2 physical CPUs with 16 cores each. And each core support 2 + # threads, then the total logical cpus here is 2 * 16 * 2 = 64. Let's say current + # DataLoader process can use half of them which is 32, then the rational max number of + # worker that initiated from this process is 32. + # Now, let's say the created DataLoader has num_works = 40, which is bigger than 32. + # So the warning message is triggered to notify the user to lower the worker number if + # necessary. + # + # + # [Note] Please note that this function respects `cpuset` only when os.sched_getaffinity is + # available (available in most of Linux system, but not OSX and Windows). + # When os.sched_getaffinity is not available, os.cpu_count() is called instead, but + # it doesn't respect cpuset. + # We don't take threading into account since each worker process is single threaded + # at this time. + # + # We don't set any threading flags (eg. OMP_NUM_THREADS, MKL_NUM_THREADS, etc) + # other than `torch.set_num_threads` to 1 in the worker process, if the passing + # in functions use 3rd party modules that rely on those threading flags to determine + # how many thread to create (eg. numpy, etc), then it is caller's responsibility to + # set those flags correctly. + def _create_warning_msg(num_worker_suggest, num_worker_created, cpuset_checked): + suggested_max_worker_msg = ( + ( + ( + "Our suggested max number of worker in current system is {}{}, which is smaller " + "than what this DataLoader is going to create." + ).format( + num_worker_suggest, + ( + "" + if cpuset_checked + else " (`cpuset` is not taken into account)" + ), + ) + ) + if num_worker_suggest is not None + else ( + "DataLoader is not able to compute a suggested max number of worker in current system." + ) + ) + + warn_msg = ( + f"This DataLoader will create {num_worker_created} worker processes in total. {suggested_max_worker_msg} " + "Please be aware that excessive worker creation might get DataLoader running slow or even freeze, " + "lower the worker number to avoid potential slowness/freeze if necessary." + ) + return warn_msg + + if not self.num_workers or self.num_workers == 0: + return + + # try to compute a suggested max number of worker based on system's resource + max_num_worker_suggest = None + cpuset_checked = False + if hasattr(os, "sched_getaffinity"): + try: + max_num_worker_suggest = len(os.sched_getaffinity(0)) + cpuset_checked = True + except Exception: + pass + if max_num_worker_suggest is None: + # os.cpu_count() could return Optional[int] + # get cpu count first and check None in order to satisfy mypy check + cpu_count = os.cpu_count() + if cpu_count is not None: + max_num_worker_suggest = cpu_count + + if max_num_worker_suggest is None: + warnings.warn( + _create_warning_msg( + max_num_worker_suggest, self.num_workers, cpuset_checked + ), + stacklevel=2, + ) + return + + if self.num_workers > max_num_worker_suggest: + warnings.warn( + _create_warning_msg( + max_num_worker_suggest, self.num_workers, cpuset_checked + ), + stacklevel=2, + ) + + +class _BaseDataLoaderIter: + def __init__(self, loader: DataLoader) -> None: + self._dataset = loader.dataset + self._shared_seed = None + self._pg = None + if isinstance(self._dataset, IterDataPipe): + if dist.is_available() and dist.is_initialized(): + self._pg = dist.new_group(backend="gloo") + self._shared_seed = _share_dist_seed(loader.generator, self._pg) + shared_rng = torch.Generator() + shared_rng.manual_seed(self._shared_seed) + self._dataset = torch.utils.data.graph_settings.apply_random_seed( + self._dataset, shared_rng + ) + self._dataset_kind = loader._dataset_kind + self._IterableDataset_len_called = loader._IterableDataset_len_called + self._auto_collation = loader._auto_collation + self._drop_last = loader.drop_last + self._index_sampler = loader._index_sampler + self._num_workers = loader.num_workers + ws, rank = _get_distributed_settings() + self._world_size = ws + self._rank = rank + + if loader.pin_memory and loader.pin_memory_device: + warnings.warn( + "pin_memory_device is deprecated, the current accelerator will be used as the device," + f"ignore pin_memory_device='{loader.pin_memory_device}'.", + stacklevel=2, + ) + if loader.pin_memory and not torch.accelerator.is_available(): + warn_msg = ( + "'pin_memory' argument is set as true but no accelerator is found, " + "then device pinned memory won't be used." + ) + warnings.warn(warn_msg, stacklevel=2) + + # Enabling pin_memory in _BaseDataLoaderIter to support identical + # behavior in forked implementations using _BaseDataLoaderIter. + self._pin_memory = loader.pin_memory and torch.accelerator.is_available() + + # Set pin memory device based on the current accelerator. + self._pin_memory_device = ( + acc.type + if self._pin_memory + and (acc := torch.accelerator.current_accelerator()) is not None + else None + ) + + # Currently, pin_memory would raise error on the MPS backend (see + # https://github.com/pytorch/pytorch/issues/86060), so forcibly + # disable pin_memory on MPS. Remove this restriction once pinned + # memory allocation for MPS is fixed. + if self._pin_memory_device == "mps": + self._pin_memory = False + warn_msg = ( + "'pin_memory' argument is set as true but not supported on MPS now, " + "device pinned memory won't be used." + ) + warnings.warn(warn_msg, stacklevel=2) + + self._timeout = loader.timeout + self._collate_fn = loader.collate_fn + self._sampler_iter = iter(self._index_sampler) + self._base_seed = ( + torch.empty((), dtype=torch.int64) + .random_(generator=loader.generator) + .item() + ) + self._persistent_workers = loader.persistent_workers + self._num_yielded = 0 + self._profile_name = f"enumerate(DataLoader)#{self.__class__.__name__}.__next__" + + def __iter__(self) -> Self: + return self + + def _reset(self, loader, first_iter=False) -> None: + self._sampler_iter = iter(self._index_sampler) + self._num_yielded = 0 + self._IterableDataset_len_called = loader._IterableDataset_len_called + if isinstance(self._dataset, IterDataPipe): + self._shared_seed = _share_dist_seed(loader.generator, self._pg) + shared_rng = torch.Generator() + shared_rng.manual_seed(self._shared_seed) + self._dataset = torch.utils.data.graph_settings.apply_random_seed( + self._dataset, shared_rng + ) + + def _next_index(self): + return next(self._sampler_iter) # may raise StopIteration + + def _next_data(self) -> NoReturn: + raise NotImplementedError + + def __next__(self) -> Any: + with torch.autograd.profiler.record_function(self._profile_name): + if self._sampler_iter is None: + # TODO(https://github.com/pytorch/pytorch/issues/76750) + self._reset() # type: ignore[call-arg] + data = self._next_data() + self._num_yielded += 1 + if ( + self._dataset_kind == _DatasetKind.Iterable + and self._IterableDataset_len_called is not None + and self._num_yielded > self._IterableDataset_len_called + ): + warn_msg = ( + f"Length of IterableDataset {self._dataset} was reported to be {self._IterableDataset_len_called}" + f"(when accessing len(dataloader)), but {self._num_yielded} samples have been fetched. " + ) + if self._num_workers > 0: + warn_msg += ( + "For multiprocessing data-loading, this could be caused by not properly configuring the " + "IterableDataset replica at each worker. Please see " + "https://pytorch.org/docs/stable/data.html#torch.utils.data.IterableDataset for examples." + ) + warnings.warn(warn_msg, stacklevel=2) + return data + + def __len__(self) -> int: + return len(self._index_sampler) + + def __getstate__(self): + # TODO: add limited pickling support for sharing an iterator + # across multiple threads for HOGWILD. + # Probably the best way to do this is by moving the sample pushing + # to a separate thread and then just sharing the data queue + # but signalling the end is tricky without a non-blocking API + raise NotImplementedError("{} cannot be pickled", self.__class__.__name__) + + +class _SingleProcessDataLoaderIter(_BaseDataLoaderIter): + def __init__(self, loader) -> None: + super().__init__(loader) + if self._timeout != 0: + raise AssertionError("_SingleProcessDataLoaderIter requires timeout == 0") + if self._num_workers != 0: + raise AssertionError( + "_SingleProcessDataLoaderIter requires num_workers == 0" + ) + + # Adds forward compatibilities so classic DataLoader can work with DataPipes: + # Taking care of distributed sharding + if isinstance(self._dataset, (IterDataPipe, MapDataPipe)): + # For BC, use default SHARDING_PRIORITIES + torch.utils.data.graph_settings.apply_sharding( + self._dataset, self._world_size, self._rank + ) + + self._dataset_fetcher = _DatasetKind.create_fetcher( + self._dataset_kind, + self._dataset, + self._auto_collation, + self._collate_fn, + self._drop_last, + ) + + def _next_data(self): + index = self._next_index() # may raise StopIteration + data = self._dataset_fetcher.fetch(index) # may raise StopIteration + if self._pin_memory: + data = _utils.pin_memory.pin_memory(data, self._pin_memory_device) + return data + + +class _MultiProcessingDataLoaderIter(_BaseDataLoaderIter): + r"""Iterates once over the DataLoader's dataset, as specified by the sampler.""" + + # NOTE [ Data Loader Multiprocessing Shutdown Logic ] + # + # Preliminary: + # + # Our data model looks like this (queues are indicated with curly brackets): + # + # main process || + # | || + # {index_queue} || + # | || + # worker processes || DATA + # | || + # {worker_result_queue} || FLOW + # | || + # pin_memory_thread of main process || DIRECTION + # | || + # {data_queue} || + # | || + # data output \/ + # + # P.S. `worker_result_queue` and `pin_memory_thread` part may be omitted if + # `pin_memory=False`. + # + # + # Terminating multiprocessing logic requires very careful design. In + # particular, we need to make sure that + # + # 1. The iterator gracefully exits the workers when its last reference is + # gone or it is depleted. + # + # In this case, the workers should be gracefully exited because the + # main process may still need to continue to run, and we want cleaning + # up code in the workers to be executed (e.g., releasing GPU memory). + # Naturally, we implement the shutdown logic in `__del__` of + # DataLoaderIterator. + # + # We delay the discussion on the logic in this case until later. + # + # 2. The iterator exits the workers when the loader process and/or worker + # processes exits normally or with error. + # + # We set all workers and `pin_memory_thread` to have `daemon=True`. + # + # You may ask, why can't we make the workers non-daemonic, and + # gracefully exit using the same logic as we have in `__del__` when the + # iterator gets deleted (see 1 above)? + # + # First of all, `__del__` is **not** guaranteed to be called when + # interpreter exits. Even if it is called, by the time it executes, + # many Python core library resources may already be freed, and even + # simple things like acquiring an internal lock of a queue may hang. + # Therefore, in this case, we actually need to prevent `__del__` from + # being executed, and rely on the automatic termination of daemonic + # children. + # + # Thus, we register an `atexit` hook that sets a global flag + # `_utils.python_exit_status`. Since `atexit` hooks are executed in the + # reverse order of registration, we are guaranteed that this flag is + # set before library resources we use are freed (which, at least in + # CPython, is done via an `atexit` handler defined in + # `multiprocessing/util.py` + # https://github.com/python/cpython/blob/c606624af8d4cb3b4a052fb263bb983b3f87585b/Lib/multiprocessing/util.py#L320-L362 + # registered when an object requiring this mechanism is first + # created, e.g., `mp.Queue` + # https://github.com/python/cpython/blob/c606624af8d4cb3b4a052fb263bb983b3f87585b/Lib/multiprocessing/context.py#L100-L103 + # https://github.com/python/cpython/blob/c606624af8d4cb3b4a052fb263bb983b3f87585b/Lib/multiprocessing/queues.py#L29 + # ) + # + # So in `__del__`, we check if `_utils.python_exit_status` is set or + # `None` (freed), and perform no-op if so. + # + # However, simply letting library clean-up codes run can also be bad, + # because such codes (i.e., `multiprocessing.util._exit_function()`) + # include join putting threads for `mp.Queue`, which can be blocking. + # Hence, the main process putting threads are called with + # `cancel_join_thread` at creation. See later section + # [ 3b. A process won't hang when putting into a queue; ] + # for more details. + # + # Here are two example cases where library clean-up codes can run + # before `__del__` is called: + # + # 1. If we hold onto a reference to the iterator, it more often + # than not tries to do `multiprocessing` library cleaning before + # clearing the alive referenced objects (https://github.com/pytorch/pytorch/issues/48666) + # and thus prevents our cleaning-up code to run first. + # + # 2. A similar issue araises when a `DataLoader` is used in a subprocess. + # When a process ends, it shuts the all its daemonic children + # down with a SIGTERM (instead of joining them without a timeout). + # Similarly for threads, but by a different mechanism. This fact, + # together with a few implementation details of multiprocessing, forces + # us to make workers daemonic. All of our problems arise when a + # DataLoader is used in a subprocess, and are caused by multiprocessing + # code which looks more or less like this: + # + # try: + # your_function_using_a_dataloader() + # finally: + # multiprocessing.util._exit_function() + # + # The joining/termination mentioned above happens inside + # `_exit_function()`. Now, if `your_function_using_a_dataloader()` + # throws, the stack trace stored in the exception will prevent the + # frame which uses `DataLoaderIter` to be freed. If the frame has any + # reference to the `DataLoaderIter` (e.g., in a method of the iter), + # its `__del__`, which starts the shutdown procedure, will not be + # called. That, in turn, means that workers aren't notified. Attempting + # to join in `_exit_function` will then result in a hang. + # + # For context, `_exit_function` is also registered as an `atexit` call. + # So it is unclear to me (@ssnl) why this is needed in a finally block. + # The code dates back to 2008 and there is no comment on the original + # PEP 371 or patch https://bugs.python.org/issue3050 (containing both + # the finally block and the `atexit` registration) that explains this. + # + # + # Finally, another choice is to just shutdown workers with logic in 1 + # above whenever we see an error in `next`. This isn't ideal because + # a. It prevents users from using try-catch to resume data loading. + # b. It doesn't prevent hanging if users have references to the + # iterator. + # + # 3. All processes exit if any of them die unexpectedly by fatal signals. + # + # As shown above, the workers are set as daemonic children of the main + # process. However, automatic cleaning-up of such child processes only + # happens if the parent process exits gracefully (e.g., not via fatal + # signals like SIGKILL). So we must ensure that each process will exit + # even the process that should send/receive data to/from it were + # killed, i.e., + # + # a. A process won't hang when getting from a queue. + # + # Even with carefully designed data dependencies (i.e., a `put()` + # always corresponding to a `get()`), hanging on `get()` can still + # happen when data in queue is corrupted (e.g., due to + # `cancel_join_thread` or unexpected exit). + # + # For child exit, we set a timeout whenever we try to get data + # from `data_queue`, and check the workers' status on each timeout + # and error. + # See `_DataLoaderiter._get_batch()` and + # `_DataLoaderiter._try_get_data()` for details. + # + # Additionally, for child exit on non-Windows platforms, we also + # register a SIGCHLD handler (which is supported on Windows) on + # the main process, which checks if any of the workers fail in the + # (Python) handler. This is more efficient and faster in detecting + # worker failures, compared to only using the above mechanism. + # See `DataLoader.cpp` and `_utils/signal_handling.py` for details. + # + # For `.get()` calls where the sender(s) is not the workers, we + # guard them with timeouts, and check the status of the sender + # when timeout happens: + # + in the workers, the `_utils.worker.ManagerWatchdog` class + # checks the status of the main process. + # + if `pin_memory=True`, when getting from `pin_memory_thread`, + # check `pin_memory_thread` status periodically until `.get()` + # returns or see that `pin_memory_thread` died. + # + # b. A process won't hang when putting into a queue; + # + # We use `mp.Queue` which has a separate background thread to put + # objects from an unbounded buffer array. The background thread is + # daemonic and usually automatically joined when the process + # *exits*. + # + # In case that the receiver has ended abruptly while + # reading from the pipe, the join will hang forever. The usual + # solution for this in Python is calling `q.cancel_join_thread`, + # which prevents automatically joining it when finalizing + # (exiting). + # + # Nonetheless, `cancel_join_thread` must only be called when the + # queue is **not** going to be read from or write into by another + # process, because it may hold onto a lock or leave corrupted data + # in the queue, leading other readers/writers to hang. + # + # Hence, + # + For worker processes, we only do so (for their output + # queues, i.e., `worker_result_queue`) before exiting. + # + For `pin_memory_thread`, its output queue `data_queue` is a + # `queue.Queue` that does blocking `put` if the queue is full. + # So there is no above problem, but as a result, in + # `_pin_memory_loop`, we do need to wrap the `put` in a loop + # that breaks not only upon success, but also when the main + # process stops reading, i.e., is shutting down. + # + For loader process, we `cancel_join_thread()` for all + # `_index_queues` because the whole purpose of workers and + # `pin_memory_thread` is to serve the loader process. If + # loader process is already exiting, we don't really care if + # the queues are corrupted. + # + # + # Now let's get back to 1: + # how we gracefully exit the workers when the last reference to the + # iterator is gone. + # + # To achieve this, we implement the following logic along with the design + # choices mentioned above: + # + # `workers_done_event`: + # A `multiprocessing.Event` shared among the main process and all worker + # processes. This is used to signal the workers that the iterator is + # shutting down. After it is set, they will not send processed data to + # queues anymore, and only wait for the final `None` before exiting. + # `done_event` isn't strictly needed. I.e., we can just check for `None` + # from the input queue, but it allows us to skip wasting resources + # processing data if we are already shutting down. + # + # `pin_memory_thread_done_event`: + # A `threading.Event` for a similar purpose to that of + # `workers_done_event`, but is for the `pin_memory_thread`. The reason + # that separate events are needed is that `pin_memory_thread` reads from + # the output queue of the workers. But the workers, upon seeing that + # `workers_done_event` is set, only wants to see the final `None`, and is + # not required to flush all data in the output queue (e.g., it may call + # `cancel_join_thread` on that queue if its `IterableDataset` iterator + # happens to exhaust coincidentally, which is out of the control of the + # main process). Thus, since we will exit `pin_memory_thread` before the + # workers (see below), two separate events are used. + # + # NOTE: In short, the protocol is that the main process will set these + # `done_event`s and then the corresponding processes/threads a `None`, + # and that they may exit at any time after receiving the `None`. + # + # NOTE: Using `None` as the final signal is valid, since normal data will + # always be a 2-tuple with the 1st element being the index of the data + # transferred (different from dataset index/key), and the 2nd being + # either the dataset key or the data sample (depending on which part + # of the data model the queue is at). + # + # [ worker processes ] + # While loader process is alive: + # Get from `index_queue`. + # If get anything else, + # Check `workers_done_event`. + # If set, continue to next iteration + # i.e., keep getting until see the `None`, then exit. + # Otherwise, process data: + # If is fetching from an `IterableDataset` and the iterator + # is exhausted, send an `_IterableDatasetStopIteration` + # object to signal iteration end. The main process, upon + # receiving such an object, will send `None` to this + # worker and not use the corresponding `index_queue` + # anymore. + # If timed out, + # No matter `workers_done_event` is set (still need to see `None`) + # or not, must continue to next iteration. + # (outside loop) + # If `workers_done_event` is set, (this can be False with `IterableDataset`) + # `data_queue.cancel_join_thread()`. (Everything is ending here: + # main process won't read from it; + # other workers will also call + # `cancel_join_thread`.) + # + # [ pin_memory_thread ] + # # No need to check main thread. If this thread is alive, the main loader + # # thread must be alive, because this thread is set as daemonic. + # While `pin_memory_thread_done_event` is not set: + # Get from `worker_result_queue`. + # If timed out, continue to get in the next iteration. + # Otherwise, process data. + # While `pin_memory_thread_done_event` is not set: + # Put processed data to `data_queue` (a `queue.Queue` with blocking put) + # If timed out, continue to put in the next iteration. + # Otherwise, break, i.e., continuing to the out loop. + # + # NOTE: we don't check the status of the main thread because + # 1. if the process is killed by fatal signal, `pin_memory_thread` + # ends. + # 2. in other cases, either the cleaning-up in __del__ or the + # automatic exit of daemonic thread will take care of it. + # This won't busy-wait either because `.get(timeout)` does not + # busy-wait. + # + # [ main process ] + # In the DataLoader Iter's `__del__` + # b. Exit `pin_memory_thread` + # i. Set `pin_memory_thread_done_event`. + # ii Put `None` in `worker_result_queue`. + # iii. Join the `pin_memory_thread`. + # iv. `worker_result_queue.cancel_join_thread()`. + # + # c. Exit the workers. + # i. Set `workers_done_event`. + # ii. Put `None` in each worker's `index_queue`. + # iii. Join the workers. + # iv. Call `.cancel_join_thread()` on each worker's `index_queue`. + # + # NOTE: (c) is better placed after (b) because it may leave corrupted + # data in `worker_result_queue`, which `pin_memory_thread` + # reads from, in which case the `pin_memory_thread` can only + # happen at timing out, which is slow. Nonetheless, same thing + # happens if a worker is killed by signal at unfortunate times, + # but in other cases, we are better off having a non-corrupted + # `worker_result_queue` for `pin_memory_thread`. + # + # NOTE: If `pin_memory=False`, there is no `pin_memory_thread` and (b) + # can be omitted + # + # NB: `done_event`s isn't strictly needed. E.g., we can just check for + # `None` from `index_queue`, but it allows us to skip wasting resources + # processing indices already in `index_queue` if we are already shutting + # down. + + def __init__(self, loader) -> None: + super().__init__(loader) + + self._prefetch_factor = loader.prefetch_factor + self._in_order = loader.in_order + + if self._num_workers <= 0: + raise AssertionError( + "num_workers must be greater than 0 for MultiProcessingDataLoaderIter" + ) + if self._prefetch_factor <= 0: + raise AssertionError( + "prefetch_factor must be greater than 0 for MultiProcessingDataLoaderIter" + ) + + if loader.multiprocessing_context is None: + multiprocessing_context = torch.multiprocessing + else: + multiprocessing_context = loader.multiprocessing_context + + self._worker_init_fn = loader.worker_init_fn + + # Adds forward compatibilities so classic DataLoader can work with DataPipes: + # Additional worker init function will take care of sharding in MP and Distributed + if isinstance(self._dataset, (IterDataPipe, MapDataPipe)): + self._worker_init_fn = functools.partial( + _sharding_worker_init_fn, + self._worker_init_fn, + self._world_size, + self._rank, + ) + + # No certainty which module multiprocessing_context is + self._worker_result_queue = multiprocessing_context.Queue() # type: ignore[var-annotated] + self._worker_pids_set = False + self._shutdown = False + self._workers_done_event = multiprocessing_context.Event() + + self._index_queues = [] + self._workers = [] + for i in range(self._num_workers): + # No certainty which module multiprocessing_context is + index_queue = multiprocessing_context.Queue() # type: ignore[var-annotated] + # Need to `cancel_join_thread` here! + # See sections (2) and (3b) above. + index_queue.cancel_join_thread() + w = multiprocessing_context.Process( + target=_utils.worker._worker_loop, + args=( + self._dataset_kind, + self._dataset, + index_queue, + self._worker_result_queue, + self._workers_done_event, + self._auto_collation, + self._collate_fn, + self._drop_last, + self._base_seed, + self._worker_init_fn, + i, + self._num_workers, + self._persistent_workers, + self._shared_seed, + ), + ) + w.daemon = True + # NB: Process.start() actually take some time as it needs to + # start a process and pass the arguments over via a pipe. + # Therefore, we only add a worker to self._workers list after + # it started, so that we do not call .join() if program dies + # before it starts, and __del__ tries to join but will get: + # AssertionError: can only join a started process. + from pickle import PicklingError + + try: + w.start() + except (TypeError, AttributeError, PicklingError): + warnings.warn( + "Got pickle error when attempting to start a worker Process. " + "This might be because the worker Process arguments are not picklable. " + "Python 3.14+ changed the multiprocessing start method in non-Mac POSIX platforms " + "to 'forkserver', which requires the worker Process arguments to be picklable. " + "You can also try multiprocessing.set_start_method('fork').", + stacklevel=2, + ) + raise + self._index_queues.append(index_queue) + self._workers.append(w) + + if self._pin_memory: + self._pin_memory_thread_done_event = threading.Event() + + # Queue is not type-annotated + self._data_queue = queue.Queue() # type: ignore[var-annotated] + current_device_id = torch.accelerator.current_device_index() + pin_memory_thread = threading.Thread( + target=_utils.pin_memory._pin_memory_loop, + args=( + self._worker_result_queue, + self._data_queue, + current_device_id, + self._pin_memory_thread_done_event, + self._pin_memory_device, + ), + ) + pin_memory_thread.daemon = True + pin_memory_thread.start() + # Similar to workers (see comment above), we only register + # pin_memory_thread once it is started. + self._pin_memory_thread = pin_memory_thread + else: + self._data_queue = self._worker_result_queue # type: ignore[assignment] + + # In some rare cases, persistent workers (daemonic processes) + # would be terminated before `__del__` of iterator is invoked + # when main process exits + # It would cause failure when pin_memory_thread tries to read + # corrupted data from worker_result_queue + # atexit is used to shutdown thread and child processes in the + # right sequence before main process exits + if self._persistent_workers and self._pin_memory: + import atexit + + for w in self._workers: + atexit.register(_MultiProcessingDataLoaderIter._clean_up_worker, w) + + # .pid can be None only before process is spawned (not the case, so ignore) + _utils.signal_handling._set_worker_pids( + id(self), + tuple(w.pid for w in self._workers), # type: ignore[misc] + ) + _utils.signal_handling._set_SIGCHLD_handler() + self._worker_pids_set = True + self._reset(loader, first_iter=True) + + def _reset(self, loader, first_iter=False) -> None: + super()._reset(loader, first_iter) + self._send_idx = 0 # idx of the next task to be sent to workers + self._rcvd_idx = 0 # idx of the next task to be returned in __next__ + # information about data not yet yielded, i.e., tasks w/ indices in range [rcvd_idx, send_idx). + # map: task idx => - (worker_id,) if data isn't fetched (outstanding) + # \ (worker_id, data) if data is already fetched (out-of-order) + self._task_info = {} + self._tasks_outstanding = ( + 0 # always equal to count(v for v in task_info.values() if len(v) == 1) + ) + # A list of booleans representing whether each worker still has work to + # do, i.e., not having exhausted its iterable dataset object. It always + # contains all `True`s if not using an iterable-style dataset + # (i.e., if kind != Iterable). + # Not that this indicates that a worker still has work to do *for this epoch*. + # It does not mean that a worker is dead. In case of `_persistent_workers`, + # the worker will be reset to available in the next epoch. + self._workers_status = [True for i in range(self._num_workers)] + # A list of integers representing how many tasks are outstanding for each worker + # Incremented when a task is dispatched to the worker + # Decremented when that data has been given to the main thread + # Each worker should have at most self._prefetch_factor tasks outstanding + self._workers_num_tasks = [0 for i in range(self._num_workers)] + # Reset the worker queue cycle so it resumes next epoch at worker 0 + self._worker_queue_idx_cycle = itertools.cycle(range(self._num_workers)) + # We resume the prefetching in case it was enabled + if not first_iter: + for idx in range(self._num_workers): + self._index_queues[idx].put( + _utils.worker._ResumeIteration(self._shared_seed) + ) + resume_iteration_cnt = self._num_workers + while resume_iteration_cnt > 0: + return_idx, return_data = self._get_data() + if isinstance(return_idx, _utils.worker._ResumeIteration): + if return_data is not None: + raise AssertionError( + "Expected return_data to be None when resuming iteration" + ) + resume_iteration_cnt -= 1 + # prime the prefetch loop + for _ in range(self._prefetch_factor * self._num_workers): + self._try_put_index() + + def _try_get_data(self, timeout=_utils.MP_STATUS_CHECK_INTERVAL): + # Tries to fetch data from `self._data_queue` once for a given timeout. + # This can also be used as inner loop of fetching without timeout, with + # the sender status as the loop condition. + # + # This raises a `RuntimeError` if any worker died expectedly. This error + # can come from either the SIGCHLD handler in `_utils/signal_handling.py` + # (only for non-Windows platforms), or the manual check below on errors + # and timeouts. + # + # Returns a 2-tuple: + # (bool: whether successfully get data, any: data if successful else None) + try: + data = self._data_queue.get(timeout=timeout) + return (True, data) + except Exception as e: + # At timeout and error, we manually check whether any worker has + # failed. Note that this is the only mechanism for Windows to detect + # worker failures. + failed_workers = [] + for worker_id, w in enumerate(self._workers): + if self._workers_status[worker_id] and not w.is_alive(): + failed_workers.append(w) + self._mark_worker_as_unavailable(worker_id) + if len(failed_workers) > 0: + pids_str = ", ".join(str(w.pid) for w in failed_workers) + raise RuntimeError( + f"DataLoader worker (pid(s) {pids_str}) exited unexpectedly" + ) from e + if isinstance(e, queue.Empty): + return (False, None) + + import errno + import tempfile + + try: + # Raise an exception if we are this close to the FDs limit. + # Apparently, trying to open only one file is not a sufficient + # test. + # See NOTE [ DataLoader on Linux and open files limit ] + fds_limit_margin = 10 + with contextlib.ExitStack() as stack: + for _ in range(fds_limit_margin): + stack.enter_context( + tempfile.NamedTemporaryFile() # pyrefly: ignore [bad-argument-type] + ) + except OSError as e: + if e.errno == errno.EMFILE: + raise RuntimeError( + "Too many open files. Communication with the" + " workers is no longer possible. Please increase the" + " limit using `ulimit -n` in the shell or change the" + " sharing strategy by calling" + " `torch.multiprocessing.set_sharing_strategy('file_system')`" + " at the beginning of your code" + ) from None + raise + + # NOTE [ DataLoader on Linux and open files limit ] + # + # On Linux when DataLoader is used with multiprocessing we pass the data between + # the root process and the workers through SHM files. We remove those files from + # the filesystem as soon as they are created and keep them alive by + # passing around their file descriptors through AF_UNIX sockets. (See + # docs/source/multiprocessing.rst and 'Multiprocessing Technical Notes` in + # the wiki (https://github.com/pytorch/pytorch/wiki).) + # + # This sometimes leads us to exceeding the open files limit. When that happens, + # and the offending file descriptor is coming over a socket, the `socket` Python + # package silently strips the file descriptor from the message, setting only the + # `MSG_CTRUNC` flag (which might be a bit misleading since the manpage says that + # it _indicates that some control data were discarded due to lack of space in + # the buffer for ancillary data_). This might reflect the C implementation of + # AF_UNIX sockets. + # + # This behaviour can be reproduced with the script and instructions at the + # bottom of this note. + # + # When that happens, the standard Python `multiprocessing` (and not + # `torch.multiprocessing`) raises a `RuntimeError: received 0 items of ancdata` + # + # Sometimes, instead of the FD being stripped, you may get an `OSError: + # Too many open files`, both in the script below and in DataLoader. However, + # this is rare and seems to be nondeterministic. + # + # + # #!/usr/bin/env python3 + # import sys + # import socket + # import os + # import array + # import shutil + # import socket + # + # + # if len(sys.argv) != 4: + # print("Usage: ", sys.argv[0], " tmp_dirname iteration (send|recv)") + # sys.exit(1) + # + # if __name__ == '__main__': + # dirname = sys.argv[1] + # sock_path = dirname + "/sock" + # iterations = int(sys.argv[2]) + # def dummy_path(i): + # return dirname + "/" + str(i) + ".dummy" + # + # + # if sys.argv[3] == 'send': + # while not os.path.exists(sock_path): + # pass + # client = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM) + # client.connect(sock_path) + # for i in range(iterations): + # fd = os.open(dummy_path(i), os.O_WRONLY | os.O_CREAT) + # ancdata = array.array('i', [fd]) + # msg = bytes([i % 256]) + # print("Sending fd ", fd, " (iteration #", i, ")") + # client.sendmsg([msg], [(socket.SOL_SOCKET, socket.SCM_RIGHTS, ancdata)]) + # + # + # else: + # assert sys.argv[3] == 'recv' + # + # if os.path.exists(dirname): + # raise Exception("Directory exists") + # + # os.mkdir(dirname) + # + # print("Opening socket...") + # server = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM) + # server.bind(sock_path) + # + # print("Listening...") + # for i in range(iterations): + # a = array.array('i') + # msg, ancdata, flags, addr = server.recvmsg(1, socket.CMSG_SPACE(a.itemsize)) + # assert(len(ancdata) == 1) + # cmsg_level, cmsg_type, cmsg_data = ancdata[0] + # a.frombytes(cmsg_data) + # print("Received fd ", a[0], " (iteration #", i, ")") + # + # shutil.rmtree(dirname) + # + # Steps to reproduce: + # + # 1. Run two shells and set lower file descriptor limit in the receiving one: + # (shell1) ulimit -n 1020 + # (shell2) ulimit -n 1022 + # + # 2. Run the script above with the `recv` option in the first shell + # (shell1) ./test_socket.py sock_tmp 1017 recv + # + # 3. Run the script with the `send` option in the second shell: + # (shell2) ./test_socket.py sock_tmp 1017 send + + def _get_data(self): + # Fetches data from `self._data_queue`. + # + # We check workers' status every `MP_STATUS_CHECK_INTERVAL` seconds, + # which we achieve by running `self._try_get_data(timeout=MP_STATUS_CHECK_INTERVAL)` + # in a loop. This is the only mechanism to detect worker failures for + # Windows. For other platforms, a SIGCHLD handler is also used for + # worker failure detection. + # + # If `pin_memory=True`, we also need check if `pin_memory_thread` had + # died at timeouts. + if self._timeout > 0: + success, data = self._try_get_data(self._timeout) + if success: + return data + else: + raise RuntimeError( + f"DataLoader timed out after {self._timeout} seconds" + ) + elif self._pin_memory: + while self._pin_memory_thread.is_alive(): + success, data = self._try_get_data() + if success: + return data + else: + # while condition is false, i.e., pin_memory_thread died. + raise RuntimeError("Pin memory thread exited unexpectedly") + # In this case, `self._data_queue` is a `queue.Queue`,. But we don't + # need to call `.task_done()` because we don't use `.join()`. + else: + while True: + success, data = self._try_get_data() + if success: + return data + + def _next_data(self): + while True: + # If the worker responsible for `self._rcvd_idx` has already ended + # and was unable to fulfill this task (due to exhausting an `IterableDataset`), + # we try to advance `self._rcvd_idx` to find the next valid index. + # + # This part needs to run in the loop because both the `self._get_data()` + # call and `_IterableDatasetStopIteration` check below can mark + # extra worker(s) as dead. + while self._rcvd_idx < self._send_idx: + info = self._task_info.get(self._rcvd_idx, None) + if info: + worker_id = info[0] + if ( + len(info) == 2 or self._workers_status[worker_id] + ): # has data or is still active + break + del self._task_info[self._rcvd_idx] + self._rcvd_idx += 1 + else: + # no valid `self._rcvd_idx` is found (i.e., didn't break) + if not self._persistent_workers: + self._shutdown_workers() + raise StopIteration + + # Now `self._rcvd_idx` is the batch index we want to fetch + + # Check if the next sample has already been generated + if len(self._task_info[self._rcvd_idx]) == 2: + worker_id, data = self._task_info.pop(self._rcvd_idx) + self._rcvd_idx += 1 + return self._process_data(data, worker_id) + + if self._shutdown or self._tasks_outstanding <= 0: + raise AssertionError( + "Invalid iterator state: shutdown or no outstanding tasks when fetching next data" + ) + idx, data = self._get_data() + self._tasks_outstanding -= 1 + if self._dataset_kind == _DatasetKind.Iterable: + # Check for _IterableDatasetStopIteration + if isinstance(data, _utils.worker._IterableDatasetStopIteration): + if self._persistent_workers: + self._workers_status[data.worker_id] = False + else: + self._mark_worker_as_unavailable(data.worker_id) + self._try_put_index() + continue + + if idx != self._rcvd_idx: + if not self._in_order: + # don't store it for later, process now + # delete from self._task_info immediately + # this keeps the object size manageable + worker_id = self._task_info.pop(idx)[0] + return self._process_data(data, worker_id) + # store out-of-order samples + self._task_info[idx] += (data,) + else: + worker_id = self._task_info.pop(idx)[0] + self._rcvd_idx += 1 + return self._process_data(data, worker_id) + + def _try_put_index(self) -> None: + max_tasks = self._prefetch_factor * self._num_workers + if self._tasks_outstanding >= max_tasks: + raise AssertionError( + "Number of outstanding tasks exceeded maximum allowed tasks" + ) + + try: + index = self._next_index() + except StopIteration: + return + for _ in range(self._num_workers): # find the next active worker, if any + worker_queue_idx = next(self._worker_queue_idx_cycle) + if self._workers_status[worker_queue_idx]: + if self._in_order: + break + elif self._workers_num_tasks[worker_queue_idx] < max_tasks // sum( + self._workers_status + ): + # when self._in_order is False, distribute work to a worker if it has capacity + # _workers_status is updated only in this thread, so the sum is guaranteed > 0 + break + else: + # not found (i.e., didn't break) + return + + self._index_queues[worker_queue_idx].put((self._send_idx, index)) # type: ignore[possibly-undefined] + self._task_info[self._send_idx] = (worker_queue_idx,) + self._workers_num_tasks[worker_queue_idx] += 1 + self._tasks_outstanding += 1 + self._send_idx += 1 + + def _process_data(self, data, worker_idx): + self._workers_num_tasks[worker_idx] -= 1 + self._try_put_index() + if isinstance(data, ExceptionWrapper): + data.reraise() + return data + + def _mark_worker_as_unavailable(self, worker_id, shutdown=False) -> None: + # Mark a worker as having finished its work e.g., due to + # exhausting an `IterableDataset`. This should be used only when this + # `_MultiProcessingDataLoaderIter` is going to continue running. + + if ( + not self._workers_status[worker_id] + and not self._persistent_workers + and not shutdown + ): + raise AssertionError( + "Worker status inconsistent when marking worker as unavailable" + ) + + # Signal termination to that specific worker. + q = self._index_queues[worker_id] + # Indicate that no more data will be put on this queue by the current + # process. + q.put(None) + + # Note that we don't actually join the worker here, nor do we remove the + # worker's pid from C side struct because (1) joining may be slow, and + # (2) since we don't join, the worker may still raise error, and we + # prefer capturing those, rather than ignoring them, even though they + # are raised after the worker has finished its job. + # Joining is deferred to `_shutdown_workers`, which it is called when + # all workers finish their jobs (e.g., `IterableDataset` replicas) or + # when this iterator is garbage collected. + + self._workers_status[worker_id] = False + + if self._workers_done_event.is_set() != shutdown: + raise AssertionError( + "_workers_done_event state does not match shutdown flag" + ) + + def _shutdown_workers(self) -> None: + # Called when shutting down this `_MultiProcessingDataLoaderIter`. + # See NOTE [ Data Loader Multiprocessing Shutdown Logic ] for details on + # the logic of this function. + if ( + _utils is None + or _utils.python_exit_status is True + or _utils.python_exit_status is None + ): + # See (2) of the note. If Python is shutting down, do no-op. + return + # Normal exit when last reference is gone / iterator is depleted. + # See (1) and the second half of the note. + if not self._shutdown: + self._shutdown = True + try: + # Normal exit when last reference is gone / iterator is depleted. + # See (1) and the second half of the note. + + # Exit `pin_memory_thread` first because exiting workers may leave + # corrupted data in `worker_result_queue` which `pin_memory_thread` + # reads from. + if hasattr(self, "_pin_memory_thread"): + # Use hasattr in case error happens before we set the attribute. + self._pin_memory_thread_done_event.set() + # Send something to pin_memory_thread in case it is waiting + # so that it can wake up and check `pin_memory_thread_done_event` + self._worker_result_queue.put((None, None)) + self._pin_memory_thread.join() + self._worker_result_queue.cancel_join_thread() + self._worker_result_queue.close() + + # Exit workers now. + self._workers_done_event.set() + for worker_id in range(len(self._workers)): + # Get number of workers from `len(self._workers)` instead of + # `self._num_workers` in case we error before starting all + # workers. + # If we are using workers_status with persistent_workers + # we have to shut it down because the worker is paused + if self._persistent_workers or self._workers_status[worker_id]: + self._mark_worker_as_unavailable(worker_id, shutdown=True) + for w in self._workers: + # We should be able to join here, but in case anything went + # wrong, we set a timeout and if the workers fail to join, + # they are killed in the `finally` block. + w.join(timeout=_utils.MP_STATUS_CHECK_INTERVAL) + for q in self._index_queues: + q.cancel_join_thread() + q.close() + finally: + # Even though all this function does is putting into queues that + # we have called `cancel_join_thread` on, weird things can + # happen when a worker is killed by a signal, e.g., hanging in + # `Event.set()`. So we need to guard this with SIGCHLD handler, + # and remove pids from the C side data structure only at the + # end. + # + # FIXME: Unfortunately, for Windows, we are missing a worker + # error detection mechanism here in this function, as it + # doesn't provide a SIGCHLD handler. + if self._worker_pids_set: + _utils.signal_handling._remove_worker_pids(id(self)) + self._worker_pids_set = False + for w in self._workers: + if w.is_alive(): + # Existing mechanisms try to make the workers exit + # peacefully, but in case that we unfortunately reach + # here, which we shouldn't, (e.g., pytorch/pytorch#39570), + # we kill the worker. + w.terminate() + + # staticmethod is used to remove reference to `_MultiProcessingDataLoaderIter` + @staticmethod + def _clean_up_worker(w) -> None: + try: + w.join(timeout=_utils.MP_STATUS_CHECK_INTERVAL) + finally: + if w.is_alive(): + w.terminate() + + def __del__(self) -> None: + self._shutdown_workers() diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ac93de335b2d7379246de9cee658dd9eafe1d303 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/__init__.py @@ -0,0 +1 @@ +from torch.utils.data.datapipes import dataframe as dataframe, iter as iter, map as map diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/_decorator.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/_decorator.py new file mode 100644 index 0000000000000000000000000000000000000000..0289668c03abcfc0a8e37bc9ff62365fea3dd1cf --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/_decorator.py @@ -0,0 +1,213 @@ +# mypy: allow-untyped-defs +import inspect +from collections.abc import Callable +from functools import wraps +from typing import Any, get_type_hints + +from torch.utils.data.datapipes._typing import _DataPipeMeta +from torch.utils.data.datapipes.datapipe import IterDataPipe, MapDataPipe + + +###################################################### +# Functional API +###################################################### +class functional_datapipe: + name: str + + def __init__(self, name: str, enable_df_api_tracing=False) -> None: + """ + Define a functional datapipe. + + Args: + enable_df_api_tracing - if set, any returned DataPipe would accept + DataFrames API in tracing mode. + """ + self.name = name + self.enable_df_api_tracing = enable_df_api_tracing + + def __call__(self, cls): + if issubclass(cls, IterDataPipe): + if isinstance(cls, type): # type: ignore[arg-type] + if not isinstance(cls, _DataPipeMeta): + raise TypeError( + "`functional_datapipe` can only decorate IterDataPipe" + ) + # with non_deterministic decorator + else: + if not isinstance(cls, non_deterministic) and not ( + hasattr(cls, "__self__") + and isinstance(cls.__self__, non_deterministic) + ): + raise TypeError( + "`functional_datapipe` can only decorate IterDataPipe" + ) + IterDataPipe.register_datapipe_as_function( + self.name, cls, enable_df_api_tracing=self.enable_df_api_tracing + ) + elif issubclass(cls, MapDataPipe): + MapDataPipe.register_datapipe_as_function(self.name, cls) + + return cls + + +###################################################### +# Determinism +###################################################### +_determinism: bool = False + + +class guaranteed_datapipes_determinism: + prev: bool + + def __init__(self) -> None: + global _determinism + self.prev = _determinism + _determinism = True + + def __enter__(self) -> None: + pass + + def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any) -> None: + global _determinism + _determinism = self.prev + + +class non_deterministic: + cls: type[IterDataPipe] | None = None + # TODO: Lambda for picking + deterministic_fn: Callable[..., bool] + + def __init__(self, arg: type[IterDataPipe] | Callable[..., bool]) -> None: + # 1. Decorator doesn't have any argument + if isinstance(arg, type): # type: ignore[arg-type] + if not issubclass(arg, IterDataPipe): # type: ignore[arg-type] + raise TypeError( + "Only `IterDataPipe` can be decorated with `non_deterministic`" + f", but {arg.__name__} is found" + ) + self.cls = arg # type: ignore[assignment] + # 2. Decorator has an argument of a function + # This class should behave differently given different inputs. Use this + # function to verify the determinism for each instance. + # When the function returns True, the instance is non-deterministic. Otherwise, + # the instance is a deterministic DataPipe. + elif isinstance(arg, Callable): # type:ignore[arg-type] + self.deterministic_fn = arg + else: + raise TypeError(f"{arg} can not be decorated by non_deterministic") + + def __call__(self, *args, **kwargs): + global _determinism + # Decorate IterDataPipe + if self.cls is not None: + if _determinism: + raise TypeError( + f"{self.cls.__name__} is non-deterministic, but you set 'guaranteed_datapipes_determinism'. " + "You can turn off determinism for this DataPipe if that is acceptable " + "for your application" + ) + return self.cls(*args, **kwargs) # type: ignore[call-arg] + + # Decorate with a functional argument + if not ( + isinstance(args[0], type) and issubclass(args[0], IterDataPipe) # type: ignore[arg-type] + ): + raise TypeError( + f"Only `IterDataPipe` can be decorated, but {args[0].__name__} is found" + ) + self.cls = args[0] + return self.deterministic_wrapper_fn + + def deterministic_wrapper_fn(self, *args, **kwargs) -> IterDataPipe: + res = self.deterministic_fn(*args, **kwargs) + if not isinstance(res, bool): + raise TypeError( + "deterministic_fn of `non_deterministic` decorator is required " + f"to return a boolean value, but {type(res)} is found" + ) + global _determinism + if _determinism and res: + raise TypeError( + f"{self.cls.__name__} is non-deterministic with the inputs, but you set " # type: ignore[union-attr] + "'guaranteed_datapipes_determinism'. You can turn off determinism " + "for this DataPipe if that is acceptable for your application" + ) + return self.cls(*args, **kwargs) # type: ignore[call-arg, misc] + + +###################################################### +# Type validation +###################################################### +# Validate each argument of DataPipe with hint as a subtype of the hint. +def argument_validation(f): + signature = inspect.signature(f) + hints = get_type_hints(f) + + @wraps(f) + def wrapper(*args, **kwargs): + bound = signature.bind(*args, **kwargs) + for argument_name, value in bound.arguments.items(): + if argument_name in hints and isinstance( + hints[argument_name], _DataPipeMeta + ): + hint = hints[argument_name] + if not isinstance(value, IterDataPipe): + raise TypeError( + f"Expected argument '{argument_name}' as a IterDataPipe, but found {type(value)}" + ) + if not value.type.issubtype(hint.type): + raise TypeError( + f"Expected type of argument '{argument_name}' as a subtype of " + f"hint {hint.type}, but found {value.type}" + ) + + return f(*args, **kwargs) + + return wrapper + + +# Default value is True +_runtime_validation_enabled: bool = True + + +class runtime_validation_disabled: + prev: bool + + def __init__(self) -> None: + global _runtime_validation_enabled + self.prev = _runtime_validation_enabled + _runtime_validation_enabled = False + + def __enter__(self) -> None: + pass + + def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any) -> None: + global _runtime_validation_enabled + _runtime_validation_enabled = self.prev + + +# Runtime checking +# Validate output data is subtype of return hint +def runtime_validation(f): + # TODO: + # Can be extended to validate '__getitem__' and nonblocking + if f.__name__ != "__iter__": + raise TypeError( + f"Can not decorate function {f.__name__} with 'runtime_validation'" + ) + + @wraps(f) + def wrapper(self): + global _runtime_validation_enabled + if not _runtime_validation_enabled: + yield from f(self) + else: + it = f(self) + for d in it: + if not self.type.issubtype_of_instance(d): + raise RuntimeError( + f"Expected an instance as subtype of {self.type}, but found {d}({type(d)})" + ) + yield d + + return wrapper diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/_hook_iterator.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/_hook_iterator.py new file mode 100644 index 0000000000000000000000000000000000000000..26836168047497000de0003b0489b19e832015bb --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/_hook_iterator.py @@ -0,0 +1,279 @@ +# mypy: allow-untyped-defs +import functools +import inspect +from enum import Enum + +import torch + + +class _SnapshotState(Enum): + r""" + These are the snapshotting-related states that IterDataPipes can be in. + + `NotStarted` - allows you to restore a snapshot and create an iterator with reset + `Restored` - cannot restore again, allows you to create an iterator without resetting the DataPipe + `Iterating` - can restore, will reset if you create a new iterator + """ + + NotStarted = 0 + Restored = 1 + Iterating = 2 + + +def _simplify_obj_name(obj) -> str: + """Simplify the display strings of objects for the purpose of rendering within DataPipe error messages.""" + if inspect.isfunction(obj): + return obj.__name__ + else: + return repr(obj) + + +def _strip_datapipe_from_name(name: str) -> str: + return name.replace("IterDataPipe", "").replace("MapDataPipe", "") + + +def _generate_input_args_string(obj): + """Generate a string for the input arguments of an object.""" + signature = inspect.signature(obj.__class__) + input_param_names = set(signature.parameters.keys()) + result = [] + for name, value in inspect.getmembers(obj): + if name in input_param_names: + result.append((name, _simplify_obj_name(value))) + return ", ".join([f"{name}={value}" for name, value in result]) + + +def _generate_iterdatapipe_msg(datapipe, simplify_dp_name: bool = False): + output_string = ( + f"{datapipe.__class__.__name__}({_generate_input_args_string(datapipe)})" + ) + if simplify_dp_name: + output_string = _strip_datapipe_from_name(output_string) + return output_string + + +def _gen_invalid_iterdatapipe_msg(datapipe) -> str: + return ( + "This iterator has been invalidated because another iterator has been created " + f"from the same IterDataPipe: {_generate_iterdatapipe_msg(datapipe)}\n" + "This may be caused multiple references to the same IterDataPipe. We recommend " + "using `.fork()` if that is necessary." + ) + + +_feedback_msg = ( + "\nFor feedback regarding this single iterator per IterDataPipe constraint, feel free " + "to comment on this issue: https://github.com/pytorch/data/issues/45." +) + + +def _check_iterator_valid(datapipe, iterator_id, next_method_exists=False) -> None: + r""" + Given an instance of a DataPipe and an iterator ID, check if the IDs match, and if not, raises an exception. + + In the case of ChildDataPipe, the ID gets compared to the one stored in `main_datapipe` as well. + """ + if next_method_exists: + # This is the case where `IterDataPipe` has both `__iter__` and `__next__`. + # The `_valid_iterator_id` should either be never set (`None`), or set by at most one + # iterator (`0`). Otherwise, it means there are multiple iterators. + if datapipe._valid_iterator_id is not None and datapipe._valid_iterator_id != 0: + extra_msg = "\nNote that this exception is raised inside your IterDataPipe's a `__next__` method" + raise RuntimeError( + _gen_invalid_iterdatapipe_msg(datapipe) + extra_msg + _feedback_msg + ) + elif ( + hasattr(datapipe, "_is_child_datapipe") and datapipe._is_child_datapipe is True + ): + if hasattr(datapipe, "_check_valid_iterator_id"): + if not datapipe._check_valid_iterator_id(iterator_id): + raise RuntimeError( + "This iterator has been invalidated, because a new iterator has been created " + f"from one of the ChildDataPipes of " + f"{_generate_iterdatapipe_msg(datapipe.main_datapipe)}." + + _feedback_msg + ) + else: + raise RuntimeError( + "ChildDataPipe must have method `_check_valid_iterator_id`." + ) + elif datapipe._valid_iterator_id != iterator_id: + raise RuntimeError(_gen_invalid_iterdatapipe_msg(datapipe) + _feedback_msg) + + +def _set_datapipe_valid_iterator_id(datapipe): + """Given a DataPipe, updates its valid iterator ID and reset the DataPipe.""" + if hasattr(datapipe, "_is_child_datapipe") and datapipe._is_child_datapipe is True: + if hasattr(datapipe, "_set_main_datapipe_valid_iterator_id"): + datapipe._set_main_datapipe_valid_iterator_id() # reset() is called within this method when appropriate + else: + raise RuntimeError( + "ChildDataPipe must have method `_set_main_datapipe_valid_iterator_id`." + ) + else: + if datapipe._valid_iterator_id is None: + datapipe._valid_iterator_id = 0 + else: + datapipe._valid_iterator_id += 1 + datapipe.reset() + return datapipe._valid_iterator_id + + +def hook_iterator(namespace) -> None: + r""" + Define a hook that is applied to all `__iter__` of metaclass `_DataPipeMeta`. + + This is done for the purpose of profiling and checking if an iterator is still valid. + """ + + def profiler_record_fn_context(datapipe): + if not hasattr(datapipe, "_profile_name"): + datapipe._profile_name = _generate_iterdatapipe_msg( + datapipe, simplify_dp_name=True + ) + return torch.autograd.profiler.record_function(datapipe._profile_name) + + class IteratorDecorator: + r""" + Wrap the iterator and modifying its `__next__` method. + + This decorator is applied to DataPipes of which `__iter__` method is NOT a generator function. + Those `__iter__` method commonly returns `self` but not necessarily. + """ + + def __init__(self, iterator, datapipe, iterator_id, has_next_method) -> None: + self.iterator = iterator + self.datapipe = datapipe + self.iterator_id = iterator_id + self._profiler_enabled = torch.autograd._profiler_enabled() + # Check if `__iter__` returns `self` and `DataPipe` has `__next__` + self.self_and_has_next_method = ( + self.iterator is self.datapipe and has_next_method + ) + + def __iter__(self): + return self + + def _get_next(self): + """Return next with logic related to iterator validity, profiler, and incrementation of samples yielded.""" + _check_iterator_valid(self.datapipe, self.iterator_id) + result = next(self.iterator) + if not self.self_and_has_next_method: + self.datapipe._number_of_samples_yielded += 1 + return result + + def __next__(self): + # TODO: Add try-except to in-place reduce traceback from the Exception + # See: https://github.com/pytorch/data/issues/284 + if self._profiler_enabled: + with profiler_record_fn_context(self.datapipe): + return self._get_next() + else: # Decided against using `contextlib.nullcontext` for performance reasons + return self._get_next() + + def __getattr__(self, name): + return getattr(self.iterator, name) + + func = namespace["__iter__"] + + # ``__iter__`` of IterDataPipe is a generator function + if inspect.isgeneratorfunction(func): + + @functools.wraps(func) + def wrap_generator(*args, **kwargs): + gen = func(*args, **kwargs) + datapipe = args[0] + if datapipe._fast_forward_iterator: + it = datapipe._fast_forward_iterator + datapipe._fast_forward_iterator = None + datapipe._snapshot_state = _SnapshotState.Iterating + while True: + try: + yield next(it) + except StopIteration: + return + iterator_id = _set_datapipe_valid_iterator_id( + datapipe + ) # This ID is tied to each created iterator + _profiler_enabled = torch.autograd._profiler_enabled() + try: + if _profiler_enabled: + with profiler_record_fn_context(datapipe): + response = gen.send(None) + else: + response = gen.send(None) + + while True: + datapipe._number_of_samples_yielded += 1 + request = yield response + # Pass through here every time `__next__` is called + if _profiler_enabled: + with profiler_record_fn_context(datapipe): + _check_iterator_valid(datapipe, iterator_id) + response = gen.send(request) + else: # Decided against using `contextlib.nullcontext` for performance reasons + _check_iterator_valid(datapipe, iterator_id) + response = gen.send(request) + except StopIteration: + return + except Exception as e: + # TODO: Simplify the traceback message to skip over `response = gen.send(None)` + # Part of https://github.com/pytorch/data/issues/284 + datapipe = args[0] + msg = "thrown by __iter__ of" + single_iterator_msg = "single iterator per IterDataPipe constraint" + if hasattr(e.args, "__len__"): + full_msg = f"{msg} {datapipe.__class__.__name__}({_generate_input_args_string(datapipe)})" + if len(e.args) == 0 or not isinstance( + e.args[0], str + ): # If an exception message doesn't exist + e.args = (f"\nThis exception is {full_msg}",) + elif msg not in e.args[0] and single_iterator_msg not in e.args[0]: + e.args = ( + e.args[0] + f"\nThis exception is {full_msg}", + ) + e.args[1:] + raise + + namespace["__iter__"] = wrap_generator + else: # ``__iter__`` of IterDataPipe is NOT a generator function + # IterDataPipe is an iterator with both ``__iter__`` and ``__next__`` + # And ``__iter__`` may or may not return `self` + if "__next__" in namespace: # If `__next__` exists, put a wrapper around it + next_func = namespace["__next__"] + + @functools.wraps(next_func) + def wrap_next(*args, **kwargs): + datapipe = args[0] + if torch.autograd._profiler_enabled(): + with profiler_record_fn_context(datapipe): + result = next_func(*args, **kwargs) + else: + result = next_func(*args, **kwargs) + datapipe._number_of_samples_yielded += 1 + return result + + namespace["__next__"] = wrap_next + + # Note that if the `__next__` and `__iter__` do something completely unrelated. It may cause issue but + # the user will be violating the iterator protocol. Potential issue: + # 1. Valid iterator ID may not update or checked properly + # 2. The number of samples yielded will be miscounted + + # Regardless if `__next__` exists or not, `__iter__` needs a wrapper to track the number of valid iterators + @functools.wraps(func) + def wrap_iter(*args, **kwargs): + iter_ret = func(*args, **kwargs) + datapipe = args[0] + datapipe._snapshot_state = _SnapshotState.Iterating + if datapipe._fast_forward_iterator: + iter_ret = datapipe._fast_forward_iterator + datapipe._fast_forward_iterator = None + return iter_ret + iterator_id = _set_datapipe_valid_iterator_id( + datapipe + ) # This ID is tied to each created iterator + return IteratorDecorator( + iter_ret, datapipe, iterator_id, "__next__" in namespace + ) + + namespace["__iter__"] = wrap_iter diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/_typing.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/_typing.py new file mode 100644 index 0000000000000000000000000000000000000000..e198aa16caa66105c0b2009ed8da1e655effe151 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/_typing.py @@ -0,0 +1,484 @@ +# mypy: allow-untyped-defs +# Taking reference from official Python typing +# https://github.com/python/cpython/blob/master/Lib/typing.py + +import collections +import functools +import numbers +import sys + +# Please check [Note: TypeMeta and TypeAlias] +# In case of metaclass conflict due to ABCMeta or _ProtocolMeta +# For Python 3.9, only Protocol in typing uses metaclass +from abc import ABCMeta +from collections.abc import Iterator + +# TODO: Use TypeAlias when Python 3.6 is deprecated +from typing import ( # type: ignore[attr-defined] + _eval_type, + _GenericAlias, + _tp_cache, + _type_check, + _type_repr, + Any, + ForwardRef, + Generic, + get_type_hints, + TypeVar, + Union, +) + +from torch.utils.data.datapipes._hook_iterator import _SnapshotState, hook_iterator + + +class GenericMeta(ABCMeta): # type: ignore[no-redef] + pass + + +class Integer(numbers.Integral): + pass + + +class Boolean(numbers.Integral): + pass + + +# Python 'type' object is not subscriptable +# Tuple[int, List, dict] -> valid +# tuple[int, list, dict] -> invalid +# Map Python 'type' to abstract base class +TYPE2ABC = { + bool: Boolean, + int: Integer, + float: numbers.Real, + complex: numbers.Complex, + dict: dict, + list: list, + set: set, + tuple: tuple, + None: type(None), +} + + +def issubtype(left, right, recursive=True): + r""" + Check if the left-side type is a subtype of the right-side type. + + If any of type is a composite type like `Union` and `TypeVar` with + bounds, it would be expanded into a list of types and check all + of left-side types are subtypes of either one from right-side types. + """ + left = TYPE2ABC.get(left, left) + right = TYPE2ABC.get(right, right) + + if right is Any or left == right: + return True + + if isinstance(right, _GenericAlias): + if getattr(right, "__origin__", None) is Generic: + return True + + if right is type(None): + return False + + # Right-side type + constraints = _decompose_type(right) + + if len(constraints) == 0 or Any in constraints: + return True + + if left is Any: + return False + + # Left-side type + variants = _decompose_type(left) + + # all() will return True for empty variants + if len(variants) == 0: + return False + + return all( + _issubtype_with_constraints(variant, constraints, recursive) + for variant in variants + ) + + +def _decompose_type(t, to_list=True): + if isinstance(t, TypeVar): + if t.__bound__ is not None: + ts = [t.__bound__] + else: + # For T_co, __constraints__ is () + ts = list(t.__constraints__) + elif hasattr(t, "__origin__") and t.__origin__ == Union: + ts = t.__args__ + else: + if not to_list: + return None + ts = [t] + # Ignored: Generator has incompatible item type "object"; expected "Type[Any]" + ts = [TYPE2ABC.get(_t, _t) for _t in ts] # type: ignore[misc] + return ts + + +def _issubtype_with_constraints(variant, constraints, recursive=True): + r""" + Check if the variant is a subtype of either one from constraints. + + For composite types like `Union` and `TypeVar` with bounds, they + would be expanded for testing. + """ + if variant in constraints: + return True + + # [Note: Subtype for Union and TypeVar] + # Python typing is able to flatten Union[Union[...]] or Union[TypeVar]. + # But it couldn't flatten the following scenarios: + # - Union[int, TypeVar[Union[...]]] + # - TypeVar[TypeVar[...]] + # So, variant and each constraint may be a TypeVar or a Union. + # In these cases, all of inner types from the variant are required to be + # extracted and verified as a subtype of any constraint. And, all of + # inner types from any constraint being a TypeVar or a Union are + # also required to be extracted and verified if the variant belongs to + # any of them. + + # Variant + vs = _decompose_type(variant, to_list=False) + + # Variant is TypeVar or Union + if vs is not None: + return all(_issubtype_with_constraints(v, constraints, recursive) for v in vs) + + # Variant is not TypeVar or Union + if hasattr(variant, "__origin__") and variant.__origin__ is not None: + v_origin = variant.__origin__ + # In Python-3.9 typing library untyped generics do not have args + v_args = getattr(variant, "__args__", None) + else: + v_origin = variant + v_args = None + + # Constraints + for constraint in constraints: + cs = _decompose_type(constraint, to_list=False) + + # Constraint is TypeVar or Union + if cs is not None: + if _issubtype_with_constraints(variant, cs, recursive): + return True + # Constraint is not TypeVar or Union + else: + # __origin__ can be None for plain list, tuple, ... in Python 3.6 + if hasattr(constraint, "__origin__") and constraint.__origin__ is not None: + c_origin = constraint.__origin__ + if v_origin == c_origin: + if not recursive: + return True + # In Python-3.9 typing library untyped generics do not have args + c_args = getattr(constraint, "__args__", None) + if c_args is None or len(c_args) == 0: + return True + if ( + v_args is not None + and len(v_args) == len(c_args) + and all( + issubtype(v_arg, c_arg) + for v_arg, c_arg in zip(v_args, c_args, strict=True) + ) + ): + return True + # Tuple[int] -> Tuple + else: + if v_origin == constraint: + return True + + return False + + +def issubinstance(data, data_type): + if not issubtype(type(data), data_type, recursive=False): + return False + + # In Python-3.9 typing library __args__ attribute is not defined for untyped generics + dt_args = getattr(data_type, "__args__", None) + if isinstance(data, tuple): + if dt_args is None or len(dt_args) == 0: + return True + if len(dt_args) != len(data): + return False + return all(issubinstance(d, t) for d, t in zip(data, dt_args, strict=True)) + elif isinstance(data, (list, set)): + if dt_args is None or len(dt_args) == 0: + return True + t = dt_args[0] + return all(issubinstance(d, t) for d in data) + elif isinstance(data, dict): + if dt_args is None or len(dt_args) == 0: + return True + kt, vt = dt_args + return all( + issubinstance(k, kt) and issubinstance(v, vt) for k, v in data.items() + ) + + return True + + +# [Note: TypeMeta and TypeAlias] +# In order to keep compatibility for Python 3.6, use Meta for the typing. +# TODO: When PyTorch drops the support for Python 3.6, it can be converted +# into the Alias system and using `__class_getitem__` for DataPipe. The +# typing system will gain benefit of performance and resolving metaclass +# conflicts as elaborated in https://www.python.org/dev/peps/pep-0560/ + + +class _DataPipeType: + r"""Save type annotation in `param`.""" + + def __init__(self, param) -> None: + self.param = param + + def __repr__(self) -> str: + return _type_repr(self.param) + + def __eq__(self, other): + if isinstance(other, _DataPipeType): + return self.param == other.param + return NotImplemented + + def __hash__(self): + return hash(self.param) + + def issubtype(self, other): + if isinstance(other.param, _GenericAlias): + if getattr(other.param, "__origin__", None) is Generic: + return True + if isinstance(other, _DataPipeType): + return issubtype(self.param, other.param) + if isinstance(other, type): + return issubtype(self.param, other) + raise TypeError(f"Expected '_DataPipeType' or 'type', but found {type(other)}") + + def issubtype_of_instance(self, other): + return issubinstance(other, self.param) + + +# Default type for DataPipe without annotation +_T_co = TypeVar("_T_co", covariant=True) +# pyrefly: ignore [invalid-annotation] +_DEFAULT_TYPE = _DataPipeType(Generic[_T_co]) + + +class _DataPipeMeta(GenericMeta): + r""" + Metaclass for `DataPipe`. + + Add `type` attribute and `__init_subclass__` based on the type, and validate the return hint of `__iter__`. + + Note that there is subclass `_IterDataPipeMeta` specifically for `IterDataPipe`. + """ + + type: _DataPipeType + + def __new__(cls, name, bases, namespace, **kwargs): + return super().__new__(cls, name, bases, namespace, **kwargs) # type: ignore[call-overload] + + # TODO: the statements below are not reachable by design as there is a bug and typing is low priority for now. + # pyrefly: ignore [no-access] + cls.__origin__ = None + if "type" in namespace: + return super().__new__(cls, name, bases, namespace, **kwargs) # type: ignore[call-overload] + + namespace["__type_class__"] = False + # For plain derived class without annotation + for base in bases: + if isinstance(base, _DataPipeMeta): + return super().__new__(cls, name, bases, namespace, **kwargs) # type: ignore[call-overload] + + namespace.update( + {"type": _DEFAULT_TYPE, "__init_subclass__": _dp_init_subclass} + ) + return super().__new__(cls, name, bases, namespace, **kwargs) # type: ignore[call-overload] + + def __init__(self, name, bases, namespace, **kwargs) -> None: + super().__init__(name, bases, namespace, **kwargs) # type: ignore[call-overload] + + # TODO: Fix isinstance bug + @_tp_cache + def _getitem_(self, params): + if params is None: + raise TypeError(f"{self.__name__}[t]: t can not be None") + if isinstance(params, str): + params = ForwardRef(params) + if not isinstance(params, tuple): + params = (params,) + + msg = f"{self.__name__}[t]: t must be a type" + params = tuple(_type_check(p, msg) for p in params) + + if isinstance(self.type.param, _GenericAlias): + orig = getattr(self.type.param, "__origin__", None) + if isinstance(orig, type) and orig is not Generic: + p = self.type.param[params] # type: ignore[index] + t = _DataPipeType(p) + l = len(str(self.type)) + 2 + name = self.__name__[:-l] + name = name + "[" + str(t) + "]" + bases = (self,) + self.__bases__ + return self.__class__( + name, + bases, + { + "__init_subclass__": _dp_init_subclass, + "type": t, + "__type_class__": True, + }, + ) + + if len(params) > 1: + raise TypeError( + f"Too many parameters for {self} actual {len(params)}, expected 1" + ) + + t = _DataPipeType(params[0]) + + if not t.issubtype(self.type): + raise TypeError( + f"Can not subclass a DataPipe[{t}] from DataPipe[{self.type}]" + ) + + # Types are equal, fast path for inheritance + if self.type == t: + return self + + name = self.__name__ + "[" + str(t) + "]" + bases = (self,) + self.__bases__ + + return self.__class__( + name, + bases, + {"__init_subclass__": _dp_init_subclass, "__type_class__": True, "type": t}, + ) + + # TODO: Fix isinstance bug + def _eq_(self, other): + if not isinstance(other, _DataPipeMeta): + return NotImplemented + if self.__origin__ is None or other.__origin__ is None: # type: ignore[has-type] + return self is other + return ( + self.__origin__ == other.__origin__ # type: ignore[has-type] + and self.type == other.type + ) + + # TODO: Fix isinstance bug + def _hash_(self): + return hash((self.__name__, self.type)) + + +class _IterDataPipeMeta(_DataPipeMeta): + r""" + Metaclass for `IterDataPipe` and inherits from `_DataPipeMeta`. + + Add various functions for behaviors specific to `IterDataPipe`. + """ + + def __new__(cls, name, bases, namespace, **kwargs): + if "reset" in namespace: + reset_func = namespace["reset"] + + @functools.wraps(reset_func) + def conditional_reset(*args, **kwargs) -> None: + r""" + Only execute DataPipe's `reset()` method if `_SnapshotState` is `Iterating` or `NotStarted`. + + This allows recently restored DataPipe to preserve its restored state during the initial `__iter__` call. + """ + datapipe = args[0] + if datapipe._snapshot_state in ( + _SnapshotState.Iterating, + _SnapshotState.NotStarted, + ): + # Reset `NotStarted` is necessary because the `source_datapipe` of a DataPipe might have + # already begun iterating. + datapipe._number_of_samples_yielded = 0 + datapipe._fast_forward_iterator = None + reset_func(*args, **kwargs) + datapipe._snapshot_state = _SnapshotState.Iterating + + namespace["reset"] = conditional_reset + + if "__iter__" in namespace: + hook_iterator(namespace) + return super().__new__(cls, name, bases, namespace, **kwargs) # type: ignore[call-overload] + + +def _dp_init_subclass(sub_cls, *args, **kwargs) -> None: + # Add function for datapipe instance to reinforce the type + sub_cls.reinforce_type = reinforce_type + + # TODO: + # - add global switch for type checking at compile-time + + # Ignore internal type class + if getattr(sub_cls, "__type_class__", False): + return + + # Check if the string type is valid + if isinstance(sub_cls.type.param, ForwardRef): + base_globals = sys.modules[sub_cls.__module__].__dict__ + try: + param = _eval_type(sub_cls.type.param, base_globals, locals()) + sub_cls.type.param = param + except TypeError as e: + raise TypeError( + f"{sub_cls.type.param.__forward_arg__} is not supported by Python typing" + ) from e + + if "__iter__" in sub_cls.__dict__: + iter_fn = sub_cls.__dict__["__iter__"] + hints = get_type_hints(iter_fn) + if "return" in hints: + return_hint = hints["return"] + # Plain Return Hint for Python 3.6 + if return_hint == Iterator: + return + if not ( + hasattr(return_hint, "__origin__") + and ( + return_hint.__origin__ == Iterator + or return_hint.__origin__ == collections.abc.Iterator + ) + ): + raise TypeError( + "Expected 'Iterator' as the return annotation for `__iter__` of {}" + ", but found {}".format( + sub_cls.__name__, _type_repr(hints["return"]) + ) + ) + data_type = return_hint.__args__[0] + if not issubtype(data_type, sub_cls.type.param): + raise TypeError( + f"Expected return type of '__iter__' as a subtype of {sub_cls.type}," + f" but found {_type_repr(data_type)} for {sub_cls.__name__}" + ) + + +def reinforce_type(self, expected_type): + r""" + Reinforce the type for DataPipe instance. + + And the 'expected_type' is required to be a subtype of the original type + hint to restrict the type requirement of DataPipe instance. + """ + if isinstance(expected_type, tuple): + expected_type = tuple[expected_type] # type: ignore[valid-type] + _type_check(expected_type, msg="'expected_type' must be a type") + + if not issubtype(expected_type, self.type.param): + raise TypeError( + f"Expected 'expected_type' as subtype of {self.type}, but found {_type_repr(expected_type)}" + ) + + self.type = _DataPipeType(expected_type) + return self diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/dataframe/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/dataframe/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f7f4b7dcb414c205614a694ccaa02961e45e9b3e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/dataframe/__init__.py @@ -0,0 +1,12 @@ +from torch.utils.data.datapipes.dataframe.dataframes import ( + CaptureDataFrame, + DFIterDataPipe, +) +from torch.utils.data.datapipes.dataframe.datapipes import DataFramesAsTuplesPipe + + +__all__ = ["CaptureDataFrame", "DFIterDataPipe", "DataFramesAsTuplesPipe"] + +# Please keep this list sorted +if __all__ != sorted(__all__): + raise AssertionError("__all__ is not sorted") diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/dataframe/dataframe_wrapper.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/dataframe/dataframe_wrapper.py new file mode 100644 index 0000000000000000000000000000000000000000..9cfc5c268a17455cb30d981036996a716d0cc668 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/dataframe/dataframe_wrapper.py @@ -0,0 +1,128 @@ +# mypy: allow-untyped-defs +from typing import Any + + +_pandas: Any = None +_WITH_PANDAS: bool | None = None + + +def _try_import_pandas() -> bool: + try: + import pandas # type: ignore[import] + + global _pandas + _pandas = pandas + return True + except ImportError: + return False + + +# pandas used only for prototyping, will be shortly replaced with TorchArrow +def _with_pandas() -> bool: + global _WITH_PANDAS + if _WITH_PANDAS is None: + _WITH_PANDAS = _try_import_pandas() + return _WITH_PANDAS + + +class PandasWrapper: + @classmethod + def create_dataframe(cls, data, columns): + if not _with_pandas(): + raise RuntimeError("DataFrames prototype requires pandas to function") + return _pandas.DataFrame(data, columns=columns) # type: ignore[union-attr] + + @classmethod + def is_dataframe(cls, data): + if not _with_pandas(): + return False + return isinstance(data, _pandas.core.frame.DataFrame) # type: ignore[union-attr] + + @classmethod + def is_column(cls, data): + if not _with_pandas(): + return False + return isinstance(data, _pandas.core.series.Series) # type: ignore[union-attr] + + @classmethod + def iterate(cls, data): + if not _with_pandas(): + raise RuntimeError("DataFrames prototype requires pandas to function") + yield from data.itertuples(index=False) + + @classmethod + def concat(cls, buffer): + if not _with_pandas(): + raise RuntimeError("DataFrames prototype requires pandas to function") + return _pandas.concat(buffer) # type: ignore[union-attr] + + @classmethod + def get_item(cls, data, idx): + if not _with_pandas(): + raise RuntimeError("DataFrames prototype requires pandas to function") + return data[idx : idx + 1] + + @classmethod + def get_len(cls, df): + if not _with_pandas(): + raise RuntimeError("DataFrames prototype requires pandas to function") + return len(df.index) + + @classmethod + def get_columns(cls, df): + if not _with_pandas(): + raise RuntimeError("DataFrames prototype requires pandas to function") + return list(df.columns.values.tolist()) + + +# When you build own implementation just override it with dataframe_wrapper.set_df_wrapper(new_wrapper_class) +default_wrapper = PandasWrapper + + +def get_df_wrapper(): + return default_wrapper + + +def set_df_wrapper(wrapper) -> None: + global default_wrapper + default_wrapper = wrapper + + +def create_dataframe(data, columns=None): + wrapper = get_df_wrapper() + return wrapper.create_dataframe(data, columns) + + +def is_dataframe(data): + wrapper = get_df_wrapper() + return wrapper.is_dataframe(data) + + +def get_columns(data): + wrapper = get_df_wrapper() + return wrapper.get_columns(data) + + +def is_column(data): + wrapper = get_df_wrapper() + return wrapper.is_column(data) + + +def concat(buffer): + wrapper = get_df_wrapper() + return wrapper.concat(buffer) + + +def iterate(data): + wrapper = get_df_wrapper() + return wrapper.iterate(data) + + +def get_item(data, idx): + wrapper = get_df_wrapper() + return wrapper.get_item(data, idx) + + +def get_len(df): + wrapper = get_df_wrapper() + return wrapper.get_len(df) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/dataframe/dataframes.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/dataframe/dataframes.py new file mode 100644 index 0000000000000000000000000000000000000000..5361c29b4822440d94b4949c5a6062ec7d58a2ef --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/dataframe/dataframes.py @@ -0,0 +1,481 @@ +# mypy: allow-untyped-defs +from typing import Any, NoReturn + +from torch.utils.data.datapipes._decorator import functional_datapipe +from torch.utils.data.datapipes.dataframe.structures import DataChunkDF +from torch.utils.data.datapipes.datapipe import DFIterDataPipe, IterDataPipe + + +# TODO(VitalyFedyunin): Add error when two different traces get combined + +__all__ = [ + "Capture", + "CaptureA", + "CaptureAdd", + "CaptureCall", + "CaptureControl", + "CaptureDataFrame", + "CaptureDataFrameWithDataPipeOps", + "CaptureF", + "CaptureGetAttr", + "CaptureGetItem", + "CaptureInitial", + "CaptureLikeMock", + "CaptureMul", + "CaptureSetItem", + "CaptureSub", + "CaptureVariable", + "CaptureVariableAssign", + "DataFrameTracer", + "DataFrameTracedOps", + "disable_capture", + "get_val", +] + + +def disable_capture() -> None: + CaptureControl.disabled = True + + +class CaptureControl: + disabled = False + + +class DataFrameTracedOps(DFIterDataPipe): + def __init__(self, source_datapipe, output_var) -> None: + super().__init__() + self.source_datapipe = source_datapipe + self.output_var = output_var + + def __iter__(self): + for item in self.source_datapipe: + yield self.output_var.apply_ops(item) + + +# TODO(VitalyFedyunin): Extract this list from the DFIterDataPipe registered functions +DATAPIPES_OPS = [ + "_dataframes_as_tuples", + "groupby", + "_dataframes_filter", + "map", + "to_datapipe", + "shuffle", + "concat", + "batch", + "_dataframes_per_row", + "_dataframes_concat", + "_dataframes_shuffle", +] + +UNIMPLEMENTED_ATTR = ["__deepcopy__", "__setstate__", "is_shardable", "apply_sharding"] + + +class Capture: + # TODO: All operations are shared across entire InitialCapture, need to figure out what if we join two captures + + def __init__(self, schema_df=None) -> None: + self.ctx = {"operations": [], "variables": [], "schema_df": schema_df} + + def __str__(self) -> str: + return self._ops_str() + + def _ops_str(self): + res = "" + # pyrefly: ignore [not-iterable] + for op in self.ctx["operations"]: + if len(res) > 0: + res += "\n" + res += str(op) + return res + + def __getstate__(self): + # TODO(VitalyFedyunin): Currently can't pickle (why?) + self.ctx["schema_df"] = None + # pyrefly: ignore [not-iterable] + for var in self.ctx["variables"]: + var.calculated_value = None + state = {} + for item in self.__dict__: + state[item] = getattr(self, item) + return state + + def __setstate__(self, state): + for k, v in state.items(): + setattr(self, k, v) + + def __getattr__(self, attrname): + if attrname == "kwarg" or attrname == "kwargs": + raise RuntimeError("no kwargs!") + if attrname == "__deepcopy__": + raise AttributeError + result = CaptureGetAttr(self, attrname, ctx=self.ctx) + return result + + def __getitem__(self, key): + return CaptureGetItem(self, key, ctx=self.ctx) + + def __setitem__(self, key, value) -> None: + # pyrefly: ignore [missing-attribute] + self.ctx["operations"].append(CaptureSetItem(self, key, value, ctx=self.ctx)) + + def __add__(self, add_val): + res = CaptureAdd(self, add_val, ctx=self.ctx) + var = CaptureVariable(res, ctx=self.ctx) + # pyrefly: ignore [missing-attribute] + self.ctx["operations"].append( + CaptureVariableAssign(variable=var, value=res, ctx=self.ctx) + ) + return var + + def __sub__(self, add_val): + res = CaptureSub(self, add_val, ctx=self.ctx) + var = CaptureVariable(res, ctx=self.ctx) + # pyrefly: ignore [missing-attribute] + self.ctx["operations"].append( + CaptureVariableAssign(variable=var, value=res, ctx=self.ctx) + ) + return var + + def __mul__(self, add_val): + res = CaptureMul(self, add_val, ctx=self.ctx) + var = CaptureVariable(res, ctx=self.ctx) + t = CaptureVariableAssign(variable=var, value=res, ctx=self.ctx) + # pyrefly: ignore [missing-attribute] + self.ctx["operations"].append(t) + return var + + def _is_context_empty(self): + # pyrefly: ignore [bad-argument-type] + return len(self.ctx["operations"]) == 0 and len(self.ctx["variables"]) == 0 + + def apply_ops_2(self, dataframe) -> None: + # TODO(VitalyFedyunin): Make this calculation thread safe (as currently it updates pointer) + # pyrefly: ignore [unsupported-operation] + self.ctx["variables"][0].calculated_value = dataframe + # pyrefly: ignore [not-iterable] + for op in self.ctx["operations"]: + op.execute() + + @property + def columns(self): + self.apply_ops_2(self.ctx["schema_df"]) + value = self.execute() + return value.columns + + # TODO(VitalyFedyunin): Add tests + # TODO(VitalyFedyunin): Need to join context if one of them are empty because we used capture + + def __call__(self, *args, **kwargs): + # TODO: Check if args or kwargs have more than one different context + if self._is_context_empty(): + # TODO: Allow CaptureA to take context from mock + for arg in args: + if isinstance(arg, Capture) and not arg._is_context_empty(): + self.ctx = arg.ctx + break + if self._is_context_empty(): + for k, v in kwargs.items(): + if isinstance(k, Capture) and not k._is_context_empty(): + self.ctx = k.ctx + break + if isinstance(v, Capture) and not v._is_context_empty(): + self.ctx = v.ctx + break + + res = CaptureCall(self, ctx=self.ctx, args=args, kwargs=kwargs) + var = CaptureVariable(None, ctx=self.ctx) + t = CaptureVariableAssign(ctx=self.ctx, variable=var, value=res) + # pyrefly: ignore [missing-attribute] + self.ctx["operations"].append(t) + return var + + +class CaptureF(Capture): + def __init__(self, ctx=None, **kwargs) -> None: + super().__init__() + if ctx is None: + self.ctx = {"operations": [], "variables": []} + else: + self.ctx = ctx + self.kwargs = kwargs + + +class CaptureA(CaptureF): + def __str__(self) -> str: + return f"{self.kwargs['name']}" + + def execute(self): + value = self.kwargs["real_attribute"] + return value + + +class CaptureLikeMock: + def __init__(self, name) -> None: + import unittest.mock as mock + + # TODO(VitalyFedyunin): Do not use private function here, copy own implementation instead. + get_target, attribute = mock._get_target(name) # type: ignore[attr-defined] + self.get_target = get_target + self.attribute = attribute + self.name = name + + def __enter__(self): + self.save = getattr(self.get_target(), self.attribute) + capt = CaptureA(name=self.name, real_attribute=self.save) + setattr(self.get_target(), self.attribute, capt) + + def __exit__(self, *exc_info): + setattr(self.get_target(), self.attribute, self.save) + + +class CaptureCall(Capture): + def __init__(self, callable, ctx=None, **kwargs) -> None: + super().__init__() + if ctx is None: + self.ctx = {"operations": [], "variables": []} + else: + self.ctx = ctx + self.kwargs = kwargs + self.callable = callable + + def __str__(self) -> str: + return "{callable}({args},{kwargs})".format( + callable=self.callable, **self.kwargs + ) + + def execute(self): + # TODO: VitalyFedyunin execute kwargs and maybe nested structures + executed_args = [] + for arg in self.kwargs["args"]: + if isinstance(arg, Capture): + executed_args.append(arg.execute()) + else: + executed_args.append(arg) + left = get_val(self.callable) + return left(*executed_args, **self.kwargs["kwargs"]) + + +class CaptureVariableAssign(CaptureF): + def __str__(self) -> str: + variable = self.kwargs["variable"] + value = self.kwargs["value"] + return f"{variable} = {value}" + + def execute(self) -> None: + self.kwargs["variable"].calculated_value = self.kwargs["value"].execute() + + +class CaptureVariable(Capture): + # TODO(VitalyFedyunin): This should be atomic and thread safe + names_idx = 0 + + def __init__(self, value, ctx) -> None: + super().__init__() + if CaptureControl.disabled: + raise RuntimeError("Attempting to create capture variable with capture off") + self.ctx = ctx + self.value = value + self.name = f"var_{CaptureVariable.names_idx}" + CaptureVariable.names_idx += 1 + self.ctx["variables"].append(self) + + def __str__(self) -> str: + return self.name + + def execute(self): + return self.calculated_value + + def apply_ops(self, dataframe): + # TODO(VitalyFedyunin): Make this calculation thread safe (as currently it updates pointer) + # pyrefly: ignore [unsupported-operation] + self.ctx["variables"][0].calculated_value = dataframe + # pyrefly: ignore [not-iterable] + for op in self.ctx["operations"]: + op.execute() + return self.calculated_value + + +class CaptureGetItem(Capture): + def __init__(self, left, key, ctx) -> None: + super().__init__() + self.ctx = ctx + self.left = left + self.key = key + + def __str__(self) -> str: + return f"{self.left}[{get_val(self.key)}]" + + def execute(self): + left = self.left.execute() + return left[self.key] + + +class CaptureSetItem(Capture): + def __init__(self, left, key, value, ctx) -> None: + super().__init__() + self.ctx = ctx + self.left = left + self.key = key + self.value = value + + def __str__(self) -> str: + return f"{self.left}[{get_val(self.key)}] = {self.value}" + + def execute(self) -> None: + left = self.left.execute() + value = self.value.execute() + left[self.key] = value + + +class CaptureAdd(Capture): + def __init__(self, left, right, ctx) -> None: + super().__init__() + self.ctx = ctx + self.left = left + self.right = right + + def __str__(self) -> str: + return f"{self.left} + {self.right}" + + def execute(self): + return get_val(self.left) + get_val(self.right) + + +class CaptureMul(Capture): + def __init__(self, left, right, ctx) -> None: + super().__init__() + self.ctx = ctx + self.left = left + self.right = right + + def __str__(self) -> str: + return f"{self.left} * {self.right}" + + def execute(self): + return get_val(self.left) * get_val(self.right) + + +class CaptureSub(Capture): + def __init__(self, left, right, ctx) -> None: + super().__init__() + self.ctx = ctx + self.left = left + self.right = right + + def __str__(self) -> str: + return f"{self.left} - {self.right}" + + def execute(self): + return get_val(self.left) - get_val(self.right) + + +class CaptureGetAttr(Capture): + def __init__(self, src, name, ctx) -> None: + super().__init__() + self.ctx = ctx + self.src = src + self.name = name + + def __str__(self) -> str: + return f"{self.src}.{self.name}" + + def execute(self): + val = get_val(self.src) + return getattr(val, self.name) + + +def get_val(capture): + if isinstance(capture, Capture): + return capture.execute() + elif isinstance(capture, str): + return f'"{capture}"' + else: + return capture + + +class CaptureInitial(CaptureVariable): + def __init__(self, schema_df=None) -> None: + # pyrefly: ignore [bad-assignment] + new_ctx: dict[str, list[Any]] = { + "operations": [], + "variables": [], + "schema_df": schema_df, + } + super().__init__(None, new_ctx) + self.name = f"input_{self.name}" + + +class CaptureDataFrame(CaptureInitial): + pass + + +class CaptureDataFrameWithDataPipeOps(CaptureDataFrame): + def as_datapipe(self): + # pyrefly: ignore [unsupported-operation] + return DataFrameTracedOps(self.ctx["variables"][0].source_datapipe, self) + + def raw_iterator(self): + return self.as_datapipe().__iter__() + + def __iter__(self): + return iter(self._dataframes_as_tuples()) + + def batch(self, batch_size=10, drop_last: bool = False, wrapper_class=DataChunkDF): + dp = self._dataframes_per_row()._dataframes_concat(batch_size) + dp = dp.as_datapipe().batch(1, drop_last=drop_last, wrapper_class=wrapper_class) + dp._dp_contains_dataframe = True + return dp + + def groupby( + self, + group_key_fn, + *, + buffer_size=10000, + group_size=None, + guaranteed_group_size=None, + drop_remaining=False, + ): + dp = self._dataframes_per_row() + dp = dp.as_datapipe().groupby( + group_key_fn, + buffer_size=buffer_size, + group_size=group_size, + guaranteed_group_size=guaranteed_group_size, + drop_remaining=drop_remaining, + ) + return dp + + def shuffle(self, *args, **kwargs): + return self._dataframes_shuffle(*args, **kwargs) + + def filter(self, *args, **kwargs): + return self._dataframes_filter(*args, **kwargs) + + def collate(self, *args, **kwargs) -> NoReturn: + raise RuntimeError("Can't collate unbatched DataFrames stream") + + def __getattr__(self, attrname): # ? + if attrname in UNIMPLEMENTED_ATTR: + raise AttributeError("Attempting to get ", attrname) + if attrname in DATAPIPES_OPS: + return (self.as_datapipe()).__getattr__(attrname) + return super().__getattr__(attrname) + + +@functional_datapipe("trace_as_dataframe") +class DataFrameTracer(CaptureDataFrameWithDataPipeOps, IterDataPipe): # type: ignore[misc] + source_datapipe: Any | None = None + + # TODO(VitalyFedyunin): Must implement all special functions of datapipes + + def set_shuffle_settings(self, *args, **kwargs) -> None: + pass + + def is_shardable(self) -> bool: + return False + + def __init__(self, source_datapipe, schema_df=None) -> None: + self.source_datapipe = source_datapipe + if schema_df is None: + schema_df = next(iter(self.source_datapipe)) + super().__init__(schema_df=schema_df) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/dataframe/datapipes.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/dataframe/datapipes.py new file mode 100644 index 0000000000000000000000000000000000000000..50c5a44dfd5f323ca6c27276907abd48d6d5532c --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/dataframe/datapipes.py @@ -0,0 +1,137 @@ +# mypy: allow-untyped-defs +import random +from typing import Any + +from torch.utils.data.datapipes._decorator import functional_datapipe +from torch.utils.data.datapipes.dataframe import dataframe_wrapper as df_wrapper +from torch.utils.data.datapipes.datapipe import DFIterDataPipe, IterDataPipe + + +__all__ = [ + "ConcatDataFramesPipe", + "DataFramesAsTuplesPipe", + "ExampleAggregateAsDataFrames", + "FilterDataFramesPipe", + "PerRowDataFramesPipe", + "ShuffleDataFramesPipe", +] + + +@functional_datapipe("_dataframes_as_tuples") +class DataFramesAsTuplesPipe(IterDataPipe): + def __init__(self, source_datapipe) -> None: + self.source_datapipe = source_datapipe + + def __iter__(self): + for df in self.source_datapipe: + # for record in df.to_records(index=False): + yield from df_wrapper.iterate(df) + + +@functional_datapipe("_dataframes_per_row", enable_df_api_tracing=True) +class PerRowDataFramesPipe(DFIterDataPipe): + def __init__(self, source_datapipe) -> None: + self.source_datapipe = source_datapipe + + def __iter__(self): + for df in self.source_datapipe: + # TODO(VitalyFedyunin): Replacing with TorchArrow only API, as we are dropping pandas as followup + for i in range(len(df)): + yield df[i : i + 1] + + +@functional_datapipe("_dataframes_concat", enable_df_api_tracing=True) +class ConcatDataFramesPipe(DFIterDataPipe): + def __init__(self, source_datapipe, batch=3) -> None: + self.source_datapipe = source_datapipe + self.n_batch = batch + + def __iter__(self): + buffer = [] + for df in self.source_datapipe: + buffer.append(df) + if len(buffer) == self.n_batch: + yield df_wrapper.concat(buffer) + buffer = [] + if buffer: + yield df_wrapper.concat(buffer) + + +@functional_datapipe("_dataframes_shuffle", enable_df_api_tracing=True) +class ShuffleDataFramesPipe(DFIterDataPipe): + def __init__(self, source_datapipe) -> None: + self.source_datapipe = source_datapipe + + def __iter__(self): + size = None + all_buffer: list[Any] = [] + for df in self.source_datapipe: + if size is None: + size = df_wrapper.get_len(df) + all_buffer.extend( + df_wrapper.get_item(df, i) for i in range(df_wrapper.get_len(df)) + ) + random.shuffle(all_buffer) + buffer = [] + for df in all_buffer: + buffer.append(df) + if len(buffer) == size: + yield df_wrapper.concat(buffer) + buffer = [] + if buffer: + yield df_wrapper.concat(buffer) + + +@functional_datapipe("_dataframes_filter", enable_df_api_tracing=True) +class FilterDataFramesPipe(DFIterDataPipe): + def __init__(self, source_datapipe, filter_fn) -> None: + self.source_datapipe = source_datapipe + self.filter_fn = filter_fn + + def __iter__(self): + size = None + all_buffer = [] + filter_res = [] + # pyrefly: ignore [bad-assignment] + for df in self.source_datapipe: + if size is None: + size = len(df.index) + for i in range(len(df.index)): + all_buffer.append(df[i : i + 1]) + filter_res.append(self.filter_fn(df.iloc[i])) + + buffer = [] + for df, res in zip(all_buffer, filter_res, strict=True): + if res: + buffer.append(df) + if len(buffer) == size: + yield df_wrapper.concat(buffer) + buffer = [] + if buffer: + yield df_wrapper.concat(buffer) + + +@functional_datapipe("_to_dataframes_pipe", enable_df_api_tracing=True) +class ExampleAggregateAsDataFrames(DFIterDataPipe): + def __init__(self, source_datapipe, dataframe_size=10, columns=None) -> None: + self.source_datapipe = source_datapipe + self.columns = columns + self.dataframe_size = dataframe_size + + def _as_list(self, item): + try: + return list(item) + except ( + Exception + ): # TODO(VitalyFedyunin): Replace with better iterable exception + return [item] + + def __iter__(self): + aggregate = [] + for item in self.source_datapipe: + aggregate.append(self._as_list(item)) + if len(aggregate) == self.dataframe_size: + yield df_wrapper.create_dataframe(aggregate, columns=self.columns) + aggregate = [] + if len(aggregate) > 0: + yield df_wrapper.create_dataframe(aggregate, columns=self.columns) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/dataframe/structures.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/dataframe/structures.py new file mode 100644 index 0000000000000000000000000000000000000000..26b4c33db03cc584f223444c07730ef67f4495e7 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/dataframe/structures.py @@ -0,0 +1,22 @@ +from collections.abc import Iterator +from typing import Any + +from torch.utils.data.datapipes.dataframe import dataframe_wrapper as df_wrapper +from torch.utils.data.datapipes.datapipe import DataChunk + + +__all__ = ["DataChunkDF"] + + +class DataChunkDF(DataChunk): + """DataChunkDF iterating over individual items inside of DataFrame containers, to access DataFrames user `raw_iterator`.""" + + def __iter__(self) -> Iterator[Any]: + for df in self.items: + yield from df_wrapper.iterate(df) + + def __len__(self) -> int: + total_len = 0 + for df in self.items: + total_len += df_wrapper.get_len(df) + return total_len diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/datapipe.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/datapipe.py new file mode 100644 index 0000000000000000000000000000000000000000..51c1689008530b1ec4e78c9c921fd9aa6629ecfb --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/datapipe.py @@ -0,0 +1,427 @@ +import functools +import pickle +from collections.abc import Callable, Iterable, Iterator +from typing import TypeVar + +from torch.utils._import_utils import import_dill +from torch.utils.data.datapipes._hook_iterator import _SnapshotState +from torch.utils.data.datapipes._typing import _DataPipeMeta, _IterDataPipeMeta +from torch.utils.data.datapipes.utils.common import ( + _deprecation_warning, + _iter_deprecated_functional_names, + _map_deprecated_functional_names, +) +from torch.utils.data.dataset import Dataset, IterableDataset + + +dill = import_dill() +HAS_DILL = dill is not None + +__all__ = [ + "DataChunk", + "DFIterDataPipe", + "IterDataPipe", + "MapDataPipe", +] + + +_T = TypeVar("_T") +_T_co = TypeVar("_T_co", covariant=True) + +UNTRACABLE_DATAFRAME_PIPES = [ + "batch", # As it returns DataChunks + "groupby", # As it returns DataChunks + "_dataframes_as_tuples", # As it unpacks DF + "trace_as_dataframe", # As it used to mark DF for tracing +] + + +class DataChunk(list[_T]): + def __init__(self, items: Iterable[_T]) -> None: + items = list(items) + super().__init__(items) + self.items = items + + def as_str(self, indent: str = "") -> str: + return indent + "[" + ", ".join(str(i) for i in iter(self)) + "]" + + def __iter__(self) -> Iterator[_T]: + yield from super().__iter__() + + def raw_iterator(self) -> Iterator[_T]: + yield from self.items + + +class IterDataPipe(IterableDataset[_T_co], metaclass=_IterDataPipeMeta): + r""" + Iterable-style DataPipe. + + All DataPipes that represent an iterable of data samples should subclass this. + This style of DataPipes is particularly useful when data come from a stream, or + when the number of samples is too large to fit them all in memory. ``IterDataPipe`` is lazily initialized and its + elements are computed only when ``next()`` is called on the iterator of an ``IterDataPipe``. + + All subclasses should overwrite :meth:`__iter__`, which would return an + iterator of samples in this DataPipe. Calling ``__iter__`` of an ``IterDataPipe`` automatically invokes its + method ``reset()``, which by default performs no operation. When writing a custom ``IterDataPipe``, users should + override ``reset()`` if necessary. The common usages include resetting buffers, pointers, + and various state variables within the custom ``IterDataPipe``. + + Note: + Only `one` iterator can be valid for each ``IterDataPipe`` at a time, + and the creation a second iterator will invalidate the first one. This constraint is necessary because + some ``IterDataPipe`` have internal buffers, whose states can become invalid if there are multiple iterators. + The code example below presents details on how this constraint looks in practice. + If you have any feedback related to this constraint, please see `GitHub IterDataPipe Single Iterator Issue`_. + + These DataPipes can be invoked in two ways, using the class constructor or applying their + functional form onto an existing ``IterDataPipe`` (recommended, available to most but not all DataPipes). + You can chain multiple `IterDataPipe` together to form a pipeline that will perform multiple + operations in succession. + + .. _GitHub IterDataPipe Single Iterator Issue: + https://github.com/pytorch/data/issues/45 + + Note: + When a subclass is used with :class:`~torch.utils.data.DataLoader`, each + item in the DataPipe will be yielded from the :class:`~torch.utils.data.DataLoader` + iterator. When :attr:`num_workers > 0`, each worker process will have a + different copy of the DataPipe object, so it is often desired to configure + each copy independently to avoid having duplicate data returned from the + workers. :func:`~torch.utils.data.get_worker_info`, when called in a worker + process, returns information about the worker. It can be used in either the + dataset's :meth:`__iter__` method or the :class:`~torch.utils.data.DataLoader` 's + :attr:`worker_init_fn` option to modify each copy's behavior. + + Examples: + General Usage: + >>> # xdoctest: +SKIP + >>> from torchdata.datapipes.iter import IterableWrapper, Mapper + >>> dp = IterableWrapper(range(10)) + >>> map_dp_1 = Mapper(dp, lambda x: x + 1) # Using class constructor + >>> map_dp_2 = dp.map( + ... lambda x: x + 1 + ... ) # Using functional form (recommended) + >>> list(map_dp_1) + [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + >>> list(map_dp_2) + [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + >>> filter_dp = map_dp_1.filter(lambda x: x % 2 == 0) + >>> list(filter_dp) + [2, 4, 6, 8, 10] + Single Iterator Constraint Example: + >>> from torchdata.datapipes.iter import IterableWrapper, Mapper + >>> source_dp = IterableWrapper(range(10)) + >>> it1 = iter(source_dp) + >>> list(it1) + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + >>> it1 = iter(source_dp) + >>> it2 = iter( + ... source_dp + ... ) # The creation of a new iterator invalidates `it1` + >>> next(it2) + 0 + >>> next(it1) # Further usage of `it1` will raise a `RunTimeError` + """ + + functions: dict[str, Callable] = {} + reduce_ex_hook: Callable | None = None + getstate_hook: Callable | None = None + str_hook: Callable | None = None + repr_hook: Callable | None = None + _valid_iterator_id: int | None = None + _number_of_samples_yielded: int = 0 + _snapshot_state: _SnapshotState = _SnapshotState.NotStarted + _fast_forward_iterator: Iterator | None = None + + def __iter__(self) -> Iterator[_T_co]: + # pyrefly: ignore [bad-return] + return self + + def __getattr__(self, attribute_name): + if attribute_name in IterDataPipe.functions: + if attribute_name in _iter_deprecated_functional_names: + kwargs = _iter_deprecated_functional_names[attribute_name] + _deprecation_warning(**kwargs) + f = IterDataPipe.functions[attribute_name] + function = functools.partial(f, self) + functools.update_wrapper(wrapper=function, wrapped=f, assigned=("__doc__",)) + return function + else: + raise AttributeError( + f"'{self.__class__.__name__}' object has no attribute '{attribute_name}" + ) + + @classmethod + def register_function(cls, function_name, function) -> None: + cls.functions[function_name] = function + + @classmethod + def register_datapipe_as_function( + cls, function_name, cls_to_register, enable_df_api_tracing=False + ) -> None: + if function_name in cls.functions: + raise Exception( # noqa: TRY002 + f"Unable to add DataPipe function name {function_name} as it is already taken" + ) + + def class_function(cls, enable_df_api_tracing, source_dp, *args, **kwargs): + result_pipe = cls(source_dp, *args, **kwargs) + if isinstance(result_pipe, IterDataPipe): + if enable_df_api_tracing or isinstance(source_dp, DFIterDataPipe): + if function_name not in UNTRACABLE_DATAFRAME_PIPES: + result_pipe = result_pipe.trace_as_dataframe() + + return result_pipe + + function = functools.partial( + class_function, cls_to_register, enable_df_api_tracing + ) + functools.update_wrapper( + wrapper=function, wrapped=cls_to_register, assigned=("__doc__",) + ) + cls.functions[function_name] = function + + def __getstate__(self): + """ + Serialize `lambda` functions when `dill` is available. + + If this doesn't cover your custom DataPipe's use case, consider writing custom methods for + `__getstate__` and `__setstate__`, or use `pickle.dumps` for serialization. + """ + state = self.__dict__ + if IterDataPipe.getstate_hook is not None: + return IterDataPipe.getstate_hook(state) + return state + + def __reduce_ex__(self, *args, **kwargs): + if IterDataPipe.reduce_ex_hook is not None: + try: + return IterDataPipe.reduce_ex_hook(self) + except NotImplementedError: + pass + return super().__reduce_ex__(*args, **kwargs) + + @classmethod + def set_getstate_hook(cls, hook_fn) -> None: + if IterDataPipe.getstate_hook is not None and hook_fn is not None: + raise RuntimeError("Attempt to override existing getstate_hook") + IterDataPipe.getstate_hook = hook_fn + + @classmethod + def set_reduce_ex_hook(cls, hook_fn) -> None: + if IterDataPipe.reduce_ex_hook is not None and hook_fn is not None: + raise RuntimeError("Attempt to override existing reduce_ex_hook") + IterDataPipe.reduce_ex_hook = hook_fn + + def __repr__(self) -> str: + if self.repr_hook is not None: + return self.repr_hook(self) + # Instead of showing , return the class name + return str(self.__class__.__qualname__) + + def __str__(self) -> str: + if self.str_hook is not None: + return self.str_hook(self) + # Instead of showing , return the class name + return str(self.__class__.__qualname__) + + def __dir__(self): + # for auto-completion in a REPL (e.g. Jupyter notebook) + return list(super().__dir__()) + list(self.functions.keys()) + + def reset(self) -> None: + r""" + Reset the `IterDataPipe` to the initial state. + + By default, no-op. For subclasses of `IterDataPipe`, depending on their functionalities, + they may want to override this method with implementations that + may clear the buffers and reset pointers of the DataPipe. + The `reset` method is always called when `__iter__` is called as part of `hook_iterator`. + """ + + +class DFIterDataPipe(IterDataPipe): + def _is_dfpipe(self) -> bool: + return True + + +class MapDataPipe(Dataset[_T_co], metaclass=_DataPipeMeta): + r""" + Map-style DataPipe. + + All datasets that represent a map from keys to data samples should subclass this. + Subclasses should overwrite :meth:`__getitem__`, supporting fetching a + data sample for a given, unique key. Subclasses can also optionally overwrite + :meth:`__len__`, which is expected to return the size of the dataset by many + :class:`~torch.utils.data.Sampler` implementations and the default options + of :class:`~torch.utils.data.DataLoader`. + + These DataPipes can be invoked in two ways, using the class constructor or applying their + functional form onto an existing `MapDataPipe` (recommend, available to most but not all DataPipes). + + Note: + :class:`~torch.utils.data.DataLoader` by default constructs an index + sampler that yields integral indices. To make it work with a map-style + DataPipe with non-integral indices/keys, a custom sampler must be provided. + + Example: + >>> # xdoctest: +SKIP + >>> from torchdata.datapipes.map import SequenceWrapper, Mapper + >>> dp = SequenceWrapper(range(10)) + >>> map_dp_1 = dp.map(lambda x: x + 1) # Using functional form (recommended) + >>> list(map_dp_1) + [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + >>> map_dp_2 = Mapper(dp, lambda x: x + 1) # Using class constructor + >>> list(map_dp_2) + [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + >>> batch_dp = map_dp_1.batch(batch_size=2) + >>> list(batch_dp) + [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]] + """ + + functions: dict[str, Callable] = {} + reduce_ex_hook: Callable | None = None + getstate_hook: Callable | None = None + str_hook: Callable | None = None + repr_hook: Callable | None = None + + def __getattr__(self, attribute_name): + if attribute_name in MapDataPipe.functions: + if attribute_name in _map_deprecated_functional_names: + kwargs = _map_deprecated_functional_names[attribute_name] + _deprecation_warning(**kwargs) + f = MapDataPipe.functions[attribute_name] + function = functools.partial(f, self) + functools.update_wrapper(wrapper=function, wrapped=f, assigned=("__doc__",)) + return function + else: + raise AttributeError( + f"'{self.__class__.__name__}' object has no attribute '{attribute_name}" + ) + + @classmethod + def register_function(cls, function_name, function) -> None: + cls.functions[function_name] = function + + @classmethod + def register_datapipe_as_function(cls, function_name, cls_to_register) -> None: + if function_name in cls.functions: + raise Exception( # noqa: TRY002 + f"Unable to add DataPipe function name {function_name} as it is already taken" + ) + + def class_function(cls, source_dp, *args, **kwargs): + result_pipe = cls(source_dp, *args, **kwargs) + return result_pipe + + function = functools.partial(class_function, cls_to_register) + functools.update_wrapper( + wrapper=function, wrapped=cls_to_register, assigned=("__doc__",) + ) + cls.functions[function_name] = function + + def __getstate__(self): + """ + Serialize `lambda` functions when `dill` is available. + + If this doesn't cover your custom DataPipe's use case, consider writing custom methods for + `__getstate__` and `__setstate__`, or use `pickle.dumps` for serialization. + """ + state = self.__dict__ + if MapDataPipe.getstate_hook is not None: + return MapDataPipe.getstate_hook(state) + return state + + def __reduce_ex__(self, *args, **kwargs): + if MapDataPipe.reduce_ex_hook is not None: + try: + return MapDataPipe.reduce_ex_hook(self) + except NotImplementedError: + pass + return super().__reduce_ex__(*args, **kwargs) + + @classmethod + def set_getstate_hook(cls, hook_fn) -> None: + if MapDataPipe.getstate_hook is not None and hook_fn is not None: + raise RuntimeError("Attempt to override existing getstate_hook") + MapDataPipe.getstate_hook = hook_fn + + @classmethod + def set_reduce_ex_hook(cls, hook_fn) -> None: + if MapDataPipe.reduce_ex_hook is not None and hook_fn is not None: + raise RuntimeError("Attempt to override existing reduce_ex_hook") + MapDataPipe.reduce_ex_hook = hook_fn + + def __repr__(self) -> str: + if self.repr_hook is not None: + return self.repr_hook(self) + # Instead of showing , return the class name + return str(self.__class__.__qualname__) + + def __str__(self) -> str: + if self.str_hook is not None: + return self.str_hook(self) + # Instead of showing , return the class name + return str(self.__class__.__qualname__) + + def __dir__(self): + # for auto-completion in a REPL (e.g. Jupyter notebook) + return list(super().__dir__()) + list(self.functions.keys()) + + +class _DataPipeSerializationWrapper: + def __init__(self, datapipe) -> None: + self._datapipe = datapipe + + def __getstate__(self): + use_dill = False + try: + value = pickle.dumps(self._datapipe) + except Exception: + if HAS_DILL: + # pyrefly: ignore [missing-attribute] + value = dill.dumps(self._datapipe) + use_dill = True + else: + raise + return (value, use_dill) + + def __setstate__(self, state): + value, use_dill = state + if use_dill: + # pyrefly: ignore [missing-attribute] + self._datapipe = dill.loads(value) + else: + self._datapipe = pickle.loads(value) + + def __len__(self) -> int: + try: + return len(self._datapipe) + except Exception as e: + raise TypeError( + f"{type(self).__name__} instance doesn't have valid length" + ) from e + + +class _IterDataPipeSerializationWrapper(_DataPipeSerializationWrapper, IterDataPipe): + def __init__(self, datapipe: IterDataPipe[_T_co]) -> None: + super().__init__(datapipe) + # pyrefly: ignore [invalid-type-var] + self._datapipe_iter: Iterator[_T_co] | None = None + + def __iter__(self) -> "_IterDataPipeSerializationWrapper": + self._datapipe_iter = iter(self._datapipe) + return self + + def __next__(self) -> _T_co: # type: ignore[type-var] + if self._datapipe_iter is None: + raise AssertionError( + "Iterator has not been initialized; call __iter__() before __next__()" + ) + return next(self._datapipe_iter) + + +class _MapDataPipeSerializationWrapper(_DataPipeSerializationWrapper, MapDataPipe): + def __getitem__(self, idx): + return self._datapipe[idx] diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/datapipe.pyi b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/datapipe.pyi new file mode 100644 index 0000000000000000000000000000000000000000..7f49cc212383b2a635c36e1dc96c040d1d63868d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/datapipe.pyi @@ -0,0 +1,746 @@ +# @generated by torch/utils/data/datapipes/gen_pyi.py from datapipe.pyi.in +# mypy: allow-untyped-defs +# This base template ("datapipe.pyi.in") is generated from mypy stubgen with minimal editing for code injection +# The output file will be "datapipe.pyi". This is executed as part of torch/CMakeLists.txt +# Note that, for mypy, .pyi file takes precedent over .py file, such that we must define the interface for other +# classes/objects here, even though we are not injecting extra code into them at the moment. + +from collections.abc import Callable, Iterable, Iterator +from typing import Any, Literal, TypeVar + +from torch.utils.data import Dataset, default_collate, IterableDataset +from torch.utils.data.datapipes._hook_iterator import _SnapshotState +from torch.utils.data.datapipes._typing import _DataPipeMeta, _IterDataPipeMeta + +_T = TypeVar("_T") +_T_co = TypeVar("_T_co", covariant=True) +UNTRACABLE_DATAFRAME_PIPES: Any + +class DataChunk(list[_T]): + items: list[_T] + def __init__(self, items: Iterable[_T]) -> None: ... + def as_str(self, indent: str = "") -> str: ... + def __iter__(self) -> Iterator[_T]: ... + def raw_iterator(self) -> Iterator[_T]: ... + +class MapDataPipe(Dataset[_T_co], metaclass=_DataPipeMeta): + functions: dict[str, Callable] = ... + reduce_ex_hook: Callable | None = ... + getstate_hook: Callable | None = ... + str_hook: Callable | None = ... + repr_hook: Callable | None = ... + def __getattr__(self, attribute_name: Any): ... + @classmethod + def register_function(cls, function_name: Any, function: Any) -> None: ... + @classmethod + def register_datapipe_as_function( + cls, + function_name: Any, + cls_to_register: Any, + ): ... + def __getstate__(self): ... + def __reduce_ex__(self, *args: Any, **kwargs: Any): ... + @classmethod + def set_getstate_hook(cls, hook_fn: Any) -> None: ... + @classmethod + def set_reduce_ex_hook(cls, hook_fn: Any) -> None: ... + # Functional form of 'BatcherMapDataPipe' + def batch( + self, + batch_size: int, + drop_last: bool = False, + wrapper_class: type[DataChunk] = DataChunk, + ) -> MapDataPipe: + r""" + Create mini-batches of data (functional name: ``batch``). + + An outer dimension will be added as ``batch_size`` if ``drop_last`` is set to ``True``, + or ``length % batch_size`` for the last batch if ``drop_last`` is set to ``False``. + + Args: + datapipe: Iterable DataPipe being batched + batch_size: The size of each batch + drop_last: Option to drop the last batch if it's not full + + Example: + >>> # xdoctest: +SKIP + >>> from torchdata.datapipes.map import SequenceWrapper + >>> dp = SequenceWrapper(range(10)) + >>> batch_dp = dp.batch(batch_size=2) + >>> list(batch_dp) + [[0, 1], [2, 3], [4, 5], [6, 7], [8, 9]] + """ + # Functional form of 'ConcaterMapDataPipe' + def concat(self, *datapipes: MapDataPipe) -> MapDataPipe: + r""" + Concatenate multiple Map DataPipes (functional name: ``concat``). + + The new index of is the cumulative sum of source DataPipes. + For example, if there are 2 source DataPipes both with length 5, + index 0 to 4 of the resulting `ConcatMapDataPipe` would refer to + elements of the first DataPipe, and 5 to 9 would refer to elements + of the second DataPipe. + + Args: + datapipes: Map DataPipes being concatenated + + Example: + >>> # xdoctest: +SKIP + >>> from torchdata.datapipes.map import SequenceWrapper + >>> dp1 = SequenceWrapper(range(3)) + >>> dp2 = SequenceWrapper(range(3)) + >>> concat_dp = dp1.concat(dp2) + >>> list(concat_dp) + [0, 1, 2, 0, 1, 2] + """ + # Functional form of 'MapperMapDataPipe' + def map(self, fn: Callable = ...) -> MapDataPipe: + r""" + Apply the input function over each item from the source DataPipe (functional name: ``map``). + + The function can be any regular Python function or partial object. Lambda + function is not recommended as it is not supported by pickle. + + Args: + datapipe: Source MapDataPipe + fn: Function being applied to each item + + Example: + >>> # xdoctest: +SKIP + >>> from torchdata.datapipes.map import SequenceWrapper, Mapper + >>> def add_one(x): + ... return x + 1 + >>> dp = SequenceWrapper(range(10)) + >>> map_dp_1 = dp.map(add_one) + >>> list(map_dp_1) + [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + >>> map_dp_2 = Mapper(dp, lambda x: x + 1) + >>> list(map_dp_2) + [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + """ + # Functional form of 'ShufflerIterDataPipe' + def shuffle(self, *, indices: list | None = None) -> IterDataPipe: + r""" + Shuffle the input MapDataPipe via its indices (functional name: ``shuffle``). + + When it is used with :class:`~torch.utils.data.DataLoader`, the methods to + set up random seed are different based on :attr:`num_workers`. + + For single-process mode (:attr:`num_workers == 0`), the random seed is set before + the :class:`~torch.utils.data.DataLoader` in the main process. For multi-process + mode (:attr:`num_worker > 0`), ``worker_init_fn`` is used to set up a random seed + for each worker process. + + Args: + datapipe: MapDataPipe being shuffled + indices: a list of indices of the MapDataPipe. If not provided, we assume it uses 0-based indexing + + Example: + >>> # xdoctest: +SKIP + >>> from torchdata.datapipes.map import SequenceWrapper + >>> dp = SequenceWrapper(range(10)) + >>> shuffle_dp = dp.shuffle().set_seed(0) + >>> list(shuffle_dp) + [7, 8, 1, 5, 3, 4, 2, 0, 9, 6] + >>> list(shuffle_dp) + [6, 1, 9, 5, 2, 4, 7, 3, 8, 0] + >>> # Reset seed for Shuffler + >>> shuffle_dp = shuffle_dp.set_seed(0) + >>> list(shuffle_dp) + [7, 8, 1, 5, 3, 4, 2, 0, 9, 6] + + Note: + Even thought this ``shuffle`` operation takes a ``MapDataPipe`` as the input, it would return an + ``IterDataPipe`` rather than a ``MapDataPipe``, because ``MapDataPipe`` should be non-sensitive to + the order of data order for the sake of random reads, but ``IterDataPipe`` depends on the order + of data during data-processing. + """ + # Functional form of 'ZipperMapDataPipe' + def zip(self, *datapipes: MapDataPipe[_T_co]) -> MapDataPipe: + r""" + Aggregates elements into a tuple from each of the input DataPipes (functional name: ``zip``). + + This MataPipe is out of bound as soon as the shortest input DataPipe is exhausted. + + Args: + *datapipes: Map DataPipes being aggregated + + Example: + >>> # xdoctest: +SKIP + >>> from torchdata.datapipes.map import SequenceWrapper + >>> dp1 = SequenceWrapper(range(3)) + >>> dp2 = SequenceWrapper(range(10, 13)) + >>> zip_dp = dp1.zip(dp2) + >>> list(zip_dp) + [(0, 10), (1, 11), (2, 12)] + """ + +class IterDataPipe(IterableDataset[_T_co], metaclass=_IterDataPipeMeta): + functions: dict[str, Callable] = ... + reduce_ex_hook: Callable | None = ... + getstate_hook: Callable | None = ... + str_hook: Callable | None = ... + repr_hook: Callable | None = ... + _number_of_samples_yielded: int = ... + _snapshot_state: _SnapshotState = _SnapshotState.Iterating # noqa: PYI015 + _fast_forward_iterator: Iterator | None = ... + def __getattr__(self, attribute_name: Any): ... + @classmethod + def register_function(cls, function_name: Any, function: Any) -> None: ... + @classmethod + def register_datapipe_as_function( + cls, + function_name: Any, + cls_to_register: Any, + enable_df_api_tracing: bool = ..., + ): ... + def __getstate__(self): ... + def __reduce_ex__(self, *args: Any, **kwargs: Any): ... + @classmethod + def set_getstate_hook(cls, hook_fn: Any) -> None: ... + @classmethod + def set_reduce_ex_hook(cls, hook_fn: Any) -> None: ... + # Functional form of 'BatcherIterDataPipe' + def batch( + self, + batch_size: int, + drop_last: bool = False, + wrapper_class: type[DataChunk] = DataChunk, + ) -> IterDataPipe: + r""" + Creates mini-batches of data (functional name: ``batch``). + + An outer dimension will be added as ``batch_size`` if ``drop_last`` is set to ``True``, or ``length % batch_size`` for the + last batch if ``drop_last`` is set to ``False``. + + Args: + datapipe: Iterable DataPipe being batched + batch_size: The size of each batch + drop_last: Option to drop the last batch if it's not full + wrapper_class: wrapper to apply onto each batch (type ``List``) before yielding, + defaults to ``DataChunk`` + + Example: + >>> # xdoctest: +SKIP + >>> from torchdata.datapipes.iter import IterableWrapper + >>> dp = IterableWrapper(range(10)) + >>> dp = dp.batch(batch_size=3, drop_last=True) + >>> list(dp) + [[0, 1, 2], [3, 4, 5], [6, 7, 8]] + """ + # Functional form of 'CollatorIterDataPipe' + def collate( + self, + conversion: Callable[..., Any]| dict[str | Any, Callable | Any]| None = default_collate, + collate_fn: Callable | None = None, + ) -> IterDataPipe: # fmt: skip + r""" + Collates samples from DataPipe to Tensor(s) by a custom collate function (functional name: ``collate``). + + By default, it uses :func:`torch.utils.data.default_collate`. + + .. note:: + While writing a custom collate function, you can import :func:`torch.utils.data.default_collate` for the + default behavior and `functools.partial` to specify any additional arguments. + + Args: + datapipe: Iterable DataPipe being collated + collate_fn: Customized collate function to collect and combine data or a batch of data. + Default function collates to Tensor(s) based on data type. + + Example: + >>> # xdoctest: +SKIP + >>> # Convert integer data to float Tensor + >>> class MyIterDataPipe(torch.utils.data.IterDataPipe): + ... def __init__(self, start, end): + ... super(MyIterDataPipe).__init__() + ... assert end > start, "this example only works with end >= start" + ... self.start = start + ... self.end = end + ... + ... def __iter__(self): + ... return iter(range(self.start, self.end)) + ... + ... def __len__(self): + ... return self.end - self.start + >>> ds = MyIterDataPipe(start=3, end=7) + >>> print(list(ds)) + [3, 4, 5, 6] + >>> def collate_fn(batch): + ... return torch.tensor(batch, dtype=torch.float) + >>> collated_ds = CollateIterDataPipe(ds, collate_fn=collate_fn) + >>> print(list(collated_ds)) + [tensor(3.), tensor(4.), tensor(5.), tensor(6.)] + """ + # Functional form of 'ConcaterIterDataPipe' + def concat(self, *datapipes: IterDataPipe) -> IterDataPipe: + r""" + Concatenates multiple Iterable DataPipes (functional name: ``concat``). + + The resulting DataPipe will yield all the elements from the first input DataPipe, before yielding from the subsequent ones. + + Args: + datapipes: Iterable DataPipes being concatenated + + Example: + >>> # xdoctest: +REQUIRES(module:torchdata) + >>> import random + >>> from torchdata.datapipes.iter import IterableWrapper + >>> dp1 = IterableWrapper(range(3)) + >>> dp2 = IterableWrapper(range(5)) + >>> list(dp1.concat(dp2)) + [0, 1, 2, 0, 1, 2, 3, 4] + """ + # Functional form of 'DemultiplexerIterDataPipe' + def demux( + self, + num_instances: int, + classifier_fn: Callable[[_T_co], int | None], + drop_none: bool = False, + buffer_size: int = 1000, + ) -> list[IterDataPipe]: + r""" + Splits the input DataPipe into multiple child DataPipes, using the given classification function (functional name: ``demux``). + + A list of the child DataPipes is returned from this operation. + + Args: + datapipe: Iterable DataPipe being filtered + num_instances: number of instances of the DataPipe to create + classifier_fn: a function that maps values to an integer within the range ``[0, num_instances - 1]`` or ``None`` + drop_none: defaults to ``False``, if ``True``, the function will skip over elements classified as ``None`` + buffer_size: this defines the maximum number of inputs that the buffer can hold across all child + DataPipes while waiting for their values to be yielded. + Defaults to ``1000``. Use ``-1`` for the unlimited buffer. + + Examples: + >>> # xdoctest: +REQUIRES(module:torchdata) + >>> from torchdata.datapipes.iter import IterableWrapper + >>> def odd_or_even(n): + ... return n % 2 + >>> source_dp = IterableWrapper(range(5)) + >>> dp1, dp2 = source_dp.demux(num_instances=2, classifier_fn=odd_or_even) + >>> list(dp1) + [0, 2, 4] + >>> list(dp2) + [1, 3] + >>> # It can also filter out any element that gets `None` from the `classifier_fn` + >>> def odd_or_even_no_zero(n): + ... return n % 2 if n != 0 else None + >>> dp1, dp2 = source_dp.demux( + ... num_instances=2, classifier_fn=odd_or_even_no_zero, drop_none=True + ... ) + >>> list(dp1) + [2, 4] + >>> list(dp2) + [1, 3] + """ + # Functional form of 'FilterIterDataPipe' + def filter(self, filter_fn: Callable, input_col=None) -> IterDataPipe: + r""" + Filters out elements from the source datapipe according to input ``filter_fn`` (functional name: ``filter``). + + Args: + datapipe: Iterable DataPipe being filtered + filter_fn: Customized function mapping an element to a boolean. + input_col: Index or indices of data which ``filter_fn`` is applied, such as: + + - ``None`` as default to apply ``filter_fn`` to the data directly. + - Integer(s) is used for list/tuple. + - Key(s) is used for dict. + + Example: + >>> # xdoctest: +SKIP + >>> from torchdata.datapipes.iter import IterableWrapper + >>> def is_even(n): + ... return n % 2 == 0 + >>> dp = IterableWrapper(range(5)) + >>> filter_dp = dp.filter(filter_fn=is_even) + >>> list(filter_dp) + [0, 2, 4] + """ + # Functional form of 'ForkerIterDataPipe' + def fork( + self, + num_instances: int, + buffer_size: int = 1000, + copy: Literal["shallow", "deep"] | None = None, + ) -> list[IterDataPipe]: + r""" + Creates multiple instances of the same Iterable DataPipe (functional name: ``fork``). + + Args: + datapipe: Iterable DataPipe being copied + num_instances: number of instances of the datapipe to create + buffer_size: this restricts how far ahead the leading child DataPipe + can read relative to the slowest child DataPipe. + Defaults to ``1000``. Use ``-1`` for the unlimited buffer. + copy: copy strategy to use for items yielded by each branch. Supported + options are ``None`` for no copying, ``"shallow"`` for shallow object + copies, and ``"deep"`` for deep object copies. Defaults to ``None``. + + Note: + All branches of the forked pipeline return the identical object unless + the copy parameter is supplied. If the object is mutable or contains + mutable objects, changing them in one branch will affect all others. + + Example: + >>> # xdoctest: +REQUIRES(module:torchdata) + >>> from torchdata.datapipes.iter import IterableWrapper + >>> source_dp = IterableWrapper(range(5)) + >>> dp1, dp2 = source_dp.fork(num_instances=2) + >>> list(dp1) + [0, 1, 2, 3, 4] + >>> list(dp2) + [0, 1, 2, 3, 4] + """ + # Functional form of 'GrouperIterDataPipe' + def groupby( + self, + group_key_fn: Callable[[_T_co], Any], + *, + keep_key: bool = False, + buffer_size: int = 10000, + group_size: int | None = None, + guaranteed_group_size: int | None = None, + drop_remaining: bool = False, + ) -> IterDataPipe: + r""" + Groups data from IterDataPipe by keys from ``group_key_fn``, yielding a ``DataChunk`` with batch size up to ``group_size``. + + (functional name: ``groupby``). + + The samples are read sequentially from the source ``datapipe``, and a batch of samples belonging to the same group + will be yielded as soon as the size of the batch reaches ``group_size``. When the buffer is full, + the DataPipe will yield the largest batch with the same key, provided that its size is larger + than ``guaranteed_group_size``. If its size is smaller, it will be dropped if ``drop_remaining=True``. + + After iterating through the entirety of source ``datapipe``, everything not dropped due to the buffer capacity + will be yielded from the buffer, even if the group sizes are smaller than ``guaranteed_group_size``. + + Args: + datapipe: Iterable datapipe to be grouped + group_key_fn: Function used to generate group key from the data of the source datapipe + keep_key: Option to yield the matching key along with the items in a tuple, + resulting in `(key, [items])` otherwise returning [items] + buffer_size: The size of buffer for ungrouped data + group_size: The max size of each group, a batch is yielded as soon as it reaches this size + guaranteed_group_size: The guaranteed minimum group size to be yielded in case the buffer is full + drop_remaining: Specifies if the group smaller than ``guaranteed_group_size`` will be dropped from buffer + when the buffer is full + + Example: + >>> import os + >>> # xdoctest: +SKIP + >>> from torchdata.datapipes.iter import IterableWrapper + >>> def group_fn(file): + ... return os.path.basename(file).split(".")[0] + >>> source_dp = IterableWrapper( + ... ["a.png", "b.png", "a.json", "b.json", "a.jpg", "c.json"] + ... ) + >>> dp0 = source_dp.groupby(group_key_fn=group_fn) + >>> list(dp0) + [['a.png', 'a.json', 'a.jpg'], ['b.png', 'b.json'], ['c.json']] + >>> # A group is yielded as soon as its size equals to `group_size` + >>> dp1 = source_dp.groupby(group_key_fn=group_fn, group_size=2) + >>> list(dp1) + [['a.png', 'a.json'], ['b.png', 'b.json'], ['a.jpg'], ['c.json']] + >>> # Scenario where `buffer` is full, and group 'a' needs to be yielded since its size > `guaranteed_group_size` + >>> dp2 = source_dp.groupby( + ... group_key_fn=group_fn, + ... buffer_size=3, + ... group_size=3, + ... guaranteed_group_size=2, + ... ) + >>> list(dp2) + [['a.png', 'a.json'], ['b.png', 'b.json'], ['a.jpg'], ['c.json']] + """ + # Functional form of 'FileListerIterDataPipe' + def list_files( + self, + masks: str | list[str] = "", + *, + recursive: bool = False, + abspath: bool = False, + non_deterministic: bool = False, + length: int = -1, + ) -> IterDataPipe: + r""" + Given path(s) to the root directory, yields file pathname(s) (path + filename) of files within the root directory. + + Multiple root directories can be provided (functional name: ``list_files``). + + Args: + root: Root directory or a sequence of root directories + masks: Unix style filter string or string list for filtering file name(s) + recursive: Whether to return pathname from nested directories or not + abspath: Whether to return relative pathname or absolute pathname + non_deterministic: Whether to return pathname in sorted order or not. + If ``False``, the results yielded from each root directory will be sorted + length: Nominal length of the datapipe + + Example: + >>> # xdoctest: +SKIP + >>> from torchdata.datapipes.iter import FileLister + >>> dp = FileLister(root=".", recursive=True) + >>> list(dp) + ['example.py', './data/data.tar'] + """ + # Functional form of 'MapperIterDataPipe' + def map( + self, + fn: Callable, + input_col=None, + output_col=None, + ) -> IterDataPipe: + r""" + Applies a function over each item from the source DataPipe (functional name: ``map``). + + The function can be any regular Python function or partial object. Lambda + function is not recommended as it is not supported by pickle. + + Args: + datapipe: Source Iterable DataPipe + fn: Function being applied over each item + input_col: Index or indices of data which ``fn`` is applied, such as: + + - ``None`` as default to apply ``fn`` to the data directly. + - Integer(s) is used for list/tuple. + - Key(s) is used for dict. + + output_col: Index of data where result of ``fn`` is placed. ``output_col`` can be specified + only when ``input_col`` is not ``None`` + + - ``None`` as default to replace the index that ``input_col`` specified; For ``input_col`` with + multiple indices, the left-most one is used, and other indices will be removed. + - Integer is used for list/tuple. ``-1`` represents to append result at the end. + - Key is used for dict. New key is acceptable. + + Example: + >>> # xdoctest: +SKIP + >>> from torchdata.datapipes.iter import IterableWrapper, Mapper + >>> def add_one(x): + ... return x + 1 + >>> dp = IterableWrapper(range(10)) + >>> # Invocation via functional form is preferred + ... map_dp_1 = dp.map(add_one) + >>> list(map_dp_1) + [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + >>> # We discourage the usage of `lambda` functions as they are not serializable with `pickle` + >>> # Use `functools.partial` or explicitly define the function instead + >>> map_dp_2 = Mapper(dp, lambda x: x + 1) + >>> list(map_dp_2) + [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + """ + # Functional form of 'MultiplexerIterDataPipe' + def mux(self, *datapipes) -> IterDataPipe: + r""" + Yields one element at a time from each of the input Iterable DataPipes (functional name: ``mux``). + + As in, one element from the 1st input DataPipe, then one element from the 2nd DataPipe in the next iteration, + and so on. It ends when the shortest input DataPipe is exhausted. + + Args: + datapipes: Iterable DataPipes that will take turn to yield their elements, until the shortest DataPipe is exhausted + + Example: + >>> # xdoctest: +REQUIRES(module:torchdata) + >>> from torchdata.datapipes.iter import IterableWrapper + >>> dp1, dp2, dp3 = ( + ... IterableWrapper(range(3)), + ... IterableWrapper(range(10, 15)), + ... IterableWrapper(range(20, 25)), + ... ) + >>> list(dp1.mux(dp2, dp3)) + [0, 10, 20, 1, 11, 21, 2, 12, 22] + """ + # Functional form of 'FileOpenerIterDataPipe' + def open_files( + self, + mode: str = "r", + encoding: str | None = None, + length: int = -1, + ) -> IterDataPipe: + r""" + Given pathnames, opens files and yield pathname and file stream in a tuple (functional name: ``open_files``). + + Args: + datapipe: Iterable datapipe that provides pathnames + mode: An optional string that specifies the mode in which + the file is opened by ``open()``. It defaults to ``r``, other options are + ``b`` for reading in binary mode and ``t`` for text mode. + encoding: An optional string that specifies the encoding of the + underlying file. It defaults to ``None`` to match the default encoding of ``open``. + length: Nominal length of the datapipe + + Note: + The opened file handles will be closed by Python's GC periodically. Users can choose + to close them explicitly. + + Example: + >>> # xdoctest: +SKIP + >>> from torchdata.datapipes.iter import ( + ... FileLister, + ... FileOpener, + ... StreamReader, + ... ) + >>> dp = FileLister(root=".").filter(lambda fname: fname.endswith(".txt")) + >>> dp = FileOpener(dp) + >>> dp = StreamReader(dp) + >>> list(dp) + [('./abc.txt', 'abc')] + """ + # Functional form of 'StreamReaderIterDataPipe' + def read_from_stream(self, chunk: int | None = None) -> IterDataPipe: + r""" + Given IO streams and their label names, yield bytes with label name as tuple. + + (functional name: ``read_from_stream``). + + Args: + datapipe: Iterable DataPipe provides label/URL and byte stream + chunk: Number of bytes to be read from stream per iteration. + If ``None``, all bytes will be read until the EOF. + + Example: + >>> # xdoctest: +SKIP + >>> from torchdata.datapipes.iter import IterableWrapper, StreamReader + >>> from io import StringIO + >>> dp = IterableWrapper([("alphabet", StringIO("abcde"))]) + >>> list(StreamReader(dp, chunk=1)) + [('alphabet', 'a'), ('alphabet', 'b'), ('alphabet', 'c'), ('alphabet', 'd'), ('alphabet', 'e')] + """ + # Functional form of 'RoutedDecoderIterDataPipe' + def routed_decode( + self, + *handlers: Callable, + key_fn: Callable = ..., + ) -> IterDataPipe: + r""" + Decodes binary streams from input DataPipe, yields pathname and decoded data in a tuple. + + (functional name: ``routed_decode``) + + Args: + datapipe: Iterable datapipe that provides pathname and binary stream in tuples + handlers: Optional user defined decoder handlers. If ``None``, basic and image decoder + handlers will be set as default. If multiple handles are provided, the priority + order follows the order of handlers (the first handler has the top priority) + key_fn: Function for decoder to extract key from pathname to dispatch handlers. + Default is set to extract file extension from pathname + + Note: + When ``key_fn`` is specified returning anything other than extension, the default + handler will not work and users need to specify custom handler. Custom handler + could use regex to determine the eligibility to handle data. + """ + # Functional form of 'ShardingFilterIterDataPipe' + def sharding_filter(self, sharding_group_filter=None) -> IterDataPipe: + r""" + Wrapper that allows DataPipe to be sharded (functional name: ``sharding_filter``). + + After ``apply_sharding`` is called, each instance of the DataPipe (on different workers) will have every `n`-th element of the + original DataPipe, where `n` equals to the number of instances. + + Args: + source_datapipe: Iterable DataPipe that will be sharded + """ + # Functional form of 'ShufflerIterDataPipe' + def shuffle( + self, + *, + buffer_size: int = 10000, + unbatch_level: int = 0, + ) -> IterDataPipe: + r""" + Shuffle the input DataPipe with a buffer (functional name: ``shuffle``). + + The buffer with ``buffer_size`` is filled with elements from the datapipe first. Then, + each item will be yielded from the buffer by reservoir sampling via iterator. + + ``buffer_size`` is required to be larger than ``0``. For ``buffer_size == 1``, the + datapipe is not shuffled. In order to fully shuffle all elements from datapipe, + ``buffer_size`` is required to be greater than or equal to the size of datapipe. + + When it is used with :class:`torch.utils.data.DataLoader`, the methods to + set up random seed are different based on :attr:`num_workers`. + + For single-process mode (:attr:`num_workers == 0`), the random seed is set before + the :class:`~torch.utils.data.DataLoader` in the main process. For multi-process + mode (:attr:`num_worker > 0`), `worker_init_fn` is used to set up a random seed + for each worker process. + + Args: + datapipe: The IterDataPipe being shuffled + buffer_size: The buffer size for shuffling (default to ``10000``) + unbatch_level: Specifies if it is necessary to unbatch source data before + applying the shuffle + + Example: + >>> # xdoctest: +SKIP + >>> from torchdata.datapipes.iter import IterableWrapper + >>> dp = IterableWrapper(range(10)) + >>> shuffle_dp = dp.shuffle() + >>> list(shuffle_dp) + [0, 4, 1, 6, 3, 2, 9, 5, 7, 8] + """ + # Functional form of 'UnBatcherIterDataPipe' + def unbatch(self, unbatch_level: int = 1) -> IterDataPipe: + r""" + Undos batching of data (functional name: ``unbatch``). + + In other words, it flattens the data up to the specified level within a batched DataPipe. + + Args: + datapipe: Iterable DataPipe being un-batched + unbatch_level: Defaults to ``1`` (only flattening the top level). If set to ``2``, + it will flatten the top two levels, and ``-1`` will flatten the entire DataPipe. + + Example: + >>> # xdoctest: +SKIP + >>> from torchdata.datapipes.iter import IterableWrapper + >>> source_dp = IterableWrapper([[[0, 1], [2]], [[3, 4], [5]], [[6]]]) + >>> dp1 = source_dp.unbatch() + >>> list(dp1) + [[0, 1], [2], [3, 4], [5], [6]] + >>> dp2 = source_dp.unbatch(unbatch_level=2) + >>> list(dp2) + [0, 1, 2, 3, 4, 5, 6] + """ + # Functional form of 'ZipperIterDataPipe' + def zip(self, *datapipes: IterDataPipe) -> IterDataPipe: + r""" + Aggregates elements into a tuple from each of the input DataPipes (functional name: ``zip``). + + The output is stopped as soon as the shortest input DataPipe is exhausted. + + Args: + *datapipes: Iterable DataPipes being aggregated + + Example: + >>> # xdoctest: +REQUIRES(module:torchdata) + >>> from torchdata.datapipes.iter import IterableWrapper + >>> dp1, dp2, dp3 = ( + ... IterableWrapper(range(5)), + ... IterableWrapper(range(10, 15)), + ... IterableWrapper(range(20, 25)), + ... ) + >>> list(dp1.zip(dp2, dp3)) + [(0, 10, 20), (1, 11, 21), (2, 12, 22), (3, 13, 23), (4, 14, 24)] + """ + +class DFIterDataPipe(IterDataPipe): + def _is_dfpipe(self): ... + def __iter__(self): ... + +class _DataPipeSerializationWrapper: + def __init__(self, datapipe): ... + def __getstate__(self): ... + def __setstate__(self, state): ... + def __len__(self): ... + +class _IterDataPipeSerializationWrapper(_DataPipeSerializationWrapper, IterDataPipe): + def __iter__(self): ... + +class _MapDataPipeSerializationWrapper(_DataPipeSerializationWrapper, MapDataPipe): + def __getitem__(self, idx): ... diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/gen_pyi.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/gen_pyi.py new file mode 100644 index 0000000000000000000000000000000000000000..90f9d80a2e7fef61459d525d32486211415ad3ed --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/gen_pyi.py @@ -0,0 +1,336 @@ +# mypy: allow-untyped-defs +import os +from collections import defaultdict +from pathlib import Path +from typing import Any +from typing_extensions import deprecated + + +try: + from torchgen.api.python import format_function_signature + from torchgen.utils import FileManager +except ImportError: + import sys + + REPO_ROOT = Path(__file__).absolute().parents[4] + sys.path.insert(0, str(REPO_ROOT)) + + from torchgen.api.python import format_function_signature + from torchgen.utils import FileManager + + if len(sys.path) > 0 and sys.path[0] == str(REPO_ROOT): + del sys.path[0] + + +__all__: list[str] = [] # not intended to expose any symbols + + +def __dir__() -> list[str]: + return [] # appease public API test + + +@deprecated( + "`torch.utils.data.datapipes.gen_pyi.materialize_lines` is deprecated and will be removed in the future.", + category=FutureWarning, +) +def materialize_lines(lines: list[str], indentation: int) -> str: + output = "" + new_line_with_indent = "\n" + " " * indentation + for i, line in enumerate(lines): + if i != 0: + output += new_line_with_indent + output += line.replace("\n", new_line_with_indent) + return output + + +@deprecated( + "`torch.utils.data.datapipes.gen_pyi.gen_from_template` is deprecated and will be removed in the future.", + category=FutureWarning, +) +def gen_from_template( + dir: str, + template_name: str, + output_name: str, + replacements: list[tuple[str, Any, int]], +) -> None: + template_path = os.path.join(dir, template_name) + output_path = os.path.join(dir, output_name) + + with open(template_path, encoding="utf-8") as f: + content = f.read() + for placeholder, lines, indentation in replacements: + with open(output_path, "w", encoding="utf-8") as f: + content = content.replace( + placeholder, materialize_lines(lines, indentation) + ) + f.write(content) + + +def find_file_paths(dir_paths: list[str], files_to_exclude: set[str]) -> set[str]: + """ + When given a path to a directory, returns the paths to the relevant files within it. + + This function does NOT recursive traverse to subdirectories. + """ + paths: set[str] = set() + for dir_path in dir_paths: + all_files = os.listdir(dir_path) + python_files = {fname for fname in all_files if ".py" == fname[-3:]} + filter_files = { + fname for fname in python_files if fname not in files_to_exclude + } + paths.update({os.path.join(dir_path, fname) for fname in filter_files}) + return paths + + +def extract_method_name(line: str) -> str: + """Extract method name from decorator in the form of "@functional_datapipe({method_name})".""" + if '("' in line: + start_token, end_token = '("', '")' + elif "('" in line: + start_token, end_token = "('", "')" + else: + raise RuntimeError( + f"Unable to find appropriate method name within line:\n{line}" + ) + start, end = line.find(start_token) + len(start_token), line.find(end_token) + return line[start:end] + + +def extract_class_name(line: str) -> str: + """Extract class name from class definition in the form of "class {CLASS_NAME}({Type}):".""" + start_token = "class " + end_token = "(" + start, end = line.find(start_token) + len(start_token), line.find(end_token) + return line[start:end] + + +def parse_datapipe_file( + file_path: str, +) -> tuple[dict[str, list[str]], dict[str, str], set[str], dict[str, list[str]]]: + """Given a path to file, parses the file and returns a dictionary of method names to function signatures.""" + method_to_signature, method_to_class_name, special_output_type = {}, {}, set() + doc_string_dict = defaultdict(list) + with open(file_path, encoding="utf-8") as f: + open_paren_count = 0 + method_name, class_name, signature = "", "", "" + skip = False + for line in f: + if line.count('"""') % 2 == 1: + skip = not skip + if skip or '"""' in line: # Saving docstrings + doc_string_dict[method_name].append(line) + continue + if "@functional_datapipe" in line: + method_name = extract_method_name(line) + doc_string_dict[method_name] = [] + continue + if method_name and "class " in line: + class_name = extract_class_name(line) + continue + if method_name and ("def __init__(" in line or "def __new__(" in line): + if "def __new__(" in line: + special_output_type.add(method_name) + open_paren_count += 1 + start = line.find("(") + len("(") + line = line[start:] + if open_paren_count > 0: + open_paren_count += line.count("(") + open_paren_count -= line.count(")") + if open_paren_count == 0: + end = line.rfind(")") + signature += line[:end] + method_to_signature[method_name] = process_signature(signature) + method_to_class_name[method_name] = class_name + method_name, class_name, signature = "", "", "" + elif open_paren_count < 0: + raise RuntimeError( + "open parenthesis count < 0. This shouldn't be possible." + ) + else: + signature += line.strip() + return ( + method_to_signature, + method_to_class_name, + special_output_type, + doc_string_dict, + ) + + +def parse_datapipe_files( + file_paths: set[str], +) -> tuple[dict[str, list[str]], dict[str, str], set[str], dict[str, list[str]]]: + methods_and_signatures = {} + methods_and_class_names = {} + methods_with_special_output_types = set() + methods_and_doc_strings = {} + for path in file_paths: + ( + method_to_signature, + method_to_class_name, + methods_needing_special_output_types, + doc_string_dict, + ) = parse_datapipe_file(path) + methods_and_signatures.update(method_to_signature) + methods_and_class_names.update(method_to_class_name) + methods_with_special_output_types.update(methods_needing_special_output_types) + methods_and_doc_strings.update(doc_string_dict) + return ( + methods_and_signatures, + methods_and_class_names, + methods_with_special_output_types, + methods_and_doc_strings, + ) + + +def split_outside_bracket(line: str, delimiter: str = ",") -> list[str]: + """Given a line of text, split it on comma unless the comma is within a bracket '[]'.""" + bracket_count = 0 + curr_token = "" + res = [] + for char in line: + if char == "[": + bracket_count += 1 + elif char == "]": + bracket_count -= 1 + elif char == delimiter and bracket_count == 0: + res.append(curr_token) + curr_token = "" + continue + curr_token += char + res.append(curr_token) + return res + + +def process_signature(line: str) -> list[str]: + """ + Clean up a given raw function signature. + + This includes removing the self-referential datapipe argument, default + arguments of input functions, newlines, and spaces. + """ + tokens: list[str] = split_outside_bracket(line) + for i, token in enumerate(tokens): + tokens[i] = token.strip(" ") + if token == "cls": + tokens[i] = "self" + elif i > 0 and ("self" == tokens[i - 1]) and (tokens[i][0] != "*"): + # Remove the datapipe after 'self' or 'cls' unless it has '*' + tokens[i] = "" + elif "Callable =" in token: # Remove default argument if it is a function + head = token.rpartition("=")[0] + tokens[i] = head.strip(" ") + " = ..." + tokens = [t for t in tokens if t != ""] + return tokens + + +def get_method_definitions( + file_path: str | list[str], + files_to_exclude: set[str], + deprecated_files: set[str], + default_output_type: str, + method_to_special_output_type: dict[str, str], + root: str = "", +) -> list[str]: + """ + #.pyi generation for functional DataPipes Process. + + # 1. Find files that we want to process (exclude the ones who don't) + # 2. Parse method name and signature + # 3. Remove first argument after self (unless it is "*datapipes"), default args, and spaces + """ + if root == "": + root = str(Path(__file__).parent.resolve()) + file_path = [file_path] if isinstance(file_path, str) else file_path + file_path = [os.path.join(root, path) for path in file_path] + file_paths = find_file_paths( + file_path, files_to_exclude=files_to_exclude.union(deprecated_files) + ) + ( + methods_and_signatures, + methods_and_class_names, + methods_w_special_output_types, + methods_and_doc_strings, + ) = parse_datapipe_files(file_paths) + + for fn_name in method_to_special_output_type: + if fn_name not in methods_w_special_output_types: + methods_w_special_output_types.add(fn_name) + + method_definitions = [] + for method_name, arguments in methods_and_signatures.items(): + class_name = methods_and_class_names[method_name] + if method_name in methods_w_special_output_types: + output_type = method_to_special_output_type[method_name] + else: + output_type = default_output_type + doc_string = "".join(methods_and_doc_strings[method_name]) + if doc_string == "": + doc_string = " ..." + else: + doc_string = "\n" + doc_string + definition = format_function_signature(method_name, arguments, output_type) + method_definitions.append( + f"# Functional form of '{class_name}'\n" + + definition.removesuffix("...").rstrip() # remove "..." + + doc_string, + ) + method_definitions.sort( + key=lambda s: s.split("\n")[1] + ) # sorting based on method_name + + return method_definitions + + +# Defined outside of main() so they can be imported by TorchData +iterDP_file_path: str = "iter" +iterDP_files_to_exclude: set[str] = {"__init__.py", "utils.py"} +iterDP_deprecated_files: set[str] = set() +iterDP_method_to_special_output_type: dict[str, str] = { + "demux": "list[IterDataPipe]", + "fork": "list[IterDataPipe]", +} + +mapDP_file_path: str = "map" +mapDP_files_to_exclude: set[str] = {"__init__.py", "utils.py"} +mapDP_deprecated_files: set[str] = set() +mapDP_method_to_special_output_type: dict[str, str] = {"shuffle": "IterDataPipe"} + + +def main() -> None: + """ + # Inject file into template datapipe.pyi.in. + + TODO: The current implementation of this script only generates interfaces for built-in methods. To generate + interface for user-defined DataPipes, consider changing `IterDataPipe.register_datapipe_as_function`. + """ + iter_method_definitions = get_method_definitions( + iterDP_file_path, + iterDP_files_to_exclude, + iterDP_deprecated_files, + "IterDataPipe", + iterDP_method_to_special_output_type, + ) + + map_method_definitions = get_method_definitions( + mapDP_file_path, + mapDP_files_to_exclude, + mapDP_deprecated_files, + "MapDataPipe", + mapDP_method_to_special_output_type, + ) + + path = Path(__file__).absolute().parent + fm = FileManager(install_dir=path, template_dir=path, dry_run=False) + fm.write_with_template( + "datapipe.pyi", + "datapipe.pyi.in", + lambda: { + "IterDataPipeMethods": iter_method_definitions, + "MapDataPipeMethods": map_method_definitions, + }, + ) + + +if __name__ == "__main__": + main() diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/iter/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/iter/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..05831250da468cc76e8c2cc8e4018373e8191951 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/iter/__init__.py @@ -0,0 +1,66 @@ +from torch.utils.data.datapipes.iter.callable import ( + CollatorIterDataPipe as Collator, + MapperIterDataPipe as Mapper, +) +from torch.utils.data.datapipes.iter.combinatorics import ( + SamplerIterDataPipe as Sampler, + ShufflerIterDataPipe as Shuffler, +) +from torch.utils.data.datapipes.iter.combining import ( + ConcaterIterDataPipe as Concater, + DemultiplexerIterDataPipe as Demultiplexer, + ForkerIterDataPipe as Forker, + MultiplexerIterDataPipe as Multiplexer, + ZipperIterDataPipe as Zipper, +) +from torch.utils.data.datapipes.iter.filelister import ( + FileListerIterDataPipe as FileLister, +) +from torch.utils.data.datapipes.iter.fileopener import ( + FileOpenerIterDataPipe as FileOpener, +) +from torch.utils.data.datapipes.iter.grouping import ( + BatcherIterDataPipe as Batcher, + GrouperIterDataPipe as Grouper, + UnBatcherIterDataPipe as UnBatcher, +) +from torch.utils.data.datapipes.iter.routeddecoder import ( + RoutedDecoderIterDataPipe as RoutedDecoder, +) +from torch.utils.data.datapipes.iter.selecting import FilterIterDataPipe as Filter +from torch.utils.data.datapipes.iter.sharding import ( + ShardingFilterIterDataPipe as ShardingFilter, +) +from torch.utils.data.datapipes.iter.streamreader import ( + StreamReaderIterDataPipe as StreamReader, +) +from torch.utils.data.datapipes.iter.utils import ( + IterableWrapperIterDataPipe as IterableWrapper, +) + + +__all__ = [ + "Batcher", + "Collator", + "Concater", + "Demultiplexer", + "FileLister", + "FileOpener", + "Filter", + "Forker", + "Grouper", + "IterableWrapper", + "Mapper", + "Multiplexer", + "RoutedDecoder", + "Sampler", + "ShardingFilter", + "Shuffler", + "StreamReader", + "UnBatcher", + "Zipper", +] + +# Please keep this list sorted +if __all__ != sorted(__all__): + raise AssertionError("__all__ is not sorted") diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/iter/callable.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/iter/callable.py new file mode 100644 index 0000000000000000000000000000000000000000..af1d9792c097b277c088bf03a5dd05c57ba75706 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/iter/callable.py @@ -0,0 +1,244 @@ +# mypy: allow-untyped-defs +import functools +from collections import namedtuple +from collections.abc import Callable, Iterator, Sized +from typing import Any, TypeVar + +import torch +from torch.utils.data._utils.collate import default_collate +from torch.utils.data.datapipes._decorator import functional_datapipe +from torch.utils.data.datapipes.dataframe import dataframe_wrapper as df_wrapper +from torch.utils.data.datapipes.datapipe import IterDataPipe +from torch.utils.data.datapipes.utils.common import ( + _check_unpickable_fn, + validate_input_col, +) + + +__all__ = [ + "CollatorIterDataPipe", + "MapperIterDataPipe", +] + + +_T_co = TypeVar("_T_co", covariant=True) + + +@functional_datapipe("map") +class MapperIterDataPipe(IterDataPipe[_T_co]): + r""" + Applies a function over each item from the source DataPipe (functional name: ``map``). + + The function can be any regular Python function or partial object. Lambda + function is not recommended as it is not supported by pickle. + + Args: + datapipe: Source Iterable DataPipe + fn: Function being applied over each item + input_col: Index or indices of data which ``fn`` is applied, such as: + + - ``None`` as default to apply ``fn`` to the data directly. + - Integer(s) is used for list/tuple. + - Key(s) is used for dict. + + output_col: Index of data where result of ``fn`` is placed. ``output_col`` can be specified + only when ``input_col`` is not ``None`` + + - ``None`` as default to replace the index that ``input_col`` specified; For ``input_col`` with + multiple indices, the left-most one is used, and other indices will be removed. + - Integer is used for list/tuple. ``-1`` represents to append result at the end. + - Key is used for dict. New key is acceptable. + + Example: + >>> # xdoctest: +SKIP + >>> from torchdata.datapipes.iter import IterableWrapper, Mapper + >>> def add_one(x): + ... return x + 1 + >>> dp = IterableWrapper(range(10)) + >>> # Invocation via functional form is preferred + ... map_dp_1 = dp.map(add_one) + >>> list(map_dp_1) + [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + >>> # We discourage the usage of `lambda` functions as they are not serializable with `pickle` + >>> # Use `functools.partial` or explicitly define the function instead + >>> map_dp_2 = Mapper(dp, lambda x: x + 1) + >>> list(map_dp_2) + [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + """ + + datapipe: IterDataPipe + fn: Callable + + def __init__( + self, + datapipe: IterDataPipe, + fn: Callable, + input_col=None, + output_col=None, + ) -> None: + torch._C._log_api_usage_once("python.data_pipes.map") + super().__init__() + self.datapipe = datapipe + + _check_unpickable_fn(fn) + self.fn = fn # type: ignore[assignment] + + self.input_col = input_col + if input_col is None and output_col is not None: + raise ValueError("`output_col` must be None when `input_col` is None.") + if isinstance(output_col, (list, tuple)): + if len(output_col) > 1: + raise ValueError("`output_col` must be a single-element list or tuple") + output_col = output_col[0] + self.output_col = output_col + validate_input_col(fn, input_col) + + def _apply_fn(self, data): + if self.input_col is None and self.output_col is None: + return self.fn(data) + + if self.input_col is None: + res = self.fn(data) + elif isinstance(self.input_col, (list, tuple)): + args = tuple(data[col] for col in self.input_col) + res = self.fn(*args) + else: + res = self.fn(data[self.input_col]) + + # Copy tuple to list and run in-place modification because tuple is immutable. + if isinstance(data, tuple): + t_flag = True + data = list(data) + else: + t_flag = False + + if self.output_col is None: + if isinstance(self.input_col, (list, tuple)): + data[self.input_col[0]] = res + for idx in sorted(self.input_col[1:], reverse=True): + del data[idx] + else: + # pyrefly: ignore [unsupported-operation] + data[self.input_col] = res + else: + if self.output_col == -1: + data.append(res) + else: + data[self.output_col] = res + + # Convert list back to tuple + return tuple(data) if t_flag else data + + def __iter__(self) -> Iterator[_T_co]: + for data in self.datapipe: + yield self._apply_fn(data) + + def __len__(self) -> int: + if isinstance(self.datapipe, Sized): + return len(self.datapipe) + raise TypeError(f"{type(self).__name__} instance doesn't have valid length") + + +def _collate_helper(conversion, item): + # TODO(VitalyFedyunin): Verify that item is any sort of batch + if len(item.items) > 1: + # TODO(VitalyFedyunin): Compact all batch dataframes into one + raise RuntimeError("Only supports one DataFrame per batch") + df = item[0] + columns_name = df_wrapper.get_columns(df) + tuple_names: list = [] + tuple_values: list = [] + + for name in conversion: + if name not in columns_name: + raise RuntimeError("Conversion keys mismatch") + + for name in columns_name: + if name in conversion: + if not callable(conversion[name]): + raise RuntimeError( + "Collate (DF)DataPipe requires callable as dict values" + ) + collation_fn = conversion[name] + else: + # TODO(VitalyFedyunin): Add default collation into df_wrapper + try: + import torcharrow.pytorch as tap # type: ignore[import] + + collation_fn = tap.rec.Default() + except Exception as e: + raise RuntimeError( + "unable to import default collation function from the TorchArrow" + ) from e + + tuple_names.append(str(name)) + value = collation_fn(df[name]) + tuple_values.append(value) + + # TODO(VitalyFedyunin): We can dynamically extract types from the tuple_values here + # TODO(VitalyFedyunin): Instead of ignoring mypy error, make sure tuple_names is not empty + tpl_cls = namedtuple("CollateResult", tuple_names) # type: ignore[misc] + tuple = tpl_cls(*tuple_values) + return tuple + + +@functional_datapipe("collate") +class CollatorIterDataPipe(MapperIterDataPipe): + r""" + Collates samples from DataPipe to Tensor(s) by a custom collate function (functional name: ``collate``). + + By default, it uses :func:`torch.utils.data.default_collate`. + + .. note:: + While writing a custom collate function, you can import :func:`torch.utils.data.default_collate` for the + default behavior and `functools.partial` to specify any additional arguments. + + Args: + datapipe: Iterable DataPipe being collated + collate_fn: Customized collate function to collect and combine data or a batch of data. + Default function collates to Tensor(s) based on data type. + + Example: + >>> # xdoctest: +SKIP + >>> # Convert integer data to float Tensor + >>> class MyIterDataPipe(torch.utils.data.IterDataPipe): + ... def __init__(self, start, end): + ... super(MyIterDataPipe).__init__() + ... assert end > start, "this example only works with end >= start" + ... self.start = start + ... self.end = end + ... + ... def __iter__(self): + ... return iter(range(self.start, self.end)) + ... + ... def __len__(self): + ... return self.end - self.start + >>> ds = MyIterDataPipe(start=3, end=7) + >>> print(list(ds)) + [3, 4, 5, 6] + >>> def collate_fn(batch): + ... return torch.tensor(batch, dtype=torch.float) + >>> collated_ds = CollateIterDataPipe(ds, collate_fn=collate_fn) + >>> print(list(collated_ds)) + [tensor(3.), tensor(4.), tensor(5.), tensor(6.)] + """ + + def __init__( + self, + datapipe: IterDataPipe, + conversion: Callable[..., Any] + | dict[str | Any, Callable | Any] + | None = default_collate, + collate_fn: Callable | None = None, + ) -> None: + # TODO(VitalyFedyunin): Replace `Callable[..., Any]` with `Callable[[IColumn], Any]` + # TODO(VitalyFedyunin): Replace with `Dict[Union[str, IColumn], Union[Callable, Enum]]` + if collate_fn is not None: + super().__init__(datapipe, fn=collate_fn) + else: + if callable(conversion): + super().__init__(datapipe, fn=conversion) + else: + # TODO(VitalyFedyunin): Validate passed dictionary + collate_fn = functools.partial(_collate_helper, conversion) + super().__init__(datapipe, fn=collate_fn) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/iter/combinatorics.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/iter/combinatorics.py new file mode 100644 index 0000000000000000000000000000000000000000..79a774c5e63db9494c526a94b45ff5284e8e4ec1 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/iter/combinatorics.py @@ -0,0 +1,193 @@ +# mypy: allow-untyped-defs +import random +from collections.abc import Iterator, Sized +from typing import TypeVar + +import torch +from torch.utils.data.datapipes._decorator import functional_datapipe +from torch.utils.data.datapipes.datapipe import IterDataPipe +from torch.utils.data.sampler import Sampler, SequentialSampler + + +__all__ = [ + "SamplerIterDataPipe", + "ShufflerIterDataPipe", +] + + +_T_co = TypeVar("_T_co", covariant=True) + + +class SamplerIterDataPipe(IterDataPipe[_T_co]): + r""" + Generate sample elements using the provided ``Sampler`` (defaults to :class:`SequentialSampler`). + + Args: + datapipe: IterDataPipe to sample from + sampler: Sampler class to generate sample elements from input DataPipe. + Default is :class:`SequentialSampler` for IterDataPipe + """ + + datapipe: IterDataPipe + sampler: Sampler + + def __init__( + self, + datapipe: IterDataPipe, + sampler: type[Sampler] = SequentialSampler, + sampler_args: tuple | None = None, + sampler_kwargs: dict | None = None, + ) -> None: + if not isinstance(datapipe, Sized): + raise AssertionError( + "Sampler class requires input datapipe implemented `__len__`" + ) + super().__init__() + # pyrefly: ignore [bad-assignment] + self.datapipe = datapipe + self.sampler_args = () if sampler_args is None else sampler_args + self.sampler_kwargs = {} if sampler_kwargs is None else sampler_kwargs + self.sampler_kwargs["data_source"] = self.datapipe + self.sampler = sampler(*self.sampler_args, **self.sampler_kwargs) + + def __iter__(self) -> Iterator[_T_co]: + return iter(self.sampler) + + def __len__(self) -> int: + # Dataset has been tested as `Sized` + if isinstance(self.sampler, Sized): + return len(self.sampler) + raise TypeError(f"{type(self).__name__} instance doesn't have valid length") + + +@functional_datapipe("shuffle") +class ShufflerIterDataPipe(IterDataPipe[_T_co]): + r""" + Shuffle the input DataPipe with a buffer (functional name: ``shuffle``). + + The buffer with ``buffer_size`` is filled with elements from the datapipe first. Then, + each item will be yielded from the buffer by reservoir sampling via iterator. + + ``buffer_size`` is required to be larger than ``0``. For ``buffer_size == 1``, the + datapipe is not shuffled. In order to fully shuffle all elements from datapipe, + ``buffer_size`` is required to be greater than or equal to the size of datapipe. + + When it is used with :class:`torch.utils.data.DataLoader`, the methods to + set up random seed are different based on :attr:`num_workers`. + + For single-process mode (:attr:`num_workers == 0`), the random seed is set before + the :class:`~torch.utils.data.DataLoader` in the main process. For multi-process + mode (:attr:`num_worker > 0`), `worker_init_fn` is used to set up a random seed + for each worker process. + + Args: + datapipe: The IterDataPipe being shuffled + buffer_size: The buffer size for shuffling (default to ``10000``) + unbatch_level: Specifies if it is necessary to unbatch source data before + applying the shuffle + + Example: + >>> # xdoctest: +SKIP + >>> from torchdata.datapipes.iter import IterableWrapper + >>> dp = IterableWrapper(range(10)) + >>> shuffle_dp = dp.shuffle() + >>> list(shuffle_dp) + [0, 4, 1, 6, 3, 2, 9, 5, 7, 8] + """ + + datapipe: IterDataPipe[_T_co] + buffer_size: int + _buffer: list[_T_co] + _enabled: bool + _seed: int | None + _rng: random.Random + + def __init__( + self, + datapipe: IterDataPipe[_T_co], + *, + buffer_size: int = 10000, + unbatch_level: int = 0, + ) -> None: + super().__init__() + # TODO: Performance optimization + # buffer can be a fixed size and remove expensive `append()` and `len()` operations + self._buffer: list[_T_co] = [] + if buffer_size <= 0: + raise AssertionError("buffer_size should be larger than 0") + if unbatch_level == 0: + self.datapipe = datapipe + else: + self.datapipe = datapipe.unbatch(unbatch_level=unbatch_level) + self.buffer_size = buffer_size + self._enabled = True + self._seed = None + self._rng = random.Random() + + def set_shuffle(self, shuffle=True): + self._enabled = shuffle + return self + + def set_seed(self, seed: int): + self._seed = seed + return self + + def __iter__(self) -> Iterator[_T_co]: + if not self._enabled: + yield from self.datapipe + else: + for x in self.datapipe: + if len(self._buffer) == self.buffer_size: + idx = self._rng.randint(0, len(self._buffer) - 1) + val, self._buffer[idx] = self._buffer[idx], x + yield val + else: + self._buffer.append(x) + while self._buffer: + idx = self._rng.randint(0, len(self._buffer) - 1) + yield self._buffer.pop(idx) + + def __len__(self) -> int: + if isinstance(self.datapipe, Sized): + return len(self.datapipe) + raise TypeError(f"{type(self).__name__} instance doesn't have valid length") + + def reset(self) -> None: + self._buffer = [] + if self._enabled: + if self._seed is None: + self._seed = int(torch.empty((), dtype=torch.int64).random_().item()) + self._rng.seed(self._seed) + self._seed = None + + def __getstate__(self): + state = ( + self.datapipe, + self.buffer_size, + self._enabled, + self._seed, + self._buffer, + self._rng.getstate(), + self._valid_iterator_id, + self._number_of_samples_yielded, + ) + if IterDataPipe.getstate_hook is not None: + return IterDataPipe.getstate_hook(state) + return state + + def __setstate__(self, state): + ( + self.datapipe, + self.buffer_size, + self._enabled, + self._seed, + self._buffer, + rng_state, + self._valid_iterator_id, + self._number_of_samples_yielded, + ) = state + self._rng = random.Random() + self._rng.setstate(rng_state) + + def __del__(self) -> None: + self._buffer.clear() diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/iter/combining.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/iter/combining.py new file mode 100644 index 0000000000000000000000000000000000000000..4915e4c3d7c52a2844d1c65ce3adcc089622b25f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/iter/combining.py @@ -0,0 +1,715 @@ +# mypy: allow-untyped-defs +import copy as copymodule +import warnings +from abc import ABC, abstractmethod +from collections import deque +from collections.abc import Callable, Iterator, Sized +from typing import Any, Literal, TypeVar + +from torch.utils.data.datapipes._decorator import functional_datapipe +from torch.utils.data.datapipes._hook_iterator import _SnapshotState +from torch.utils.data.datapipes.datapipe import IterDataPipe +from torch.utils.data.datapipes.utils.common import _check_unpickable_fn, StreamWrapper + + +__all__ = [ + "ConcaterIterDataPipe", + "DemultiplexerIterDataPipe", + "ForkerIterDataPipe", + "MultiplexerIterDataPipe", + "ZipperIterDataPipe", +] + + +_T_co = TypeVar("_T_co", covariant=True) + + +@functional_datapipe("concat") +class ConcaterIterDataPipe(IterDataPipe): + r""" + Concatenates multiple Iterable DataPipes (functional name: ``concat``). + + The resulting DataPipe will yield all the elements from the first input DataPipe, before yielding from the subsequent ones. + + Args: + datapipes: Iterable DataPipes being concatenated + + Example: + >>> # xdoctest: +REQUIRES(module:torchdata) + >>> import random + >>> from torchdata.datapipes.iter import IterableWrapper + >>> dp1 = IterableWrapper(range(3)) + >>> dp2 = IterableWrapper(range(5)) + >>> list(dp1.concat(dp2)) + [0, 1, 2, 0, 1, 2, 3, 4] + """ + + datapipes: tuple[IterDataPipe] + + def __init__(self, *datapipes: IterDataPipe) -> None: + if len(datapipes) == 0: + raise ValueError("Expected at least one DataPipe, but got nothing") + if not all(isinstance(dp, IterDataPipe) for dp in datapipes): + raise TypeError("Expected all inputs to be `IterDataPipe`") + self.datapipes = datapipes # type: ignore[assignment] + + def __iter__(self) -> Iterator: + for dp in self.datapipes: + yield from dp + + def __len__(self) -> int: + if all(isinstance(dp, Sized) for dp in self.datapipes): + # pyrefly: ignore [bad-argument-type] + return sum(len(dp) for dp in self.datapipes) + else: + raise TypeError(f"{type(self).__name__} instance doesn't have valid length") + + +@functional_datapipe("fork") +class ForkerIterDataPipe(IterDataPipe): + r""" + Creates multiple instances of the same Iterable DataPipe (functional name: ``fork``). + + Args: + datapipe: Iterable DataPipe being copied + num_instances: number of instances of the datapipe to create + buffer_size: this restricts how far ahead the leading child DataPipe + can read relative to the slowest child DataPipe. + Defaults to ``1000``. Use ``-1`` for the unlimited buffer. + copy: copy strategy to use for items yielded by each branch. Supported + options are ``None`` for no copying, ``"shallow"`` for shallow object + copies, and ``"deep"`` for deep object copies. Defaults to ``None``. + + Note: + All branches of the forked pipeline return the identical object unless + the copy parameter is supplied. If the object is mutable or contains + mutable objects, changing them in one branch will affect all others. + + Example: + >>> # xdoctest: +REQUIRES(module:torchdata) + >>> from torchdata.datapipes.iter import IterableWrapper + >>> source_dp = IterableWrapper(range(5)) + >>> dp1, dp2 = source_dp.fork(num_instances=2) + >>> list(dp1) + [0, 1, 2, 3, 4] + >>> list(dp2) + [0, 1, 2, 3, 4] + """ + + def __new__( + cls, + datapipe: IterDataPipe, + num_instances: int, + buffer_size: int = 1000, + copy: Literal["shallow", "deep"] | None = None, + ): + if num_instances < 1: + raise ValueError( + f"Expected `num_instances` larger than 0, but {num_instances} is found" + ) + if num_instances == 1: + return datapipe + container = _ForkerIterDataPipe(datapipe, num_instances, buffer_size, copy) # type: ignore[abstract] + return [_ChildDataPipe(container, i) for i in range(num_instances)] + + +class _ContainerTemplate(ABC): + r"""Abstract class for container ``DataPipes``. The followings are three required methods.""" + + @abstractmethod + def get_next_element_by_instance(self, instance_id: int): ... + + @abstractmethod + def is_every_instance_exhausted(self) -> bool: ... + + @abstractmethod + def reset(self) -> None: ... + + @abstractmethod + def get_length_by_instance(self, instance_id: int): + r"""Raise TypeError if it's not supposed to be implemented to support `list(datapipe)`.""" + + +def _no_op(x): + return x + + +class _ForkerIterDataPipe(IterDataPipe, _ContainerTemplate): + r""" + Container to hold instance-specific information on behalf of ForkerIterDataPipe. + + It tracks the state of its child DataPipes, maintains the buffer, and yields the next value + as requested by the child DataPipes. + """ + + def __init__( + self, + datapipe: IterDataPipe, + num_instances: int, + buffer_size: int = 1000, + copy: Literal["shallow", "deep"] | None = None, + ) -> None: + self.main_datapipe = datapipe + self._datapipe_iterator: Iterator[Any] | None = None + self.num_instances = num_instances + self.buffer: deque = deque() + self.buffer_size = buffer_size + if self.buffer_size < 0: + warnings.warn( + "Unlimited buffer size is set for `fork`, " + "please be aware of OOM at random places", + UserWarning, + stacklevel=2, + ) + if copy is None: + self.copy_fn = _no_op + elif copy == "shallow": + self.copy_fn = copymodule.copy + elif copy == "deep": + self.copy_fn = copymodule.deepcopy + else: + raise ValueError( + f"Unknown copy method `{copy}` requested, choose one of None, `shallow` or `deep`." + ) + + self.child_pointers: list[int] = [ + 0 + ] * num_instances # Indicate the indices of the next element to get + self.slowest_ptr = 0 # The index to read by the slowest child + self.leading_ptr = 0 # The index to read by the fastest child + self.end_ptr: int | None = None # The index to stop child + self._child_stop: list[bool] = [True for _ in range(num_instances)] + + def __len__(self) -> int: + # pyrefly: ignore [bad-argument-type] + return len(self.main_datapipe) + + def get_next_element_by_instance(self, instance_id: int): + if self._datapipe_iterator is None and self._child_stop[instance_id]: + self._datapipe_iterator = iter(self.main_datapipe) + self._snapshot_state = _SnapshotState.Iterating + for i in range(self.num_instances): + self._child_stop[i] = False + try: + while not self._child_stop[instance_id]: + self.child_pointers[instance_id] += 1 + if ( + self.end_ptr is not None + and self.child_pointers[instance_id] == self.end_ptr + ): + self._child_stop[instance_id] = True + break + # Use buffer + if self.buffer and self.child_pointers[instance_id] <= self.leading_ptr: + idx = self.child_pointers[instance_id] - self.slowest_ptr - 1 + return_val = self.buffer[idx] + else: # Retrieve one element from main datapipe + self.leading_ptr = self.child_pointers[instance_id] + try: + return_val = next(self._datapipe_iterator) # type: ignore[arg-type] + self.buffer.append(return_val) + except StopIteration: + self._child_stop[instance_id] = True + self._datapipe_iterator = None + self.end_ptr = self.leading_ptr + continue + if self.child_pointers[instance_id] == self.slowest_ptr + 1: + new_min = min( + self.child_pointers + ) # Can optimize by avoiding the call to min() + if self.slowest_ptr < new_min: + self.slowest_ptr = new_min + self.buffer.popleft() + if ( + self.buffer_size >= 0 + and self.leading_ptr > self.buffer_size + self.slowest_ptr + ): + raise BufferError( + "ForkerIterDataPipe buffer overflow," + + f"buffer size {self.buffer_size} is insufficient." + ) + + yield self.copy_fn(return_val) # type: ignore[possibly-undefined] + finally: + self._child_stop[instance_id] = True + # Cleanup _datapipe_iterator for the case that fork exits earlier + if all(self._child_stop): + self._datapipe_iterator = None + self._cleanup() + + def is_every_instance_exhausted(self) -> bool: + return self.end_ptr is not None and all(self._child_stop) + + def get_length_by_instance(self, instance_id: int) -> int: + # pyrefly: ignore [bad-argument-type] + return len(self.main_datapipe) + + def reset(self) -> None: + self._datapipe_iterator = None + self.buffer = deque() + self.child_pointers = [0] * self.num_instances + self.slowest_ptr = 0 + self.leading_ptr = 0 + self.end_ptr = None + self._child_stop = [True for _ in range(self.num_instances)] + + def __getstate__(self): + state = ( + self.main_datapipe, + self.num_instances, + self.buffer_size, + self.copy_fn, + self._valid_iterator_id, + self._number_of_samples_yielded, + ) + if IterDataPipe.getstate_hook is not None: + return IterDataPipe.getstate_hook(state) + return state + + def __setstate__(self, state): + ( + self.main_datapipe, + self.num_instances, + self.buffer_size, + self.copy_fn, + self._valid_iterator_id, + self._number_of_samples_yielded, + ) = state + self._datapipe_iterator = None + self.buffer = deque() + self.child_pointers = [0] * self.num_instances + self.slowest_ptr = 0 + self.leading_ptr = 0 + self.end_ptr = None + self._child_stop = [True for _ in range(self.num_instances)] + + def _cleanup(self) -> None: + while self.buffer: + d = self.buffer.popleft() + StreamWrapper.close_streams(d) + + def __del__(self) -> None: + self._cleanup() + + +class _ChildDataPipe(IterDataPipe): + r""" + Iterable Datapipe that is a child of a main DataPipe. + + The instance of this class will pass its instance_id to get the next value from its main DataPipe. + + Note: + ChildDataPipe, like all other IterDataPipe, follows the single iterator per IterDataPipe constraint. + Since ChildDataPipes share a common buffer, when an iterator is created for one of the ChildDataPipes, + the previous iterators for all ChildDataPipes must be invalidated, with the exception when a ChildDataPipe + hasn't had an iterator created from it since the last invalidation. See the example below. + + Example: + >>> # xdoctest: +REQUIRES(module:torchdata) + >>> # Singler Iterator per IteraDataPipe Invalidation + >>> from torchdata.datapipes.iter import IterableWrapper + >>> source_dp = IterableWrapper(range(10)) + >>> cdp1, cdp2 = source_dp.fork(num_instances=2) + >>> it1, it2 = iter(cdp1), iter(cdp2) + >>> it3 = iter(cdp1) + >>> # The line above invalidates `it1` and `it2`, and resets `ForkerIterDataPipe`. + >>> it4 = iter(cdp2) + >>> # The line above doesn't invalidate `it3`, because an iterator for `cdp2` hasn't been created since + >>> # the last invalidation. + + Args: + main_datapipe: Main DataPipe with a method 'get_next_element_by_instance(instance_id)' + instance_id: integer identifier of this instance + """ + + _is_child_datapipe: bool = True + + def __init__(self, main_datapipe: IterDataPipe, instance_id: int) -> None: + if not isinstance(main_datapipe, _ContainerTemplate): + raise AssertionError("main_datapipe must implement _ContainerTemplate") + + # pyrefly: ignore [bad-assignment] + self.main_datapipe: IterDataPipe = main_datapipe + self.instance_id = instance_id + + def __iter__(self): + # Note that the logic behind setting iterator ID and `reset` are handled within `hook_iterator` + # We want to separate the code for reset and yield, so that 'reset' executes before __next__ is called + return self.main_datapipe.get_next_element_by_instance(self.instance_id) + + def __len__(self) -> int: + return self.main_datapipe.get_length_by_instance(self.instance_id) + + # This method is called by `hook_iterator` in `_typing.py`. + def _set_main_datapipe_valid_iterator_id(self) -> int: + r""" + Update the valid iterator ID for both this DataPipe object and `main_datapipe`. + + `main_datapipe.reset()` is called when the ID is incremented to a new generation. + """ + # 1. First time any child iterator is created + if self.main_datapipe._valid_iterator_id is None: + self.main_datapipe._valid_iterator_id = 0 # type: ignore[attr-defined] + # 2. This instance was already in the same generation as `main_datapipe`, + # we need to increment the ID further by 1 + elif self.main_datapipe._valid_iterator_id == self._valid_iterator_id: # type: ignore[has-type] + self.main_datapipe._valid_iterator_id += 1 # type: ignore[attr-defined] + # Whenever a new generation of iterator is created, the `main_datapipe` must reset + if not self.main_datapipe.is_every_instance_exhausted(): + warnings.warn( + "Some child DataPipes are not exhausted when __iter__ is called. We are resetting " + "the buffer and each child DataPipe will read from the start again.", + UserWarning, + stacklevel=2, + ) + self.main_datapipe.reset() + # 3. Otherwise, the iterator is behind the others, so it will just need to catch up by setting + # the instance's iterator to match that of `main_datapipe` + self._valid_iterator_id = self.main_datapipe._valid_iterator_id + return self._valid_iterator_id + + # This method is called by `hook_iterator` in `_typing.py`. + def _check_valid_iterator_id(self, iterator_id) -> bool: + r"""Check the valid iterator ID against that of DataPipe object and that of `main_datapipe`.""" + return ( + iterator_id == self._valid_iterator_id + and iterator_id == self.main_datapipe._valid_iterator_id + ) + + +@functional_datapipe("demux") +class DemultiplexerIterDataPipe(IterDataPipe): + r""" + Splits the input DataPipe into multiple child DataPipes, using the given classification function (functional name: ``demux``). + + A list of the child DataPipes is returned from this operation. + + Args: + datapipe: Iterable DataPipe being filtered + num_instances: number of instances of the DataPipe to create + classifier_fn: a function that maps values to an integer within the range ``[0, num_instances - 1]`` or ``None`` + drop_none: defaults to ``False``, if ``True``, the function will skip over elements classified as ``None`` + buffer_size: this defines the maximum number of inputs that the buffer can hold across all child + DataPipes while waiting for their values to be yielded. + Defaults to ``1000``. Use ``-1`` for the unlimited buffer. + + Examples: + >>> # xdoctest: +REQUIRES(module:torchdata) + >>> from torchdata.datapipes.iter import IterableWrapper + >>> def odd_or_even(n): + ... return n % 2 + >>> source_dp = IterableWrapper(range(5)) + >>> dp1, dp2 = source_dp.demux(num_instances=2, classifier_fn=odd_or_even) + >>> list(dp1) + [0, 2, 4] + >>> list(dp2) + [1, 3] + >>> # It can also filter out any element that gets `None` from the `classifier_fn` + >>> def odd_or_even_no_zero(n): + ... return n % 2 if n != 0 else None + >>> dp1, dp2 = source_dp.demux( + ... num_instances=2, classifier_fn=odd_or_even_no_zero, drop_none=True + ... ) + >>> list(dp1) + [2, 4] + >>> list(dp2) + [1, 3] + """ + + def __new__( + cls, + datapipe: IterDataPipe, + num_instances: int, + classifier_fn: Callable[[_T_co], int | None], + drop_none: bool = False, + buffer_size: int = 1000, + ): + if num_instances < 1: + raise ValueError( + f"Expected `num_instances` larger than 0, but {num_instances} is found" + ) + + _check_unpickable_fn(classifier_fn) + + # When num_instances == 1, demux can be replaced by filter, + # but keep it as Demultiplexer for the sake of consistency + # like throwing Error when classification result is out of o range + container = _DemultiplexerIterDataPipe( + datapipe, num_instances, classifier_fn, drop_none, buffer_size + ) # type: ignore[abstract] + return [_ChildDataPipe(container, i) for i in range(num_instances)] + + +class _DemultiplexerIterDataPipe(IterDataPipe, _ContainerTemplate): + r""" + Container to hold instance-specific information on behalf of DemultiplexerIterDataPipe. + + It tracks the state of its child DataPipes, maintains the buffer, classifies and yields the next correct value + as requested by the child DataPipes. + """ + + def __init__( + self, + datapipe: IterDataPipe[_T_co], + num_instances: int, + classifier_fn: Callable[[_T_co], int | None], + drop_none: bool, + buffer_size: int, + ) -> None: + # pyrefly: ignore [invalid-type-var] + self.main_datapipe = datapipe + self._datapipe_iterator: Iterator[Any] | None = None + self.num_instances = num_instances + self.buffer_size = buffer_size + if self.buffer_size < 0: + warnings.warn( + "Unlimited buffer size is set for `demux`, " + "please be aware of OOM at random places", + UserWarning, + stacklevel=2, + ) + self.current_buffer_usage = 0 + # pyrefly: ignore [invalid-type-var] + self.child_buffers: list[deque[_T_co]] = [deque() for _ in range(num_instances)] + # pyrefly: ignore [invalid-type-var] + self.classifier_fn = classifier_fn + self.drop_none = drop_none + self.main_datapipe_exhausted = False + self._child_stop: list[bool] = [True for _ in range(num_instances)] + + def _find_next(self, instance_id: int) -> _T_co: # type: ignore[type-var] + while True: + if self.main_datapipe_exhausted or self._child_stop[instance_id]: + raise StopIteration + if self._datapipe_iterator is None: + raise ValueError( + "_datapipe_iterator has not been set, likely because this private method is called directly " + "without invoking get_next_element_by_instance() first." + ) + value = next(self._datapipe_iterator) + classification = self.classifier_fn(value) + if classification is None and self.drop_none: + StreamWrapper.close_streams(value) + continue + if ( + classification is None + or classification >= self.num_instances + or classification < 0 + ): + raise ValueError( + f"Output of the classification fn should be between 0 and {self.num_instances - 1}. " + + f"{classification} is returned." + ) + if classification == instance_id: + return value + self.child_buffers[classification].append(value) + self.current_buffer_usage += 1 + if self.buffer_size >= 0 and self.current_buffer_usage > self.buffer_size: + raise BufferError( + f"DemultiplexerIterDataPipe buffer overflow, buffer size {self.buffer_size} is insufficient." + ) + + def get_next_element_by_instance(self, instance_id: int): + if self._datapipe_iterator is None and self._child_stop[instance_id]: + self._datapipe_iterator = iter(self.main_datapipe) + self._snapshot_state = ( + _SnapshotState.Iterating + ) # This is necessary for the DataPipe to reset properly. + self.main_datapipe_exhausted = False + for i in range(self.num_instances): + self._child_stop[i] = False + + try: + while not self._child_stop[instance_id]: + if self.child_buffers[instance_id]: + self.current_buffer_usage -= 1 + yield self.child_buffers[instance_id].popleft() + else: + try: + yield self._find_next(instance_id) + except StopIteration: + self._child_stop[instance_id] = True + self.main_datapipe_exhausted = True + self._datapipe_iterator = None + finally: + self._child_stop[instance_id] = True + # Cleanup _datapipe_iterator for the case that demux exits earlier + if all(self._child_stop): + self._datapipe_iterator = None + if self.child_buffers[instance_id]: + self._cleanup(instance_id) + + def is_every_instance_exhausted(self) -> bool: + return self.main_datapipe_exhausted and all(self._child_stop) + + def get_length_by_instance(self, instance_id: int) -> int: + raise TypeError + + def reset(self) -> None: + self._datapipe_iterator = None + self.current_buffer_usage = 0 + self.child_buffers = [deque() for _ in range(self.num_instances)] + self._child_stop = [True for _ in range(self.num_instances)] + self.main_datapipe_exhausted = False + + def __getstate__(self): + state = ( + self.main_datapipe, + self.num_instances, + self.buffer_size, + self.classifier_fn, + self.drop_none, + self._valid_iterator_id, + self._number_of_samples_yielded, + ) + if IterDataPipe.getstate_hook is not None: + return IterDataPipe.getstate_hook(state) + return state + + def __setstate__(self, state): + ( + self.main_datapipe, + self.num_instances, + self.buffer_size, + self.classifier_fn, + self.drop_none, + self._valid_iterator_id, + self._number_of_samples_yielded, + ) = state + self._datapipe_iterator = None + self.current_buffer_usage = 0 + self.child_buffers = [deque() for _ in range(self.num_instances)] + self._child_stop = [True for _ in range(self.num_instances)] + self.main_datapipe_exhausted = False + + def _cleanup(self, instance_id: int | None = None) -> None: + ids = ( + range(self.num_instances) + if instance_id is None + else [ + instance_id, + ] + ) + for i in ids: + q = self.child_buffers[i] + while q: + d = q.popleft() + StreamWrapper.close_streams(d) + + def __del__(self) -> None: + self._cleanup() + + +@functional_datapipe("mux") +class MultiplexerIterDataPipe(IterDataPipe): + r""" + Yields one element at a time from each of the input Iterable DataPipes (functional name: ``mux``). + + As in, one element from the 1st input DataPipe, then one element from the 2nd DataPipe in the next iteration, + and so on. It ends when the shortest input DataPipe is exhausted. + + Args: + datapipes: Iterable DataPipes that will take turn to yield their elements, until the shortest DataPipe is exhausted + + Example: + >>> # xdoctest: +REQUIRES(module:torchdata) + >>> from torchdata.datapipes.iter import IterableWrapper + >>> dp1, dp2, dp3 = ( + ... IterableWrapper(range(3)), + ... IterableWrapper(range(10, 15)), + ... IterableWrapper(range(20, 25)), + ... ) + >>> list(dp1.mux(dp2, dp3)) + [0, 10, 20, 1, 11, 21, 2, 12, 22] + """ + + def __init__(self, *datapipes) -> None: + self.datapipes = datapipes + self.buffer: list = [] # Store values to be yielded only when every iterator provides one + + def __iter__(self): + iterators = [iter(x) for x in self.datapipes] + while iterators: + for it in iterators: + try: + value = next(it) + self.buffer.append(value) + except StopIteration: + self.buffer.clear() + return + yield from self.buffer + self.buffer.clear() + + def __len__(self) -> int: + if all(isinstance(dp, Sized) for dp in self.datapipes): + return min(len(dp) for dp in self.datapipes) * len(self.datapipes) + else: + raise TypeError(f"{type(self).__name__} instance doesn't have valid length") + + def reset(self) -> None: + self.buffer = [] + + def __getstate__(self): + state = ( + self.datapipes, + self._valid_iterator_id, + self._number_of_samples_yielded, + ) + if IterDataPipe.getstate_hook is not None: + return IterDataPipe.getstate_hook(state) + return state + + def __setstate__(self, state): + ( + self.datapipes, + self._valid_iterator_id, + self._number_of_samples_yielded, + ) = state + self.buffer = [] + + def __del__(self) -> None: + self.buffer.clear() + + +@functional_datapipe("zip") +class ZipperIterDataPipe(IterDataPipe[tuple[_T_co]]): + r""" + Aggregates elements into a tuple from each of the input DataPipes (functional name: ``zip``). + + The output is stopped as soon as the shortest input DataPipe is exhausted. + + Args: + *datapipes: Iterable DataPipes being aggregated + + Example: + >>> # xdoctest: +REQUIRES(module:torchdata) + >>> from torchdata.datapipes.iter import IterableWrapper + >>> dp1, dp2, dp3 = ( + ... IterableWrapper(range(5)), + ... IterableWrapper(range(10, 15)), + ... IterableWrapper(range(20, 25)), + ... ) + >>> list(dp1.zip(dp2, dp3)) + [(0, 10, 20), (1, 11, 21), (2, 12, 22), (3, 13, 23), (4, 14, 24)] + """ + + datapipes: tuple[IterDataPipe] + + def __init__(self, *datapipes: IterDataPipe) -> None: + if not all(isinstance(dp, IterDataPipe) for dp in datapipes): + raise TypeError( + "All inputs are required to be `IterDataPipe` for `ZipIterDataPipe`." + ) + super().__init__() + self.datapipes = datapipes # type: ignore[assignment] + + def __iter__(self) -> Iterator[tuple[_T_co]]: + iterators = [iter(datapipe) for datapipe in self.datapipes] + yield from zip(*iterators, strict=False) + + def __len__(self) -> int: + if all(isinstance(dp, Sized) for dp in self.datapipes): + # pyrefly: ignore [bad-argument-type] + return min(len(dp) for dp in self.datapipes) + else: + raise TypeError(f"{type(self).__name__} instance doesn't have valid length") diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/iter/filelister.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/iter/filelister.py new file mode 100644 index 0000000000000000000000000000000000000000..352d3c01e12d278cb8e1308ee78feff0610808bc --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/iter/filelister.py @@ -0,0 +1,67 @@ +from collections.abc import Iterator, Sequence + +from torch.utils.data.datapipes._decorator import functional_datapipe +from torch.utils.data.datapipes.datapipe import IterDataPipe +from torch.utils.data.datapipes.iter.utils import IterableWrapperIterDataPipe +from torch.utils.data.datapipes.utils.common import get_file_pathnames_from_root + + +__all__ = ["FileListerIterDataPipe"] + + +@functional_datapipe("list_files") +class FileListerIterDataPipe(IterDataPipe[str]): + r""" + Given path(s) to the root directory, yields file pathname(s) (path + filename) of files within the root directory. + + Multiple root directories can be provided (functional name: ``list_files``). + + Args: + root: Root directory or a sequence of root directories + masks: Unix style filter string or string list for filtering file name(s) + recursive: Whether to return pathname from nested directories or not + abspath: Whether to return relative pathname or absolute pathname + non_deterministic: Whether to return pathname in sorted order or not. + If ``False``, the results yielded from each root directory will be sorted + length: Nominal length of the datapipe + + Example: + >>> # xdoctest: +SKIP + >>> from torchdata.datapipes.iter import FileLister + >>> dp = FileLister(root=".", recursive=True) + >>> list(dp) + ['example.py', './data/data.tar'] + """ + + def __init__( + self, + root: str | Sequence[str] | IterDataPipe = ".", + masks: str | list[str] = "", + *, + recursive: bool = False, + abspath: bool = False, + non_deterministic: bool = False, + length: int = -1, + ) -> None: + super().__init__() + if isinstance(root, str): + root = [root] + if not isinstance(root, IterDataPipe): + root = IterableWrapperIterDataPipe(root) + self.datapipe: IterDataPipe = root + self.masks: str | list[str] = masks + self.recursive: bool = recursive + self.abspath: bool = abspath + self.non_deterministic: bool = non_deterministic + self.length: int = length + + def __iter__(self) -> Iterator[str]: + for path in self.datapipe: + yield from get_file_pathnames_from_root( + path, self.masks, self.recursive, self.abspath, self.non_deterministic + ) + + def __len__(self) -> int: + if self.length == -1: + raise TypeError(f"{type(self).__name__} instance doesn't have valid length") + return self.length diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/iter/fileopener.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/iter/fileopener.py new file mode 100644 index 0000000000000000000000000000000000000000..e77f7a4c8e660ec0e2ff5374fcdc8a30c474ea03 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/iter/fileopener.py @@ -0,0 +1,79 @@ +from collections.abc import Iterable, Iterator +from io import IOBase + +from torch.utils.data.datapipes._decorator import functional_datapipe +from torch.utils.data.datapipes.datapipe import IterDataPipe +from torch.utils.data.datapipes.utils.common import get_file_binaries_from_pathnames + + +__all__ = [ + "FileOpenerIterDataPipe", +] + + +@functional_datapipe("open_files") +class FileOpenerIterDataPipe(IterDataPipe[tuple[str, IOBase]]): + r""" + Given pathnames, opens files and yield pathname and file stream in a tuple (functional name: ``open_files``). + + Args: + datapipe: Iterable datapipe that provides pathnames + mode: An optional string that specifies the mode in which + the file is opened by ``open()``. It defaults to ``r``, other options are + ``b`` for reading in binary mode and ``t`` for text mode. + encoding: An optional string that specifies the encoding of the + underlying file. It defaults to ``None`` to match the default encoding of ``open``. + length: Nominal length of the datapipe + + Note: + The opened file handles will be closed by Python's GC periodically. Users can choose + to close them explicitly. + + Example: + >>> # xdoctest: +SKIP + >>> from torchdata.datapipes.iter import ( + ... FileLister, + ... FileOpener, + ... StreamReader, + ... ) + >>> dp = FileLister(root=".").filter(lambda fname: fname.endswith(".txt")) + >>> dp = FileOpener(dp) + >>> dp = StreamReader(dp) + >>> list(dp) + [('./abc.txt', 'abc')] + """ + + def __init__( + self, + datapipe: Iterable[str], + mode: str = "r", + encoding: str | None = None, + length: int = -1, + ) -> None: + super().__init__() + self.datapipe: Iterable[str] = datapipe + self.mode: str = mode + self.encoding: str | None = encoding + + if self.mode not in ("b", "t", "rb", "rt", "r"): + raise ValueError(f"Invalid mode {mode}") + # TODO: enforce typing for each instance based on mode, otherwise + # `argument_validation` with this DataPipe may be potentially broken + + if "b" in mode and encoding is not None: + raise ValueError("binary mode doesn't take an encoding argument") + + self.length: int = length + + # Remove annotation due to 'IOBase' is a general type and true type + # is determined at runtime based on mode. Some `DataPipe` requiring + # a subtype would cause mypy error. + def __iter__(self) -> Iterator[tuple[str, IOBase]]: + yield from get_file_binaries_from_pathnames( + self.datapipe, self.mode, self.encoding + ) + + def __len__(self) -> int: + if self.length == -1: + raise TypeError(f"{type(self).__name__} instance doesn't have valid length") + return self.length diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/iter/grouping.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/iter/grouping.py new file mode 100644 index 0000000000000000000000000000000000000000..b773f06823a768f07e5a5a528e2afc8b0467d548 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/iter/grouping.py @@ -0,0 +1,326 @@ +# mypy: allow-untyped-defs +from collections import defaultdict +from collections.abc import Callable, Iterator, Sized +from typing import Any, NoReturn, TypeVar + +from torch.utils.data.datapipes._decorator import functional_datapipe +from torch.utils.data.datapipes.datapipe import DataChunk, IterDataPipe +from torch.utils.data.datapipes.utils.common import _check_unpickable_fn + + +__all__ = [ + "BatcherIterDataPipe", + "GrouperIterDataPipe", + "UnBatcherIterDataPipe", +] + + +_T_co = TypeVar("_T_co", covariant=True) + + +def __getattr__(name: str) -> NoReturn: + raise AttributeError(f"module {__name__} has no attribute {name}") + + +@functional_datapipe("batch") +class BatcherIterDataPipe(IterDataPipe[DataChunk]): + r""" + Creates mini-batches of data (functional name: ``batch``). + + An outer dimension will be added as ``batch_size`` if ``drop_last`` is set to ``True``, or ``length % batch_size`` for the + last batch if ``drop_last`` is set to ``False``. + + Args: + datapipe: Iterable DataPipe being batched + batch_size: The size of each batch + drop_last: Option to drop the last batch if it's not full + wrapper_class: wrapper to apply onto each batch (type ``List``) before yielding, + defaults to ``DataChunk`` + + Example: + >>> # xdoctest: +SKIP + >>> from torchdata.datapipes.iter import IterableWrapper + >>> dp = IterableWrapper(range(10)) + >>> dp = dp.batch(batch_size=3, drop_last=True) + >>> list(dp) + [[0, 1, 2], [3, 4, 5], [6, 7, 8]] + """ + + datapipe: IterDataPipe + batch_size: int + drop_last: bool + + def __init__( + self, + datapipe: IterDataPipe, + batch_size: int, + drop_last: bool = False, + wrapper_class: type[DataChunk] = DataChunk, + ) -> None: + if batch_size <= 0: + raise AssertionError("Batch size is required to be larger than 0!") + super().__init__() + self.datapipe = datapipe + self.batch_size = batch_size + self.drop_last = drop_last + self.wrapper_class = wrapper_class + + def __iter__(self) -> Iterator[DataChunk]: + batch: list = [] + for x in self.datapipe: + batch.append(x) + if len(batch) == self.batch_size: + yield self.wrapper_class(batch) + batch = [] + if len(batch) > 0: + if not self.drop_last: + yield self.wrapper_class(batch) + + def __len__(self) -> int: + if isinstance(self.datapipe, Sized): + if self.drop_last: + return len(self.datapipe) // self.batch_size + else: + return (len(self.datapipe) + self.batch_size - 1) // self.batch_size + else: + raise TypeError(f"{type(self).__name__} instance doesn't have valid length") + + +@functional_datapipe("unbatch") +class UnBatcherIterDataPipe(IterDataPipe): + r""" + Undos batching of data (functional name: ``unbatch``). + + In other words, it flattens the data up to the specified level within a batched DataPipe. + + Args: + datapipe: Iterable DataPipe being un-batched + unbatch_level: Defaults to ``1`` (only flattening the top level). If set to ``2``, + it will flatten the top two levels, and ``-1`` will flatten the entire DataPipe. + + Example: + >>> # xdoctest: +SKIP + >>> from torchdata.datapipes.iter import IterableWrapper + >>> source_dp = IterableWrapper([[[0, 1], [2]], [[3, 4], [5]], [[6]]]) + >>> dp1 = source_dp.unbatch() + >>> list(dp1) + [[0, 1], [2], [3, 4], [5], [6]] + >>> dp2 = source_dp.unbatch(unbatch_level=2) + >>> list(dp2) + [0, 1, 2, 3, 4, 5, 6] + """ + + def __init__(self, datapipe: IterDataPipe, unbatch_level: int = 1) -> None: + self.datapipe = datapipe + self.unbatch_level = unbatch_level + + def __iter__(self): + for element in self.datapipe: + yield from self._dive(element, unbatch_level=self.unbatch_level) + + def _dive(self, element, unbatch_level): + if unbatch_level < -1: + raise ValueError("unbatch_level must be -1 or >= 0") + if unbatch_level == -1: + if isinstance(element, (list, DataChunk)): + for item in element: + yield from self._dive(item, unbatch_level=-1) + else: + yield element + elif unbatch_level == 0: + yield element + else: + if isinstance(element, (list, DataChunk)): + for item in element: + yield from self._dive(item, unbatch_level=unbatch_level - 1) + else: + raise IndexError( + f"unbatch_level {self.unbatch_level} exceeds the depth of the DataPipe" + ) + + +@functional_datapipe("groupby") +class GrouperIterDataPipe(IterDataPipe[DataChunk]): + r""" + Groups data from IterDataPipe by keys from ``group_key_fn``, yielding a ``DataChunk`` with batch size up to ``group_size``. + + (functional name: ``groupby``). + + The samples are read sequentially from the source ``datapipe``, and a batch of samples belonging to the same group + will be yielded as soon as the size of the batch reaches ``group_size``. When the buffer is full, + the DataPipe will yield the largest batch with the same key, provided that its size is larger + than ``guaranteed_group_size``. If its size is smaller, it will be dropped if ``drop_remaining=True``. + + After iterating through the entirety of source ``datapipe``, everything not dropped due to the buffer capacity + will be yielded from the buffer, even if the group sizes are smaller than ``guaranteed_group_size``. + + Args: + datapipe: Iterable datapipe to be grouped + group_key_fn: Function used to generate group key from the data of the source datapipe + keep_key: Option to yield the matching key along with the items in a tuple, + resulting in `(key, [items])` otherwise returning [items] + buffer_size: The size of buffer for ungrouped data + group_size: The max size of each group, a batch is yielded as soon as it reaches this size + guaranteed_group_size: The guaranteed minimum group size to be yielded in case the buffer is full + drop_remaining: Specifies if the group smaller than ``guaranteed_group_size`` will be dropped from buffer + when the buffer is full + + Example: + >>> import os + >>> # xdoctest: +SKIP + >>> from torchdata.datapipes.iter import IterableWrapper + >>> def group_fn(file): + ... return os.path.basename(file).split(".")[0] + >>> source_dp = IterableWrapper( + ... ["a.png", "b.png", "a.json", "b.json", "a.jpg", "c.json"] + ... ) + >>> dp0 = source_dp.groupby(group_key_fn=group_fn) + >>> list(dp0) + [['a.png', 'a.json', 'a.jpg'], ['b.png', 'b.json'], ['c.json']] + >>> # A group is yielded as soon as its size equals to `group_size` + >>> dp1 = source_dp.groupby(group_key_fn=group_fn, group_size=2) + >>> list(dp1) + [['a.png', 'a.json'], ['b.png', 'b.json'], ['a.jpg'], ['c.json']] + >>> # Scenario where `buffer` is full, and group 'a' needs to be yielded since its size > `guaranteed_group_size` + >>> dp2 = source_dp.groupby( + ... group_key_fn=group_fn, + ... buffer_size=3, + ... group_size=3, + ... guaranteed_group_size=2, + ... ) + >>> list(dp2) + [['a.png', 'a.json'], ['b.png', 'b.json'], ['a.jpg'], ['c.json']] + """ + + def __init__( + self, + datapipe: IterDataPipe[_T_co], + group_key_fn: Callable[[_T_co], Any], + *, + keep_key: bool = False, + buffer_size: int = 10000, + group_size: int | None = None, + guaranteed_group_size: int | None = None, + drop_remaining: bool = False, + ) -> None: + _check_unpickable_fn(group_key_fn) + # pyrefly: ignore [invalid-type-var] + self.datapipe = datapipe + # pyrefly: ignore [invalid-type-var] + self.group_key_fn = group_key_fn + + self.keep_key = keep_key + self.max_buffer_size = buffer_size + self.buffer_elements: defaultdict[Any, list] = defaultdict(list) + self.curr_buffer_size = 0 + self.group_size = group_size + self.guaranteed_group_size = None + if group_size is not None and buffer_size is not None: + if not (0 < group_size <= buffer_size): + raise AssertionError("group_size must be > 0 and <= buffer_size") + # pyrefly: ignore [bad-assignment] + self.guaranteed_group_size = group_size + if guaranteed_group_size is not None: + if group_size is None or not (0 < guaranteed_group_size <= group_size): + raise AssertionError( + "guaranteed_group_size must be > 0 and <= group_size and group_size must be set" + ) + # pyrefly: ignore [bad-assignment] + self.guaranteed_group_size = guaranteed_group_size + self.drop_remaining = drop_remaining + self.wrapper_class = DataChunk + + def _remove_biggest_key(self): + biggest_key = None + biggest_size = 0 + result_to_yield = None + for findkey in self.buffer_elements: + if len(self.buffer_elements[findkey]) > biggest_size: + biggest_size = len(self.buffer_elements[findkey]) + biggest_key = findkey + + if ( + self.guaranteed_group_size is not None + and biggest_size < self.guaranteed_group_size + and not self.drop_remaining + ): + raise RuntimeError( + "Failed to group items", str(self.buffer_elements[biggest_key]) + ) + + if ( + self.guaranteed_group_size is None + or biggest_size >= self.guaranteed_group_size + ): + result_to_yield = self.buffer_elements[biggest_key] + + self.curr_buffer_size -= biggest_size + del self.buffer_elements[biggest_key] + + return result_to_yield + + def __iter__(self): + for x in self.datapipe: + key = self.group_key_fn(x) + + self.buffer_elements[key].append(x) + self.curr_buffer_size += 1 + + if self.group_size is not None and self.group_size == len( + self.buffer_elements[key] + ): + result: DataChunk[Any] = self.wrapper_class(self.buffer_elements[key]) + yield (key, result) if self.keep_key else result + self.curr_buffer_size -= len(self.buffer_elements[key]) + del self.buffer_elements[key] + + if self.curr_buffer_size == self.max_buffer_size: + result_to_yield = self._remove_biggest_key() + if result_to_yield is not None: + result = self.wrapper_class(result_to_yield) + yield (key, result) if self.keep_key else result + + for key in tuple(self.buffer_elements.keys()): + result = self.wrapper_class(self.buffer_elements.pop(key)) + self.curr_buffer_size -= len(result) + yield (key, result) if self.keep_key else result + + def reset(self) -> None: + self.curr_buffer_size = 0 + self.buffer_elements = defaultdict(list) + + def __getstate__(self): + state = ( + self.datapipe, + self.group_key_fn, + self.keep_key, + self.max_buffer_size, + self.group_size, + self.guaranteed_group_size, + self.drop_remaining, + self.wrapper_class, + self._valid_iterator_id, + self._number_of_samples_yielded, + ) + if IterDataPipe.getstate_hook is not None: + return IterDataPipe.getstate_hook(state) + return state + + def __setstate__(self, state): + ( + self.datapipe, + self.group_key_fn, + self.keep_key, + self.max_buffer_size, + self.group_size, + self.guaranteed_group_size, + self.drop_remaining, + self.wrapper_class, + self._valid_iterator_id, + self._number_of_samples_yielded, + ) = state + self.curr_buffer_size = 0 + self.buffer_elements = defaultdict(list) + + def __del__(self) -> None: + self.buffer_elements.clear() diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/iter/routeddecoder.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/iter/routeddecoder.py new file mode 100644 index 0000000000000000000000000000000000000000..ba4d708a0a318bd75ab67f456b0a5ef2f24b2c81 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/iter/routeddecoder.py @@ -0,0 +1,70 @@ +from collections.abc import Callable, Iterable, Iterator, Sized +from io import BufferedIOBase +from typing import Any + +from torch.utils.data.datapipes._decorator import functional_datapipe +from torch.utils.data.datapipes.datapipe import IterDataPipe +from torch.utils.data.datapipes.utils.common import _deprecation_warning +from torch.utils.data.datapipes.utils.decoder import ( + basichandlers as decoder_basichandlers, + Decoder, + extension_extract_fn, + imagehandler as decoder_imagehandler, +) + + +__all__ = ["RoutedDecoderIterDataPipe"] + + +@functional_datapipe("routed_decode") +class RoutedDecoderIterDataPipe(IterDataPipe[tuple[str, Any]]): + r""" + Decodes binary streams from input DataPipe, yields pathname and decoded data in a tuple. + + (functional name: ``routed_decode``) + + Args: + datapipe: Iterable datapipe that provides pathname and binary stream in tuples + handlers: Optional user defined decoder handlers. If ``None``, basic and image decoder + handlers will be set as default. If multiple handles are provided, the priority + order follows the order of handlers (the first handler has the top priority) + key_fn: Function for decoder to extract key from pathname to dispatch handlers. + Default is set to extract file extension from pathname + + Note: + When ``key_fn`` is specified returning anything other than extension, the default + handler will not work and users need to specify custom handler. Custom handler + could use regex to determine the eligibility to handle data. + """ + + def __init__( + self, + datapipe: Iterable[tuple[str, BufferedIOBase]], + *handlers: Callable, + key_fn: Callable = extension_extract_fn, + ) -> None: + super().__init__() + self.datapipe: Iterable[tuple[str, BufferedIOBase]] = datapipe + if not handlers: + handlers = (decoder_basichandlers, decoder_imagehandler("torch")) + self.decoder = Decoder(*handlers, key_fn=key_fn) + _deprecation_warning( + type(self).__name__, + deprecation_version="1.12", + removal_version="1.13", + old_functional_name="routed_decode", + ) + + def add_handler(self, *handler: Callable) -> None: + self.decoder.add_handler(*handler) + + def __iter__(self) -> Iterator[tuple[str, Any]]: + for data in self.datapipe: + pathname = data[0] + result = self.decoder(data) + yield (pathname, result[pathname]) + + def __len__(self) -> int: + if isinstance(self.datapipe, Sized): + return len(self.datapipe) + raise TypeError(f"{type(self).__name__} instance doesn't have valid length") diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/iter/selecting.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/iter/selecting.py new file mode 100644 index 0000000000000000000000000000000000000000..afb0e91d8557911aae6f20d830667c79f7764cc5 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/iter/selecting.py @@ -0,0 +1,102 @@ +# mypy: allow-untyped-defs +from collections.abc import Callable, Iterator +from typing import TypeVar + +from torch.utils.data.datapipes._decorator import functional_datapipe +from torch.utils.data.datapipes.dataframe import dataframe_wrapper as df_wrapper +from torch.utils.data.datapipes.datapipe import IterDataPipe +from torch.utils.data.datapipes.utils.common import ( + _check_unpickable_fn, + StreamWrapper, + validate_input_col, +) + + +__all__ = ["FilterIterDataPipe"] + + +_T = TypeVar("_T") +_T_co = TypeVar("_T_co", covariant=True) + + +@functional_datapipe("filter") +class FilterIterDataPipe(IterDataPipe[_T_co]): + r""" + Filters out elements from the source datapipe according to input ``filter_fn`` (functional name: ``filter``). + + Args: + datapipe: Iterable DataPipe being filtered + filter_fn: Customized function mapping an element to a boolean. + input_col: Index or indices of data which ``filter_fn`` is applied, such as: + + - ``None`` as default to apply ``filter_fn`` to the data directly. + - Integer(s) is used for list/tuple. + - Key(s) is used for dict. + + Example: + >>> # xdoctest: +SKIP + >>> from torchdata.datapipes.iter import IterableWrapper + >>> def is_even(n): + ... return n % 2 == 0 + >>> dp = IterableWrapper(range(5)) + >>> filter_dp = dp.filter(filter_fn=is_even) + >>> list(filter_dp) + [0, 2, 4] + """ + + datapipe: IterDataPipe[_T_co] + filter_fn: Callable + + def __init__( + self, + datapipe: IterDataPipe[_T_co], + filter_fn: Callable, + input_col=None, + ) -> None: + super().__init__() + self.datapipe = datapipe + + _check_unpickable_fn(filter_fn) + self.filter_fn = filter_fn # type: ignore[assignment] + + self.input_col = input_col + validate_input_col(filter_fn, input_col) + + def _apply_filter_fn(self, data) -> bool: + if self.input_col is None: + return self.filter_fn(data) + elif isinstance(self.input_col, (list, tuple)): + args = tuple(data[col] for col in self.input_col) + return self.filter_fn(*args) + else: + return self.filter_fn(data[self.input_col]) + + def __iter__(self) -> Iterator[_T_co]: + for data in self.datapipe: + condition, filtered = self._returnIfTrue(data) + if condition: + yield filtered + else: + StreamWrapper.close_streams(data) + + def _returnIfTrue(self, data: _T) -> tuple[bool, _T]: + condition = self._apply_filter_fn(data) + + if df_wrapper.is_column(condition): + # We are operating on DataFrames filter here + result = [] + for idx, mask in enumerate(df_wrapper.iterate(condition)): + if mask: + result.append(df_wrapper.get_item(data, idx)) + if result: + return True, df_wrapper.concat(result) + else: + return False, None # type: ignore[return-value] + + if not isinstance(condition, bool): + raise ValueError( + "Boolean output is required for `filter_fn` of FilterIterDataPipe, got", + type(condition), + ) + + return condition, data diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/iter/sharding.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/iter/sharding.py new file mode 100644 index 0000000000000000000000000000000000000000..494ea0106a041eb78d31287a6f05a5c8434c3321 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/iter/sharding.py @@ -0,0 +1,104 @@ +# mypy: allow-untyped-defs +from collections.abc import Sized +from enum import IntEnum +from typing import NoReturn + +from torch.utils.data.datapipes._decorator import functional_datapipe +from torch.utils.data.datapipes.datapipe import IterDataPipe + + +__all__ = [ + "SHARDING_PRIORITIES", + "ShardingFilterIterDataPipe", +] + + +class SHARDING_PRIORITIES(IntEnum): + DEFAULT = 1 + DISTRIBUTED = 2 + MULTIPROCESSING = 3 + + +class _ShardingIterDataPipe(IterDataPipe): + def apply_sharding( + self, + num_of_instances: int, + instance_id: int, + sharding_group: SHARDING_PRIORITIES, + ) -> NoReturn: + raise NotImplementedError + + +@functional_datapipe("sharding_filter") +class ShardingFilterIterDataPipe(_ShardingIterDataPipe): + r""" + Wrapper that allows DataPipe to be sharded (functional name: ``sharding_filter``). + + After ``apply_sharding`` is called, each instance of the DataPipe (on different workers) will have every `n`-th element of the + original DataPipe, where `n` equals to the number of instances. + + Args: + source_datapipe: Iterable DataPipe that will be sharded + """ + + def __init__( + self, source_datapipe: IterDataPipe, sharding_group_filter=None + ) -> None: + self.source_datapipe = source_datapipe + self.sharding_group_filter = sharding_group_filter + self.groups: dict[int, tuple[int, int]] = {} + self.num_of_instances = 1 + self.instance_id = 0 + self._update_num_of_instances() + + def apply_sharding( + self, num_of_instances, instance_id, sharding_group=SHARDING_PRIORITIES.DEFAULT + ): + if instance_id >= num_of_instances: + raise ValueError( + f"instance_id({instance_id}) should be smaller than num_of_instances({num_of_instances})" + ) + if sharding_group == SHARDING_PRIORITIES.DEFAULT: + if len(self.groups) and SHARDING_PRIORITIES.DEFAULT not in self.groups: + raise RuntimeError( + "ShardingFilter cannot mix DEFAULT and non DEFAULT groups" + ) + else: + if SHARDING_PRIORITIES.DEFAULT in self.groups: + raise RuntimeError( + "ShardingFilter cannot mix DEFAULT and non DEFAULT groups" + ) + self.groups[sharding_group] = (num_of_instances, instance_id) + self._update_num_of_instances() + + def _update_num_of_instances(self) -> None: + sorted_sharding_groups = [ + self.groups[key] + for key in sorted(self.groups.keys()) + if self.sharding_group_filter is None or key == self.sharding_group_filter + ] + + sorted_sharding_groups.reverse() + + self.num_of_instances = 1 + self.instance_id = 0 + + for group_num_of_instances, group_instance_id in sorted_sharding_groups: + self.instance_id += self.num_of_instances * group_instance_id + self.num_of_instances *= group_num_of_instances + + def __iter__(self): + for i, item in enumerate(self.source_datapipe): + if i % self.num_of_instances == self.instance_id: + yield item + + def __len__(self) -> int: + if isinstance(self.source_datapipe, Sized): + return len(self.source_datapipe) // self.num_of_instances + ( + 1 + if ( + self.instance_id < len(self.source_datapipe) % self.num_of_instances + ) + else 0 + ) + raise TypeError(f"{type(self).__name__} instance doesn't have valid length") diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/iter/streamreader.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/iter/streamreader.py new file mode 100644 index 0000000000000000000000000000000000000000..1129c06548e1f406629e25a5a2f558dea3a1475e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/iter/streamreader.py @@ -0,0 +1,45 @@ +from collections.abc import Iterator +from io import IOBase + +from torch.utils.data.datapipes._decorator import functional_datapipe +from torch.utils.data.datapipes.datapipe import IterDataPipe + + +__all__ = ["StreamReaderIterDataPipe"] + + +@functional_datapipe("read_from_stream") +class StreamReaderIterDataPipe(IterDataPipe[tuple[str, bytes]]): + r""" + Given IO streams and their label names, yield bytes with label name as tuple. + + (functional name: ``read_from_stream``). + + Args: + datapipe: Iterable DataPipe provides label/URL and byte stream + chunk: Number of bytes to be read from stream per iteration. + If ``None``, all bytes will be read until the EOF. + + Example: + >>> # xdoctest: +SKIP + >>> from torchdata.datapipes.iter import IterableWrapper, StreamReader + >>> from io import StringIO + >>> dp = IterableWrapper([("alphabet", StringIO("abcde"))]) + >>> list(StreamReader(dp, chunk=1)) + [('alphabet', 'a'), ('alphabet', 'b'), ('alphabet', 'c'), ('alphabet', 'd'), ('alphabet', 'e')] + """ + + def __init__( + self, datapipe: IterDataPipe[tuple[str, IOBase]], chunk: int | None = None + ) -> None: + self.datapipe = datapipe + self.chunk = chunk + + def __iter__(self) -> Iterator[tuple[str, bytes]]: + for furl, stream in self.datapipe: + while True: + d = stream.read(self.chunk) + if not d: + stream.close() + break + yield (furl, d) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/iter/utils.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/iter/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..e45ddab282f7b975732b28ab88339f979792646a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/iter/utils.py @@ -0,0 +1,60 @@ +import copy +import warnings +from collections.abc import Iterable, Iterator, Sized +from typing import TypeVar + +from torch.utils.data.datapipes.datapipe import IterDataPipe + + +_T = TypeVar("_T") + +__all__ = ["IterableWrapperIterDataPipe"] + + +class IterableWrapperIterDataPipe(IterDataPipe[_T]): + r""" + Wraps an iterable object to create an IterDataPipe. + + Args: + iterable: Iterable object to be wrapped into an IterDataPipe + deepcopy: Option to deepcopy input iterable object for each + iterator. The copy is made when the first element is read in ``iter()``. + + .. note:: + If ``deepcopy`` is explicitly set to ``False``, users should ensure + that the data pipeline doesn't contain any in-place operations over + the iterable instance to prevent data inconsistency across iterations. + + Example: + >>> # xdoctest: +SKIP + >>> from torchdata.datapipes.iter import IterableWrapper + >>> dp = IterableWrapper(range(10)) + >>> list(dp) + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + """ + + def __init__(self, iterable: Iterable[_T], deepcopy: bool = True) -> None: + self.iterable = iterable + self.deepcopy = deepcopy + + def __iter__(self) -> Iterator[_T]: + source_data = self.iterable + if self.deepcopy: + try: + source_data = copy.deepcopy(self.iterable) + # For the case that data cannot be deep-copied, + # all in-place operations will affect iterable variable. + # When this DataPipe is iterated second time, it will + # yield modified items. + except TypeError: + warnings.warn( + "The input iterable can not be deepcopied, " + "please be aware of in-place modification would affect source data.", + stacklevel=2, + ) + yield from source_data + + def __len__(self) -> int: + if isinstance(self.iterable, Sized): + return len(self.iterable) + raise TypeError(f"{type(self).__name__} instance doesn't have valid length") diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/map/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/map/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bc555e8fdac26039d36c4c1e1ba8309bfa8b4e5a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/map/__init__.py @@ -0,0 +1,20 @@ +# Functional DataPipe +from torch.utils.data.datapipes.map.callable import MapperMapDataPipe as Mapper +from torch.utils.data.datapipes.map.combinatorics import ( + ShufflerIterDataPipe as Shuffler, +) +from torch.utils.data.datapipes.map.combining import ( + ConcaterMapDataPipe as Concater, + ZipperMapDataPipe as Zipper, +) +from torch.utils.data.datapipes.map.grouping import BatcherMapDataPipe as Batcher +from torch.utils.data.datapipes.map.utils import ( + SequenceWrapperMapDataPipe as SequenceWrapper, +) + + +__all__ = ["Batcher", "Concater", "Mapper", "SequenceWrapper", "Shuffler", "Zipper"] + +# Please keep this list sorted +if __all__ != sorted(__all__): + raise AssertionError("__all__ is not sorted") diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/map/callable.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/map/callable.py new file mode 100644 index 0000000000000000000000000000000000000000..3696d34b2a815599709bb09d9b0dfcaca988a6eb --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/map/callable.py @@ -0,0 +1,67 @@ +# mypy: allow-untyped-defs +from collections.abc import Callable +from typing import TypeVar + +from torch.utils.data.datapipes._decorator import functional_datapipe +from torch.utils.data.datapipes.datapipe import MapDataPipe +from torch.utils.data.datapipes.utils.common import _check_unpickable_fn + + +__all__ = ["MapperMapDataPipe", "default_fn"] + + +_T_co = TypeVar("_T_co", covariant=True) + + +# Default function to return each item directly +# In order to keep datapipe picklable, eliminates the usage +# of python lambda function +def default_fn(data): + return data + + +@functional_datapipe("map") +class MapperMapDataPipe(MapDataPipe[_T_co]): + r""" + Apply the input function over each item from the source DataPipe (functional name: ``map``). + + The function can be any regular Python function or partial object. Lambda + function is not recommended as it is not supported by pickle. + + Args: + datapipe: Source MapDataPipe + fn: Function being applied to each item + + Example: + >>> # xdoctest: +SKIP + >>> from torchdata.datapipes.map import SequenceWrapper, Mapper + >>> def add_one(x): + ... return x + 1 + >>> dp = SequenceWrapper(range(10)) + >>> map_dp_1 = dp.map(add_one) + >>> list(map_dp_1) + [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + >>> map_dp_2 = Mapper(dp, lambda x: x + 1) + >>> list(map_dp_2) + [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + """ + + datapipe: MapDataPipe + fn: Callable + + def __init__( + self, + datapipe: MapDataPipe, + fn: Callable = default_fn, + ) -> None: + super().__init__() + self.datapipe = datapipe + _check_unpickable_fn(fn) + self.fn = fn # type: ignore[assignment] + + def __len__(self) -> int: + # pyrefly: ignore [bad-argument-type] + return len(self.datapipe) + + def __getitem__(self, index) -> _T_co: + return self.fn(self.datapipe[index]) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/map/combinatorics.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/map/combinatorics.py new file mode 100644 index 0000000000000000000000000000000000000000..af4792fc805b824d45a966851e0fae2d853ff99f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/map/combinatorics.py @@ -0,0 +1,132 @@ +# mypy: allow-untyped-defs +import random +from collections.abc import Iterator +from typing import TypeVar + +import torch +from torch.utils.data.datapipes.datapipe import IterDataPipe, MapDataPipe + + +__all__ = ["ShufflerIterDataPipe"] + + +_T_co = TypeVar("_T_co", covariant=True) + + +# @functional_datapipe('shuffle') +class ShufflerIterDataPipe(IterDataPipe[_T_co]): + r""" + Shuffle the input MapDataPipe via its indices (functional name: ``shuffle``). + + When it is used with :class:`~torch.utils.data.DataLoader`, the methods to + set up random seed are different based on :attr:`num_workers`. + + For single-process mode (:attr:`num_workers == 0`), the random seed is set before + the :class:`~torch.utils.data.DataLoader` in the main process. For multi-process + mode (:attr:`num_worker > 0`), ``worker_init_fn`` is used to set up a random seed + for each worker process. + + Args: + datapipe: MapDataPipe being shuffled + indices: a list of indices of the MapDataPipe. If not provided, we assume it uses 0-based indexing + + Example: + >>> # xdoctest: +SKIP + >>> from torchdata.datapipes.map import SequenceWrapper + >>> dp = SequenceWrapper(range(10)) + >>> shuffle_dp = dp.shuffle().set_seed(0) + >>> list(shuffle_dp) + [7, 8, 1, 5, 3, 4, 2, 0, 9, 6] + >>> list(shuffle_dp) + [6, 1, 9, 5, 2, 4, 7, 3, 8, 0] + >>> # Reset seed for Shuffler + >>> shuffle_dp = shuffle_dp.set_seed(0) + >>> list(shuffle_dp) + [7, 8, 1, 5, 3, 4, 2, 0, 9, 6] + + Note: + Even thought this ``shuffle`` operation takes a ``MapDataPipe`` as the input, it would return an + ``IterDataPipe`` rather than a ``MapDataPipe``, because ``MapDataPipe`` should be non-sensitive to + the order of data order for the sake of random reads, but ``IterDataPipe`` depends on the order + of data during data-processing. + """ + + datapipe: MapDataPipe[_T_co] + _enabled: bool + _seed: int | None + _rng: random.Random + + def __init__( + self, + datapipe: MapDataPipe[_T_co], + *, + indices: list | None = None, + ) -> None: + super().__init__() + self.datapipe = datapipe + # pyrefly: ignore [bad-argument-type] + self.indices = list(range(len(datapipe))) if indices is None else indices + self._enabled = True + self._seed = None + self._rng = random.Random() + self._shuffled_indices: list = self.indices + + def set_shuffle(self, shuffle=True): + self._enabled = shuffle + return self + + def set_seed(self, seed: int): + self._seed = seed + return self + + def __iter__(self) -> Iterator[_T_co]: + if not self._enabled: + for idx in self.indices: + yield self.datapipe[idx] + else: + while self._shuffled_indices: + idx = self._shuffled_indices.pop() + yield self.datapipe[idx] + + def reset(self) -> None: + if self._enabled and self._seed is None: + self._seed = int(torch.empty((), dtype=torch.int64).random_().item()) + self._rng.seed(self._seed) + self._seed = None + self._shuffled_indices = self._rng.sample(self.indices, len(self.indices)) + + def __len__(self) -> int: + # pyrefly: ignore [bad-argument-type] + return len(self.datapipe) + + def __getstate__(self): + state = ( + self.datapipe, + self.indices, + self._enabled, + self._seed, + self._rng.getstate(), + self._shuffled_indices, + self._valid_iterator_id, + self._number_of_samples_yielded, + ) + if IterDataPipe.getstate_hook is not None: + return IterDataPipe.getstate_hook(state) + return state + + def __setstate__(self, state): + ( + self.datapipe, + self.indices, + self._enabled, + self._seed, + rng_state, + self._shuffled_indices, + self._valid_iterator_id, + self._number_of_samples_yielded, + ) = state + self._rng = random.Random() + self._rng.setstate(rng_state) + + +MapDataPipe.register_datapipe_as_function("shuffle", ShufflerIterDataPipe) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/map/combining.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/map/combining.py new file mode 100644 index 0000000000000000000000000000000000000000..c11d0bcd17d99b2fbceda986e229fb2257e1ec67 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/map/combining.py @@ -0,0 +1,109 @@ +# mypy: allow-untyped-defs +from collections.abc import Sized +from typing import TypeVar + +from torch.utils.data.datapipes._decorator import functional_datapipe +from torch.utils.data.datapipes.datapipe import MapDataPipe + + +__all__ = ["ConcaterMapDataPipe", "ZipperMapDataPipe"] + +_T_co = TypeVar("_T_co", covariant=True) + + +@functional_datapipe("concat") +class ConcaterMapDataPipe(MapDataPipe): + r""" + Concatenate multiple Map DataPipes (functional name: ``concat``). + + The new index of is the cumulative sum of source DataPipes. + For example, if there are 2 source DataPipes both with length 5, + index 0 to 4 of the resulting `ConcatMapDataPipe` would refer to + elements of the first DataPipe, and 5 to 9 would refer to elements + of the second DataPipe. + + Args: + datapipes: Map DataPipes being concatenated + + Example: + >>> # xdoctest: +SKIP + >>> from torchdata.datapipes.map import SequenceWrapper + >>> dp1 = SequenceWrapper(range(3)) + >>> dp2 = SequenceWrapper(range(3)) + >>> concat_dp = dp1.concat(dp2) + >>> list(concat_dp) + [0, 1, 2, 0, 1, 2] + """ + + datapipes: tuple[MapDataPipe] + + def __init__(self, *datapipes: MapDataPipe) -> None: + if len(datapipes) == 0: + raise ValueError("Expected at least one DataPipe, but got nothing") + if not all(isinstance(dp, MapDataPipe) for dp in datapipes): + raise TypeError("Expected all inputs to be `MapDataPipe`") + if not all(isinstance(dp, Sized) for dp in datapipes): + raise TypeError("Expected all inputs to be `Sized`") + self.datapipes = datapipes # type: ignore[assignment] + + def __getitem__(self, index) -> _T_co: # type: ignore[type-var] + offset = 0 + for dp in self.datapipes: + # pyrefly: ignore [bad-argument-type] + if index - offset < len(dp): + return dp[index - offset] + else: + # pyrefly: ignore [bad-argument-type] + offset += len(dp) + raise IndexError(f"Index {index} is out of range.") + + def __len__(self) -> int: + # pyrefly: ignore [bad-argument-type] + return sum(len(dp) for dp in self.datapipes) + + +@functional_datapipe("zip") +class ZipperMapDataPipe(MapDataPipe[tuple[_T_co, ...]]): + r""" + Aggregates elements into a tuple from each of the input DataPipes (functional name: ``zip``). + + This MataPipe is out of bound as soon as the shortest input DataPipe is exhausted. + + Args: + *datapipes: Map DataPipes being aggregated + + Example: + >>> # xdoctest: +SKIP + >>> from torchdata.datapipes.map import SequenceWrapper + >>> dp1 = SequenceWrapper(range(3)) + >>> dp2 = SequenceWrapper(range(10, 13)) + >>> zip_dp = dp1.zip(dp2) + >>> list(zip_dp) + [(0, 10), (1, 11), (2, 12)] + """ + + datapipes: tuple[MapDataPipe[_T_co], ...] + + def __init__(self, *datapipes: MapDataPipe[_T_co]) -> None: + if len(datapipes) == 0: + raise ValueError("Expected at least one DataPipe, but got nothing") + if not all(isinstance(dp, MapDataPipe) for dp in datapipes): + raise TypeError("Expected all inputs to be `MapDataPipe`") + if not all(isinstance(dp, Sized) for dp in datapipes): + raise TypeError("Expected all inputs to be `Sized`") + self.datapipes = datapipes + + def __getitem__(self, index) -> tuple[_T_co, ...]: + res = [] + for dp in self.datapipes: + try: + res.append(dp[index]) + except IndexError as e: + raise IndexError( + f"Index {index} is out of range for one of the input MapDataPipes {dp}." + ) from e + return tuple(res) + + def __len__(self) -> int: + # pyrefly: ignore [bad-argument-type] + return min(len(dp) for dp in self.datapipes) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/map/grouping.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/map/grouping.py new file mode 100644 index 0000000000000000000000000000000000000000..5929cab2427913d1ed3cae7494ef757513c73a40 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/map/grouping.py @@ -0,0 +1,75 @@ +# mypy: allow-untyped-defs +from collections.abc import Sized +from typing import TypeVar + +from torch.utils.data.datapipes._decorator import functional_datapipe +from torch.utils.data.datapipes.datapipe import DataChunk, MapDataPipe + + +__all__ = ["BatcherMapDataPipe"] + + +_T = TypeVar("_T") + + +@functional_datapipe("batch") +class BatcherMapDataPipe(MapDataPipe[DataChunk]): + r""" + Create mini-batches of data (functional name: ``batch``). + + An outer dimension will be added as ``batch_size`` if ``drop_last`` is set to ``True``, + or ``length % batch_size`` for the last batch if ``drop_last`` is set to ``False``. + + Args: + datapipe: Iterable DataPipe being batched + batch_size: The size of each batch + drop_last: Option to drop the last batch if it's not full + + Example: + >>> # xdoctest: +SKIP + >>> from torchdata.datapipes.map import SequenceWrapper + >>> dp = SequenceWrapper(range(10)) + >>> batch_dp = dp.batch(batch_size=2) + >>> list(batch_dp) + [[0, 1], [2, 3], [4, 5], [6, 7], [8, 9]] + """ + + datapipe: MapDataPipe + batch_size: int + drop_last: bool + + def __init__( + self, + datapipe: MapDataPipe[_T], + batch_size: int, + drop_last: bool = False, + wrapper_class: type[DataChunk] = DataChunk, + ) -> None: + if batch_size <= 0: + raise AssertionError("Batch size is required to be larger than 0!") + super().__init__() + self.datapipe = datapipe + self.batch_size = batch_size + self.drop_last = drop_last + self.wrapper_class = wrapper_class + + def __getitem__(self, index) -> DataChunk: + batch: list = [] + indices = range(index * self.batch_size, (index + 1) * self.batch_size) + try: + batch.extend(self.datapipe[i] for i in indices) + return self.wrapper_class(batch) + except IndexError as e: + if not self.drop_last and len(batch) > 0: + return self.wrapper_class(batch) + else: + raise IndexError(f"Index {index} is out of bound.") from e + + def __len__(self) -> int: + if isinstance(self.datapipe, Sized): + if self.drop_last: + return len(self.datapipe) // self.batch_size + else: + return (len(self.datapipe) + self.batch_size - 1) // self.batch_size + else: + raise TypeError(f"{type(self).__name__} instance doesn't have valid length") diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/map/utils.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/map/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..a5b9075f1dbbc66a84dfd14d0778cc96ca604da0 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/map/utils.py @@ -0,0 +1,61 @@ +import copy +import warnings +from collections.abc import Mapping, Sequence +from typing import Any, TypeVar + +from torch.utils.data.datapipes.datapipe import MapDataPipe + + +_T = TypeVar("_T") + +__all__ = ["SequenceWrapperMapDataPipe"] + + +class SequenceWrapperMapDataPipe(MapDataPipe[_T]): + r""" + Wraps a sequence object into a MapDataPipe. + + Args: + sequence: Sequence object to be wrapped into an MapDataPipe + deepcopy: Option to deepcopy input sequence object + + .. note:: + If ``deepcopy`` is set to False explicitly, users should ensure + that data pipeline doesn't contain any in-place operations over + the iterable instance, in order to prevent data inconsistency + across iterations. + + Example: + >>> # xdoctest: +SKIP + >>> from torchdata.datapipes.map import SequenceWrapper + >>> dp = SequenceWrapper(range(10)) + >>> list(dp) + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + >>> dp = SequenceWrapper({"a": 100, "b": 200, "c": 300, "d": 400}) + >>> dp["a"] + 100 + """ + + sequence: Sequence[_T] | Mapping[Any, _T] + + def __init__( + self, sequence: Sequence[_T] | Mapping[Any, _T], deepcopy: bool = True + ) -> None: + if deepcopy: + try: + self.sequence = copy.deepcopy(sequence) + except TypeError: + warnings.warn( + "The input sequence can not be deepcopied, " + "please be aware of in-place modification would affect source data", + stacklevel=2, + ) + self.sequence = sequence + else: + self.sequence = sequence + + def __getitem__(self, index: int) -> _T: + return self.sequence[index] + + def __len__(self) -> int: + return len(self.sequence) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/utils/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/utils/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/utils/common.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/utils/common.py new file mode 100644 index 0000000000000000000000000000000000000000..4fcc617b3b722b4b9acfe0006198017858eb60b3 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/utils/common.py @@ -0,0 +1,415 @@ +# mypy: allow-untyped-defs +import fnmatch +import functools +import inspect +import os +import warnings +from collections.abc import Callable, Iterable +from io import IOBase +from typing import Any, NoReturn + +from torch.utils._import_utils import dill_available + + +__all__ = [ + "validate_input_col", + "StreamWrapper", + "get_file_binaries_from_pathnames", + "get_file_pathnames_from_root", + "match_masks", + "validate_pathname_binary_tuple", +] + + +# BC for torchdata +DILL_AVAILABLE = dill_available() + + +def validate_input_col(fn: Callable, input_col: int | tuple | list | None) -> None: + """ + Check that function used in a callable datapipe works with the input column. + + This simply ensures that the number of positional arguments matches the size + of the input column. The function must not contain any non-default + keyword-only arguments. + + Examples: + >>> # xdoctest: +SKIP("Failing on some CI machines") + >>> def f(a, b, *, c=1): + >>> return a + b + c + >>> def f_def(a, b=1, *, c=1): + >>> return a + b + c + >>> assert validate_input_col(f, [1, 2]) + >>> assert validate_input_col(f_def, 1) + >>> assert validate_input_col(f_def, [1, 2]) + + Notes: + If the function contains variable positional (`inspect.VAR_POSITIONAL`) arguments, + for example, f(a, *args), the validator will accept any size of input column + greater than or equal to the number of positional arguments. + (in this case, 1). + + Args: + fn: The function to check. + input_col: The input column to check. + + Raises: + ValueError: If the function is not compatible with the input column. + """ + try: + sig = inspect.signature(fn) + except ( + ValueError + ): # Signature cannot be inspected, likely it is a built-in fn or written in C + return + if isinstance(input_col, (list, tuple)): + input_col_size = len(input_col) + else: + input_col_size = 1 + + pos = [] + var_positional = False + non_default_kw_only = [] + + for p in sig.parameters.values(): + if p.kind in ( + inspect.Parameter.POSITIONAL_ONLY, + inspect.Parameter.POSITIONAL_OR_KEYWORD, + ): + pos.append(p) + elif p.kind is inspect.Parameter.VAR_POSITIONAL: + var_positional = True + elif p.kind is inspect.Parameter.KEYWORD_ONLY: + if p.default is p.empty: + non_default_kw_only.append(p) + else: + continue + + if isinstance(fn, functools.partial): + fn_name = getattr(fn.func, "__name__", repr(fn.func)) + else: + fn_name = getattr(fn, "__name__", repr(fn)) + + if len(non_default_kw_only) > 0: + raise ValueError( + f"The function {fn_name} takes {len(non_default_kw_only)} " + f"non-default keyword-only parameters, which is not allowed." + ) + + if len(sig.parameters) < input_col_size: + if not var_positional: + raise ValueError( + f"The function {fn_name} takes {len(sig.parameters)} " + f"parameters, but {input_col_size} are required." + ) + else: + if len(pos) > input_col_size: + if any(p.default is p.empty for p in pos[input_col_size:]): + raise ValueError( + f"The function {fn_name} takes {len(pos)} " + f"positional parameters, but {input_col_size} are required." + ) + elif len(pos) < input_col_size: + if not var_positional: + raise ValueError( + f"The function {fn_name} takes {len(pos)} " + f"positional parameters, but {input_col_size} are required." + ) + + +def _is_local_fn(fn): + # Functions or Methods + if hasattr(fn, "__code__"): + return fn.__code__.co_flags & inspect.CO_NESTED + # Callable Objects + else: + if hasattr(fn, "__qualname__"): + return "" in fn.__qualname__ + fn_type = type(fn) + if hasattr(fn_type, "__qualname__"): + return "" in fn_type.__qualname__ + return False + + +def _check_unpickable_fn(fn: Callable) -> None: + """ + Check function is pickable or not. + + If it is a lambda or local function, a UserWarning will be raised. If it's not a callable function, a TypeError will be raised. + """ + if not callable(fn): + raise TypeError(f"A callable function is expected, but {type(fn)} is provided.") + + # Extract function from partial object + # Nested partial function is automatically expanded as a single partial object + if isinstance(fn, functools.partial): + fn = fn.func + + # Local function + if _is_local_fn(fn) and not dill_available(): + warnings.warn( + "Local function is not supported by pickle, please use " + "regular python function or functools.partial instead.", + stacklevel=2, + ) + return + + # Lambda function + if hasattr(fn, "__name__") and fn.__name__ == "" and not dill_available(): + warnings.warn( + "Lambda function is not supported by pickle, please use " + "regular python function or functools.partial instead.", + stacklevel=2, + ) + return + + +def match_masks(name: str, masks: str | list[str]) -> bool: + # empty mask matches any input name + if not masks: + return True + + if isinstance(masks, str): + return fnmatch.fnmatch(name, masks) + + for mask in masks: + if fnmatch.fnmatch(name, mask): + return True + return False + + +def get_file_pathnames_from_root( + root: str, + masks: str | list[str], + recursive: bool = False, + abspath: bool = False, + non_deterministic: bool = False, +) -> Iterable[str]: + # print out an error message and raise the error out + def onerror(err: OSError) -> NoReturn: + warnings.warn(err.filename + " : " + err.strerror, stacklevel=2) + raise err + + if os.path.isfile(root): + path = root + if abspath: + path = os.path.abspath(path) + fname = os.path.basename(path) + if match_masks(fname, masks): + yield path + else: + # pyrefly: ignore [bad-assignment] + for path, dirs, files in os.walk(root, onerror=onerror): + if abspath: + path = os.path.abspath(path) + if not non_deterministic: + files.sort() + for f in files: + if match_masks(f, masks): + yield os.path.join(path, f) + if not recursive: + break + if not non_deterministic: + # Note that this is in-place modifying the internal list from `os.walk` + # This only works because `os.walk` doesn't shallow copy before turn + # https://github.com/python/cpython/blob/f4c03484da59049eb62a9bf7777b963e2267d187/Lib/os.py#L407 + dirs.sort() + + +def get_file_binaries_from_pathnames( + pathnames: Iterable, mode: str, encoding: str | None = None +): + if not isinstance(pathnames, Iterable): + pathnames = [ + pathnames, + ] + + if mode in ("b", "t"): + mode = "r" + mode + + for pathname in pathnames: + if not isinstance(pathname, str): + raise TypeError( + f"Expected string type for pathname, but got {type(pathname)}" + ) + yield pathname, StreamWrapper(open(pathname, mode, encoding=encoding)) # noqa:SIM115 + + +def validate_pathname_binary_tuple(data: tuple[str, IOBase]) -> None: + if not isinstance(data, tuple): + raise TypeError( + f"pathname binary data should be tuple type, but it is type {type(data)}" + ) + if len(data) != 2: + raise TypeError( + f"pathname binary stream tuple length should be 2, but got {len(data)}" + ) + if not isinstance(data[0], str): + raise TypeError( + f"pathname within the tuple should have string type pathname, but it is type {type(data[0])}" + ) + if not isinstance(data[1], IOBase) and not isinstance(data[1], StreamWrapper): + raise TypeError( + f"binary stream within the tuple should have IOBase or" + f"its subclasses as type, but it is type {type(data[1])}" + ) + + +# Deprecated function names and its corresponding DataPipe type and kwargs for the `_deprecation_warning` function +_iter_deprecated_functional_names: dict[str, dict] = {} +_map_deprecated_functional_names: dict[str, dict] = {} + + +def _deprecation_warning( + old_class_name: str, + *, + deprecation_version: str, + removal_version: str, + old_functional_name: str = "", + old_argument_name: str = "", + new_class_name: str = "", + new_functional_name: str = "", + new_argument_name: str = "", + deprecate_functional_name_only: bool = False, +) -> None: + if new_functional_name and not old_functional_name: + raise ValueError( + "Old functional API needs to be specified for the deprecation warning." + ) + if new_argument_name and not old_argument_name: + raise ValueError( + "Old argument name needs to be specified for the deprecation warning." + ) + + if old_functional_name and old_argument_name: + raise ValueError( + "Deprecating warning for functional API and argument should be separated." + ) + + msg = f"`{old_class_name}()`" + if deprecate_functional_name_only and old_functional_name: + msg = f"{msg}'s functional API `.{old_functional_name}()` is" + elif old_functional_name: + msg = f"{msg} and its functional API `.{old_functional_name}()` are" + elif old_argument_name: + msg = f"The argument `{old_argument_name}` of {msg} is" + else: + msg = f"{msg} is" + msg = ( + f"{msg} deprecated since {deprecation_version} and will be removed in {removal_version}." + f"\nSee https://github.com/pytorch/data/issues/163 for details." + ) + + if new_class_name or new_functional_name: + msg = f"{msg}\nPlease use" + if new_class_name: + msg = f"{msg} `{new_class_name}()`" + if new_class_name and new_functional_name: + msg = f"{msg} or" + if new_functional_name: + msg = f"{msg} `.{new_functional_name}()`" + msg = f"{msg} instead." + + if new_argument_name: + msg = f"{msg}\nPlease use `{old_class_name}({new_argument_name}=)` instead." + + warnings.warn(msg, FutureWarning, stacklevel=2) + + +class StreamWrapper: + """ + StreamWrapper is introduced to wrap file handler generated by DataPipe operation like `FileOpener`. + + StreamWrapper would guarantee the wrapped file handler is closed when it's out of scope. + """ + + session_streams: dict[Any, int] = {} + debug_unclosed_streams: bool = False + + def __init__(self, file_obj, parent_stream=None, name=None) -> None: + self.file_obj = file_obj + self.child_counter = 0 + self.parent_stream = parent_stream + self.close_on_last_child = False + self.name = name + self.closed = False + if parent_stream is not None: + if not isinstance(parent_stream, StreamWrapper): + raise RuntimeError( + f"Parent stream should be StreamWrapper, {type(parent_stream)} was given" + ) + parent_stream.child_counter += 1 + self.parent_stream = parent_stream + if StreamWrapper.debug_unclosed_streams: + StreamWrapper.session_streams[self] = 1 + + @classmethod + def close_streams(cls, v, depth=0) -> None: + """Traverse structure and attempts to close all found StreamWrappers on best effort basis.""" + if depth > 10: + return + if isinstance(v, StreamWrapper): + v.close() + else: + # Traverse only simple structures + if isinstance(v, dict): + for vv in v.values(): + cls.close_streams(vv, depth=depth + 1) + elif isinstance(v, (list, tuple)): + for vv in v: + cls.close_streams(vv, depth=depth + 1) + + def __getattr__(self, name): + file_obj = self.__dict__["file_obj"] + return getattr(file_obj, name) + + def close(self, *args, **kwargs) -> None: + if self.closed: + return + if StreamWrapper.debug_unclosed_streams: + del StreamWrapper.session_streams[self] + if hasattr(self, "parent_stream") and self.parent_stream is not None: + self.parent_stream.child_counter -= 1 + if ( + not self.parent_stream.child_counter + and self.parent_stream.close_on_last_child + ): + self.parent_stream.close() + try: + self.file_obj.close(*args, **kwargs) + except AttributeError: + pass + self.closed = True + + def autoclose(self) -> None: + """Automatically close stream when all child streams are closed or if there are none.""" + self.close_on_last_child = True + if self.child_counter == 0: + self.close() + + def __dir__(self): + attrs = list(self.__dict__.keys()) + list(StreamWrapper.__dict__.keys()) + attrs += dir(self.file_obj) + return list(set(attrs)) + + def __del__(self) -> None: + if not self.closed: + self.close() + + def __iter__(self): + yield from self.file_obj + + def __next__(self): + return next(self.file_obj) + + def __repr__(self) -> str: + if self.name is None: + return f"StreamWrapper<{self.file_obj!r}>" + else: + return f"StreamWrapper<{self.name},{self.file_obj!r}>" + + def __getstate__(self): + return self.file_obj + + def __setstate__(self, obj): + self.file_obj = obj diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/utils/decoder.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/utils/decoder.py new file mode 100644 index 0000000000000000000000000000000000000000..3b907ffebdd22d663cef50b0cc55166c58ec6192 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/utils/decoder.py @@ -0,0 +1,389 @@ +# mypy: allow-untyped-defs +# This file takes partial of the implementation from NVIDIA's webdataset at here: +# https://github.com/tmbdev/webdataset/blob/master/webdataset/autodecode.py + +import io +import json +import os.path +import pickle +import tempfile + +import torch +from torch.utils.data.datapipes.utils.common import StreamWrapper + + +__all__ = [ + "Decoder", + "ImageHandler", + "MatHandler", + "audiohandler", + "basichandlers", + "extension_extract_fn", + "handle_extension", + "imagehandler", + "mathandler", + "videohandler", +] + + +################################################################ +# handle basic datatypes +################################################################ +def basichandlers(extension: str, data): + """Transforms raw data (byte stream) into python objects. + + Looks at the extension and loads the data into a python object supporting + the corresponding extension. + + Args: + extension (str): The file extension + data (byte stream): Data to load into a python object. + + Returns: + object: The data loaded into a corresponding python object + supporting the extension. + + Example: + >>> import pickle + >>> data = pickle.dumps("some data") + >>> new_data = basichandlers("pickle", data) + >>> new_data + some data + + The transformation of data for extensions are: + - txt, text, transcript: utf-8 decoded data of str format + - cls, cls2, class, count, index, inx, id: int + - json, jsn: json loaded data + - pickle, pyd: pickle loaded data + - pt: torch loaded data + """ + + if extension in "txt text transcript": + return data.decode("utf-8") + + if extension in ["cls", "cls2", "class", "count", "index", "inx", "id"]: + try: + return int(data) + except ValueError: + return None + + if extension in "json jsn": + return json.loads(data) + + if extension in ["pyd", "pickle"]: + return pickle.loads(data) + + if extension in ["pt"]: + stream = io.BytesIO(data) + return torch.load(stream) + + # if extension in "ten tb".split(): + # from . import tenbin + # return tenbin.decode_buffer(data) + + # if extension in "mp msgpack msg".split(): + # import msgpack + # return msgpack.unpackb(data) + + return None + + +################################################################ +# handle images +################################################################ +imagespecs = { + "l8": ("numpy", "uint8", "l"), + "rgb8": ("numpy", "uint8", "rgb"), + "rgba8": ("numpy", "uint8", "rgba"), + "l": ("numpy", "float", "l"), + "rgb": ("numpy", "float", "rgb"), + "rgba": ("numpy", "float", "rgba"), + "torchl8": ("torch", "uint8", "l"), + "torchrgb8": ("torch", "uint8", "rgb"), + "torchrgba8": ("torch", "uint8", "rgba"), + "torchl": ("torch", "float", "l"), + "torchrgb": ("torch", "float", "rgb"), + "torch": ("torch", "float", "rgb"), + "torchrgba": ("torch", "float", "rgba"), + "pill": ("pil", None, "l"), + "pil": ("pil", None, "rgb"), + "pilrgb": ("pil", None, "rgb"), + "pilrgba": ("pil", None, "rgba"), +} + + +def handle_extension(extensions, f): + """ + Return a decoder handler function for the list of extensions. + + Extensions can be a space separated list of extensions. + Extensions can contain dots, in which case the corresponding number + of extension components must be present in the key given to f. + Comparisons are case insensitive. + Examples: + handle_extension("jpg jpeg", my_decode_jpg) # invoked for any file.jpg + handle_extension("seg.jpg", special_case_jpg) # invoked only for file.seg.jpg + """ + extensions = extensions.lower().split() + + def g(key, data): + extension = key.lower().split(".") + + for target in extensions: + target = target.split(".") + if len(target) > len(extension): + continue + + if extension[-len(target) :] == target: + return f(data) + return None + + return g + + +class ImageHandler: + """ + Decode image data using the given `imagespec`. + + The `imagespec` specifies whether the image is decoded + to numpy/torch/pi, decoded to uint8/float, and decoded + to l/rgb/rgba: + + - l8: numpy uint8 l + - rgb8: numpy uint8 rgb + - rgba8: numpy uint8 rgba + - l: numpy float l + - rgb: numpy float rgb + - rgba: numpy float rgba + - torchl8: torch uint8 l + - torchrgb8: torch uint8 rgb + - torchrgba8: torch uint8 rgba + - torchl: torch float l + - torchrgb: torch float rgb + - torch: torch float rgb + - torchrgba: torch float rgba + - pill: pil None l + - pil: pil None rgb + - pilrgb: pil None rgb + - pilrgba: pil None rgba + """ + + def __init__(self, imagespec) -> None: + if imagespec not in list(imagespecs.keys()): + raise AssertionError(f"unknown image specification: {imagespec}") + self.imagespec = imagespec.lower() + + def __call__(self, extension, data): + if extension.lower() not in ["jpg", "jpeg", "png", "ppm", "pgm", "pbm", "pnm"]: + return None + + try: + import numpy as np + except ModuleNotFoundError as e: + raise ModuleNotFoundError( + "Package `numpy` is required to be installed for default image decoder." + "Please use `pip install numpy` to install the package" + ) from e + + try: + import PIL.Image + except ModuleNotFoundError as e: + raise ModuleNotFoundError( + "Package `PIL` is required to be installed for default image decoder." + "Please use `pip install Pillow` to install the package" + ) from e + + imagespec = self.imagespec + atype, etype, mode = imagespecs[imagespec] + + with io.BytesIO(data) as stream: + img = PIL.Image.open(stream) + img.load() + img = img.convert(mode.upper()) + if atype == "pil": + return img + elif atype == "numpy": + result = np.asarray(img) + if result.dtype != np.uint8: + raise AssertionError( + f"numpy image array should be type uint8, but got {result.dtype}" + ) + if etype == "uint8": + return result + else: + return result.astype("f") / 255.0 + elif atype == "torch": + result = np.asarray(img) + if result.dtype != np.uint8: + raise AssertionError( + f"numpy image array should be type uint8, but got {result.dtype}" + ) + + if etype == "uint8": + result = np.array(result.transpose(2, 0, 1)) + return torch.tensor(result) + else: + result = np.array(result.transpose(2, 0, 1)) + return torch.tensor(result) / 255.0 + return None + + +def imagehandler(imagespec): + return ImageHandler(imagespec) + + +################################################################ +# torch video +################################################################ +def videohandler(extension, data): + if extension not in [ + "mp4", + "ogv", + "mjpeg", + "avi", + "mov", + "h264", + "mpg", + "webm", + "wmv", + ]: + return None + + try: + import torchvision.io + except ImportError as e: + raise ModuleNotFoundError( + "Package `torchvision` is required to be installed for default video file loader." + "Please use `pip install torchvision`" + "to install the package" + ) from e + + with tempfile.TemporaryDirectory() as dirname: + fname = os.path.join(dirname, f"file.{extension}") + with open(fname, "wb") as stream: + stream.write(data) + return torchvision.io.read_video(fname) + + +################################################################ +# torchaudio +################################################################ +def audiohandler(extension, data): + if extension not in ["flac", "mp3", "sox", "wav", "m4a", "ogg", "wma"]: + return None + + try: + import torchaudio # type: ignore[import] + except ImportError as e: + raise ModuleNotFoundError( + "Package `torchaudio` is required to be installed for default audio file loader." + "Please use `pip install torchaudio`" + "to install the package" + ) from e + + with tempfile.TemporaryDirectory() as dirname: + fname = os.path.join(dirname, f"file.{extension}") + with open(fname, "wb") as stream: + stream.write(data) + return torchaudio.load(fname) + + +################################################################ +# mat +################################################################ +class MatHandler: + def __init__(self, **loadmat_kwargs) -> None: + try: + import scipy.io as sio + except ImportError as e: + raise ModuleNotFoundError( + "Package `scipy` is required to be installed for mat file." + "Please use `pip install scipy`" + "to install the package" + ) from e + self.sio = sio + self.loadmat_kwargs = loadmat_kwargs + + def __call__(self, extension, data): + if extension != "mat": + return None + with io.BytesIO(data) as stream: + return self.sio.loadmat(stream, **self.loadmat_kwargs) + + +def mathandler(**loadmat_kwargs): + return MatHandler(**loadmat_kwargs) + + +################################################################ +# a sample decoder +################################################################ +# Extract extension from pathname +def extension_extract_fn(pathname): + ext = os.path.splitext(pathname)[1] + # Remove dot + if ext: + ext = ext[1:] + return ext + + +class Decoder: + """ + Decode key/data sets using a list of handlers. + + For each key/data item, this iterates through the list of + handlers until some handler returns something other than None. + """ + + def __init__(self, *handler, key_fn=extension_extract_fn) -> None: + self.handlers = list(handler) if handler else [] + self.key_fn = key_fn + + # Insert new handler from the beginning of handlers list to make sure the new + # handler having the highest priority + def add_handler(self, *handler) -> None: + if not handler: + return + self.handlers = list(handler) + self.handlers + + @staticmethod + def _is_stream_handle(data): + obj_to_check = data.file_obj if isinstance(data, StreamWrapper) else data + return isinstance(obj_to_check, (io.BufferedIOBase, io.RawIOBase)) + + def decode1(self, key, data): + if not data: + return data + + # if data is a stream handle, we need to read all the content before decoding + if Decoder._is_stream_handle(data): + ds = data + # The behavior of .read can differ between streams (e.g. HTTPResponse), hence this is used instead + data = b"".join(data) + ds.close() + + for f in self.handlers: + result = f(key, data) + if result is not None: + return result + return data + + def decode(self, data): + result = {} + # single data tuple(pathname, data stream) + if isinstance(data, tuple): + data = [data] + + if data is not None: + for k, v in data: + # TODO: xinyu, figure out why Nvidia do this? + if k[0] == "_": + if isinstance(v, bytes): + v = v.decode("utf-8") + result[k] = v + continue + result[k] = self.decode1(self.key_fn(k), v) + return result + + def __call__(self, data): + return self.decode(data) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/utils/snapshot.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/utils/snapshot.py new file mode 100644 index 0000000000000000000000000000000000000000..42aec1aa308a9b21b251de595cddfbe171930bb6 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/datapipes/utils/snapshot.py @@ -0,0 +1,65 @@ +# mypy: allow-untyped-defs +from torch.utils.data.datapipes._hook_iterator import _SnapshotState +from torch.utils.data.datapipes.datapipe import IterDataPipe +from torch.utils.data.graph_settings import apply_random_seed + + +# TODO: Caveats +# 1. Caller (either the ReadingService or DataLoader) must pass in the initial RNG +# 2. `in_batch_shuffle` and `bucketbatch` are not compatible with this because they currently +# lack the option to `set_seed`. +def _simple_graph_snapshot_restoration( + datapipe: IterDataPipe, n_iterations: int, rng=None +) -> None: + r""" + Fast-forward the given DataPipe and its parents by ``n_iterations``, re-doing computations to restore a snapshot. + + For instance, applying this function to the final DataPipe of a graph will restore the snapshot + (via fast-forward) every DataPipe within the graph. + + After you deserialize a DataPipe, you can use its `_number_of_samples_yielded` attribute as the input + to this function to forward the DataPipe. + + A DataPipe cannot be restored twice in a row unless there is an iteration started between the restoration + attempts. + + Note: + This is the simplest but least efficient way to fast-forward a DataPipe. Usage of other fast-forwarding + methods (custom ones if necessary) are recommended. + + Args: + datapipe: IterDataPipe to be fast-forwarded + n_iterations: number of iterations to fast-forward + rng: ``Optional[torch.Generator]``. If not ``None``, this RNG will be used for shuffling. The generator + should be in its `initial` state as it was first passed into ``DataLoader`` or ``ReadingService``. + """ + if datapipe._snapshot_state == _SnapshotState.Restored: + raise RuntimeError( + "Snapshot restoration cannot be applied. You can only restore simple snapshot to the graph " + "if your graph has not been restored." + ) + + # For this snapshot restoration function, we want the DataPipe to be at its initial state prior to + # simple fast-forwarding. Therefore, we need to call `reset` twice, because if `SnapshotState` is `Restored`, + # the first reset will not actually reset. + datapipe.reset() # This ensures `SnapshotState` is `Iterating` by this point, even if it was `Restored`. + # pyrefly: ignore [bad-argument-type] + apply_random_seed(datapipe, rng) + + remainder = n_iterations + it = iter(datapipe) # This always reset the DataPipe if it hasn't already. + while remainder > 0: + try: + next(it) + remainder -= 1 + except StopIteration as e: + raise RuntimeError( + f"Fast-forward {datapipe} by {n_iterations} iterations " + "exceeds the number of samples available." + ) from e + datapipe._fast_forward_iterator = it + # While the DataPipe has `_fast_forward_iterator`, `next()` will get result from there instead of elsewhere. + + # This will prevent the DataPipe from resetting in the `iter()` call + # If another DataPipe is consuming it, it won't have to start over again + datapipe._snapshot_state = _SnapshotState.Restored diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/dataset.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/dataset.py new file mode 100644 index 0000000000000000000000000000000000000000..19ec449f040dd9ff87bbd85ca9ea4a003d6f17d1 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/dataset.py @@ -0,0 +1,481 @@ +# mypy: allow-untyped-defs +import bisect +import itertools +import math +import warnings +from collections.abc import Sequence + +# UP006 wants 'Iterable' to be imported from collections.abc but it needs to +# stay from typing for now due to BC concerns. In particular several internal +# targets fail to typecheck with: +# TypeError: Cannot create a consistent method resolution order (MRO) for +# bases Iterable, Generic +from typing import cast, Generic, Iterable, TypeVar # noqa: UP035 +from typing_extensions import deprecated + +# No 'default_generator' in torch/__init__.pyi +from torch import default_generator, Generator, randperm, Tensor + + +__all__ = [ + "Dataset", + "IterableDataset", + "TensorDataset", + "StackDataset", + "ConcatDataset", + "ChainDataset", + "Subset", + "random_split", +] + + +_T = TypeVar("_T") +_T_co = TypeVar("_T_co", covariant=True) +_T_dict = dict[str, _T_co] +_T_tuple = tuple[_T_co, ...] +_T_stack = TypeVar("_T_stack", _T_tuple, _T_dict) + + +class Dataset(Generic[_T_co]): + r"""An abstract class representing a :class:`Dataset`. + + All datasets that represent a map from keys to data samples should subclass + it. All subclasses should overwrite :meth:`__getitem__`, supporting fetching a + data sample for a given key. Subclasses could also optionally overwrite + :meth:`__len__`, which is expected to return the size of the dataset by many + :class:`~torch.utils.data.Sampler` implementations and the default options + of :class:`~torch.utils.data.DataLoader`. Subclasses could also + optionally implement :meth:`__getitems__`, for speedup batched samples + loading. This method accepts list of indices of samples of batch and returns + list of samples. + + .. note:: + :class:`~torch.utils.data.DataLoader` by default constructs an index + sampler that yields integral indices. To make it work with a map-style + dataset with non-integral indices/keys, a custom sampler must be provided. + """ + + def __getitem__(self, index) -> _T_co: + raise NotImplementedError("Subclasses of Dataset should implement __getitem__.") + + # def __getitems__(self, indices: List) -> List[_T_co]: + # Not implemented to prevent false-positives in fetcher check in + # torch.utils.data._utils.fetch._MapDatasetFetcher + + def __add__(self, other: "Dataset[_T_co]") -> "ConcatDataset[_T_co]": + return ConcatDataset([self, other]) + + # No `def __len__(self)` default? + # See NOTE [ Lack of Default `__len__` in Python Abstract Base Classes ] + # in pytorch/torch/utils/data/sampler.py + + +class IterableDataset(Dataset[_T_co], Iterable[_T_co]): + r"""An iterable Dataset. + + All datasets that represent an iterable of data samples should subclass it. + Such form of datasets is particularly useful when data come from a stream. + + All subclasses should overwrite :meth:`__iter__`, which would return an + iterator of samples in this dataset. + + When a subclass is used with :class:`~torch.utils.data.DataLoader`, each + item in the dataset will be yielded from the :class:`~torch.utils.data.DataLoader` + iterator. When :attr:`num_workers > 0`, each worker process will have a + different copy of the dataset object, so it is often desired to configure + each copy independently to avoid having duplicate data returned from the + workers. :func:`~torch.utils.data.get_worker_info`, when called in a worker + process, returns information about the worker. It can be used in either the + dataset's :meth:`__iter__` method or the :class:`~torch.utils.data.DataLoader` 's + :attr:`worker_init_fn` option to modify each copy's behavior. + + Example 1: splitting workload across all workers in :meth:`__iter__`:: + + >>> # xdoctest: +REQUIRES(env:TORCH_DOCTEST_DATALOADER) + >>> # xdoctest: +SKIP("Fails on MacOS12") + >>> class MyIterableDataset(torch.utils.data.IterableDataset): + ... def __init__(self, start, end): + ... super(MyIterableDataset).__init__() + ... assert end > start, "this example only works with end >= start" + ... self.start = start + ... self.end = end + ... + ... def __iter__(self): + ... worker_info = torch.utils.data.get_worker_info() + ... if worker_info is None: # single-process data loading, return the full iterator + ... iter_start = self.start + ... iter_end = self.end + ... else: # in a worker process + ... # split workload + ... per_worker = int(math.ceil((self.end - self.start) / float(worker_info.num_workers))) + ... worker_id = worker_info.id + ... iter_start = self.start + worker_id * per_worker + ... iter_end = min(iter_start + per_worker, self.end) + ... return iter(range(iter_start, iter_end)) + ... + >>> # should give same set of data as range(3, 7), i.e., [3, 4, 5, 6]. + >>> ds = MyIterableDataset(start=3, end=7) + + >>> # Single-process loading + >>> print(list(torch.utils.data.DataLoader(ds, num_workers=0))) + [tensor([3]), tensor([4]), tensor([5]), tensor([6])] + + >>> # xdoctest: +REQUIRES(POSIX) + >>> # Multi-process loading with two worker processes + >>> # Worker 0 fetched [3, 4]. Worker 1 fetched [5, 6]. + >>> # xdoctest: +IGNORE_WANT("non deterministic") + >>> print(list(torch.utils.data.DataLoader(ds, num_workers=2))) + [tensor([3]), tensor([5]), tensor([4]), tensor([6])] + + >>> # With even more workers + >>> # xdoctest: +IGNORE_WANT("non deterministic") + >>> print(list(torch.utils.data.DataLoader(ds, num_workers=12))) + [tensor([3]), tensor([5]), tensor([4]), tensor([6])] + + Example 2: splitting workload across all workers using :attr:`worker_init_fn`:: + + >>> # xdoctest: +REQUIRES(env:TORCH_DOCTEST_DATALOADER) + >>> class MyIterableDataset(torch.utils.data.IterableDataset): + ... def __init__(self, start, end): + ... super(MyIterableDataset).__init__() + ... assert end > start, "this example only works with end >= start" + ... self.start = start + ... self.end = end + ... + ... def __iter__(self): + ... return iter(range(self.start, self.end)) + ... + >>> # should give same set of data as range(3, 7), i.e., [3, 4, 5, 6]. + >>> ds = MyIterableDataset(start=3, end=7) + + >>> # Single-process loading + >>> print(list(torch.utils.data.DataLoader(ds, num_workers=0))) + [3, 4, 5, 6] + >>> + >>> # Directly doing multi-process loading yields duplicate data + >>> print(list(torch.utils.data.DataLoader(ds, num_workers=2))) + [3, 3, 4, 4, 5, 5, 6, 6] + + >>> # Define a `worker_init_fn` that configures each dataset copy differently + >>> def worker_init_fn(worker_id): + ... worker_info = torch.utils.data.get_worker_info() + ... dataset = worker_info.dataset # the dataset copy in this worker process + ... overall_start = dataset.start + ... overall_end = dataset.end + ... # configure the dataset to only process the split workload + ... per_worker = int(math.ceil((overall_end - overall_start) / float(worker_info.num_workers))) + ... worker_id = worker_info.id + ... dataset.start = overall_start + worker_id * per_worker + ... dataset.end = min(dataset.start + per_worker, overall_end) + ... + + >>> # Mult-process loading with the custom `worker_init_fn` + >>> # Worker 0 fetched [3, 4]. Worker 1 fetched [5, 6]. + >>> print(list(torch.utils.data.DataLoader(ds, num_workers=2, worker_init_fn=worker_init_fn))) + [3, 5, 4, 6] + + >>> # With even more workers + >>> print(list(torch.utils.data.DataLoader(ds, num_workers=12, worker_init_fn=worker_init_fn))) + [3, 4, 5, 6] + """ + + def __add__(self, other: Dataset[_T_co]): + return ChainDataset([self, other]) + + # No `def __len__(self)` default? Subclasses raise `TypeError` when needed. + # See NOTE [ Lack of Default `__len__` in Python Abstract Base Classes ] + + +class TensorDataset(Dataset[tuple[Tensor, ...]]): + r"""Dataset wrapping tensors. + + Each sample will be retrieved by indexing tensors along the first dimension. + + Args: + *tensors (Tensor): tensors that have the same size of the first dimension. + """ + + tensors: tuple[Tensor, ...] + + def __init__(self, *tensors: Tensor) -> None: + if all(tensors[0].size(0) != tensor.size(0) for tensor in tensors): + raise AssertionError("Size mismatch between tensors") + self.tensors = tensors + + def __getitem__(self, index): + return tuple(tensor[index] for tensor in self.tensors) + + def __len__(self) -> int: + return self.tensors[0].size(0) + + +class StackDataset(Dataset[_T_stack]): + r"""Dataset as a stacking of multiple datasets. + + This class is useful to assemble different parts of complex input data, given as datasets. + + Example: + >>> # xdoctest: +SKIP + >>> images = ImageDataset() + >>> texts = TextDataset() + >>> tuple_stack = StackDataset(images, texts) + >>> tuple_stack[0] == (images[0], texts[0]) + >>> dict_stack = StackDataset(image=images, text=texts) + >>> dict_stack[0] == {"image": images[0], "text": texts[0]} + + Args: + *args (Dataset): Datasets for stacking returned as tuple. + **kwargs (Dataset): Datasets for stacking returned as dict. + """ + + datasets: tuple | dict + + def __init__(self, *args: Dataset[_T_co], **kwargs: Dataset[_T_co]) -> None: + if args: + if kwargs: + raise ValueError( + "Supported either ``tuple``- (via ``args``) or" + "``dict``- (via ``kwargs``) like input/output, but both types are given." + ) + self._length = len(args[0]) # type: ignore[arg-type] + if any(self._length != len(dataset) for dataset in args): # type: ignore[arg-type] + raise ValueError("Size mismatch between datasets") + self.datasets = args + elif kwargs: + tmp = list(kwargs.values()) + self._length = len(tmp[0]) # type: ignore[arg-type] + if any(self._length != len(dataset) for dataset in tmp): # type: ignore[arg-type] + raise ValueError("Size mismatch between datasets") + self.datasets = kwargs + else: + raise ValueError("At least one dataset should be passed") + + def __getitem__(self, index): + if isinstance(self.datasets, dict): + return {k: dataset[index] for k, dataset in self.datasets.items()} + return tuple(dataset[index] for dataset in self.datasets) + + def __getitems__(self, indices: list): + # add batched sampling support when parent datasets supports it. + if isinstance(self.datasets, dict): + dict_batch: list[_T_dict] = [{} for _ in indices] + for k, dataset in self.datasets.items(): + if callable(getattr(dataset, "__getitems__", None)): + items = dataset.__getitems__(indices) # type: ignore[attr-defined] + if len(items) != len(indices): + raise ValueError( + "Nested dataset's output size mismatch." + f" Expected {len(indices)}, got {len(items)}" + ) + for data, d_sample in zip(items, dict_batch, strict=True): + d_sample[k] = data + else: + for idx, d_sample in zip(indices, dict_batch, strict=True): + d_sample[k] = dataset[idx] + return dict_batch + + # tuple data + list_batch: list[list] = [[] for _ in indices] + for dataset in self.datasets: + if callable(getattr(dataset, "__getitems__", None)): + items = dataset.__getitems__(indices) # type: ignore[attr-defined] + if len(items) != len(indices): + raise ValueError( + "Nested dataset's output size mismatch." + f" Expected {len(indices)}, got {len(items)}" + ) + for data, t_sample in zip(items, list_batch, strict=True): + t_sample.append(data) + else: + for idx, t_sample in zip(indices, list_batch, strict=True): + t_sample.append(dataset[idx]) + tuple_batch: list[_T_tuple] = [tuple(sample) for sample in list_batch] + return tuple_batch + + def __len__(self) -> int: + return self._length + + +class ConcatDataset(Dataset[_T_co]): + r"""Dataset as a concatenation of multiple datasets. + + This class is useful to assemble different existing datasets. + + Args: + datasets (sequence): List of datasets to be concatenated + """ + + datasets: list[Dataset[_T_co]] + cumulative_sizes: list[int] + + @staticmethod + def cumsum(sequence): + r, s = [], 0 + for e in sequence: + l = len(e) + r.append(l + s) + s += l + return r + + def __init__(self, datasets: Iterable[Dataset]) -> None: + super().__init__() + self.datasets = list(datasets) + if len(self.datasets) == 0: + raise AssertionError("datasets should not be an empty iterable") + for d in self.datasets: + if isinstance(d, IterableDataset): + raise AssertionError("ConcatDataset does not support IterableDataset") + self.cumulative_sizes = self.cumsum(self.datasets) + + def __len__(self) -> int: + return self.cumulative_sizes[-1] + + def __getitem__(self, idx): + if idx < 0: + if -idx > len(self): + raise ValueError( + "absolute value of index should not exceed dataset length" + ) + idx = len(self) + idx + dataset_idx = bisect.bisect_right(self.cumulative_sizes, idx) + if dataset_idx == 0: + sample_idx = idx + else: + sample_idx = idx - self.cumulative_sizes[dataset_idx - 1] + return self.datasets[dataset_idx][sample_idx] + + @property + @deprecated( + "`cummulative_sizes` attribute is renamed to `cumulative_sizes`", + category=FutureWarning, + ) + def cummulative_sizes(self): + return self.cumulative_sizes + + +class ChainDataset(IterableDataset): + r"""Dataset for chaining multiple :class:`IterableDataset` s. + + This class is useful to assemble different existing dataset streams. The + chaining operation is done on-the-fly, so concatenating large-scale + datasets with this class will be efficient. + + Args: + datasets (iterable of IterableDataset): datasets to be chained together + """ + + def __init__(self, datasets: Iterable[Dataset]) -> None: + super().__init__() + self.datasets = datasets + + def __iter__(self): + for d in self.datasets: + if not isinstance(d, IterableDataset): + raise AssertionError("ChainDataset only supports IterableDataset") + yield from d + + def __len__(self) -> int: + total = 0 + for d in self.datasets: + if not isinstance(d, IterableDataset): + raise AssertionError("ChainDataset only supports IterableDataset") + total += len(d) # type: ignore[arg-type] + return total + + +class Subset(Dataset[_T_co]): + r""" + Subset of a dataset at specified indices. + + Args: + dataset (Dataset): The whole Dataset + indices (sequence): Indices in the whole set selected for subset + """ + + dataset: Dataset[_T_co] + indices: Sequence[int] + + def __init__(self, dataset: Dataset[_T_co], indices: Sequence[int]) -> None: + self.dataset = dataset + self.indices = indices + + def __getitem__(self, idx): + if isinstance(idx, list): + return self.dataset[[self.indices[i] for i in idx]] + return self.dataset[self.indices[idx]] + + def __getitems__(self, indices: list[int]) -> list[_T_co]: + # add batched sampling support when parent dataset supports it. + # see torch.utils.data._utils.fetch._MapDatasetFetcher + if callable(getattr(self.dataset, "__getitems__", None)): + return self.dataset.__getitems__([self.indices[idx] for idx in indices]) # type: ignore[attr-defined] + else: + return [self.dataset[self.indices[idx]] for idx in indices] + + def __len__(self) -> int: + return len(self.indices) + + +def random_split( + dataset: Dataset[_T], + lengths: Sequence[int | float], + generator: Generator | None = default_generator, +) -> list[Subset[_T]]: + r""" + Randomly split a dataset into non-overlapping new datasets of given lengths. + + If a list of fractions that sum up to 1 is given, + the lengths will be computed automatically as + floor(frac * len(dataset)) for each fraction provided. + + After computing the lengths, if there are any remainders, 1 count will be + distributed in round-robin fashion to the lengths + until there are no remainders left. + + Optionally fix the generator for reproducible results, e.g.: + + Example: + >>> # xdoctest: +SKIP + >>> generator1 = torch.Generator().manual_seed(42) + >>> generator2 = torch.Generator().manual_seed(42) + >>> random_split(range(10), [3, 7], generator=generator1) + >>> random_split(range(30), [0.3, 0.3, 0.4], generator=generator2) + + Args: + dataset (Dataset): Dataset to be split + lengths (sequence): lengths or fractions of splits to be produced + generator (Generator): Generator used for the random permutation. + """ + if math.isclose(sum(lengths), 1) and sum(lengths) <= 1: + subset_lengths: list[int] = [] + for i, frac in enumerate(lengths): + if frac < 0 or frac > 1: + raise ValueError(f"Fraction at index {i} is not between 0 and 1") + n_items_in_split = math.floor(len(dataset) * frac) # type: ignore[arg-type] + subset_lengths.append(n_items_in_split) + remainder = len(dataset) - sum(subset_lengths) # type: ignore[arg-type] + # add 1 to all the lengths in round-robin fashion until the remainder is 0 + for i in range(remainder): + idx_to_add_at = i % len(subset_lengths) + subset_lengths[idx_to_add_at] += 1 + lengths = subset_lengths + for i, length in enumerate(lengths): + if length == 0: + warnings.warn( + f"Length of split at index {i} is 0. " + f"This might result in an empty dataset.", + stacklevel=2, + ) + + # Cannot verify that dataset is Sized + if sum(lengths) != len(dataset): # type: ignore[arg-type] + raise ValueError( + "Sum of input lengths does not equal the length of the input dataset!" + ) + + indices = randperm(sum(lengths), generator=generator).tolist() # type: ignore[arg-type, call-overload] + lengths = cast(Sequence[int], lengths) + return [ + Subset(dataset, indices[offset - length : offset]) + for offset, length in zip(itertools.accumulate(lengths), lengths, strict=True) + ] diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/distributed.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/distributed.py new file mode 100644 index 0000000000000000000000000000000000000000..5179d7698ffee0f2acda62a2b2073df176aae794 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/distributed.py @@ -0,0 +1,157 @@ +import math +from collections.abc import Iterator +from typing import TypeVar + +import torch +import torch.distributed as dist +from torch.utils.data.dataset import Dataset +from torch.utils.data.sampler import Sampler + + +__all__ = ["DistributedSampler"] + + +_T_co = TypeVar("_T_co", covariant=True) + + +class DistributedSampler(Sampler[_T_co]): + r"""Sampler that restricts data loading to a subset of the dataset. + + It is especially useful in conjunction with + :class:`torch.nn.parallel.DistributedDataParallel`. In such a case, each + process can pass a :class:`~torch.utils.data.DistributedSampler` instance as a + :class:`~torch.utils.data.DataLoader` sampler, and load a subset of the + original dataset that is exclusive to it. + + .. note:: + Dataset is assumed to be of constant size and that any instance of it always + returns the same elements in the same order. + + Args: + dataset: Dataset used for sampling. + num_replicas (int, optional): Number of processes participating in + distributed training. By default, :attr:`world_size` is retrieved from the + current distributed group. + rank (int, optional): Rank of the current process within :attr:`num_replicas`. + By default, :attr:`rank` is retrieved from the current distributed + group. + shuffle (bool, optional): If ``True`` (default), sampler will shuffle the + indices. + seed (int, optional): random seed used to shuffle the sampler if + :attr:`shuffle=True`. This number should be identical across all + processes in the distributed group. Default: ``0``. + drop_last (bool, optional): if ``True``, then the sampler will drop the + tail of the data to make it evenly divisible across the number of + replicas. If ``False``, the sampler will add extra indices to make + the data evenly divisible across the replicas. Default: ``False``. + + .. warning:: + In distributed mode, calling the :meth:`set_epoch` method at + the beginning of each epoch **before** creating the :class:`DataLoader` iterator + is necessary to make shuffling work properly across multiple epochs. Otherwise, + the same ordering will be always used. + + Example:: + + >>> # xdoctest: +SKIP + >>> sampler = DistributedSampler(dataset) if is_distributed else None + >>> loader = DataLoader(dataset, shuffle=(sampler is None), + ... sampler=sampler) + >>> for epoch in range(start_epoch, n_epochs): + ... if is_distributed: + ... sampler.set_epoch(epoch) + ... train(loader) + """ + + def __init__( + self, + dataset: Dataset, + num_replicas: int | None = None, + rank: int | None = None, + shuffle: bool = True, + seed: int = 0, + drop_last: bool = False, + ) -> None: + if num_replicas is None: + if not dist.is_available(): + raise RuntimeError("Requires distributed package to be available") + num_replicas = dist.get_world_size() + if rank is None: + if not dist.is_available(): + raise RuntimeError("Requires distributed package to be available") + rank = dist.get_rank() + if rank >= num_replicas or rank < 0: + raise ValueError( + f"Invalid rank {rank}, rank should be in the interval [0, {num_replicas - 1}]" + ) + self.dataset = dataset + self.num_replicas = num_replicas + self.rank = rank + self.epoch = 0 + self.drop_last = drop_last + # If the dataset length is evenly divisible by # of replicas, then there + # is no need to drop any data, since the dataset will be split equally. + if self.drop_last and len(self.dataset) % self.num_replicas != 0: # type: ignore[arg-type] + # Split to nearest available length that is evenly divisible. + # This is to ensure each rank receives the same amount of data when + # using this Sampler. + self.num_samples = math.ceil( + (len(self.dataset) - self.num_replicas) / self.num_replicas # type: ignore[arg-type] + ) + else: + self.num_samples = math.ceil(len(self.dataset) / self.num_replicas) # type: ignore[arg-type] + self.total_size = self.num_samples * self.num_replicas + self.shuffle = shuffle + self.seed = seed + + def __iter__(self) -> Iterator[_T_co]: + if self.shuffle: + # deterministically shuffle based on epoch and seed + g = torch.Generator() + g.manual_seed(self.seed + self.epoch) + indices = torch.randperm(len(self.dataset), generator=g).tolist() # type: ignore[arg-type] + else: + indices = list(range(len(self.dataset))) # type: ignore[arg-type] + + if not self.drop_last: + # add extra samples to make it evenly divisible + padding_size = self.total_size - len(indices) + if padding_size <= len(indices): + indices += indices[:padding_size] + else: + indices += (indices * math.ceil(padding_size / len(indices)))[ + :padding_size + ] + else: + # remove tail of data to make it evenly divisible. + indices = indices[: self.total_size] + if len(indices) != self.total_size: + raise AssertionError( + f"Number of indices ({len(indices)}) does not match total_size ({self.total_size})" + ) + + # subsample + indices = indices[self.rank : self.total_size : self.num_replicas] + if len(indices) != self.num_samples: + raise AssertionError( + f"Number of subsampled indices ({len(indices)}) does not match num_samples ({self.num_samples})" + ) + + # pyrefly: ignore [bad-return] + return iter(indices) + + def __len__(self) -> int: + return self.num_samples + + def set_epoch(self, epoch: int) -> None: + r""" + Set the epoch for this sampler. + + When :attr:`shuffle=True`, this ensures all replicas + use a different random ordering for each epoch. Otherwise, the next iteration of this + sampler will yield the same ordering. + + Args: + epoch (int): Epoch number. + """ + self.epoch = epoch diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/graph.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/graph.py new file mode 100644 index 0000000000000000000000000000000000000000..f735aa35fec110ccf5d36febf6519227ec166b28 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/graph.py @@ -0,0 +1,161 @@ +# mypy: allow-untyped-defs +import io +import pickle +import warnings +from collections.abc import Collection + +from torch.utils._import_utils import dill_available +from torch.utils.data.datapipes.datapipe import IterDataPipe, MapDataPipe + + +__all__ = ["traverse", "traverse_dps"] + +DataPipe = IterDataPipe | MapDataPipe +DataPipeGraph = dict[int, tuple[DataPipe, "DataPipeGraph"]] + + +def _stub_unpickler() -> str: + return "STUB" + + +# TODO(VitalyFedyunin): Make sure it works without dill module installed +def _list_connected_datapipes( + scan_obj: DataPipe, only_datapipe: bool, cache: set[int] +) -> list[DataPipe]: + f = io.BytesIO() + p = pickle.Pickler( + f + ) # Not going to work for lambdas, but dill infinite loops on typing and can't be used as is + if dill_available(): + from dill import Pickler as dill_Pickler + + d = dill_Pickler(f) + else: + d = None + + captured_connections = [] + + def getstate_hook(ori_state): + state = None + if isinstance(ori_state, dict): + state = {} + for k, v in ori_state.items(): + if isinstance(v, (IterDataPipe, MapDataPipe, Collection)): + state[k] = v + elif isinstance(ori_state, (tuple, list)): + state = [] # type: ignore[assignment] + for v in ori_state: + if isinstance(v, (IterDataPipe, MapDataPipe, Collection)): + state.append(v) # type: ignore[attr-defined] + elif isinstance(ori_state, (IterDataPipe, MapDataPipe, Collection)): + state = ori_state # type: ignore[assignment] + return state + + def reduce_hook(obj): + if obj == scan_obj or id(obj) in cache: + raise NotImplementedError + else: + captured_connections.append(obj) + # Adding id to remove duplicate DataPipe serialized at the same level + cache.add(id(obj)) + return _stub_unpickler, () + + datapipe_classes: tuple[type[DataPipe]] = (IterDataPipe, MapDataPipe) # type: ignore[assignment] + + try: + for cls in datapipe_classes: + cls.set_reduce_ex_hook(reduce_hook) + if only_datapipe: + cls.set_getstate_hook(getstate_hook) + try: + p.dump(scan_obj) + except (pickle.PickleError, AttributeError, TypeError): + if dill_available(): + # pyrefly: ignore [missing-attribute] + d.dump(scan_obj) + else: + raise + finally: + for cls in datapipe_classes: + cls.set_reduce_ex_hook(None) + if only_datapipe: + cls.set_getstate_hook(None) + if dill_available(): + from dill import extend as dill_extend + + dill_extend(False) # Undo change to dispatch table + return captured_connections + + +def traverse_dps(datapipe: DataPipe) -> DataPipeGraph: + r""" + Traverse the DataPipes and their attributes to extract the DataPipe graph. + + This only looks into the attribute from each DataPipe that is either a + DataPipe and a Python collection object such as ``list``, ``tuple``, + ``set`` and ``dict``. + + Args: + datapipe: the end DataPipe of the graph + Returns: + A graph represented as a nested dictionary, where keys are ids of DataPipe instances + and values are tuples of DataPipe instance and the sub-graph + """ + cache: set[int] = set() + return _traverse_helper(datapipe, only_datapipe=True, cache=cache) + + +def traverse(datapipe: DataPipe, only_datapipe: bool | None = None) -> DataPipeGraph: + r""" + Traverse the DataPipes and their attributes to extract the DataPipe graph. + + [Deprecated] + When ``only_dataPipe`` is specified as ``True``, it would only look into the + attribute from each DataPipe that is either a DataPipe and a Python collection object + such as ``list``, ``tuple``, ``set`` and ``dict``. + + Note: + This function is deprecated. Please use `traverse_dps` instead. + + Args: + datapipe: the end DataPipe of the graph + only_datapipe: If ``False`` (default), all attributes of each DataPipe are traversed. + This argument is deprecating and will be removed after the next release. + Returns: + A graph represented as a nested dictionary, where keys are ids of DataPipe instances + and values are tuples of DataPipe instance and the sub-graph + """ + msg = ( + "`traverse` function and will be removed after 1.13. " + "Please use `traverse_dps` instead." + ) + if not only_datapipe: + msg += " And, the behavior will be changed to the equivalent of `only_datapipe=True`." + warnings.warn(msg, FutureWarning, stacklevel=2) + if only_datapipe is None: + only_datapipe = False + cache: set[int] = set() + return _traverse_helper(datapipe, only_datapipe, cache) + + +# Add cache here to prevent infinite recursion on DataPipe +def _traverse_helper( + datapipe: DataPipe, only_datapipe: bool, cache: set[int] +) -> DataPipeGraph: + if not isinstance(datapipe, (IterDataPipe, MapDataPipe)): + raise RuntimeError( + f"Expected `IterDataPipe` or `MapDataPipe`, but {type(datapipe)} is found" + ) + + dp_id = id(datapipe) + if dp_id in cache: + return {} + cache.add(dp_id) + # Using cache.copy() here is to prevent the same DataPipe pollutes the cache on different paths + items = _list_connected_datapipes(datapipe, only_datapipe, cache.copy()) + d: DataPipeGraph = {dp_id: (datapipe, {})} + for item in items: + # Using cache.copy() here is to prevent recursion on a single path rather than global graph + # Single DataPipe can present multiple times in different paths in graph + d[dp_id][1].update(_traverse_helper(item, only_datapipe, cache.copy())) + return d diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/graph_settings.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/graph_settings.py new file mode 100644 index 0000000000000000000000000000000000000000..03096398a6738b29c22aad044caaf16e4c45a7d0 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/graph_settings.py @@ -0,0 +1,173 @@ +# mypy: allow-untyped-defs +import inspect +import warnings +from typing import Any +from typing_extensions import deprecated + +import torch +from torch.utils.data.datapipes.iter.sharding import ( + _ShardingIterDataPipe, + SHARDING_PRIORITIES, +) +from torch.utils.data.graph import DataPipe, DataPipeGraph, traverse_dps + + +__all__ = [ + "apply_random_seed", + "apply_sharding", + "apply_shuffle_seed", + "apply_shuffle_settings", + "get_all_graph_pipes", +] + + +def get_all_graph_pipes(graph: DataPipeGraph) -> list[DataPipe]: + return _get_all_graph_pipes_helper(graph, set()) + + +def _get_all_graph_pipes_helper( + graph: DataPipeGraph, id_cache: set[int] +) -> list[DataPipe]: + results: list[DataPipe] = [] + for dp_id, (datapipe, sub_graph) in graph.items(): + if dp_id in id_cache: + continue + id_cache.add(dp_id) + results.append(datapipe) + results.extend(_get_all_graph_pipes_helper(sub_graph, id_cache)) + return results + + +def _is_sharding_datapipe(datapipe: DataPipe) -> bool: + return isinstance(datapipe, _ShardingIterDataPipe) or ( + hasattr(datapipe, "apply_sharding") + and inspect.ismethod(datapipe.apply_sharding) + ) + + +def apply_sharding( + datapipe: DataPipe, + num_of_instances: int, + instance_id: int, + sharding_group=SHARDING_PRIORITIES.DEFAULT, +) -> DataPipe: + r""" + Apply dynamic sharding over the ``sharding_filter`` DataPipe that has a method ``apply_sharding``. + + RuntimeError will be raised when multiple ``sharding_filter`` are presented in the same branch. + """ + graph = traverse_dps(datapipe) + + def _helper(graph, prev_applied=None) -> None: + for dp, sub_graph in graph.values(): + applied = None + if _is_sharding_datapipe(dp): + if prev_applied is not None: + raise RuntimeError( + "Sharding twice on a single pipeline is likely unintended and will cause data loss. " + f"Sharding already applied to {prev_applied} while trying to apply to {dp}" + ) + # For BC, only provide sharding_group if accepted + sig = inspect.signature(dp.apply_sharding) + if len(sig.parameters) < 3: + dp.apply_sharding(num_of_instances, instance_id) + else: + dp.apply_sharding( + num_of_instances, instance_id, sharding_group=sharding_group + ) + applied = dp + if applied is None: + applied = prev_applied + _helper(sub_graph, applied) + + _helper(graph) + + return datapipe + + +def _is_shuffle_datapipe(datapipe: DataPipe) -> bool: + return ( + hasattr(datapipe, "set_shuffle") + and hasattr(datapipe, "set_seed") + and inspect.ismethod(datapipe.set_shuffle) + and inspect.ismethod(datapipe.set_seed) + ) + + +def apply_shuffle_settings(datapipe: DataPipe, shuffle: bool | None = None) -> DataPipe: + r""" + Traverse the graph of ``DataPipes`` to find and set shuffle attribute. + + Apply the method to each `DataPipe` that has APIs of ``set_shuffle`` + and ``set_seed``. + + Args: + datapipe: DataPipe that needs to set shuffle attribute + shuffle: Shuffle option (default: ``None`` and no-op to the graph) + """ + if shuffle is None: + return datapipe + + graph = traverse_dps(datapipe) + all_pipes = get_all_graph_pipes(graph) + shufflers = [pipe for pipe in all_pipes if _is_shuffle_datapipe(pipe)] + if not shufflers and shuffle: + warnings.warn( + "`shuffle=True` was set, but the datapipe does not contain a `Shuffler`. Adding one at the end. " + "Be aware that the default buffer size might not be sufficient for your task.", + stacklevel=2, + ) + datapipe = datapipe.shuffle() + shufflers = [ + datapipe, + ] + + for shuffler in shufflers: + shuffler.set_shuffle(shuffle) + + return datapipe + + +@deprecated( + "`apply_shuffle_seed` is deprecated since 1.12 and will be removed in the future releases. " + "Please use `apply_random_seed` instead.", + category=FutureWarning, +) +def apply_shuffle_seed(datapipe: DataPipe, rng: Any) -> DataPipe: + return apply_random_seed(datapipe, rng) + + +def _is_random_datapipe(datapipe: DataPipe) -> bool: + return hasattr(datapipe, "set_seed") and inspect.ismethod(datapipe.set_seed) + + +def apply_random_seed(datapipe: DataPipe, rng: torch.Generator) -> DataPipe: + r""" + Traverse the graph of ``DataPipes`` to find random ``DataPipe`` with an API of ``set_seed``. + + Then set the random seed based on the provided RNG to those ``DataPipe``. + + Args: + datapipe: DataPipe that needs to set randomness + rng: Random number generator to generate random seeds + """ + graph = traverse_dps(datapipe) + all_pipes = get_all_graph_pipes(graph) + # Using a set to track id of DataPipe to prevent setting randomness per DataPipe more than once. + # And, `id` is used in case of unhashable DataPipe + cache = set() + random_datapipes = [] + for pipe in all_pipes: + if id(pipe) in cache: + continue + if _is_random_datapipe(pipe): + random_datapipes.append(pipe) + cache.add(id(pipe)) + + for pipe in random_datapipes: + random_seed = int( + torch.empty((), dtype=torch.int64).random_(generator=rng).item() + ) + pipe.set_seed(random_seed) + + return datapipe diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/sampler.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/sampler.py new file mode 100644 index 0000000000000000000000000000000000000000..aa13bb8e0a3e146bd7bfbc766fdfcb822efa9313 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/data/sampler.py @@ -0,0 +1,354 @@ +# mypy: allow-untyped-defs +import itertools +from collections.abc import Iterable, Iterator, Sequence, Sized +from typing import Generic, TypeVar + +import torch + + +# Note: For benchmarking changes to samplers, see: +# /benchmarks/data/samplers_bench.py +# This benchmark compares the performance of different sampler implementations +# and can be used to evaluate the impact of optimizations. + + +__all__ = [ + "BatchSampler", + "RandomSampler", + "Sampler", + "SequentialSampler", + "SubsetRandomSampler", + "WeightedRandomSampler", +] + + +_T_co = TypeVar("_T_co", covariant=True) + + +class Sampler(Generic[_T_co]): + r"""Base class for all Samplers. + + Every Sampler subclass has to provide an :meth:`__iter__` method, providing a + way to iterate over indices or lists of indices (batches) of dataset elements, + and may provide a :meth:`__len__` method that returns the length of the returned iterators. + + Example: + >>> # xdoctest: +SKIP + >>> class AccedingSequenceLengthSampler(Sampler[int]): + >>> def __init__(self, data: List[str]) -> None: + >>> self.data = data + >>> + >>> def __len__(self) -> int: + >>> return len(self.data) + >>> + >>> def __iter__(self) -> Iterator[int]: + >>> sizes = torch.tensor([len(x) for x in self.data]) + >>> yield from torch.argsort(sizes).tolist() + >>> + >>> class AccedingSequenceLengthBatchSampler(Sampler[List[int]]): + >>> def __init__(self, data: List[str], batch_size: int) -> None: + >>> self.data = data + >>> self.batch_size = batch_size + >>> + >>> def __len__(self) -> int: + >>> return (len(self.data) + self.batch_size - 1) // self.batch_size + >>> + >>> def __iter__(self) -> Iterator[List[int]]: + >>> sizes = torch.tensor([len(x) for x in self.data]) + >>> for batch in torch.chunk(torch.argsort(sizes), len(self)): + >>> yield batch.tolist() + + .. note:: The :meth:`__len__` method isn't strictly required by + :class:`~torch.utils.data.DataLoader`, but is expected in any + calculation involving the length of a :class:`~torch.utils.data.DataLoader`. + """ + + def __iter__(self) -> Iterator[_T_co]: + raise NotImplementedError + + # NOTE [ Lack of Default `__len__` in Python Abstract Base Classes ] + # + # Many times we have an abstract class representing a collection/iterable of + # data, e.g., `torch.utils.data.Sampler`, with its subclasses optionally + # implementing a `__len__` method. In such cases, we must make sure to not + # provide a default implementation, because both straightforward default + # implementations have their issues: + # + # + `return NotImplemented`: + # Calling `len(subclass_instance)` raises: + # TypeError: 'NotImplementedType' object cannot be interpreted as an integer + # + # + `raise NotImplementedError`: + # This prevents triggering some fallback behavior. E.g., the built-in + # `list(X)` tries to call `len(X)` first, and executes a different code + # path if the method is not found or `NotImplemented` is returned, while + # raising a `NotImplementedError` will propagate and make the call fail + # where it could have used `__iter__` to complete the call. + # + # Thus, the only two sensible things to do are + # + # + **not** provide a default `__len__`. + # + # + raise a `TypeError` instead, which is what Python uses when users call + # a method that is not defined on an object. + # (@ssnl verifies that this works on at least Python 3.7.) + + +class SequentialSampler(Sampler[int]): + r"""Samples elements sequentially, always in the same order. + + Args: + data_source (Sized): data source to sample from. Must implement __len__. + """ + + data_source: Sized + + def __init__(self, data_source: Sized) -> None: + self.data_source = data_source + + def __iter__(self) -> Iterator[int]: + return iter(range(len(self.data_source))) + + def __len__(self) -> int: + return len(self.data_source) + + +class RandomSampler(Sampler[int]): + r"""Samples elements randomly. If without replacement, then sample from a shuffled dataset. + + If with replacement, then user can specify :attr:`num_samples` to draw. + + Args: + data_source (Sized): data source to sample from. Must implement __len__. + replacement (bool): samples are drawn on-demand with replacement if ``True``, default=``False`` + num_samples (int): number of samples to draw, default=`len(dataset)`. + generator (Generator): Generator used in sampling. + """ + + data_source: Sized + replacement: bool + + def __init__( + self, + data_source: Sized, + replacement: bool = False, + num_samples: int | None = None, + generator=None, + ) -> None: + self.data_source = data_source + self.replacement = replacement + self._num_samples = num_samples + self.generator = generator + + if not isinstance(self.replacement, bool): + raise TypeError( + f"replacement should be a boolean value, but got replacement={self.replacement}" + ) + + if not isinstance(self.num_samples, int) or self.num_samples <= 0: + raise ValueError( + f"num_samples should be a positive integer value, but got num_samples={self.num_samples}" + ) + + @property + def num_samples(self) -> int: + # dataset size might change at runtime + if self._num_samples is None: + return len(self.data_source) + return self._num_samples + + def __iter__(self) -> Iterator[int]: + n = len(self.data_source) + if self.generator is None: + seed = int(torch.empty((), dtype=torch.int64).random_().item()) + generator = torch.Generator() + generator.manual_seed(seed) + else: + generator = self.generator + + if self.replacement: + for _ in range(self.num_samples // 32): + yield from torch.randint( + high=n, size=(32,), dtype=torch.int64, generator=generator + ).tolist() + yield from torch.randint( + high=n, + size=(self.num_samples % 32,), + dtype=torch.int64, + generator=generator, + ).tolist() + else: + for _ in range(self.num_samples // n): + yield from torch.randperm(n, generator=generator).tolist() + yield from torch.randperm(n, generator=generator).tolist()[ + : self.num_samples % n + ] + + def __len__(self) -> int: + return self.num_samples + + +class SubsetRandomSampler(Sampler[int]): + r"""Samples elements randomly from a given list of indices, without replacement. + + Args: + indices (sequence): a sequence of indices + generator (Generator): Generator used in sampling. + """ + + indices: Sequence[int] + + def __init__(self, indices: Sequence[int], generator=None) -> None: + self.indices = indices + self.generator = generator + + def __iter__(self) -> Iterator[int]: + for i in torch.randperm(len(self.indices), generator=self.generator).tolist(): + yield self.indices[i] + + def __len__(self) -> int: + return len(self.indices) + + +class WeightedRandomSampler(Sampler[int]): + r"""Samples elements from ``[0,..,len(weights)-1]`` with given probabilities (weights). + + Args: + weights (sequence) : a sequence of weights, not necessary summing up to one + num_samples (int): number of samples to draw + replacement (bool): if ``True``, samples are drawn with replacement. + If not, they are drawn without replacement, which means that when a + sample index is drawn for a row, it cannot be drawn again for that row. + generator (Generator): Generator used in sampling. + + Example: + >>> # xdoctest: +IGNORE_WANT("non-deterministic") + >>> list( + ... WeightedRandomSampler( + ... [0.1, 0.9, 0.4, 0.7, 3.0, 0.6], 5, replacement=True + ... ) + ... ) + [4, 4, 1, 4, 5] + >>> list( + ... WeightedRandomSampler( + ... [0.9, 0.4, 0.05, 0.2, 0.3, 0.1], 5, replacement=False + ... ) + ... ) + [0, 1, 4, 3, 2] + """ + + weights: torch.Tensor + num_samples: int + replacement: bool + + def __init__( + self, + weights: Sequence[float], + num_samples: int, + replacement: bool = True, + generator=None, + ) -> None: + if ( + not isinstance(num_samples, int) + or isinstance(num_samples, bool) + or num_samples <= 0 + ): + raise ValueError( + f"num_samples should be a positive integer value, but got num_samples={num_samples}" + ) + if not isinstance(replacement, bool): + raise ValueError( + f"replacement should be a boolean value, but got replacement={replacement}" + ) + + weights_tensor = torch.as_tensor(weights, dtype=torch.double) + if len(weights_tensor.shape) != 1: + raise ValueError( + "weights should be a 1d sequence but given " + f"weights have shape {tuple(weights_tensor.shape)}" + ) + + self.weights = weights_tensor + self.num_samples = num_samples + self.replacement = replacement + self.generator = generator + + def __iter__(self) -> Iterator[int]: + rand_tensor = torch.multinomial( + self.weights, self.num_samples, self.replacement, generator=self.generator + ) + yield from iter(rand_tensor.tolist()) + + def __len__(self) -> int: + return self.num_samples + + +class BatchSampler(Sampler[list[int]]): + r"""Wraps another sampler to yield a mini-batch of indices. + + Args: + sampler (Sampler or Iterable): Base sampler. Can be any iterable object + batch_size (int): Size of mini-batch. + drop_last (bool): If ``True``, the sampler will drop the last batch if + its size would be less than ``batch_size`` + + Example: + >>> list( + ... BatchSampler( + ... SequentialSampler(range(10)), batch_size=3, drop_last=False + ... ) + ... ) + [[0, 1, 2], [3, 4, 5], [6, 7, 8], [9]] + >>> list( + ... BatchSampler(SequentialSampler(range(10)), batch_size=3, drop_last=True) + ... ) + [[0, 1, 2], [3, 4, 5], [6, 7, 8]] + """ + + def __init__( + self, + sampler: Sampler[int] | Iterable[int], + batch_size: int, + drop_last: bool, + ) -> None: + # Since collections.abc.Iterable does not check for `__getitem__`, which + # is one way for an object to be an iterable, we don't do an `isinstance` + # check here. + if ( + not isinstance(batch_size, int) + or isinstance(batch_size, bool) + or batch_size <= 0 + ): + raise ValueError( + f"batch_size should be a positive integer value, but got batch_size={batch_size}" + ) + if not isinstance(drop_last, bool): + raise ValueError( + f"drop_last should be a boolean value, but got drop_last={drop_last}" + ) + self.sampler = sampler + self.batch_size = batch_size + self.drop_last = drop_last + + def __iter__(self) -> Iterator[list[int]]: + sampler_iter = iter(self.sampler) + if self.drop_last: + # Create multiple references to the same iterator + args = [sampler_iter] * self.batch_size + for batch_droplast in zip(*args, strict=False): + yield [*batch_droplast] + else: + batch = [*itertools.islice(sampler_iter, self.batch_size)] + while batch: + yield batch + batch = [*itertools.islice(sampler_iter, self.batch_size)] + + def __len__(self) -> int: + # Can only be called if self.sampler has __len__ implemented + # We cannot enforce this condition, so we turn off typechecking for the + # implementation below. + # Somewhat related: see NOTE [ Lack of Default `__len__` in Python Abstract Base Classes ] + if self.drop_last: + return len(self.sampler) // self.batch_size # type: ignore[arg-type] + else: + return (len(self.sampler) + self.batch_size - 1) // self.batch_size # type: ignore[arg-type] diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/deterministic.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/deterministic.py new file mode 100644 index 0000000000000000000000000000000000000000..a055c43be531a5c65c4f29f6c8165104e98e5ca0 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/deterministic.py @@ -0,0 +1,22 @@ +# mypy: allow-untyped-defs +import sys +import types + +import torch + + +class _Deterministic(types.ModuleType): + @property + def fill_uninitialized_memory(self): + """ + Whether to fill uninitialized memory with a known value when + :meth:`torch.use_deterministic_algorithms()` is set to ``True``. + """ + return torch._C._get_deterministic_fill_uninitialized_memory() + + @fill_uninitialized_memory.setter + def fill_uninitialized_memory(self, mode): + return torch._C._set_deterministic_fill_uninitialized_memory(mode) + + +sys.modules[__name__].__class__ = _Deterministic diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/dlpack.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/dlpack.py new file mode 100644 index 0000000000000000000000000000000000000000..aef32100ee7105d364f0e144dc1cf2e0368f7767 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/dlpack.py @@ -0,0 +1,231 @@ +from typing import Any + +import torch +import enum + +from torch._C import _to_dlpack as to_dlpack +from torch.types import Device as _Device + +__all__ = [ + "DLDeviceType", + "from_dlpack", +] + +class DLDeviceType(enum.IntEnum): + # Enums as in DLPack specification (aten/src/ATen/dlpack.h) + kDLCPU = 1, + kDLCUDA = 2, + kDLCUDAHost = 3, + kDLOpenCL = 4, + kDLVulkan = 7, + kDLMetal = 8, + kDLVPI = 9, + kDLROCM = 10, + kDLROCMHost = 11, + kDLExtDev = 12, + kDLCUDAManaged = 13, + kDLOneAPI = 14, + kDLWebGPU = 15, + kDLHexagon = 16, + kDLMAIA = 17, + + +torch._C._add_docstr(to_dlpack, r"""to_dlpack(tensor) -> PyCapsule + +Returns an opaque object (a "DLPack capsule") representing the tensor. + +.. note:: + ``to_dlpack`` is a legacy DLPack interface. The capsule it returns + cannot be used for anything in Python other than use it as input to + ``from_dlpack``. The more idiomatic use of DLPack is to call + ``from_dlpack`` directly on the tensor object - this works when that + object has a ``__dlpack__`` method, which PyTorch and most other + libraries indeed have now. + +.. warning:: + Only call ``from_dlpack`` once per capsule produced with ``to_dlpack``. + Behavior when a capsule is consumed multiple times is undefined. + +Args: + tensor: a tensor to be exported + +The DLPack capsule shares the tensor's memory. +""") + + +# TODO: add a typing.Protocol to be able to tell Mypy that only objects with +# __dlpack__ and __dlpack_device__ methods are accepted. +def from_dlpack( + ext_tensor: Any, + *, + device: _Device | None = None, + copy: bool | None = None +) -> 'torch.Tensor': + """from_dlpack(ext_tensor) -> Tensor + + Converts a tensor from an external library into a ``torch.Tensor``. + + The returned PyTorch tensor will share the memory with the input tensor + (which may have come from another library). Note that in-place operations + will therefore also affect the data of the input tensor. This may lead to + unexpected issues (e.g., other libraries may have read-only flags or + immutable data structures), so the user should only do this if they know + for sure that this is fine. + + Args: + ext_tensor (object with ``__dlpack__`` attribute, or a DLPack capsule): + The tensor or DLPack capsule to convert. + + If ``ext_tensor`` is a tensor (or ndarray) object, it must support + the ``__dlpack__`` protocol (i.e., have a ``ext_tensor.__dlpack__`` + method). Otherwise ``ext_tensor`` may be a DLPack capsule, which is + an opaque ``PyCapsule`` instance, typically produced by a + ``to_dlpack`` function or method. + + device (torch.device or str or None): An optional PyTorch device + specifying where to place the new tensor. If None (default), the + new tensor will be on the same device as ``ext_tensor``. + + copy (bool or None): An optional boolean indicating whether or not to copy + ``self``. If None, PyTorch will copy only if necessary. + + Examples:: + + >>> import torch.utils.dlpack + >>> t = torch.arange(4) + + # Convert a tensor directly (supported in PyTorch >= 1.10) + >>> t2 = torch.from_dlpack(t) + >>> t2[:2] = -1 # show that memory is shared + >>> t2 + tensor([-1, -1, 2, 3]) + >>> t + tensor([-1, -1, 2, 3]) + + # The old-style DLPack usage, with an intermediate capsule object + >>> capsule = torch.utils.dlpack.to_dlpack(t) + >>> capsule + + >>> t3 = torch.from_dlpack(capsule) + >>> t3 + tensor([-1, -1, 2, 3]) + >>> t3[0] = -9 # now we're sharing memory between 3 tensors + >>> t3 + tensor([-9, -1, 2, 3]) + >>> t2 + tensor([-9, -1, 2, 3]) + >>> t + tensor([-9, -1, 2, 3]) + + """ + + if hasattr(ext_tensor, '__dlpack__'): + # Only populate kwargs if any of the optional arguments are, in fact, not None. Otherwise, + # leave them out, since we might end up falling back to no-extra-kwargs __dlpack__ call. + kwargs: dict[str, Any] = {} + kwargs["max_version"] = (1, 0) + + # Track copy request for potential manual handling + requested_copy = copy + producer_handled_copy = True + cross_device_transfer = False # Will be set to True if device transfer is needed + + if copy is not None: + kwargs["copy"] = copy + + # Parse the device parameter. + # At this moment, it can either be a torch.device or a str representing + # a torch.device, e.g. "cpu", "cuda", etc. + # Get source device first (we need it to detect cross-device transfers) + ext_device = ext_tensor.__dlpack_device__() + + if device is not None: + if isinstance(device, str): + device = torch.device(device) + if not isinstance(device, torch.device): + raise AssertionError(f"from_dlpack: unsupported device type: {type(device)}") + + # Convert target device to DLPack format + target_dl_device = torch._C._torchDeviceToDLDevice(device) + + # Detect cross-device transfer by comparing source and target devices + # E.g. CPU->CUDA, cuda:0->cuda:1, etc. + cross_device_transfer = (ext_device != target_dl_device) + + # Only pass dl_device to producer if NOT cross-device transfer + if not cross_device_transfer: + kwargs["dl_device"] = target_dl_device + + # Cross-device transfer always requires a copy + if cross_device_transfer and copy is False: + raise ValueError( + f"cannot move DLPack tensor from device {ext_device} to {target_dl_device} " + "without copying. Set copy=None or copy=True." + ) + + # ext_device is either CUDA or ROCm, we need to pass the current + # stream + if ext_device[0] in (DLDeviceType.kDLCUDA, DLDeviceType.kDLROCM): + stream = torch.cuda.current_stream(f'cuda:{ext_device[1]}') + # cuda_stream is the pointer to the stream and it is a public + # attribute, but it is not documented + # The array API specify that the default legacy stream must be passed + # with a value of 1 for CUDA + # https://data-apis.org/array-api/latest/API_specification/array_object.html?dlpack-self-stream-none#dlpack-self-stream-none + is_cuda = ext_device[0] == DLDeviceType.kDLCUDA + # Since pytorch is not using PTDS by default, lets directly pass + # the legacy stream + stream_ptr = 1 if is_cuda and stream.cuda_stream == 0 else stream.cuda_stream + kwargs["stream"] = stream_ptr + + # Try different parameter combinations until one works + dlpack = None + + # Attempt 1: Try with all the parameters + try: + dlpack = ext_tensor.__dlpack__(**kwargs) + except TypeError: + pass + + # Attempt 2: Remove max_version + if dlpack is None: + kwargs.pop("max_version", None) + try: + dlpack = ext_tensor.__dlpack__(**kwargs) + except TypeError: + pass + + # Attempt 3: Remove copy + if dlpack is None: + kwargs.pop("copy", None) + producer_handled_copy = False + try: + dlpack = ext_tensor.__dlpack__(**kwargs) + except TypeError: + pass + + # Attempt 4: Remove dl_device + if dlpack is None: + kwargs.pop("dl_device", None) + dlpack = ext_tensor.__dlpack__(**kwargs) + + tensor = torch._C._from_dlpack(dlpack) + + # Manual copy if producer didn't handle it (cross-device already copies via .to()) + if requested_copy is True and not producer_handled_copy and not cross_device_transfer: + tensor = tensor.clone() + + # Handle cross-device transfer by moving tensor to target device + if cross_device_transfer: + tensor = tensor.to(device) + + return tensor + + else: + if device is not None or copy is not None: + raise AssertionError( + "device and copy kwargs not supported when ext_tensor is already a DLPack capsule." + ) + # Old versions just call the converter + dlpack = ext_tensor + return torch._C._from_dlpack(dlpack) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/file_baton.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/file_baton.py new file mode 100644 index 0000000000000000000000000000000000000000..5b4f55d8c88dd6ab20fc17000f9d4b2c2a42b88d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/file_baton.py @@ -0,0 +1,64 @@ +# mypy: allow-untyped-defs +import os +import time +import warnings + + +class FileBaton: + """A primitive, file-based synchronization utility.""" + + def __init__(self, lock_file_path, wait_seconds=0.1, warn_after_seconds=None) -> None: + """ + Create a new :class:`FileBaton`. + + Args: + lock_file_path: The path to the file used for locking. + wait_seconds: The seconds to periodically sleep (spin) when + calling ``wait()``. + warn_after_seconds: The seconds to wait before showing + lock file path to warn existing lock file. + """ + self.lock_file_path = lock_file_path + self.wait_seconds = wait_seconds + self.fd = None + self.warn_after_seconds = warn_after_seconds + + def try_acquire(self) -> bool | None: + """ + Try to atomically create a file under exclusive access. + + Returns: + True if the file could be created, else False. + """ + try: + # pyrefly: ignore [bad-assignment] + self.fd = os.open(self.lock_file_path, os.O_CREAT | os.O_EXCL) + return True + except FileExistsError: + return False + + def wait(self) -> None: + """ + Periodically sleeps for a certain amount until the baton is released. + + The amount of time slept depends on the ``wait_seconds`` parameter + passed to the constructor. + """ + has_warned = False + + start_time = time.time() + while os.path.exists(self.lock_file_path): + time.sleep(self.wait_seconds) + + if self.warn_after_seconds is not None: + if time.time() - start_time > self.warn_after_seconds and not has_warned: + warnings.warn(f'Waited on lock file "{self.lock_file_path}" for ' + f'{self.warn_after_seconds} seconds.', stacklevel=2) + has_warned = True + + def release(self) -> None: + """Release the baton and removes its file.""" + if self.fd is not None: + os.close(self.fd) + + os.remove(self.lock_file_path) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/flop_counter.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/flop_counter.py new file mode 100644 index 0000000000000000000000000000000000000000..7d08a14158300326931cb4026e5ef912dd8219c3 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/flop_counter.py @@ -0,0 +1,896 @@ +# mypy: allow-untyped-defs +import torch +from torch.utils._pytree import tree_map, tree_flatten, tree_unflatten +from .module_tracker import ModuleTracker +from typing import Any, TypeVar +from collections.abc import Callable +from collections.abc import Iterator +from typing_extensions import ParamSpec +from collections import defaultdict +from torch.utils._python_dispatch import TorchDispatchMode +from math import prod +from functools import wraps +import warnings + +__all__ = ["FlopCounterMode", "register_flop_formula"] + +_T = TypeVar("_T") +_P = ParamSpec("_P") + +aten = torch.ops.aten + +def get_shape(i): + if isinstance(i, torch.Tensor): + return i.shape + return i + +flop_registry: dict[Any, Any] = {} + +def shape_wrapper(f): + @wraps(f) + def nf(*args, out_val=None, **kwargs): + args, kwargs, out_shape = tree_map(get_shape, (args, kwargs, out_val)) + return f(*args, out_shape=out_shape, **kwargs) + return nf + +def register_flop_formula(targets, get_raw=False) -> Callable[[Callable[_P, _T]], Callable[_P, _T]]: + def register_fun(flop_formula: Callable[_P, _T]) -> Callable[_P, _T]: + if not get_raw: + flop_formula = shape_wrapper(flop_formula) + + def register(target) -> None: + if not isinstance(target, torch._ops.OpOverloadPacket): + raise ValueError( + f"register_flop_formula(targets): expected each target to be " + f"OpOverloadPacket (i.e. torch.ops.mylib.foo), got " + f"{target} which is of type {type(target)}") + if target in flop_registry: + raise RuntimeError(f"duplicate registrations for {target}") + flop_registry[target] = flop_formula + + # To handle allowing multiple aten_ops at once + torch.utils._pytree.tree_map_(register, targets) + + return flop_formula + + return register_fun + +@register_flop_formula(aten.mm) +def mm_flop(a_shape, b_shape, *args, out_shape=None, **kwargs) -> int: + """Count flops for matmul.""" + # Inputs should be a list of length 2. + # Inputs contains the shapes of two matrices. + m, k = a_shape + k2, n = b_shape + if k != k2: + raise AssertionError(f"matmul: inner dimensions must match (k == k2), got {k} and {k2}") + # NB(chilli): Should be 2 * k - 1 technically for FLOPs. + return m * n * 2 * k + +@register_flop_formula(aten.addmm) +def addmm_flop(self_shape, a_shape, b_shape, out_shape=None, **kwargs) -> int: + """Count flops for addmm.""" + return mm_flop(a_shape, b_shape) + +@register_flop_formula(aten.bmm) +def bmm_flop(a_shape, b_shape, out_shape=None, **kwargs) -> int: + """Count flops for the bmm operation.""" + # Inputs should be a list of length 2. + # Inputs contains the shapes of two tensor. + b, m, k = a_shape + b2, k2, n = b_shape + if b != b2: + raise AssertionError(f"bmm: batch dimensions must match (b == b2), got {b} and {b2}") + if k != k2: + raise AssertionError(f"bmm: inner dimensions must match (k == k2), got {k} and {k2}") + # NB(chilli): Should be 2 * k - 1 technically for FLOPs. + flop = b * m * n * 2 * k + return flop + +@register_flop_formula(aten.baddbmm) +def baddbmm_flop(self_shape, a_shape, b_shape, out_shape=None, **kwargs) -> int: + """Count flops for the baddbmm operation.""" + # Inputs should be a list of length 3. + # Inputs contains the shapes of three tensors. + return bmm_flop(a_shape, b_shape) + +@register_flop_formula(aten._scaled_mm) +def _scaled_mm_flop( + a_shape, + b_shape, + scale_a_shape, + scale_b_shape, + bias_shape=None, + scale_result_shape=None, + out_dtype=None, + use_fast_accum=False, + out_shape=None, + **kwargs, +) -> int: + """Count flops for _scaled_mm.""" + return mm_flop(a_shape, b_shape) + + +def conv_flop_count( + x_shape: list[int], + w_shape: list[int], + out_shape: list[int], + transposed: bool = False, +) -> int: + """Count flops for convolution. + + Note only multiplication is + counted. Computation for bias are ignored. + Flops for a transposed convolution are calculated as + flops = (x_shape[2:] * prod(w_shape) * batch_size). + Args: + x_shape (list(int)): The input shape before convolution. + w_shape (list(int)): The filter shape. + out_shape (list(int)): The output shape after convolution. + transposed (bool): is the convolution transposed + Returns: + int: the number of flops + """ + batch_size = x_shape[0] + conv_shape = (x_shape if transposed else out_shape)[2:] + c_out, c_in, *filter_size = w_shape + + """ + General idea here is that for a regular conv, for each point in the output + spatial dimension we convolve the filter with something (hence + `prod(conv_shape) * prod(filter_size)` ops). Then, this gets multiplied by + 1. batch_size, 2. the cross product of input and weight channels. + + For the transpose, it's not each point in the *output* spatial dimension but + each point in the *input* spatial dimension. + """ + # NB(chilli): I don't think this properly accounts for padding :think: + # NB(chilli): Should be 2 * c_in - 1 technically for FLOPs. + flop = prod(conv_shape) * prod(filter_size) * batch_size * c_out * c_in * 2 + return flop + +@register_flop_formula([aten.convolution, + aten._convolution, + aten.cudnn_convolution, + aten._slow_conv2d_forward, + aten.convolution_overrideable]) +def conv_flop(x_shape, w_shape, _bias, _stride, _padding, _dilation, transposed, *args, out_shape=None, **kwargs) -> int: + """Count flops for convolution.""" + # pyrefly: ignore [bad-argument-type] + return conv_flop_count(x_shape, w_shape, out_shape, transposed=transposed) + + +@register_flop_formula(aten.convolution_backward) +def conv_backward_flop( + grad_out_shape, + x_shape, + w_shape, + _bias, + _stride, + _padding, + _dilation, + transposed, + _output_padding, + _groups, + output_mask, + out_shape) -> int: + + def t(shape): + return [shape[1], shape[0]] + list(shape[2:]) + flop_count = 0 + + """ + Let's say we have a regular 1D conv + {A, B, C} [inp] + {i, j} [weight] + => (conv) + {Ai + Bj, Bi + Cj} [out] + + And as a reminder, the transposed conv of the above is + => {Ai, Aj + Bi, Bj + Ci, Cj} [transposed conv out] + + For the backwards of conv, we now have + {D, E} [grad_out] + {A, B, C} [inp] + {i, j} [weight] + + # grad_inp as conv_transpose(grad_out, weight) + Let's first compute grad_inp. To do so, we can simply look at all the + multiplications that each element of inp is involved in. For example, A is + only involved in the first element of the output (and thus only depends upon + D in grad_out), and C is only involved in the last element of the output + (and thus only depends upon E in grad_out) + + {Di, Dj + Ei, Ej} [grad_inp] + + Note that this corresponds to the below conv_transpose. This gives us the + output_mask[0] branch, which is grad_inp. + + {D, E} [inp (grad_out)] + {i, j} [weight] + => (conv_transpose) + {Di, Dj + Ei, Ej} [out (grad_inp)] + + I leave the fact that grad_inp for a transposed conv is just conv(grad_out, + weight) as an exercise for the reader. + + # grad_weight as conv(inp, grad_out) + To compute grad_weight, we again look at the terms in the output, which as + a reminder is: + => {Ai + Bj, Bi + Cj} [out] + => {D, E} [grad_out] + If we manually compute the gradient for the weights, we see it's + {AD + BE, BD + CE} [grad_weight] + + This corresponds to the below conv + {A, B, C} [inp] + {D, E} [weight (grad_out)] + => (conv) + {AD + BE, BD + CE} [out (grad_weight)] + + # grad_weight of transposed conv as conv(grad_out, inp) + As a reminder, the terms of the output of a transposed conv are: + => {Ai, Aj + Bi, Bj + Ci, Cj} [transposed conv out] + => {D, E, F, G} [grad_out] + + Manually computing the gradient for the weights, we see it's + {AD + BE + CF, AE + BF + CG} [grad_weight] + + This corresponds to the below conv + {D, E, F, G} [inp (grad_out)] + {A, B, C} [weight (inp)] + => (conv) + {AD + BE + CF, AE + BF + CG} [out (grad_weight)] + + For the full backwards formula, there are also some details involving + transpose of the batch/channel dimensions and groups, but I skip those for + the sake of brevity (and they're pretty similar to matmul backwards) + + Check [conv backwards decomposition as conv forwards] + """ + # grad_inp as conv_transpose(grad_out, weight) + if output_mask[0]: + grad_input_shape = get_shape(out_shape[0]) + flop_count += conv_flop_count(grad_out_shape, w_shape, grad_input_shape, not transposed) + + if output_mask[1]: + grad_weight_shape = get_shape(out_shape[1]) + if transposed: + # grad_weight of transposed conv as conv(grad_out, inp) + flop_count += conv_flop_count(t(grad_out_shape), t(x_shape), t(grad_weight_shape), transposed=False) + else: + # grad_weight as conv(inp, grad_out) + flop_count += conv_flop_count(t(x_shape), t(grad_out_shape), t(grad_weight_shape), transposed=False) + + return flop_count + +def sdpa_flop_count(query_shape, key_shape, value_shape): + """ + Count flops for self-attention. + + NB: We can assume that value_shape == key_shape + """ + b, h, s_q, d_q = query_shape + _b2, _h2, s_k, _d2 = key_shape + _b3, _h3, _s3, d_v = value_shape + if not b == _b2 == _b3 or not h == _h2 == _h3 or not d_q == _d2 or not s_k == _s3 or not d_q == _d2: + raise AssertionError("sdpa_flop_count: query/key/value shapes are incompatible") + total_flops = 0 + # q: [b, h, s_q, d_q] @ k: [b, h, d_q, s_k] -> scores: [b, h, s_q, s_k] + total_flops += bmm_flop((b * h, s_q, d_q), (b * h, d_q, s_k)) + # scores: [b, h, s_q, s_k] @ v: [b, h, s_k, d_v] -> out: [b, h, s_q, d_v] + total_flops += bmm_flop((b * h, s_q, s_k), (b * h, s_k, d_v)) + return total_flops + + +@register_flop_formula([aten._scaled_dot_product_efficient_attention, + aten._scaled_dot_product_flash_attention, + aten._scaled_dot_product_cudnn_attention]) +def sdpa_flop(query_shape, key_shape, value_shape, *args, out_shape=None, **kwargs) -> int: + """Count flops for self-attention.""" + # NB: We aren't accounting for causal attention here + return sdpa_flop_count(query_shape, key_shape, value_shape) + + +def _offsets_to_lengths(offsets, max_len): + """ + If the offsets tensor is fake, then we don't know the actual lengths. + In that case, we can just assume the worst case; each batch has max length. + """ + from torch._subclasses.fake_tensor import FakeTensor + from torch._subclasses.functional_tensor import FunctionalTensor + if not isinstance(offsets, (FakeTensor, FunctionalTensor)) and offsets.device.type != "meta": + return offsets.diff().tolist() + return [max_len] * (offsets.size(0) - 1) + + +def _unpack_flash_attention_nested_shapes( + *, + query, + key, + value, + grad_out=None, + cum_seq_q, + cum_seq_k, + max_q, + max_k, +) -> Iterator[tuple[tuple[int, ...], tuple[int, ...], tuple[int, ...], tuple[int, ...] | None]]: + """ + Given inputs to a flash_attention_(forward|backward) kernel, this will handle behavior for + NestedTensor inputs by effectively unbinding the NestedTensor and yielding the shapes for + each batch element. + + In the case that this isn't a NestedTensor kernel, then it just yields the original shapes. + """ + if cum_seq_q is not None: + # This means we should be dealing with a Nested Jagged Tensor query. + # The inputs will have shape (sum(sequence len), heads, dimension) + # In comparison, non-Nested inputs have shape (batch, heads, sequence len, dimension) + # To deal with this, we convert to a shape of (batch, heads, max_seq_len, dimension) + # So the flops calculation in this case is an overestimate of the actual flops. + if len(key.shape) != 3: + raise AssertionError("sdpa_flop_count: expected key.shape to be 3-dimensional") + if len(value.shape) != 3: + raise AssertionError("sdpa_flop_count: expected value.shape to be 3-dimensional") + if grad_out is not None and grad_out.shape != query.shape: + raise AssertionError("sdpa_flop_count: grad_out.shape must match query.shape when provided") + _, h_q, d_q = query.shape + _, h_k, d_k = key.shape + _, h_v, d_v = value.shape + if cum_seq_q is None: + raise AssertionError("sdpa_flop_count: cum_seq_q must not be None") + if cum_seq_k is None: + raise AssertionError("sdpa_flop_count: cum_seq_k must not be None") + if cum_seq_q.shape != cum_seq_k.shape: + raise AssertionError("sdpa_flop_count: cum_seq_q and cum_seq_k must have the same shape") + seq_q_lengths = _offsets_to_lengths(cum_seq_q, max_q) + seq_k_lengths = _offsets_to_lengths(cum_seq_k, max_k) + for (seq_q_len, seq_k_len) in zip(seq_q_lengths, seq_k_lengths, strict=True): + new_query_shape = (1, h_q, seq_q_len, d_q) + new_key_shape = (1, h_k, seq_k_len, d_k) + new_value_shape = (1, h_v, seq_k_len, d_v) + new_grad_out_shape = new_query_shape if grad_out is not None else None + yield new_query_shape, new_key_shape, new_value_shape, new_grad_out_shape + return + + yield query.shape, key.shape, value.shape, grad_out.shape if grad_out is not None else None + + +def _unpack_efficient_attention_nested_shapes( + *, + query, + key, + value, + grad_out=None, + cu_seqlens_q, + cu_seqlens_k, + max_seqlen_q, + max_seqlen_k, +) -> Iterator[tuple[tuple[int, ...], tuple[int, ...], tuple[int, ...], tuple[int, ...] | None]]: + """ + Given inputs to a efficient_attention_(forward|backward) kernel, this will handle behavior for + NestedTensor inputs by effectively unbinding the NestedTensor and yielding the shapes for + each batch element. + + In the case that this isn't a NestedTensor kernel, then it just yields the original shapes. + """ + if cu_seqlens_q is not None: + # Unlike flash_attention_forward, we get a 4D tensor instead of a 3D tensor for efficient attention. + # + # This means we should be dealing with a Nested Jagged Tensor query. + # The inputs will have shape (sum(sequence len), heads, dimension) + # In comparison, non-Nested inputs have shape (batch, heads, sequence len, dimension) + # To deal with this, we convert to a shape of (batch, heads, max_seq_len, dimension) + # So the flops calculation in this case is an overestimate of the actual flops. + if len(key.shape) != 4: + raise AssertionError("_unpack_efficient_attention_nested_shapes: expected key.shape to be 4-dimensional") + if len(value.shape) != 4: + raise AssertionError("_unpack_efficient_attention_nested_shapes: expected value.shape to be 4-dimensional") + if grad_out is not None and grad_out.shape != query.shape: + raise AssertionError("_unpack_efficient_attention_nested_shapes: grad_out.shape must match query.shape when provided") + _, _, h_q, d_q = query.shape + _, _, h_k, d_k = key.shape + _, _, h_v, d_v = value.shape + if cu_seqlens_q is None: + raise AssertionError("_unpack_efficient_attention_nested_shapes: cu_seqlens_q must not be None") + if cu_seqlens_k is None: + raise AssertionError("_unpack_efficient_attention_nested_shapes: cu_seqlens_k must not be None") + if cu_seqlens_q.shape != cu_seqlens_k.shape: + raise AssertionError("_unpack_efficient_attention_nested_shapes: " + "cu_seqlens_q and cu_seqlens_k must have the same shape") + seqlens_q = _offsets_to_lengths(cu_seqlens_q, max_seqlen_q) + seqlens_k = _offsets_to_lengths(cu_seqlens_k, max_seqlen_k) + for len_q, len_k in zip(seqlens_q, seqlens_k, strict=True): + new_query_shape = (1, h_q, len_q, d_q) + new_key_shape = (1, h_k, len_k, d_k) + new_value_shape = (1, h_v, len_k, d_v) + new_grad_out_shape = new_query_shape if grad_out is not None else None + yield new_query_shape, new_key_shape, new_value_shape, new_grad_out_shape + return + + yield query.shape, key.shape, value.shape, grad_out.shape if grad_out is not None else None + + +@register_flop_formula(aten._flash_attention_forward, get_raw=True) +def _flash_attention_forward_flop( + query, + key, + value, + cum_seq_q, + cum_seq_k, + max_q, + max_k, + *args, + out_shape=None, + **kwargs +) -> int: + """Count flops for self-attention.""" + # NB: We aren't accounting for causal attention here + # in case this is a nested tensor, we unpack the individual batch elements + # and then sum the flops per batch element + sizes = _unpack_flash_attention_nested_shapes( + query=query, + key=key, + value=value, + cum_seq_q=cum_seq_q, + cum_seq_k=cum_seq_k, + max_q=max_q, + max_k=max_k, + ) + return sum( + sdpa_flop_count(query_shape, key_shape, value_shape) + for query_shape, key_shape, value_shape, _ in sizes + ) + + +@register_flop_formula(aten._efficient_attention_forward, get_raw=True) +def _efficient_attention_forward_flop( + query, + key, + value, + bias, + cu_seqlens_q, + cu_seqlens_k, + max_seqlen_q, + max_seqlen_k, + *args, + **kwargs +) -> int: + """Count flops for self-attention.""" + # NB: We aren't accounting for causal attention here + # in case this is a nested tensor, we unpack the individual batch elements + # and then sum the flops per batch element + sizes = _unpack_efficient_attention_nested_shapes( + query=query, + key=key, + value=value, + cu_seqlens_q=cu_seqlens_q, + cu_seqlens_k=cu_seqlens_k, + max_seqlen_q=max_seqlen_q, + max_seqlen_k=max_seqlen_k, + ) + return sum( + sdpa_flop_count(query_shape, key_shape, value_shape) + for query_shape, key_shape, value_shape, _ in sizes + ) + + +def sdpa_backward_flop_count(grad_out_shape, query_shape, key_shape, value_shape): + total_flops = 0 + b, h, s_q, d_q = query_shape + _b2, _h2, s_k, _d2 = key_shape + _b3, _h3, _s3, d_v = value_shape + _b4, _h4, _s4, _d4 = grad_out_shape + if not b == _b2 == _b3 == _b4 or not h == _h2 == _h3 == _h4 or not d_q == _d2: + raise AssertionError("sdpa_backward_flop_count: batch/heads/dimension mismatch among tensors") + if not d_v == _d4 or not s_k == _s3 or not s_q == _s4: + raise AssertionError("sdpa_backward_flop_count: grad_out/value/key/query shapes are incompatible") + total_flops = 0 + # Step 1: We recompute the scores matrix. + # q: [b, h, s_q, d_q] @ k: [b, h, d_q, s_k] -> scores: [b, h, s_q, s_k] + total_flops += bmm_flop((b * h, s_q, d_q), (b * h, d_q, s_k)) + + # Step 2: We propagate the gradients through the score @ v operation. + # gradOut: [b, h, s_q, d_v] @ v: [b, h, d_v, s_k] -> gradScores: [b, h, s_q, s_k] + total_flops += bmm_flop((b * h, s_q, d_v), (b * h, d_v, s_k)) + # scores: [b, h, s_k, s_q] @ gradOut: [b, h, s_q, d_v] -> gradV: [b, h, s_k, d_v] + total_flops += bmm_flop((b * h, s_k, s_q), (b * h, s_q, d_v)) + + # Step 3: We propagate th gradients through the k @ v operation + # gradScores: [b, h, s_q, s_k] @ k: [b, h, s_k, d_q] -> gradQ: [b, h, s_q, d_q] + total_flops += bmm_flop((b * h, s_q, s_k), (b * h, s_k, d_q)) + # q: [b, h, d_q, s_q] @ gradScores: [b, h, s_q, s_k] -> gradK: [b, h, d_q, s_k] + total_flops += bmm_flop((b * h, d_q, s_q), (b * h, s_q, s_k)) + return total_flops + + +@register_flop_formula([aten._scaled_dot_product_efficient_attention_backward, + aten._scaled_dot_product_flash_attention_backward, + aten._scaled_dot_product_cudnn_attention_backward]) +def sdpa_backward_flop(grad_out_shape, query_shape, key_shape, value_shape, *args, out_shape=None, **kwargs) -> int: + """Count flops for self-attention backward.""" + return sdpa_backward_flop_count(grad_out_shape, query_shape, key_shape, value_shape) + +@register_flop_formula(aten._flash_attention_backward, get_raw=True) +def _flash_attention_backward_flop( + grad_out, + query, + key, + value, + out, # named _out_shape to avoid kwarg collision with out_shape created in wrapper + logsumexp, + cum_seq_q, + cum_seq_k, + max_q, + max_k, + *args, + **kwargs, +) -> int: + # in case this is a nested tensor, we unpack the individual batch elements + # and then sum the flops per batch element + shapes = _unpack_flash_attention_nested_shapes( + query=query, + key=key, + value=value, + grad_out=grad_out, + cum_seq_q=cum_seq_q, + cum_seq_k=cum_seq_k, + max_q=max_q, + max_k=max_k, + ) + return sum( + sdpa_backward_flop_count(grad_out_shape, query_shape, key_shape, value_shape) + for query_shape, key_shape, value_shape, grad_out_shape in shapes + ) + + +@register_flop_formula(aten._efficient_attention_backward, get_raw=True) +def _efficient_attention_backward_flop( + grad_out, + query, + key, + value, + bias, + out, # named _out to avoid kwarg collision with out created in wrapper + cu_seqlens_q, + cu_seqlens_k, + max_seqlen_q, + max_seqlen_k, + *args, + **kwargs, +) -> int: + # in case this is a nested tensor, we unpack the individual batch elements + # and then sum the flops per batch element + shapes = _unpack_efficient_attention_nested_shapes( + query=query, + key=key, + value=value, + grad_out=grad_out, + cu_seqlens_q=cu_seqlens_q, + cu_seqlens_k=cu_seqlens_k, + max_seqlen_q=max_seqlen_q, + max_seqlen_k=max_seqlen_k, + ) + return sum( + sdpa_backward_flop_count(grad_out_shape, query_shape, key_shape, value_shape) + for query_shape, key_shape, value_shape, grad_out_shape in shapes + ) + + +flop_registry = { + aten.mm: mm_flop, + aten.addmm: addmm_flop, + aten.bmm: bmm_flop, + aten.baddbmm: baddbmm_flop, + aten._scaled_mm: _scaled_mm_flop, + aten.convolution: conv_flop, + aten._convolution: conv_flop, + aten.cudnn_convolution: conv_flop, + aten.convolution_overrideable: conv_flop, + aten._slow_conv2d_forward: conv_flop, + aten.convolution_backward: conv_backward_flop, + aten._scaled_dot_product_efficient_attention: sdpa_flop, + aten._scaled_dot_product_flash_attention: sdpa_flop, + aten._scaled_dot_product_cudnn_attention: sdpa_flop, + aten._scaled_dot_product_efficient_attention_backward: sdpa_backward_flop, + aten._scaled_dot_product_flash_attention_backward: sdpa_backward_flop, + aten._scaled_dot_product_cudnn_attention_backward: sdpa_backward_flop, + aten._flash_attention_forward: _flash_attention_forward_flop, + aten._efficient_attention_forward: _efficient_attention_forward_flop, + aten._flash_attention_backward: _flash_attention_backward_flop, + aten._efficient_attention_backward: _efficient_attention_backward_flop, +} + +def normalize_tuple(x): + if not isinstance(x, tuple): + return (x,) + return x + + +# Define the suffixes for different orders of magnitude +suffixes = ["", "K", "M", "B", "T"] +# Thanks BingChat! +def get_suffix_str(number): + # Find the index of the appropriate suffix based on the number of digits + # with some additional overflow. + # i.e. 1.01B should be displayed as 1001M, not 1.001B + index = max(0, min(len(suffixes) - 1, (len(str(number)) - 2) // 3)) + return suffixes[index] + +def convert_num_with_suffix(number, suffix): + index = suffixes.index(suffix) + # Divide the number by 1000^index and format it to two decimal places + value = f"{number / 1000 ** index:.3f}" + # Return the value and the suffix as a string + return value + suffixes[index] + +def convert_to_percent_str(num, denom) -> str: + if denom == 0: + return "0%" + return f"{num / denom:.2%}" + +def _pytreeify_preserve_structure(f): + @wraps(f) + def nf(args): + flat_args, spec = tree_flatten(args) + out = f(*flat_args) + return tree_unflatten(out, spec) + + return nf + + +class FlopCounterMode: + """ + ``FlopCounterMode`` is a context manager that counts the number of flops within its context. + + It does this using a ``TorchDispatchMode``. + + It also supports hierarchical output by passing a module (or list of + modules) to FlopCounterMode on construction. If you do not need hierarchical + output, you do not need to use it with a module. + + Example usage + + .. code-block:: python + + mod = ... + with FlopCounterMode(mod) as flop_counter: + mod.sum().backward() + + """ + + def __init__( + self, + mods: torch.nn.Module | list[torch.nn.Module] | None = None, + depth: int = 2, + display: bool = True, + custom_mapping: dict[Any, Any] | None = None) -> None: + super().__init__() + self.flop_counts: dict[str, dict[Any, int]] = defaultdict(lambda: defaultdict(int)) + self.depth = depth + self.display = display + self.mode: _FlopCounterMode | None = None + if custom_mapping is None: + custom_mapping = {} + if mods is not None: + warnings.warn("mods argument is not needed anymore, you can stop passing it", stacklevel=2) + self.flop_registry = { + **flop_registry, + **{k: v if getattr(v, "_get_raw", False) else shape_wrapper(v) for k, v in custom_mapping.items()} + } + self.mod_tracker = ModuleTracker() + + def get_total_flops(self) -> int: + return sum(self.flop_counts['Global'].values()) + + def get_flop_counts(self) -> dict[str, dict[Any, int]]: + """Return the flop counts as a dictionary of dictionaries. + + The outer + dictionary is keyed by module name, and the inner dictionary is keyed by + operation name. + + Returns: + Dict[str, Dict[Any, int]]: The flop counts as a dictionary. + """ + return {k: dict(v) for k, v in self.flop_counts.items()} + + def get_table(self, depth=None): + if depth is None: + depth = self.depth + if depth is None: + depth = 999999 + + + import tabulate + + tabulate.PRESERVE_WHITESPACE = True + header = ["Module", "FLOP", "% Total"] + values = [] + global_flops = self.get_total_flops() + global_suffix = get_suffix_str(global_flops) + is_global_subsumed = False + + def process_mod(mod_name, depth): + nonlocal is_global_subsumed + + total_flops = sum(self.flop_counts[mod_name].values()) + + is_global_subsumed |= total_flops >= global_flops + + padding = " " * depth + values = [] + values.append([ + padding + mod_name, + convert_num_with_suffix(total_flops, global_suffix), + convert_to_percent_str(total_flops, global_flops) + ]) + for k, v in self.flop_counts[mod_name].items(): + values.append([ + padding + " - " + str(k), + convert_num_with_suffix(v, global_suffix), + convert_to_percent_str(v, global_flops) + ]) + return values + + for mod in sorted(self.flop_counts.keys()): + if mod == 'Global': + continue + mod_depth = mod.count(".") + 1 + if mod_depth > depth: + continue + + cur_values = process_mod(mod, mod_depth - 1) + values.extend(cur_values) + + # We do a bit of messing around here to only output the "Global" value + # if there are any FLOPs in there that aren't already fully contained by + # a module. + if 'Global' in self.flop_counts and not is_global_subsumed: + for value in values: + value[0] = " " + value[0] + + values = process_mod('Global', 0) + values + + if len(values) == 0: + values = [["Global", "0", "0%"]] + + return tabulate.tabulate(values, headers=header, colalign=("left", "right", "right")) + + # NB: This context manager is NOT reentrant + def __enter__(self): + self.flop_counts.clear() + self.mod_tracker.__enter__() + self.mode = _FlopCounterMode(self) + self.mode.__enter__() + return self + + def __exit__(self, *args): + if self.mode is None: + raise AssertionError("Internal error: FlopCounter.__exit__ called but mode is None") + b = self.mode.__exit__(*args) + self.mode = None # break cycles + self.mod_tracker.__exit__() + if self.display: + print(self.get_table(self.depth)) + return b + + def _count_flops(self, func_packet, out, args, kwargs): + if func_packet in self.flop_registry: + flop_count_func = self.flop_registry[func_packet] + flop_count = flop_count_func(*args, **kwargs, out_val=out) # type: ignore[operator] + for par in set(self.mod_tracker.parents): + self.flop_counts[par][func_packet] += flop_count + + return out + +class _FlopCounterMode(TorchDispatchMode): + supports_higher_order_operators = True + + def __init__(self, counter: FlopCounterMode) -> None: + self.counter = counter + + def _execute_with_isolated_flop_counting(self, branch_fn, operands): + """Execute a branch function and capture its FLOP counts without + affecting self.counter.flop_counts + + Args: + branch_fn: The branch function to execute + operands: Arguments to pass to the branch function + + Returns: + Tuple of (result, flop_counts) where result is the branch output + and flop_counts is a copy of the FLOP counts after execution + """ + import copy + checkpointed_flop_counts = copy.copy(self.counter.flop_counts) + with self: + result = branch_fn(*operands) + flop_counts = copy.copy(self.counter.flop_counts) + self.counter.flop_counts = checkpointed_flop_counts + return result, flop_counts + + def _handle_higher_order_ops(self, func, types, args, kwargs): + if func is not torch.ops.higher_order.cond: + return NotImplemented + + # The flop counter for cond counts the upper bound of flops. + # For example, if a matmul is executed 2 times in true branch + # but only 1 time in the false branch, the flop counter will + # record the larger number of flops, i.e. 2 times. + if func is torch.ops.higher_order.cond: + + pred, true_branch, false_branch, operands = args + # Step 1: Count flops for true branch and false branch separately + true_out, true_flop_counts = self._execute_with_isolated_flop_counting( + true_branch, operands + ) + if true_out is NotImplemented: + return NotImplemented + + false_out, false_flop_counts = self._execute_with_isolated_flop_counting( + false_branch, operands + ) + if false_out is NotImplemented: + return NotImplemented + + # Step 2: merge flop counts + all_mod_keys = set(true_flop_counts.keys()) | set(false_flop_counts.keys()) + merged_flop_counts = {} + for outer_key in all_mod_keys: + true_func_counts = true_flop_counts[outer_key] + false_func_counts = false_flop_counts[outer_key] + + merged_func_counts = {} + all_func_keys = set(true_func_counts.keys()) | set(false_func_counts.keys()) + + for func_key in all_func_keys: + true_val = true_func_counts.get(func_key, 0) + false_val = false_func_counts.get(func_key, 0) + merged_func_counts[func_key] = max(true_val, false_val) + + merged_flop_counts[outer_key] = merged_func_counts + + # Step 3: update the counter with merged counts + for outer_key, inner_dict in merged_flop_counts.items(): + self.counter.flop_counts[outer_key].update(inner_dict) + + # It doesn't matter which one we return since true_fn and false_fn return + # output with the same structure. + return true_out + + def __torch_dispatch__(self, func, types, args=(), kwargs=None): + kwargs = kwargs if kwargs else {} + + # Skip ops from non-standard dispatch_sizes_strides_policy such as NJT + if func in {torch.ops.aten.sym_is_contiguous.default, + torch.ops.aten.is_contiguous.default, + torch.ops.aten.is_contiguous.memory_format, + torch.ops.aten.is_strides_like_format.default, + torch.ops.aten.is_non_overlapping_and_dense.default, + torch.ops.aten.size.default, + torch.ops.aten.sym_size.default, + torch.ops.aten.stride.default, + torch.ops.aten.sym_stride.default, + torch.ops.aten.storage_offset.default, + torch.ops.aten.sym_storage_offset.default, + torch.ops.aten.numel.default, + torch.ops.aten.sym_numel.default, + torch.ops.aten.dim.default, + torch.ops.prim.layout.default}: + + return NotImplemented + + if isinstance(func, torch._ops.HigherOrderOperator): + return self._handle_higher_order_ops(func, types, args, kwargs) + + # If we don't have func in flop_registry, see if it can decompose + if func not in self.counter.flop_registry and func is not torch.ops.prim.device.default: + with self: + r = func.decompose(*args, **kwargs) + if r is not NotImplemented: + return r + + # no further decomposition; execute & count flops + out = func(*args, **kwargs) + return self.counter._count_flops(func._overloadpacket, out, args, kwargs) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/hipify/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/hipify/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..58f3ace6c03d093337c9fa417ccbe8bc267b6c69 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/hipify/__init__.py @@ -0,0 +1 @@ +from .version import __version__ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/hipify/constants.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/hipify/constants.py new file mode 100644 index 0000000000000000000000000000000000000000..a9053b261ad44d1ef8b8cbdf3a27da0306d92f36 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/hipify/constants.py @@ -0,0 +1,62 @@ +"""Constants for annotations in the mapping. + +The constants defined here are used to annotate the mapping tuples in cuda_to_hip_mappings.py. +They are based on +https://github.com/ROCm/HIPIFY/blob/master/src/Statistics.h +and fall in three categories: 1) type of mapping, 2) API of mapping, 3) unsupported +mapping. +""" + +CONV_VERSION = 0, +CONV_INIT = 1 +CONV_DEVICE = 2 +CONV_MEM = 3 +CONV_KERN = 4 +CONV_COORD_FUNC = 5 +CONV_MATH_FUNC = 6 +CONV_DEVICE_FUNC = 7 +CONV_SPECIAL_FUNC = 8 +CONV_STREAM = 9 +CONV_EVENT = 10 +CONV_OCCUPANCY = 11 +CONV_CONTEXT = 12 +CONV_PEER = 13 +CONV_MODULE = 14 +CONV_CACHE = 15 +CONV_EXEC = 16 +CONV_ERROR = 17 +CONV_DEF = 18 +CONV_TEX = 19 +CONV_GL = 20 +CONV_GRAPHICS = 21 +CONV_SURFACE = 22 +CONV_JIT = 23 +CONV_D3D9 = 24 +CONV_D3D10 = 25 +CONV_D3D11 = 26 +CONV_VDPAU = 27 +CONV_EGL = 28 +CONV_THREAD = 29 +CONV_OTHER = 30 +CONV_INCLUDE = 31 +CONV_INCLUDE_CUDA_MAIN_H = 32 +CONV_TYPE = 33 +CONV_LITERAL = 34 +CONV_NUMERIC_LITERAL = 35 +CONV_LAST = 36 + +API_DRIVER = 37 +API_RUNTIME = 38 +API_BLAS = 39 +API_SPECIAL = 40 +API_RAND = 41 +API_LAST = 42 +API_FFT = 43 +API_RTC = 44 +API_ROCTX = 45 + +HIP_UNSUPPORTED = 46 +API_PYTORCH = 1337 +API_CAFFE2 = 1338 +API_C10 = 1339 +API_ROCMSMI = 1340 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/hipify/cuda_to_hip_mappings.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/hipify/cuda_to_hip_mappings.py new file mode 100644 index 0000000000000000000000000000000000000000..8bf93cf5e6d61122eabd9dc7a4884fcab9c4dad6 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/hipify/cuda_to_hip_mappings.py @@ -0,0 +1,9492 @@ +import collections +import os + +from .constants import (API_BLAS, API_C10, API_CAFFE2, API_DRIVER, API_FFT, + API_PYTORCH, API_RAND, API_ROCTX, API_RTC, API_RUNTIME, + API_SPECIAL, API_ROCMSMI, CONV_CACHE, CONV_CONTEXT, CONV_D3D9, + CONV_D3D10, CONV_D3D11, CONV_DEF, CONV_DEVICE, + CONV_DEVICE_FUNC, CONV_EGL, CONV_ERROR, CONV_EVENT, + CONV_EXEC, CONV_GL, CONV_GRAPHICS, CONV_INCLUDE, + CONV_INCLUDE_CUDA_MAIN_H, CONV_INIT, CONV_JIT, + CONV_MATH_FUNC, CONV_MEM, CONV_MODULE, + CONV_NUMERIC_LITERAL, CONV_OCCUPANCY, CONV_OTHER, + CONV_PEER, CONV_SPECIAL_FUNC, CONV_STREAM, + CONV_SURFACE, CONV_TEX, CONV_THREAD, CONV_TYPE, + CONV_VDPAU, CONV_VERSION, HIP_UNSUPPORTED) + +""" Mapping of CUDA functions, include files, constants, and types to ROCm/HIP equivalents +This closely follows the implementation in hipify-clang +https://github.com/ROCm/hip/blob/59071b895ed1c86d9698b4c859cefcdd5acda06f/hipify-clang/src/CUDA2HipMap.cpp +and its structure. +There are different maps for fundamental names, include files, identifies, sparse, and +PyTorch specific translations. +Each of the entries in these maps translates a CUDA string to a tuple containing the +ROCm/HIP string, a type and API annotation and - optionally - an annotation if it is not +supported in ROCm/HIP yet. +""" + +_IS_FBCODE = os.environ.get("IS_FBCODE", "0") == "1" + +# FBCODE compiles against rccl sources instead of an installed rccl package. +# The header location is src/rccl.h versus rccl/rccl.h, respectively. +_RCCL_HEADER = "" if _IS_FBCODE else "" + +# List of math functions that should be replaced inside device code only. +MATH_TRANSPILATIONS = collections.OrderedDict( + [ + ("std::max", ("::max")), + ("std::min", ("::min")), + ("std::ceil", ("::ceil")), + ("std::floor", ("::floor")), + ("std::exp", ("::exp")), + ("std::log", ("::log")), + ("std::pow", ("::pow")), + ("std::fabs", ("::fabs")), + ("std::fmod", ("::fmod")), + ("std::remainder", ("::remainder")), + ("std::frexp", ("::frexp")), + ] +) + +# pyrefly: ignore [no-matching-overload] +CUDA_TYPE_NAME_MAP = collections.OrderedDict( + [ + ("CUresult", ("hipError_t", CONV_TYPE, API_DRIVER)), + ("cudaError_t", ("hipError_t", CONV_TYPE, API_RUNTIME)), + ("cudaError", ("hipError_t", CONV_TYPE, API_RUNTIME)), + ( + "CUDA_ARRAY3D_DESCRIPTOR", + ("HIP_ARRAY3D_DESCRIPTOR", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ("CUDA_ARRAY_DESCRIPTOR", ("HIP_ARRAY_DESCRIPTOR", CONV_TYPE, API_DRIVER)), + ("CUDA_MEMCPY2D", ("hip_Memcpy2D", CONV_TYPE, API_DRIVER)), + ("CUDA_MEMCPY3D", ("HIP_MEMCPY3D", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED)), + ( + "CUDA_MEMCPY3D_PEER", + ("HIP_MEMCPY3D_PEER", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CUDA_POINTER_ATTRIBUTE_P2P_TOKENS", + ( + "HIP_POINTER_ATTRIBUTE_P2P_TOKENS", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CUDA_RESOURCE_DESC", + ("HIP_RESOURCE_DESC", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CUDA_RESOURCE_VIEW_DESC", + ("HIP_RESOURCE_VIEW_DESC", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CUipcEventHandle", + ("hipIpcEventHandle", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ("CUipcMemHandle", ("hipIpcMemHandle", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED)), + ("CUaddress_mode", ("hipAddress_mode", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED)), + ( + "CUarray_cubemap_face", + ("hipArray_cubemap_face", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ("CUarray_format", ("hipArray_format", CONV_TYPE, API_DRIVER)), + ("CUcomputemode", ("hipComputemode", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED)), + ("CUmem_advise", ("hipMemAdvise", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED)), + ( + "CUmem_range_attribute", + ("hipMemRangeAttribute", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ("CUctx_flags", ("hipCctx_flags", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED)), + ("CUdevice", ("hipDevice_t", CONV_TYPE, API_DRIVER)), + ("CUdevice_attribute_enum", ("hipDeviceAttribute_t", CONV_TYPE, API_DRIVER)), + ("CUdevice_attribute", ("hipDeviceAttribute_t", CONV_TYPE, API_DRIVER)), + ("CUpointer_attribute", ("hipPointer_attribute", CONV_TYPE, API_DRIVER)), + ("CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL", ("HIP_POINTER_ATTRIBUTE_DEVICE_ORDINAL", CONV_TYPE, API_DRIVER)), + ("CU_POINTER_ATTRIBUTE_BUFFER_ID", ("HIP_POINTER_ATTRIBUTE_BUFFER_ID", CONV_TYPE, API_DRIVER)), + ("CUdeviceptr", ("hipDeviceptr_t", CONV_TYPE, API_DRIVER)), + ("CUarray_st", ("hipArray", CONV_TYPE, API_DRIVER)), + ("CUarray", ("hipArray *", CONV_TYPE, API_DRIVER)), + ("CUdevprop_st", ("hipDeviceProp_t", CONV_TYPE, API_DRIVER)), + ("CUdevprop", ("hipDeviceProp_t", CONV_TYPE, API_DRIVER)), + ("CUfunction", ("hipFunction_t", CONV_TYPE, API_DRIVER)), + ( + "CUgraphicsResource", + ("hipGraphicsResource_t", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CUmipmappedArray", + ("hipMipmappedArray_t", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CUfunction_attribute", + ("hipFuncAttribute_t", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CUfunction_attribute_enum", + ("hipFuncAttribute_t", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CUgraphicsMapResourceFlags", + ("hipGraphicsMapFlags", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CUgraphicsMapResourceFlags_enum", + ("hipGraphicsMapFlags", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CUgraphicsRegisterFlags", + ("hipGraphicsRegisterFlags", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CUgraphicsRegisterFlags_enum", + ("hipGraphicsRegisterFlags", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CUoccupancy_flags", + ("hipOccupancyFlags", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CUoccupancy_flags_enum", + ("hipOccupancyFlags", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ("CUfunc_cache_enum", ("hipFuncCache", CONV_TYPE, API_DRIVER)), + ("CUfunc_cache", ("hipFuncCache", CONV_TYPE, API_DRIVER)), + ("CUipcMem_flags", ("hipIpcMemFlags", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED)), + ( + "CUipcMem_flags_enum", + ("hipIpcMemFlags", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ("CUjit_cacheMode", ("hipJitCacheMode", CONV_JIT, API_DRIVER, HIP_UNSUPPORTED)), + ( + "CUjit_cacheMode_enum", + ("hipJitCacheMode", CONV_JIT, API_DRIVER, HIP_UNSUPPORTED), + ), + ("CUjit_fallback", ("hipJitFallback", CONV_JIT, API_DRIVER, HIP_UNSUPPORTED)), + ( + "CUjit_fallback_enum", + ("hipJitFallback", CONV_JIT, API_DRIVER, HIP_UNSUPPORTED), + ), + ("CUjit_option", ("hipJitOption", CONV_JIT, API_DRIVER)), + ("CUjit_option_enum", ("hipJitOption", CONV_JIT, API_DRIVER)), + ("CUjit_target", ("hipJitTarget", CONV_JIT, API_DRIVER, HIP_UNSUPPORTED)), + ("CUjit_target_enum", ("hipJitTarget", CONV_JIT, API_DRIVER, HIP_UNSUPPORTED)), + ("CUjitInputType", ("hipJitInputType", CONV_JIT, API_DRIVER, HIP_UNSUPPORTED)), + ( + "CUjitInputType_enum", + ("hipJitInputType", CONV_JIT, API_DRIVER, HIP_UNSUPPORTED), + ), + ("CUlimit", ("hipLimit_t", CONV_TYPE, API_DRIVER)), + ("CUlimit_enum", ("hipLimit_t", CONV_TYPE, API_DRIVER)), + ("CUmemAccessDesc", ("hipMemAccessDesc", CONV_TYPE, API_DRIVER)), + ("CUmemAccessDesc_st", ("hipMemAccessDesc", CONV_TYPE, API_DRIVER)), + ("CUmemAccessDesc_v1", ("hipMemAccessDesc", CONV_TYPE, API_DRIVER)), + ( + "CUmemAttach_flags", + ("hipMemAttachFlags_t", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CUmemAttach_flags_enum", + ("hipMemAttachFlags_t", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ("CUmemAllocationGranularity_flags", ("hipMemAllocationGranularity_flags", CONV_TYPE, API_DRIVER)), + ("CUmemAllocationGranularity_flags_enum", ("hipMemAllocationGranularity_flags", CONV_TYPE, API_DRIVER)), + ("CUmemAllocationHandleType", ("hipMemAllocationHandleType", CONV_TYPE, API_DRIVER)), + ("CUmemAllocationHandleType_enum", ("hipMemAllocationHandleType", CONV_TYPE, API_DRIVER)), + ("CUmemAllocationProp", ("hipMemAllocationProp", CONV_TYPE, API_DRIVER)), + ("CUmemAllocationProp_st", ("hipMemAllocationProp", CONV_TYPE, API_DRIVER)), + ("CUmemAllocationProp_v1", ("hipMemAllocationProp", CONV_TYPE, API_DRIVER)), + ("CUmemAllocationType", ("hipMemAllocationType", CONV_TYPE, API_DRIVER)), + ("CUmemAllocationType_enum", ("hipMemAllocationType", CONV_TYPE, API_DRIVER)), + ("CUmemGenericAllocationHandle", ("hipMemGenericAllocationHandle_t", CONV_TYPE, API_DRIVER)), + ("CUmemGenericAllocationHandle_v1", ("hipMemGenericAllocationHandle_t", CONV_TYPE, API_DRIVER)), + ("CUmemHandleType", ("hipMemHandleType", CONV_TYPE, API_DRIVER)), + ("CUmemHandleType_enum", ("hipMemHandleType", CONV_TYPE, API_DRIVER)), + ("CUmemLocation", ("hipMemLocation", CONV_TYPE, API_DRIVER)), + ("CUmemLocationType", ("hipMemLocationType", CONV_TYPE, API_DRIVER)), + ("CUmemLocationType_enum", ("hipMemLocationType", CONV_TYPE, API_DRIVER)), + ("CUmemLocation_st", ("hipMemLocation", CONV_TYPE, API_DRIVER)), + ("CUmemLocation_v1", ("hipMemLocation", CONV_TYPE, API_DRIVER)), + ("CUmemOperationType", ("hipMemOperationType", CONV_TYPE, API_DRIVER)), + ("CUmemOperationType_enum", ("hipMemOperationType", CONV_TYPE, API_DRIVER)), + ("CUmemPoolHandle_st", ("ihipMemPoolHandle_t", CONV_TYPE, API_DRIVER)), + ("CUmemPoolProps", ("hipMemPoolProps", CONV_TYPE, API_DRIVER)), + ("CUmemPoolProps_st", ("hipMemPoolProps", CONV_TYPE, API_DRIVER)), + ("CUmemPoolProps_v1", ("hipMemPoolProps", CONV_TYPE, API_DRIVER)), + ("CUmemPoolPtrExportData", ("hipMemPoolPtrExportData", CONV_TYPE, API_DRIVER)), + ("CUmemPoolPtrExportData_st", ("hipMemPoolPtrExportData", CONV_TYPE, API_DRIVER)), + ("CUmemPoolPtrExportData_v1", ("hipMemPoolPtrExportData", CONV_TYPE, API_DRIVER)), + ("CUmemPool_attribute", ("hipMemPoolAttr", CONV_TYPE, API_DRIVER)), + ("CUmemPool_attribute_enum", ("hipMemPoolAttr", CONV_TYPE, API_DRIVER)), + ("CUmem_advise_enum", ("hipMemoryAdvise", CONV_TYPE, API_DRIVER)), + ("CUmem_range_attribute_enum", ("hipMemRangeAttribute", CONV_TYPE, API_DRIVER)), + ("CUmemoryPool", ("hipMemPool_t", CONV_TYPE, API_DRIVER)), + ("CUmemorytype", ("hipMemType_t", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED)), + ("CUmemorytype_enum", ("hipMemType_t", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED)), + ("CUresourcetype", ("hipResourceType", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED)), + ( + "CUresourcetype_enum", + ("hipResourceType", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED), + ), + ("CUresourceViewFormat", ("hipResourceViewFormat", CONV_TEX, API_DRIVER)), + ("CUresourceViewFormat_enum", ("hipResourceViewFormat", CONV_TEX, API_DRIVER)), + ("CUsharedconfig", ("hipSharedMemConfig", CONV_TYPE, API_DRIVER)), + ("CUsharedconfig_enum", ("hipSharedMemConfig", CONV_TYPE, API_DRIVER)), + ("CUcontext", ("hipCtx_t", CONV_TYPE, API_DRIVER)), + ("CUmodule", ("hipModule_t", CONV_TYPE, API_DRIVER)), + ("CUstream", ("hipStream_t", CONV_TYPE, API_DRIVER)), + ("CUstream_st", ("ihipStream_t", CONV_TYPE, API_DRIVER)), + ("CUstreamCallback", ("hipStreamCallback_t", CONV_TYPE, API_DRIVER)), + ("CUsurfObject", ("hipSurfaceObject", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED)), + ( + "CUsurfref", + ("hipSurfaceReference_t", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ("CUtexObject", ("hipTextureObject_t", CONV_TYPE, API_DRIVER)), + ("CUtexref", ("textureReference", CONV_TYPE, API_DRIVER)), + ("CUstream_flags", ("hipStreamFlags", CONV_TYPE, API_DRIVER)), + ( + "CUstreamWaitValue_flags", + ("hipStreamWaitValueFlags", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CUstreamWriteValue_flags", + ("hipStreamWriteValueFlags", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CUstreamBatchMemOpType", + ("hipStreamBatchMemOpType", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CUdevice_P2PAttribute", + ("hipDeviceP2PAttribute", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ("CUevent", ("hipEvent_t", CONV_TYPE, API_DRIVER)), + ("CUevent_st", ("ihipEvent_t", CONV_TYPE, API_DRIVER)), + ("CUevent_flags", ("hipEventFlags", CONV_EVENT, API_DRIVER, HIP_UNSUPPORTED)), + ("CUfilter_mode", ("hipTextureFilterMode", CONV_TEX, API_DRIVER)), + ("CUGLDeviceList", ("hipGLDeviceList", CONV_GL, API_DRIVER, HIP_UNSUPPORTED)), + ("CUGLmap_flags", ("hipGLMapFlags", CONV_GL, API_DRIVER, HIP_UNSUPPORTED)), + ( + "CUd3d9DeviceList", + ("hipD3D9DeviceList", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CUd3d9map_flags", + ("hipD3D9MapFlags", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CUd3d9register_flags", + ("hipD3D9RegisterFlags", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CUd3d10DeviceList", + ("hipd3d10DeviceList", CONV_D3D10, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CUd3d10map_flags", + ("hipD3D10MapFlags", CONV_D3D10, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CUd3d10register_flags", + ("hipD3D10RegisterFlags", CONV_D3D10, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CUd3d11DeviceList", + ("hipd3d11DeviceList", CONV_D3D11, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CUeglStreamConnection_st", + ("hipEglStreamConnection", CONV_EGL, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CUeglStreamConnection", + ("hipEglStreamConnection", CONV_EGL, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "libraryPropertyType_t", + ("hipLibraryPropertyType_t", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "libraryPropertyType", + ("hipLibraryPropertyType_t", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ("cudaStreamCallback_t", ("hipStreamCallback_t", CONV_TYPE, API_RUNTIME)), + ("cudaArray", ("hipArray", CONV_MEM, API_RUNTIME)), + ("cudaArray_t", ("hipArray_t", CONV_MEM, API_RUNTIME)), + ("cudaArray_const_t", ("hipArray_const_t", CONV_MEM, API_RUNTIME)), + ("cudaMipmappedArray_t", ("hipMipmappedArray_t", CONV_MEM, API_RUNTIME)), + ( + "cudaMipmappedArray_const_t", + ("hipMipmappedArray_const_t", CONV_MEM, API_RUNTIME), + ), + ("cudaArrayDefault", ("hipArrayDefault", CONV_MEM, API_RUNTIME)), + ("cudaArrayLayered", ("hipArrayLayered", CONV_MEM, API_RUNTIME)), + ( + "cudaArraySurfaceLoadStore", + ("hipArraySurfaceLoadStore", CONV_MEM, API_RUNTIME), + ), + ("cudaArrayCubemap", ("hipArrayCubemap", CONV_MEM, API_RUNTIME)), + ("cudaArrayTextureGather", ("hipArrayTextureGather", CONV_MEM, API_RUNTIME)), + ("cudaMemoryAdvise", ("hipMemoryAdvise", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED)), + ( + "cudaMemRangeAttribute", + ("hipMemRangeAttribute", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ("cudaMemcpyKind", ("hipMemcpyKind", CONV_MEM, API_RUNTIME)), + ("cudaMemoryType", ("hipMemoryType", CONV_MEM, API_RUNTIME)), + ("cudaExtent", ("hipExtent", CONV_MEM, API_RUNTIME)), + ("cudaPitchedPtr", ("hipPitchedPtr", CONV_MEM, API_RUNTIME)), + ("cudaPos", ("hipPos", CONV_MEM, API_RUNTIME)), + ("cudaEvent_t", ("hipEvent_t", CONV_TYPE, API_RUNTIME)), + ("cudaStream_t", ("hipStream_t", CONV_TYPE, API_RUNTIME)), + ("cudaHostFn_t", ("hipHostFn_t", CONV_TYPE, API_RUNTIME)), + ("cudaPointerAttributes", ("hipPointerAttribute_t", CONV_TYPE, API_RUNTIME)), + ("cudaDeviceAttr", ("hipDeviceAttribute_t", CONV_TYPE, API_RUNTIME)), + ("cudaDeviceProp", ("hipDeviceProp_t", CONV_TYPE, API_RUNTIME)), + ( + "cudaDeviceP2PAttr", + ("hipDeviceP2PAttribute", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaComputeMode", + ("hipComputeMode", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ("cudaFuncCache", ("hipFuncCache_t", CONV_CACHE, API_RUNTIME)), + ( + "cudaFuncAttributes", + ("hipFuncAttributes", CONV_EXEC, API_RUNTIME, HIP_UNSUPPORTED), + ), + ("cudaSharedMemConfig", ("hipSharedMemConfig", CONV_TYPE, API_RUNTIME)), + ("cudaLimit", ("hipLimit_t", CONV_TYPE, API_RUNTIME)), + ("cudaOutputMode", ("hipOutputMode", CONV_OTHER, API_RUNTIME, HIP_UNSUPPORTED)), + ("cudaTextureReadMode", ("hipTextureReadMode", CONV_TEX, API_RUNTIME)), + ("cudaTextureFilterMode", ("hipTextureFilterMode", CONV_TEX, API_RUNTIME)), + ("cudaChannelFormatKind", ("hipChannelFormatKind", CONV_TEX, API_RUNTIME)), + ("cudaChannelFormatDesc", ("hipChannelFormatDesc", CONV_TEX, API_RUNTIME)), + ("cudaResourceDesc", ("hipResourceDesc", CONV_TEX, API_RUNTIME)), + ("cudaResourceViewDesc", ("hipResourceViewDesc", CONV_TEX, API_RUNTIME)), + ("cudaTextureDesc", ("hipTextureDesc", CONV_TEX, API_RUNTIME)), + ( + "surfaceReference", + ("hipSurfaceReference", CONV_SURFACE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ("cudaTextureObject_t", ("hipTextureObject_t", CONV_TEX, API_RUNTIME)), + ("cudaResourceType", ("hipResourceType", CONV_TEX, API_RUNTIME)), + ("cudaResourceViewFormat", ("hipResourceViewFormat", CONV_TEX, API_RUNTIME)), + ("cudaTextureAddressMode", ("hipTextureAddressMode", CONV_TEX, API_RUNTIME)), + ( + "cudaSurfaceBoundaryMode", + ("hipSurfaceBoundaryMode", CONV_SURFACE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaSurfaceFormatMode", + ("hipSurfaceFormatMode", CONV_SURFACE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ("cudaTextureType1D", ("hipTextureType1D", CONV_TEX, API_RUNTIME)), + ("cudaTextureType2D", ("hipTextureType2D", CONV_TEX, API_RUNTIME)), + ("cudaTextureType3D", ("hipTextureType3D", CONV_TEX, API_RUNTIME)), + ("cudaTextureTypeCubemap", ("hipTextureTypeCubemap", CONV_TEX, API_RUNTIME)), + ( + "cudaTextureType1DLayered", + ("hipTextureType1DLayered", CONV_TEX, API_RUNTIME), + ), + ( + "cudaTextureType2DLayered", + ("hipTextureType2DLayered", CONV_TEX, API_RUNTIME), + ), + ( + "cudaTextureTypeCubemapLayered", + ("hipTextureTypeCubemapLayered", CONV_TEX, API_RUNTIME), + ), + ("cudaIpcEventHandle_t", ("hipIpcEventHandle_t", CONV_TYPE, API_RUNTIME)), + ("cudaIpcEventHandle_st", ("hipIpcEventHandle_t", CONV_TYPE, API_RUNTIME)), + ("cudaIpcMemHandle_t", ("hipIpcMemHandle_t", CONV_TYPE, API_RUNTIME)), + ("cudaIpcMemHandle_st", ("hipIpcMemHandle_t", CONV_TYPE, API_RUNTIME)), + ( + "cudaGraphicsCubeFace", + ("hipGraphicsCubeFace", CONV_GRAPHICS, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaGraphicsMapFlags", + ("hipGraphicsMapFlags", CONV_GRAPHICS, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaGraphicsRegisterFlags", + ("hipGraphicsRegisterFlags", CONV_GRAPHICS, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaGLDeviceList", + ("hipGLDeviceList", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED), + ), + ("cudaGLMapFlags", ("hipGLMapFlags", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED)), + ( + "cudaD3D9DeviceList", + ("hipD3D9DeviceList", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaD3D9MapFlags", + ("hipD3D9MapFlags", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaD3D9RegisterFlags", + ("hipD3D9RegisterFlags", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaD3D10DeviceList", + ("hipd3d10DeviceList", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaD3D10MapFlags", + ("hipD3D10MapFlags", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaD3D10RegisterFlags", + ("hipD3D10RegisterFlags", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaD3D11DeviceList", + ("hipd3d11DeviceList", CONV_D3D11, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaEglStreamConnection", + ("hipEglStreamConnection", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED), + ), + ("cublasHandle_t", ("hipblasHandle_t", CONV_TYPE, API_BLAS)), + ("cublasOperation_t", ("hipblasOperation_t", CONV_TYPE, API_BLAS)), + ("cublasStatus_t", ("hipblasStatus_t", CONV_TYPE, API_BLAS)), + ("cublasFillMode_t", ("hipblasFillMode_t", CONV_TYPE, API_BLAS)), + ("cublasDiagType_t", ("hipblasDiagType_t", CONV_TYPE, API_BLAS)), + ("cublasSideMode_t", ("hipblasSideMode_t", CONV_TYPE, API_BLAS)), + ("cublasPointerMode_t", ("hipblasPointerMode_t", CONV_TYPE, API_BLAS)), + ("cublasGemmAlgo_t", ("hipblasGemmAlgo_t", CONV_TYPE, API_BLAS)), + ( + "cublasAtomicsMode_t", + ("hipblasAtomicsMode_t", CONV_TYPE, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasDataType_t", + ("hipblasDatatype_t", CONV_TYPE, API_BLAS, HIP_UNSUPPORTED), + ), + ("curandStatus", ("hiprandStatus_t", CONV_TYPE, API_RAND)), + ("curandStatus_t", ("hiprandStatus_t", CONV_TYPE, API_RAND)), + ("curandRngType", ("hiprandRngType_t", CONV_TYPE, API_RAND)), + ("curandRngType_t", ("hiprandRngType_t", CONV_TYPE, API_RAND)), + ("curandGenerator_st", ("hiprandGenerator_st", CONV_TYPE, API_RAND)), + ("curandGenerator_t", ("hiprandGenerator_t", CONV_TYPE, API_RAND)), + ( + "curandDirectionVectorSet", + ("hiprandDirectionVectorSet_t", CONV_TYPE, API_RAND, HIP_UNSUPPORTED), + ), + ( + "curandDirectionVectorSet_t", + ("hiprandDirectionVectorSet_t", CONV_TYPE, API_RAND, HIP_UNSUPPORTED), + ), + ("curandOrdering", ("hiprandOrdering_t", CONV_TYPE, API_RAND, HIP_UNSUPPORTED)), + ( + "curandOrdering_t", + ("hiprandOrdering_t", CONV_TYPE, API_RAND, HIP_UNSUPPORTED), + ), + ( + "curandDistribution_st", + ("hiprandDistribution_st", CONV_TYPE, API_RAND, HIP_UNSUPPORTED), + ), + ( + "curandHistogramM2V_st", + ("hiprandDistribution_st", CONV_TYPE, API_RAND, HIP_UNSUPPORTED), + ), + ( + "curandDistribution_t", + ("hiprandDistribution_t", CONV_TYPE, API_RAND, HIP_UNSUPPORTED), + ), + ( + "curandHistogramM2V_t", + ("hiprandDistribution_t", CONV_TYPE, API_RAND, HIP_UNSUPPORTED), + ), + ( + "curandDistributionShift_st", + ("hiprandDistributionShift_st", CONV_TYPE, API_RAND, HIP_UNSUPPORTED), + ), + ( + "curandDistributionShift_t", + ("hiprandDistributionShift_t", CONV_TYPE, API_RAND, HIP_UNSUPPORTED), + ), + ( + "curandDistributionM2Shift_st", + ("hiprandDistributionM2Shift_st", CONV_TYPE, API_RAND, HIP_UNSUPPORTED), + ), + ( + "curandDistributionM2Shift_t", + ("hiprandDistributionM2Shift_t", CONV_TYPE, API_RAND, HIP_UNSUPPORTED), + ), + ( + "curandHistogramM2_st", + ("hiprandHistogramM2_st", CONV_TYPE, API_RAND, HIP_UNSUPPORTED), + ), + ( + "curandHistogramM2_t", + ("hiprandHistogramM2_t", CONV_TYPE, API_RAND, HIP_UNSUPPORTED), + ), + ( + "curandHistogramM2K_st", + ("hiprandHistogramM2K_st", CONV_TYPE, API_RAND, HIP_UNSUPPORTED), + ), + ( + "curandHistogramM2K_t", + ("hiprandHistogramM2K_t", CONV_TYPE, API_RAND, HIP_UNSUPPORTED), + ), + ( + "curandDiscreteDistribution_st", + ("hiprandDiscreteDistribution_st", CONV_TYPE, API_RAND), + ), + ( + "curandDiscreteDistribution_t", + ("hiprandDiscreteDistribution_t", CONV_TYPE, API_RAND), + ), + ("curandMethod", ("hiprandMethod_t", CONV_TYPE, API_RAND, HIP_UNSUPPORTED)), + ("curandMethod_t", ("hiprandMethod_t", CONV_TYPE, API_RAND, HIP_UNSUPPORTED)), + ( + "curandDirectionVectors32_t", + ("hiprandDirectionVectors32_t", CONV_TYPE, API_RAND), + ), + ( + "curandDirectionVectors64_t", + ("hiprandDirectionVectors64_t", CONV_TYPE, API_RAND, HIP_UNSUPPORTED), + ), + ("curandStateMtgp32_t", ("hiprandStateMtgp32_t", CONV_TYPE, API_RAND)), + ("curandStateMtgp32", ("hiprandStateMtgp32_t", CONV_TYPE, API_RAND)), + ( + "curandStateScrambledSobol64_t", + ("hiprandStateScrambledSobol64_t", CONV_TYPE, API_RAND, HIP_UNSUPPORTED), + ), + ( + "curandStateSobol64_t", + ("hiprandStateSobol64_t", CONV_TYPE, API_RAND, HIP_UNSUPPORTED), + ), + ( + "curandStateScrambledSobol32_t", + ("hiprandStateScrambledSobol32_t", CONV_TYPE, API_RAND, HIP_UNSUPPORTED), + ), + ("curandStateSobol32_t", ("hiprandStateSobol32_t", CONV_TYPE, API_RAND)), + ("curandStateMRG32k3a_t", ("hiprandStateMRG32k3a_t", CONV_TYPE, API_RAND)), + ( + "curandStatePhilox4_32_10_t", + ("hiprandStatePhilox4_32_10_t", CONV_TYPE, API_RAND), + ), + ("curandStateXORWOW_t", ("hiprandStateXORWOW_t", CONV_TYPE, API_RAND)), + ("curandState_t", ("hiprandState_t", CONV_TYPE, API_RAND)), + ("curandState", ("hiprandState_t", CONV_TYPE, API_RAND)), + ("CUuuid", ("hipUUID", CONV_TYPE, API_RUNTIME)), + ("cudaGraph_t", ("hipGraph_t", CONV_TYPE, API_RAND)), + ("cudaGraphNode_t", ("hipGraphNode_t", CONV_TYPE, API_RAND)), + ("cudaGraphExec_t", ("hipGraphExec_t", CONV_TYPE, API_RAND)), + ("__nv_bfloat16", ("__hip_bfloat16", CONV_TYPE, API_RUNTIME)), + ("__nv_bfloat162", ("__hip_bfloat162", CONV_TYPE, API_RUNTIME)), + ] +) + +# pyrefly: ignore [no-matching-overload] +CUDA_INCLUDE_MAP = collections.OrderedDict( + [ + # since pytorch uses "\b{pattern}\b" as the actual re pattern, + # patterns listed here have to begin and end with alnum chars + ( + "include " to differentiate + ("", (_RCCL_HEADER, CONV_INCLUDE, API_RUNTIME)), + ("nvrtc.h", ("hip/hiprtc.h", CONV_INCLUDE, API_RTC)), + ("thrust/system/cuda", ("thrust/system/hip", CONV_INCLUDE, API_BLAS)), + ("cub/util_allocator.cuh", ("hipcub/hipcub.hpp", CONV_INCLUDE, API_BLAS)), + ("cub/block/block_reduce.cuh", ("hipcub/hipcub.hpp", CONV_INCLUDE, API_BLAS)), + ("cub/block/block_raking_layout.cuh", ("hipcub/hipcub.hpp", CONV_INCLUDE, API_BLAS)), + ("cub/cub.cuh", ("hipcub/hipcub.hpp", CONV_INCLUDE, API_BLAS)), + ("cub/config.cuh", ("hipcub/hipcub.hpp", CONV_INCLUDE, API_BLAS)), + ("cub/util_ptx.cuh", ("hipcub/hipcub.hpp", CONV_INCLUDE, API_BLAS)), + ("cub/util_type.cuh", ("hipcub/hipcub.hpp", CONV_INCLUDE, API_BLAS)), + ("cub/device/device_run_length_encode.cuh", ("hipcub/hipcub.hpp", CONV_INCLUDE, API_BLAS)), + ("cub/block/block_load.cuh", ("hipcub/hipcub.hpp", CONV_INCLUDE, API_BLAS)), + ("cub/block/block_store.cuh", ("hipcub/hipcub.hpp", CONV_INCLUDE, API_BLAS)), + ("cub/block/block_scan.cuh", ("hipcub/hipcub.hpp", CONV_INCLUDE, API_BLAS)), + ("cub/device/device_radix_sort.cuh", ("hipcub/hipcub.hpp", CONV_INCLUDE, API_BLAS)), + ("cub/device/device_reduce.cuh", ("hipcub/hipcub.hpp", CONV_INCLUDE, API_BLAS)), + ("cub/device/device_scan.cuh", ("hipcub/hipcub.hpp", CONV_INCLUDE, API_BLAS)), + ("cub/device/device_select.cuh", ("hipcub/hipcub.hpp", CONV_INCLUDE, API_BLAS)), + ("nvtx3/nvtx3.hpp", ("roctracer/roctx.h", CONV_INCLUDE, API_ROCTX)), + ("nvToolsExt.h", ("roctracer/roctx.h", CONV_INCLUDE, API_ROCTX)), + ("nvml.h", ("rocm_smi/rocm_smi.h", CONV_INCLUDE, API_ROCMSMI)), + ] +) + +# pyrefly: ignore [no-matching-overload] +CUDA_IDENTIFIER_MAP = collections.OrderedDict( + [ + ("__CUDACC__", ("__HIPCC__", CONV_DEF, API_RUNTIME)), + ( + "CUDA_ERROR_INVALID_CONTEXT", + ("hipErrorInvalidContext", CONV_TYPE, API_DRIVER), + ), + ( + "CUDA_ERROR_CONTEXT_ALREADY_CURRENT", + ("hipErrorContextAlreadyCurrent", CONV_TYPE, API_DRIVER), + ), + ( + "CUDA_ERROR_ARRAY_IS_MAPPED", + ("hipErrorArrayIsMapped", CONV_TYPE, API_DRIVER), + ), + ("CUDA_ERROR_ALREADY_MAPPED", ("hipErrorAlreadyMapped", CONV_TYPE, API_DRIVER)), + ( + "CUDA_ERROR_ALREADY_ACQUIRED", + ("hipErrorAlreadyAcquired", CONV_TYPE, API_DRIVER), + ), + ("CUDA_ERROR_NOT_MAPPED", ("hipErrorNotMapped", CONV_TYPE, API_DRIVER)), + ( + "CUDA_ERROR_NOT_MAPPED_AS_ARRAY", + ("hipErrorNotMappedAsArray", CONV_TYPE, API_DRIVER), + ), + ( + "CUDA_ERROR_NOT_MAPPED_AS_POINTER", + ("hipErrorNotMappedAsPointer", CONV_TYPE, API_DRIVER), + ), + ( + "CUDA_ERROR_CONTEXT_ALREADY_IN_USE", + ("hipErrorContextAlreadyInUse", CONV_TYPE, API_DRIVER), + ), + ("CUDA_ERROR_INVALID_SOURCE", ("hipErrorInvalidSource", CONV_TYPE, API_DRIVER)), + ("CUDA_ERROR_FILE_NOT_FOUND", ("hipErrorFileNotFound", CONV_TYPE, API_DRIVER)), + ("CUDA_ERROR_NOT_FOUND", ("hipErrorNotFound", CONV_TYPE, API_DRIVER)), + ( + "CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING", + ( + "hipErrorLaunchIncompatibleTexturing", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CUDA_ERROR_PRIMARY_CONTEXT_ACTIVE", + ("hipErrorPrimaryContextActive", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CUDA_ERROR_CONTEXT_IS_DESTROYED", + ("hipErrorContextIsDestroyed", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CUDA_ERROR_NOT_PERMITTED", + ("hipErrorNotPermitted", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CUDA_ERROR_NOT_SUPPORTED", + ("hipErrorNotSupported", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cudaErrorMissingConfiguration", + ("hipErrorMissingConfiguration", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaErrorPriorLaunchFailure", + ("hipErrorPriorLaunchFailure", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaErrorInvalidDeviceFunction", + ("hipErrorInvalidDeviceFunction", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaErrorInvalidConfiguration", + ("hipErrorInvalidConfiguration", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaErrorInvalidPitchValue", + ("hipErrorInvalidPitchValue", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaErrorInvalidSymbol", + ("hipErrorInvalidSymbol", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaErrorInvalidHostPointer", + ("hipErrorInvalidHostPointer", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaErrorInvalidDevicePointer", + ("hipErrorInvalidDevicePointer", CONV_TYPE, API_RUNTIME), + ), + ( + "cudaErrorInvalidTexture", + ("hipErrorInvalidTexture", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaErrorInvalidTextureBinding", + ("hipErrorInvalidTextureBinding", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaErrorInvalidChannelDescriptor", + ( + "hipErrorInvalidChannelDescriptor", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaErrorInvalidMemcpyDirection", + ("hipErrorInvalidMemcpyDirection", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaErrorAddressOfConstant", + ("hipErrorAddressOfConstant", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaErrorTextureFetchFailed", + ("hipErrorTextureFetchFailed", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaErrorTextureNotBound", + ("hipErrorTextureNotBound", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaErrorSynchronizationError", + ("hipErrorSynchronizationError", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaErrorInvalidFilterSetting", + ("hipErrorInvalidFilterSetting", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaErrorInvalidNormSetting", + ("hipErrorInvalidNormSetting", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaErrorMixedDeviceExecution", + ("hipErrorMixedDeviceExecution", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaErrorNotYetImplemented", + ("hipErrorNotYetImplemented", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaErrorMemoryValueTooLarge", + ("hipErrorMemoryValueTooLarge", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaErrorInsufficientDriver", + ("hipErrorInsufficientDriver", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaErrorSetOnActiveProcess", + ("hipErrorSetOnActiveProcess", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaErrorContextIsDestroyed", + ("hipErrorContextIsDestroyed", CONV_TYPE, API_RUNTIME), + ), + ( + "cudaErrorInvalidSurface", + ("hipErrorInvalidSurface", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaErrorDuplicateVariableName", + ("hipErrorDuplicateVariableName", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaErrorDuplicateTextureName", + ("hipErrorDuplicateTextureName", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaErrorDuplicateSurfaceName", + ("hipErrorDuplicateSurfaceName", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaErrorDevicesUnavailable", + ("hipErrorDevicesUnavailable", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaErrorIncompatibleDriverContext", + ( + "hipErrorIncompatibleDriverContext", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaErrorDeviceAlreadyInUse", + ("hipErrorDeviceAlreadyInUse", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaErrorLaunchMaxDepthExceeded", + ("hipErrorLaunchMaxDepthExceeded", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaErrorLaunchFileScopedTex", + ("hipErrorLaunchFileScopedTex", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaErrorLaunchFileScopedSurf", + ("hipErrorLaunchFileScopedSurf", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaErrorSyncDepthExceeded", + ("hipErrorSyncDepthExceeded", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaErrorLaunchPendingCountExceeded", + ( + "hipErrorLaunchPendingCountExceeded", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaErrorNotPermitted", + ("hipErrorNotPermitted", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaErrorNotSupported", + ("hipErrorNotSupported", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaErrorStartupFailure", + ("hipErrorStartupFailure", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaErrorApiFailureBase", + ("hipErrorApiFailureBase", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ("CUDA_SUCCESS", ("hipSuccess", CONV_TYPE, API_DRIVER)), + ("cudaSuccess", ("hipSuccess", CONV_TYPE, API_RUNTIME)), + ("CUDA_ERROR_INVALID_VALUE", ("hipErrorInvalidValue", CONV_TYPE, API_DRIVER)), + ("cudaErrorInvalidValue", ("hipErrorInvalidValue", CONV_TYPE, API_RUNTIME)), + ( + "CUDA_ERROR_OUT_OF_MEMORY", + ("hipErrorMemoryAllocation", CONV_TYPE, API_DRIVER), + ), + ( + "cudaErrorMemoryAllocation", + ("hipErrorMemoryAllocation", CONV_TYPE, API_RUNTIME), + ), + ( + "CUDA_ERROR_NOT_INITIALIZED", + ("hipErrorNotInitialized", CONV_TYPE, API_DRIVER), + ), + ( + "cudaErrorInitializationError", + ("hipErrorInitializationError", CONV_TYPE, API_RUNTIME), + ), + ("CUDA_ERROR_DEINITIALIZED", ("hipErrorDeinitialized", CONV_TYPE, API_DRIVER)), + ( + "cudaErrorCudartUnloading", + ("hipErrorDeinitialized", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "CUDA_ERROR_PROFILER_DISABLED", + ("hipErrorProfilerDisabled", CONV_TYPE, API_DRIVER), + ), + ( + "cudaErrorProfilerDisabled", + ("hipErrorProfilerDisabled", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "CUDA_ERROR_PROFILER_NOT_INITIALIZED", + ("hipErrorProfilerNotInitialized", CONV_TYPE, API_DRIVER), + ), + ( + "cudaErrorProfilerNotInitialized", + ("hipErrorProfilerNotInitialized", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "CUDA_ERROR_PROFILER_ALREADY_STARTED", + ("hipErrorProfilerAlreadyStarted", CONV_TYPE, API_DRIVER), + ), + ( + "cudaErrorProfilerAlreadyStarted", + ("hipErrorProfilerAlreadyStarted", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "CUDA_ERROR_PROFILER_ALREADY_STOPPED", + ("hipErrorProfilerAlreadyStopped", CONV_TYPE, API_DRIVER), + ), + ( + "cudaErrorProfilerAlreadyStopped", + ("hipErrorProfilerAlreadyStopped", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ("CUDA_ERROR_NO_DEVICE", ("hipErrorNoDevice", CONV_TYPE, API_DRIVER)), + ("cudaErrorNoDevice", ("hipErrorNoDevice", CONV_TYPE, API_RUNTIME)), + ("CUDA_ERROR_INVALID_DEVICE", ("hipErrorInvalidDevice", CONV_TYPE, API_DRIVER)), + ("cudaErrorInvalidDevice", ("hipErrorInvalidDevice", CONV_TYPE, API_RUNTIME)), + ("CUDA_ERROR_INVALID_IMAGE", ("hipErrorInvalidImage", CONV_TYPE, API_DRIVER)), + ( + "cudaErrorInvalidKernelImage", + ("hipErrorInvalidImage", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ("CUDA_ERROR_MAP_FAILED", ("hipErrorMapFailed", CONV_TYPE, API_DRIVER)), + ( + "cudaErrorMapBufferObjectFailed", + ("hipErrorMapFailed", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ("CUDA_ERROR_UNMAP_FAILED", ("hipErrorUnmapFailed", CONV_TYPE, API_DRIVER)), + ( + "cudaErrorUnmapBufferObjectFailed", + ("hipErrorUnmapFailed", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "CUDA_ERROR_NO_BINARY_FOR_GPU", + ("hipErrorNoBinaryForGpu", CONV_TYPE, API_DRIVER), + ), + ( + "cudaErrorNoKernelImageForDevice", + ("hipErrorNoBinaryForGpu", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "CUDA_ERROR_ECC_UNCORRECTABLE", + ("hipErrorECCNotCorrectable", CONV_TYPE, API_DRIVER), + ), + ( + "cudaErrorECCUncorrectable", + ("hipErrorECCNotCorrectable", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "CUDA_ERROR_UNSUPPORTED_LIMIT", + ("hipErrorUnsupportedLimit", CONV_TYPE, API_DRIVER), + ), + ( + "cudaErrorUnsupportedLimit", + ("hipErrorUnsupportedLimit", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "CUDA_ERROR_PEER_ACCESS_UNSUPPORTED", + ("hipErrorPeerAccessUnsupported", CONV_TYPE, API_DRIVER), + ), + ( + "cudaErrorPeerAccessUnsupported", + ("hipErrorPeerAccessUnsupported", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "CUDA_ERROR_INVALID_PTX", + ("hipErrorInvalidKernelFile", CONV_TYPE, API_DRIVER), + ), + ( + "cudaErrorInvalidPtx", + ("hipErrorInvalidKernelFile", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "CUDA_ERROR_INVALID_GRAPHICS_CONTEXT", + ("hipErrorInvalidGraphicsContext", CONV_TYPE, API_DRIVER), + ), + ( + "cudaErrorInvalidGraphicsContext", + ("hipErrorInvalidGraphicsContext", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "CUDA_ERROR_NVLINK_UNCORRECTABLE", + ("hipErrorNvlinkUncorrectable", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cudaErrorNvlinkUncorrectable", + ("hipErrorNvlinkUncorrectable", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND", + ("hipErrorSharedObjectSymbolNotFound", CONV_TYPE, API_DRIVER), + ), + ( + "cudaErrorSharedObjectSymbolNotFound", + ( + "hipErrorSharedObjectSymbolNotFound", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "CUDA_ERROR_SHARED_OBJECT_INIT_FAILED", + ("hipErrorSharedObjectInitFailed", CONV_TYPE, API_DRIVER), + ), + ( + "cudaErrorSharedObjectInitFailed", + ("hipErrorSharedObjectInitFailed", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "CUDA_ERROR_OPERATING_SYSTEM", + ("hipErrorOperatingSystem", CONV_TYPE, API_DRIVER), + ), + ( + "cudaErrorOperatingSystem", + ("hipErrorOperatingSystem", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "CUDA_ERROR_INVALID_HANDLE", + ("hipErrorInvalidResourceHandle", CONV_TYPE, API_DRIVER), + ), + ( + "cudaErrorInvalidResourceHandle", + ("hipErrorInvalidResourceHandle", CONV_TYPE, API_RUNTIME), + ), + ("CUDA_ERROR_NOT_READY", ("hipErrorNotReady", CONV_TYPE, API_DRIVER)), + ("cudaErrorNotReady", ("hipErrorNotReady", CONV_TYPE, API_RUNTIME)), + ( + "CUDA_ERROR_ILLEGAL_ADDRESS", + ("hipErrorIllegalAddress", CONV_TYPE, API_DRIVER), + ), + ( + "cudaErrorIllegalAddress", + ("hipErrorIllegalAddress", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES", + ("hipErrorLaunchOutOfResources", CONV_TYPE, API_DRIVER), + ), + ( + "cudaErrorLaunchOutOfResources", + ("hipErrorLaunchOutOfResources", CONV_TYPE, API_RUNTIME), + ), + ("CUDA_ERROR_LAUNCH_TIMEOUT", ("hipErrorLaunchTimeOut", CONV_TYPE, API_DRIVER)), + ( + "cudaErrorLaunchTimeout", + ("hipErrorLaunchTimeOut", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED", + ("hipErrorPeerAccessAlreadyEnabled", CONV_TYPE, API_DRIVER), + ), + ( + "cudaErrorPeerAccessAlreadyEnabled", + ("hipErrorPeerAccessAlreadyEnabled", CONV_TYPE, API_RUNTIME), + ), + ( + "CUDA_ERROR_PEER_ACCESS_NOT_ENABLED", + ("hipErrorPeerAccessNotEnabled", CONV_TYPE, API_DRIVER), + ), + ( + "cudaErrorPeerAccessNotEnabled", + ("hipErrorPeerAccessNotEnabled", CONV_TYPE, API_RUNTIME), + ), + ( + "CUDA_ERROR_ASSERT", + ("hipErrorAssert", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cudaErrorAssert", + ("hipErrorAssert", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "CUDA_ERROR_TOO_MANY_PEERS", + ("hipErrorTooManyPeers", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cudaErrorTooManyPeers", + ("hipErrorTooManyPeers", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "CUDA_ERROR_HOST_MEMORY_ALREADY_REGISTERED", + ("hipErrorHostMemoryAlreadyRegistered", CONV_TYPE, API_DRIVER), + ), + ( + "cudaErrorHostMemoryAlreadyRegistered", + ("hipErrorHostMemoryAlreadyRegistered", CONV_TYPE, API_RUNTIME), + ), + ( + "CUDA_ERROR_HOST_MEMORY_NOT_REGISTERED", + ("hipErrorHostMemoryNotRegistered", CONV_TYPE, API_DRIVER), + ), + ( + "cudaErrorHostMemoryNotRegistered", + ("hipErrorHostMemoryNotRegistered", CONV_TYPE, API_RUNTIME), + ), + ( + "CUDA_ERROR_HARDWARE_STACK_ERROR", + ("hipErrorHardwareStackError", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cudaErrorHardwareStackError", + ("hipErrorHardwareStackError", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "CUDA_ERROR_ILLEGAL_INSTRUCTION", + ("hipErrorIllegalInstruction", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cudaErrorIllegalInstruction", + ("hipErrorIllegalInstruction", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "CUDA_ERROR_MISALIGNED_ADDRESS", + ("hipErrorMisalignedAddress", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cudaErrorMisalignedAddress", + ("hipErrorMisalignedAddress", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "CUDA_ERROR_INVALID_ADDRESS_SPACE", + ("hipErrorInvalidAddressSpace", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cudaErrorInvalidAddressSpace", + ("hipErrorInvalidAddressSpace", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "CUDA_ERROR_INVALID_PC", + ("hipErrorInvalidPc", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cudaErrorInvalidPc", + ("hipErrorInvalidPc", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "CUDA_ERROR_LAUNCH_FAILED", + ("hipErrorLaunchFailure", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cudaErrorLaunchFailure", + ("hipErrorLaunchFailure", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "CUDA_ERROR_UNKNOWN", + ("hipErrorUnknown", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ("cudaErrorUnknown", ("hipErrorUnknown", CONV_TYPE, API_RUNTIME)), + ( + "CU_TR_ADDRESS_MODE_WRAP", + ("HIP_TR_ADDRESS_MODE_WRAP", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_TR_ADDRESS_MODE_CLAMP", + ("HIP_TR_ADDRESS_MODE_CLAMP", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_TR_ADDRESS_MODE_MIRROR", + ("HIP_TR_ADDRESS_MODE_MIRROR", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_TR_ADDRESS_MODE_BORDER", + ("HIP_TR_ADDRESS_MODE_BORDER", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_CUBEMAP_FACE_POSITIVE_X", + ("HIP_CUBEMAP_FACE_POSITIVE_X", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_CUBEMAP_FACE_NEGATIVE_X", + ("HIP_CUBEMAP_FACE_NEGATIVE_X", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_CUBEMAP_FACE_POSITIVE_Y", + ("HIP_CUBEMAP_FACE_POSITIVE_Y", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_CUBEMAP_FACE_NEGATIVE_Y", + ("HIP_CUBEMAP_FACE_NEGATIVE_Y", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_CUBEMAP_FACE_POSITIVE_Z", + ("HIP_CUBEMAP_FACE_POSITIVE_Z", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_CUBEMAP_FACE_NEGATIVE_Z", + ("HIP_CUBEMAP_FACE_NEGATIVE_Z", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_AD_FORMAT_UNSIGNED_INT8", + ("HIP_AD_FORMAT_UNSIGNED_INT8", CONV_TYPE, API_DRIVER), + ), + ( + "CU_AD_FORMAT_UNSIGNED_INT16", + ("HIP_AD_FORMAT_UNSIGNED_INT16", CONV_TYPE, API_DRIVER), + ), + ( + "CU_AD_FORMAT_UNSIGNED_INT32", + ("HIP_AD_FORMAT_UNSIGNED_INT32", CONV_TYPE, API_DRIVER), + ), + ( + "CU_AD_FORMAT_SIGNED_INT8", + ("HIP_AD_FORMAT_SIGNED_INT8", CONV_TYPE, API_DRIVER), + ), + ( + "CU_AD_FORMAT_SIGNED_INT16", + ("HIP_AD_FORMAT_SIGNED_INT16", CONV_TYPE, API_DRIVER), + ), + ( + "CU_AD_FORMAT_SIGNED_INT32", + ("HIP_AD_FORMAT_SIGNED_INT32", CONV_TYPE, API_DRIVER), + ), + ("CU_AD_FORMAT_HALF", ("HIP_AD_FORMAT_HALF", CONV_TYPE, API_DRIVER)), + ("CU_AD_FORMAT_FLOAT", ("HIP_AD_FORMAT_FLOAT", CONV_TYPE, API_DRIVER)), + ( + "CU_COMPUTEMODE_DEFAULT", + ("hipComputeModeDefault", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_COMPUTEMODE_EXCLUSIVE", + ("hipComputeModeExclusive", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_COMPUTEMODE_PROHIBITED", + ("hipComputeModeProhibited", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_COMPUTEMODE_EXCLUSIVE_PROCESS", + ("hipComputeModeExclusiveProcess", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_MEM_ADVISE_SET_READ_MOSTLY", + ("hipMemAdviseSetReadMostly", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_MEM_ADVISE_UNSET_READ_MOSTLY", + ("hipMemAdviseUnsetReadMostly", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_MEM_ADVISE_SET_PREFERRED_LOCATION", + ( + "hipMemAdviseSetPreferredLocation", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_MEM_ADVISE_UNSET_PREFERRED_LOCATION", + ( + "hipMemAdviseUnsetPreferredLocation", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_MEM_ADVISE_SET_ACCESSED_BY", + ("hipMemAdviseSetAccessedBy", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_MEM_ADVISE_UNSET_ACCESSED_BY", + ("hipMemAdviseUnsetAccessedBy", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY", + ("hipMemRangeAttributeReadMostly", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION", + ( + "hipMemRangeAttributePreferredLocation", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY", + ("hipMemRangeAttributeAccessedBy", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION", + ( + "hipMemRangeAttributeLastPrefetchLocation", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_CTX_SCHED_AUTO", + ("HIP_CTX_SCHED_AUTO", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_CTX_SCHED_SPIN", + ("HIP_CTX_SCHED_SPIN", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_CTX_SCHED_YIELD", + ("HIP_CTX_SCHED_YIELD", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_CTX_SCHED_BLOCKING_SYNC", + ("HIP_CTX_SCHED_BLOCKING_SYNC", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_CTX_BLOCKING_SYNC", + ("HIP_CTX_BLOCKING_SYNC", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_CTX_SCHED_MASK", + ("HIP_CTX_SCHED_MASK", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_CTX_MAP_HOST", + ("HIP_CTX_MAP_HOST", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_CTX_LMEM_RESIZE_TO_MAX", + ("HIP_CTX_LMEM_RESIZE_TO_MAX", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_CTX_FLAGS_MASK", + ("HIP_CTX_FLAGS_MASK", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_LAUNCH_PARAM_BUFFER_POINTER", + ("HIP_LAUNCH_PARAM_BUFFER_POINTER", CONV_TYPE, API_DRIVER), + ), + ( + "CU_LAUNCH_PARAM_BUFFER_SIZE", + ("HIP_LAUNCH_PARAM_BUFFER_SIZE", CONV_TYPE, API_DRIVER), + ), + ("CU_LAUNCH_PARAM_END", ("HIP_LAUNCH_PARAM_END", CONV_TYPE, API_DRIVER)), + ( + "CU_IPC_HANDLE_SIZE", + ("HIP_IPC_HANDLE_SIZE", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_MEMHOSTALLOC_DEVICEMAP", + ("HIP_MEMHOSTALLOC_DEVICEMAP", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_MEMHOSTALLOC_PORTABLE", + ("HIP_MEMHOSTALLOC_PORTABLE", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_MEMHOSTALLOC_WRITECOMBINED", + ("HIP_MEMHOSTALLOC_WRITECOMBINED", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_MEMHOSTREGISTER_DEVICEMAP", + ("HIP_MEMHOSTREGISTER_DEVICEMAP", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_MEMHOSTREGISTER_IOMEMORY", + ("HIP_MEMHOSTREGISTER_IOMEMORY", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_MEMHOSTREGISTER_PORTABLE", + ("HIP_MEMHOSTREGISTER_PORTABLE", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_PARAM_TR_DEFAULT", + ("HIP_PARAM_TR_DEFAULT", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_STREAM_LEGACY", + ("HIP_STREAM_LEGACY", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_STREAM_PER_THREAD", + ("HIP_STREAM_PER_THREAD", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_TRSA_OVERRIDE_FORMAT", + ("HIP_TRSA_OVERRIDE_FORMAT", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_TRSF_NORMALIZED_COORDINATES", + ("HIP_TRSF_NORMALIZED_COORDINATES", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_TRSF_READ_AS_INTEGER", + ("HIP_TRSF_READ_AS_INTEGER", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ("CU_TRSF_SRGB", ("HIP_TRSF_SRGB", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED)), + ( + "CUDA_ARRAY3D_2DARRAY", + ("HIP_ARRAY3D_LAYERED", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CUDA_ARRAY3D_CUBEMAP", + ("HIP_ARRAY3D_CUBEMAP", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CUDA_ARRAY3D_DEPTH_TEXTURE", + ("HIP_ARRAY3D_DEPTH_TEXTURE", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CUDA_ARRAY3D_LAYERED", + ("HIP_ARRAY3D_LAYERED", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CUDA_ARRAY3D_SURFACE_LDST", + ("HIP_ARRAY3D_SURFACE_LDST", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CUDA_ARRAY3D_TEXTURE_GATHER", + ("HIP_ARRAY3D_TEXTURE_GATHER", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK", + ( + "hipDeviceAttributeMaxThreadsPerBlock", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X", + ("hipDeviceAttributeMaxBlockDimX", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y", + ("hipDeviceAttributeMaxBlockDimY", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z", + ("hipDeviceAttributeMaxBlockDimZ", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X", + ("hipDeviceAttributeMaxGridDimX", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y", + ("hipDeviceAttributeMaxGridDimY", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z", + ("hipDeviceAttributeMaxGridDimZ", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK", + ( + "hipDeviceAttributeMaxSharedMemoryPerBlock", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_SHARED_MEMORY_PER_BLOCK", + ( + "hipDeviceAttributeMaxSharedMemoryPerBlock", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY", + ( + "hipDeviceAttributeTotalConstantMemory", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_WARP_SIZE", + ("hipDeviceAttributeWarpSize", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAX_PITCH", + ("hipDeviceAttributeMaxPitch", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK", + ( + "hipDeviceAttributeMaxRegistersPerBlock", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_REGISTERS_PER_BLOCK", + ( + "hipDeviceAttributeMaxRegistersPerBlock", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_CLOCK_RATE", + ("hipDeviceAttributeClockRate", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT", + ( + "hipDeviceAttributeTextureAlignment", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_GPU_OVERLAP", + ( + "hipDeviceAttributeAsyncEngineCount", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT", + ( + "hipDeviceAttributeMultiprocessorCount", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT", + ( + "hipDeviceAttributeKernelExecTimeout", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_INTEGRATED", + ("hipDeviceAttributeIntegrated", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY", + ( + "hipDeviceAttributeCanMapHostMemory", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_COMPUTE_MODE", + ("hipDeviceAttributeComputeMode", CONV_TYPE, API_DRIVER), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH", + ( + "hipDeviceAttributeMaxTexture1DWidth", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH", + ( + "hipDeviceAttributeMaxTexture2DWidth", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT", + ( + "hipDeviceAttributeMaxTexture2DHeight", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH", + ( + "hipDeviceAttributeMaxTexture3DWidth", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT", + ( + "hipDeviceAttributeMaxTexture3DHeight", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH", + ( + "hipDeviceAttributeMaxTexture3DDepth", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH", + ( + "hipDeviceAttributeMaxTexture2DLayeredWidth", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT", + ( + "hipDeviceAttributeMaxTexture2DLayeredHeight", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS", + ( + "hipDeviceAttributeMaxTexture2DLayeredLayers", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_WIDTH", + ( + "hipDeviceAttributeMaxTexture2DLayeredWidth", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_HEIGHT", + ( + "hipDeviceAttributeMaxTexture2DLayeredHeight", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_NUMSLICES", + ( + "hipDeviceAttributeMaxTexture2DLayeredLayers", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_SURFACE_ALIGNMENT", + ( + "hipDeviceAttributeSurfaceAlignment", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS", + ("hipDeviceAttributeConcurrentKernels", CONV_TYPE, API_DRIVER), + ), + ( + "CU_DEVICE_ATTRIBUTE_ECC_ENABLED", + ("hipDeviceAttributeEccEnabled", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_DEVICE_ATTRIBUTE_PCI_BUS_ID", + ("hipDeviceAttributePciBusId", CONV_TYPE, API_DRIVER), + ), + ( + "CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID", + ("hipDeviceAttributePciDeviceId", CONV_TYPE, API_DRIVER), + ), + ( + "CU_DEVICE_ATTRIBUTE_TCC_DRIVER", + ("hipDeviceAttributeTccDriver", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE", + ( + "hipDeviceAttributeMemoryClockRate", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH", + ("hipDeviceAttributeMemoryBusWidth", CONV_TYPE, API_DRIVER), + ), + ( + "CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE", + ("hipDeviceAttributeL2CacheSize", CONV_TYPE, API_DRIVER), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR", + ("hipDeviceAttributeMaxThreadsPerMultiProcessor", CONV_TYPE, API_DRIVER), + ), + ( + "CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT", + ( + "hipDeviceAttributeAsyncEngineCount", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING", + ( + "hipDeviceAttributeUnifiedAddressing", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH", + ( + "hipDeviceAttributeMaxTexture1DLayeredWidth", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS", + ( + "hipDeviceAttributeMaxTexture1DLayeredLayers", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_CAN_TEX2D_GATHER", + ( + "hipDeviceAttributeCanTex2DGather", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH", + ( + "hipDeviceAttributeMaxTexture2DGatherWidth", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT", + ( + "hipDeviceAttributeMaxTexture2DGatherHeight", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE", + ( + "hipDeviceAttributeMaxTexture3DWidthAlternate", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE", + ( + "hipDeviceAttributeMaxTexture3DHeightAlternate", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE", + ( + "hipDeviceAttributeMaxTexture3DDepthAlternate", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID", + ("hipDeviceAttributePciDomainId", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT", + ( + "hipDeviceAttributeTexturePitchAlignment", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH", + ( + "hipDeviceAttributeMaxTextureCubemapWidth", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH", + ( + "hipDeviceAttributeMaxTextureCubemapLayeredWidth", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS", + ( + "hipDeviceAttributeMaxTextureCubemapLayeredLayers", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH", + ( + "hipDeviceAttributeMaxSurface1DWidth", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH", + ( + "hipDeviceAttributeMaxSurface2DWidth", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT", + ( + "hipDeviceAttributeMaxSurface2DHeight", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH", + ( + "hipDeviceAttributeMaxSurface3DWidth", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT", + ( + "hipDeviceAttributeMaxSurface3DHeight", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH", + ( + "hipDeviceAttributeMaxSurface3DDepth", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH", + ( + "hipDeviceAttributeMaxSurface1DLayeredWidth", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS", + ( + "hipDeviceAttributeMaxSurface1DLayeredLayers", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH", + ( + "hipDeviceAttributeMaxSurface2DLayeredWidth", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT", + ( + "hipDeviceAttributeMaxSurface2DLayeredHeight", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS", + ( + "hipDeviceAttributeMaxSurface2DLayeredLayers", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH", + ( + "hipDeviceAttributeMaxSurfaceCubemapWidth", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH", + ( + "hipDeviceAttributeMaxSurfaceCubemapLayeredWidth", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS", + ( + "hipDeviceAttributeMaxSurfaceCubemapLayeredLayers", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH", + ( + "hipDeviceAttributeMaxTexture1DLinearWidth", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH", + ( + "hipDeviceAttributeMaxTexture2DLinearWidth", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT", + ( + "hipDeviceAttributeMaxTexture2DLinearHeight", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH", + ( + "hipDeviceAttributeMaxTexture2DLinearPitch", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH", + ( + "hipDeviceAttributeMaxTexture2DMipmappedWidth", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT", + ( + "hipDeviceAttributeMaxTexture2DMipmappedHeight", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR", + ("hipDeviceAttributeComputeCapabilityMajor", CONV_TYPE, API_DRIVER), + ), + ( + "CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR", + ("hipDeviceAttributeComputeCapabilityMinor", CONV_TYPE, API_DRIVER), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH", + ( + "hipDeviceAttributeMaxTexture1DMipmappedWidth", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_STREAM_PRIORITIES_SUPPORTED", + ( + "hipDeviceAttributeStreamPrioritiesSupported", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CACHE_SUPPORTED", + ( + "hipDeviceAttributeGlobalL1CacheSupported", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_LOCAL_L1_CACHE_SUPPORTED", + ( + "hipDeviceAttributeLocalL1CacheSupported", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR", + ( + "hipDeviceAttributeMaxSharedMemoryPerMultiprocessor", + CONV_TYPE, + API_DRIVER, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR", + ( + "hipDeviceAttributeMaxRegistersPerMultiprocessor", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY", + ("hipDeviceAttributeManagedMemory", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD", + ("hipDeviceAttributeIsMultiGpuBoard", CONV_TYPE, API_DRIVER), + ), + ( + "CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID", + ( + "hipDeviceAttributeMultiGpuBoardGroupId", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED", + ( + "hipDeviceAttributeHostNativeAtomicSupported", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO", + ( + "hipDeviceAttributeSingleToDoublePrecisionPerfRatio", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS", + ( + "hipDeviceAttributePageableMemoryAccess", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS", + ( + "hipDeviceAttributeConcurrentManagedAccess", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED", + ( + "hipDeviceAttributeComputePreemptionSupported", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM", + ( + "hipDeviceAttributeCanUseHostPointerForRegisteredMem", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_ATTRIBUTE_MAX", + ("hipDeviceAttributeMax", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_POINTER_ATTRIBUTE_CONTEXT", + ("hipPointerAttributeContext", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_POINTER_ATTRIBUTE_MEMORY_TYPE", + ("hipPointerAttributeMemoryType", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_POINTER_ATTRIBUTE_DEVICE_POINTER", + ( + "hipPointerAttributeDevicePointer", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_POINTER_ATTRIBUTE_HOST_POINTER", + ("hipPointerAttributeHostPointer", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_POINTER_ATTRIBUTE_P2P_TOKENS", + ("hipPointerAttributeP2pTokens", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_POINTER_ATTRIBUTE_SYNC_MEMOPS", + ("hipPointerAttributeSyncMemops", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_POINTER_ATTRIBUTE_BUFFER_ID", + ("hipPointerAttributeBufferId", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_POINTER_ATTRIBUTE_IS_MANAGED", + ("hipPointerAttributeIsManaged", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK", + ( + "hipFuncAttributeMaxThreadsPerBlocks", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES", + ("hipFuncAttributeSharedSizeBytes", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES", + ("hipFuncAttributeMaxDynamicSharedMemorySize", CONV_TYPE, API_RUNTIME), + ), + ( + "CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES", + ("hipFuncAttributeConstSizeBytes", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES", + ("hipFuncAttributeLocalSizeBytes", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_FUNC_ATTRIBUTE_NUM_REGS", + ("hipFuncAttributeNumRegs", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_FUNC_ATTRIBUTE_PTX_VERSION", + ("hipFuncAttributePtxVersion", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_FUNC_ATTRIBUTE_BINARY_VERSION", + ("hipFuncAttributeBinaryVersion", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_FUNC_ATTRIBUTE_CACHE_MODE_CA", + ("hipFuncAttributeCacheModeCA", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_FUNC_ATTRIBUTE_MAX", + ("hipFuncAttributeMax", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE", + ("hipGraphicsMapFlagsNone", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY", + ("hipGraphicsMapFlagsReadOnly", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD", + ("hipGraphicsMapFlagsWriteDiscard", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_GRAPHICS_REGISTER_FLAGS_NONE", + ("hipGraphicsRegisterFlagsNone", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_GRAPHICS_REGISTER_FLAGS_READ_ONLY", + ( + "hipGraphicsRegisterFlagsReadOnly", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_GRAPHICS_REGISTER_FLAGS_WRITE_DISCARD", + ( + "hipGraphicsRegisterFlagsWriteDiscard", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_GRAPHICS_REGISTER_FLAGS_SURFACE_LDST", + ( + "hipGraphicsRegisterFlagsSurfaceLoadStore", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER", + ( + "hipGraphicsRegisterFlagsTextureGather", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_OCCUPANCY_DEFAULT", + ("hipOccupancyDefault", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE", + ( + "hipOccupancyDisableCachingOverride", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_FUNC_CACHE_PREFER_NONE", + ("hipFuncCachePreferNone", CONV_CACHE, API_DRIVER), + ), + ( + "CU_FUNC_CACHE_PREFER_SHARED", + ("hipFuncCachePreferShared", CONV_CACHE, API_DRIVER), + ), + ("CU_FUNC_CACHE_PREFER_L1", ("hipFuncCachePreferL1", CONV_CACHE, API_DRIVER)), + ( + "CU_FUNC_CACHE_PREFER_EQUAL", + ("hipFuncCachePreferEqual", CONV_CACHE, API_DRIVER), + ), + ( + "CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS", + ("hipIpcMemLazyEnablePeerAccess", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ("CUDA_IPC_HANDLE_SIZE", ("HIP_IPC_HANDLE_SIZE", CONV_TYPE, API_DRIVER)), + ( + "CU_JIT_CACHE_OPTION_NONE", + ("hipJitCacheModeOptionNone", CONV_JIT, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_JIT_CACHE_OPTION_CG", + ("hipJitCacheModeOptionCG", CONV_JIT, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_JIT_CACHE_OPTION_CA", + ("hipJitCacheModeOptionCA", CONV_JIT, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_PREFER_PTX", + ("hipJitFallbackPreferPtx", CONV_JIT, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_PREFER_BINARY", + ("hipJitFallbackPreferBinary", CONV_JIT, API_DRIVER, HIP_UNSUPPORTED), + ), + ("CU_JIT_MAX_REGISTERS", ("hipJitOptionMaxRegisters", CONV_JIT, API_DRIVER)), + ( + "CU_JIT_THREADS_PER_BLOCK", + ("hipJitOptionThreadsPerBlock", CONV_JIT, API_DRIVER), + ), + ("CU_JIT_WALL_TIME", ("hipJitOptionWallTime", CONV_JIT, API_DRIVER)), + ("CU_JIT_INFO_LOG_BUFFER", ("hipJitOptionInfoLogBuffer", CONV_JIT, API_DRIVER)), + ( + "CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES", + ("hipJitOptionInfoLogBufferSizeBytes", CONV_JIT, API_DRIVER), + ), + ( + "CU_JIT_ERROR_LOG_BUFFER", + ("hipJitOptionErrorLogBuffer", CONV_JIT, API_DRIVER), + ), + ( + "CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES", + ("hipJitOptionErrorLogBufferSizeBytes", CONV_JIT, API_DRIVER), + ), + ( + "CU_JIT_OPTIMIZATION_LEVEL", + ("hipJitOptionOptimizationLevel", CONV_JIT, API_DRIVER), + ), + ( + "CU_JIT_TARGET_FROM_CUCONTEXT", + ("hipJitOptionTargetFromContext", CONV_JIT, API_DRIVER), + ), + ("CU_JIT_TARGET", ("hipJitOptionTarget", CONV_JIT, API_DRIVER)), + ( + "CU_JIT_FALLBACK_STRATEGY", + ("hipJitOptionFallbackStrategy", CONV_JIT, API_DRIVER), + ), + ( + "CU_JIT_GENERATE_DEBUG_INFO", + ("hipJitOptionGenerateDebugInfo", CONV_JIT, API_DRIVER), + ), + ("CU_JIT_LOG_VERBOSE", ("hipJitOptionLogVerbose", CONV_JIT, API_DRIVER)), + ( + "CU_JIT_GENERATE_LINE_INFO", + ("hipJitOptionGenerateLineInfo", CONV_JIT, API_DRIVER), + ), + ("CU_JIT_CACHE_MODE", ("hipJitOptionCacheMode", CONV_JIT, API_DRIVER)), + ("CU_JIT_NEW_SM3X_OPT", ("hipJitOptionSm3xOpt", CONV_JIT, API_DRIVER)), + ("CU_JIT_FAST_COMPILE", ("hipJitOptionFastCompile", CONV_JIT, API_DRIVER)), + ("CU_JIT_NUM_OPTIONS", ("hipJitOptionNumOptions", CONV_JIT, API_DRIVER)), + ( + "CU_TARGET_COMPUTE_10", + ("hipJitTargetCompute10", CONV_JIT, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_TARGET_COMPUTE_11", + ("hipJitTargetCompute11", CONV_JIT, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_TARGET_COMPUTE_12", + ("hipJitTargetCompute12", CONV_JIT, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_TARGET_COMPUTE_13", + ("hipJitTargetCompute13", CONV_JIT, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_TARGET_COMPUTE_20", + ("hipJitTargetCompute20", CONV_JIT, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_TARGET_COMPUTE_21", + ("hipJitTargetCompute21", CONV_JIT, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_TARGET_COMPUTE_30", + ("hipJitTargetCompute30", CONV_JIT, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_TARGET_COMPUTE_32", + ("hipJitTargetCompute32", CONV_JIT, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_TARGET_COMPUTE_35", + ("hipJitTargetCompute35", CONV_JIT, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_TARGET_COMPUTE_37", + ("hipJitTargetCompute37", CONV_JIT, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_TARGET_COMPUTE_50", + ("hipJitTargetCompute50", CONV_JIT, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_TARGET_COMPUTE_52", + ("hipJitTargetCompute52", CONV_JIT, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_TARGET_COMPUTE_53", + ("hipJitTargetCompute53", CONV_JIT, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_TARGET_COMPUTE_60", + ("hipJitTargetCompute60", CONV_JIT, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_TARGET_COMPUTE_61", + ("hipJitTargetCompute61", CONV_JIT, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_TARGET_COMPUTE_62", + ("hipJitTargetCompute62", CONV_JIT, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_JIT_INPUT_CUBIN", + ("hipJitInputTypeBin", CONV_JIT, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_JIT_INPUT_PTX", + ("hipJitInputTypePtx", CONV_JIT, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_JIT_INPUT_FATBINARY", + ("hipJitInputTypeFatBinary", CONV_JIT, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_JIT_INPUT_OBJECT", + ("hipJitInputTypeObject", CONV_JIT, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_JIT_INPUT_LIBRARY", + ("hipJitInputTypeLibrary", CONV_JIT, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_JIT_NUM_INPUT_TYPES", + ("hipJitInputTypeNumInputTypes", CONV_JIT, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_LIMIT_STACK_SIZE", + ("hipLimitStackSize", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_LIMIT_PRINTF_FIFO_SIZE", + ("hipLimitPrintfFifoSize", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_LIMIT_MALLOC_HEAP_SIZE", + ("hipLimitMallocHeapSize", CONV_TYPE, API_DRIVER), + ), + ( + "CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH", + ("hipLimitDevRuntimeSyncDepth", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_LIMIT_DEV_RUNTIME_PENDING_LAUNCH_COUNT", + ( + "hipLimitDevRuntimePendingLaunchCount", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_LIMIT_STACK_SIZE", + ("hipLimitStackSize", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_MEM_ATTACH_GLOBAL", + ("hipMemAttachGlobal", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_MEM_ATTACH_HOST", + ("hipMemAttachHost", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_MEM_ATTACH_SINGLE", + ("hipMemAttachSingle", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_MEMORYTYPE_HOST", + ("hipMemTypeHost", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_MEMORYTYPE_DEVICE", + ("hipMemTypeDevice", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_MEMORYTYPE_ARRAY", + ("hipMemTypeArray", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_MEMORYTYPE_UNIFIED", + ("hipMemTypeUnified", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ("CU_MEMHOSTREGISTER_READ_ONLY", ("hipHostRegisterReadOnly", CONV_TYPE, API_DRIVER)), + ("CU_MEMPOOL_ATTR_RELEASE_THRESHOLD", ("hipMemPoolAttrReleaseThreshold", CONV_TYPE, API_DRIVER)), + ("CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT", ("hipMemPoolAttrReservedMemCurrent", CONV_TYPE, API_DRIVER)), + ("CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH", ("hipMemPoolAttrReservedMemHigh", CONV_TYPE, API_DRIVER)), + ( + "CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES", + ("hipMemPoolReuseAllowInternalDependencies", CONV_TYPE, API_DRIVER) + ), + ("CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC", ("hipMemPoolReuseAllowOpportunistic", CONV_TYPE, API_DRIVER)), + ( + "CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES", + ("hipMemPoolReuseFollowEventDependencies", CONV_TYPE, API_DRIVER) + ), + ("CU_MEMPOOL_ATTR_USED_MEM_CURRENT", ("hipMemPoolAttrUsedMemCurrent", CONV_TYPE, API_DRIVER)), + ("CU_MEMPOOL_ATTR_USED_MEM_HIGH", ("hipMemPoolAttrUsedMemHigh", CONV_TYPE, API_DRIVER)), + ("CU_MEM_ACCESS_FLAGS_PROT_NONE", ("hipMemAccessFlagsProtNone", CONV_TYPE, API_DRIVER)), + ("CU_MEM_ACCESS_FLAGS_PROT_READ", ("hipMemAccessFlagsProtRead", CONV_TYPE, API_DRIVER)), + ("CU_MEM_ACCESS_FLAGS_PROT_READWRITE", ("hipMemAccessFlagsProtReadWrite", CONV_TYPE, API_DRIVER)), + ("CU_MEM_ALLOCATION_TYPE_INVALID", ("hipMemAllocationTypeInvalid", CONV_TYPE, API_DRIVER)), + ("CU_MEM_ALLOCATION_TYPE_MAX", ("hipMemAllocationTypeMax", CONV_TYPE, API_DRIVER)), + ("CU_MEM_ALLOCATION_TYPE_PINNED", ("hipMemAllocationTypePinned", CONV_TYPE, API_DRIVER)), + ("CU_MEM_ALLOC_GRANULARITY_MINIMUM", ("hipMemAllocationGranularityMinimum", CONV_TYPE, API_DRIVER)), + ("CU_MEM_ALLOC_GRANULARITY_RECOMMENDED", ("hipMemAllocationGranularityRecommended", CONV_TYPE, API_DRIVER)), + ("CU_MEM_HANDLE_TYPE_GENERIC", ("hipMemHandleTypeGeneric", CONV_TYPE, API_DRIVER)), + ("CU_MEM_HANDLE_TYPE_NONE", ("hipMemHandleTypeNone", CONV_TYPE, API_DRIVER)), + ("CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR", ("hipMemHandleTypePosixFileDescriptor", CONV_TYPE, API_DRIVER)), + ("CU_MEM_HANDLE_TYPE_WIN32", ("hipMemHandleTypeWin32", CONV_TYPE, API_DRIVER)), + ("CU_MEM_HANDLE_TYPE_WIN32_KMT", ("hipMemHandleTypeWin32Kmt", CONV_TYPE, API_DRIVER)), + ("CU_MEM_LOCATION_TYPE_DEVICE", ("hipMemLocationTypeDevice", CONV_TYPE, API_DRIVER)), + ("CU_MEM_LOCATION_TYPE_INVALID", ("hipMemLocationTypeInvalid", CONV_TYPE, API_DRIVER)), + ("CU_MEM_OPERATION_TYPE_MAP", ("hipMemOperationTypeMap", CONV_TYPE, API_DRIVER)), + ("CU_MEM_OPERATION_TYPE_UNMAP", ("hipMemOperationTypeUnmap", CONV_TYPE, API_DRIVER)), + ( + "CU_RESOURCE_TYPE_ARRAY", + ("hipResourceTypeArray", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_RESOURCE_TYPE_MIPMAPPED_ARRAY", + ("hipResourceTypeMipmappedArray", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_RESOURCE_TYPE_LINEAR", + ("hipResourceTypeLinear", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_RESOURCE_TYPE_PITCH2D", + ("hipResourceTypePitch2D", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED), + ), + ("CU_RES_VIEW_FORMAT_NONE", ("hipResViewFormatNone", CONV_TEX, API_DRIVER)), + ( + "CU_RES_VIEW_FORMAT_UINT_1X8", + ("hipResViewFormatUnsignedChar1", CONV_TEX, API_DRIVER), + ), + ( + "CU_RES_VIEW_FORMAT_UINT_2X8", + ("hipResViewFormatUnsignedChar2", CONV_TEX, API_DRIVER), + ), + ( + "CU_RES_VIEW_FORMAT_UINT_4X8", + ("hipResViewFormatUnsignedChar4", CONV_TEX, API_DRIVER), + ), + ( + "CU_RES_VIEW_FORMAT_SINT_1X8", + ("hipResViewFormatSignedChar1", CONV_TEX, API_DRIVER), + ), + ( + "CU_RES_VIEW_FORMAT_SINT_2X8", + ("hipResViewFormatSignedChar2", CONV_TEX, API_DRIVER), + ), + ( + "CU_RES_VIEW_FORMAT_SINT_4X8", + ("hipResViewFormatSignedChar4", CONV_TEX, API_DRIVER), + ), + ( + "CU_RES_VIEW_FORMAT_UINT_1X16", + ("hipResViewFormatUnsignedShort1", CONV_TEX, API_DRIVER), + ), + ( + "CU_RES_VIEW_FORMAT_UINT_2X16", + ("hipResViewFormatUnsignedShort2", CONV_TEX, API_DRIVER), + ), + ( + "CU_RES_VIEW_FORMAT_UINT_4X16", + ("hipResViewFormatUnsignedShort4", CONV_TEX, API_DRIVER), + ), + ( + "CU_RES_VIEW_FORMAT_SINT_1X16", + ("hipResViewFormatSignedShort1", CONV_TEX, API_DRIVER), + ), + ( + "CU_RES_VIEW_FORMAT_SINT_2X16", + ("hipResViewFormatSignedShort2", CONV_TEX, API_DRIVER), + ), + ( + "CU_RES_VIEW_FORMAT_SINT_4X16", + ("hipResViewFormatSignedShort4", CONV_TEX, API_DRIVER), + ), + ( + "CU_RES_VIEW_FORMAT_UINT_1X32", + ("hipResViewFormatUnsignedInt1", CONV_TEX, API_DRIVER), + ), + ( + "CU_RES_VIEW_FORMAT_UINT_2X32", + ("hipResViewFormatUnsignedInt2", CONV_TEX, API_DRIVER), + ), + ( + "CU_RES_VIEW_FORMAT_UINT_4X32", + ("hipResViewFormatUnsignedInt4", CONV_TEX, API_DRIVER), + ), + ( + "CU_RES_VIEW_FORMAT_SINT_1X32", + ("hipResViewFormatSignedInt1", CONV_TEX, API_DRIVER), + ), + ( + "CU_RES_VIEW_FORMAT_SINT_2X32", + ("hipResViewFormatSignedInt2", CONV_TEX, API_DRIVER), + ), + ( + "CU_RES_VIEW_FORMAT_SINT_4X32", + ("hipResViewFormatSignedInt4", CONV_TEX, API_DRIVER), + ), + ( + "CU_RES_VIEW_FORMAT_FLOAT_1X16", + ("hipResViewFormatHalf1", CONV_TEX, API_DRIVER), + ), + ( + "CU_RES_VIEW_FORMAT_FLOAT_2X16", + ("hipResViewFormatHalf2", CONV_TEX, API_DRIVER), + ), + ( + "CU_RES_VIEW_FORMAT_FLOAT_4X16", + ("hipResViewFormatHalf4", CONV_TEX, API_DRIVER), + ), + ( + "CU_RES_VIEW_FORMAT_FLOAT_1X32", + ("hipResViewFormatFloat1", CONV_TEX, API_DRIVER), + ), + ( + "CU_RES_VIEW_FORMAT_FLOAT_2X32", + ("hipResViewFormatFloat2", CONV_TEX, API_DRIVER), + ), + ( + "CU_RES_VIEW_FORMAT_FLOAT_4X32", + ("hipResViewFormatFloat4", CONV_TEX, API_DRIVER), + ), + ( + "CU_RES_VIEW_FORMAT_UNSIGNED_BC1", + ("hipResViewFormatUnsignedBlockCompressed1", CONV_TEX, API_DRIVER), + ), + ( + "CU_RES_VIEW_FORMAT_UNSIGNED_BC2", + ("hipResViewFormatUnsignedBlockCompressed2", CONV_TEX, API_DRIVER), + ), + ( + "CU_RES_VIEW_FORMAT_UNSIGNED_BC3", + ("hipResViewFormatUnsignedBlockCompressed3", CONV_TEX, API_DRIVER), + ), + ( + "CU_RES_VIEW_FORMAT_UNSIGNED_BC4", + ("hipResViewFormatUnsignedBlockCompressed4", CONV_TEX, API_DRIVER), + ), + ( + "CU_RES_VIEW_FORMAT_SIGNED_BC4", + ("hipResViewFormatSignedBlockCompressed4", CONV_TEX, API_DRIVER), + ), + ( + "CU_RES_VIEW_FORMAT_UNSIGNED_BC5", + ("hipResViewFormatUnsignedBlockCompressed5", CONV_TEX, API_DRIVER), + ), + ( + "CU_RES_VIEW_FORMAT_SIGNED_BC5", + ("hipResViewFormatSignedBlockCompressed5", CONV_TEX, API_DRIVER), + ), + ( + "CU_RES_VIEW_FORMAT_UNSIGNED_BC6H", + ("hipResViewFormatUnsignedBlockCompressed6H", CONV_TEX, API_DRIVER), + ), + ( + "CU_RES_VIEW_FORMAT_SIGNED_BC6H", + ("hipResViewFormatSignedBlockCompressed6H", CONV_TEX, API_DRIVER), + ), + ( + "CU_RES_VIEW_FORMAT_UNSIGNED_BC7", + ("hipResViewFormatUnsignedBlockCompressed7", CONV_TEX, API_DRIVER), + ), + ( + "CU_SHARED_MEM_CONFIG_DEFAULT_BANK_SIZE", + ("hipSharedMemBankSizeDefault", CONV_TYPE, API_DRIVER), + ), + ( + "CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE", + ("hipSharedMemBankSizeFourByte", CONV_TYPE, API_DRIVER), + ), + ( + "CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE", + ("hipSharedMemBankSizeEightByte", CONV_TYPE, API_DRIVER), + ), + ("CU_STREAM_DEFAULT", ("hipStreamDefault", CONV_TYPE, API_DRIVER)), + ("CU_STREAM_NON_BLOCKING", ("hipStreamNonBlocking", CONV_TYPE, API_DRIVER)), + ( + "CU_STREAM_WAIT_VALUE_GEQ", + ("hipStreamWaitValueGeq", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_STREAM_WAIT_VALUE_EQ", + ("hipStreamWaitValueEq", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_STREAM_WAIT_VALUE_AND", + ("hipStreamWaitValueAnd", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_STREAM_WAIT_VALUE_FLUSH", + ("hipStreamWaitValueFlush", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_STREAM_WRITE_VALUE_DEFAULT", + ("hipStreamWriteValueDefault", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER", + ( + "hipStreamWriteValueNoMemoryBarrier", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_STREAM_MEM_OP_WAIT_VALUE_32", + ("hipStreamBatchMemOpWaitValue32", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_STREAM_MEM_OP_WRITE_VALUE_32", + ("hipStreamBatchMemOpWriteValue32", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES", + ( + "hipStreamBatchMemOpFlushRemoteWrites", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "cuGetErrorName", + ("hipGetErrorName", CONV_ERROR, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuGetErrorString", + ("hipDrvGetErrorString", CONV_ERROR, API_DRIVER, HIP_UNSUPPORTED), + ), + ("cuInit", ("hipInit", CONV_INIT, API_DRIVER)), + ("cuDriverGetVersion", ("hipDriverGetVersion", CONV_VERSION, API_DRIVER)), + ("cuCtxCreate", ("hipCtxCreate", CONV_CONTEXT, API_DRIVER)), + ("cuCtxCreate_v2", ("hipCtxCreate", CONV_CONTEXT, API_DRIVER)), + ("cuCtxDestroy", ("hipCtxDestroy", CONV_CONTEXT, API_DRIVER)), + ("cuCtxDestroy_v2", ("hipCtxDestroy", CONV_CONTEXT, API_DRIVER)), + ("cuCtxGetApiVersion", ("hipCtxGetApiVersion", CONV_CONTEXT, API_DRIVER)), + ("cuCtxGetCacheConfig", ("hipCtxGetCacheConfig", CONV_CONTEXT, API_DRIVER)), + ("cuCtxGetCurrent", ("hipCtxGetCurrent", CONV_CONTEXT, API_DRIVER)), + ("cuCtxGetDevice", ("hipCtxGetDevice", CONV_CONTEXT, API_DRIVER)), + ("cuCtxGetFlags", ("hipCtxGetFlags", CONV_CONTEXT, API_DRIVER)), + ("cuDeviceGetUuid", ("hipDeviceGetUuid", CONV_CONTEXT, API_DRIVER)), + ( + "cuCtxGetLimit", + ("hipCtxGetLimit", CONV_CONTEXT, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuCtxGetSharedMemConfig", + ("hipCtxGetSharedMemConfig", CONV_CONTEXT, API_DRIVER), + ), + ( + "cuCtxGetStreamPriorityRange", + ("hipCtxGetStreamPriorityRange", CONV_CONTEXT, API_DRIVER, HIP_UNSUPPORTED), + ), + ("cuCtxPopCurrent_v2", ("hipCtxPopCurrent", CONV_CONTEXT, API_DRIVER)), + ("cuCtxPushCurrent_v2", ("hipCtxPushCurrent", CONV_CONTEXT, API_DRIVER)), + ("cuCtxSetCacheConfig", ("hipCtxSetCacheConfig", CONV_CONTEXT, API_DRIVER)), + ("cuCtxSetCurrent", ("hipCtxSetCurrent", CONV_CONTEXT, API_DRIVER)), + ( + "cuCtxSetLimit", + ("hipCtxSetLimit", CONV_CONTEXT, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuCtxSetSharedMemConfig", + ("hipCtxSetSharedMemConfig", CONV_CONTEXT, API_DRIVER), + ), + ("cuCtxSynchronize", ("hipCtxSynchronize", CONV_CONTEXT, API_DRIVER)), + ("cuCtxAttach", ("hipCtxAttach", CONV_CONTEXT, API_DRIVER, HIP_UNSUPPORTED)), + ("cuCtxDetach", ("hipCtxDetach", CONV_CONTEXT, API_DRIVER, HIP_UNSUPPORTED)), + ("cuCtxEnablePeerAccess", ("hipCtxEnablePeerAccess", CONV_PEER, API_DRIVER)), + ("cuCtxDisablePeerAccess", ("hipCtxDisablePeerAccess", CONV_PEER, API_DRIVER)), + ("cuDeviceCanAccessPeer", ("hipDeviceCanAccessPeer", CONV_PEER, API_DRIVER)), + ( + "cuDeviceGetP2PAttribute", + ("hipDeviceGetP2PAttribute", CONV_PEER, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuDevicePrimaryCtxGetState", + ("hipDevicePrimaryCtxGetState", CONV_CONTEXT, API_DRIVER), + ), + ( + "cuDevicePrimaryCtxRelease", + ("hipDevicePrimaryCtxRelease", CONV_CONTEXT, API_DRIVER), + ), + ( + "cuDevicePrimaryCtxReset", + ("hipDevicePrimaryCtxReset", CONV_CONTEXT, API_DRIVER), + ), + ( + "cuDevicePrimaryCtxRetain", + ("hipDevicePrimaryCtxRetain", CONV_CONTEXT, API_DRIVER), + ), + ( + "cuDevicePrimaryCtxSetFlags", + ("hipDevicePrimaryCtxSetFlags", CONV_CONTEXT, API_DRIVER), + ), + ("cuDeviceGet", ("hipDeviceGet", CONV_DEVICE, API_DRIVER)), + ("cuDeviceGetName", ("hipDeviceGetName", CONV_DEVICE, API_DRIVER)), + ("cuDeviceGetCount", ("hipGetDeviceCount", CONV_DEVICE, API_DRIVER)), + ("cuDeviceGetAttribute", ("hipDeviceGetAttribute", CONV_DEVICE, API_DRIVER)), + ("cuDeviceGetPCIBusId", ("hipDeviceGetPCIBusId", CONV_DEVICE, API_DRIVER)), + ("cuDeviceGetByPCIBusId", ("hipDeviceGetByPCIBusId", CONV_DEVICE, API_DRIVER)), + ("cuDeviceTotalMem_v2", ("hipDeviceTotalMem", CONV_DEVICE, API_DRIVER)), + ( + "cuDeviceComputeCapability", + ("hipDeviceComputeCapability", CONV_DEVICE, API_DRIVER), + ), + ("cuDeviceGetProperties", ("hipGetDeviceProperties", CONV_DEVICE, API_DRIVER)), + ("cuLinkAddData", ("hipLinkAddData", CONV_MODULE, API_DRIVER, HIP_UNSUPPORTED)), + ("cuLinkAddFile", ("hipLinkAddFile", CONV_MODULE, API_DRIVER, HIP_UNSUPPORTED)), + ( + "cuLinkComplete", + ("hipLinkComplete", CONV_MODULE, API_DRIVER, HIP_UNSUPPORTED), + ), + ("cuLinkCreate", ("hipLinkCreate", CONV_MODULE, API_DRIVER, HIP_UNSUPPORTED)), + ("cuLinkDestroy", ("hipLinkDestroy", CONV_MODULE, API_DRIVER, HIP_UNSUPPORTED)), + ("cuModuleGetFunction", ("hipModuleGetFunction", CONV_MODULE, API_DRIVER)), + ("cuModuleGetGlobal_v2", ("hipModuleGetGlobal", CONV_MODULE, API_DRIVER)), + ( + "cuModuleGetSurfRef", + ("hipModuleGetSurfRef", CONV_MODULE, API_DRIVER, HIP_UNSUPPORTED), + ), + ("cuModuleGetTexRef", ("hipModuleGetTexRef", CONV_MODULE, API_DRIVER)), + ("cuModuleLoad", ("hipModuleLoad", CONV_MODULE, API_DRIVER)), + ("cuModuleLoadData", ("hipModuleLoadData", CONV_MODULE, API_DRIVER)), + ("cuModuleLoadDataEx", ("hipModuleLoadDataEx", CONV_MODULE, API_DRIVER)), + ( + "cuModuleLoadFatBinary", + ("hipModuleLoadFatBinary", CONV_MODULE, API_DRIVER, HIP_UNSUPPORTED), + ), + ("cuModuleUnload", ("hipModuleUnload", CONV_MODULE, API_DRIVER)), + ( + "CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK", + ( + "hipDeviceP2PAttributePerformanceRank", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED", + ( + "hipDeviceP2PAttributeAccessSupported", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED", + ( + "hipDeviceP2PAttributeNativeAtomicSupported", + CONV_TYPE, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ("CU_EVENT_DEFAULT", ("hipEventDefault", CONV_EVENT, API_DRIVER)), + ("CU_EVENT_BLOCKING_SYNC", ("hipEventBlockingSync", CONV_EVENT, API_DRIVER)), + ("CU_EVENT_DISABLE_TIMING", ("hipEventDisableTiming", CONV_EVENT, API_DRIVER)), + ("CU_EVENT_INTERPROCESS", ("hipEventInterprocess", CONV_EVENT, API_DRIVER)), + ("cuEventCreate", ("hipEventCreate", CONV_EVENT, API_DRIVER)), + ("cuEventDestroy", ("hipEventDestroy", CONV_EVENT, API_DRIVER)), + ("cuEventDestroy_v2", ("hipEventDestroy", CONV_EVENT, API_DRIVER)), + ("cuEventElapsedTime", ("hipEventElapsedTime", CONV_EVENT, API_DRIVER)), + ("cuEventQuery", ("hipEventQuery", CONV_EVENT, API_DRIVER)), + ("cuEventRecord", ("hipEventRecord", CONV_EVENT, API_DRIVER)), + ("cuEventSynchronize", ("hipEventSynchronize", CONV_EVENT, API_DRIVER)), + ("cuFuncSetAttribute", ("hipFuncSetAttribute", CONV_EVENT, API_DRIVER)), + ( + "cuFuncGetAttribute", + ("hipFuncGetAttribute", CONV_MODULE, API_DRIVER, HIP_UNSUPPORTED), + ), + ("cuFuncSetCacheConfig", ("hipFuncSetCacheConfig", CONV_MODULE, API_DRIVER)), + ( + "cuFuncSetSharedMemConfig", + ("hipFuncSetSharedMemConfig", CONV_MODULE, API_DRIVER, HIP_UNSUPPORTED), + ), + ("cuLaunchKernel", ("hipModuleLaunchKernel", CONV_MODULE, API_DRIVER)), + ( + "cuFuncSetBlockShape", + ("hipFuncSetBlockShape", CONV_MODULE, API_DRIVER, HIP_UNSUPPORTED), + ), + ("cudaLaunchKernel", ("hipLaunchKernel", CONV_MODULE, API_DRIVER)), + ( + "cuFuncSetSharedSize", + ("hipFuncSetSharedSize", CONV_MODULE, API_DRIVER, HIP_UNSUPPORTED), + ), + ("cuLaunch", ("hipLaunch", CONV_MODULE, API_DRIVER, HIP_UNSUPPORTED)), + ("cuLaunchGrid", ("hipLaunchGrid", CONV_MODULE, API_DRIVER, HIP_UNSUPPORTED)), + ( + "cuLaunchGridAsync", + ("hipLaunchGridAsync", CONV_MODULE, API_DRIVER, HIP_UNSUPPORTED), + ), + ("cuParamSetf", ("hipParamSetf", CONV_MODULE, API_DRIVER, HIP_UNSUPPORTED)), + ("cuParamSeti", ("hipParamSeti", CONV_MODULE, API_DRIVER, HIP_UNSUPPORTED)), + ( + "cuParamSetSize", + ("hipParamSetSize", CONV_MODULE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuParamSetSize", + ("hipParamSetSize", CONV_MODULE, API_DRIVER, HIP_UNSUPPORTED), + ), + ("cuParamSetv", ("hipParamSetv", CONV_MODULE, API_DRIVER, HIP_UNSUPPORTED)), + ( + "cuOccupancyMaxActiveBlocksPerMultiprocessor", + ( + "hipModuleOccupancyMaxActiveBlocksPerMultiprocessor", + CONV_OCCUPANCY, + API_DRIVER, + ), + ), + ( + "cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", + ( + "hipModuleOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", + CONV_OCCUPANCY, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "cuOccupancyMaxPotentialBlockSize", + ("hipModuleOccupancyMaxPotentialBlockSize", CONV_OCCUPANCY, API_DRIVER), + ), + ( + "cuOccupancyMaxPotentialBlockSizeWithFlags", + ( + "hipModuleOccupancyMaxPotentialBlockSizeWithFlags", + CONV_OCCUPANCY, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ("cuStreamAddCallback", ("hipStreamAddCallback", CONV_STREAM, API_DRIVER)), + ( + "cuStreamAttachMemAsync", + ("hipStreamAttachMemAsync", CONV_STREAM, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuStreamCreate", + ("hipStreamCreate__", CONV_STREAM, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuStreamCreateWithPriority", + ("hipStreamCreateWithPriority", CONV_STREAM, API_DRIVER, HIP_UNSUPPORTED), + ), + ("cuStreamDestroy", ("hipStreamDestroy", CONV_STREAM, API_DRIVER)), + ("cuStreamDestroy_v2", ("hipStreamDestroy", CONV_STREAM, API_DRIVER)), + ("cuStreamGetFlags", ("hipStreamGetFlags", CONV_STREAM, API_DRIVER)), + ( + "cuStreamGetPriority", + ("hipStreamGetPriority", CONV_STREAM, API_DRIVER, HIP_UNSUPPORTED), + ), + ("cuStreamQuery", ("hipStreamQuery", CONV_STREAM, API_DRIVER)), + ("cuStreamSynchronize", ("hipStreamSynchronize", CONV_STREAM, API_DRIVER)), + ("cuStreamWaitEvent", ("hipStreamWaitEvent", CONV_STREAM, API_DRIVER)), + ( + "cuStreamWaitValue32", + ("hipStreamWaitValue32", CONV_STREAM, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuStreamWriteValue32", + ("hipStreamWriteValue32", CONV_STREAM, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuStreamBatchMemOp", + ("hipStreamBatchMemOp", CONV_STREAM, API_DRIVER, HIP_UNSUPPORTED), + ), + ("cuArray3DCreate", ("hipArray3DCreate", CONV_MEM, API_DRIVER)), + ( + "cuArray3DGetDescriptor", + ("hipArray3DGetDescriptor", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED), + ), + ("cuArrayCreate", ("hipArrayCreate", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED)), + ("cuArrayDestroy", ("hipArrayDestroy", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED)), + ( + "cuArrayGetDescriptor", + ("hipArrayGetDescriptor", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuIpcCloseMemHandle", + ("hipIpcCloseMemHandle", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuIpcGetEventHandle", + ("hipIpcGetEventHandle", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuIpcGetMemHandle", + ("hipIpcGetMemHandle", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuIpcOpenEventHandle", + ("hipIpcOpenEventHandle", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuIpcOpenMemHandle", + ("hipIpcOpenMemHandle", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED), + ), + ("cuMemAlloc_v2", ("hipMalloc", CONV_MEM, API_DRIVER)), + ("cuMemAllocHost", ("hipMemAllocHost", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED)), + ( + "cuMemAllocManaged", + ("hipMemAllocManaged", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuMemAllocPitch", + ("hipMemAllocPitch__", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED), + ), + ("cuMemcpy", ("hipMemcpy__", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED)), + ("cuMemcpy2D", ("hipMemcpy2D__", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED)), + ( + "cuMemcpy2DAsync", + ("hipMemcpy2DAsync__", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuMemcpy2DUnaligned", + ("hipMemcpy2DUnaligned", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED), + ), + ("cuMemcpy3D", ("hipMemcpy3D__", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED)), + ( + "cuMemcpy3DAsync", + ("hipMemcpy3DAsync__", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuMemcpy3DPeer", + ("hipMemcpy3DPeer__", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuMemcpy3DPeerAsync", + ("hipMemcpy3DPeerAsync__", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED), + ), + ("cuMemcpyAsync", ("hipMemcpyAsync__", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED)), + ("cuMemcpyAtoA", ("hipMemcpyAtoA", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED)), + ("cuMemcpyAtoD", ("hipMemcpyAtoD", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED)), + ("cuMemcpyAtoH", ("hipMemcpyAtoH", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED)), + ( + "cuMemcpyAtoHAsync", + ("hipMemcpyAtoHAsync", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED), + ), + ("cuMemcpyDtoA", ("hipMemcpyDtoA", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED)), + ("cuMemcpyDtoD_v2", ("hipMemcpyDtoD", CONV_MEM, API_DRIVER)), + ("cuMemcpyDtoDAsync_v2", ("hipMemcpyDtoDAsync", CONV_MEM, API_DRIVER)), + ("cuMemcpyDtoH_v2", ("hipMemcpyDtoH", CONV_MEM, API_DRIVER)), + ("cuMemcpyDtoHAsync_v2", ("hipMemcpyDtoHAsync", CONV_MEM, API_DRIVER)), + ("cuMemcpyHtoA", ("hipMemcpyHtoA", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED)), + ( + "cuMemcpyHtoAAsync", + ("hipMemcpyHtoAAsync", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED), + ), + ("cuMemcpyHtoD_v2", ("hipMemcpyHtoD", CONV_MEM, API_DRIVER)), + ("cuMemcpyHtoDAsync_v2", ("hipMemcpyHtoDAsync", CONV_MEM, API_DRIVER)), + ( + "cuMemcpyPeerAsync", + ("hipMemcpyPeerAsync__", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED), + ), + ("cuMemcpyPeer", ("hipMemcpyPeer__", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED)), + ("cuMemFree", ("hipFree", CONV_MEM, API_DRIVER)), + ("cuMemFree_v2", ("hipFree", CONV_MEM, API_DRIVER)), + ("cuMemFreeHost", ("hipHostFree", CONV_MEM, API_DRIVER)), + ( + "cuMemGetAddressRange", + ("hipMemGetAddressRange", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED), + ), + ("cuMemGetInfo_v2", ("hipMemGetInfo", CONV_MEM, API_DRIVER)), + ("cuMemHostAlloc", ("hipHostMalloc", CONV_MEM, API_DRIVER)), + ( + "cuMemHostGetDevicePointer", + ("hipMemHostGetDevicePointer", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuMemHostGetFlags", + ("hipMemHostGetFlags", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED), + ), + ("cuMemHostRegister_v2", ("hipHostRegister", CONV_MEM, API_DRIVER)), + ("cuMemHostUnregister", ("hipHostUnregister", CONV_MEM, API_DRIVER)), + ("cuMemsetD16_v2", ("hipMemsetD16", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED)), + ( + "cuMemsetD16Async", + ("hipMemsetD16Async", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED), + ), + ("cuMemsetD2D16_v2", ("hipMemsetD2D16", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED)), + ( + "cuMemsetD2D16Async", + ("hipMemsetD2D16Async", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED), + ), + ("cuMemsetD2D32_v2", ("hipMemsetD2D32", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED)), + ( + "cuMemsetD2D32Async", + ("hipMemsetD2D32Async", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED), + ), + ("cuMemsetD2D8_v2", ("hipMemsetD2D8", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED)), + ( + "cuMemsetD2D8Async", + ("hipMemsetD2D8Async", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED), + ), + ("cuMemsetD32_v2", ("hipMemset", CONV_MEM, API_DRIVER)), + ("cuMemsetD32Async", ("hipMemsetAsync", CONV_MEM, API_DRIVER)), + ("cuMemsetD8_v2", ("hipMemsetD8", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED)), + ( + "cuMemsetD8Async", + ("hipMemsetD8Async", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuMipmappedArrayCreate", + ("hipMipmappedArrayCreate", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuMipmappedArrayDestroy", + ("hipMipmappedArrayDestroy", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuMipmappedArrayGetLevel", + ("hipMipmappedArrayGetLevel", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuMemPrefetchAsync", + ("hipMemPrefetchAsync__", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED), + ), + ("cuMemAdvise", ("hipMemAdvise", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED)), + ( + "cuMemRangeGetAttribute", + ("hipMemRangeGetAttribute", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuMemRangeGetAttributes", + ("hipMemRangeGetAttributes", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuPointerGetAttribute", + ("hipPointerGetAttribute", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuMemGetAddressRange_v2", + ("hipMemGetAddressRange", CONV_MEM, API_DRIVER), + ), + ("cuArray3DCreate_v2", ("hipArray3DCreate", CONV_MEM, API_DRIVER)), + ("cuArray3DGetDescriptor_v2", ("hipArray3DGetDescriptor", CONV_MEM, API_DRIVER)), + ("cuArrayGetDescriptor_v2", ("hipArrayGetDescriptor", CONV_MEM, API_DRIVER)), + ("cuMemAlloc", ("hipMalloc", CONV_MEM, API_DRIVER)), + ("cuMemAllocHost_v2", ("hipMemAllocHost", CONV_MEM, API_DRIVER)), + ("cuMemAllocPitch_v2", ("hipMemAllocPitch", CONV_MEM, API_DRIVER)), + ("cuMemGetInfo", ("hipMemGetInfo", CONV_MEM, API_DRIVER)), + ("cuMemHostGetDevicePointer_v2", ("hipHostGetDevicePointer", CONV_MEM, API_DRIVER)), + ("cuMemHostRegister", ("hipHostRegister", CONV_MEM, API_DRIVER)), + ("cuMemcpy2DAsync_v2", ("hipMemcpyParam2DAsync", CONV_MEM, API_DRIVER)), + ("cuMemcpy2DUnaligned_v2", ("hipDrvMemcpy2DUnaligned", CONV_MEM, API_DRIVER)), + ("cuMemcpy2D_v2", ("hipMemcpyParam2D", CONV_MEM, API_DRIVER)), + ("cuMemcpy3DAsync_v2", ("hipDrvMemcpy3DAsync", CONV_MEM, API_DRIVER)), + ("cuMemcpy3D_v2", ("hipDrvMemcpy3D", CONV_MEM, API_DRIVER)), + ("cuMemcpyAtoA_v2", ("hipMemcpyAtoA", CONV_MEM, API_DRIVER)), + ("cuMemcpyAtoD_v2", ("hipMemcpyAtoD", CONV_MEM, API_DRIVER)), + ("cuMemcpyAtoHAsync_v2", ("hipMemcpyAtoHAsync", CONV_MEM, API_DRIVER)), + ("cuMemcpyAtoH_v2", ("hipMemcpyAtoH", CONV_MEM, API_DRIVER)), + ("cuMemcpyDtoA_v2", ("hipMemcpyDtoA", CONV_MEM, API_DRIVER)), + ("cuMemcpyDtoD", ("hipMemcpyDtoD", CONV_MEM, API_DRIVER)), + ("cuMemcpyDtoDAsync", ("hipMemcpyDtoDAsync", CONV_MEM, API_DRIVER)), + ("cuMemcpyDtoH", ("hipMemcpyDtoH", CONV_MEM, API_DRIVER)), + ("cuMemcpyDtoHAsync", ("hipMemcpyDtoHAsync", CONV_MEM, API_DRIVER)), + ("cuMemcpyHtoA_v2", ("hipMemcpyHtoA", CONV_MEM, API_DRIVER)), + ("cuMemcpyHtoD", ("hipMemcpyHtoD", CONV_MEM, API_DRIVER)), + ("cuMemcpyHtoDAsync", ("hipMemcpyHtoDAsync", CONV_MEM, API_DRIVER)), + ("cuMemsetD16", ("hipMemsetD16", CONV_MEM, API_DRIVER)), + ("cuMemsetD32", ("hipMemsetD32", CONV_MEM, API_DRIVER)), + ("cuMemsetD8", ("hipMemsetD8", CONV_MEM, API_DRIVER)), + ("cuMemAddressFree", ("hipMemAddressFree", CONV_MEM, API_DRIVER)), + ("cuMemAddressReserve", ("hipMemAddressReserve", CONV_MEM, API_DRIVER)), + ("cuMemCreate", ("hipMemCreate", CONV_MEM, API_DRIVER)), + ("cuMemExportToShareableHandle", ("hipMemExportToShareableHandle", CONV_MEM, API_DRIVER)), + ("cuMemGetAccess", ("hipMemGetAccess", CONV_MEM, API_DRIVER)), + ("cuMemGetAllocationGranularity", ("hipMemGetAllocationGranularity", CONV_MEM, API_DRIVER)), + ("cuMemGetAllocationPropertiesFromHandle", ("hipMemGetAllocationPropertiesFromHandle", CONV_MEM, API_DRIVER)), + ("cuMemImportFromShareableHandle", ("hipMemImportFromShareableHandle", CONV_MEM, API_DRIVER)), + ("cuMemMap", ("hipMemMap", CONV_MEM, API_DRIVER)), + ("cuMemMapArrayAsync", ("hipMemMapArrayAsync", CONV_MEM, API_DRIVER)), + ("cuMemRelease", ("hipMemRelease", CONV_MEM, API_DRIVER)), + ("cuMemRetainAllocationHandle", ("hipMemRetainAllocationHandle", CONV_MEM, API_DRIVER)), + ("cuMemSetAccess", ("hipMemSetAccess", CONV_MEM, API_DRIVER)), + ("cuMemUnmap", ("hipMemUnmap", CONV_MEM, API_DRIVER)), + ("cuMemAllocAsync", ("hipMallocAsync", CONV_MEM, API_DRIVER)), + ("cuMemAllocFromPoolAsync", ("hipMallocFromPoolAsync", CONV_MEM, API_DRIVER)), + ("cuMemFreeAsync", ("hipFreeAsync", CONV_MEM, API_DRIVER)), + ("cuMemPoolCreate", ("hipMemPoolCreate", CONV_MEM, API_DRIVER)), + ("cuMemPoolDestroy", ("hipMemPoolDestroy", CONV_MEM, API_DRIVER)), + ("cuMemPoolExportPointer", ("hipMemPoolExportPointer", CONV_MEM, API_DRIVER)), + ("cuMemPoolExportToShareableHandle", ("hipMemPoolExportToShareableHandle", CONV_MEM, API_DRIVER)), + ("cuMemPoolGetAccess", ("hipMemPoolGetAccess", CONV_MEM, API_DRIVER)), + ("cuMemPoolGetAttribute", ("hipMemPoolGetAttribute", CONV_MEM, API_DRIVER)), + ("cuMemPoolImportFromShareableHandle", ("hipMemPoolImportFromShareableHandle", CONV_MEM, API_DRIVER)), + ("cuMemPoolImportPointer", ("hipMemPoolImportPointer", CONV_MEM, API_DRIVER)), + ("cuMemPoolSetAccess", ("hipMemPoolSetAccess", CONV_MEM, API_DRIVER)), + ("cuMemPoolSetAttribute", ("hipMemPoolSetAttribute", CONV_MEM, API_DRIVER)), + ("cuMemPoolTrimTo", ("hipMemPoolTrimTo", CONV_MEM, API_DRIVER)), + ( + "cuPointerGetAttributes", + ("hipPointerGetAttributes", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuPointerSetAttribute", + ("hipPointerSetAttribute", CONV_MEM, API_DRIVER, HIP_UNSUPPORTED), + ), + ("CU_TR_FILTER_MODE_POINT", ("hipFilterModePoint", CONV_TEX, API_DRIVER)), + ( + "CU_TR_FILTER_MODE_LINEAR", + ("hipFilterModeLinear", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuTexRefGetAddress", + ("hipTexRefGetAddress", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuTexRefGetAddressMode", + ("hipTexRefGetAddressMode", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuTexRefGetArray", + ("hipTexRefGetArray", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuTexRefGetBorderColor", + ("hipTexRefGetBorderColor", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuTexRefGetFilterMode", + ("hipTexRefGetFilterMode", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuTexRefGetFlags", + ("hipTexRefGetFlags", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuTexRefGetFormat", + ("hipTexRefGetFormat", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuTexRefGetMaxAnisotropy", + ("hipTexRefGetMaxAnisotropy", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuTexRefGetMipmapFilterMode", + ("hipTexRefGetMipmapFilterMode", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuTexRefGetMipmapLevelBias", + ("hipTexRefGetMipmapLevelBias", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuTexRefGetMipmapLevelClamp", + ("hipTexRefGetMipmapLevelClamp", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuTexRefGetMipmappedArray", + ("hipTexRefGetMipmappedArray", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuTexRefSetAddress", + ("hipTexRefSetAddress", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuTexRefSetAddress2D", + ("hipTexRefSetAddress2D", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED), + ), + ("cuTexRefSetAddressMode", ("hipTexRefSetAddressMode", CONV_TEX, API_DRIVER)), + ("cuTexRefSetArray", ("hipTexRefSetArray", CONV_TEX, API_DRIVER)), + ( + "cuTexRefSetBorderColor", + ("hipTexRefSetBorderColor", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED), + ), + ("cuTexRefSetFilterMode", ("hipTexRefSetFilterMode", CONV_TEX, API_DRIVER)), + ("cuTexRefSetFlags", ("hipTexRefSetFlags", CONV_TEX, API_DRIVER)), + ("cuTexRefSetFormat", ("hipTexRefSetFormat", CONV_TEX, API_DRIVER)), + ( + "cuTexRefSetMaxAnisotropy", + ("hipTexRefSetMaxAnisotropy", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuTexRefSetMipmapFilterMode", + ("hipTexRefSetMipmapFilterMode", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuTexRefSetMipmapLevelBias", + ("hipTexRefSetMipmapLevelBias", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuTexRefSetMipmapLevelClamp", + ("hipTexRefSetMipmapLevelClamp", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuTexRefSetMipmappedArray", + ("hipTexRefSetMipmappedArray", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED), + ), + ("cuTexRefCreate", ("hipTexRefCreate", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED)), + ( + "cuTexRefDestroy", + ("hipTexRefDestroy", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuSurfRefGetArray", + ("hipSurfRefGetArray", CONV_SURFACE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuSurfRefSetArray", + ("hipSurfRefSetArray", CONV_SURFACE, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuTexObjectCreate", + ("hipTexObjectCreate", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuTexObjectDestroy", + ("hipTexObjectDestroy", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuTexObjectGetResourceDesc", + ("hipTexObjectGetResourceDesc", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuTexObjectGetResourceViewDesc", + ("hipTexObjectGetResourceViewDesc", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuTexObjectGetTextureDesc", + ("hipTexObjectGetTextureDesc", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuSurfObjectCreate", + ("hipSurfObjectCreate", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuSurfObjectDestroy", + ("hipSurfObjectDestroy", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuSurfObjectGetResourceDesc", + ("hipSurfObjectGetResourceDesc", CONV_TEX, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuGraphicsMapResources", + ("hipGraphicsMapResources", CONV_GRAPHICS, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuGraphicsResourceGetMappedMipmappedArray", + ( + "hipGraphicsResourceGetMappedMipmappedArray", + CONV_GRAPHICS, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "cuGraphicsResourceGetMappedPointer", + ( + "hipGraphicsResourceGetMappedPointer", + CONV_GRAPHICS, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "cuGraphicsResourceSetMapFlags", + ( + "hipGraphicsResourceSetMapFlags", + CONV_GRAPHICS, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "cuGraphicsSubResourceGetMappedArray", + ( + "hipGraphicsSubResourceGetMappedArray", + CONV_GRAPHICS, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "cuGraphicsUnmapResources", + ("hipGraphicsUnmapResources", CONV_GRAPHICS, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuGraphicsUnregisterResource", + ( + "hipGraphicsUnregisterResource", + CONV_GRAPHICS, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "cuProfilerInitialize", + ("hipProfilerInitialize", CONV_OTHER, API_DRIVER, HIP_UNSUPPORTED), + ), + ("cuProfilerStart", ("hipProfilerStart", CONV_OTHER, API_DRIVER)), + ("cuProfilerStop", ("hipProfilerStop", CONV_OTHER, API_DRIVER)), + ( + "CU_GL_DEVICE_LIST_ALL", + ("HIP_GL_DEVICE_LIST_ALL", CONV_GL, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_GL_DEVICE_LIST_CURRENT_FRAME", + ("HIP_GL_DEVICE_LIST_CURRENT_FRAME", CONV_GL, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_GL_DEVICE_LIST_NEXT_FRAME", + ("HIP_GL_DEVICE_LIST_NEXT_FRAME", CONV_GL, API_DRIVER, HIP_UNSUPPORTED), + ), + ("cuGLGetDevices", ("hipGLGetDevices", CONV_GL, API_DRIVER, HIP_UNSUPPORTED)), + ( + "cuGraphicsGLRegisterBuffer", + ("hipGraphicsGLRegisterBuffer", CONV_GL, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuGraphicsGLRegisterImage", + ("hipGraphicsGLRegisterImage", CONV_GL, API_DRIVER, HIP_UNSUPPORTED), + ), + ("cuWGLGetDevice", ("hipWGLGetDevice", CONV_GL, API_DRIVER, HIP_UNSUPPORTED)), + ( + "CU_GL_MAP_RESOURCE_FLAGS_NONE", + ("HIP_GL_MAP_RESOURCE_FLAGS_NONE", CONV_GL, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY", + ( + "HIP_GL_MAP_RESOURCE_FLAGS_READ_ONLY", + CONV_GL, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD", + ( + "HIP_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD", + CONV_GL, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ("cuGLCtxCreate", ("hipGLCtxCreate", CONV_GL, API_DRIVER, HIP_UNSUPPORTED)), + ("cuGLInit", ("hipGLInit", CONV_GL, API_DRIVER, HIP_UNSUPPORTED)), + ( + "cuGLMapBufferObject", + ("hipGLMapBufferObject", CONV_GL, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuGLMapBufferObjectAsync", + ("hipGLMapBufferObjectAsync", CONV_GL, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuGLRegisterBufferObject", + ("hipGLRegisterBufferObject", CONV_GL, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuGLSetBufferObjectMapFlags", + ("hipGLSetBufferObjectMapFlags", CONV_GL, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuGLUnmapBufferObject", + ("hipGLUnmapBufferObject", CONV_GL, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuGLUnmapBufferObjectAsync", + ("hipGLUnmapBufferObjectAsync", CONV_GL, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuGLUnregisterBufferObject", + ("hipGLUnregisterBufferObject", CONV_GL, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_D3D9_DEVICE_LIST_ALL", + ("HIP_D3D9_DEVICE_LIST_ALL", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_D3D9_DEVICE_LIST_CURRENT_FRAME", + ( + "HIP_D3D9_DEVICE_LIST_CURRENT_FRAME", + CONV_D3D9, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_D3D9_DEVICE_LIST_NEXT_FRAME", + ("HIP_D3D9_DEVICE_LIST_NEXT_FRAME", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuD3D9CtxCreate", + ("hipD3D9CtxCreate", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuD3D9CtxCreateOnDevice", + ("hipD3D9CtxCreateOnDevice", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuD3D9GetDevice", + ("hipD3D9GetDevice", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuD3D9GetDevices", + ("hipD3D9GetDevices", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuD3D9GetDirect3DDevice", + ("hipD3D9GetDirect3DDevice", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuGraphicsD3D9RegisterResource", + ("hipGraphicsD3D9RegisterResource", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_D3D9_MAPRESOURCE_FLAGS_NONE", + ("HIP_D3D9_MAPRESOURCE_FLAGS_NONE", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_D3D9_MAPRESOURCE_FLAGS_READONLY", + ( + "HIP_D3D9_MAPRESOURCE_FLAGS_READONLY", + CONV_D3D9, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_D3D9_MAPRESOURCE_FLAGS_WRITEDISCARD", + ( + "HIP_D3D9_MAPRESOURCE_FLAGS_WRITEDISCARD", + CONV_D3D9, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_D3D9_REGISTER_FLAGS_NONE", + ("HIP_D3D9_REGISTER_FLAGS_NONE", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_D3D9_REGISTER_FLAGS_ARRAY", + ("HIP_D3D9_REGISTER_FLAGS_ARRAY", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuD3D9MapResources", + ("hipD3D9MapResources", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuD3D9RegisterResource", + ("hipD3D9RegisterResource", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuD3D9ResourceGetMappedArray", + ("hipD3D9ResourceGetMappedArray", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuD3D9ResourceGetMappedPitch", + ("hipD3D9ResourceGetMappedPitch", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuD3D9ResourceGetMappedPointer", + ("hipD3D9ResourceGetMappedPointer", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuD3D9ResourceGetMappedSize", + ("hipD3D9ResourceGetMappedSize", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuD3D9ResourceGetSurfaceDimensions", + ( + "hipD3D9ResourceGetSurfaceDimensions", + CONV_D3D9, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "cuD3D9ResourceSetMapFlags", + ("hipD3D9ResourceSetMapFlags", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuD3D9UnmapResources", + ("hipD3D9UnmapResources", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuD3D9UnregisterResource", + ("hipD3D9UnregisterResource", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_D3D10_DEVICE_LIST_ALL", + ("HIP_D3D10_DEVICE_LIST_ALL", CONV_D3D10, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_D3D10_DEVICE_LIST_CURRENT_FRAME", + ( + "HIP_D3D10_DEVICE_LIST_CURRENT_FRAME", + CONV_D3D10, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_D3D10_DEVICE_LIST_NEXT_FRAME", + ( + "HIP_D3D10_DEVICE_LIST_NEXT_FRAME", + CONV_D3D10, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "cuD3D10GetDevice", + ("hipD3D10GetDevice", CONV_D3D10, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuD3D10GetDevices", + ("hipD3D10GetDevices", CONV_D3D10, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuGraphicsD3D10RegisterResource", + ( + "hipGraphicsD3D10RegisterResource", + CONV_D3D10, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_D3D10_MAPRESOURCE_FLAGS_NONE", + ( + "HIP_D3D10_MAPRESOURCE_FLAGS_NONE", + CONV_D3D10, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_D3D10_MAPRESOURCE_FLAGS_READONLY", + ( + "HIP_D3D10_MAPRESOURCE_FLAGS_READONLY", + CONV_D3D10, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_D3D10_MAPRESOURCE_FLAGS_WRITEDISCARD", + ( + "HIP_D3D10_MAPRESOURCE_FLAGS_WRITEDISCARD", + CONV_D3D10, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_D3D10_REGISTER_FLAGS_NONE", + ("HIP_D3D10_REGISTER_FLAGS_NONE", CONV_D3D10, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_D3D10_REGISTER_FLAGS_ARRAY", + ("HIP_D3D10_REGISTER_FLAGS_ARRAY", CONV_D3D10, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuD3D10CtxCreate", + ("hipD3D10CtxCreate", CONV_D3D10, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuD3D10CtxCreateOnDevice", + ("hipD3D10CtxCreateOnDevice", CONV_D3D10, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuD3D10GetDirect3DDevice", + ("hipD3D10GetDirect3DDevice", CONV_D3D10, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuD3D10MapResources", + ("hipD3D10MapResources", CONV_D3D10, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuD3D10RegisterResource", + ("hipD3D10RegisterResource", CONV_D3D10, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuD3D10ResourceGetMappedArray", + ("hipD3D10ResourceGetMappedArray", CONV_D3D10, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuD3D10ResourceGetMappedPitch", + ("hipD3D10ResourceGetMappedPitch", CONV_D3D10, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuD3D10ResourceGetMappedPointer", + ( + "hipD3D10ResourceGetMappedPointer", + CONV_D3D10, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "cuD3D10ResourceGetMappedSize", + ("hipD3D10ResourceGetMappedSize", CONV_D3D10, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuD3D10ResourceGetSurfaceDimensions", + ( + "hipD3D10ResourceGetSurfaceDimensions", + CONV_D3D10, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "cuD310ResourceSetMapFlags", + ("hipD3D10ResourceSetMapFlags", CONV_D3D10, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuD3D10UnmapResources", + ("hipD3D10UnmapResources", CONV_D3D10, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuD3D10UnregisterResource", + ("hipD3D10UnregisterResource", CONV_D3D10, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_D3D11_DEVICE_LIST_ALL", + ("HIP_D3D11_DEVICE_LIST_ALL", CONV_D3D11, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "CU_D3D11_DEVICE_LIST_CURRENT_FRAME", + ( + "HIP_D3D11_DEVICE_LIST_CURRENT_FRAME", + CONV_D3D11, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "CU_D3D11_DEVICE_LIST_NEXT_FRAME", + ( + "HIP_D3D11_DEVICE_LIST_NEXT_FRAME", + CONV_D3D11, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "cuD3D11GetDevice", + ("hipD3D11GetDevice", CONV_D3D11, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuD3D11GetDevices", + ("hipD3D11GetDevices", CONV_D3D11, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuGraphicsD3D11RegisterResource", + ( + "hipGraphicsD3D11RegisterResource", + CONV_D3D11, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "cuD3D11CtxCreate", + ("hipD3D11CtxCreate", CONV_D3D11, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuD3D11CtxCreateOnDevice", + ("hipD3D11CtxCreateOnDevice", CONV_D3D11, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuD3D11GetDirect3DDevice", + ("hipD3D11GetDirect3DDevice", CONV_D3D11, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuGraphicsVDPAURegisterOutputSurface", + ( + "hipGraphicsVDPAURegisterOutputSurface", + CONV_VDPAU, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "cuGraphicsVDPAURegisterVideoSurface", + ( + "hipGraphicsVDPAURegisterVideoSurface", + CONV_VDPAU, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "cuVDPAUGetDevice", + ("hipVDPAUGetDevice", CONV_VDPAU, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuVDPAUCtxCreate", + ("hipVDPAUCtxCreate", CONV_VDPAU, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuEGLStreamConsumerAcquireFrame", + ("hipEGLStreamConsumerAcquireFrame", CONV_EGL, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuEGLStreamConsumerConnect", + ("hipEGLStreamConsumerConnect", CONV_EGL, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuEGLStreamConsumerConnectWithFlags", + ( + "hipEGLStreamConsumerConnectWithFlags", + CONV_EGL, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ( + "cuEGLStreamConsumerDisconnect", + ("hipEGLStreamConsumerDisconnect", CONV_EGL, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuEGLStreamConsumerReleaseFrame", + ("hipEGLStreamConsumerReleaseFrame", CONV_EGL, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuEGLStreamProducerConnect", + ("hipEGLStreamProducerConnect", CONV_EGL, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuEGLStreamProducerDisconnect", + ("hipEGLStreamProducerDisconnect", CONV_EGL, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuEGLStreamProducerPresentFrame", + ("hipEGLStreamProducerPresentFrame", CONV_EGL, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuEGLStreamProducerReturnFrame", + ("hipEGLStreamProducerReturnFrame", CONV_EGL, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuGraphicsEGLRegisterImage", + ("hipGraphicsEGLRegisterImage", CONV_EGL, API_DRIVER, HIP_UNSUPPORTED), + ), + ( + "cuGraphicsResourceGetMappedEglFrame", + ( + "hipGraphicsResourceGetMappedEglFrame", + CONV_EGL, + API_DRIVER, + HIP_UNSUPPORTED, + ), + ), + ("cudaDataType_t", ("hipDataType", CONV_TYPE, API_RUNTIME)), + ("cudaDataType", ("hipDataType", CONV_TYPE, API_RUNTIME)), + ("CUDA_R_32F", ("HIP_R_32F", CONV_TYPE, API_RUNTIME)), + ("CUDA_R_64F", ("HIP_R_64F", CONV_TYPE, API_RUNTIME)), + ("CUDA_R_16F", ("HIP_R_16F", CONV_TYPE, API_RUNTIME)), + ("CUDA_R_8I", ("HIP_R_8I", CONV_TYPE, API_RUNTIME)), + ("CUDA_C_32F", ("HIP_C_32F", CONV_TYPE, API_RUNTIME)), + ("CUDA_C_64F", ("HIP_C_64F", CONV_TYPE, API_RUNTIME)), + ("CUDA_C_16F", ("HIP_C_16F", CONV_TYPE, API_RUNTIME)), + ("CUDA_C_8I", ("HIP_C_8I", CONV_TYPE, API_RUNTIME)), + ("CUDA_R_8U", ("HIP_R_8U", CONV_TYPE, API_RUNTIME)), + ("CUDA_C_8U", ("HIP_C_8U", CONV_TYPE, API_RUNTIME)), + ("CUDA_R_32I", ("HIP_R_32I", CONV_TYPE, API_RUNTIME)), + ("CUDA_C_32I", ("HIP_C_32I", CONV_TYPE, API_RUNTIME)), + ("CUDA_R_32U", ("HIP_R_32U", CONV_TYPE, API_RUNTIME)), + ("CUDA_C_32U", ("HIP_C_32U", CONV_TYPE, API_RUNTIME)), + ("CUDA_R_16BF", ("HIP_R_16BF", CONV_TYPE, API_RUNTIME)), + ("CUDA_C_16BF", ("HIP_C_16BF", CONV_TYPE, API_RUNTIME)), + ("CUDA_R_4I", ("HIP_R_4I", CONV_TYPE, API_RUNTIME)), + ("CUDA_C_4I", ("HIP_C_4I", CONV_TYPE, API_RUNTIME)), + ("CUDA_R_4U", ("HIP_R_4U", CONV_TYPE, API_RUNTIME)), + ("CUDA_C_4U", ("HIP_C_4U", CONV_TYPE, API_RUNTIME)), + ("CUDA_R_16I", ("HIP_R_16I", CONV_TYPE, API_RUNTIME)), + ("CUDA_C_16I", ("HIP_C_16I", CONV_TYPE, API_RUNTIME)), + ("CUDA_R_16U", ("HIP_R_16U", CONV_TYPE, API_RUNTIME)), + ("CUDA_C_16U", ("HIP_C_16U", CONV_TYPE, API_RUNTIME)), + ("CUDA_R_64I", ("HIP_R_64I", CONV_TYPE, API_RUNTIME)), + ("CUDA_C_64I", ("HIP_C_64I", CONV_TYPE, API_RUNTIME)), + ("CUDA_R_64U", ("HIP_R_64U", CONV_TYPE, API_RUNTIME)), + ("CUDA_C_64U", ("HIP_C_64U", CONV_TYPE, API_RUNTIME)), + ("CUDA_R_8F_E4M3", ("HIP_R_8F_E4M3", CONV_TYPE, API_RUNTIME)), + ("CUDA_R_8F_E5M2", ("HIP_R_8F_E5M2", CONV_TYPE, API_RUNTIME)), + ("CUDA_R_4F_E2M1", ("HIP_R_4F_E2M1", CONV_TYPE, API_RUNTIME)), + ( + "MAJOR_VERSION", + ("hipLibraryMajorVersion", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "MINOR_VERSION", + ("hipLibraryMinorVersion", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "PATCH_LEVEL", + ("hipLibraryPatchVersion", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaMemAttachGlobal", + ("hipMemAttachGlobal", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaMemAttachHost", + ("hipMemAttachHost", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaMemAttachSingle", + ("hipMemAttachSingle", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaOccupancyDefault", + ("hipOccupancyDefault", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaOccupancyDisableCachingOverride", + ( + "hipOccupancyDisableCachingOverride", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ("cudaGetLastError", ("hipGetLastError", CONV_ERROR, API_RUNTIME)), + ("cudaPeekAtLastError", ("hipPeekAtLastError", CONV_ERROR, API_RUNTIME)), + ("cudaGetErrorName", ("hipGetErrorName", CONV_ERROR, API_RUNTIME)), + ("cudaGetErrorString", ("hipGetErrorString", CONV_ERROR, API_RUNTIME)), + ("cudaMemcpy3DParms", ("hipMemcpy3DParms", CONV_MEM, API_RUNTIME)), + ( + "cudaMemcpy3DPeerParms", + ("hipMemcpy3DPeerParms", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED), + ), + ("cudaMemcpy", ("hipMemcpy", CONV_MEM, API_RUNTIME)), + ("cudaMemcpyToArray", ("hipMemcpyToArray", CONV_MEM, API_RUNTIME)), + ("cudaMemcpyToSymbol", ("hipMemcpyToSymbol", CONV_MEM, API_RUNTIME)), + ("cudaMemcpyToSymbolAsync", ("hipMemcpyToSymbolAsync", CONV_MEM, API_RUNTIME)), + ("cudaMemcpyAsync", ("hipMemcpyAsync", CONV_MEM, API_RUNTIME)), + ("cudaMemcpy2D", ("hipMemcpy2D", CONV_MEM, API_RUNTIME)), + ("cudaMemcpy2DAsync", ("hipMemcpy2DAsync", CONV_MEM, API_RUNTIME)), + ("cudaMemcpy2DToArray", ("hipMemcpy2DToArray", CONV_MEM, API_RUNTIME)), + ( + "cudaMemcpy2DArrayToArray", + ("hipMemcpy2DArrayToArray", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaMemcpy2DFromArray", + ("hipMemcpy2DFromArray", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaMemcpy2DFromArrayAsync", + ("hipMemcpy2DFromArrayAsync", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaMemcpy2DToArrayAsync", + ("hipMemcpy2DToArrayAsync", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED), + ), + ("cudaMemcpy3D", ("hipMemcpy3D", CONV_MEM, API_RUNTIME)), + ( + "cudaMemcpy3DAsync", + ("hipMemcpy3DAsync", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaMemcpy3DPeer", + ("hipMemcpy3DPeer", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaMemcpy3DPeerAsync", + ("hipMemcpy3DPeerAsync", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaMemcpyArrayToArray", + ("hipMemcpyArrayToArray", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaMemcpyFromArrayAsync", + ("hipMemcpyFromArrayAsync", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED), + ), + ("cudaMemcpyFromSymbol", ("hipMemcpyFromSymbol", CONV_MEM, API_RUNTIME)), + ( + "cudaMemcpyFromSymbolAsync", + ("hipMemcpyFromSymbolAsync", CONV_MEM, API_RUNTIME), + ), + ("cudaMemAdvise", ("hipMemAdvise", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED)), + ( + "cudaMemRangeGetAttribute", + ("hipMemRangeGetAttribute", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaMemRangeGetAttributes", + ("hipMemRangeGetAttributes", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaMemAdviseSetReadMostly", + ("hipMemAdviseSetReadMostly", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaMemAdviseUnsetReadMostly", + ("hipMemAdviseUnsetReadMostly", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaMemAdviseSetPreferredLocation", + ( + "hipMemAdviseSetPreferredLocation", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaMemAdviseUnsetPreferredLocation", + ( + "hipMemAdviseUnsetPreferredLocation", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaMemAdviseSetAccessedBy", + ("hipMemAdviseSetAccessedBy", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaMemAdviseUnsetAccessedBy", + ("hipMemAdviseUnsetAccessedBy", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaMemRangeAttributeReadMostly", + ("hipMemRangeAttributeReadMostly", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaMemRangeAttributePreferredLocation", + ( + "hipMemRangeAttributePreferredLocation", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaMemRangeAttributeAccessedBy", + ("hipMemRangeAttributeAccessedBy", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaMemRangeAttributeLastPrefetchLocation", + ( + "hipMemRangeAttributeLastPrefetchLocation", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ("cudaMemcpyHostToHost", ("hipMemcpyHostToHost", CONV_MEM, API_RUNTIME)), + ("cudaMemcpyHostToDevice", ("hipMemcpyHostToDevice", CONV_MEM, API_RUNTIME)), + ("cudaMemcpyDeviceToHost", ("hipMemcpyDeviceToHost", CONV_MEM, API_RUNTIME)), + ( + "cudaMemcpyDeviceToDevice", + ("hipMemcpyDeviceToDevice", CONV_MEM, API_RUNTIME), + ), + ("cudaMemcpyDefault", ("hipMemcpyDefault", CONV_MEM, API_RUNTIME)), + ("cudaMemset", ("hipMemset", CONV_MEM, API_RUNTIME)), + ("cudaMemsetAsync", ("hipMemsetAsync", CONV_MEM, API_RUNTIME)), + ("cudaMemset2D", ("hipMemset2D", CONV_MEM, API_RUNTIME)), + ( + "cudaMemset2DAsync", + ("hipMemset2DAsync", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED), + ), + ("cudaMemset3D", ("hipMemset3D", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED)), + ( + "cudaMemset3DAsync", + ("hipMemset3DAsync", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED), + ), + ("cudaMemGetInfo", ("hipMemGetInfo", CONV_MEM, API_RUNTIME)), + ("cudaDeviceGetDefaultMemPool", ("hipDeviceGetDefaultMemPool", CONV_MEM, API_RUNTIME)), + ("cudaMemAccessDesc", ("hipMemAccessDesc", CONV_MEM, API_RUNTIME)), + ("cudaMemAccessFlagsProtReadWrite", ("hipMemAccessFlagsProtReadWrite", CONV_MEM, API_RUNTIME)), + ("cudaMemLocationTypeDevice", ("hipMemLocationTypeDevice", CONV_MEM, API_RUNTIME)), + ("cudaMemPoolAttrReleaseThreshold", ("hipMemPoolAttrReleaseThreshold", CONV_MEM, API_RUNTIME)), + ("cudaMemPoolAttrReservedMemCurrent", ("hipMemPoolAttrReservedMemCurrent", CONV_MEM, API_RUNTIME)), + ("cudaMemPoolAttrReservedMemHigh", ("hipMemPoolAttrReservedMemHigh", CONV_MEM, API_RUNTIME)), + ("cudaMemPoolAttrUsedMemCurrent", ("hipMemPoolAttrUsedMemCurrent", CONV_MEM, API_RUNTIME)), + ("cudaMemPoolAttrUsedMemHigh", ("hipMemPoolAttrUsedMemHigh", CONV_MEM, API_RUNTIME)), + ("cudaMemPoolGetAttribute", ("hipMemPoolGetAttribute", CONV_MEM, API_RUNTIME)), + ( + "cudaMemPoolReuseAllowInternalDependencies", + ("hipMemPoolReuseAllowInternalDependencies", CONV_MEM, API_RUNTIME) + ), + ("cudaMemPoolReuseAllowOpportunistic", ("hipMemPoolReuseAllowOpportunistic", CONV_MEM, API_RUNTIME)), + ( + "cudaMemPoolReuseFollowEventDependencies", + ("hipMemPoolReuseFollowEventDependencies", CONV_MEM, API_RUNTIME) + ), + ("cudaMemPoolSetAccess", ("hipMemPoolSetAccess", CONV_MEM, API_RUNTIME)), + ("cudaMemPoolSetAttribute", ("hipMemPoolSetAttribute", CONV_MEM, API_RUNTIME)), + ("cudaMemPoolTrimTo", ("hipMemPoolTrimTo", CONV_MEM, API_RUNTIME)), + ("cudaMemPool_t", ("hipMemPool_t", CONV_MEM, API_RUNTIME)), + ( + "cudaArrayGetInfo", + ("hipArrayGetInfo", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaFreeMipmappedArray", + ("hipFreeMipmappedArray", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaGetMipmappedArrayLevel", + ("hipGetMipmappedArrayLevel", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaGetSymbolAddress", + ("hipGetSymbolAddress", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaGetSymbolSize", + ("hipGetSymbolSize", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaMemPrefetchAsync", + ("hipMemPrefetchAsync", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED), + ), + ("cudaMallocHost", ("hipHostMalloc", CONV_MEM, API_RUNTIME)), + ("cudaMallocArray", ("hipMallocArray", CONV_MEM, API_RUNTIME)), + ("cudaMallocAsync", ("hipMallocAsync", CONV_MEM, API_RUNTIME)), + ("cudaMalloc", ("hipMalloc", CONV_MEM, API_RUNTIME)), + ("cudaMalloc3D", ("hipMalloc3D", CONV_MEM, API_RUNTIME)), + ("cudaMalloc3DArray", ("hipMalloc3DArray", CONV_MEM, API_RUNTIME)), + ( + "cudaMallocManaged", + ("hipMallocManaged", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaMallocMipmappedArray", + ("hipMallocMipmappedArray", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED), + ), + ("cudaMallocPitch", ("hipMallocPitch", CONV_MEM, API_RUNTIME)), + ("cudaFreeHost", ("hipHostFree", CONV_MEM, API_RUNTIME)), + ("cudaFreeArray", ("hipFreeArray", CONV_MEM, API_RUNTIME)), + ("cudaFreeAsync", ("hipFreeAsync", CONV_MEM, API_RUNTIME)), + ("cudaFree", ("hipFree", CONV_MEM, API_RUNTIME)), + ("cudaHostRegister", ("hipHostRegister", CONV_MEM, API_RUNTIME)), + ("cudaHostUnregister", ("hipHostUnregister", CONV_MEM, API_RUNTIME)), + ("cudaHostAlloc", ("hipHostMalloc", CONV_MEM, API_RUNTIME)), + ("cudaMemoryTypeHost", ("hipMemoryTypeHost", CONV_MEM, API_RUNTIME)), + ("cudaMemoryTypeDevice", ("hipMemoryTypeDevice", CONV_MEM, API_RUNTIME)), + ("cudaMemoryTypeUnregistered", ("hipMemoryTypeUnregistered", CONV_MEM, API_RUNTIME)), + ("cudaMemoryTypeManaged", ("hipMemoryTypeManaged", CONV_MEM, API_RUNTIME)), + ("make_cudaExtent", ("make_hipExtent", CONV_MEM, API_RUNTIME)), + ("make_cudaPitchedPtr", ("make_hipPitchedPtr", CONV_MEM, API_RUNTIME)), + ("make_cudaPos", ("make_hipPos", CONV_MEM, API_RUNTIME)), + ("cudaHostAllocDefault", ("hipHostMallocDefault", CONV_MEM, API_RUNTIME)), + ("cudaHostAllocPortable", ("hipHostMallocPortable", CONV_MEM, API_RUNTIME)), + ("cudaHostAllocMapped", ("hipHostMallocMapped", CONV_MEM, API_RUNTIME)), + ("cudaHostNodeParams", ("hipHostNodeParams", CONV_MEM, API_RUNTIME)), + ( + "cudaHostAllocWriteCombined", + ("hipHostMallocWriteCombined", CONV_MEM, API_RUNTIME), + ), + ("cudaHostGetFlags", ("hipHostGetFlags", CONV_MEM, API_RUNTIME)), + ("cudaHostRegisterDefault", ("hipHostRegisterDefault", CONV_MEM, API_RUNTIME)), + ( + "cudaHostRegisterPortable", + ("hipHostRegisterPortable", CONV_MEM, API_RUNTIME), + ), + ("cudaHostRegisterMapped", ("hipHostRegisterMapped", CONV_MEM, API_RUNTIME)), + ( + "cudaHostRegisterIoMemory", + ("hipHostRegisterIoMemory", CONV_MEM, API_RUNTIME), + ), + # ("warpSize", ("hipWarpSize", CONV_SPECIAL_FUNC, API_RUNTIME), (HIP actually uses warpSize...)), + ("cudaEventCreate", ("hipEventCreate", CONV_EVENT, API_RUNTIME)), + ( + "cudaEventCreateWithFlags", + ("hipEventCreateWithFlags", CONV_EVENT, API_RUNTIME), + ), + ("cudaEventDestroy", ("hipEventDestroy", CONV_EVENT, API_RUNTIME)), + ("cudaEventRecord", ("hipEventRecord", CONV_EVENT, API_RUNTIME)), + ("cudaEventElapsedTime", ("hipEventElapsedTime", CONV_EVENT, API_RUNTIME)), + ("cudaEventSynchronize", ("hipEventSynchronize", CONV_EVENT, API_RUNTIME)), + ("cudaEventQuery", ("hipEventQuery", CONV_EVENT, API_RUNTIME)), + ("cudaEventDefault", ("hipEventDefault", CONV_EVENT, API_RUNTIME)), + ("cudaEventBlockingSync", ("hipEventBlockingSync", CONV_EVENT, API_RUNTIME)), + ("cudaEventDisableTiming", ("hipEventDisableTiming", CONV_EVENT, API_RUNTIME)), + ("cudaEventInterprocess", ("hipEventInterprocess", CONV_EVENT, API_RUNTIME)), + ("cudaStreamCreate", ("hipStreamCreate", CONV_STREAM, API_RUNTIME)), + ( + "cudaStreamCreateWithFlags", + ("hipStreamCreateWithFlags", CONV_STREAM, API_RUNTIME), + ), + ( + "cudaStreamCreateWithPriority", + ("hipStreamCreateWithPriority", CONV_STREAM, API_RUNTIME, HIP_UNSUPPORTED), + ), + ("cudaStreamDestroy", ("hipStreamDestroy", CONV_STREAM, API_RUNTIME)), + ("cudaStreamWaitEvent", ("hipStreamWaitEvent", CONV_STREAM, API_RUNTIME)), + ("cudaStreamSynchronize", ("hipStreamSynchronize", CONV_STREAM, API_RUNTIME)), + ("cudaStreamGetFlags", ("hipStreamGetFlags", CONV_STREAM, API_RUNTIME)), + ("cudaStreamQuery", ("hipStreamQuery", CONV_STREAM, API_RUNTIME)), + ("cudaStreamAddCallback", ("hipStreamAddCallback", CONV_STREAM, API_RUNTIME)), + ( + "cudaStreamAttachMemAsync", + ("hipStreamAttachMemAsync", CONV_STREAM, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaStreamGetPriority", + ("hipStreamGetPriority", CONV_STREAM, API_RUNTIME, HIP_UNSUPPORTED), + ), + ("cudaCpuDeviceId", ("hipCpuDeviceId", CONV_TYPE, API_RUNTIME)), + ("cudaStreamDefault", ("hipStreamDefault", CONV_TYPE, API_RUNTIME)), + ("cudaStreamNonBlocking", ("hipStreamNonBlocking", CONV_TYPE, API_RUNTIME)), + ("cudaStreamGetCaptureInfo", ("hipStreamGetCaptureInfo", CONV_TYPE, API_RUNTIME)), + ("cudaStreamGetCaptureInfo_v2", ("hipStreamGetCaptureInfo_v2", CONV_TYPE, API_RUNTIME)), + ("cudaStreamCaptureStatus", ("hipStreamCaptureStatus", CONV_TYPE, API_RUNTIME)), + ("cudaStreamCaptureStatusActive", ("hipStreamCaptureStatusActive", CONV_TYPE, API_RUNTIME)), + ("cudaStreamCaptureStatusNone", ("hipStreamCaptureStatusNone", CONV_TYPE, API_RUNTIME)), + ("cudaStreamCaptureMode", ("hipStreamCaptureMode", CONV_TYPE, API_RUNTIME)), + ("cudaStreamCaptureModeGlobal", ("hipStreamCaptureModeGlobal", CONV_TYPE, API_RUNTIME)), + ("cudaStreamCaptureModeRelaxed", ("hipStreamCaptureModeRelaxed", CONV_TYPE, API_RUNTIME)), + ("cudaStreamCaptureModeThreadLocal", ("hipStreamCaptureModeThreadLocal", CONV_TYPE, API_RUNTIME)), + ("cudaStreamBeginCapture", ("hipStreamBeginCapture", CONV_TYPE, API_RUNTIME)), + ("cudaStreamEndCapture", ("hipStreamEndCapture", CONV_TYPE, API_RUNTIME)), + ("cudaStreamSetCaptureDependencies", ("hipStreamSetCaptureDependencies", CONV_STREAM, API_RUNTIME)), + ("cudaStreamUpdateCaptureDependencies", ("hipStreamUpdateCaptureDependencies", CONV_STREAM, API_RUNTIME)), + ("cudaGraphInstantiate", ("hipGraphInstantiate", CONV_TYPE, API_RUNTIME)), + ("cudaGraphInstantiateWithFlags", ("hipGraphInstantiateWithFlags", CONV_TYPE, API_RUNTIME)), + ( + "cudaGraphInstantiateFlagAutoFreeOnLaunch", + ("hipGraphInstantiateFlagAutoFreeOnLaunch", CONV_TYPE, API_RUNTIME) + ), + ("cudaGraphDestroy", ("hipGraphDestroy", CONV_TYPE, API_RUNTIME)), + ("cudaGraphExecDestroy", ("hipGraphExecDestroy", CONV_TYPE, API_RUNTIME)), + ("cudaGraphLaunch", ("hipGraphLaunch", CONV_TYPE, API_RUNTIME)), + ("cudaGraphGetNodes", ("hipGraphGetNodes", CONV_TYPE, API_RUNTIME)), + ("cudaGraphDebugDotPrint", ("hipGraphDebugDotPrint", CONV_TYPE, API_RUNTIME)), + ("cudaGraphDebugDotFlagsVerbose", ("hipGraphDebugDotFlagsVerbose", CONV_NUMERIC_LITERAL, API_RUNTIME)), + ("cudaGraphRetainUserObject", ("hipGraphRetainUserObject", CONV_TYPE, API_RUNTIME)), + ("cudaGraphUserObjectMove", ("hipGraphUserObjectMove", CONV_TYPE, API_RUNTIME)), + ("cudaDeviceGetGraphMemAttribute", ("hipDeviceGetGraphMemAttribute", CONV_TYPE, API_RUNTIME)), + ("cudaDeviceGraphMemTrim", ("hipDeviceGraphMemTrim", CONV_TYPE, API_RUNTIME)), + ("cudaDeviceSetGraphMemAttribute", ("hipDeviceSetGraphMemAttribute", CONV_TYPE, API_RUNTIME)), + ("cudaGraphAddChildGraphNode", ("hipGraphAddChildGraphNode", CONV_TYPE, API_RUNTIME)), + ("cudaGraphAddDependencies", ("hipGraphAddDependencies", CONV_TYPE, API_RUNTIME)), + ("cudaGraphAddEmptyNode", ("hipGraphAddEmptyNode", CONV_TYPE, API_RUNTIME)), + ("cudaGraphAddEventRecordNode", ("hipGraphAddEventRecordNode", CONV_TYPE, API_RUNTIME)), + ("cudaGraphAddEventWaitNode", ("hipGraphAddEventWaitNode", CONV_TYPE, API_RUNTIME)), + ( + "cudaGraphAddExternalSemaphoresSignalNode", + ("hipGraphAddExternalSemaphoresSignalNode", CONV_TYPE, API_RUNTIME) + ), + ("cudaGraphAddExternalSemaphoresWaitNode", ("hipGraphAddExternalSemaphoresWaitNode", CONV_TYPE, API_RUNTIME)), + ("cudaGraphAddHostNode", ("hipGraphAddHostNode", CONV_TYPE, API_RUNTIME)), + ("cudaGraphAddKernelNode", ("hipGraphAddKernelNode", CONV_TYPE, API_RUNTIME)), + ("cudaGraphAddMemAllocNode", ("hipGraphAddMemAllocNode", CONV_TYPE, API_RUNTIME)), + ("cudaGraphAddMemFreeNode", ("hipGraphAddMemFreeNode", CONV_TYPE, API_RUNTIME)), + ("cudaGraphAddMemcpyNode", ("hipGraphAddMemcpyNode", CONV_TYPE, API_RUNTIME)), + ("cudaGraphAddMemcpyNode1D", ("hipGraphAddMemcpyNode1D", CONV_TYPE, API_RUNTIME)), + ("cudaGraphAddMemcpyNodeFromSymbol", ("hipGraphAddMemcpyNodeFromSymbol", CONV_TYPE, API_RUNTIME)), + ("cudaGraphAddMemcpyNodeToSymbol", ("hipGraphAddMemcpyNodeToSymbol", CONV_TYPE, API_RUNTIME)), + ("cudaGraphAddMemsetNode", ("hipGraphAddMemsetNode", CONV_TYPE, API_RUNTIME)), + ("cudaGraphAddNode", ("hipGraphAddNode", CONV_TYPE, API_RUNTIME)), + ("cudaGraphChildGraphNodeGetGraph", ("hipGraphChildGraphNodeGetGraph", CONV_TYPE, API_RUNTIME)), + ("cudaGraphClone", ("hipGraphClone", CONV_TYPE, API_RUNTIME)), + ("cudaGraphCreate", ("hipGraphCreate", CONV_TYPE, API_RUNTIME)), + ("cudaGraphDestroyNode", ("hipGraphDestroyNode", CONV_TYPE, API_RUNTIME)), + ("cudaGraphEventRecordNodeGetEvent", ("hipGraphEventRecordNodeGetEvent", CONV_TYPE, API_RUNTIME)), + ("cudaGraphEventRecordNodeSetEvent", ("hipGraphEventRecordNodeSetEvent", CONV_TYPE, API_RUNTIME)), + ("cudaGraphEventWaitNodeGetEvent", ("hipGraphEventWaitNodeGetEvent", CONV_TYPE, API_RUNTIME)), + ("cudaGraphEventWaitNodeSetEvent", ("hipGraphEventWaitNodeSetEvent", CONV_TYPE, API_RUNTIME)), + ("cudaGraphExecChildGraphNodeSetParams", ("hipGraphExecChildGraphNodeSetParams", CONV_TYPE, API_RUNTIME)), + ("cudaGraphExecEventRecordNodeSetEvent", ("hipGraphExecEventRecordNodeSetEvent", CONV_TYPE, API_RUNTIME)), + ("cudaGraphExecEventWaitNodeSetEvent", ("hipGraphExecEventWaitNodeSetEvent", CONV_TYPE, API_RUNTIME)), + ( + "cudaGraphExecExternalSemaphoresSignalNodeSetParams", + ("hipGraphExecExternalSemaphoresSignalNodeSetParams", CONV_TYPE, API_RUNTIME) + ), + ( + "cudaGraphExecExternalSemaphoresWaitNodeSetParams", + ("hipGraphExecExternalSemaphoresWaitNodeSetParams", CONV_TYPE, API_RUNTIME) + ), + ("cudaGraphExecGetFlags", ("hipGraphExecGetFlags", CONV_TYPE, API_RUNTIME)), + ("cudaGraphExecHostNodeSetParams", ("hipGraphExecHostNodeSetParams", CONV_TYPE, API_RUNTIME)), + ("cudaGraphExecKernelNodeSetParams", ("hipGraphExecKernelNodeSetParams", CONV_TYPE, API_RUNTIME)), + ("cudaGraphExecMemcpyNodeSetParams", ("hipGraphExecMemcpyNodeSetParams", CONV_TYPE, API_RUNTIME)), + ("cudaGraphExecMemcpyNodeSetParams1D", ("hipGraphExecMemcpyNodeSetParams1D", CONV_TYPE, API_RUNTIME)), + ( + "cudaGraphExecMemcpyNodeSetParamsFromSymbol", + ("hipGraphExecMemcpyNodeSetParamsFromSymbol", CONV_TYPE, API_RUNTIME) + ), + ( + "cudaGraphExecMemcpyNodeSetParamsToSymbol", + ("hipGraphExecMemcpyNodeSetParamsToSymbol", CONV_TYPE, API_RUNTIME) + ), + ("cudaGraphExecMemsetNodeSetParams", ("hipGraphExecMemsetNodeSetParams", CONV_TYPE, API_RUNTIME)), + ("cudaGraphExecNodeSetParams", ("hipGraphExecNodeSetParams", CONV_TYPE, API_RUNTIME)), + ("cudaGraphExecUpdate", ("hipGraphExecUpdate", CONV_TYPE, API_RUNTIME)), + ( + "cudaGraphExternalSemaphoresSignalNodeGetParams", + ("hipGraphExternalSemaphoresSignalNodeGetParams", CONV_TYPE, API_RUNTIME) + ), + ( + "cudaGraphExternalSemaphoresSignalNodeSetParams", + ("hipGraphExternalSemaphoresSignalNodeSetParams", CONV_TYPE, API_RUNTIME) + ), + ( + "cudaGraphExternalSemaphoresWaitNodeGetParams", + ("hipGraphExternalSemaphoresWaitNodeGetParams", CONV_TYPE, API_RUNTIME) + ), + ( + "cudaGraphExternalSemaphoresWaitNodeSetParams", + ("hipGraphExternalSemaphoresWaitNodeSetParams", CONV_TYPE, API_RUNTIME) + ), + ("cudaGraphGetEdges", ("hipGraphGetEdges", CONV_TYPE, API_RUNTIME)), + ("cudaGraphGetRootNodes", ("hipGraphGetRootNodes", CONV_TYPE, API_RUNTIME)), + ("cudaGraphHostNodeGetParams", ("hipGraphHostNodeGetParams", CONV_TYPE, API_RUNTIME)), + ("cudaGraphHostNodeSetParams", ("hipGraphHostNodeSetParams", CONV_TYPE, API_RUNTIME)), + ("cudaGraphInstantiateWithParams", ("hipGraphInstantiateWithParams", CONV_TYPE, API_RUNTIME)), + ("cudaGraphKernelNodeCopyAttributes", ("hipGraphKernelNodeCopyAttributes", CONV_TYPE, API_RUNTIME)), + ("cudaGraphKernelNodeGetAttribute", ("hipGraphKernelNodeGetAttribute", CONV_TYPE, API_RUNTIME)), + ("cudaGraphKernelNodeGetParams", ("hipGraphKernelNodeGetParams", CONV_TYPE, API_RUNTIME)), + ("cudaGraphKernelNodeSetAttribute", ("hipGraphKernelNodeSetAttribute", CONV_TYPE, API_RUNTIME)), + ("cudaGraphKernelNodeSetParams", ("hipGraphKernelNodeSetParams", CONV_TYPE, API_RUNTIME)), + ("cudaGraphLaunch", ("hipGraphLaunch", CONV_TYPE, API_RUNTIME)), + ("cudaGraphMemAllocNodeGetParams", ("hipGraphMemAllocNodeGetParams", CONV_TYPE, API_RUNTIME)), + ("cudaGraphMemFreeNodeGetParams", ("hipGraphMemFreeNodeGetParams", CONV_TYPE, API_RUNTIME)), + ("cudaGraphMemcpyNodeGetParams", ("hipGraphMemcpyNodeGetParams", CONV_TYPE, API_RUNTIME)), + ("cudaGraphMemcpyNodeSetParams", ("hipGraphMemcpyNodeSetParams", CONV_TYPE, API_RUNTIME)), + ("cudaGraphMemcpyNodeSetParams1D", ("hipGraphMemcpyNodeSetParams1D", CONV_TYPE, API_RUNTIME)), + ("cudaGraphMemcpyNodeSetParamsFromSymbol", ("hipGraphMemcpyNodeSetParamsFromSymbol", CONV_TYPE, API_RUNTIME)), + ("cudaGraphMemcpyNodeSetParamsToSymbol", ("hipGraphMemcpyNodeSetParamsToSymbol", CONV_TYPE, API_RUNTIME)), + ("cudaGraphMemsetNodeGetParams", ("hipGraphMemsetNodeGetParams", CONV_TYPE, API_RUNTIME)), + ("cudaGraphMemsetNodeSetParams", ("hipGraphMemsetNodeSetParams", CONV_TYPE, API_RUNTIME)), + ("cudaGraphNodeFindInClone", ("hipGraphNodeFindInClone", CONV_TYPE, API_RUNTIME)), + ("cudaGraphNodeGetDependencies", ("hipGraphNodeGetDependencies", CONV_TYPE, API_RUNTIME)), + ("cudaGraphNodeGetDependentNodes", ("hipGraphNodeGetDependentNodes", CONV_TYPE, API_RUNTIME)), + ("cudaGraphNodeGetEnabled", ("hipGraphNodeGetEnabled", CONV_TYPE, API_RUNTIME)), + ("cudaGraphNodeGetType", ("hipGraphNodeGetType", CONV_TYPE, API_RUNTIME)), + ("cudaGraphNodeSetEnabled", ("hipGraphNodeSetEnabled", CONV_TYPE, API_RUNTIME)), + ("cudaGraphNodeSetParams", ("hipGraphNodeSetParams", CONV_TYPE, API_RUNTIME)), + ("cudaGraphReleaseUserObject", ("hipGraphReleaseUserObject", CONV_TYPE, API_RUNTIME)), + ("cudaGraphRemoveDependencies", ("hipGraphRemoveDependencies", CONV_TYPE, API_RUNTIME)), + ("cudaGraphUpload", ("hipGraphUpload", CONV_TYPE, API_RUNTIME)), + ("cudaUserObjectRelease", ("hipUserObjectRelease", CONV_TYPE, API_RUNTIME)), + ("cudaUserObjectRetain", ("hipUserObjectRetain", CONV_TYPE, API_RUNTIME)), + ("cudaGraphDebugDotFlags", ("hipGraphDebugDotFlags", CONV_TYPE, API_RUNTIME)), + ("cudaGraphDebugDotFlagsEventNodeParams", ("hipGraphDebugDotFlagsEventNodeParams", CONV_TYPE, API_RUNTIME)), + ( + "cudaGraphDebugDotFlagsExtSemasSignalNodeParams", + ("hipGraphDebugDotFlagsExtSemasSignalNodeParams", CONV_TYPE, API_RUNTIME) + ), + ( + "cudaGraphDebugDotFlagsExtSemasWaitNodeParams", + ("hipGraphDebugDotFlagsExtSemasWaitNodeParams", CONV_TYPE, API_RUNTIME) + ), + ("cudaGraphDebugDotFlagsHandles", ("hipGraphDebugDotFlagsHandles", CONV_TYPE, API_RUNTIME)), + ("cudaGraphDebugDotFlagsHostNodeParams", ("hipGraphDebugDotFlagsHostNodeParams", CONV_TYPE, API_RUNTIME)), + ( + "cudaGraphDebugDotFlagsKernelNodeAttributes", + ("hipGraphDebugDotFlagsKernelNodeAttributes", CONV_TYPE, API_RUNTIME) + ), + ("cudaGraphDebugDotFlagsKernelNodeParams", ("hipGraphDebugDotFlagsKernelNodeParams", CONV_TYPE, API_RUNTIME)), + ("cudaGraphDebugDotFlagsMemcpyNodeParams", ("hipGraphDebugDotFlagsMemcpyNodeParams", CONV_TYPE, API_RUNTIME)), + ("cudaGraphDebugDotFlagsMemsetNodeParams", ("hipGraphDebugDotFlagsMemsetNodeParams", CONV_TYPE, API_RUNTIME)), + ("cudaGraphDependencyType", ("hipGraphDependencyType", CONV_TYPE, API_RUNTIME)), + ("cudaGraphDependencyTypeDefault", ("hipGraphDependencyTypeDefault", CONV_TYPE, API_RUNTIME)), + ("cudaGraphDependencyTypeProgrammatic", ("hipGraphDependencyTypeProgrammatic", CONV_TYPE, API_RUNTIME)), + ("cudaGraphDependencyType_enum", ("hipGraphDependencyType", CONV_TYPE, API_RUNTIME)), + ("cudaGraphEdgeData", ("hipGraphEdgeData", CONV_TYPE, API_RUNTIME)), + ("cudaGraphEdgeData_st", ("hipGraphEdgeData", CONV_TYPE, API_RUNTIME)), + ("cudaGraphExecUpdateError", ("hipGraphExecUpdateError", CONV_TYPE, API_RUNTIME)), + ( + "cudaGraphExecUpdateErrorFunctionChanged", + ("hipGraphExecUpdateErrorFunctionChanged", CONV_TYPE, API_RUNTIME) + ), + ( + "cudaGraphExecUpdateErrorNodeTypeChanged", + ("hipGraphExecUpdateErrorNodeTypeChanged", CONV_TYPE, API_RUNTIME) + ), + ("cudaGraphExecUpdateErrorNotSupported", ("hipGraphExecUpdateErrorNotSupported", CONV_TYPE, API_RUNTIME)), + ( + "cudaGraphExecUpdateErrorParametersChanged", + ("hipGraphExecUpdateErrorParametersChanged", CONV_TYPE, API_RUNTIME) + ), + ( + "cudaGraphExecUpdateErrorTopologyChanged", + ("hipGraphExecUpdateErrorTopologyChanged", CONV_TYPE, API_RUNTIME) + ), + ( + "cudaGraphExecUpdateErrorUnsupportedFunctionChange", + ("hipGraphExecUpdateErrorUnsupportedFunctionChange", CONV_TYPE, API_RUNTIME) + ), + ("cudaGraphExecUpdateResult", ("hipGraphExecUpdateResult", CONV_TYPE, API_RUNTIME)), + ("cudaGraphExecUpdateSuccess", ("hipGraphExecUpdateSuccess", CONV_TYPE, API_RUNTIME)), + ("cudaGraphInstantiateError", ("hipGraphInstantiateError", CONV_TYPE, API_RUNTIME)), + ("cudaGraphInstantiateFlagDeviceLaunch", ("hipGraphInstantiateFlagDeviceLaunch", CONV_TYPE, API_RUNTIME)), + ("cudaGraphInstantiateFlagUpload", ("hipGraphInstantiateFlagUpload", CONV_TYPE, API_RUNTIME)), + ( + "cudaGraphInstantiateFlagUseNodePriority", + ("hipGraphInstantiateFlagUseNodePriority", CONV_TYPE, API_RUNTIME) + ), + ("cudaGraphInstantiateFlags", ("hipGraphInstantiateFlags", CONV_TYPE, API_RUNTIME)), + ("cudaGraphInstantiateInvalidStructure", ("hipGraphInstantiateInvalidStructure", CONV_TYPE, API_RUNTIME)), + ( + "cudaGraphInstantiateMultipleDevicesNotSupported", + ("hipGraphInstantiateMultipleDevicesNotSupported", CONV_TYPE, API_RUNTIME) + ), + ( + "cudaGraphInstantiateNodeOperationNotSupported", + ("hipGraphInstantiateNodeOperationNotSupported", CONV_TYPE, API_RUNTIME) + ), + ("cudaGraphInstantiateParams", ("hipGraphInstantiateParams", CONV_TYPE, API_RUNTIME)), + ("cudaGraphInstantiateParams_st", ("hipGraphInstantiateParams", CONV_TYPE, API_RUNTIME)), + ("cudaGraphInstantiateResult", ("hipGraphInstantiateResult", CONV_TYPE, API_RUNTIME)), + ("cudaGraphInstantiateSuccess", ("hipGraphInstantiateSuccess", CONV_TYPE, API_RUNTIME)), + ("cudaGraphKernelNodePortDefault", ("hipGraphKernelNodePortDefault", CONV_TYPE, API_RUNTIME)), + ( + "cudaGraphKernelNodePortLaunchCompletion", + ("hipGraphKernelNodePortLaunchCompletion", CONV_TYPE, API_RUNTIME) + ), + ("cudaGraphKernelNodePortProgrammatic", ("hipGraphKernelNodePortProgrammatic", CONV_TYPE, API_RUNTIME)), + ("cudaGraphMemAttrReservedMemCurrent", ("hipGraphMemAttrReservedMemCurrent", CONV_TYPE, API_RUNTIME)), + ("cudaGraphMemAttrReservedMemHigh", ("hipGraphMemAttrReservedMemHigh", CONV_TYPE, API_RUNTIME)), + ("cudaGraphMemAttrUsedMemCurrent", ("hipGraphMemAttrUsedMemCurrent", CONV_TYPE, API_RUNTIME)), + ("cudaGraphMemAttrUsedMemHigh", ("hipGraphMemAttrUsedMemHigh", CONV_TYPE, API_RUNTIME)), + ("cudaGraphMemAttributeType", ("hipGraphMemAttributeType", CONV_TYPE, API_RUNTIME)), + ("cudaGraphNodeParams", ("hipGraphNodeParams", CONV_TYPE, API_RUNTIME)), + ("cudaGraphNodeType", ("hipGraphNodeType", CONV_TYPE, API_RUNTIME)), + ("cudaGraphNodeTypeConditional", ("hipGraphNodeTypeConditional", CONV_TYPE, API_RUNTIME)), + ("cudaGraphNodeTypeCount", ("hipGraphNodeTypeCount", CONV_TYPE, API_RUNTIME)), + ("cudaGraphNodeTypeEmpty", ("hipGraphNodeTypeEmpty", CONV_TYPE, API_RUNTIME)), + ("cudaGraphNodeTypeEventRecord", ("hipGraphNodeTypeEventRecord", CONV_TYPE, API_RUNTIME)), + ("cudaGraphNodeTypeExtSemaphoreSignal", ("hipGraphNodeTypeExtSemaphoreSignal", CONV_TYPE, API_RUNTIME)), + ("cudaGraphNodeTypeExtSemaphoreWait", ("hipGraphNodeTypeExtSemaphoreWait", CONV_TYPE, API_RUNTIME)), + ("cudaGraphNodeTypeGraph", ("hipGraphNodeTypeGraph", CONV_TYPE, API_RUNTIME)), + ("cudaGraphNodeTypeHost", ("hipGraphNodeTypeHost", CONV_TYPE, API_RUNTIME)), + ("cudaGraphNodeTypeKernel", ("hipGraphNodeTypeKernel", CONV_TYPE, API_RUNTIME)), + ("cudaGraphNodeTypeMemAlloc", ("hipGraphNodeTypeMemAlloc", CONV_TYPE, API_RUNTIME)), + ("cudaGraphNodeTypeMemFree", ("hipGraphNodeTypeMemFree", CONV_TYPE, API_RUNTIME)), + ("cudaGraphNodeTypeMemcpy", ("hipGraphNodeTypeMemcpy", CONV_TYPE, API_RUNTIME)), + ("cudaGraphNodeTypeMemset", ("hipGraphNodeTypeMemset", CONV_TYPE, API_RUNTIME)), + ("cudaGraphNodeTypeWaitEvent", ("hipGraphNodeTypeWaitEvent", CONV_TYPE, API_RUNTIME)), + ("cudaUserObject_t", ("hipUserObject_t", CONV_TYPE, API_RUNTIME)), + ("cudaUserObjectCreate", ("hipUserObjectCreate", CONV_TYPE, API_RUNTIME)), + ("cudaUserObjectNoDestructorSync", ("hipUserObjectNoDestructorSync", CONV_TYPE, API_RUNTIME)), + ("cudaThreadExchangeStreamCaptureMode", ("hipThreadExchangeStreamCaptureMode", CONV_TYPE, API_RUNTIME)), + ("cudaStreamIsCapturing", ("hipStreamIsCapturing", CONV_TYPE, API_RUNTIME)), + ("cudaDeviceSynchronize", ("hipDeviceSynchronize", CONV_DEVICE, API_RUNTIME)), + ("cudaDeviceReset", ("hipDeviceReset", CONV_DEVICE, API_RUNTIME)), + ("cudaSetDevice", ("hipSetDevice", CONV_DEVICE, API_RUNTIME)), + ("cudaGetDevice", ("hipGetDevice", CONV_DEVICE, API_RUNTIME)), + ("cudaGetDeviceCount", ("hipGetDeviceCount", CONV_DEVICE, API_RUNTIME)), + ("cudaChooseDevice", ("hipChooseDevice", CONV_DEVICE, API_RUNTIME)), + ("cudaThreadExit", ("hipDeviceReset", CONV_THREAD, API_RUNTIME)), + ( + "cudaThreadGetCacheConfig", + ("hipDeviceGetCacheConfig", CONV_THREAD, API_RUNTIME), + ), + ( + "cudaThreadGetLimit", + ("hipThreadGetLimit", CONV_THREAD, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaThreadSetCacheConfig", + ("hipDeviceSetCacheConfig", CONV_THREAD, API_RUNTIME), + ), + ( + "cudaThreadSetLimit", + ("hipThreadSetLimit", CONV_THREAD, API_RUNTIME, HIP_UNSUPPORTED), + ), + ("cudaThreadSynchronize", ("hipDeviceSynchronize", CONV_THREAD, API_RUNTIME)), + ("cudaDeviceGetAttribute", ("hipDeviceGetAttribute", CONV_DEVICE, API_RUNTIME)), + ( + "cudaDevAttrMaxThreadsPerBlock", + ("hipDeviceAttributeMaxThreadsPerBlock", CONV_TYPE, API_RUNTIME), + ), + ( + "cudaDevAttrMaxBlockDimX", + ("hipDeviceAttributeMaxBlockDimX", CONV_TYPE, API_RUNTIME), + ), + ( + "cudaDevAttrMaxBlockDimY", + ("hipDeviceAttributeMaxBlockDimY", CONV_TYPE, API_RUNTIME), + ), + ( + "cudaDevAttrMaxBlockDimZ", + ("hipDeviceAttributeMaxBlockDimZ", CONV_TYPE, API_RUNTIME), + ), + ( + "cudaDevAttrMaxGridDimX", + ("hipDeviceAttributeMaxGridDimX", CONV_TYPE, API_RUNTIME), + ), + ( + "cudaDevAttrMaxGridDimY", + ("hipDeviceAttributeMaxGridDimY", CONV_TYPE, API_RUNTIME), + ), + ( + "cudaDevAttrMaxGridDimZ", + ("hipDeviceAttributeMaxGridDimZ", CONV_TYPE, API_RUNTIME), + ), + ( + "cudaDevAttrMaxSharedMemoryPerBlock", + ("hipDeviceAttributeMaxSharedMemoryPerBlock", CONV_TYPE, API_RUNTIME), + ), + ( + "cudaDevAttrMaxSharedMemoryPerBlockOptin", + ("hipDeviceAttributeMaxSharedMemoryPerBlock", CONV_TYPE, API_RUNTIME), + ), + ( + "cudaDevAttrTotalConstantMemory", + ("hipDeviceAttributeTotalConstantMemory", CONV_TYPE, API_RUNTIME), + ), + ("cudaDevAttrWarpSize", ("hipDeviceAttributeWarpSize", CONV_TYPE, API_RUNTIME)), + ( + "cudaDevAttrMaxPitch", + ("hipDeviceAttributeMaxPitch", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaDevAttrMaxRegistersPerBlock", + ("hipDeviceAttributeMaxRegistersPerBlock", CONV_TYPE, API_RUNTIME), + ), + ( + "cudaDevAttrClockRate", + ("hipDeviceAttributeClockRate", CONV_TYPE, API_RUNTIME), + ), + ( + "cudaDevAttrTextureAlignment", + ( + "hipDeviceAttributeTextureAlignment", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrGpuOverlap", + ("hipDeviceAttributeGpuOverlap", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaDevAttrMultiProcessorCount", + ("hipDeviceAttributeMultiprocessorCount", CONV_TYPE, API_RUNTIME), + ), + ( + "cudaDevAttrKernelExecTimeout", + ( + "hipDeviceAttributeKernelExecTimeout", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrIntegrated", + ("hipDeviceAttributeIntegrated", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaDevAttrCanMapHostMemory", + ( + "hipDeviceAttributeCanMapHostMemory", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrComputeMode", + ("hipDeviceAttributeComputeMode", CONV_TYPE, API_RUNTIME), + ), + ( + "cudaDevAttrMaxTexture1DWidth", + ( + "hipDeviceAttributeMaxTexture1DWidth", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxTexture2DWidth", + ( + "hipDeviceAttributeMaxTexture2DWidth", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxTexture2DHeight", + ( + "hipDeviceAttributeMaxTexture2DHeight", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxTexture3DWidth", + ( + "hipDeviceAttributeMaxTexture3DWidth", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxTexture3DHeight", + ( + "hipDeviceAttributeMaxTexture3DHeight", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxTexture3DDepth", + ( + "hipDeviceAttributeMaxTexture3DDepth", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxTexture2DLayeredWidth", + ( + "hipDeviceAttributeMaxTexture2DLayeredWidth", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxTexture2DLayeredHeight", + ( + "hipDeviceAttributeMaxTexture2DLayeredHeight", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxTexture2DLayeredLayers", + ( + "hipDeviceAttributeMaxTexture2DLayeredLayers", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrSurfaceAlignment", + ( + "hipDeviceAttributeSurfaceAlignment", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrConcurrentKernels", + ("hipDeviceAttributeConcurrentKernels", CONV_TYPE, API_RUNTIME), + ), + ( + "cudaDevAttrEccEnabled", + ("hipDeviceAttributeEccEnabled", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ("cudaDevAttrPciBusId", ("hipDeviceAttributePciBusId", CONV_TYPE, API_RUNTIME)), + ( + "cudaDevAttrPciDeviceId", + ("hipDeviceAttributePciDeviceId", CONV_TYPE, API_RUNTIME), + ), + ( + "cudaDevAttrTccDriver", + ("hipDeviceAttributeTccDriver", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaDevAttrMemoryClockRate", + ("hipDeviceAttributeMemoryClockRate", CONV_TYPE, API_RUNTIME), + ), + ( + "cudaDevAttrGlobalMemoryBusWidth", + ("hipDeviceAttributeMemoryBusWidth", CONV_TYPE, API_RUNTIME), + ), + ( + "cudaDevAttrL2CacheSize", + ("hipDeviceAttributeL2CacheSize", CONV_TYPE, API_RUNTIME), + ), + ( + "cudaDevAttrMaxThreadsPerMultiProcessor", + ("hipDeviceAttributeMaxThreadsPerMultiProcessor", CONV_TYPE, API_RUNTIME), + ), + ( + "cudaDevAttrAsyncEngineCount", + ( + "hipDeviceAttributeAsyncEngineCount", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrUnifiedAddressing", + ( + "hipDeviceAttributeUnifiedAddressing", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxTexture1DLayeredWidth", + ( + "hipDeviceAttributeMaxTexture1DLayeredWidth", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxTexture1DLayeredLayers", + ( + "hipDeviceAttributeMaxTexture1DLayeredLayers", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxTexture2DGatherWidth", + ( + "hipDeviceAttributeMaxTexture2DGatherWidth", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxTexture2DGatherHeight", + ( + "hipDeviceAttributeMaxTexture2DGatherHeight", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxTexture3DWidthAlt", + ( + "hipDeviceAttributeMaxTexture3DWidthAlternate", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxTexture3DHeightAlt", + ( + "hipDeviceAttributeMaxTexture3DHeightAlternate", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxTexture3DDepthAlt", + ( + "hipDeviceAttributeMaxTexture3DDepthAlternate", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrPciDomainId", + ("hipDeviceAttributePciDomainId", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaDevAttrTexturePitchAlignment", + ( + "hipDeviceAttributeTexturePitchAlignment", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxTextureCubemapWidth", + ( + "hipDeviceAttributeMaxTextureCubemapWidth", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxTextureCubemapLayeredWidth", + ( + "hipDeviceAttributeMaxTextureCubemapLayeredWidth", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxTextureCubemapLayeredLayers", + ( + "hipDeviceAttributeMaxTextureCubemapLayeredLayers", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxSurface1DWidth", + ( + "hipDeviceAttributeMaxSurface1DWidth", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxSurface2DWidth", + ( + "hipDeviceAttributeMaxSurface2DWidth", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxSurface2DHeight", + ( + "hipDeviceAttributeMaxSurface2DHeight", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxSurface3DWidth", + ( + "hipDeviceAttributeMaxSurface3DWidth", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxSurface3DHeight", + ( + "hipDeviceAttributeMaxSurface3DHeight", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxSurface3DDepth", + ( + "hipDeviceAttributeMaxSurface3DDepth", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxSurface1DLayeredWidth", + ( + "hipDeviceAttributeMaxSurface1DLayeredWidth", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxSurface1DLayeredLayers", + ( + "hipDeviceAttributeMaxSurface1DLayeredLayers", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxSurface2DLayeredWidth", + ( + "hipDeviceAttributeMaxSurface2DLayeredWidth", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxSurface2DLayeredHeight", + ( + "hipDeviceAttributeMaxSurface2DLayeredHeight", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxSurface2DLayeredLayers", + ( + "hipDeviceAttributeMaxSurface2DLayeredLayers", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxSurfaceCubemapWidth", + ( + "hipDeviceAttributeMaxSurfaceCubemapWidth", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxSurfaceCubemapLayeredWidth", + ( + "hipDeviceAttributeMaxSurfaceCubemapLayeredWidth", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxSurfaceCubemapLayeredLayers", + ( + "hipDeviceAttributeMaxSurfaceCubemapLayeredLayers", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxTexture1DLinearWidth", + ( + "hipDeviceAttributeMaxTexture1DLinearWidth", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxTexture2DLinearWidth", + ( + "hipDeviceAttributeMaxTexture2DLinearWidth", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxTexture2DLinearHeight", + ( + "hipDeviceAttributeMaxTexture2DLinearHeight", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxTexture2DLinearPitch", + ( + "hipDeviceAttributeMaxTexture2DLinearPitch", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxTexture2DMipmappedWidth", + ( + "hipDeviceAttributeMaxTexture2DMipmappedWidth", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxTexture2DMipmappedHeight", + ( + "hipDeviceAttributeMaxTexture2DMipmappedHeight", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrComputeCapabilityMajor", + ("hipDeviceAttributeComputeCapabilityMajor", CONV_TYPE, API_RUNTIME), + ), + ( + "cudaDevAttrComputeCapabilityMinor", + ("hipDeviceAttributeComputeCapabilityMinor", CONV_TYPE, API_RUNTIME), + ), + ( + "cudaDevAttrMaxTexture1DMipmappedWidth", + ( + "hipDeviceAttributeMaxTexture1DMipmappedWidth", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrStreamPrioritiesSupported", + ( + "hipDeviceAttributeStreamPrioritiesSupported", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrGlobalL1CacheSupported", + ( + "hipDeviceAttributeGlobalL1CacheSupported", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrLocalL1CacheSupported", + ( + "hipDeviceAttributeLocalL1CacheSupported", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrMaxSharedMemoryPerMultiprocessor", + ( + "hipDeviceAttributeMaxSharedMemoryPerMultiprocessor", + CONV_TYPE, + API_RUNTIME, + ), + ), + ( + "cudaDevAttrMaxRegistersPerMultiprocessor", + ( + "hipDeviceAttributeMaxRegistersPerMultiprocessor", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrManagedMemory", + ( + "hipDeviceAttributeManagedMemory", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrIsMultiGpuBoard", + ("hipDeviceAttributeIsMultiGpuBoard", CONV_TYPE, API_RUNTIME), + ), + ( + "cudaDevAttrMultiGpuBoardGroupID", + ( + "hipDeviceAttributeMultiGpuBoardGroupID", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrHostNativeAtomicSupported", + ( + "hipDeviceAttributeHostNativeAtomicSupported", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrSingleToDoublePrecisionPerfRatio", + ( + "hipDeviceAttributeSingleToDoublePrecisionPerfRatio", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrPageableMemoryAccess", + ( + "hipDeviceAttributePageableMemoryAccess", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrConcurrentManagedAccess", + ( + "hipDeviceAttributeConcurrentManagedAccess", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrComputePreemptionSupported", + ( + "hipDeviceAttributeComputePreemptionSupported", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevAttrCanUseHostPointerForRegisteredMem", + ( + "hipDeviceAttributeCanUseHostPointerForRegisteredMem", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaPointerGetAttributes", + ("hipPointerGetAttributes", CONV_MEM, API_RUNTIME), + ), + ( + "cudaHostGetDevicePointer", + ("hipHostGetDevicePointer", CONV_MEM, API_RUNTIME), + ), + ( + "cudaGetDeviceProperties", + ("hipGetDeviceProperties", CONV_DEVICE, API_RUNTIME), + ), + ("cudaDeviceGetPCIBusId", ("hipDeviceGetPCIBusId", CONV_DEVICE, API_RUNTIME)), + ( + "cudaDeviceGetByPCIBusId", + ("hipDeviceGetByPCIBusId", CONV_DEVICE, API_RUNTIME), + ), + ( + "cudaDeviceGetStreamPriorityRange", + ( + "hipDeviceGetStreamPriorityRange", + CONV_DEVICE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaSetValidDevices", + ("hipSetValidDevices", CONV_DEVICE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaDevP2PAttrPerformanceRank", + ( + "hipDeviceP2PAttributePerformanceRank", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevP2PAttrAccessSupported", + ( + "hipDeviceP2PAttributeAccessSupported", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDevP2PAttrNativeAtomicSupported", + ( + "hipDeviceP2PAttributeNativeAtomicSupported", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaDeviceGetP2PAttribute", + ("hipDeviceGetP2PAttribute", CONV_DEVICE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaComputeModeDefault", + ("hipComputeModeDefault", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaComputeModeExclusive", + ("hipComputeModeExclusive", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaComputeModeProhibited", + ("hipComputeModeProhibited", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaComputeModeExclusiveProcess", + ("hipComputeModeExclusiveProcess", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaGetDeviceFlags", + ("hipGetDeviceFlags", CONV_DEVICE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ("cudaSetDeviceFlags", ("hipSetDeviceFlags", CONV_DEVICE, API_RUNTIME)), + ("cudaDeviceScheduleAuto", ("hipDeviceScheduleAuto", CONV_TYPE, API_RUNTIME)), + ("cudaDeviceScheduleSpin", ("hipDeviceScheduleSpin", CONV_TYPE, API_RUNTIME)), + ("cudaDeviceScheduleYield", ("hipDeviceScheduleYield", CONV_TYPE, API_RUNTIME)), + ( + "cudaDeviceBlockingSync", + ("hipDeviceScheduleBlockingSync", CONV_TYPE, API_RUNTIME), + ), + ( + "cudaDeviceScheduleBlockingSync", + ("hipDeviceScheduleBlockingSync", CONV_TYPE, API_RUNTIME), + ), + ( + "cudaDeviceScheduleMask", + ("hipDeviceScheduleMask", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ("cudaDeviceMapHost", ("hipDeviceMapHost", CONV_TYPE, API_RUNTIME)), + ( + "cudaDeviceLmemResizeToMax", + ("hipDeviceLmemResizeToMax", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ("cudaDeviceMask", ("hipDeviceMask", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED)), + ( + "cudaDeviceSetCacheConfig", + ("hipDeviceSetCacheConfig", CONV_CACHE, API_RUNTIME), + ), + ( + "cudaDeviceGetCacheConfig", + ("hipDeviceGetCacheConfig", CONV_CACHE, API_RUNTIME), + ), + ( + "cudaFuncAttributes", + ("hipFuncAttributes", CONV_TYPE, API_RUNTIME), + ), + ( + "cudaFuncAttributeMaxDynamicSharedMemorySize", + ("hipFuncAttributeMaxDynamicSharedMemorySize", CONV_TYPE, API_RUNTIME), + ), + ( + "cudaFuncAttributePreferredSharedMemoryCarveout", + ("hipFuncAttributePreferredSharedMemoryCarveout", CONV_TYPE, API_RUNTIME), + ), + ( + "cudaFuncSetAttribute", + ("hipFuncSetAttribute", CONV_EXEC, API_RUNTIME), + ), + ("cudaFuncSetCacheConfig", ("hipFuncSetCacheConfig", CONV_CACHE, API_RUNTIME)), + ( + "cudaFuncCachePreferNone", + ("hipFuncCachePreferNone", CONV_CACHE, API_RUNTIME), + ), + ( + "cudaFuncCachePreferShared", + ("hipFuncCachePreferShared", CONV_CACHE, API_RUNTIME), + ), + ("cudaFuncCachePreferL1", ("hipFuncCachePreferL1", CONV_CACHE, API_RUNTIME)), + ( + "cudaFuncCachePreferEqual", + ("hipFuncCachePreferEqual", CONV_CACHE, API_RUNTIME), + ), + ( + "cudaFuncGetAttributes", + ("hipFuncGetAttributes", CONV_EXEC, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaFuncSetSharedMemConfig", + ("hipFuncSetSharedMemConfig", CONV_EXEC, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaGetParameterBuffer", + ("hipGetParameterBuffer", CONV_EXEC, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaSetDoubleForDevice", + ("hipSetDoubleForDevice", CONV_EXEC, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaSetDoubleForHost", + ("hipSetDoubleForHost", CONV_EXEC, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaConfigureCall", + ("hipConfigureCall", CONV_EXEC, API_RUNTIME, HIP_UNSUPPORTED), + ), + ("cudaLaunch", ("hipLaunch", CONV_EXEC, API_RUNTIME, HIP_UNSUPPORTED)), + ( + "cudaLaunchCooperativeKernel", + ("hipLaunchCooperativeKernel", CONV_EXEC, API_RUNTIME), + ), + ("cudaLaunchHostFunc", ("hipLaunchHostFunc", CONV_EXEC, API_RUNTIME, HIP_UNSUPPORTED)), + ( + "cudaSetupArgument", + ("hipSetupArgument", CONV_EXEC, API_RUNTIME, HIP_UNSUPPORTED), + ), + ("cudaDriverGetVersion", ("hipDriverGetVersion", CONV_VERSION, API_RUNTIME)), + ( + "cudaRuntimeGetVersion", + ("hipRuntimeGetVersion", CONV_VERSION, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaOccupancyMaxPotentialBlockSize", + ("hipOccupancyMaxPotentialBlockSize", CONV_OCCUPANCY, API_RUNTIME), + ), + ( + "cudaOccupancyMaxPotentialBlockSizeWithFlags", + ( + "hipOccupancyMaxPotentialBlockSizeWithFlags", + CONV_OCCUPANCY, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaOccupancyMaxActiveBlocksPerMultiprocessor", + ( + "hipOccupancyMaxActiveBlocksPerMultiprocessor", + CONV_OCCUPANCY, + API_RUNTIME, + ), + ), + ( + "cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", + ( + "hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", + CONV_OCCUPANCY, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaOccupancyMaxPotentialBlockSizeVariableSMem", + ( + "hipOccupancyMaxPotentialBlockSizeVariableSMem", + CONV_OCCUPANCY, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags", + ( + "hipOccupancyMaxPotentialBlockSizeVariableSMemWithFlags", + CONV_OCCUPANCY, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ("cudaDeviceCanAccessPeer", ("hipDeviceCanAccessPeer", CONV_PEER, API_RUNTIME)), + ( + "cudaDeviceDisablePeerAccess", + ("hipDeviceDisablePeerAccess", CONV_PEER, API_RUNTIME), + ), + ( + "cudaDeviceEnablePeerAccess", + ("hipDeviceEnablePeerAccess", CONV_PEER, API_RUNTIME), + ), + ("cudaMemcpyPeerAsync", ("hipMemcpyPeerAsync", CONV_MEM, API_RUNTIME)), + ("cudaMemcpyPeer", ("hipMemcpyPeer", CONV_MEM, API_RUNTIME)), + ( + "cudaIpcMemLazyEnablePeerAccess", + ("hipIpcMemLazyEnablePeerAccess", CONV_TYPE, API_RUNTIME), + ), + ( + "cudaDeviceSetSharedMemConfig", + ("hipDeviceSetSharedMemConfig", CONV_DEVICE, API_RUNTIME), + ), + ( + "cudaDeviceGetSharedMemConfig", + ("hipDeviceGetSharedMemConfig", CONV_DEVICE, API_RUNTIME), + ), + ( + "cudaSharedMemBankSizeDefault", + ("hipSharedMemBankSizeDefault", CONV_TYPE, API_RUNTIME), + ), + ( + "cudaSharedMemBankSizeFourByte", + ("hipSharedMemBankSizeFourByte", CONV_TYPE, API_RUNTIME), + ), + ( + "cudaSharedMemBankSizeEightByte", + ("hipSharedMemBankSizeEightByte", CONV_TYPE, API_RUNTIME), + ), + ( + "cudaLimitStackSize", + ("hipLimitStackSize", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaLimitPrintfFifoSize", + ("hipLimitPrintfFifoSize", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ("cudaLimitMallocHeapSize", ("hipLimitMallocHeapSize", CONV_TYPE, API_RUNTIME)), + ( + "cudaLimitDevRuntimeSyncDepth", + ("hipLimitDevRuntimeSyncDepth", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaLimitDevRuntimePendingLaunchCount", + ( + "hipLimitDevRuntimePendingLaunchCount", + CONV_TYPE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ("cudaDeviceGetLimit", ("hipDeviceGetLimit", CONV_DEVICE, API_RUNTIME)), + ("cudaProfilerStart", ("hipProfilerStart", CONV_OTHER, API_RUNTIME)), + ("cudaProfilerStop", ("hipProfilerStop", CONV_OTHER, API_RUNTIME)), + ( + "cudaKeyValuePair", + ("hipKeyValuePair", CONV_OTHER, API_RUNTIME, HIP_UNSUPPORTED), + ), + ("cudaCSV", ("hipCSV", CONV_OTHER, API_RUNTIME, HIP_UNSUPPORTED)), + ("cudaReadModeElementType", ("hipReadModeElementType", CONV_TEX, API_RUNTIME)), + ( + "cudaReadModeNormalizedFloat", + ("hipReadModeNormalizedFloat", CONV_TEX, API_RUNTIME), + ), + ("cudaFilterModePoint", ("hipFilterModePoint", CONV_TEX, API_RUNTIME)), + ("cudaFilterModeLinear", ("hipFilterModeLinear", CONV_TEX, API_RUNTIME)), + ("cudaBindTexture", ("hipBindTexture", CONV_TEX, API_RUNTIME)), + ("cudaUnbindTexture", ("hipUnbindTexture", CONV_TEX, API_RUNTIME)), + ("cudaBindTexture2D", ("hipBindTexture2D", CONV_TEX, API_RUNTIME)), + ("cudaBindTextureToArray", ("hipBindTextureToArray", CONV_TEX, API_RUNTIME)), + ( + "cudaBindTextureToMipmappedArray", + ("hipBindTextureToMipmappedArray", CONV_TEX, API_RUNTIME), + ), + ( + "cudaGetTextureAlignmentOffset", + ("hipGetTextureAlignmentOffset", CONV_TEX, API_RUNTIME), + ), + ("cudaGetTextureReference", ("hipGetTextureReference", CONV_TEX, API_RUNTIME)), + ( + "cudaChannelFormatKindSigned", + ("hipChannelFormatKindSigned", CONV_TEX, API_RUNTIME), + ), + ( + "cudaChannelFormatKindUnsigned", + ("hipChannelFormatKindUnsigned", CONV_TEX, API_RUNTIME), + ), + ( + "cudaChannelFormatKindFloat", + ("hipChannelFormatKindFloat", CONV_TEX, API_RUNTIME), + ), + ( + "cudaChannelFormatKindNone", + ("hipChannelFormatKindNone", CONV_TEX, API_RUNTIME), + ), + ("cudaCreateChannelDesc", ("hipCreateChannelDesc", CONV_TEX, API_RUNTIME)), + ("cudaGetChannelDesc", ("hipGetChannelDesc", CONV_TEX, API_RUNTIME)), + ("cudaResourceTypeArray", ("hipResourceTypeArray", CONV_TEX, API_RUNTIME)), + ( + "cudaResourceTypeMipmappedArray", + ("hipResourceTypeMipmappedArray", CONV_TEX, API_RUNTIME), + ), + ("cudaResourceTypeLinear", ("hipResourceTypeLinear", CONV_TEX, API_RUNTIME)), + ("cudaResourceTypePitch2D", ("hipResourceTypePitch2D", CONV_TEX, API_RUNTIME)), + ("cudaResViewFormatNone", ("hipResViewFormatNone", CONV_TEX, API_RUNTIME)), + ( + "cudaResViewFormatUnsignedChar1", + ("hipResViewFormatUnsignedChar1", CONV_TEX, API_RUNTIME), + ), + ( + "cudaResViewFormatUnsignedChar2", + ("hipResViewFormatUnsignedChar2", CONV_TEX, API_RUNTIME), + ), + ( + "cudaResViewFormatUnsignedChar4", + ("hipResViewFormatUnsignedChar4", CONV_TEX, API_RUNTIME), + ), + ( + "cudaResViewFormatSignedChar1", + ("hipResViewFormatSignedChar1", CONV_TEX, API_RUNTIME), + ), + ( + "cudaResViewFormatSignedChar2", + ("hipResViewFormatSignedChar2", CONV_TEX, API_RUNTIME), + ), + ( + "cudaResViewFormatSignedChar4", + ("hipResViewFormatSignedChar4", CONV_TEX, API_RUNTIME), + ), + ( + "cudaResViewFormatUnsignedShort1", + ("hipResViewFormatUnsignedShort1", CONV_TEX, API_RUNTIME), + ), + ( + "cudaResViewFormatUnsignedShort2", + ("hipResViewFormatUnsignedShort2", CONV_TEX, API_RUNTIME), + ), + ( + "cudaResViewFormatUnsignedShort4", + ("hipResViewFormatUnsignedShort4", CONV_TEX, API_RUNTIME), + ), + ( + "cudaResViewFormatSignedShort1", + ("hipResViewFormatSignedShort1", CONV_TEX, API_RUNTIME), + ), + ( + "cudaResViewFormatSignedShort2", + ("hipResViewFormatSignedShort2", CONV_TEX, API_RUNTIME), + ), + ( + "cudaResViewFormatSignedShort4", + ("hipResViewFormatSignedShort4", CONV_TEX, API_RUNTIME), + ), + ( + "cudaResViewFormatUnsignedInt1", + ("hipResViewFormatUnsignedInt1", CONV_TEX, API_RUNTIME), + ), + ( + "cudaResViewFormatUnsignedInt2", + ("hipResViewFormatUnsignedInt2", CONV_TEX, API_RUNTIME), + ), + ( + "cudaResViewFormatUnsignedInt4", + ("hipResViewFormatUnsignedInt4", CONV_TEX, API_RUNTIME), + ), + ( + "cudaResViewFormatSignedInt1", + ("hipResViewFormatSignedInt1", CONV_TEX, API_RUNTIME), + ), + ( + "cudaResViewFormatSignedInt2", + ("hipResViewFormatSignedInt2", CONV_TEX, API_RUNTIME), + ), + ( + "cudaResViewFormatSignedInt4", + ("hipResViewFormatSignedInt4", CONV_TEX, API_RUNTIME), + ), + ("cudaResViewFormatHalf1", ("hipResViewFormatHalf1", CONV_TEX, API_RUNTIME)), + ("cudaResViewFormatHalf2", ("hipResViewFormatHalf2", CONV_TEX, API_RUNTIME)), + ("cudaResViewFormatHalf4", ("hipResViewFormatHalf4", CONV_TEX, API_RUNTIME)), + ("cudaResViewFormatFloat1", ("hipResViewFormatFloat1", CONV_TEX, API_RUNTIME)), + ("cudaResViewFormatFloat2", ("hipResViewFormatFloat2", CONV_TEX, API_RUNTIME)), + ("cudaResViewFormatFloat4", ("hipResViewFormatFloat4", CONV_TEX, API_RUNTIME)), + ( + "cudaResViewFormatUnsignedBlockCompressed1", + ("hipResViewFormatUnsignedBlockCompressed1", CONV_TEX, API_RUNTIME), + ), + ( + "cudaResViewFormatUnsignedBlockCompressed2", + ("hipResViewFormatUnsignedBlockCompressed2", CONV_TEX, API_RUNTIME), + ), + ( + "cudaResViewFormatUnsignedBlockCompressed3", + ("hipResViewFormatUnsignedBlockCompressed3", CONV_TEX, API_RUNTIME), + ), + ( + "cudaResViewFormatUnsignedBlockCompressed4", + ("hipResViewFormatUnsignedBlockCompressed4", CONV_TEX, API_RUNTIME), + ), + ( + "cudaResViewFormatSignedBlockCompressed4", + ("hipResViewFormatSignedBlockCompressed4", CONV_TEX, API_RUNTIME), + ), + ( + "cudaResViewFormatUnsignedBlockCompressed5", + ("hipResViewFormatUnsignedBlockCompressed5", CONV_TEX, API_RUNTIME), + ), + ( + "cudaResViewFormatSignedBlockCompressed5", + ("hipResViewFormatSignedBlockCompressed5", CONV_TEX, API_RUNTIME), + ), + ( + "cudaResViewFormatUnsignedBlockCompressed6H", + ("hipResViewFormatUnsignedBlockCompressed6H", CONV_TEX, API_RUNTIME), + ), + ( + "cudaResViewFormatSignedBlockCompressed6H", + ("hipResViewFormatSignedBlockCompressed6H", CONV_TEX, API_RUNTIME), + ), + ( + "cudaResViewFormatUnsignedBlockCompressed7", + ("hipResViewFormatUnsignedBlockCompressed7", CONV_TEX, API_RUNTIME), + ), + ("cudaAddressModeWrap", ("hipAddressModeWrap", CONV_TEX, API_RUNTIME)), + ("cudaAddressModeClamp", ("hipAddressModeClamp", CONV_TEX, API_RUNTIME)), + ("cudaAddressModeMirror", ("hipAddressModeMirror", CONV_TEX, API_RUNTIME)), + ("cudaAddressModeBorder", ("hipAddressModeBorder", CONV_TEX, API_RUNTIME)), + ("cudaCreateTextureObject", ("hipCreateTextureObject", CONV_TEX, API_RUNTIME)), + ( + "cudaDestroyTextureObject", + ("hipDestroyTextureObject", CONV_TEX, API_RUNTIME), + ), + ( + "cudaGetTextureObjectResourceDesc", + ("hipGetTextureObjectResourceDesc", CONV_TEX, API_RUNTIME), + ), + ( + "cudaGetTextureObjectResourceViewDesc", + ("hipGetTextureObjectResourceViewDesc", CONV_TEX, API_RUNTIME), + ), + ( + "cudaGetTextureObjectTextureDesc", + ("hipGetTextureObjectTextureDesc", CONV_TEX, API_RUNTIME), + ), + ( + "cudaBindSurfaceToArray", + ("hipBindSurfaceToArray", CONV_SURFACE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaGetSurfaceReference", + ("hipGetSurfaceReference", CONV_SURFACE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaBoundaryModeZero", + ("hipBoundaryModeZero", CONV_SURFACE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaBoundaryModeClamp", + ("hipBoundaryModeClamp", CONV_SURFACE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaBoundaryModeTrap", + ("hipBoundaryModeTrap", CONV_SURFACE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaFormatModeForced", + ("hipFormatModeForced", CONV_SURFACE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaFormatModeAuto", + ("hipFormatModeAuto", CONV_SURFACE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaCreateSurfaceObject", + ("hipCreateSurfaceObject", CONV_SURFACE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaDestroySurfaceObject", + ("hipDestroySurfaceObject", CONV_SURFACE, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaGetSurfaceObjectResourceDesc", + ( + "hipGetSurfaceObjectResourceDesc", + CONV_SURFACE, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ("cudaIpcCloseMemHandle", ("hipIpcCloseMemHandle", CONV_DEVICE, API_RUNTIME)), + ("cudaIpcGetEventHandle", ("hipIpcGetEventHandle", CONV_DEVICE, API_RUNTIME)), + ("cudaIpcGetMemHandle", ("hipIpcGetMemHandle", CONV_DEVICE, API_RUNTIME)), + ("cudaIpcOpenEventHandle", ("hipIpcOpenEventHandle", CONV_DEVICE, API_RUNTIME)), + ("cudaIpcOpenMemHandle", ("hipIpcOpenMemHandle", CONV_DEVICE, API_RUNTIME)), + ( + "cudaGLGetDevices", + ("hipGLGetDevices", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaGraphicsGLRegisterBuffer", + ("hipGraphicsGLRegisterBuffer", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaGraphicsGLRegisterImage", + ("hipGraphicsGLRegisterImage", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaWGLGetDevice", + ("hipWGLGetDevice", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaGraphicsMapResources", + ("hipGraphicsMapResources", CONV_GRAPHICS, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaGraphicsResourceGetMappedMipmappedArray", + ( + "hipGraphicsResourceGetMappedMipmappedArray", + CONV_GRAPHICS, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaGraphicsResourceGetMappedPointer", + ( + "hipGraphicsResourceGetMappedPointer", + CONV_GRAPHICS, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaGraphicsResourceSetMapFlags", + ( + "hipGraphicsResourceSetMapFlags", + CONV_GRAPHICS, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaGraphicsSubResourceGetMappedArray", + ( + "hipGraphicsSubResourceGetMappedArray", + CONV_GRAPHICS, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaGraphicsUnmapResources", + ("hipGraphicsUnmapResources", CONV_GRAPHICS, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaGraphicsUnregisterResource", + ( + "hipGraphicsUnregisterResource", + CONV_GRAPHICS, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaGraphicsCubeFacePositiveX", + ( + "hipGraphicsCubeFacePositiveX", + CONV_GRAPHICS, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaGraphicsCubeFaceNegativeX", + ( + "hipGraphicsCubeFaceNegativeX", + CONV_GRAPHICS, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaGraphicsCubeFacePositiveY", + ( + "hipGraphicsCubeFacePositiveY", + CONV_GRAPHICS, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaGraphicsCubeFaceNegativeY", + ( + "hipGraphicsCubeFaceNegativeY", + CONV_GRAPHICS, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaGraphicsCubeFacePositiveZ", + ( + "hipGraphicsCubeFacePositiveZ", + CONV_GRAPHICS, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaGraphicsCubeFaceNegativeZ", + ( + "hipGraphicsCubeFaceNegativeZ", + CONV_GRAPHICS, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaGraphicsMapFlagsNone", + ("hipGraphicsMapFlagsNone", CONV_GRAPHICS, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaGraphicsMapFlagsReadOnly", + ( + "hipGraphicsMapFlagsReadOnly", + CONV_GRAPHICS, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaGraphicsMapFlagsWriteDiscard", + ( + "hipGraphicsMapFlagsWriteDiscard", + CONV_GRAPHICS, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaGraphicsRegisterFlagsNone", + ( + "hipGraphicsRegisterFlagsNone", + CONV_GRAPHICS, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaGraphicsRegisterFlagsReadOnly", + ( + "hipGraphicsRegisterFlagsReadOnly", + CONV_GRAPHICS, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaGraphicsRegisterFlagsWriteDiscard", + ( + "hipGraphicsRegisterFlagsWriteDiscard", + CONV_GRAPHICS, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaGraphicsRegisterFlagsSurfaceLoadStore", + ( + "hipGraphicsRegisterFlagsSurfaceLoadStore", + CONV_GRAPHICS, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaGraphicsRegisterFlagsTextureGather", + ( + "hipGraphicsRegisterFlagsTextureGather", + CONV_GRAPHICS, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaGLDeviceListAll", + ("HIP_GL_DEVICE_LIST_ALL", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaGLDeviceListCurrentFrame", + ("HIP_GL_DEVICE_LIST_CURRENT_FRAME", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaGLDeviceListNextFrame", + ("HIP_GL_DEVICE_LIST_NEXT_FRAME", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaGLGetDevices", + ("hipGLGetDevices", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaGraphicsGLRegisterBuffer", + ("hipGraphicsGLRegisterBuffer", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaGraphicsGLRegisterImage", + ("hipGraphicsGLRegisterImage", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaWGLGetDevice", + ("hipWGLGetDevice", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaGLMapFlagsNone", + ("HIP_GL_MAP_RESOURCE_FLAGS_NONE", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaGLMapFlagsReadOnly", + ( + "HIP_GL_MAP_RESOURCE_FLAGS_READ_ONLY", + CONV_GL, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaGLMapFlagsWriteDiscard", + ( + "HIP_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD", + CONV_GL, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaGLMapBufferObject", + ("hipGLMapBufferObject__", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaGLMapBufferObjectAsync", + ("hipGLMapBufferObjectAsync__", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaGLRegisterBufferObject", + ("hipGLRegisterBufferObject", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaGLSetBufferObjectMapFlags", + ("hipGLSetBufferObjectMapFlags", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaGLSetGLDevice", + ("hipGLSetGLDevice", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaGLUnmapBufferObject", + ("hipGLUnmapBufferObject", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaGLUnmapBufferObjectAsync", + ("hipGLUnmapBufferObjectAsync", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaGLUnregisterBufferObject", + ("hipGLUnregisterBufferObject", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaD3D9DeviceListAll", + ("HIP_D3D9_DEVICE_LIST_ALL", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaD3D9DeviceListCurrentFrame", + ( + "HIP_D3D9_DEVICE_LIST_CURRENT_FRAME", + CONV_D3D9, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaD3D9DeviceListNextFrame", + ( + "HIP_D3D9_DEVICE_LIST_NEXT_FRAME", + CONV_D3D9, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaD3D9GetDevice", + ("hipD3D9GetDevice", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaD3D9GetDevices", + ("hipD3D9GetDevices", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaD3D9GetDirect3DDevice", + ("hipD3D9GetDirect3DDevice", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaD3D9SetDirect3DDevice", + ("hipD3D9SetDirect3DDevice", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaGraphicsD3D9RegisterResource", + ( + "hipGraphicsD3D9RegisterResource", + CONV_D3D9, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaD3D9MapFlags", + ("hipD3D9MapFlags", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaD3D9MapFlagsNone", + ( + "HIP_D3D9_MAPRESOURCE_FLAGS_NONE", + CONV_D3D9, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaD3D9MapFlagsReadOnly", + ( + "HIP_D3D9_MAPRESOURCE_FLAGS_READONLY", + CONV_D3D9, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaD3D9MapFlagsWriteDiscard", + ( + "HIP_D3D9_MAPRESOURCE_FLAGS_WRITEDISCARD", + CONV_D3D9, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaD3D9RegisterFlagsNone", + ("HIP_D3D9_REGISTER_FLAGS_NONE", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaD3D9RegisterFlagsArray", + ("HIP_D3D9_REGISTER_FLAGS_ARRAY", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaD3D9MapResources", + ("hipD3D9MapResources", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaD3D9RegisterResource", + ("hipD3D9RegisterResource", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaD3D9ResourceGetMappedArray", + ("hipD3D9ResourceGetMappedArray", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaD3D9ResourceGetMappedPitch", + ("hipD3D9ResourceGetMappedPitch", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaD3D9ResourceGetMappedPointer", + ( + "hipD3D9ResourceGetMappedPointer", + CONV_D3D9, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaD3D9ResourceGetMappedSize", + ("hipD3D9ResourceGetMappedSize", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaD3D9ResourceGetSurfaceDimensions", + ( + "hipD3D9ResourceGetSurfaceDimensions", + CONV_D3D9, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaD3D9ResourceSetMapFlags", + ("hipD3D9ResourceSetMapFlags", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaD3D9UnmapResources", + ("hipD3D9UnmapResources", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaD3D9UnregisterResource", + ("hipD3D9UnregisterResource", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaD3D10DeviceListAll", + ("HIP_D3D10_DEVICE_LIST_ALL", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaD3D10DeviceListCurrentFrame", + ( + "HIP_D3D10_DEVICE_LIST_CURRENT_FRAME", + CONV_D3D10, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaD3D10DeviceListNextFrame", + ( + "HIP_D3D10_DEVICE_LIST_NEXT_FRAME", + CONV_D3D10, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaD3D10GetDevice", + ("hipD3D10GetDevice", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaD3D10GetDevices", + ("hipD3D10GetDevices", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaGraphicsD3D10RegisterResource", + ( + "hipGraphicsD3D10RegisterResource", + CONV_D3D10, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaD3D10MapFlagsNone", + ( + "HIP_D3D10_MAPRESOURCE_FLAGS_NONE", + CONV_D3D10, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaD3D10MapFlagsReadOnly", + ( + "HIP_D3D10_MAPRESOURCE_FLAGS_READONLY", + CONV_D3D10, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaD3D10MapFlagsWriteDiscard", + ( + "HIP_D3D10_MAPRESOURCE_FLAGS_WRITEDISCARD", + CONV_D3D10, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaD3D10RegisterFlagsNone", + ("HIP_D3D10_REGISTER_FLAGS_NONE", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaD3D10RegisterFlagsArray", + ( + "HIP_D3D10_REGISTER_FLAGS_ARRAY", + CONV_D3D10, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaD3D10GetDirect3DDevice", + ("hipD3D10GetDirect3DDevice", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaD3D10MapResources", + ("hipD3D10MapResources", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaD3D10RegisterResource", + ("hipD3D10RegisterResource", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaD3D10ResourceGetMappedArray", + ( + "hipD3D10ResourceGetMappedArray", + CONV_D3D10, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaD3D10ResourceGetMappedPitch", + ( + "hipD3D10ResourceGetMappedPitch", + CONV_D3D10, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaD3D10ResourceGetMappedPointer", + ( + "hipD3D10ResourceGetMappedPointer", + CONV_D3D10, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaD3D10ResourceGetMappedSize", + ("hipD3D10ResourceGetMappedSize", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaD3D10ResourceGetSurfaceDimensions", + ( + "hipD3D10ResourceGetSurfaceDimensions", + CONV_D3D10, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaD3D10ResourceSetMapFlags", + ("hipD3D10ResourceSetMapFlags", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaD3D10SetDirect3DDevice", + ("hipD3D10SetDirect3DDevice", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaD3D10UnmapResources", + ("hipD3D10UnmapResources", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaD3D10UnregisterResource", + ("hipD3D10UnregisterResource", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaD3D11DeviceListAll", + ("HIP_D3D11_DEVICE_LIST_ALL", CONV_D3D11, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaD3D11DeviceListCurrentFrame", + ( + "HIP_D3D11_DEVICE_LIST_CURRENT_FRAME", + CONV_D3D11, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaD3D11DeviceListNextFrame", + ( + "HIP_D3D11_DEVICE_LIST_NEXT_FRAME", + CONV_D3D11, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaD3D11GetDevice", + ("hipD3D11GetDevice", CONV_D3D11, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaD3D11GetDevices", + ("hipD3D11GetDevices", CONV_D3D11, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaGraphicsD3D11RegisterResource", + ( + "hipGraphicsD3D11RegisterResource", + CONV_D3D11, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaD3D11GetDevice", + ("hipD3D11GetDevice", CONV_D3D11, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaD3D11GetDevices", + ("hipD3D11GetDevices", CONV_D3D11, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaGraphicsD3D11RegisterResource", + ( + "hipGraphicsD3D11RegisterResource", + CONV_D3D11, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaGraphicsVDPAURegisterOutputSurface", + ( + "hipGraphicsVDPAURegisterOutputSurface", + CONV_VDPAU, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaGraphicsVDPAURegisterVideoSurface", + ( + "hipGraphicsVDPAURegisterVideoSurface", + CONV_VDPAU, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaVDPAUGetDevice", + ("hipVDPAUGetDevice", CONV_VDPAU, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaVDPAUSetVDPAUDevice", + ("hipVDPAUSetDevice", CONV_VDPAU, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaEGLStreamConsumerAcquireFrame", + ( + "hipEGLStreamConsumerAcquireFrame", + CONV_EGL, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaEGLStreamConsumerConnect", + ("hipEGLStreamConsumerConnect", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaEGLStreamConsumerConnectWithFlags", + ( + "hipEGLStreamConsumerConnectWithFlags", + CONV_EGL, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaEGLStreamConsumerReleaseFrame", + ( + "hipEGLStreamConsumerReleaseFrame", + CONV_EGL, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaEGLStreamProducerConnect", + ("hipEGLStreamProducerConnect", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaEGLStreamProducerDisconnect", + ("hipEGLStreamProducerDisconnect", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaEGLStreamProducerPresentFrame", + ( + "hipEGLStreamProducerPresentFrame", + CONV_EGL, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ( + "cudaEGLStreamProducerReturnFrame", + ("hipEGLStreamProducerReturnFrame", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaGraphicsEGLRegisterImage", + ("hipGraphicsEGLRegisterImage", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED), + ), + ( + "cudaGraphicsResourceGetMappedEglFrame", + ( + "hipGraphicsResourceGetMappedEglFrame", + CONV_EGL, + API_RUNTIME, + HIP_UNSUPPORTED, + ), + ), + ("cublasInit", ("hipblasInit", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ( + "cublasShutdown", + ("hipblasShutdown", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasGetVersion", + ("hipblasGetVersion", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasGetError", + ("hipblasGetError", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ("cublasAlloc", ("hipblasAlloc", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasFree", ("hipblasFree", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ( + "cublasSetKernelStream", + ("hipblasSetKernelStream", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasGetAtomicsMode", + ("hipblasGetAtomicsMode", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasSetAtomicsMode", + ("hipblasSetAtomicsMode", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasGetMathMode", + ("hipblasGetMathMode", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasSetMathMode", + ("hipblasSetMathMode", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ("CUBLAS_OP_N", ("HIPBLAS_OP_N", CONV_NUMERIC_LITERAL, API_BLAS)), + ( + "CUBLAS_OP_T", + ("HIPBLAS_OP_T", CONV_NUMERIC_LITERAL, API_BLAS), + ), + ( + "CUBLAS_OP_C", + ("HIPBLAS_OP_C", CONV_NUMERIC_LITERAL, API_BLAS), + ), + ( + "CUBLAS_STATUS_SUCCESS", + ("HIPBLAS_STATUS_SUCCESS", CONV_NUMERIC_LITERAL, API_BLAS), + ), + ( + "CUBLAS_STATUS_NOT_INITIALIZED", + ("HIPBLAS_STATUS_NOT_INITIALIZED", CONV_NUMERIC_LITERAL, API_BLAS), + ), + ( + "CUBLAS_STATUS_ALLOC_FAILED", + ("HIPBLAS_STATUS_ALLOC_FAILED", CONV_NUMERIC_LITERAL, API_BLAS), + ), + ( + "CUBLAS_STATUS_INVALID_VALUE", + ("HIPBLAS_STATUS_INVALID_VALUE", CONV_NUMERIC_LITERAL, API_BLAS), + ), + ( + "CUBLAS_STATUS_MAPPING_ERROR", + ("HIPBLAS_STATUS_MAPPING_ERROR", CONV_NUMERIC_LITERAL, API_BLAS), + ), + ( + "CUBLAS_STATUS_EXECUTION_FAILED", + ("HIPBLAS_STATUS_EXECUTION_FAILED", CONV_NUMERIC_LITERAL, API_BLAS), + ), + ( + "CUBLAS_STATUS_INTERNAL_ERROR", + ("HIPBLAS_STATUS_INTERNAL_ERROR", CONV_NUMERIC_LITERAL, API_BLAS), + ), + ( + "CUBLAS_STATUS_NOT_SUPPORTED", + ("HIPBLAS_STATUS_NOT_SUPPORTED", CONV_NUMERIC_LITERAL, API_BLAS), + ), + ( + "CUBLAS_STATUS_ARCH_MISMATCH", + ("HIPBLAS_STATUS_ARCH_MISMATCH", CONV_NUMERIC_LITERAL, API_BLAS), + ), + ( + "CUBLAS_FILL_MODE_LOWER", + ("HIPBLAS_FILL_MODE_LOWER", CONV_NUMERIC_LITERAL, API_BLAS), + ), + ( + "CUBLAS_FILL_MODE_UPPER", + ("HIPBLAS_FILL_MODE_UPPER", CONV_NUMERIC_LITERAL, API_BLAS), + ), + ( + "CUBLAS_DIAG_NON_UNIT", + ("HIPBLAS_DIAG_NON_UNIT", CONV_NUMERIC_LITERAL, API_BLAS), + ), + ("CUBLAS_DIAG_UNIT", ("HIPBLAS_DIAG_UNIT", CONV_NUMERIC_LITERAL, API_BLAS)), + ("CUBLAS_SIDE_LEFT", ("HIPBLAS_SIDE_LEFT", CONV_NUMERIC_LITERAL, API_BLAS)), + ("CUBLAS_SIDE_RIGHT", ("HIPBLAS_SIDE_RIGHT", CONV_NUMERIC_LITERAL, API_BLAS)), + ( + "CUBLAS_POINTER_MODE_HOST", + ("HIPBLAS_POINTER_MODE_HOST", CONV_NUMERIC_LITERAL, API_BLAS), + ), + ( + "CUBLAS_POINTER_MODE_DEVICE", + ("HIPBLAS_POINTER_MODE_DEVICE", CONV_NUMERIC_LITERAL, API_BLAS), + ), + ( + "CUBLAS_ATOMICS_NOT_ALLOWED", + ( + "HIPBLAS_ATOMICS_NOT_ALLOWED", + CONV_NUMERIC_LITERAL, + API_BLAS, + HIP_UNSUPPORTED, + ), + ), + ( + "CUBLAS_ATOMICS_ALLOWED", + ( + "HIPBLAS_ATOMICS_ALLOWED", + CONV_NUMERIC_LITERAL, + API_BLAS, + HIP_UNSUPPORTED, + ), + ), + ( + "CUBLAS_DATA_FLOAT", + ( + "HIPBLAS_DATA_FLOAT", + CONV_NUMERIC_LITERAL, + API_BLAS, + HIP_UNSUPPORTED, + ), + ), + ( + "CUBLAS_DATA_DOUBLE", + ( + "HIPBLAS_DATA_DOUBLE", + CONV_NUMERIC_LITERAL, + API_BLAS, + HIP_UNSUPPORTED, + ), + ), + ( + "CUBLAS_DATA_HALF", + ("HIPBLAS_DATA_HALF", CONV_NUMERIC_LITERAL, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "CUBLAS_DATA_INT8", + ("HIPBLAS_DATA_INT8", CONV_NUMERIC_LITERAL, API_BLAS, HIP_UNSUPPORTED), + ), + ("CUBLAS_GEMM_DEFAULT", ("HIPBLAS_GEMM_DEFAULT", CONV_NUMERIC_LITERAL, API_BLAS)), + ("CUBLAS_GEMM_DEFAULT_TENSOR_OP", ("HIPBLAS_GEMM_DEFAULT", CONV_NUMERIC_LITERAL, API_BLAS)), + ("cublasCreate", ("hipblasCreate", CONV_MATH_FUNC, API_BLAS)), + ("cublasDestroy", ("hipblasDestroy", CONV_MATH_FUNC, API_BLAS)), + ("cublasSetVector", ("hipblasSetVector", CONV_MATH_FUNC, API_BLAS)), + ("cublasGetVector", ("hipblasGetVector", CONV_MATH_FUNC, API_BLAS)), + ( + "cublasSetVectorAsync", + ("hipblasSetVectorAsync", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasGetVectorAsync", + ("hipblasGetVectorAsync", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ("cublasSetMatrix", ("hipblasSetMatrix", CONV_MATH_FUNC, API_BLAS)), + ("cublasGetMatrix", ("hipblasGetMatrix", CONV_MATH_FUNC, API_BLAS)), + ( + "cublasGetMatrixAsync", + ("hipblasGetMatrixAsync", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasSetMatrixAsync", + ("hipblasSetMatrixAsync", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ("cublasXerbla", ("hipblasXerbla", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasSnrm2", ("hipblasSnrm2", CONV_MATH_FUNC, API_BLAS)), + ("cublasDnrm2", ("hipblasDnrm2", CONV_MATH_FUNC, API_BLAS)), + ("cublasScnrm2", ("hipblasScnrm2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasDznrm2", ("hipblasDznrm2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ( + "cublasNrm2Ex", + ("hipblasNrm2Ex", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ("cublasSdot", ("hipblasSdot", CONV_MATH_FUNC, API_BLAS)), + ( + "cublasSdotBatched", + ("hipblasSdotBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ("cublasDdot", ("hipblasDdot", CONV_MATH_FUNC, API_BLAS)), + ( + "cublasDdotBatched", + ("hipblasDdotBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ("cublasCdotu", ("hipblasCdotu", CONV_MATH_FUNC, API_BLAS)), + ("cublasCdotc", ("hipblasCdotc", CONV_MATH_FUNC, API_BLAS)), + ("cublasZdotu", ("hipblasZdotu", CONV_MATH_FUNC, API_BLAS)), + ("cublasZdotc", ("hipblasZdotc", CONV_MATH_FUNC, API_BLAS)), + ("cublasSscal", ("hipblasSscal", CONV_MATH_FUNC, API_BLAS)), + ( + "cublasSscalBatched", + ("hipblasSscalBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ("cublasDscal", ("hipblasDscal", CONV_MATH_FUNC, API_BLAS)), + ( + "cublasDscalBatched", + ("hipblasDscalBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ("cublasCscal", ("hipblasCscal", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasCsscal", ("hipblasCsscal", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZscal", ("hipblasZscal", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZdscal", ("hipblasZdscal", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasSaxpy", ("hipblasSaxpy", CONV_MATH_FUNC, API_BLAS)), + ( + "cublasSaxpyBatched", + ("hipblasSaxpyBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ("cublasDaxpy", ("hipblasDaxpy", CONV_MATH_FUNC, API_BLAS)), + ("cublasCaxpy", ("hipblasCaxpy", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZaxpy", ("hipblasZaxpy", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasScopy", ("hipblasScopy", CONV_MATH_FUNC, API_BLAS)), + ( + "cublasScopyBatched", + ("hipblasScopyBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ("cublasDcopy", ("hipblasDcopy", CONV_MATH_FUNC, API_BLAS)), + ( + "cublasDcopyBatched", + ("hipblasDcopyBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ("cublasCcopy", ("hipblasCcopy", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZcopy", ("hipblasZcopy", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasSswap", ("hipblasSswap", CONV_MATH_FUNC, API_BLAS)), + ("cublasDswap", ("hipblasDswap", CONV_MATH_FUNC, API_BLAS)), + ("cublasCswap", ("hipblasCswap", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZswap", ("hipblasZswap", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasIsamax", ("hipblasIsamax", CONV_MATH_FUNC, API_BLAS)), + ("cublasIdamax", ("hipblasIdamax", CONV_MATH_FUNC, API_BLAS)), + ("cublasIcamax", ("hipblasIcamax", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasIzamax", ("hipblasIzamax", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasIsamin", ("hipblasIsamin", CONV_MATH_FUNC, API_BLAS)), + ("cublasIdamin", ("hipblasIdamin", CONV_MATH_FUNC, API_BLAS)), + ("cublasIcamin", ("hipblasIcamin", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasIzamin", ("hipblasIzamin", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasSasum", ("hipblasSasum", CONV_MATH_FUNC, API_BLAS)), + ( + "cublasSasumBatched", + ("hipblasSasumBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ("cublasDasum", ("hipblasDasum", CONV_MATH_FUNC, API_BLAS)), + ( + "cublasDasumBatched", + ("hipblasDasumBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ("cublasScasum", ("hipblasScasum", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasDzasum", ("hipblasDzasum", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasSrot", ("hipblasSrot", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasDrot", ("hipblasDrot", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasCrot", ("hipblasCrot", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasCsrot", ("hipblasCsrot", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZrot", ("hipblasZrot", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZdrot", ("hipblasZdrot", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasSrotg", ("hipblasSrotg", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasDrotg", ("hipblasDrotg", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasCrotg", ("hipblasCrotg", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZrotg", ("hipblasZrotg", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasSrotm", ("hipblasSrotm", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasDrotm", ("hipblasDrotm", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasSrotmg", ("hipblasSrotmg", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasDrotmg", ("hipblasDrotmg", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasSgemv", ("hipblasSgemv", CONV_MATH_FUNC, API_BLAS)), + ( + "cublasSgemvBatched", + ("hipblasSgemvBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ("cublasDgemv", ("hipblasDgemv", CONV_MATH_FUNC, API_BLAS)), + ("cublasCgemv", ("hipblasCgemv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZgemv", ("hipblasZgemv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasSgbmv", ("hipblasSgbmv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasDgbmv", ("hipblasDgbmv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasCgbmv", ("hipblasCgbmv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZgbmv", ("hipblasZgbmv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasStrmv", ("hipblasStrmv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasDtrmv", ("hipblasDtrmv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasCtrmv", ("hipblasCtrmv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZtrmv", ("hipblasZtrmv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasStbmv", ("hipblasStbmv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasDtbmv", ("hipblasDtbmv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasCtbmv", ("hipblasCtbmv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZtbmv", ("hipblasZtbmv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasStpmv", ("hipblasStpmv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasDtpmv", ("hipblasDtpmv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasCtpmv", ("hipblasCtpmv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZtpmv", ("hipblasZtpmv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasStrsv", ("hipblasStrsv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasDtrsv", ("hipblasDtrsv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasCtrsv", ("hipblasCtrsv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZtrsv", ("hipblasZtrsv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasStpsv", ("hipblasStpsv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasDtpsv", ("hipblasDtpsv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasCtpsv", ("hipblasCtpsv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZtpsv", ("hipblasZtpsv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasStbsv", ("hipblasStbsv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasDtbsv", ("hipblasDtbsv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasCtbsv", ("hipblasCtbsv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZtbsv", ("hipblasZtbsv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasSsymv", ("hipblasSsymv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasDsymv", ("hipblasDsymv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasCsymv", ("hipblasCsymv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZsymv", ("hipblasZsymv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasChemv", ("hipblasChemv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZhemv", ("hipblasZhemv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasSsbmv", ("hipblasSsbmv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasDsbmv", ("hipblasDsbmv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasChbmv", ("hipblasChbmv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZhbmv", ("hipblasZhbmv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasSspmv", ("hipblasSspmv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasDspmv", ("hipblasDspmv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasChpmv", ("hipblasChpmv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZhpmv", ("hipblasZhpmv", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasSger", ("hipblasSger", CONV_MATH_FUNC, API_BLAS)), + ("cublasDger", ("hipblasDger", CONV_MATH_FUNC, API_BLAS)), + ("cublasCgeru", ("hipblasCgeru", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasCgerc", ("hipblasCgerc", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZgeru", ("hipblasZgeru", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZgerc", ("hipblasZgerc", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasSsyr", ("hipblasSsyr", CONV_MATH_FUNC, API_BLAS)), + ("cublasDsyr", ("hipblasDsyr", CONV_MATH_FUNC, API_BLAS)), + ("cublasCher", ("hipblasCher", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZher", ("hipblasZher", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasSspr", ("hipblasSspr", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasDspr", ("hipblasDspr", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasChpr", ("hipblasChpr", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZhpr", ("hipblasZhpr", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasSsyr2", ("hipblasSsyr2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasDsyr2", ("hipblasDsyr2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasCher2", ("hipblasCher2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZher2", ("hipblasZher2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasSspr2", ("hipblasSspr2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasDspr2", ("hipblasDspr2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasChpr2", ("hipblasChpr2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZhpr2", ("hipblasZhpr2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ( + "cublasSgemmBatched", + ("hipblasSgemmBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasDgemmBatched", + ("hipblasDgemmBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasHgemmBatched", + ("hipblasHgemmBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasSgemmStridedBatched", + ("hipblasSgemmStridedBatched", CONV_MATH_FUNC, API_BLAS), + ), + ( + "cublasDgemmStridedBatched", + ("hipblasDgemmStridedBatched", CONV_MATH_FUNC, API_BLAS), + ), + ( + "cublasHgemmStridedBatched", + ("hipblasHgemmStridedBatched", CONV_MATH_FUNC, API_BLAS), + ), + ( + "cublasCgemmBatched", + ("hipblasCgemmBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCgemm3mBatched", + ("hipblasCgemm3mBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZgemmBatched", + ("hipblasZgemmBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCgemmStridedBatched", + ( + "hipblasCgemmStridedBatched", + CONV_MATH_FUNC, + API_BLAS, + HIP_UNSUPPORTED, + ), + ), + ( + "cublasCgemm3mStridedBatched", + ( + "hipblasCgemm3mStridedBatched", + CONV_MATH_FUNC, + API_BLAS, + HIP_UNSUPPORTED, + ), + ), + ( + "cublasZgemmStridedBatched", + ( + "hipblasZgemmStridedBatched", + CONV_MATH_FUNC, + API_BLAS, + HIP_UNSUPPORTED, + ), + ), + ( + "cublasHgemmStridedBatched", + ( + "hipblasHgemmStridedBatched", + CONV_MATH_FUNC, + API_BLAS, + HIP_UNSUPPORTED, + ), + ), + ("cublasSgemm", ("hipblasSgemm", CONV_MATH_FUNC, API_BLAS)), + ("cublasDgemm", ("hipblasDgemm", CONV_MATH_FUNC, API_BLAS)), + ("cublasCgemm", ("hipblasCgemm", CONV_MATH_FUNC, API_BLAS)), + ("cublasZgemm", ("hipblasZgemm", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasHgemm", ("hipblasHgemm", CONV_MATH_FUNC, API_BLAS)), + ("cublasSsyrk", ("hipblasSsyrk", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasDsyrk", ("hipblasDsyrk", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasCsyrk", ("hipblasCsyrk", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZsyrk", ("hipblasZsyrk", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasCherk", ("hipblasCherk", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZherk", ("hipblasZherk", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasSsyr2k", ("hipblasSsyr2k", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasDsyr2k", ("hipblasDsyr2k", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasCsyr2k", ("hipblasCsyr2k", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZsyr2k", ("hipblasZyr2k", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasSsyrkx", ("hipblasSsyrkx", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasDsyrkx", ("hipblasDsyrkx", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasCsyrkx", ("hipblasCsyrkx", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZsyrkx", ("hipblasZsyrkx", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasCher2k", ("hipblasCher2k", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZher2k", ("hipblasZher2k", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasCherkx", ("hipblasCherkx", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZherkx", ("hipblasZherkx", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasSsymm", ("hipblasSsymm", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasDsymm", ("hipblasDsymm", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasCsymm", ("hipblasCsymm", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZsymm", ("hipblasZsymm", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasChemm", ("hipblasChemm", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZhemm", ("hipblasZhemm", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasStrsm", ("hipblasStrsm", CONV_MATH_FUNC, API_BLAS)), + ("cublasDtrsm", ("hipblasDtrsm", CONV_MATH_FUNC, API_BLAS)), + ("cublasCtrsm", ("hipblasCtrsm", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZtrsm", ("hipblasZtrsm", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ( + "cublasStrsmBatched", + ("hipblasStrsmBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasDtrsmBatched", + ("hipblasDtrsmBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCtrsmBatched", + ("hipblasCtrsmBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZtrsmBatched", + ("hipblasZtrsmBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ("cublasStrmm", ("hipblasStrmm", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasDtrmm", ("hipblasDtrmm", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasCtrmm", ("hipblasCtrmm", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZtrmm", ("hipblasZtrmm", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasSgeam", ("hipblasSgeam", CONV_MATH_FUNC, API_BLAS)), + ("cublasDgeam", ("hipblasDgeam", CONV_MATH_FUNC, API_BLAS)), + ("cublasCgeam", ("hipblasCgeam", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZgeam", ("hipblasZgeam", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ( + "cublasSgetrfBatched", + ("hipblasSgetrfBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasDgetrfBatched", + ("hipblasDgetrfBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCgetrfBatched", + ("hipblasCgetrfBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZgetrfBatched", + ("hipblasZgetrfBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasSgetriBatched", + ("hipblasSgetriBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasDgetriBatched", + ("hipblasDgetriBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCgetriBatched", + ("hipblasCgetriBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZgetriBatched", + ("hipblasZgetriBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasSgetrsBatched", + ("hipblasSgetrsBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasDgetrsBatched", + ("hipblasDgetrsBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCgetrsBatched", + ("hipblasCgetrsBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZgetrsBatched", + ("hipblasZgetrsBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasStrsmBatched", + ("hipblasStrsmBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasDtrsmBatched", + ("hipblasDtrsmBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCtrsmBatched", + ("hipblasCtrsmBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZtrsmBatched", + ("hipblasZtrsmBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasSmatinvBatched", + ("hipblasSmatinvBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasDmatinvBatched", + ("hipblasDmatinvBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCmatinvBatched", + ("hipblasCmatinvBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZmatinvBatched", + ("hipblasZmatinvBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasSgeqrfBatched", + ("hipblasSgeqrfBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasDgeqrfBatched", + ("hipblasDgeqrfBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCgeqrfBatched", + ("hipblasCgeqrfBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZgeqrfBatched", + ("hipblasZgeqrfBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasSgelsBatched", + ("hipblasSgelsBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasDgelsBatched", + ("hipblasDgelsBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCgelsBatched", + ("hipblasCgelsBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZgelsBatched", + ("hipblasZgelsBatched", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ("cublasSdgmm", ("hipblasSdgmm", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasDdgmm", ("hipblasDdgmm", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasCdgmm", ("hipblasCdgmm", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZdgmm", ("hipblasZdgmm", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasStpttr", ("hipblasStpttr", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasDtpttr", ("hipblasDtpttr", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasCtpttr", ("hipblasCtpttr", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZtpttr", ("hipblasZtpttr", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasStrttp", ("hipblasStrttp", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasDtrttp", ("hipblasDtrttp", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasCtrttp", ("hipblasCtrttp", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZtrttp", ("hipblasZtrttp", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasCreate_v2", ("hipblasCreate_v2", CONV_MATH_FUNC, API_BLAS)), + ("cublasDestroy_v2", ("hipblasDestroy_v2", CONV_MATH_FUNC, API_BLAS)), + ( + "cublasGetVersion_v2", + ("hipblasGetVersion_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ("cublasSetWorkspace", ("hipblasSetWorkspace", CONV_MATH_FUNC, API_BLAS)), + ("cublasSetStream", ("hipblasSetStream", CONV_MATH_FUNC, API_BLAS)), + ("cublasGetStream", ("hipblasGetStream", CONV_MATH_FUNC, API_BLAS)), + ("cublasSetStream_v2", ("hipblasSetStream_v2", CONV_MATH_FUNC, API_BLAS)), + ("cublasGetStream_v2", ("hipblasGetStream_v2", CONV_MATH_FUNC, API_BLAS)), + ( + "cublasGetPointerMode", + ("hipblasGetPointerMode", CONV_MATH_FUNC, API_BLAS), + ), + ( + "cublasSetPointerMode", + ("hipblasSetPointerMode", CONV_MATH_FUNC, API_BLAS), + ), + ( + "cublasGetPointerMode_v2", + ("hipblasGetPointerMode_v2", CONV_MATH_FUNC, API_BLAS), + ), + ( + "cublasSetPointerMode_v2", + ("hipblasSetPointerMode_v2", CONV_MATH_FUNC, API_BLAS), + ), + ("cublasSgemv_v2", ("hipblasSgemv_v2", CONV_MATH_FUNC, API_BLAS)), + ("cublasDgemv_v2", ("hipblasDgemv_v2", CONV_MATH_FUNC, API_BLAS)), + ( + "cublasCgemv_v2", + ("hipblasCgemv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZgemv_v2", + ("hipblasZgemv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasSgbmv_v2", + ("hipblasSgbmv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasDgbmv_v2", + ("hipblasDgbmv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCgbmv_v2", + ("hipblasCgbmv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZgbmv_v2", + ("hipblasZgbmv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasStrmv_v2", + ("hipblasStrmv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasDtrmv_v2", + ("hipblasDtrmv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCtrmv_v2", + ("hipblasCtrmv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZtrmv_v2", + ("hipblasZtrmv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasStbmv_v2", + ("hipblasStbmv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasDtbmv_v2", + ("hipblasDtbmv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCtbmv_v2", + ("hipblasCtbmv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZtbmv_v2", + ("hipblasZtbmv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasStpmv_v2", + ("hipblasStpmv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasDtpmv_v2", + ("hipblasDtpmv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCtpmv_v2", + ("hipblasCtpmv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZtpmv_v2", + ("hipblasZtpmv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasStrsv_v2", + ("hipblasStrsv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasDtrsv_v2", + ("hipblasDtrsv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCtrsv_v2", + ("hipblasCtrsv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZtrsv_v2", + ("hipblasZtrsv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasStpsv_v2", + ("hipblasStpsv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasDtpsv_v2", + ("hipblasDtpsv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCtpsv_v2", + ("hipblasCtpsv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZtpsv_v2", + ("hipblasZtpsv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasStbsv_v2", + ("hipblasStbsv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasDtbsv_v2", + ("hipblasDtbsv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCtbsv_v2", + ("hipblasCtbsv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZtbsv_v2", + ("hipblasZtbsv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasSsymv_v2", + ("hipblasSsymv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasDsymv_v2", + ("hipblasDsymv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCsymv_v2", + ("hipblasCsymv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZsymv_v2", + ("hipblasZsymv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasChemv_v2", + ("hipblasChemv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZhemv_v2", + ("hipblasZhemv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasSsbmv_v2", + ("hipblasSsbmv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasDsbmv_v2", + ("hipblasDsbmv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasChbmv_v2", + ("hipblasChbmv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZhbmv_v2", + ("hipblasZhbmv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasSspmv_v2", + ("hipblasSspmv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasDspmv_v2", + ("hipblasDspmv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasChpmv_v2", + ("hipblasChpmv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZhpmv_v2", + ("hipblasZhpmv_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ("cublasSger_v2", ("hipblasSger_v2", CONV_MATH_FUNC, API_BLAS)), + ("cublasDger_v2", ("hipblasDger_v2", CONV_MATH_FUNC, API_BLAS)), + ( + "cublasCgeru_v2", + ("hipblasCgeru_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCgerc_v2", + ("hipblasCergc_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZgeru_v2", + ("hipblasZgeru_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZgerc_v2", + ("hipblasZgerc_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ("cublasSsyr_v2", ("hipblasSsyr_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasDsyr_v2", ("hipblasDsyr_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasCsyr_v2", ("hipblasCsyr_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZsyr_v2", ("hipblasZsyr_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasCher_v2", ("hipblasCher_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZher_v2", ("hipblasZher_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasSspr_v2", ("hipblasSspr_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasDspr_v2", ("hipblasDspr_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasChpr_v2", ("hipblasChpr_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasZhpr_v2", ("hipblasZhpr_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ( + "cublasSsyr2_v2", + ("hipblasSsyr2_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasDsyr2_v2", + ("hipblasDsyr2_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCsyr2_v2", + ("hipblasCsyr2_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZsyr2_v2", + ("hipblasZsyr2_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCher2_v2", + ("hipblasCher2_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZher2_v2", + ("hipblasZher2_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasSspr2_v2", + ("hipblasSspr2_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasDspr2_v2", + ("hipblasDspr2_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasChpr2_v2", + ("hipblasChpr2_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZhpr2_v2", + ("hipblasZhpr2_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ("cublasSgemm_v2", ("hipblasSgemm_v2", CONV_MATH_FUNC, API_BLAS)), + ("cublasDgemm_v2", ("hipblasDgemm_v2", CONV_MATH_FUNC, API_BLAS)), + ( + "cublasCgemm_v2", + ("hipblasCgemm_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCgemm3m", + ("hipblasCgemm3m", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCgemm3mEx", + ("hipblasCgemm3mEx", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZgemm_v2", + ("hipblasZgemm_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZgemm3m", + ("hipblasZgemm3m", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasSgemmEx", + ("hipblasSgemmEx", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ("cublasGemmEx", ("hipblasGemmEx", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ( + "cublasGemmBatchedEx", + ("hipblasGemmBatchedEx", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasGemmStridedBatchedEx", + ("hipblasGemmStridedBatchedEx", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCgemmEx", + ("hipblasCgemmEx", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasUint8gemmBias", + ("hipblasUint8gemmBias", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasSsyrk_v2", + ("hipblasSsyrk_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasDsyrk_v2", + ("hipblasDsyrk_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCsyrk_v2", + ("hipblasCsyrk_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZsyrk_v2", + ("hipblasZsyrk_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCsyrkEx", + ("hipblasCsyrkEx", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCsyrk3mEx", + ("hipblasCsyrk3mEx", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCherk_v2", + ("hipblasCherk_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCherkEx", + ("hipblasCherkEx", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCherk3mEx", + ("hipblasCherk3mEx", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZherk_v2", + ("hipblasZherk_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasSsyr2k_v2", + ("hipblasSsyr2k_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasDsyr2k_v2", + ("hipblasDsyr2k_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCsyr2k_v2", + ("hipblasCsyr2k_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZsyr2k_v2", + ("hipblasZsyr2k_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCher2k_v2", + ("hipblasCher2k_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZher2k_v2", + ("hipblasZher2k_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasSsymm_v2", + ("hipblasSsymm_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasDsymm_v2", + ("hipblasDsymm_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCsymm_v2", + ("hipblasCsymm_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZsymm_v2", + ("hipblasZsymm_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasChemm_v2", + ("hipblasChemm_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZhemm_v2", + ("hipblasZhemm_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasStrsm_v2", + ("hipblasStrsm_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasDtrsm_v2", + ("hipblasDtrsm_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCtrsm_v2", + ("hipblasCtrsm_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZtrsm_v2", + ("hipblasZtrsm_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasStrmm_v2", + ("hipblasStrmm_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasDtrmm_v2", + ("hipblasDtrmm_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCtrmm_v2", + ("hipblasCtrmm_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZtrmm_v2", + ("hipblasZtrmm_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ("cublasSnrm2_v2", ("hipblasSnrm2_v2", CONV_MATH_FUNC, API_BLAS)), + ("cublasDnrm2_v2", ("hipblasDnrm2_v2", CONV_MATH_FUNC, API_BLAS)), + ( + "cublasScnrm2_v2", + ("hipblasScnrm2_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasDznrm2_v2", + ("hipblasDznrm2_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ("cublasDotEx", ("hipblasDotEx", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasDotcEx", ("hipblasDotcEx", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasSdot_v2", ("hipblasSdot_v2", CONV_MATH_FUNC, API_BLAS)), + ("cublasDdot_v2", ("hipblasDdot_v2", CONV_MATH_FUNC, API_BLAS)), + ( + "cublasCdotu_v2", + ("hipblasCdotu_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCdotc_v2", + ("hipblasCdotc_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZdotu_v2", + ("hipblasZdotu_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZdotc_v2", + ("hipblasZdotc_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ("cublasScalEx", ("hipblasScalEx", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasSscal_v2", ("hipblasSscal_v2", CONV_MATH_FUNC, API_BLAS)), + ("cublasDscal_v2", ("hipblasDscal_v2", CONV_MATH_FUNC, API_BLAS)), + ( + "cublasCscal_v2", + ("hipblasCscal_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCsscal_v2", + ("hipblasCsscal_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZscal_v2", + ("hipblasZcsal_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZdscal_v2", + ("hipblasZdscal_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ("cublasAxpyEx", ("hipblasAxpyEx", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasSaxpy_v2", ("hipblasSaxpy_v2", CONV_MATH_FUNC, API_BLAS)), + ("cublasDaxpy_v2", ("hipblasDaxpy_v2", CONV_MATH_FUNC, API_BLAS)), + ( + "cublasCaxpy_v2", + ("hipblasCaxpy_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZaxpy_v2", + ("hipblasZaxpy_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ("cublasScopy_v2", ("hipblasScopy_v2", CONV_MATH_FUNC, API_BLAS)), + ("cublasDcopy_v2", ("hipblasDcopy_v2", CONV_MATH_FUNC, API_BLAS)), + ( + "cublasCcopy_v2", + ("hipblasCcopy_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZcopy_v2", + ("hipblasZcopy_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ("cublasSswap_v2", ("hipblasSswap_v2", CONV_MATH_FUNC, API_BLAS)), + ("cublasDswap_v2", ("hipblasDswap_v2", CONV_MATH_FUNC, API_BLAS)), + ( + "cublasCswap_v2", + ("hipblasCswap_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZswap_v2", + ("hipblasZswap_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ("cublasIsamax_v2", ("hipblasIsamax_v2", CONV_MATH_FUNC, API_BLAS)), + ("cublasIdamax_v2", ("hipblasIdamax_v2", CONV_MATH_FUNC, API_BLAS)), + ( + "cublasIcamax_v2", + ("hipblasIcamax_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasIzamax_v2", + ("hipblasIzamax_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ("cublasIsamin_v2", ("hipblasIsamin_v2", CONV_MATH_FUNC, API_BLAS)), + ("cublasIdamin_v2", ("hipblasIdamin_v2", CONV_MATH_FUNC, API_BLAS)), + ( + "cublasIcamin_v2", + ("hipblasIcamin_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasIzamin_v2", + ("hipblasIzamin_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ("cublasSasum_v2", ("hipblasSasum_v2", CONV_MATH_FUNC, API_BLAS)), + ("cublasDasum_v2", ("hipblasDasum_v2", CONV_MATH_FUNC, API_BLAS)), + ( + "cublasScasum_v2", + ("hipblasScasum_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasDzasum_v2", + ("hipblasDzasum_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ("cublasSrot_v2", ("hipblasSrot_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasDrot_v2", ("hipblasDrot_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ("cublasCrot_v2", ("hipblasCrot_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ( + "cublasCsrot_v2", + ("hipblasCsrot_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ("cublasZrot_v2", ("hipblasZrot_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED)), + ( + "cublasZdrot_v2", + ("hipblasZdrot_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasSrotg_v2", + ("hipblasSrotg_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasDrotg_v2", + ("hipblasDrotg_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasCrotg_v2", + ("hipblasCrotg_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasZrotg_v2", + ("hipblasZrotg_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasSrotm_v2", + ("hipblasSrotm_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasDrotm_v2", + ("hipblasDrotm_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasSrotmg_v2", + ("hipblasSrotmg_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasDrotmg_v2", + ("hipblasDrotmg_v2", CONV_MATH_FUNC, API_BLAS, HIP_UNSUPPORTED), + ), + ( + "cublasComputeType_t", + ("hipblasComputeType_t", CONV_MATH_FUNC, API_BLAS) + ), + ( + "CUBLAS_COMPUTE_32I", + ("HIPBLAS_COMPUTE_32I", CONV_MATH_FUNC, API_BLAS) + ), + ( + "CUBLAS_COMPUTE_32F", + ("HIPBLAS_COMPUTE_32F", CONV_MATH_FUNC, API_BLAS) + ), + ( + "CUBLAS_COMPUTE_32F_FAST_TF32", + ("HIPBLAS_COMPUTE_32F_FAST_TF32", CONV_MATH_FUNC, API_BLAS) + ), + ( + "CUBLAS_COMPUTE_64F", + ("HIPBLAS_COMPUTE_64F", CONV_MATH_FUNC, API_BLAS) + ), + ("cublasLtEpilogue_t", ("hipblasLtEpilogue_t", CONV_MATH_FUNC, API_BLAS)), + ("CUBLASLT_EPILOGUE_DEFAULT", ("HIPBLASLT_EPILOGUE_DEFAULT", CONV_MATH_FUNC, API_BLAS)), + ("CUBLASLT_EPILOGUE_RELU", ("HIPBLASLT_EPILOGUE_RELU", CONV_MATH_FUNC, API_BLAS)), + ("CUBLASLT_EPILOGUE_BIAS", ("HIPBLASLT_EPILOGUE_BIAS", CONV_MATH_FUNC, API_BLAS)), + ("CUBLASLT_EPILOGUE_RELU_BIAS", ("HIPBLASLT_EPILOGUE_RELU_BIAS", CONV_MATH_FUNC, API_BLAS)), + ("CUBLASLT_EPILOGUE_GELU", ("HIPBLASLT_EPILOGUE_GELU", CONV_MATH_FUNC, API_BLAS)), + ("CUBLASLT_EPILOGUE_GELU_BIAS", ("HIPBLASLT_EPILOGUE_GELU_BIAS", CONV_MATH_FUNC, API_BLAS)), + ("cublasLtHandle_t", ("hipblasLtHandle_t", CONV_MATH_FUNC, API_BLAS)), + ("cublasLtMatmulDesc_t", ("hipblasLtMatmulDesc_t", CONV_MATH_FUNC, API_BLAS)), + ("cublasLtMatmulDescOpaque_t", ("hipblasLtMatmulDescOpaque_t", CONV_MATH_FUNC, API_BLAS)), + ("cublasLtMatmulDescAttributes_t", ("hipblasLtMatmulDescAttributes_t", CONV_MATH_FUNC, API_BLAS)), + ("CUBLASLT_MATMUL_DESC_TRANSA", ("HIPBLASLT_MATMUL_DESC_TRANSA", CONV_MATH_FUNC, API_BLAS)), + ("CUBLASLT_MATMUL_DESC_TRANSB", ("HIPBLASLT_MATMUL_DESC_TRANSB", CONV_MATH_FUNC, API_BLAS)), + ("CUBLASLT_MATMUL_DESC_EPILOGUE", ("HIPBLASLT_MATMUL_DESC_EPILOGUE", CONV_MATH_FUNC, API_BLAS)), + ("CUBLASLT_MATMUL_DESC_BIAS_POINTER", ("HIPBLASLT_MATMUL_DESC_BIAS_POINTER", CONV_MATH_FUNC, API_BLAS)), + ("CUBLASLT_MATMUL_DESC_A_SCALE_POINTER", ("HIPBLASLT_MATMUL_DESC_A_SCALE_POINTER", CONV_MATH_FUNC, API_BLAS)), + ("CUBLASLT_MATMUL_DESC_B_SCALE_POINTER", ("HIPBLASLT_MATMUL_DESC_B_SCALE_POINTER", CONV_MATH_FUNC, API_BLAS)), + ("CUBLASLT_MATMUL_DESC_D_SCALE_POINTER", ("HIPBLASLT_MATMUL_DESC_D_SCALE_POINTER", CONV_MATH_FUNC, API_BLAS)), + ("CUBLASLT_MATMUL_DESC_A_SCALE_MODE", ("HIPBLASLT_MATMUL_DESC_A_SCALE_MODE", CONV_MATH_FUNC, API_BLAS)), + ("CUBLASLT_MATMUL_DESC_B_SCALE_MODE", ("HIPBLASLT_MATMUL_DESC_B_SCALE_MODE", CONV_MATH_FUNC, API_BLAS)), + ("CUBLASLT_MATMUL_MATRIX_SCALE_OUTER_VEC_32F", ("HIPBLASLT_MATMUL_MATRIX_SCALE_OUTER_VEC_32F", CONV_MATH_FUNC, API_BLAS)), + ("CUBLASLT_MATMUL_DESC_AMAX_D_POINTER", ("HIPBLASLT_MATMUL_DESC_AMAX_D_POINTER", CONV_MATH_FUNC, API_BLAS)), + ("CUBLASLT_MATMUL_DESC_BIAS_DATA_TYPE", ("HIPBLASLT_MATMUL_DESC_BIAS_DATA_TYPE", CONV_MATH_FUNC, API_BLAS)), + ("CUBLASLT_MATMUL_DESC_A_SCALE_MODE", ("HIPBLASLT_MATMUL_DESC_A_SCALE_MODE", CONV_MATH_FUNC, API_BLAS)), + ("CUBLASLT_MATMUL_DESC_B_SCALE_MODE", ("HIPBLASLT_MATMUL_DESC_B_SCALE_MODE", CONV_MATH_FUNC, API_BLAS)), + ("CUBLASLT_MATMUL_DESC_POINTER_MODE", ("HIPBLASLT_MATMUL_DESC_POINTER_MODE", CONV_MATH_FUNC, API_BLAS)), + ("CUBLASLT_MATMUL_MATRIX_SCALE_VEC32_UE8M0", ("HIPBLASLT_MATMUL_MATRIX_SCALE_VEC32_UE8M0", CONV_MATH_FUNC, API_BLAS)), + ("CUBLASLT_MATMUL_MATRIX_SCALE_VEC16_UE4M3", ("HIPBLASLT_MATMUL_MATRIX_SCALE_VEC16_UE4M3", CONV_MATH_FUNC, API_BLAS)), + ("CUBLASLT_POINTER_MODE_DEVICE", ("HIPBLASLT_POINTER_MODE_DEVICE", CONV_NUMERIC_LITERAL, API_BLAS)), + ("CUBLASLT_POINTER_MODE_HOST", ("HIPBLASLT_POINTER_MODE_HOST", CONV_NUMERIC_LITERAL, API_BLAS)), + ("cublasLtMatrixLayout_t", ("hipblasLtMatrixLayout_t", CONV_MATH_FUNC, API_BLAS)), + ("cublasLtMatrixLayoutOpaque_t", ("hipblasLtMatrixLayoutOpaque_t", CONV_MATH_FUNC, API_BLAS)), + ("cublasLtMatrixLayoutAttribute_t", ("hipblasLtMatrixLayoutAttribute_t", CONV_MATH_FUNC, API_BLAS)), + ("cublasLtMatrixLayoutCreate", ("hipblasLtMatrixLayoutCreate", CONV_MATH_FUNC, API_BLAS)), + ("cublasLtMatrixLayoutDestroy", ("hipblasLtMatrixLayoutDestroy", CONV_MATH_FUNC, API_BLAS)), + ("cublasLtMatrixLayoutSetAttribute", ("hipblasLtMatrixLayoutSetAttribute", CONV_MATH_FUNC, API_BLAS)), + ("CUBLASLT_MATRIX_LAYOUT_BATCH_COUNT", ("HIPBLASLT_MATRIX_LAYOUT_BATCH_COUNT", CONV_MATH_FUNC, API_BLAS)), + ("CUBLASLT_MATRIX_LAYOUT_STRIDED_BATCH_OFFSET", ("HIPBLASLT_MATRIX_LAYOUT_STRIDED_BATCH_OFFSET", CONV_MATH_FUNC, API_BLAS)), + ("cublasLtMatmulPreference_t", ("hipblasLtMatmulPreference_t", CONV_MATH_FUNC, API_BLAS)), + ("cublasLtMatmulPreferenceOpaque_t", ("hipblasLtMatmulPreferenceOpaque_t", CONV_MATH_FUNC, API_BLAS)), + ("cublasLtMatmulPreferenceAttributes_t", ("hipblasLtMatmulPreferenceAttributes_t", CONV_MATH_FUNC, API_BLAS)), + ("CUBLASLT_MATMUL_PREF_SEARCH_MODE", ("HIPBLASLT_MATMUL_PREF_SEARCH_MODE", CONV_MATH_FUNC, API_BLAS)), + ("CUBLASLT_MATMUL_PREF_MAX_WORKSPACE_BYTES", ("HIPBLASLT_MATMUL_PREF_MAX_WORKSPACE_BYTES", CONV_MATH_FUNC, API_BLAS)), + ("cublasLtMatmulAlgo_t", ("hipblasLtMatmulAlgo_t", CONV_MATH_FUNC, API_BLAS)), + ("cublasLtMatmulHeuristicResult_t", ("hipblasLtMatmulHeuristicResult_t", CONV_MATH_FUNC, API_BLAS)), + ("cublasLtCreate", ("hipblasLtCreate", CONV_MATH_FUNC, API_BLAS)), + ("cublasLtDestroy", ("hipblasLtDestroy", CONV_MATH_FUNC, API_BLAS)), + ("cublasLtMatmulDescCreate", ("hipblasLtMatmulDescCreate", CONV_MATH_FUNC, API_BLAS)), + ("cublasLtMatmulDescDestroy", ("hipblasLtMatmulDescDestroy", CONV_MATH_FUNC, API_BLAS)), + ("cublasLtMatmulDescSetAttribute", ("hipblasLtMatmulDescSetAttribute", CONV_MATH_FUNC, API_BLAS)), + ("cublasLtMatmulPreferenceCreate", ("hipblasLtMatmulPreferenceCreate", CONV_MATH_FUNC, API_BLAS)), + ("cublasLtMatmulPreferenceDestroy", ("hipblasLtMatmulPreferenceDestroy", CONV_MATH_FUNC, API_BLAS)), + ("cublasLtMatmulPreferenceSetAttribute", ("hipblasLtMatmulPreferenceSetAttribute", CONV_MATH_FUNC, API_BLAS)), + ("cublasLtMatmulAlgoGetHeuristic", ("hipblasLtMatmulAlgoGetHeuristic", CONV_MATH_FUNC, API_BLAS)), + ("cublasLtMatmul", ("hipblasLtMatmul", CONV_MATH_FUNC, API_BLAS)), + ( + "CURAND_STATUS_SUCCESS", + ("HIPRAND_STATUS_SUCCESS", CONV_NUMERIC_LITERAL, API_RAND), + ), + ( + "CURAND_STATUS_VERSION_MISMATCH", + ("HIPRAND_STATUS_VERSION_MISMATCH", CONV_NUMERIC_LITERAL, API_RAND), + ), + ( + "CURAND_STATUS_NOT_INITIALIZED", + ("HIPRAND_STATUS_NOT_INITIALIZED", CONV_NUMERIC_LITERAL, API_RAND), + ), + ( + "CURAND_STATUS_ALLOCATION_FAILED", + ("HIPRAND_STATUS_ALLOCATION_FAILED", CONV_NUMERIC_LITERAL, API_RAND), + ), + ( + "CURAND_STATUS_TYPE_ERROR", + ("HIPRAND_STATUS_TYPE_ERROR", CONV_NUMERIC_LITERAL, API_RAND), + ), + ( + "CURAND_STATUS_OUT_OF_RANGE", + ("HIPRAND_STATUS_OUT_OF_RANGE", CONV_NUMERIC_LITERAL, API_RAND), + ), + ( + "CURAND_STATUS_LENGTH_NOT_MULTIPLE", + ("HIPRAND_STATUS_LENGTH_NOT_MULTIPLE", CONV_NUMERIC_LITERAL, API_RAND), + ), + ( + "CURAND_STATUS_DOUBLE_PRECISION_REQUIRED", + ( + "HIPRAND_STATUS_DOUBLE_PRECISION_REQUIRED", + CONV_NUMERIC_LITERAL, + API_RAND, + ), + ), + ( + "CURAND_STATUS_LAUNCH_FAILURE", + ("HIPRAND_STATUS_LAUNCH_FAILURE", CONV_NUMERIC_LITERAL, API_RAND), + ), + ( + "CURAND_STATUS_PREEXISTING_FAILURE", + ("HIPRAND_STATUS_PREEXISTING_FAILURE", CONV_NUMERIC_LITERAL, API_RAND), + ), + ( + "CURAND_STATUS_INITIALIZATION_FAILED", + ("HIPRAND_STATUS_INITIALIZATION_FAILED", CONV_NUMERIC_LITERAL, API_RAND), + ), + ( + "CURAND_STATUS_ARCH_MISMATCH", + ("HIPRAND_STATUS_ARCH_MISMATCH", CONV_NUMERIC_LITERAL, API_RAND), + ), + ( + "CURAND_STATUS_INTERNAL_ERROR", + ("HIPRAND_STATUS_INTERNAL_ERROR", CONV_NUMERIC_LITERAL, API_RAND), + ), + ("CURAND_RNG_TEST", ("HIPRAND_RNG_TEST", CONV_NUMERIC_LITERAL, API_RAND)), + ( + "mtgp32dc_params_fast_11213", + ("mtgp32dc_params_fast_11213", CONV_NUMERIC_LITERAL, API_RAND), + ), + ( + "CURAND_RNG_PSEUDO_DEFAULT", + ("HIPRAND_RNG_PSEUDO_DEFAULT", CONV_NUMERIC_LITERAL, API_RAND), + ), + ( + "CURAND_RNG_PSEUDO_XORWOW", + ("HIPRAND_RNG_PSEUDO_XORWOW", CONV_NUMERIC_LITERAL, API_RAND), + ), + ( + "CURAND_RNG_PSEUDO_MRG32K3A", + ("HIPRAND_RNG_PSEUDO_MRG32K3A", CONV_NUMERIC_LITERAL, API_RAND), + ), + ( + "CURAND_RNG_PSEUDO_MTGP32", + ("HIPRAND_RNG_PSEUDO_MTGP32", CONV_NUMERIC_LITERAL, API_RAND), + ), + ( + "CURAND_RNG_PSEUDO_MT19937", + ("HIPRAND_RNG_PSEUDO_MT19937", CONV_NUMERIC_LITERAL, API_RAND), + ), + ( + "CURAND_RNG_PSEUDO_PHILOX4_32_10", + ("HIPRAND_RNG_PSEUDO_PHILOX4_32_10", CONV_NUMERIC_LITERAL, API_RAND), + ), + ( + "CURAND_RNG_QUASI_DEFAULT", + ("HIPRAND_RNG_QUASI_DEFAULT", CONV_NUMERIC_LITERAL, API_RAND), + ), + ( + "CURAND_RNG_QUASI_SOBOL32", + ("HIPRAND_RNG_QUASI_SOBOL32", CONV_NUMERIC_LITERAL, API_RAND), + ), + ( + "CURAND_RNG_QUASI_SCRAMBLED_SOBOL32", + ("HIPRAND_RNG_QUASI_SCRAMBLED_SOBOL32", CONV_NUMERIC_LITERAL, API_RAND), + ), + ( + "CURAND_RNG_QUASI_SOBOL64", + ("HIPRAND_RNG_QUASI_SOBOL64", CONV_NUMERIC_LITERAL, API_RAND), + ), + ( + "CURAND_RNG_QUASI_SCRAMBLED_SOBOL64", + ("HIPRAND_RNG_QUASI_SCRAMBLED_SOBOL64", CONV_NUMERIC_LITERAL, API_RAND), + ), + ( + "curand_ORDERING_PSEUDO_BEST", + ( + "HIPRAND_ORDERING_PSEUDO_BEST", + CONV_NUMERIC_LITERAL, + API_RAND, + HIP_UNSUPPORTED, + ), + ), + ( + "curand_ORDERING_PSEUDO_DEFAULT", + ( + "HIPRAND_ORDERING_PSEUDO_DEFAULT", + CONV_NUMERIC_LITERAL, + API_RAND, + HIP_UNSUPPORTED, + ), + ), + ( + "curand_ORDERING_PSEUDO_SEEDED", + ( + "HIPRAND_ORDERING_PSEUDO_SEEDED", + CONV_NUMERIC_LITERAL, + API_RAND, + HIP_UNSUPPORTED, + ), + ), + ( + "curand_ORDERING_QUASI_DEFAULT", + ( + "HIPRAND_ORDERING_QUASI_DEFAULT", + CONV_NUMERIC_LITERAL, + API_RAND, + HIP_UNSUPPORTED, + ), + ), + ( + "curand_DIRECTION_VECTORS_32_JOEKUO6", + ( + "HIPRAND_DIRECTION_VECTORS_32_JOEKUO6", + CONV_NUMERIC_LITERAL, + API_RAND, + HIP_UNSUPPORTED, + ), + ), + ( + "curand_SCRAMBLED_DIRECTION_VECTORS_32_JOEKUO6", + ( + "HIPRAND_SCRAMBLED_DIRECTION_VECTORS_32_JOEKUO6", + CONV_NUMERIC_LITERAL, + API_RAND, + HIP_UNSUPPORTED, + ), + ), + ( + "curand_DIRECTION_VECTORS_64_JOEKUO6", + ( + "HIPRAND_DIRECTION_VECTORS_64_JOEKUO6", + CONV_NUMERIC_LITERAL, + API_RAND, + HIP_UNSUPPORTED, + ), + ), + ( + "curand_SCRAMBLED_DIRECTION_VECTORS_64_JOEKUO6", + ( + "HIPRAND_SCRAMBLED_DIRECTION_VECTORS_64_JOEKUO6", + CONV_NUMERIC_LITERAL, + API_RAND, + HIP_UNSUPPORTED, + ), + ), + ( + "curand_CHOOSE_BEST", + ("HIPRAND_CHOOSE_BEST", CONV_NUMERIC_LITERAL, API_RAND, HIP_UNSUPPORTED), + ), + ( + "curand_ITR", + ("HIPRAND_ITR", CONV_NUMERIC_LITERAL, API_RAND, HIP_UNSUPPORTED), + ), + ( + "curand_KNUTH", + ("HIPRAND_KNUTH", CONV_NUMERIC_LITERAL, API_RAND, HIP_UNSUPPORTED), + ), + ( + "curand_HITR", + ("HIPRAND_HITR", CONV_NUMERIC_LITERAL, API_RAND, HIP_UNSUPPORTED), + ), + ("curand_M1", ("HIPRAND_M1", CONV_NUMERIC_LITERAL, API_RAND, HIP_UNSUPPORTED)), + ("curand_M2", ("HIPRAND_M2", CONV_NUMERIC_LITERAL, API_RAND, HIP_UNSUPPORTED)), + ( + "curand_BINARY_SEARCH", + ("HIPRAND_BINARY_SEARCH", CONV_NUMERIC_LITERAL, API_RAND, HIP_UNSUPPORTED), + ), + ( + "curand_DISCRETE_GAUSS", + ("HIPRAND_DISCRETE_GAUSS", CONV_NUMERIC_LITERAL, API_RAND, HIP_UNSUPPORTED), + ), + ( + "curand_REJECTION", + ("HIPRAND_REJECTION", CONV_NUMERIC_LITERAL, API_RAND, HIP_UNSUPPORTED), + ), + ( + "curand_DEVICE_API", + ("HIPRAND_DEVICE_API", CONV_NUMERIC_LITERAL, API_RAND, HIP_UNSUPPORTED), + ), + ( + "curand_FAST_REJECTION", + ("HIPRAND_FAST_REJECTION", CONV_NUMERIC_LITERAL, API_RAND, HIP_UNSUPPORTED), + ), + ( + "curand_3RD", + ("HIPRAND_3RD", CONV_NUMERIC_LITERAL, API_RAND, HIP_UNSUPPORTED), + ), + ( + "curand_DEFINITION", + ("HIPRAND_DEFINITION", CONV_NUMERIC_LITERAL, API_RAND, HIP_UNSUPPORTED), + ), + ( + "curand_POISSON", + ("HIPRAND_POISSON", CONV_NUMERIC_LITERAL, API_RAND, HIP_UNSUPPORTED), + ), + ("curandCreateGenerator", ("hiprandCreateGenerator", CONV_MATH_FUNC, API_RAND)), + ( + "curandCreateGeneratorHost", + ("hiprandCreateGeneratorHost", CONV_MATH_FUNC, API_RAND), + ), + ( + "curandCreatePoissonDistribution", + ("hiprandCreatePoissonDistribution", CONV_MATH_FUNC, API_RAND), + ), + ( + "curandDestroyDistribution", + ("hiprandDestroyDistribution", CONV_MATH_FUNC, API_RAND), + ), + ( + "curandDestroyGenerator", + ("hiprandDestroyGenerator", CONV_MATH_FUNC, API_RAND), + ), + ("curandGenerate", ("hiprandGenerate", CONV_MATH_FUNC, API_RAND)), + ( + "curandGenerateLogNormal", + ("hiprandGenerateLogNormal", CONV_MATH_FUNC, API_RAND), + ), + ( + "curandGenerateLogNormalDouble", + ("hiprandGenerateLogNormalDouble", CONV_MATH_FUNC, API_RAND), + ), + ( + "curandGenerateLongLong", + ("hiprandGenerateLongLong", CONV_MATH_FUNC, API_RAND, HIP_UNSUPPORTED), + ), + ("curandGenerateNormal", ("hiprandGenerateNormal", CONV_MATH_FUNC, API_RAND)), + ( + "curandGenerateNormalDouble", + ("hiprandGenerateNormalDouble", CONV_MATH_FUNC, API_RAND), + ), + ("curandGeneratePoisson", ("hiprandGeneratePoisson", CONV_MATH_FUNC, API_RAND)), + ("curandGenerateSeeds", ("hiprandGenerateSeeds", CONV_MATH_FUNC, API_RAND)), + ("curandGenerateUniform", ("hiprandGenerateUniform", CONV_MATH_FUNC, API_RAND)), + ( + "curandGenerateUniformDouble", + ("hiprandGenerateUniformDouble", CONV_MATH_FUNC, API_RAND), + ), + ( + "curandGetDirectionVectors32", + ("hiprandGetDirectionVectors32", CONV_MATH_FUNC, API_RAND, HIP_UNSUPPORTED), + ), + ( + "curandGetDirectionVectors64", + ("hiprandGetDirectionVectors64", CONV_MATH_FUNC, API_RAND, HIP_UNSUPPORTED), + ), + ( + "curandGetProperty", + ("hiprandGetProperty", CONV_MATH_FUNC, API_RAND, HIP_UNSUPPORTED), + ), + ( + "curandGetScrambleConstants32", + ( + "hiprandGetScrambleConstants32", + CONV_MATH_FUNC, + API_RAND, + HIP_UNSUPPORTED, + ), + ), + ( + "curandGetScrambleConstants64", + ( + "hiprandGetScrambleConstants64", + CONV_MATH_FUNC, + API_RAND, + HIP_UNSUPPORTED, + ), + ), + ("curandGetVersion", ("hiprandGetVersion", CONV_MATH_FUNC, API_RAND)), + ( + "curandSetGeneratorOffset", + ("hiprandSetGeneratorOffset", CONV_MATH_FUNC, API_RAND), + ), + ( + "curandSetGeneratorOrdering", + ("hiprandSetGeneratorOrdering", CONV_MATH_FUNC, API_RAND, HIP_UNSUPPORTED), + ), + ( + "curandSetPseudoRandomGeneratorSeed", + ("hiprandSetPseudoRandomGeneratorSeed", CONV_MATH_FUNC, API_RAND), + ), + ( + "curandSetQuasiRandomGeneratorDimensions", + ("hiprandSetQuasiRandomGeneratorDimensions", CONV_MATH_FUNC, API_RAND), + ), + ("curandSetStream", ("hiprandSetStream", CONV_MATH_FUNC, API_RAND)), + ("curand", ("hiprand", CONV_DEVICE_FUNC, API_RAND)), + ("curand4", ("hiprand4", CONV_DEVICE_FUNC, API_RAND)), + ("curand_init", ("hiprand_init", CONV_DEVICE_FUNC, API_RAND)), + ("curand_log_normal", ("hiprand_log_normal", CONV_DEVICE_FUNC, API_RAND)), + ( + "curand_log_normal_double", + ("hiprand_log_normal_double", CONV_DEVICE_FUNC, API_RAND), + ), + ("curand_log_normal2", ("hiprand_log_normal2", CONV_DEVICE_FUNC, API_RAND)), + ( + "curand_log_normal2_double", + ("hiprand_log_normal2_double", CONV_DEVICE_FUNC, API_RAND), + ), + ("curand_log_normal4", ("hiprand_log_normal4", CONV_DEVICE_FUNC, API_RAND)), + ( + "curand_log_normal4_double", + ("hiprand_log_normal4_double", CONV_DEVICE_FUNC, API_RAND), + ), + ( + "curand_mtgp32_single", + ("hiprand_mtgp32_single", CONV_DEVICE_FUNC, API_RAND, HIP_UNSUPPORTED), + ), + ( + "curand_mtgp32_single_specific", + ( + "hiprand_mtgp32_single_specific", + CONV_DEVICE_FUNC, + API_RAND, + HIP_UNSUPPORTED, + ), + ), + ( + "curand_mtgp32_specific", + ("hiprand_mtgp32_specific", CONV_DEVICE_FUNC, API_RAND, HIP_UNSUPPORTED), + ), + ("curand_normal", ("hiprand_normal", CONV_DEVICE_FUNC, API_RAND)), + ( + "curandMakeMTGP32Constants", + ("hiprandMakeMTGP32Constants", CONV_DEVICE_FUNC, API_RAND), + ), + ( + "curandMakeMTGP32KernelState", + ("hiprandMakeMTGP32KernelState", CONV_DEVICE_FUNC, API_RAND), + ), + ("curand_normal_double", ("hiprand_normal_double", CONV_DEVICE_FUNC, API_RAND)), + ("curand_normal2", ("hiprand_normal2", CONV_DEVICE_FUNC, API_RAND)), + ( + "curand_normal2_double", + ("hiprand_normal2_double", CONV_DEVICE_FUNC, API_RAND), + ), + ("curand_normal4", ("hiprand_normal4", CONV_DEVICE_FUNC, API_RAND)), + ( + "curand_normal4_double", + ("hiprand_normal4_double", CONV_DEVICE_FUNC, API_RAND), + ), + ("curand_uniform", ("hiprand_uniform", CONV_DEVICE_FUNC, API_RAND)), + ( + "curand_uniform_double", + ("hiprand_uniform_double", CONV_DEVICE_FUNC, API_RAND), + ), + ( + "curand_uniform2_double", + ("hiprand_uniform2_double", CONV_DEVICE_FUNC, API_RAND), + ), + ("curand_uniform4", ("hiprand_uniform4", CONV_DEVICE_FUNC, API_RAND)), + ( + "curand_uniform4_double", + ("hiprand_uniform4_double", CONV_DEVICE_FUNC, API_RAND), + ), + ("curand_discrete", ("hiprand_discrete", CONV_DEVICE_FUNC, API_RAND)), + ("curand_discrete4", ("hiprand_discrete4", CONV_DEVICE_FUNC, API_RAND)), + ("curand_poisson", ("hiprand_poisson", CONV_DEVICE_FUNC, API_RAND)), + ("curand_poisson4", ("hiprand_poisson4", CONV_DEVICE_FUNC, API_RAND)), + ( + "curand_Philox4x32_10", + ("hiprand_Philox4x32_10", CONV_DEVICE_FUNC, API_RAND, HIP_UNSUPPORTED), + ), + ("mtgp32_kernel_params", ("mtgp32_kernel_params_t", CONV_MATH_FUNC, API_RAND)), + ("CUFFT_FORWARD", ("HIPFFT_FORWARD", CONV_NUMERIC_LITERAL, API_BLAS)), + ("CUFFT_INVERSE", ("HIPFFT_BACKWARD", CONV_NUMERIC_LITERAL, API_BLAS)), + ( + "CUFFT_COMPATIBILITY_DEFAULT", + ( + "HIPFFT_COMPATIBILITY_DEFAULT", + CONV_NUMERIC_LITERAL, + API_BLAS, + HIP_UNSUPPORTED, + ), + ), + ("cuComplex", ("hipComplex", CONV_TYPE, API_BLAS)), + ("cuDoubleComplex", ("hipDoubleComplex", CONV_TYPE, API_BLAS)), + ("cufftResult_t", ("hipfftResult_t", CONV_TYPE, API_FFT)), + ("cufftResult", ("hipfftResult", CONV_TYPE, API_FFT)), + ("CUFFT_SUCCESS", ("HIPFFT_SUCCESS", CONV_NUMERIC_LITERAL, API_FFT)), + ("CUFFT_INVALID_PLAN", ("HIPFFT_INVALID_PLAN", CONV_NUMERIC_LITERAL, API_FFT)), + ("CUFFT_ALLOC_FAILED", ("HIPFFT_ALLOC_FAILED", CONV_NUMERIC_LITERAL, API_FFT)), + ("CUFFT_INVALID_TYPE", ("HIPFFT_INVALID_TYPE", CONV_NUMERIC_LITERAL, API_FFT)), + ( + "CUFFT_INVALID_VALUE", + ("HIPFFT_INVALID_VALUE", CONV_NUMERIC_LITERAL, API_FFT), + ), + ( + "CUFFT_INTERNAL_ERROR", + ("HIPFFT_INTERNAL_ERROR", CONV_NUMERIC_LITERAL, API_FFT), + ), + ("CUFFT_EXEC_FAILED", ("HIPFFT_EXEC_FAILED", CONV_NUMERIC_LITERAL, API_FFT)), + ("CUFFT_SETUP_FAILED", ("HIPFFT_SETUP_FAILED", CONV_NUMERIC_LITERAL, API_FFT)), + ("CUFFT_INVALID_SIZE", ("HIPFFT_INVALID_SIZE", CONV_NUMERIC_LITERAL, API_FFT)), + ( + "CUFFT_UNALIGNED_DATA", + ("HIPFFT_UNALIGNED_DATA", CONV_NUMERIC_LITERAL, API_FFT), + ), + ( + "CUFFT_INCOMPLETE_PARAMETER_LIST", + ("HIPFFT_INCOMPLETE_PARAMETER_LIST", CONV_NUMERIC_LITERAL, API_FFT), + ), + ( + "CUFFT_INVALID_DEVICE", + ("HIPFFT_INVALID_DEVICE", CONV_NUMERIC_LITERAL, API_FFT), + ), + ("CUFFT_PARSE_ERROR", ("HIPFFT_PARSE_ERROR", CONV_NUMERIC_LITERAL, API_FFT)), + ("CUFFT_NO_WORKSPACE", ("HIPFFT_NO_WORKSPACE", CONV_NUMERIC_LITERAL, API_FFT)), + ( + "CUFFT_NOT_IMPLEMENTED", + ("HIPFFT_NOT_IMPLEMENTED", CONV_NUMERIC_LITERAL, API_FFT), + ), + ( + "CUFFT_LICENSE_ERROR", + ("HIPFFT_LICENSE_ERROR", CONV_NUMERIC_LITERAL, API_FFT, HIP_UNSUPPORTED), + ), + ( + "CUFFT_NOT_SUPPORTED", + ("HIPFFT_NOT_SUPPORTED", CONV_NUMERIC_LITERAL, API_FFT), + ), + ("cufftType_t", ("hipfftType_t", CONV_TYPE, API_FFT)), + ("cufftType", ("hipfftType", CONV_TYPE, API_FFT)), + ("CUFFT_R2C", ("HIPFFT_R2C", CONV_NUMERIC_LITERAL, API_FFT)), + ("CUFFT_C2R", ("HIPFFT_C2R", CONV_NUMERIC_LITERAL, API_FFT)), + ("CUFFT_C2C", ("HIPFFT_C2C", CONV_NUMERIC_LITERAL, API_FFT)), + ("CUFFT_D2Z", ("HIPFFT_D2Z", CONV_NUMERIC_LITERAL, API_FFT)), + ("CUFFT_Z2D", ("HIPFFT_Z2D", CONV_NUMERIC_LITERAL, API_FFT)), + ("CUFFT_Z2Z", ("HIPFFT_Z2Z", CONV_NUMERIC_LITERAL, API_FFT)), + ( + "cufftCompatibility_t", + ("hipfftCompatibility_t", CONV_TYPE, API_FFT, HIP_UNSUPPORTED), + ), + ( + "cufftCompatibility", + ("hipfftCompatibility", CONV_TYPE, API_FFT, HIP_UNSUPPORTED), + ), + ( + "CUFFT_COMPATIBILITY_FFTW_PADDING", + ( + "HIPFFT_COMPATIBILITY_FFTW_PADDING", + CONV_NUMERIC_LITERAL, + API_FFT, + HIP_UNSUPPORTED, + ), + ), + ("cufftReal", ("hipfftReal", CONV_TYPE, API_FFT)), + ("cufftDoubleReal", ("hipfftDoubleReal", CONV_TYPE, API_FFT)), + ("cufftComplex", ("hipfftComplex", CONV_TYPE, API_FFT)), + ("cufftDoubleComplex", ("hipfftDoubleComplex", CONV_TYPE, API_FFT)), + ("cufftHandle", ("hipfftHandle", CONV_TYPE, API_FFT)), + ("cufftPlan1d", ("hipfftPlan1d", CONV_MATH_FUNC, API_FFT)), + ("cufftPlan2d", ("hipfftPlan2d", CONV_MATH_FUNC, API_FFT)), + ("cufftPlan3d", ("hipfftPlan3d", CONV_MATH_FUNC, API_FFT)), + ("cufftPlanMany", ("hipfftPlanMany", CONV_MATH_FUNC, API_FFT)), + ("cufftMakePlan1d", ("hipfftMakePlan1d", CONV_MATH_FUNC, API_FFT)), + ("cufftMakePlan2d", ("hipfftMakePlan2d", CONV_MATH_FUNC, API_FFT)), + ("cufftMakePlan3d", ("hipfftMakePlan3d", CONV_MATH_FUNC, API_FFT)), + ("cufftMakePlanMany", ("hipfftMakePlanMany", CONV_MATH_FUNC, API_FFT)), + ("cufftMakePlanMany64", ("hipfftMakePlanMany64", CONV_MATH_FUNC, API_FFT)), + ("cufftGetSizeMany64", ("hipfftGetSizeMany64", CONV_MATH_FUNC, API_FFT)), + ("cufftEstimate1d", ("hipfftEstimate1d", CONV_MATH_FUNC, API_FFT)), + ("cufftEstimate2d", ("hipfftEstimate2d", CONV_MATH_FUNC, API_FFT)), + ("cufftEstimate3d", ("hipfftEstimate3d", CONV_MATH_FUNC, API_FFT)), + ("cufftEstimateMany", ("hipfftEstimateMany", CONV_MATH_FUNC, API_FFT)), + ("cufftCreate", ("hipfftCreate", CONV_MATH_FUNC, API_FFT)), + ("cufftGetSize1d", ("hipfftGetSize1d", CONV_MATH_FUNC, API_FFT)), + ("cufftGetSize2d", ("hipfftGetSize2d", CONV_MATH_FUNC, API_FFT)), + ("cufftGetSize3d", ("hipfftGetSize3d", CONV_MATH_FUNC, API_FFT)), + ("cufftGetSizeMany", ("hipfftGetSizeMany", CONV_MATH_FUNC, API_FFT)), + ("cufftGetSize", ("hipfftGetSize", CONV_MATH_FUNC, API_FFT)), + ("cufftSetWorkArea", ("hipfftSetWorkArea", CONV_MATH_FUNC, API_FFT)), + ( + "cufftSetAutoAllocation", + ("hipfftSetAutoAllocation", CONV_MATH_FUNC, API_FFT), + ), + ("cufftXtExec", ("hipfftXtExec", CONV_MATH_FUNC, API_FFT)), + ("cufftXtMakePlanMany", ("hipfftXtMakePlanMany", CONV_MATH_FUNC, API_FFT)), + ("cufftExecC2C", ("hipfftExecC2C", CONV_MATH_FUNC, API_FFT)), + ("cufftExecR2C", ("hipfftExecR2C", CONV_MATH_FUNC, API_FFT)), + ("cufftExecC2R", ("hipfftExecC2R", CONV_MATH_FUNC, API_FFT)), + ("cufftExecZ2Z", ("hipfftExecZ2Z", CONV_MATH_FUNC, API_FFT)), + ("cufftExecD2Z", ("hipfftExecD2Z", CONV_MATH_FUNC, API_FFT)), + ("cufftExecZ2D", ("hipfftExecZ2D", CONV_MATH_FUNC, API_FFT)), + ("cufftSetStream", ("hipfftSetStream", CONV_MATH_FUNC, API_FFT)), + ("cufftDestroy", ("hipfftDestroy", CONV_MATH_FUNC, API_FFT)), + ("cufftGetVersion", ("hipfftGetVersion", CONV_MATH_FUNC, API_FFT)), + ( + "cufftGetProperty", + ("hipfftGetProperty", CONV_MATH_FUNC, API_FFT, HIP_UNSUPPORTED), + ), + ("nvrtcResult", ("hiprtcResult", CONV_TYPE, API_RTC)), + ("NVRTC_SUCCESS", ("HIPRTC_SUCCESS", CONV_TYPE, API_RTC)), + ( + "NVRTC_ERROR_OUT_OF_MEMORY", + ("HIPRTC_ERROR_OUT_OF_MEMORY", CONV_TYPE, API_RTC), + ), + ( + "NVRTC_ERROR_PROGRAM_CREATION_FAILURE", + ("HIPRTC_ERROR_PROGRAM_CREATION_FAILURE", CONV_TYPE, API_RTC), + ), + ( + "NVRTC_ERROR_INVALID_INPUT", + ("HIPRTC_ERROR_INVALID_INPUT", CONV_TYPE, API_RTC), + ), + ( + "NVRTC_ERROR_INVALID_PROGRAM", + ("HIPRTC_ERROR_INVALID_PROGRAM", CONV_TYPE, API_RTC), + ), + ("NVRTC_ERROR_COMPILATION", ("HIPRTC_ERROR_COMPILATION", CONV_TYPE, API_RTC)), + ( + "NVRTC_ERROR_BUILTIN_OPERATION_FAILURE", + ("HIPRTC_ERROR_BUILTIN_OPERATION_FAILURE", CONV_TYPE, API_RTC), + ), + ( + "NVRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION", + ("HIPRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION", CONV_TYPE, API_RTC), + ), + ( + "NVRTC_ERROR_NAME_EXPRESSION_NOT_VALID", + ("HIPRTC_ERROR_NAME_EXPRESSION_NOT_VALID", CONV_TYPE, API_RTC), + ), + ( + "NVRTC_ERROR_INTERNAL_ERROR", + ("HIPRTC_ERROR_INTERNAL_ERROR", CONV_TYPE, API_RTC), + ), + ("nvrtcGetErrorString", ("hiprtcGetErrorString", CONV_JIT, API_RTC)), + ("nvrtcVersion", ("hiprtcVersion", CONV_JIT, API_RTC)), + ("nvrtcProgram", ("hiprtcProgram", CONV_TYPE, API_RTC)), + ("nvrtcAddNameExpression", ("hiprtcAddNameExpression", CONV_JIT, API_RTC)), + ("nvrtcCompileProgram", ("hiprtcCompileProgram", CONV_JIT, API_RTC)), + ("nvrtcCreateProgram", ("hiprtcCreateProgram", CONV_JIT, API_RTC)), + ("nvrtcDestroyProgram", ("hiprtcDestroyProgram", CONV_JIT, API_RTC)), + ("nvrtcGetLoweredName", ("hiprtcGetLoweredName", CONV_JIT, API_RTC)), + ("nvrtcGetProgramLog", ("hiprtcGetProgramLog", CONV_JIT, API_RTC)), + ("nvrtcGetProgramLogSize", ("hiprtcGetProgramLogSize", CONV_JIT, API_RTC)), + ("nvrtcGetPTX", ("hiprtcGetCode", CONV_JIT, API_RTC)), + ("nvrtcGetPTXSize", ("hiprtcGetCodeSize", CONV_JIT, API_RTC)), + ("thrust::cuda", ("thrust::hip", CONV_MATH_FUNC, API_BLAS)), + ( + "cudaCpuDeviceId", + ("hipCpuDeviceId", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED), + ), + # The caffe2 directory does a string match; pytorch does a word-boundary match. + # Patterns such as 'cub::' will not match for pytorch. + # We list all current uses of cub symbols for this reason. + ("cub::", ("hipcub::", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::ArgMax", ("hipcub::ArgMax", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::ArgMin", ("hipcub::ArgMin", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::BLOCK_SCAN_WARP_SCANS", ("hipcub::BLOCK_SCAN_WARP_SCANS", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::BLOCK_REDUCE_WARP_REDUCTIONS", ("hipcub::BLOCK_REDUCE_WARP_REDUCTIONS", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::BLOCK_STORE_WARP_TRANSPOSE", ("hipcub::BLOCK_STORE_WARP_TRANSPOSE", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::BLOCK_LOAD_DIRECT", ("hipcub::BLOCK_LOAD_DIRECT", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::BLOCK_STORE_DIRECT", ("hipcub::BLOCK_STORE_DIRECT", CONV_SPECIAL_FUNC, API_RUNTIME)), + ( + "cub::BLOCK_REDUCE_RAKING_COMMUTATIVE_ONLY", + ("hipcub::BLOCK_REDUCE_RAKING_COMMUTATIVE_ONLY", CONV_SPECIAL_FUNC, API_RUNTIME) + ), + ("cub::BlockReduce", ("hipcub::BlockReduce", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::BlockScan", ("hipcub::BlockScan", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::BlockLoad", ("hipcub::BlockLoad", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::BlockStore", ("hipcub::BlockStore", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::BlockRakingLayout", ("hipcub::BlockRakingLayout", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::BlockRadixSort", ("hipcub::BlockRadixSort", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::Uninitialized", ("hipcub::Uninitialized", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::RowMajorTid", ("hipcub::RowMajorTid", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::CachingDeviceAllocator", ("hipcub::CachingDeviceAllocator", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::CountingInputIterator", ("hipcub::CountingInputIterator", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::DeviceRadixSort", ("hipcub::DeviceRadixSort", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::DeviceReduce", ("hipcub::DeviceReduce", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::DeviceRunLengthEncode", ("hipcub::DeviceRunLengthEncode", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::DeviceScan", ("hipcub::DeviceScan", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::DeviceSegmentedRadixSort", ("hipcub::DeviceSegmentedRadixSort", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::DeviceSegmentedReduce", ("hipcub::DeviceSegmentedReduce", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::DeviceSelect", ("hipcub::DeviceSelect", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::FpLimits", ("hipcub::FpLimits", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::KeyValuePair", ("hipcub::KeyValuePair", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::Max", ("hipcub::Max", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::Min", ("hipcub::Min", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::Sum", ("hipcub::Sum", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::Log2", ("hipcub::Log2", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::LaneId", ("hipcub::LaneId", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::WarpMask", ("hipcub::WarpMask", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::ShuffleIndex", ("hipcub::ShuffleIndex", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::ShuffleDown", ("hipcub::ShuffleDown", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::ArgIndexInputIterator", ("hipcub::ArgIndexInputIterator", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::TransformInputIterator", ("hipcub::TransformInputIterator", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::WarpReduce", ("hipcub::WarpReduce", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("cub::CTA_SYNC", ("hipcub::CTA_SYNC", CONV_SPECIAL_FUNC, API_RUNTIME)), + ("nvtxMark", ("roctxMark", CONV_OTHER, API_ROCTX)), + ("nvtxMarkA", ("roctxMarkA", CONV_OTHER, API_ROCTX)), + ("nvtxRangePushA", ("roctxRangePushA", CONV_OTHER, API_ROCTX)), + ("nvtxRangePop", ("roctxRangePop", CONV_OTHER, API_ROCTX)), + ("nvtxRangeStartA", ("roctxRangeStartA", CONV_OTHER, API_ROCTX)), + ("nvtxRangeEnd", ("roctxRangeStop", CONV_OTHER, API_ROCTX)), + ("nvtxRangeId_t", ("int", CONV_OTHER, API_ROCTX)), + ("nvmlReturn_t", ("rsmi_status_t", CONV_OTHER, API_ROCMSMI)), + ("NVML_SUCCESS", ("RSMI_STATUS_SUCCESS", CONV_OTHER, API_ROCMSMI)), + ("NVML_P2P_CAPS_INDEX_READ", ("RSMI_STATUS_SUCCESS", CONV_OTHER, API_ROCMSMI)), + ("NVML_P2P_STATUS_OK", ("RSMI_STATUS_SUCCESS", CONV_OTHER, API_ROCMSMI)), + ("NVML_ERROR_INSUFFICIENT_SIZE", ("RSMI_STATUS_INSUFFICIENT_SIZE", CONV_OTHER, API_ROCMSMI)), + ("nvmlDevice_t", ("uint32_t", CONV_OTHER, API_ROCMSMI)), + ("nvmlGpuP2PStatus_t", ("bool", CONV_OTHER, API_ROCMSMI)), + ("nvmlProcessInfo_t", ("rsmi_process_info_t", CONV_OTHER, API_ROCMSMI)), + ("nvmlGpuP2PCapsIndex_t", ("uint32_t", CONV_OTHER, API_ROCMSMI)), + ] +) + +# pyrefly: ignore [no-matching-overload] +CUDA_SPECIAL_MAP = collections.OrderedDict( + [ + # SPARSE + ("cusparseStatus_t", ("hipsparseStatus_t", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseHandle_t", ("hipsparseHandle_t", CONV_MATH_FUNC, API_SPECIAL)), + ("cuComplex", ("hipComplex", CONV_TYPE, API_SPECIAL)), + ("cuDoubleComplex", ("hipDoubleComplex", CONV_TYPE, API_SPECIAL)), + ( + "CUSPARSE_POINTER_MODE_HOST", + ("HIPSPARSE_POINTER_MODE_HOST", CONV_NUMERIC_LITERAL, API_SPECIAL), + ), + ("cusparseOperation_t", ("hipsparseOperation_t", CONV_TYPE, API_SPECIAL)), + ( + "cusparseCreateMatDescr", + ("hipsparseCreateMatDescr", CONV_MATH_FUNC, API_SPECIAL), + ), + ("cusparseCreate", ("hipsparseCreate", CONV_MATH_FUNC, API_SPECIAL)), + ( + "cusparseDestroyMatDescr", + ("hipsparseDestroyMatDescr", CONV_MATH_FUNC, API_SPECIAL), + ), + ("cusparseDestroy", ("hipsparseDestroy", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseXcoo2csr", ("hipsparseXcoo2csr", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseMatDescr_t", ("hipsparseMatDescr_t", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseDiagType_t", ("hipsparseDiagType_t", CONV_TYPE, API_SPECIAL)), + ("CUSPARSE_DIAG_TYPE_UNIT", ("HIPSPARSE_DIAG_TYPE_UNIT", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("CUSPARSE_DIAG_TYPE_NON_UNIT", ("HIPSPARSE_DIAG_TYPE_NON_UNIT", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("cusparseSetMatDiagType", ("hipsparseSetMatDiagType", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseFillMode_t", ("hipsparseFillMode_t", CONV_TYPE, API_SPECIAL)), + ("CUSPARSE_FILL_MODE_UPPER", ("HIPSPARSE_FILL_MODE_UPPER", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("CUSPARSE_FILL_MODE_LOWER", ("HIPSPARSE_FILL_MODE_LOWER", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("cusparseSetMatFillMode", ("hipsparseSetMatFillMode", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseDirection_t", ("hipsparseDirection_t", CONV_TYPE, API_SPECIAL)), + ("CUSPARSE_DIRECTION_ROW", ("HIPSPARSE_DIRECTION_ROW", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("CUSPARSE_DIRECTION_COLUMN", ("HIPSPARSE_DIRECTION_COLUMN", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("cusparseSolvePolicy_t", ("hipsparseSolvePolicy_t", CONV_TYPE, API_SPECIAL)), + ("CUSPARSE_SOLVE_POLICY_NO_LEVEL", ("HIPSPARSE_SOLVE_POLICY_NO_LEVEL", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("CUSPARSE_SOLVE_POLICY_USE_LEVEL", ("HIPSPARSE_SOLVE_POLICY_USE_LEVEL", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("cusparseCreateBsrsv2Info", ("hipsparseCreateBsrsv2Info", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseCreateBsrsm2Info", ("hipsparseCreateBsrsm2Info", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseDestroyBsrsv2Info", ("hipsparseDestroyBsrsv2Info", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseDestroyBsrsm2Info", ("hipsparseDestroyBsrsm2Info", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseSbsrmm", ("hipsparseSbsrmm", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseDbsrmm", ("hipsparseDbsrmm", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseCbsrmm", ("hipsparseCbsrmm", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseZbsrmm", ("hipsparseZbsrmm", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseSbsrmv", ("hipsparseSbsrmv", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseDbsrmv", ("hipsparseDbsrmv", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseCbsrmv", ("hipsparseCbsrmv", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseZbsrmv", ("hipsparseZbsrmv", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseSbsrsv2_bufferSize", ("hipsparseSbsrsv2_bufferSize", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseDbsrsv2_bufferSize", ("hipsparseDbsrsv2_bufferSize", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseCbsrsv2_bufferSize", ("hipsparseCbsrsv2_bufferSize", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseZbsrsv2_bufferSize", ("hipsparseZbsrsv2_bufferSize", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseSbsrsv2_analysis", ("hipsparseSbsrsv2_analysis", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseDbsrsv2_analysis", ("hipsparseDbsrsv2_analysis", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseCbsrsv2_analysis", ("hipsparseCbsrsv2_analysis", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseZbsrsv2_analysis", ("hipsparseZbsrsv2_analysis", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseSbsrsv2_solve", ("hipsparseSbsrsv2_solve", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseDbsrsv2_solve", ("hipsparseDbsrsv2_solve", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseCbsrsv2_solve", ("hipsparseCbsrsv2_solve", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseZbsrsv2_solve", ("hipsparseZbsrsv2_solve", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseSbsrsm2_bufferSize", ("hipsparseSbsrsm2_bufferSize", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseDbsrsm2_bufferSize", ("hipsparseDbsrsm2_bufferSize", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseCbsrsm2_bufferSize", ("hipsparseCbsrsm2_bufferSize", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseZbsrsm2_bufferSize", ("hipsparseZbsrsm2_bufferSize", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseSbsrsm2_analysis", ("hipsparseSbsrsm2_analysis", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseDbsrsm2_analysis", ("hipsparseDbsrsm2_analysis", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseCbsrsm2_analysis", ("hipsparseCbsrsm2_analysis", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseZbsrsm2_analysis", ("hipsparseZbsrsm2_analysis", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseSbsrsm2_solve", ("hipsparseSbsrsm2_solve", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseDbsrsm2_solve", ("hipsparseDbsrsm2_solve", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseCbsrsm2_solve", ("hipsparseCbsrsm2_solve", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseZbsrsm2_solve", ("hipsparseZbsrsm2_solve", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseScsrmm2", ("hipsparseScsrmm2", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseDcsrmm2", ("hipsparseDcsrmm2", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseCcsrmm2", ("hipsparseCcsrmm2", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseZcsrmm2", ("hipsparseZcsrmm2", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseScsrmm", ("hipsparseScsrmm", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseDcsrmm", ("hipsparseDcsrmm", CONV_MATH_FUNC, API_SPECIAL)), + ( + "cusparseXcsrsort_bufferSizeExt", + ("hipsparseXcsrsort_bufferSizeExt", CONV_MATH_FUNC, API_SPECIAL), + ), + ("cusparseCreateCsrgemm2Info", ("hipsparseCreateCsrgemm2Info", CONV_MATH_FUNC, API_SPECIAL)), + ( + "cusparseDestroyCsrgemm2Info", + ("hipsparseDestroyCsrgemm2Info", CONV_MATH_FUNC, API_SPECIAL), + ), + ("cusparseXcsrgemm2Nnz", ("hipsparseXcsrgemm2Nnz", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseDcsrgemm2_bufferSizeExt", ("hipsparseDcsrgemm2_bufferSizeExt", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseScsrgemm2_bufferSizeExt", ("hipsparseScsrgemm2_bufferSizeExt", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseDcsrgemm2", ("hipsparseDcsrgemm2", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseScsrgemm2", ("hipsparseScsrgemm2", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseSetPointerMode", ("hipsparseSetPointerMode", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseXcsrgeam2Nnz", ("hipsparseXcsrgeam2Nnz", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseScsrgeam2_bufferSizeExt", ("hipsparseScsrgeam2_bufferSizeExt", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseDcsrgeam2_bufferSizeExt", ("hipsparseDcsrgeam2_bufferSizeExt", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseCcsrgeam2_bufferSizeExt", ("hipsparseCcsrgeam2_bufferSizeExt", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseZcsrgeam2_bufferSizeExt", ("hipsparseZcsrgeam2_bufferSizeExt", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseScsrgeam2", ("hipsparseScsrgeam2", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseDcsrgeam2", ("hipsparseDcsrgeam2", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseCcsrgeam2", ("hipsparseCcsrgeam2", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseZcsrgeam2", ("hipsparseZcsrgeam2", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseXcsrsort", ("hipsparseXcsrsort", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseXbsrsm2_zeroPivot", ("hipsparseXbsrsm2_zeroPivot", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseXbsrsv2_zeroPivot", ("hipsparseXbsrsv2_zeroPivot", CONV_MATH_FUNC, API_SPECIAL)), + ( + "cusparseXcoosort_bufferSizeExt", + ("hipsparseXcoosort_bufferSizeExt", CONV_MATH_FUNC, API_SPECIAL), + ), + ( + "cusparseXcoosortByRow", + ("hipsparseXcoosortByRow", CONV_MATH_FUNC, API_SPECIAL), + ), + ("cusparseSetStream", ("hipsparseSetStream", CONV_MATH_FUNC, API_SPECIAL)), + ( + "cusparseCreateIdentityPermutation", + ("hipsparseCreateIdentityPermutation", CONV_MATH_FUNC, API_SPECIAL), + ), + ( + "cusparseSetMatIndexBase", + ("hipsparseSetMatIndexBase", CONV_MATH_FUNC, API_SPECIAL), + ), + ("cusparseSetMatType", ("hipsparseSetMatType", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseSpMV", ("hipsparseSpMV", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseSpMV_bufferSize", ("hipsparseSpMV_bufferSize", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseSpMM", ("hipsparseSpMM", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseSpMM_bufferSize", ("hipsparseSpMM_bufferSize", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseCreateDnMat", ("hipsparseCreateDnMat", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseDnMatSetStridedBatch", ("hipsparseDnMatSetStridedBatch", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseCsrSetStridedBatch", ("hipsparseCsrSetStridedBatch", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseCreateDnVec", ("hipsparseCreateDnVec", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseCreateCsr", ("hipsparseCreateCsr", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseDestroyDnMat", ("hipsparseDestroyDnMat", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseDestroyDnVec", ("hipsparseDestroyDnVec", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseDestroySpMat", ("hipsparseDestroySpMat", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseSpGEMM_destroyDescr", ("hipsparseSpGEMM_destroyDescr", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseCreateCoo", ("hipsparseCreateCoo", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseCreateCsr", ("hipsparseCreateCsr", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseSpGEMM_createDescr", ("hipsparseSpGEMM_createDescr", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseDnMatSetStridedBatch", ("hipsparseDnMatSetStridedBatch", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseSpGEMM_copy", ("hipsparseSpGEMM_copy", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseSDDMM_bufferSize", ("hipsparseSDDMM_bufferSize", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseSDDMM_preprocess", ("hipsparseSDDMM_preprocess", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseSDDMM", ("hipsparseSDDMM", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseSpGEMM_compute", ("hipsparseSpGEMM_compute", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseSpGEMM_workEstimation", ("hipsparseSpGEMM_workEstimation", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseSpMatGetSize", ("hipsparseSpMatGetSize", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseCsrSetPointers", ("hipsparseCsrSetPointers", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseSpMVAlg_t", ("hipsparseSpMVAlg_t", CONV_TYPE, API_SPECIAL)), + ("cusparseSpMMAlg_t", ("hipsparseSpMMAlg_t", CONV_TYPE, API_SPECIAL)), + ("cusparseIndexType_t", ("hipsparseIndexType_t", CONV_TYPE, API_SPECIAL)), + # Unsupported ("cusparseMatDescr", ("hipsparseMatDescr", CONV_TYPE, API_SPECIAL)), + # Unsupported ("cusparseDnMatDescr", ("hipsparseDnMatDescr", CONV_TYPE, API_SPECIAL)), + # Unsupported ("cusparseDnVecDescr", ("hipsparseDnVecDescr", CONV_TYPE, API_SPECIAL)), + # Unsupported ("cusparseSpMatDescr", ("hipsparseSpMatDescr", CONV_TYPE, API_SPECIAL)), + # Unsupported ("cusparseSpGEMMDescr", ("hipsparseSpGEMMDescr", CONV_TYPE, API_SPECIAL)), + ("cusparseDnMatDescr_t", ("hipsparseDnMatDescr_t", CONV_TYPE, API_SPECIAL)), + ("cusparseDnVecDescr_t", ("hipsparseDnVecDescr_t", CONV_TYPE, API_SPECIAL)), + ("cusparseSpMatDescr_t", ("hipsparseSpMatDescr_t", CONV_TYPE, API_SPECIAL)), + ("cusparseSpGEMMDescr_t", ("hipsparseSpGEMMDescr_t", CONV_TYPE, API_SPECIAL)), + ("CUSPARSE_INDEX_32I", ("HIPSPARSE_INDEX_32I", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("CUSPARSE_INDEX_64I", ("HIPSPARSE_INDEX_64I", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("CUSPARSE_ORDER_COL", ("HIPSPARSE_ORDER_COL", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("CUSPARSE_ORDER_ROW", ("HIPSPARSE_ORDER_ROW", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("CUSPARSE_MV_ALG_DEFAULT", ("HIPSPARSE_MV_ALG_DEFAULT", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("CUSPARSE_MM_ALG_DEFAULT", ("HIPSPARSE_MM_ALG_DEFAULT", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("CUSPARSE_SPMM_COO_ALG1", ("HIPSPARSE_SPMM_COO_ALG1", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("CUSPARSE_SPMM_COO_ALG2", ("HIPSPARSE_SPMM_COO_ALG2", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("CUSPARSE_SPMM_CSR_ALG1", ("HIPSPARSE_SPMM_CSR_ALG1", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("CUSPARSE_SPMM_CSR_ALG2", ("HIPSPARSE_SPMM_CSR_ALG2", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("CUSPARSE_SPMM_CSR_ALG3", ("HIPSPARSE_SPMM_CSR_ALG3", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("CUSPARSE_COOMV_ALG", ("HIPSPARSE_COOMV_ALG", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("CUSPARSE_SPMM_CSR_ALG1", ("HIPSPARSE_CSRMM_ALG1", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("CUSPARSE_SPGEMM_DEFAULT", ("HIPSPARSE_SPGEMM_DEFAULT", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("CUSPARSE_SDDMM_ALG_DEFAULT", ("HIPSPARSE_SDDMM_ALG_DEFAULT", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ( + "CUSPARSE_STATUS_SUCCESS", + ("HIPSPARSE_STATUS_SUCCESS", CONV_NUMERIC_LITERAL, API_SPECIAL), + ), + ( + "CUSPARSE_STATUS_NOT_INITIALIZED", + ("HIPSPARSE_STATUS_NOT_INITIALIZED", CONV_NUMERIC_LITERAL, API_SPECIAL), + ), + ( + "CUSPARSE_STATUS_ALLOC_FAILED", + ("HIPSPARSE_STATUS_ALLOC_FAILED", CONV_NUMERIC_LITERAL, API_SPECIAL), + ), + ( + "CUSPARSE_STATUS_INVALID_VALUE", + ("HIPSPARSE_STATUS_INVALID_VALUE", CONV_NUMERIC_LITERAL, API_SPECIAL), + ), + ( + "CUSPARSE_STATUS_MAPPING_ERROR", + ("HIPSPARSE_STATUS_MAPPING_ERROR", CONV_NUMERIC_LITERAL, API_SPECIAL), + ), + ( + "CUSPARSE_STATUS_EXECUTION_FAILED", + ("HIPSPARSE_STATUS_EXECUTION_FAILED", CONV_NUMERIC_LITERAL, API_SPECIAL), + ), + ( + "CUSPARSE_STATUS_INTERNAL_ERROR", + ("HIPSPARSE_STATUS_INTERNAL_ERROR", CONV_NUMERIC_LITERAL, API_SPECIAL), + ), + ( + "CUSPARSE_STATUS_MATRIX_TYPE_NOT_SUPPORTED", + ( + "HIPSPARSE_STATUS_MATRIX_TYPE_NOT_SUPPORTED", + CONV_NUMERIC_LITERAL, + API_SPECIAL, + ), + ), + ( + "CUSPARSE_STATUS_ARCH_MISMATCH", + ("HIPSPARSE_STATUS_ARCH_MISMATCH", CONV_NUMERIC_LITERAL, API_SPECIAL), + ), + ( + "CUSPARSE_STATUS_ZERO_PIVOT", + ("HIPSPARSE_STATUS_ZERO_PIVOT", CONV_NUMERIC_LITERAL, API_SPECIAL), + ), + ( + "CUSPARSE_OPERATION_TRANSPOSE", + ("HIPSPARSE_OPERATION_TRANSPOSE", CONV_NUMERIC_LITERAL, API_SPECIAL), + ), + ( + "CUSPARSE_OPERATION_NON_TRANSPOSE", + ("HIPSPARSE_OPERATION_NON_TRANSPOSE", CONV_NUMERIC_LITERAL, API_SPECIAL), + ), + ( + "CUSPARSE_OPERATION_CONJUGATE_TRANSPOSE", + ( + "HIPSPARSE_OPERATION_CONJUGATE_TRANSPOSE", + CONV_NUMERIC_LITERAL, + API_SPECIAL, + ), + ), + ( + "CUSPARSE_INDEX_BASE_ZERO", + ("HIPSPARSE_INDEX_BASE_ZERO", CONV_NUMERIC_LITERAL, API_SPECIAL), + ), + ( + "CUSPARSE_INDEX_BASE_ONE", + ("HIPSPARSE_INDEX_BASE_ONE", CONV_NUMERIC_LITERAL, API_SPECIAL), + ), + ( + "CUSPARSE_MATRIX_TYPE_GENERAL", + ("HIPSPARSE_MATRIX_TYPE_GENERAL", CONV_NUMERIC_LITERAL, API_SPECIAL), + ), + # SparseLt + ("cuSPARSELt", ("hipSPARSELt", CONV_TYPE, API_SPECIAL)), + ("AT_CUSPARSELT_ENABLED", ("AT_HIPSPARSELT_ENABLED", CONV_TYPE, API_SPECIAL)), + ("CUSPARSE_ORDER_ROW", ("HIPSPARSE_ORDER_ROW", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("CUSPARSE_ORDER_COL", ("HIPSPARSE_ORDER_COL", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("CUSPARSELT_SPARSITY_50_PERCENT", ("HIPSPARSELT_SPARSITY_50_PERCENT", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("cusparseComputeType", ("hipsparseLtComputetype_t", CONV_TYPE, API_SPECIAL)), + ("CUSPARSE_COMPUTE_32F", ("HIPSPARSELT_COMPUTE_32F", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("CUSPARSE_COMPUTE_16F", ("HIPSPARSELT_COMPUTE_16F", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("CUSPARSE_COMPUTE_32I", ("HIPSPARSELT_COMPUTE_32I", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("CUSPARSE_COMPUTE_TF32", ("HIPSPARSELT_COMPUTE_TF32", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("CUSPARSELT_MATMUL_ALG_CONFIG_ID", ("HIPSPARSELT_MATMUL_ALG_CONFIG_ID", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("CUSPARSELT_MATMUL_ALG_CONFIG_MAX_ID", ("HIPSPARSELT_MATMUL_ALG_CONFIG_MAX_ID", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("CUSPARSELT_MATMUL_BIAS_POINTER", ("HIPSPARSELT_MATMUL_BIAS_POINTER", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("CUSPARSELT_MATMUL_ALG_DEFAULT", ("HIPSPARSELT_MATMUL_ALG_DEFAULT", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("CUSPARSELT_MATMUL_ALG_CONFIG_ID", ("HIPSPARSELT_MATMUL_ALG_CONFIG_ID", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("CUSPARSELT_MATMUL_ALPHA_VECTOR_SCALING", ("HIPSPARSELT_MATMUL_ALPHA_VECTOR_SCALING", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("CUSPARSELT_MATMUL_SPLIT_K", ("HIPSPARSELT_MATMUL_SPLIT_K", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("CUSPARSELT_MATMUL_SPLIT_K_MODE", ("HIPSPARSELT_MATMUL_SPLIT_K_MODE", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("cusparseLtHandle_t", ("hipsparseLtHandle_t", CONV_TYPE, API_SPECIAL)), + ("cusparseLtMatDescriptor_t", ("hipsparseLtMatDescriptor_t", CONV_TYPE, API_SPECIAL)), + ("cusparseLtInit", ("hipsparseLtInit", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseLtStructuredDescriptorInit", ("hipsparseLtStructuredDescriptorInit", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseLtSplitKMode_t", ("hipsparseLtSplitKMode_t", CONV_TYPE, API_SPECIAL)), + ("cusparseLtSpMMACompressedSize2", ("hipsparseLtSpMMACompressedSize2", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseLtSpMMACompress2", ("hipsparseLtSpMMACompress2", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseLtMatmulDescriptor_t", ("hipsparseLtMatmulDescriptor_t", CONV_TYPE, API_SPECIAL)), + ("cusparseLtMatmulPlan_t", ("hipsparseLtMatmulPlan_t", CONV_TYPE, API_SPECIAL)), + ("cusparseLtMatmulAlgSelection_t", ("hipsparseLtMatmulAlgSelection_t", CONV_TYPE, API_SPECIAL)), + ("cusparseLtStructuredDescriptorInit", ("hipsparseLtStructuredDescriptorInit", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseLtDenseDescriptorInit", ("hipsparseLtDenseDescriptorInit", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseLtMatmulDescriptorInit", ("hipsparseLtMatmulDescriptorInit", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseLtMatmulDescSetAttribute", ("hipsparseLtMatmulDescSetAttribute", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseLtMatmulAlgSelectionInit", ("hipsparseLtMatmulAlgSelectionInit", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseLtMatmulAlgSetAttribute", ("hipsparseLtMatmulAlgSetAttribute", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseLtMatmulPlanInit", ("hipsparseLtMatmulPlanInit", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseLtMatmulGetWorkspace", ("hipsparseLtMatmulGetWorkspace", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseLtMatmulSearch", ("hipsparseLtMatmulSearch", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseLtMatmulAlgGetAttribute", ("hipsparseLtMatmulAlgGetAttribute", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseLtMatmul", ("hipsparseLtMatmul", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseLtMatDescriptorDestroy", ("hipsparseLtMatDescriptorDestroy", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseLtMatmulPlanDestroy", ("hipsparseLtMatmulPlanDestroy", CONV_MATH_FUNC, API_SPECIAL)), + ("cusparseGetErrorString", ("hipsparseGetErrorString", CONV_MATH_FUNC, API_SPECIAL)), + # SOLVER + ("cublasOperation_t", ("hipsolverOperation_t", CONV_TYPE, API_SPECIAL)), + ("CUBLAS_OP_N", ("HIPSOLVER_OP_N", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ( + "CUBLAS_OP_T", + ("HIPSOLVER_OP_T", CONV_NUMERIC_LITERAL, API_SPECIAL), + ), + ( + "CUBLAS_OP_C", + ("HIPSOLVER_OP_C", CONV_NUMERIC_LITERAL, API_SPECIAL), + ), + ("cublasFillMode_t", ("hipsolverFillMode_t", CONV_TYPE, API_SPECIAL)), + ( + "CUBLAS_FILL_MODE_LOWER", + ("HIPSOLVER_FILL_MODE_LOWER", CONV_NUMERIC_LITERAL, API_SPECIAL), + ), + ( + "CUBLAS_FILL_MODE_UPPER", + ("HIPSOLVER_FILL_MODE_UPPER", CONV_NUMERIC_LITERAL, API_SPECIAL), + ), + ("cublasSideMode_t", ("hipsolverSideMode_t", CONV_TYPE, API_SPECIAL)), + ("CUBLAS_SIDE_LEFT", ("HIPSOLVER_SIDE_LEFT", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("CUBLAS_SIDE_RIGHT", ("HIPSOLVER_SIDE_RIGHT", CONV_NUMERIC_LITERAL, API_SPECIAL)), + + ("cusolverEigMode_t", ("hipsolverEigMode_t", CONV_TYPE, API_SPECIAL)), + ("CUSOLVER_EIG_MODE_VECTOR", ("HIPSOLVER_EIG_MODE_VECTOR", CONV_NUMERIC_LITERAL, API_SPECIAL)), + ("CUSOLVER_EIG_MODE_NOVECTOR", ("HIPSOLVER_EIG_MODE_NOVECTOR", CONV_NUMERIC_LITERAL, API_SPECIAL)), + + ("syevjInfo_t", ("hipsolverSyevjInfo_t", CONV_TYPE, API_SPECIAL)), + ("cusolverDnCreateSyevjInfo", ("hipsolverDnCreateSyevjInfo", CONV_MATH_FUNC, API_SPECIAL)), + ("cusolverDnXsyevjSetSortEig", ("hipsolverDnXsyevjSetSortEig", CONV_MATH_FUNC, API_SPECIAL)), + ("cusolverDnDestroySyevjInfo", ("hipsolverDnDestroySyevjInfo", CONV_MATH_FUNC, API_SPECIAL)), + + ("gesvdjInfo_t", ("hipsolverGesvdjInfo_t", CONV_TYPE, API_SPECIAL)), + ("cusolverDnCreateGesvdjInfo", ("hipsolverDnCreateGesvdjInfo", CONV_MATH_FUNC, API_SPECIAL)), + ("cusolverDnXgesvdjSetSortEig", ("hipsolverDnXgesvdjSetSortEig", CONV_MATH_FUNC, API_SPECIAL)), + ("cusolverDnDestroyGesvdjInfo", ("hipsolverDnDestroyGesvdjInfo", CONV_MATH_FUNC, API_SPECIAL)), + + ("cusolverDnHandle_t", ("hipsolverDnHandle_t", CONV_TYPE, API_SPECIAL)), + ("cusolverDnCreate", ("hipsolverDnCreate", CONV_MATH_FUNC, API_SPECIAL)), + ("cusolverDnSetStream", ("hipsolverDnSetStream", CONV_MATH_FUNC, API_SPECIAL)), + ("cusolverDnDestroy", ("hipsolverDnDestroy", CONV_MATH_FUNC, API_SPECIAL)), + + # from aten/src/ATen/native/hip/linalg/HIPSolver.cpp + ('cusolverDnParams_t', ('hipsolverDnParams_t', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnCgeqrf', ('hipsolverDnCgeqrf', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnCgeqrf_bufferSize', ('hipsolverDnCgeqrf_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnCgesvd', ('hipsolverDnCgesvd', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnCgesvd_bufferSize', ('hipsolverDnCgesvd_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnCgesvdj', ('hipsolverDnCgesvdj', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnCgesvdjBatched', ('hipsolverDnCgesvdjBatched', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnCgesvdjBatched_bufferSize', ('hipsolverDnCgesvdjBatched_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnCgesvdj_bufferSize', ('hipsolverDnCgesvdj_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnCgetrf', ('hipsolverDnCgetrf', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnCgetrf_bufferSize', ('hipsolverDnCgetrf_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnCgetrs', ('hipsolverDnCgetrs', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnCheevd', ('hipsolverDnCheevd', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnCheevd_bufferSize', ('hipsolverDnCheevd_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnCheevj', ('hipsolverDnCheevj', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnCheevjBatched', ('hipsolverDnCheevjBatched', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnCheevjBatched_bufferSize', ('hipsolverDnCheevjBatched_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnCheevj_bufferSize', ('hipsolverDnCheevj_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnCpotrf', ('hipsolverDnCpotrf', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnCpotrfBatched', ('hipsolverDnCpotrfBatched', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnCpotrf_bufferSize', ('hipsolverDnCpotrf_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnCpotrs', ('hipsolverDnCpotrs', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnCpotrsBatched', ('hipsolverDnCpotrsBatched', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnCungqr', ('hipsolverDnCungqr', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnCungqr_bufferSize', ('hipsolverDnCungqr_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnCunmqr', ('hipsolverDnCunmqr', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnCunmqr_bufferSize', ('hipsolverDnCunmqr_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnDgeqrf', ('hipsolverDnDgeqrf', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnDgeqrf_bufferSize', ('hipsolverDnDgeqrf_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnDgesvd', ('hipsolverDnDgesvd', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnDgesvd_bufferSize', ('hipsolverDnDgesvd_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnDgesvdj', ('hipsolverDnDgesvdj', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnDgesvdjBatched', ('hipsolverDnDgesvdjBatched', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnDgesvdjBatched_bufferSize', ('hipsolverDnDgesvdjBatched_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnDgesvdj_bufferSize', ('hipsolverDnDgesvdj_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnDgetrf', ('hipsolverDnDgetrf', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnDgetrf_bufferSize', ('hipsolverDnDgetrf_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnDgetrs', ('hipsolverDnDgetrs', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnDorgqr', ('hipsolverDnDorgqr', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnDorgqr_bufferSize', ('hipsolverDnDorgqr_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnDormqr', ('hipsolverDnDormqr', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnDormqr_bufferSize', ('hipsolverDnDormqr_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnDpotrf', ('hipsolverDnDpotrf', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnDpotrfBatched', ('hipsolverDnDpotrfBatched', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnDpotrf_bufferSize', ('hipsolverDnDpotrf_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnDpotrs', ('hipsolverDnDpotrs', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnDpotrsBatched', ('hipsolverDnDpotrsBatched', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnDsyevd', ('hipsolverDnDsyevd', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnDsyevd_bufferSize', ('hipsolverDnDsyevd_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnDsyevj', ('hipsolverDnDsyevj', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnDsyevjBatched', ('hipsolverDnDsyevjBatched', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnDsyevjBatched_bufferSize', ('hipsolverDnDsyevjBatched_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnDsyevj_bufferSize', ('hipsolverDnDsyevj_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnSgeqrf', ('hipsolverDnSgeqrf', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnSgeqrf_bufferSize', ('hipsolverDnSgeqrf_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnSgesvd', ('hipsolverDnSgesvd', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnSgesvd_bufferSize', ('hipsolverDnSgesvd_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnSgesvdj', ('hipsolverDnSgesvdj', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnSgesvdjBatched', ('hipsolverDnSgesvdjBatched', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnSgesvdjBatched_bufferSize', ('hipsolverDnSgesvdjBatched_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnSgesvdj_bufferSize', ('hipsolverDnSgesvdj_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnSgetrf', ('hipsolverDnSgetrf', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnSgetrf_bufferSize', ('hipsolverDnSgetrf_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnSgetrs', ('hipsolverDnSgetrs', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnSorgqr', ('hipsolverDnSorgqr', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnSorgqr_bufferSize', ('hipsolverDnSorgqr_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnSormqr', ('hipsolverDnSormqr', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnSormqr_bufferSize', ('hipsolverDnSormqr_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnSpotrf', ('hipsolverDnSpotrf', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnSpotrfBatched', ('hipsolverDnSpotrfBatched', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnSpotrf_bufferSize', ('hipsolverDnSpotrf_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnSpotrs', ('hipsolverDnSpotrs', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnSpotrsBatched', ('hipsolverDnSpotrsBatched', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnSsyevd', ('hipsolverDnSsyevd', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnSsyevd_bufferSize', ('hipsolverDnSsyevd_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnSsyevj', ('hipsolverDnSsyevj', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnSsyevjBatched', ('hipsolverDnSsyevjBatched', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnSsyevjBatched_bufferSize', ('hipsolverDnSsyevjBatched_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnSsyevj_bufferSize', ('hipsolverDnSsyevj_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnXgeqrf', ('hipsolverDnXgeqrf', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnXgeqrf_bufferSize', ('hipsolverDnXgeqrf_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnXpotrf', ('hipsolverDnXpotrf', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnXpotrf_bufferSize', ('hipsolverDnXpotrf_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnXpotrs', ('hipsolverDnXpotrs', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnXsyevd', ('hipsolverDnXsyevd', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnXsyevd_bufferSize', ('hipsolverDnXsyevd_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnZgeqrf', ('hipsolverDnZgeqrf', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnZgeqrf_bufferSize', ('hipsolverDnZgeqrf_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnZgesvd', ('hipsolverDnZgesvd', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnZgesvd_bufferSize', ('hipsolverDnZgesvd_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnZgesvdj', ('hipsolverDnZgesvdj', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnZgesvdjBatched', ('hipsolverDnZgesvdjBatched', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnZgesvdjBatched_bufferSize', ('hipsolverDnZgesvdjBatched_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnZgesvdj_bufferSize', ('hipsolverDnZgesvdj_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnZgetrf', ('hipsolverDnZgetrf', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnZgetrf_bufferSize', ('hipsolverDnZgetrf_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnZgetrs', ('hipsolverDnZgetrs', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnZheevd', ('hipsolverDnZheevd', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnZheevd_bufferSize', ('hipsolverDnZheevd_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnZheevj', ('hipsolverDnZheevj', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnZheevjBatched', ('hipsolverDnZheevjBatched', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnZheevjBatched_bufferSize', ('hipsolverDnZheevjBatched_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnZheevj_bufferSize', ('hipsolverDnZheevj_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnZpotrf', ('hipsolverDnZpotrf', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnZpotrfBatched', ('hipsolverDnZpotrfBatched', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnZpotrf_bufferSize', ('hipsolverDnZpotrf_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnZpotrs', ('hipsolverDnZpotrs', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnZpotrsBatched', ('hipsolverDnZpotrsBatched', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnZungqr', ('hipsolverDnZungqr', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnZungqr_bufferSize', ('hipsolverDnZungqr_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnZunmqr', ('hipsolverDnZunmqr', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnZunmqr_bufferSize', ('hipsolverDnZunmqr_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + + # sytrf + ('cusolverDnDsytrf_bufferSize', ('hipsolverDnDsytrf_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnSsytrf_bufferSize', ('hipsolverDnSsytrf_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnZsytrf_bufferSize', ('hipsolverDnZsytrf_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnCsytrf_bufferSize', ('hipsolverDnCsytrf_bufferSize', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnDsytrf', ('hipsolverDnDsytrf', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnSsytrf', ('hipsolverDnSsytrf', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnZsytrf', ('hipsolverDnZsytrf', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnCsytrf', ('hipsolverDnCsytrf', CONV_MATH_FUNC, API_SPECIAL)), + + # gesdva strided + ( + 'cusolverDnSgesvdaStridedBatched_bufferSize', + ('hipsolverDnSgesvdaStridedBatched_bufferSize', CONV_MATH_FUNC, API_SPECIAL) + ), + ( + 'cusolverDnDgesvdaStridedBatched_bufferSize', + ('hipsolverDnDgesvdaStridedBatched_bufferSize', CONV_MATH_FUNC, API_SPECIAL) + ), + ( + 'cusolverDnCgesvdaStridedBatched_bufferSize', + ('hipsolverDnCgesvdaStridedBatched_bufferSize', CONV_MATH_FUNC, API_SPECIAL) + ), + ( + 'cusolverDnZgesvdaStridedBatched_bufferSize', + ('hipsolverDnZgesvdaStridedBatched_bufferSize', CONV_MATH_FUNC, API_SPECIAL) + ), + ('cusolverDnSgesvdaStridedBatched', ('hipsolverDnSgesvdaStridedBatched', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnDgesvdaStridedBatched', ('hipsolverDnDgesvdaStridedBatched', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnCgesvdaStridedBatched', ('hipsolverDnCgesvdaStridedBatched', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnZgesvdaStridedBatched', ('hipsolverDnZgesvdaStridedBatched', CONV_MATH_FUNC, API_SPECIAL)), + + # gesvdj SetXXX + ('cusolverDnXgesvdjSetTolerance', ('hipsolverDnXgesvdjSetTolerance', CONV_MATH_FUNC, API_SPECIAL)), + ('cusolverDnXgesvdjSetMaxSweeps', ('hipsolverDnXgesvdjSetMaxSweeps', CONV_MATH_FUNC, API_SPECIAL)), + ] +) + +# pyrefly: ignore [no-matching-overload] +PYTORCH_SPECIFIC_MAPPINGS = collections.OrderedDict( + [ + ("USE_CUDA", ("USE_ROCM", API_PYTORCH)), + ("TORCH_CUDA_CPP_API", ("TORCH_HIP_CPP_API", API_PYTORCH)), + ("TORCH_CUDA_CU_API", ("TORCH_HIP_API", API_PYTORCH)), + ("CUDA_VERSION", ("TORCH_HIP_VERSION", API_PYTORCH)), + ("cudaHostAllocator", ("hipHostAllocator", API_PYTORCH)), + ("cudaDeviceAllocator", ("hipDeviceAllocator", API_PYTORCH)), + ("define MAX_NUM_BLOCKS 200", ("define MAX_NUM_BLOCKS 64", API_PYTORCH)), + ("cuda::CUDAGuard", ("hip::HIPGuardMasqueradingAsCUDA", API_PYTORCH)), + ("CUDAGuard", ("HIPGuardMasqueradingAsCUDA", API_PYTORCH)), + ( + "cuda::OptionalCUDAGuard", + ("hip::OptionalHIPGuardMasqueradingAsCUDA", API_PYTORCH), + ), + ("OptionalCUDAGuard", ("OptionalHIPGuardMasqueradingAsCUDA", API_PYTORCH)), + ( + "cuda::CUDAStreamGuard", + ("hip::HIPStreamGuardMasqueradingAsCUDA", API_PYTORCH), + ), + ("CUDAStreamGuard", ("HIPStreamGuardMasqueradingAsCUDA", API_PYTORCH)), + ( + "cuda::OptionalCUDAStreamGuard", + ("hip::OptionalHIPStreamGuardMasqueradingAsCUDA", API_PYTORCH), + ), + ( + "OptionalCUDAStreamGuard", + ("OptionalHIPStreamGuardMasqueradingAsCUDA", API_PYTORCH), + ), + ( + "cuda::CUDAMultiStreamGuard", + ("hip::HIPMultiStreamGuardMasqueradingAsCUDA", API_PYTORCH), + ), + ( + "CUDAMultiStreamGuard", + ("HIPMultiStreamGuardMasqueradingAsCUDA", API_PYTORCH), + ), + # Only get needs to be transformed this way; all the other ones can go + # straight to the normal versions hip::HIPCachingAllocator + ( + "cuda::CUDACachingAllocator::get", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::get", API_PYTORCH), + ), + ( + "CUDACachingAllocator::get", + ("HIPCachingAllocatorMasqueradingAsCUDA::get", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::recordStream", + ( + "hip::HIPCachingAllocatorMasqueradingAsCUDA::recordStreamMasqueradingAsCUDA", + API_PYTORCH, + ), + ), + ( + "CUDACachingAllocator::recordStream", + ( + "HIPCachingAllocatorMasqueradingAsCUDA::recordStreamMasqueradingAsCUDA", + API_PYTORCH, + ), + ), + ( + "cuda::CUDACachingAllocator::raw_alloc", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::raw_alloc", API_PYTORCH), + ), + ( + "CUDACachingAllocator::raw_alloc", + ("HIPCachingAllocatorMasqueradingAsCUDA::raw_alloc", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::raw_alloc_with_stream", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::raw_alloc_with_stream", API_PYTORCH), + ), + ( + "CUDACachingAllocator::raw_alloc_with_stream", + ("HIPCachingAllocatorMasqueradingAsCUDA::raw_alloc_with_stream", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::raw_delete", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::raw_delete", API_PYTORCH), + ), + ( + "CUDACachingAllocator::raw_delete", + ("HIPCachingAllocatorMasqueradingAsCUDA::raw_delete", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::init", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::init", API_PYTORCH), + ), + ( + "CUDACachingAllocator::init", + ("HIPCachingAllocatorMasqueradingAsCUDA::init", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::getMemoryFraction", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::getMemoryFraction", API_PYTORCH), + ), + ( + "CUDACachingAllocator::getMemoryFraction", + ("HIPCachingAllocatorMasqueradingAsCUDA::getMemoryFraction", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::setMemoryFraction", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::setMemoryFraction", API_PYTORCH), + ), + ( + "CUDACachingAllocator::setMemoryFraction", + ("HIPCachingAllocatorMasqueradingAsCUDA::setMemoryFraction", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::emptyCache", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::emptyCache", API_PYTORCH), + ), + ( + "CUDACachingAllocator::emptyCache", + ("HIPCachingAllocatorMasqueradingAsCUDA::emptyCache", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::enable", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::enable", API_PYTORCH), + ), + ( + "CUDACachingAllocator::enable", + ("HIPCachingAllocatorMasqueradingAsCUDA::enable", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::isEnabled", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::isEnabled", API_PYTORCH), + ), + ( + "CUDACachingAllocator::isEnabled", + ("HIPCachingAllocatorMasqueradingAsCUDA::isEnabled", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::cacheInfo", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::cacheInfo", API_PYTORCH), + ), + ( + "CUDACachingAllocator::cacheInfo", + ("HIPCachingAllocatorMasqueradingAsCUDA::cacheInfo", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::getBaseAllocation", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::getBaseAllocation", API_PYTORCH), + ), + ( + "CUDACachingAllocator::getBaseAllocation", + ("HIPCachingAllocatorMasqueradingAsCUDA::getBaseAllocation", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::getDeviceStats", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::getDeviceStats", API_PYTORCH), + ), + ( + "CUDACachingAllocator::getDeviceStats", + ("HIPCachingAllocatorMasqueradingAsCUDA::getDeviceStats", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::resetAccumulatedStats", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::resetAccumulatedStats", API_PYTORCH), + ), + ( + "CUDACachingAllocator::resetAccumulatedStats", + ("HIPCachingAllocatorMasqueradingAsCUDA::resetAccumulatedStats", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::resetPeakStats", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::resetPeakStats", API_PYTORCH), + ), + ( + "CUDACachingAllocator::resetPeakStats", + ("HIPCachingAllocatorMasqueradingAsCUDA::resetPeakStats", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::snapshot", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::snapshot", API_PYTORCH), + ), + ( + "CUDACachingAllocator::snapshot", + ("HIPCachingAllocatorMasqueradingAsCUDA::snapshot", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::getCheckpointState", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::getCheckpointState", API_PYTORCH), + ), + ( + "CUDACachingAllocator::getCheckpointState", + ("HIPCachingAllocatorMasqueradingAsCUDA::getCheckpointState", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::setCheckpointState", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::setCheckpointState", API_PYTORCH), + ), + ( + "CUDACachingAllocator::setCheckpointState", + ("HIPCachingAllocatorMasqueradingAsCUDA::setCheckpointState", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::setCheckpointPoolState", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::setCheckpointPoolState", API_PYTORCH), + ), + ( + "CUDACachingAllocator::setCheckpointPoolState", + ("HIPCachingAllocatorMasqueradingAsCUDA::setCheckpointPoolState", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::beginAllocateToPool", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::beginAllocateToPool", API_PYTORCH), + ), + ( + "CUDACachingAllocator::beginAllocateToPool", + ("HIPCachingAllocatorMasqueradingAsCUDA::beginAllocateToPool", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::endAllocateToPool", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::endAllocateToPool", API_PYTORCH), + ), + ( + "CUDACachingAllocator::endAllocateToPool", + ("HIPCachingAllocatorMasqueradingAsCUDA::endAllocateToPool", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::recordHistory", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::recordHistory", API_PYTORCH), + ), + ( + "CUDACachingAllocator::recordHistory", + ("HIPCachingAllocatorMasqueradingAsCUDA::recordHistory", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::recordAnnotation", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::recordAnnotation", API_PYTORCH), + ), + ( + "CUDACachingAllocator::recordAnnotation", + ("HIPCachingAllocatorMasqueradingAsCUDA::recordAnnotation", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::pushCompileContext", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::pushCompileContext", API_PYTORCH), + ), + ( + "CUDACachingAllocator::pushCompileContext", + ("HIPCachingAllocatorMasqueradingAsCUDA::pushCompileContext", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::popCompileContext", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::popCompileContext", API_PYTORCH), + ), + ( + "CUDACachingAllocator::popCompileContext", + ("HIPCachingAllocatorMasqueradingAsCUDA::popCompileContext", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::isHistoryEnabled", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::isHistoryEnabled", API_PYTORCH), + ), + ( + "CUDACachingAllocator::isHistoryEnabled", + ("HIPCachingAllocatorMasqueradingAsCUDA::isHistoryEnabled", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::checkPoolLiveAllocations", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::checkPoolLiveAllocations", API_PYTORCH), + ), + ( + "CUDACachingAllocator::checkPoolLiveAllocations", + ("HIPCachingAllocatorMasqueradingAsCUDA::checkPoolLiveAllocations", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::attachOutOfMemoryObserver", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::attachOutOfMemoryObserver", API_PYTORCH), + ), + ( + "CUDACachingAllocator::attachOutOfMemoryObserver", + ("HIPCachingAllocatorMasqueradingAsCUDA::attachOutOfMemoryObserver", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::attachAllocatorTraceTracker", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::attachAllocatorTraceTracker", API_PYTORCH), + ), + ( + "CUDACachingAllocator::attachAllocatorTraceTracker", + ("HIPCachingAllocatorMasqueradingAsCUDA::attachAllocatorTraceTracker", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::releasePool", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::releasePool", API_PYTORCH), + ), + ( + "CUDACachingAllocator::releasePool", + ("HIPCachingAllocatorMasqueradingAsCUDA::releasePool", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::createOrIncrefPool", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::createOrIncrefPool", API_PYTORCH), + ), + ( + "CUDACachingAllocator::createOrIncrefPool", + ("HIPCachingAllocatorMasqueradingAsCUDA::createOrIncrefPool", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::setUseOnOOM", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::setUseOnOOM", API_PYTORCH), + ), + ( + "CUDACachingAllocator::setUseOnOOM", + ("HIPCachingAllocatorMasqueradingAsCUDA::setUseOnOOM", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::setNoSplit", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::setNoSplit", API_PYTORCH), + ), + ( + "CUDACachingAllocator::setNoSplit", + ("HIPCachingAllocatorMasqueradingAsCUDA::setNoSplit", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::getPoolUseCount", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::getPoolUseCount", API_PYTORCH), + ), + ( + "CUDACachingAllocator::getPoolUseCount", + ("HIPCachingAllocatorMasqueradingAsCUDA::getPoolUseCount", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::getIpcDevPtr", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::getIpcDevPtr", API_PYTORCH), + ), + ( + "CUDACachingAllocator::getIpcDevPtr", + ("HIPCachingAllocatorMasqueradingAsCUDA::getIpcDevPtr", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::shareIpcHandle", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::shareIpcHandle", API_PYTORCH), + ), + ( + "CUDACachingAllocator::shareIpcHandle", + ("HIPCachingAllocatorMasqueradingAsCUDA::shareIpcHandle", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::name", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::name", API_PYTORCH), + ), + ( + "CUDACachingAllocator::name", + ("HIPCachingAllocatorMasqueradingAsCUDA::name", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::memcpyAsync", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::memcpyAsync", API_PYTORCH), + ), + ( + "CUDACachingAllocator::memcpyAsync", + ("HIPCachingAllocatorMasqueradingAsCUDA::memcpyAsync", API_PYTORCH), + ), + ( + "cuda::CUDACachingAllocator::enablePeerAccess", + ("hip::HIPCachingAllocatorMasqueradingAsCUDA::enablePeerAccess", API_PYTORCH), + ), + ( + "CUDACachingAllocator::enablePeerAccess", + ("HIPCachingAllocatorMasqueradingAsCUDA::enablePeerAccess", API_PYTORCH), + ), + ( + "cuda::CUDAAllocator::recordStream", + ( + "hip::HIPCachingAllocatorMasqueradingAsCUDA::recordStreamMasqueradingAsCUDA", + API_PYTORCH, + ), + ), + ( + "CUDAAllocator::recordStream", + ( + "HIPCachingAllocatorMasqueradingAsCUDA::recordStreamMasqueradingAsCUDA", + API_PYTORCH, + ), + ), + ("cuda::CUDAStream", ("hip::HIPStreamMasqueradingAsCUDA", API_PYTORCH)), + ("CUDAStream", ("HIPStreamMasqueradingAsCUDA", API_PYTORCH)), + ( + "cuda::getStreamFromPool", + ("hip::getStreamFromPoolMasqueradingAsCUDA", API_PYTORCH), + ), + ("getStreamFromPool", ("getStreamFromPoolMasqueradingAsCUDA", API_PYTORCH)), + ( + "cuda::getDefaultCUDAStream", + ("hip::getDefaultHIPStreamMasqueradingAsCUDA", API_PYTORCH), + ), + ( + "cuda::getStreamFromExternal", + ("hip::getStreamFromExternalMasqueradingAsCUDA", API_PYTORCH), + ), + ("getStreamFromExternal", ("getStreamFromExternalMasqueradingAsCUDA", API_PYTORCH)), + ( + "cuda::getDefaultCUDAStream", + ("hip::getDefaultHIPStreamMasqueradingAsCUDA", API_PYTORCH), + ), + ( + "getDefaultCUDAStream", + ("getDefaultHIPStreamMasqueradingAsCUDA", API_PYTORCH), + ), + ( + "cuda::getCurrentCUDAStream", + ("hip::getCurrentHIPStreamMasqueradingAsCUDA", API_PYTORCH), + ), + ( + "getCurrentCUDAStream", + ("getCurrentHIPStreamMasqueradingAsCUDA", API_PYTORCH), + ), + ( + "cuda::setCurrentCUDAStream", + ("hip::setCurrentHIPStreamMasqueradingAsCUDA", API_PYTORCH), + ), + ( + "setCurrentCUDAStream", + ("setCurrentHIPStreamMasqueradingAsCUDA", API_PYTORCH), + ), + ( + "ATen/cudnn/Handle.h", + ("ATen/miopen/Handle.h", API_PYTORCH), + ), + # TODO: Undo this special-case; see the header for motivation behind this + # hack. It's VERY important this is only applied to PyTorch HIPify. + ( + "c10/cuda/CUDAGuard.h", + ("ATen/hip/impl/HIPGuardImplMasqueradingAsCUDA.h", API_PYTORCH), + ), + ( + "c10/cuda/CUDACachingAllocator.h", + ("ATen/hip/impl/HIPCachingAllocatorMasqueradingAsCUDA.h", API_PYTORCH), + ), + ( + "c10/cuda/CUDAStream.h", + ("ATen/hip/impl/HIPStreamMasqueradingAsCUDA.h", API_PYTORCH), + ), + ("gloo/cuda.h", ("gloo/hip.h", API_PYTORCH)), + ( + "gloo/cuda_allreduce_halving_doubling.h", + ("gloo/hip_allreduce_halving_doubling.h", API_PYTORCH), + ), + ( + "gloo/cuda_allreduce_halving_doubling_pipelined.h", + ("gloo/hip_allreduce_halving_doubling_pipelined.h", API_PYTORCH), + ), + ("gloo/cuda_allreduce_ring.h", ("gloo/hip_allreduce_ring.h", API_PYTORCH)), + ("gloo/cuda_allreduce_ring_chunked.h", ("gloo/hip_allreduce_ring_chunked.h", API_PYTORCH)), + ( + "gloo/cuda_broadcast_one_to_all.h", + ("gloo/hip_broadcast_one_to_all.h", API_PYTORCH), + ), + ( + "gloo::CudaAllreduceHalvingDoublingPipelined", + ("gloo::HipAllreduceHalvingDoublingPipelined", API_PYTORCH), + ), + ( + "gloo::CudaAllreduceRingChunked", + ("gloo::HipAllreduceRingChunked", API_PYTORCH), + ), + ("gloo::CudaBroadcastOneToAll", ("gloo::HipBroadcastOneToAll", API_PYTORCH)), + ("gloo::CudaHostWorkspace", ("gloo::HipHostWorkspace", API_PYTORCH)), + ("gloo::CudaDeviceWorkspace", ("gloo::HipDeviceWorkspace", API_PYTORCH)), + ("CUDNN_RNN_RELU", ("miopenRNNRELU", API_PYTORCH)), + ("CUDNN_RNN_TANH", ("miopenRNNTANH", API_PYTORCH)), + ("CUDNN_LSTM", ("miopenLSTM", API_PYTORCH)), + ("CUDNN_GRU", ("miopenGRU", API_PYTORCH)), + ("cudnnRNNMode_t", ("miopenRNNMode_t", API_PYTORCH)), + ("magma_queue_create_from_cuda", ("magma_queue_create_from_hip", API_PYTORCH)), + ] +) + +# pyrefly: ignore [no-matching-overload] +CAFFE2_SPECIFIC_MAPPINGS = collections.OrderedDict( + [ + ("PYTORCH_NO_CUDA_MEMORY_CACHING", ("PYTORCH_NO_CUDA_MEMORY_CACHING", API_CAFFE2)), + ("PYTORCH_CUDA_ALLOC_CONF", ("PYTORCH_CUDA_ALLOC_CONF", API_CAFFE2)), + ("cuda_stream", ("hip_stream", API_CAFFE2)), + # if the header is a native hip folder (under hip directory), + # there is no need to add a hip path to it; the trie in hipify script + # takes this mapping order to forbid further replacement + ("/hip/", ("/hip/", API_CAFFE2)), + ("/context_gpu", ("/hip/context_gpu", API_CAFFE2)), + ("/common_gpu", ("/hip/common_gpu", API_CAFFE2)), + ("/cuda_nccl_gpu", ("/hip/hip_nccl_gpu", API_CAFFE2)), + ("/mixed_utils", ("/hip/mixed_utils", API_CAFFE2)), + ("/operator_fallback_gpu", ("/hip/operator_fallback_gpu", API_CAFFE2)), + ( + "/spatial_batch_norm_op_impl", + ("/hip/spatial_batch_norm_op_impl", API_CAFFE2), + ), + ( + "/recurrent_network_executor_gpu", + ("/hip/recurrent_network_executor_gpu", API_CAFFE2), + ), + ( + "/generate_proposals_op_util_nms_gpu", + ("/hip/generate_proposals_op_util_nms_gpu", API_CAFFE2), + ), + ("/max_pool_with_index_gpu", ("/hip/max_pool_with_index_gpu", API_CAFFE2)), + ("/THCCachingAllocator_gpu", ("/hip/THCCachingAllocator_gpu", API_CAFFE2)), + ("/top_k_heap_selection", ("/hip/top_k_heap_selection", API_CAFFE2)), + ("/top_k_radix_selection", ("/hip/top_k_radix_selection", API_CAFFE2)), + ("/GpuAtomics", ("/hip/GpuAtomics", API_CAFFE2)), + ("/GpuDefs", ("/hip/GpuDefs", API_CAFFE2)), + ("/GpuScanUtils", ("/hip/GpuScanUtils", API_CAFFE2)), + ("/GpuBitonicSort", ("/hip/GpuBitonicSort", API_CAFFE2)), + ("/math/reduce.cuh", ("/math/hip/reduce.cuh", API_CAFFE2)), + ("/sgd/adagrad_fused_op_gpu.cuh", ("/sgd/hip/adagrad_fused_op_gpu.cuh", API_CAFFE2)), + ("/operators/segment_reduction_op_gpu.cuh", ("/operators/hip/segment_reduction_op_gpu.cuh", API_CAFFE2)), + ("/gather_op.cuh", ("/hip/gather_op.cuh", API_CAFFE2)), + ("caffe2/core/common_cudnn.h", ("caffe2/core/hip/common_miopen.h", API_CAFFE2)), + ("REGISTER_CUDA_OPERATOR", ("REGISTER_HIP_OPERATOR", API_CAFFE2)), + ("CUDA_1D_KERNEL_LOOP", ("HIP_1D_KERNEL_LOOP", API_CAFFE2)), + ("CUDAContext", ("HIPContext", API_CAFFE2)), + ("CAFFE_CUDA_NUM_THREADS", ("CAFFE_HIP_NUM_THREADS", API_CAFFE2)), + ("HasCudaGPU", ("HasHipGPU", API_CAFFE2)), + ("__expf", ("expf", API_CAFFE2)), + ("CUBLAS_ENFORCE", ("HIPBLAS_ENFORCE", API_CAFFE2)), + ("CUBLAS_CHECK", ("HIPBLAS_CHECK", API_CAFFE2)), + ("cublas_handle", ("hipblas_handle", API_CAFFE2)), + ("CURAND_ENFORCE", ("HIPRAND_ENFORCE", API_CAFFE2)), + ("CURAND_CHECK", ("HIPRAND_CHECK", API_CAFFE2)), + ("curandGenerateUniform", ("hiprandGenerateUniform", API_CAFFE2)), + ("curand_generator", ("hiprand_generator", API_CAFFE2)), + ("CaffeCudaGetDevice", ("CaffeHipGetDevice", API_CAFFE2)), + # do not rename CUDA_KERNEL_ASSERT, lazyInitCUDA in caffe2 sources + # the ordered dict guarantees this pattern will match first, before "CUDA" + ("CUDA_KERNEL_ASSERT", ("CUDA_KERNEL_ASSERT", API_CAFFE2)), + ("lazyInitCUDA", ("lazyInitCUDA", API_CAFFE2)), + ("CUDA_VERSION", ("TORCH_HIP_VERSION", API_CAFFE2)), + ("CUDA", ("HIP", API_CAFFE2)), + ("Cuda", ("Hip", API_CAFFE2)), + ("cuda_", ("hip_", API_CAFFE2)), + ("_cuda", ("_hip", API_CAFFE2)), + ("CUDNN", ("MIOPEN", API_CAFFE2)), + ("CuDNN", ("MIOPEN", API_CAFFE2)), + ("cudnn", ("miopen", API_CAFFE2)), + ("namespace cuda", ("namespace hip", API_CAFFE2)), + ("cuda::CUDAGuard", ("hip::HIPGuard", API_CAFFE2)), + ("cuda::OptionalCUDAGuard", ("hip::OptionalHIPGuard", API_CAFFE2)), + ("cuda::CUDAStreamGuard", ("hip::HIPStreamGuard", API_CAFFE2)), + ("cuda::OptionalCUDAStreamGuard", ("hip::OptionalHIPStreamGuard", API_CAFFE2)), + ("c10/cuda/CUDAGuard.h", ("c10/hip/HIPGuard.h", API_CAFFE2)), + ("gloo/cuda", ("gloo/hip", API_CAFFE2)), + ] +) + +# We must treat very carefully here. Blanket conversions like are done +# in CAFFE2_SPECIFIC_MAPPINGS are not presently supported on PyTorch, +# because a regex for CUDA will also match a filename like CUDAGuard.h, +# but the HIPIFY script doesn't presently move the file and so the substitution +# will be invalid. Instead, we specifically list out every identifier +# and file from c10/cuda which may be used externally, and do substitutions this +# way. +# +# NB: if you want a transformation to ONLY apply to the c10/ directory, +# put it as API_CAFFE2 +# pyrefly: ignore [no-matching-overload] +C10_MAPPINGS = collections.OrderedDict( + [ + ("CUDA_VERSION", ("TORCH_HIP_VERSION", API_PYTORCH)), + ("CUDA_LAUNCH_BLOCKING=1", ("AMD_SERIALIZE_KERNEL=3", API_C10)), + ("CUDA_LAUNCH_BLOCKING", ("AMD_SERIALIZE_KERNEL", API_C10)), + ("cuda::compat::", ("hip::compat::", API_C10)), + ("c10/cuda/CUDAAlgorithm.h", ("c10/hip/HIPAlgorithm.h", API_C10)), + ("c10/cuda/CUDADeviceAssertion.h", ("c10/hip/HIPDeviceAssertion.h", API_C10)), + ("c10/cuda/CUDADeviceAssertionHost.h", ("c10/hip/HIPDeviceAssertionHost.h", API_C10)), + ("c10/cuda/CUDAException.h", ("c10/hip/HIPException.h", API_C10)), + ("c10/cuda/CUDAMacros.h", ("c10/hip/HIPMacros.h", API_C10)), + ("c10/cuda/CUDAMathCompat.h", ("c10/hip/HIPMathCompat.h", API_C10)), + ("c10/cuda/CUDAFunctions.h", ("c10/hip/HIPFunctions.h", API_C10)), + ("c10/cuda/CUDAMiscFunctions.h", ("c10/hip/HIPMiscFunctions.h", API_C10)), + ("c10/cuda/CUDAStream.h", ("c10/hip/HIPStream.h", API_C10)), + ("c10/cuda/CUDAGraphsC10Utils.h", ("c10/hip/HIPGraphsC10Utils.h", API_C10)), + ("c10/cuda/CUDAAllocatorConfig.h", ("c10/hip/HIPAllocatorConfig.h", API_C10)), + ("c10/cuda/CUDACachingAllocator.h", ("c10/hip/HIPCachingAllocator.h", API_C10)), + ("c10/cuda/impl/CUDATest.h", ("c10/hip/impl/HIPTest.h", API_C10)), + ("c10/cuda/impl/CUDAGuardImpl.h", ("c10/hip/impl/HIPGuardImpl.h", API_C10)), + ( + "c10/cuda/impl/cuda_cmake_macros.h", + ("c10/hip/impl/hip_cmake_macros.h", API_C10), + ), + ("C10_CUDA_CHECK", ("C10_HIP_CHECK", API_C10)), + ("C10_CUDA_CHECK_WARN", ("C10_HIP_CHECK_WARN", API_C10)), + ("C10_CUDA_ERROR_HANDLED", ("C10_HIP_ERROR_HANDLED", API_C10)), + ("C10_CUDA_IGNORE_ERROR", ("C10_HIP_IGNORE_ERROR", API_C10)), + ("C10_CUDA_CLEAR_ERROR", ("C10_HIP_CLEAR_ERROR", API_C10)), + ("c10::cuda", ("c10::hip", API_C10)), + ("cuda::CUDAStream", ("hip::HIPStream", API_C10)), + ("CUDAStream", ("HIPStream", API_C10)), + # This substitution is not permissible, because there's another copy of this + # function in torch/cuda.h + # ("cuda::device_count", ("hip::device_count", API_C10)), + ("cuda::current_device", ("hip::current_device", API_C10)), + ("cuda::set_device", ("hip::set_device", API_C10)), + ("cuda::device_synchronize", ("hip::device_synchronize", API_C10)), + ("cuda::getStreamFromPool", ("hip::getStreamFromPool", API_C10)), + ("getStreamFromPool", ("getStreamFromPool", API_C10)), + ("cuda::getDefaultCUDAStream", ("hip::getDefaultHIPStream", API_C10)), + ("getDefaultCUDAStream", ("getDefaultHIPStream", API_C10)), + ("cuda::getCurrentCUDAStream", ("hip::getCurrentHIPStream", API_C10)), + ("getCurrentCUDAStream", ("getCurrentHIPStream", API_C10)), + ("cuda::get_cuda_check_prefix", ("hip::get_cuda_check_prefix", API_C10)), + ("cuda::setCurrentCUDAStream", ("hip::setCurrentHIPStream", API_C10)), + ("setCurrentCUDAStream", ("setCurrentHIPStream", API_C10)), + ("cuda::CUDACachingAllocator", ("hip::HIPCachingAllocator", API_C10)), + ("CUDACachingAllocator", ("HIPCachingAllocator", API_C10)), + ("cuda::CUDAAllocatorConfig", ("hip::HIPAllocatorConfig", API_C10)), + ("CUDAAllocatorConfig", ("HIPAllocatorConfig", API_C10)), + ("pinned_use_cuda_host_register", ("pinned_use_hip_host_register", API_C10)), + ("c10::cuda::CUDAAllocator", ("c10::hip::HIPAllocator", API_C10)), + ("cuda::CUDAAllocator", ("hip::HIPAllocator", API_C10)), + ("CUDAStreamCaptureModeGuard", ("HIPStreamCaptureModeGuard", API_C10)), + ("cuda::CUDAStreamCaptureModeGuard", ("cuda::HIPStreamCaptureModeGuard", API_C10)), + ("CUDAAllocator", ("HIPAllocator", API_C10)), + ("C10_CUDA_KERNEL_LAUNCH_CHECK", ("C10_HIP_KERNEL_LAUNCH_CHECK", API_C10)), + ("CUDAKernelLaunchRegistry", ("HIPKernelLaunchRegistry", API_C10)), + ("c10::cuda::get_cuda_check_suffix", ("c10::hip::get_hip_check_suffix", API_C10)), + ("c10::cuda::get_cuda_error_help", ("c10::hip::get_hip_error_help", API_C10)), + ] +) + +# NB: C10 mappings are more specific than Caffe2 mappings, so run them +# first +CUDA_TO_HIP_MAPPINGS = [ + CUDA_IDENTIFIER_MAP, + CUDA_TYPE_NAME_MAP, + CUDA_INCLUDE_MAP, + CUDA_SPECIAL_MAP, + C10_MAPPINGS, + PYTORCH_SPECIFIC_MAPPINGS, + CAFFE2_SPECIFIC_MAPPINGS, +] diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/hipify/hipify_python.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/hipify/hipify_python.py new file mode 100644 index 0000000000000000000000000000000000000000..c4b2a863d60f398587bf62a9a60cc0dae03532c3 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/hipify/hipify_python.py @@ -0,0 +1,1186 @@ +#!/usr/bin/env python3 +# mypy: allow-untyped-defs +""" The Python Hipify script. +## +# Copyright (c) 2015-2016 Advanced Micro Devices, Inc. All rights reserved. +# 2017-2018 Advanced Micro Devices, Inc. and +# Facebook Inc. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +""" +import argparse +import fnmatch +import re +import shutil +import sys +import os + +from . import constants +from .cuda_to_hip_mappings import CUDA_TO_HIP_MAPPINGS +from .cuda_to_hip_mappings import MATH_TRANSPILATIONS + +from collections.abc import Iterator +from collections.abc import Mapping, Iterable +from enum import Enum +import functools +import hashlib + +class CurrentState(Enum): + INITIALIZED = 1 + DONE = 2 + +class HipifyResult: + def __init__(self, current_state, hipified_path) -> None: + self.current_state = current_state + self.hipified_path = hipified_path + self.status = "" + + def __str__(self) -> str: + return (f"HipifyResult:: current_state: {self.current_state}, hipified_path : {self.hipified_path}, status: {self.status}") + +HipifyFinalResult = dict[str, HipifyResult] +HIPIFY_C_BREADCRUMB = "// !!! This is a file automatically generated by hipify!!!\n" +HIPIFY_FINAL_RESULT: HipifyFinalResult = {} + +# Hardcode the PyTorch template map +"""This dictionary provides the mapping from PyTorch kernel template types +to their actual types.""" +PYTORCH_TEMPLATE_MAP = {"Dtype": "scalar_t", "T": "scalar_t"} + +__all__ = ['InputError', 'openf', 'bcolors', 'GeneratedFileCleaner', 'match_extensions', 'matched_files_iter', + 'preprocess_file_and_save_result', 'compute_stats', 'add_dim3', 'processKernelLaunches', 'find_closure_group', + 'find_bracket_group', 'find_parentheses_group', 'replace_math_functions', 'hip_header_magic', 'replace_extern_shared', + 'get_hip_file_path', 'is_out_of_place', 'is_pytorch_file', 'is_cusparse_file', 'is_special_file', 'is_caffe2_gpu_file', + 'is_caffe2_gpu_file', 'Trie', 'preprocessor', 'file_specific_replacement', 'file_add_header', + 'fix_static_global_kernels', 'extract_arguments', 'str2bool', 'CurrentState', 'HipifyResult', 'hipify'] + + +class InputError(Exception): + # Exception raised for errors in the input. + + def __init__(self, message) -> None: + super().__init__(message) + self.message = message + + def __str__(self) -> str: + return f"Input error: {self.message}" + + +def openf(filename, mode): + return open(filename, mode, errors='ignore') + + +# Color coding for printing +class bcolors: + HEADER = '\033[95m' + OKBLUE = '\033[94m' + OKGREEN = '\033[92m' + WARNING = '\033[93m' + FAIL = '\033[91m' + ENDC = '\033[0m' + BOLD = '\033[1m' + UNDERLINE = '\033[4m' + + +# To the programmer, the output of hipify most likely are intermediates. +# This class allows users of hipify to ask for a cleanup by running the +# hipify and compilation in a with instantiating this context manager class +# with keep_intermediates=False. +# The main usecase is the cpp_extensions, specifically the load method. +# It is a good idea to keep intermediates (in case of errors or to +# not recompile unchanged files), but in cases where you don't want to +# keep them (e.g. in the CI), this can be used to remove files. +class GeneratedFileCleaner: + """Context Manager to clean up generated files""" + def __init__(self, keep_intermediates=False) -> None: + self.keep_intermediates = keep_intermediates + self.files_to_clean = set() + self.dirs_to_clean = [] + + def __enter__(self): + return self + + def open(self, fn, *args, **kwargs): + if not os.path.exists(fn): + self.files_to_clean.add(os.path.abspath(fn)) + # pyrefly: ignore [not-iterable] + return open(fn, *args, **kwargs) + + def makedirs(self, dn, exist_ok=False) -> None: + parent, n = os.path.split(dn) + if not n: + parent, n = os.path.split(parent) + if parent and n and not os.path.exists(parent): + self.makedirs(parent, exist_ok=True) + if not os.path.isdir(dn) or not exist_ok: + os.mkdir(dn) + self.dirs_to_clean.append(os.path.abspath(dn)) + + def __exit__(self, type, value, traceback): + if not self.keep_intermediates: + for f in self.files_to_clean: + os.unlink(f) + for d in self.dirs_to_clean[::-1]: + os.rmdir(d) + +# Follow UNIX convention for paths to use '/' instead of '\\' on Windows +def _to_unix_path(path: str) -> str: + return path.replace(os.sep, '/') + +def match_extensions(filename: str, extensions: Iterable) -> bool: + """Helper method to see if filename ends with certain extension""" + return any(filename.endswith(e) for e in extensions) + + +def _fnmatch(filepath, patterns): + return any(fnmatch.fnmatch(filepath, pattern) for pattern in patterns) + + +def matched_files_iter( + root_path: str, + includes: Iterable = (), + ignores: Iterable = (), + extensions: Iterable = (), + out_of_place_only: bool = False, + is_pytorch_extension: bool = False) -> Iterator[str]: + + exact_matches = set(includes) + + # This is a very rough heuristic; really, we want to avoid scanning + # any file which is not checked into source control, but this script + # needs to work even if you're in a Git or Hg checkout, so easier to + # just block the biggest time sinks that won't matter in the + # end. + for (abs_dirpath, dirs, filenames) in os.walk(root_path, topdown=True): + rel_dirpath = os.path.relpath(abs_dirpath, root_path) + if rel_dirpath == '.': + # Blah blah blah O(n) blah blah + if ".git" in dirs: + dirs.remove(".git") + if "build" in dirs: + dirs.remove("build") + if "third_party" in dirs: + dirs.remove("third_party") + dirs.append("third_party/nvfuser") + for filename in filenames: + filepath = _to_unix_path(os.path.join(abs_dirpath, filename)) + rel_filepath = _to_unix_path(os.path.join(rel_dirpath, filename)) + # We respect extensions, UNLESS you wrote the entire + # filename verbatim, in which case we always accept it + if ( + _fnmatch(filepath, includes) + and (not _fnmatch(filepath, ignores)) + and (match_extensions(filepath, extensions) or filepath in exact_matches) + ): + if not is_pytorch_extension: # for pytorch extensions, consider all files + if not is_pytorch_file(rel_filepath) and not is_caffe2_gpu_file(rel_filepath): + continue + if out_of_place_only and not is_out_of_place(rel_filepath): + continue + yield filepath + + +def preprocess_file_and_save_result( + output_directory: str, + filepath: str, + all_files: Iterable, + header_include_dirs: Iterable, + stats: dict[str, list], + hip_clang_launch: bool, + is_pytorch_extension: bool, + clean_ctx: GeneratedFileCleaner, + show_progress: bool) -> None: + fin_path = os.path.abspath(os.path.join(output_directory, filepath)) + hipify_result = HipifyResult(current_state=CurrentState.INITIALIZED, hipified_path=fin_path) + HIPIFY_FINAL_RESULT[fin_path] = hipify_result + result = preprocessor(output_directory, filepath, all_files, header_include_dirs, stats, + hip_clang_launch, is_pytorch_extension, clean_ctx, show_progress) + + # Show what happened + if show_progress and "ignored" not in result.status: + print( + fin_path, "->", + result.hipified_path, result.status, flush=True) + + HIPIFY_FINAL_RESULT[fin_path] = result + + +def compute_stats(stats) -> None: + unsupported_calls = {cuda_call for (cuda_call, _filepath) in stats["unsupported_calls"]} + + # Print the number of unsupported calls + print(f"Total number of unsupported CUDA function calls: {len(unsupported_calls):d}") + + # Print the list of unsupported calls + print(", ".join(unsupported_calls)) + + # Print the number of kernel launches + print(f"\nTotal number of replaced kernel launches: {len(stats['kernel_launches']):d}") + + +def add_dim3(kernel_string, cuda_kernel): + '''adds dim3() to the second and third arguments in the kernel launch''' + count = 0 + closure = 0 + kernel_string = kernel_string.replace("<<<", "").replace(">>>", "") + arg_locs: list[dict[str, int]] = [{} for _ in range(2)] + arg_locs[count]['start'] = 0 + for ind, c in enumerate(kernel_string): + if count > 1: + break + if c == "(": + closure += 1 + elif c == ")": + closure -= 1 + if (c == "," or ind == len(kernel_string) - 1) and closure == 0: + arg_locs[count]['end'] = ind + (c != ",") + count += 1 + if count < 2: + arg_locs[count]['start'] = ind + 1 + + first_arg_raw = kernel_string[arg_locs[0]['start']:arg_locs[0]['end'] + 1] + second_arg_raw = kernel_string[arg_locs[1]['start']:arg_locs[1]['end']] + + first_arg_clean = kernel_string[arg_locs[0]['start']:arg_locs[0]['end']].replace("\n", "").strip(" ") + second_arg_clean = kernel_string[arg_locs[1]['start']:arg_locs[1]['end']].replace("\n", "").strip(" ") + + first_arg_dim3 = f"dim3({first_arg_clean})" + second_arg_dim3 = f"dim3({second_arg_clean})" + + first_arg_raw_dim3 = first_arg_raw.replace(first_arg_clean, first_arg_dim3) + second_arg_raw_dim3 = second_arg_raw.replace(second_arg_clean, second_arg_dim3) + cuda_kernel = cuda_kernel.replace(first_arg_raw + second_arg_raw, first_arg_raw_dim3 + second_arg_raw_dim3) + return cuda_kernel + + +RE_KERNEL_LAUNCH = re.compile(r'([ ]+)(detail?)::[ ]+\\\n[ ]+') + + +def processKernelLaunches(string, stats): + """ Replace the CUDA style Kernel launches with the HIP style kernel launches.""" + # Concat the namespace with the kernel names. (Find cleaner way of doing this later). + string = RE_KERNEL_LAUNCH.sub(lambda inp: f"{inp.group(1)}{inp.group(2)}::", string) + + def grab_method_and_template(in_kernel): + # The positions for relevant kernel components. + pos = { + "kernel_launch": {"start": in_kernel["start"], "end": in_kernel["end"]}, + "kernel_name": {"start": -1, "end": -1}, + "template": {"start": -1, "end": -1} + } + + # Count for balancing template + count = {"<>": 0} + + # Status for whether we are parsing a certain item. + START = 0 + AT_TEMPLATE = 1 + AFTER_TEMPLATE = 2 + AT_KERNEL_NAME = 3 + + status = START + + # Parse the string character by character + for i in range(pos["kernel_launch"]["start"] - 1, -1, -1): + char = string[i] + + # Handle Templating Arguments + if status in (START, AT_TEMPLATE): + if char == ">": + if status == START: + status = AT_TEMPLATE + pos["template"]["end"] = i + count["<>"] += 1 + + if char == "<": + count["<>"] -= 1 + if count["<>"] == 0 and (status == AT_TEMPLATE): + pos["template"]["start"] = i + status = AFTER_TEMPLATE + + # Handle Kernel Name + if status != AT_TEMPLATE: + if string[i].isalnum() or string[i] in {'(', ')', '_', ':', '#'}: + if status != AT_KERNEL_NAME: + status = AT_KERNEL_NAME + pos["kernel_name"]["end"] = i + + # Case: Kernel name starts the string. + if i == 0: + pos["kernel_name"]["start"] = 0 + + # Finished + return [(pos["kernel_name"]), (pos["template"]), (pos["kernel_launch"])] + + else: + # Potential ending point if we're already traversing a kernel's name. + if status == AT_KERNEL_NAME: + pos["kernel_name"]["start"] = i + + # Finished + return [(pos["kernel_name"]), (pos["template"]), (pos["kernel_launch"])] + + def find_kernel_bounds(string): + """Finds the starting and ending points for all kernel launches in the string.""" + kernel_end = 0 + kernel_positions = [] + + # Continue until we cannot find any more kernels anymore. + while string.find("<<<", kernel_end) != -1: + # Get kernel starting position (starting from the previous ending point) + kernel_start = string.find("<<<", kernel_end) + + # Get kernel ending position (adjust end point past the >>>) + kernel_end = string.find(">>>", kernel_start) + 3 + if kernel_end <= 0: + raise InputError("no kernel end found") + + # Add to list of traversed kernels + kernel_positions.append({"start": kernel_start, "end": kernel_end, + "group": string[kernel_start: kernel_end]}) + + return kernel_positions + + # Replace comments and string literals from the code so that find_kernel_bounds does not + # wrongly capture kernels in comments and string literals. + # This function replaces them with "x" to keep positions. + def mask_comments(string): + in_comment = '' + prev_c = '' + new_string = '' + for c in string: + if in_comment == '': + # Outside comments + if c == '/' and prev_c == '/': + in_comment = '//' + elif c == '*' and prev_c == '/': + in_comment = '/*' + elif c == '"' and prev_c != '\\' and prev_c != "'": + in_comment = '"' + elif in_comment == '//': + # In // xxx + if c == '\r' or c == '\n': + in_comment = '' + elif in_comment == '/*': + # In /* xxx */ + if c == '/' and prev_c == '*': + in_comment = '' + elif in_comment == '"': + # In "" + if c == '"' and prev_c != '\\': + in_comment = '' + prev_c = c + if in_comment == '': + new_string += c + else: + new_string += 'x' + return new_string + + # Grab positional ranges of all kernel launches + get_kernel_positions = list(find_kernel_bounds(mask_comments(string))) + output_string = string + + # Replace each CUDA kernel with a HIP kernel. + for kernel in get_kernel_positions: + # Get kernel components + params = grab_method_and_template(kernel) + + # Find parenthesis after kernel launch + parenthesis = string.find("(", kernel["end"]) + + # Extract cuda kernel + cuda_kernel = string[params[0]["start"]:parenthesis + 1] + kernel_string = string[kernel['start']:kernel['end']] + end_param_index = 0 if params[1]['end'] == -1 else 1 + kernel_name_with_template = string[params[0]['start']:params[end_param_index]['end'] + 1] + cuda_kernel_dim3 = add_dim3(kernel_string, cuda_kernel) + # Keep number of kernel launch params consistent (grid dims, group dims, stream, dynamic shared size) + num_klp = len(extract_arguments(0, kernel["group"].replace("<<<", "(").replace(">>>", ")"))) + + hip_kernel = "hipLaunchKernelGGL(" + cuda_kernel_dim3[0:-1].replace( + ">>>", ", 0" * (4 - num_klp) + ">>>").replace("<<<", ", ").replace( + ">>>", ", ").replace(kernel_name_with_template, "(" + kernel_name_with_template + ")") + + # Replace cuda kernel with hip kernel + output_string = output_string.replace(cuda_kernel, hip_kernel) + + # Update the statistics + stats["kernel_launches"].append(hip_kernel) + + return output_string + + +def find_closure_group(input_string, start, group): + """Generalization for finding a balancing closure group + + if group = ["(", ")"], then finds the first balanced parentheses. + if group = ["{", "}"], then finds the first balanced bracket. + + Given an input string, a starting position in the input string, and the group type, + find_closure_group returns the positions of group[0] and group[1] as a tuple. + + Example: + >>> find_closure_group("(hi)", 0, ["(", ")"]) + (0, 3) + """ + + inside_parenthesis = False + parens = 0 + pos = start + p_start, p_end = -1, -1 + + while pos < len(input_string): + if input_string[pos] == group[0]: + if inside_parenthesis is False: + inside_parenthesis = True + parens = 1 + p_start = pos + else: + parens += 1 + elif input_string[pos] == group[1] and inside_parenthesis: + parens -= 1 + + if parens == 0: + p_end = pos + return p_start, p_end + + pos += 1 + return None, None + + +def find_bracket_group(input_string, start): + """Finds the first balanced parentheses.""" + return find_closure_group(input_string, start, group=["{", "}"]) + + +def find_parentheses_group(input_string, start): + """Finds the first balanced bracket.""" + return find_closure_group(input_string, start, group=["(", ")"]) + + +RE_ASSERT = re.compile(r"\bassert[ ]*\(") + + +def replace_math_functions(input_string): + """FIXME: Temporarily replace std:: invocations of math functions + with non-std:: versions to prevent linker errors NOTE: This + can lead to correctness issues when running tests, since the + correct version of the math function (exp/expf) might not get + called. Plan is to remove this function once HIP supports + std:: math function calls inside device code + + """ + output_string = input_string + for func in MATH_TRANSPILATIONS: + output_string = output_string.replace(fr'{func}(', f'{MATH_TRANSPILATIONS[func]}(') + + return output_string + + +RE_SYNCTHREADS = re.compile(r":?:?\b(__syncthreads)\b(\w*\()") + + +def hip_header_magic(input_string): + """If the file makes kernel builtin calls and does not include the cuda_runtime.h header, + then automatically add an #include to match the "magic" includes provided by NVCC. + TODO: + Update logic to ignore cases where the cuda_runtime.h is included by another file. + """ + + # Copy the input. + output_string = input_string + + # Check if one of the following headers is already included. + headers = ["hip/hip_runtime.h", "hip/hip_runtime_api.h"] + if any(re.search(fr'#include ("{ext}"|<{ext}>)', output_string) for ext in headers): + return output_string + + # Rough logic to detect if we're inside device code + hasDeviceLogic: int + hasDeviceLogic = "hipLaunchKernelGGL" in output_string + hasDeviceLogic += "__global__" in output_string + hasDeviceLogic += "__shared__" in output_string + hasDeviceLogic += RE_SYNCTHREADS.search(output_string) is not None + + # If device logic found, provide the necessary header. + if hasDeviceLogic: + output_string = '#include "hip/hip_runtime.h"\n' + input_string + + return output_string + + +RE_EXTERN_SHARED = re.compile(r"extern\s+([\w\(\)]+)?\s*__shared__\s+([\w:<>\s]+)\s+(\w+)\s*\[\s*\]\s*;") + + +def replace_extern_shared(input_string): + """ + Match 'extern __shared__ type foo[];' syntax and use HIP_DYNAMIC_SHARED() MACRO instead. + See: https://github.com/ROCm/hip/blob/master/docs/markdown/hip_kernel_language.md#__shared__ + Examples: + "extern __shared__ char smemChar[];" + => "HIP_DYNAMIC_SHARED( char, smemChar)" + "extern __shared__ unsigned char smem[];" + => "HIP_DYNAMIC_SHARED( unsigned char, my_smem)" + """ + output_string = input_string + output_string = RE_EXTERN_SHARED.sub( + lambda inp: f"HIP_DYNAMIC_SHARED({inp.group(1) or ''} {inp.group(2)}, {inp.group(3)})", output_string) + + return output_string + + +def get_hip_file_path(rel_filepath, is_pytorch_extension=False): + """ + Returns the new name of the hipified file + """ + # At the moment, some PyTorch source files are HIPified in place. The predicate + # is_out_of_place tells us if this is the case or not. + if os.path.isabs(rel_filepath): + raise AssertionError("rel_filepath must be a relative path") + if not is_pytorch_extension and not is_out_of_place(rel_filepath): + return rel_filepath + + dirpath, filename = os.path.split(rel_filepath) + root, ext = os.path.splitext(filename) + + # Here's the plan: + # + # In general, we need to disambiguate the HIPified filename so that + # it gets a different name from the original filename, so + # that we don't overwrite the original file + # + # There's a lot of different naming conventions across PyTorch + # and Caffe2, but the general recipe is to convert occurrences + # of cuda/gpu to hip, and add hip if there are no occurrences + # of cuda/gpu anywhere. + # + # Concretely, we do the following: + # + # - If there is a directory component named "cuda", replace + # it with "hip", AND + # + # - If the file name contains "CUDA", replace it with "HIP", AND + # + # - ALWAYS replace '.cu' with '.hip', because those files + # contain CUDA kernels that needs to be hipified and processed with + # hip compiler + # + # - If we are not hipifying a PyTorch extension, and the parent + # directory name did not change as a result of the above + # transformations, insert "hip" in the file path + # as the direct parent folder of the file + # + # - If we are hipifying a PyTorch extension, and the parent directory + # name as well as the filename (incl. extension) did not change as + # a result of the above transformations, insert "_hip" in the filename + # + # This isn't set in stone; we might adjust this to support other + # naming conventions. + + if ext == '.cu': + ext = '.hip' + + orig_filename = filename + orig_dirpath = dirpath + + dirpath = dirpath.replace('cuda', 'hip') + dirpath = dirpath.replace('CUDA', 'HIP') + dirpath = dirpath.replace('THC', 'THH') + + root = root.replace('cuda', 'hip') + root = root.replace('CUDA', 'HIP') + # Special case to handle caffe2/core/THCCachingAllocator + if dirpath != "caffe2/core": + root = root.replace('THC', 'THH') + + if not is_pytorch_extension and dirpath == orig_dirpath: + dirpath = os.path.join(dirpath, 'hip') + + if is_pytorch_extension and dirpath == orig_dirpath and (root + ext) == orig_filename: + root = root + "_hip" + + return os.path.join(dirpath, root + ext) + + +def is_out_of_place(rel_filepath) -> bool: + if os.path.isabs(rel_filepath): + raise AssertionError("rel_filepath must be a relative path") + if rel_filepath.startswith("torch/"): + return False + if rel_filepath.startswith("third_party/nvfuser/"): + return False + if rel_filepath.startswith("tools/autograd/templates/"): + return False + return True + + +# Keep this synchronized with includes/ignores in build_amd.py +def is_pytorch_file(rel_filepath) -> bool: + if os.path.isabs(rel_filepath): + raise AssertionError("rel_filepath must be a relative path") + if rel_filepath.startswith("aten/"): + if rel_filepath.startswith("aten/src/ATen/core/"): + return False + return True + if rel_filepath.startswith("torch/"): + return True + if rel_filepath.startswith("third_party/nvfuser/"): + return True + if rel_filepath.startswith("third_party/fbgemm/"): + return True + if rel_filepath.startswith("tools/autograd/templates/"): + return True + return False + + +def is_cusparse_file(rel_filepath): + if is_pytorch_file(rel_filepath): + return "sparse" in rel_filepath.lower() + return False + + +def is_special_file(rel_filepath) -> bool: + if is_pytorch_file(rel_filepath): + if "sparse" in rel_filepath.lower(): + return True + elif "linalg" in rel_filepath.lower(): + if "batchlinearalgebralibblas" in rel_filepath.lower(): + return False # don't use "special" mappings for this specific linalg cublas file + return True + return False + +def is_caffe2_gpu_file(rel_filepath): + if os.path.isabs(rel_filepath): + raise AssertionError("rel_filepath must be a relative path") + if rel_filepath.startswith("c10/cuda"): + return True + filename = os.path.basename(rel_filepath) + _, ext = os.path.splitext(filename) + # pyrefly: ignore [unsupported-operation] + return ('gpu' in filename or ext in ['.cu', '.cuh']) and ('cudnn' not in filename) + +class TrieNode: + """A Trie node whose children are represented as a directory of char: TrieNode. + A special char '' represents end of word + """ + + def __init__(self) -> None: + self.children = {} + +class Trie: + """Creates a Trie out of a list of words. The trie can be exported to a Regex pattern. + The corresponding Regex should match much faster than a simple Regex union.""" + + def __init__(self) -> None: + """Initialize the trie with an empty root node.""" + self.root = TrieNode() + self._hash = hashlib.md5(usedforsecurity=False) + self._digest = self._hash.digest() + + def add(self, word) -> None: + """Add a word to the Trie. """ + self._hash.update(word.encode()) + self._digest = self._hash.digest() + node = self.root + + for char in word: + node.children.setdefault(char, TrieNode()) + node = node.children[char] + node.children[''] = True # Mark the end of the word + + def dump(self): + """Return the root node of Trie. """ + return self.root + + def quote(self, char): + """ Escape a char for regex. """ + return re.escape(char) + + def search(self, word): + """Search whether word is present in the Trie. + Returns True if yes, else return False""" + node = self.root + for char in word: + if char in node.children: + node = node.children[char] + else: + return False + + # make sure to check the end-of-word marker present + return '' in node.children + + @functools.lru_cache # noqa: B019 + def _pattern(self, root, digest): + """Convert a Trie into a regular expression pattern + + Memoized on the hash digest of the trie, which is built incrementally + during add(). + """ + node = root + + if "" in node.children and len(node.children.keys()) == 1: + return None + + alt = [] # store alternative patterns + cc = [] # store char to char classes + q = 0 # for node representing the end of word + for char in sorted(node.children.keys()): + if isinstance(node.children[char], TrieNode): + try: + recurse = self._pattern(node.children[char], self._digest) + alt.append(self.quote(char) + recurse) + except Exception: + cc.append(self.quote(char)) + else: + q = 1 + cconly = not len(alt) > 0 + + if len(cc) > 0: + if len(cc) == 1: + alt.append(cc[0]) + else: + alt.append('[' + ''.join(cc) + ']') + + if len(alt) == 1: + result = alt[0] + else: + result = "(?:" + "|".join(alt) + ")" + + if q: + if cconly: + result += "?" + else: + result = f"(?:{result})?" + return result + + def pattern(self): + """Export the Trie to a regex pattern.""" + return self._pattern(self.root, self._digest) + + def export_to_regex(self): + """Export the Trie to a regex pattern.""" + return self._pattern(self.root, self._digest) + +CAFFE2_TRIE = Trie() +CAFFE2_MAP = {} +PYTORCH_TRIE = Trie() +PYTORCH_MAP: dict[str, object] = {} + +# In PyTorch, we map cuBLAS->rocBLAS and cuSPARSE->hipSPARSE. Note the prefix, roc versus hip. +# The 'hip' APIs offer a more direct CUDA-friendly mapping, but calling rocBLAS directly has better performance. +# Unfortunately, the roc* types and hip* types differ, i.e., rocblas_float_complex versus hipComplex. +# In the case of SPARSE, we must use the hip types for complex instead of the roc types, +# but the pytorch mappings assume roc. Therefore, we create a new SPARSE mapping that has a higher priority. +# Its mappings will trigger first, and only when a miss occurs will the lower-priority pytorch mapping take place. +# When a file contains "sparse" in the filename, a mapping marked with API_SPARSE is preferred over other choices. +# Similarly, "linalg" files require rocBLAS -> hipSOLVER so they also need special handling. +PYTORCH_SPECIAL_MAP = {} + +for mapping in CUDA_TO_HIP_MAPPINGS: + if not isinstance(mapping, Mapping): + raise TypeError("Expected each mapping in CUDA_TO_HIP_MAPPINGS to be a Mapping") + for src, value in mapping.items(): + dst = value[0] + meta_data = value[1:] + if constants.API_CAFFE2 not in meta_data: + PYTORCH_TRIE.add(src) + # if src is already in PYTORCH_MAP and dst belongs to API_SPECIAL + # do not overwrite PYTORCH_MAP, store dst separately + if constants.API_SPECIAL in meta_data and PYTORCH_MAP.get(src, ""): + PYTORCH_SPECIAL_MAP[src] = dst + else: + PYTORCH_MAP[src] = dst + if constants.API_PYTORCH not in meta_data and constants.API_SPECIAL not in meta_data: + CAFFE2_TRIE.add(src) + CAFFE2_MAP[src] = dst +RE_CAFFE2_PREPROCESSOR = re.compile(CAFFE2_TRIE.export_to_regex()) +RE_PYTORCH_PREPROCESSOR = re.compile(fr'(?<=\W)({PYTORCH_TRIE.export_to_regex()})(?=\W)') + +RE_QUOTE_HEADER = re.compile(r'#include "([^"]+)"') +RE_ANGLE_HEADER = re.compile(r'#include <([^>]+)>') +RE_THC_GENERIC_FILE = re.compile(r'#define THC_GENERIC_FILE "([^"]+)"') +RE_CU_SUFFIX = re.compile(r'\.cu\b') # be careful not to pick up .cuh + +""" +Returns a HipifyResult object with the following details: + "hipified_path" : absolute path of hipified source file + "status" : "ok" if hipified file was written out + "skipped" if an identical hipified file already existed or hipified file couldn't be written out + "ignored" if the source file was a hipified file itself or not meant to be hipified + "current_state" : CurrentState.INITIALIZED if source file is first ready to be hipified + CurrentState.DONE if source file is done with hipification process +""" + + +def preprocessor( + output_directory: str, + filepath: str, + all_files: Iterable, + header_include_dirs: Iterable, + stats: dict[str, list], + hip_clang_launch: bool, + is_pytorch_extension: bool, + clean_ctx: GeneratedFileCleaner, + show_progress: bool) -> HipifyResult: + """ Executes the CUDA -> HIP conversion on the specified file. """ + fin_path = os.path.abspath(os.path.join(output_directory, filepath)) + filepath = _to_unix_path(filepath) + hipify_result = HIPIFY_FINAL_RESULT[fin_path] + if filepath not in all_files: + hipify_result.hipified_path = None + hipify_result.status = "[ignored, not to be hipified]" + hipify_result.current_state = CurrentState.DONE + return hipify_result + + rel_filepath = _to_unix_path(os.path.relpath(filepath, output_directory)) + + with open(fin_path, encoding='utf-8') as fin: + if fin.readline() == HIPIFY_C_BREADCRUMB: + hipify_result.hipified_path = None + hipify_result.status = "[ignored, input is hipified output]" + hipify_result.current_state = CurrentState.DONE + return hipify_result + fin.seek(0) + output_source = fin.read() + + orig_output_source = output_source + + # get_hip_file_path needs a relative path to work correctly + fout_path = os.path.abspath(os.path.join(output_directory, get_hip_file_path(rel_filepath, is_pytorch_extension))) + if not os.path.exists(os.path.dirname(fout_path)): + clean_ctx.makedirs(os.path.dirname(fout_path)) + + # unsupported_calls statistics reporting is broken atm + def pt_repl(m): + return PYTORCH_MAP[m.group(0)] + + def pt_special_repl(m): + # checks SPECIAL map first, and if a miss occurs, falls back to pytorch mappings + return PYTORCH_SPECIAL_MAP.get(m.group(0), pt_repl(m)) + + + if is_pytorch_extension: + output_source = RE_PYTORCH_PREPROCESSOR.sub(pt_repl, output_source) + else: + if is_special_file(rel_filepath): + output_source = RE_PYTORCH_PREPROCESSOR.sub(pt_special_repl, output_source) + elif is_pytorch_file(rel_filepath): + output_source = RE_PYTORCH_PREPROCESSOR.sub(pt_repl, output_source) + else: + def c2_repl(m): + return CAFFE2_MAP[m.group(0)] + output_source = RE_CAFFE2_PREPROCESSOR.sub(c2_repl, output_source) + + # Header rewrites + def mk_repl(templ, include_current_dir=True): + def repl(m): + f = m.group(1) + filename = os.path.basename(f) + if ( + f.startswith(("ATen/cuda", + "ATen/native/cuda", + "ATen/native/nested/cuda", + "ATen/native/quantized/cuda", + "ATen/native/sparse/cuda", + "ATen/native/transformers/cuda", + "THC/")) or + (f.startswith("THC") and not f.startswith("THCP")) + ): + return templ.format(get_hip_file_path(m.group(1), is_pytorch_extension)) + # if filename is one of the files being hipified for this extension + if (is_pytorch_extension and any(s.endswith(filename) for s in all_files)): + header_dir = None + header_filepath = None + # If include_current_dir True, look first in same dir as the including source file + if include_current_dir: + header_dir_to_check = os.path.dirname(fin_path) + header_path_to_check = os.path.abspath(os.path.join(header_dir_to_check, f)) + if os.path.exists(header_path_to_check): + header_dir = header_dir_to_check + header_filepath = header_path_to_check + # If not found, look in include dirs one by one and first match wins + if header_filepath is None: + for header_include_dir in header_include_dirs: + header_dir_to_check = os.path.join(output_directory, header_include_dir) + header_path_to_check = os.path.abspath(os.path.join(header_dir_to_check, f)) + if os.path.exists(header_path_to_check): + header_dir = header_dir_to_check + header_filepath = header_path_to_check + # If header file not found, keep as is + if header_filepath is None: + return m.group(0) + # Hipify header file first if needed + if header_filepath not in HIPIFY_FINAL_RESULT: + preprocess_file_and_save_result(output_directory, + header_filepath, + all_files, header_include_dirs, stats, hip_clang_launch, + is_pytorch_extension, clean_ctx, show_progress) + elif header_filepath in HIPIFY_FINAL_RESULT: + header_result = HIPIFY_FINAL_RESULT[header_filepath] + if header_result.current_state == CurrentState.INITIALIZED: + # get_hip_file_path needs a relative path to work correctly + header_rel_path = os.path.relpath(header_filepath, output_directory) + header_fout_path = os.path.abspath(os.path.join(output_directory, + get_hip_file_path(header_rel_path, is_pytorch_extension))) + header_result.hipified_path = header_fout_path + HIPIFY_FINAL_RESULT[header_filepath] = header_result + return templ.format(os.path.relpath(header_fout_path if header_fout_path is not None + else header_filepath, header_dir)) + hipified_header_filepath = HIPIFY_FINAL_RESULT[header_filepath].hipified_path + return templ.format(_to_unix_path(os.path.relpath(hipified_header_filepath if hipified_header_filepath is not None + else header_filepath, header_dir))) + + return m.group(0) + return repl + output_source = RE_QUOTE_HEADER.sub(mk_repl('#include "{0}"', True), output_source) + output_source = RE_ANGLE_HEADER.sub(mk_repl('#include <{0}>', False), output_source) + output_source = RE_THC_GENERIC_FILE.sub(mk_repl('#define THC_GENERIC_FILE "{0}"'), output_source) + + # CMakeLists.txt rewrites + if filepath.endswith('CMakeLists.txt'): + output_source = output_source.replace('CUDA', 'HIP') + output_source = output_source.replace('THC', 'THH') + output_source = RE_CU_SUFFIX.sub('.hip', output_source) + + # Perform Kernel Launch Replacements + if not hip_clang_launch: + output_source = processKernelLaunches(output_source, stats) + + # Replace std:: with non-std:: versions + if (filepath.endswith((".cu", ".cuh"))) and "PowKernel" not in filepath: + output_source = replace_math_functions(output_source) + + # Include header if device code is contained. + output_source = hip_header_magic(output_source) + + # Replace the extern __shared__ + # NOTE: No longer needed after transition from hcc to hipclang. + # output_source = replace_extern_shared(output_source) + + # Don't write out identical hipified files for extensions if dirpath has not changed + if ( + is_pytorch_extension + and orig_output_source == output_source + and os.path.dirname(fin_path) == os.path.dirname(fout_path) + ): + hipify_result.hipified_path = fin_path + hipify_result.status = "[skipped, no changes]" + hipify_result.current_state = CurrentState.DONE + return hipify_result + + # Add hipify breadcrumb for C-style files to avoid re-hipification + if fin_path != fout_path and match_extensions(fin_path, (".cu", ".cuh", ".c", ".cc", ".cpp", ".h", ".hpp")): + output_source = HIPIFY_C_BREADCRUMB + output_source + + do_write = True + if os.path.exists(fout_path): + with open(fout_path, encoding='utf-8') as fout_old: + do_write = fout_old.read() != output_source + if do_write: + try: + with clean_ctx.open(fout_path, 'w', encoding='utf-8') as fout: + fout.write(output_source) + hipify_result.hipified_path = fout_path + hipify_result.status = "[ok]" + hipify_result.current_state = CurrentState.DONE + return hipify_result + except OSError as e: + print(f'{bcolors.WARNING}Failed to save {fout_path} with "{e.strerror}", leaving {fin_path} unchanged.{bcolors.ENDC}', + file=sys.stderr) + hipify_result.hipified_path = fin_path + hipify_result.status = "[skipped, no permissions]" + hipify_result.current_state = CurrentState.DONE + return hipify_result + else: + hipify_result.hipified_path = fout_path + hipify_result.status = "[skipped, already hipified]" + hipify_result.current_state = CurrentState.DONE + return hipify_result + +def file_specific_replacement(filepath, search_string, replace_string, strict=False) -> None: + with openf(filepath, "r+") as f: + contents = f.read() + if strict: + contents = re.sub(fr'\b({re.escape(search_string)})\b', lambda x: replace_string, contents) + else: + contents = contents.replace(search_string, replace_string) + f.seek(0) + f.write(contents) + f.truncate() + + +def file_add_header(filepath, header) -> None: + with openf(filepath, "r+") as f: + contents = f.read() + if header[0] != "<" and header[-1] != ">": + header = f'"{header}"' + contents = (f'#include {header} \n') + contents + f.seek(0) + f.write(contents) + f.truncate() + + +def fix_static_global_kernels(in_txt): + """Static global kernels in HIP results in a compilation error.""" + in_txt = in_txt.replace(" __global__ static", "__global__") + return in_txt + + +RE_INCLUDE = re.compile(r"#include .*\n") + + +def extract_arguments(start, string): + """ + Return the list of arguments in the upcoming function parameter closure. + Example: + string (input): '(blocks, threads, 0, THCState_getCurrentStream(state))' + arguments (output): [{'start': 1, 'end': 7}, {'start': 8, 'end': 16}, \ + {'start': 17, 'end': 19}, {'start': 20, 'end': 53}] + """ + + arguments = [] + closures = { + "<": 0, + "(": 0 + } + current_position = start + argument_start_pos = current_position + 1 + + # Search for final parenthesis + while current_position < len(string): + if string[current_position] == "(": + closures["("] += 1 + elif string[current_position] == ")": + closures["("] -= 1 + elif string[current_position] == "<": + closures["<"] += 1 + elif string[current_position] == ">" and string[current_position - 1] != "-" and closures["<"] > 0: + closures["<"] -= 1 + + # Finished all arguments + if closures["("] == 0 and closures["<"] == 0: + # Add final argument + arguments.append({"start": argument_start_pos, "end": current_position}) + break + + # Finished current argument + if closures["("] == 1 and closures["<"] == 0 and string[current_position] == ",": + arguments.append({"start": argument_start_pos, "end": current_position}) + argument_start_pos = current_position + 1 + + current_position += 1 + + return arguments + + +def str2bool(v : str) -> bool: + """ArgumentParser doesn't support type=bool. Thus, this helper method will convert + from possible string types to True / False.""" + if v.lower() in ('yes', 'true', 't', 'y', '1'): + return True + elif v.lower() in ('no', 'false', 'f', 'n', '0'): + return False + else: + raise argparse.ArgumentTypeError('Boolean value expected.') + + +def hipify( + project_directory: str, + show_detailed: bool = False, + extensions: Iterable = (".cu", ".cuh", ".c", ".cc", ".cpp", ".h", ".in", ".hpp"), + header_extensions: Iterable = (".cuh", ".h", ".hpp"), + output_directory: str = "", + header_include_dirs: Iterable = (), + includes: Iterable = ('*',), + extra_files: Iterable = (), + out_of_place_only: bool = False, + ignores: Iterable = (), + show_progress: bool = True, + hip_clang_launch: bool = False, + is_pytorch_extension: bool = False, + hipify_extra_files_only: bool = False, + clean_ctx: GeneratedFileCleaner | None = None +) -> HipifyFinalResult: + if project_directory == "": + project_directory = os.getcwd() + + # Verify the project directory exists. + if not os.path.exists(project_directory): + print("The project folder specified does not exist.") + sys.exit(1) + + # If no output directory, provide a default one. + if not output_directory: + project_directory.rstrip("/") + output_directory = project_directory + "_amd" + + if project_directory != output_directory: + includes = [include.replace(project_directory, output_directory) for include in includes] + ignores = [ignore.replace(project_directory, output_directory) for ignore in ignores] + + # Copy from project directory to output directory if not done already. + if not os.path.exists(output_directory): + shutil.copytree(project_directory, output_directory) + + includes = list(map(_to_unix_path, includes)) + ignores = list(map(_to_unix_path, ignores)) + + all_files = list(matched_files_iter(output_directory, includes=includes, + ignores=ignores, extensions=extensions, + out_of_place_only=out_of_place_only, + is_pytorch_extension=is_pytorch_extension)) + all_files_set = set(all_files) + # pyrefly: ignore [bad-assignment] + for f in extra_files: + if not os.path.isabs(f): + f = os.path.join(output_directory, f) + if f not in all_files_set: + all_files.append(f) + + # List all files in header_include_paths to ensure they are hipified + from pathlib import Path + for header_include_dir in header_include_dirs: + if os.path.isabs(header_include_dir): + header_include_dir_path = Path(header_include_dir) + else: + header_include_dir_path = Path(os.path.join(output_directory, header_include_dir)) + all_files.extend( + str(path) for path in header_include_dir_path.rglob('*') if path.is_file() + and _fnmatch(str(path), includes) + and (not _fnmatch(str(path), ignores)) + and match_extensions(path.name, header_extensions) + ) + + if clean_ctx is None: + clean_ctx = GeneratedFileCleaner(keep_intermediates=True) + + # Preprocessing statistics. + stats: dict[str, list] = {"unsupported_calls": [], "kernel_launches": []} + + for filepath in (all_files if not hipify_extra_files_only else extra_files): + preprocess_file_and_save_result(output_directory, filepath, all_files, header_include_dirs, + stats, hip_clang_launch, is_pytorch_extension, clean_ctx, show_progress) + + print(bcolors.OKGREEN + "Successfully preprocessed all matching files." + bcolors.ENDC, file=sys.stderr) + + # Show detailed summary + if show_detailed: + compute_stats(stats) + + return HIPIFY_FINAL_RESULT diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/hipify/version.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/hipify/version.py new file mode 100644 index 0000000000000000000000000000000000000000..1f356cc57bfa00a3b251402604c54702fb414c96 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/hipify/version.py @@ -0,0 +1 @@ +__version__ = '1.0.0' diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/hooks.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/hooks.py new file mode 100644 index 0000000000000000000000000000000000000000..8e89d3ec9b3a089e7a129c11e0a54309e35bfa18 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/hooks.py @@ -0,0 +1,258 @@ +# mypy: allow-untyped-defs +import torch +from collections import OrderedDict +import weakref +import warnings +from typing import Any + +__all__ = ["RemovableHandle", "unserializable_hook", "warn_if_has_hooks", "BackwardHook"] + +class RemovableHandle: + r""" + A handle which provides the capability to remove a hook. + + Args: + hooks_dict (dict): A dictionary of hooks, indexed by hook ``id``. + extra_dict (Union[dict, List[dict]]): An additional dictionary or list of + dictionaries whose keys will be deleted when the same keys are + removed from ``hooks_dict``. + """ + + id: int + next_id: int = 0 + + def __init__(self, hooks_dict: Any, *, extra_dict: Any = None) -> None: + self.hooks_dict_ref = weakref.ref(hooks_dict) + self.id = RemovableHandle.next_id + RemovableHandle.next_id += 1 + + self.extra_dict_ref: tuple = () + if isinstance(extra_dict, dict): + self.extra_dict_ref = (weakref.ref(extra_dict),) + elif isinstance(extra_dict, list): + self.extra_dict_ref = tuple(weakref.ref(d) for d in extra_dict) + + def remove(self) -> None: + hooks_dict = self.hooks_dict_ref() + if hooks_dict is not None and self.id in hooks_dict: + del hooks_dict[self.id] + + for ref in self.extra_dict_ref: + extra_dict = ref() + if extra_dict is not None and self.id in extra_dict: + del extra_dict[self.id] + + def __getstate__(self): + if self.extra_dict_ref is None: + return (self.hooks_dict_ref(), self.id) + else: + return (self.hooks_dict_ref(), self.id, tuple(ref() for ref in self.extra_dict_ref)) + + def __setstate__(self, state) -> None: + if state[0] is None: + # create a dead reference + self.hooks_dict_ref = weakref.ref(OrderedDict()) + else: + self.hooks_dict_ref = weakref.ref(state[0]) + self.id = state[1] + RemovableHandle.next_id = max(RemovableHandle.next_id, self.id + 1) + + if len(state) < 3 or state[2] is None: + self.extra_dict_ref = () + else: + self.extra_dict_ref = tuple(weakref.ref(d) for d in state[2]) + + def __enter__(self) -> "RemovableHandle": + return self + + def __exit__(self, type: Any, value: Any, tb: Any) -> None: + self.remove() + + +def unserializable_hook(f): + """ + Mark a function as an unserializable hook with this decorator. + + This suppresses warnings that would otherwise arise if you attempt + to serialize a tensor that has a hook. + """ + f.__torch_unserializable__ = True + return f + + +def warn_if_has_hooks(tensor) -> None: + if tensor._backward_hooks: + for k in tensor._backward_hooks: + hook = tensor._backward_hooks[k] + if not hasattr(hook, "__torch_unserializable__"): + warnings.warn(f"backward hook {repr(hook)} on tensor will not be " + "serialized. If this is expected, you can " + "decorate the function with @torch.utils.hooks.unserializable_hook " + "to suppress this warning", stacklevel=2) + +class BackwardHook: + """ + A wrapper class to implement nn.Module backward hooks. + + It handles: + - Ignoring non-Tensor inputs and replacing them by None before calling the user hook + - Generating the proper Node to capture a set of Tensor's gradients + - Linking the gradients captures for the outputs with the gradients captured for the input + - Calling the user hook once both output and input gradients are available + """ + + def __init__(self, module, user_hooks, user_pre_hooks) -> None: + self.user_hooks = user_hooks + self.user_pre_hooks = user_pre_hooks + self.module = module + + self.grad_outputs = None + self.n_outputs = -1 + self.output_tensors_index = None + self.n_inputs = -1 + self.input_tensors_index = None + + def _pack_with_none(self, indices, values, size): + res = [None] * size + for idx, val in zip(indices, values, strict=True): + res[idx] = val + + return tuple(res) + + def _unpack_none(self, indices, values): + res = [values[idx] for idx in indices] + + return tuple(res) + + def _set_user_hook(self, grad_fn) -> None: + def hook(grad_input, _): + if self.grad_outputs is None: + # This happens because the gradient in your nn.Module flows to + # the Module's input without " passing through the Module's + # output, e.g. when you're doing double backward. + return + res = self._pack_with_none(self.input_tensors_index, grad_input, self.n_inputs) + + for hook in self.user_hooks: + out = hook(self.module, res, self.grad_outputs) + + if out is None: + continue + + if len(out) != len(res): + raise RuntimeError("Backward hook returned an invalid number of grad_input, " + f"got {len(out)}, but expected {len(res)}") + + res = out + + # pyrefly: ignore [bad-assignment] + self.grad_outputs = None + + return self._unpack_none(self.input_tensors_index, res) + + grad_fn.register_hook(hook) + + def _apply_on_tensors(self, fn, args): + # Can be used to apply the given function to the tensors contained in the + # args. Will return updated args and the tensors indices + tensors_idx = [] + tensors = [] + + requires_grad = False + for i, arg in enumerate(args): + if isinstance(arg, torch.Tensor): + tensors_idx.append(i) + tensors.append(arg) + requires_grad |= arg.requires_grad + + if not (requires_grad and torch.is_grad_enabled()): + return args, None + + new_tensors = torch.nn.modules._functions.BackwardHookFunction.apply(*tensors) + if len(new_tensors) == 0: + raise RuntimeError("Cannot set Module backward hook for a Module with no input Tensors.") + + grad_fns = [t.grad_fn for t in new_tensors if t.grad_fn is not None and t.grad_fn.name() == "BackwardHookFunctionBackward"] + if len(grad_fns) == 0: + raise RuntimeError("Error while setting up backward hooks. Please open " + "an issue with a code sample to reproduce this.") + + fn(grad_fns[0]) + + arg_list = list(args) + for idx, val in zip(tensors_idx, new_tensors, strict=True): + arg_list[idx] = val + + if type(args) is tuple: + out = tuple(arg_list) + else: + out = type(args)(*arg_list) + return out, tensors_idx + + def setup_input_hook(self, args): + def fn(grad_fn) -> None: + self._set_user_hook(grad_fn) + + res, input_idx = self._apply_on_tensors(fn, args) + self.n_inputs = len(args) + self.input_tensors_index = input_idx + return res + + def setup_output_hook(self, args): + def fn(grad_fn) -> None: + def hook(_, grad_output): + self.grad_outputs = self._pack_with_none(self.output_tensors_index, + grad_output, + self.n_outputs) + + if self.user_pre_hooks: + expected_len = len(self.grad_outputs) + for user_pre_hook in self.user_pre_hooks: + hook_grad_outputs = user_pre_hook(self.module, self.grad_outputs) + if hook_grad_outputs is None: + continue + + actual_len = len(hook_grad_outputs) + if actual_len != expected_len: + raise RuntimeError("Backward pre hook returned an invalid number of grad_output, " + f"got {actual_len}, but expected {expected_len}") + self.grad_outputs = hook_grad_outputs + + # We need to be able to clear self.grad_outputs but also return it + local_grad_outputs = self.grad_outputs + + # Special case if no input required gradients, this hook should call the user + # hook directly + if self.input_tensors_index is None: + warnings.warn("Full backward hook is firing when gradients are computed " + "with respect to module outputs since no inputs require gradients. See " + "https://docs.pytorch.org/docs/main/generated/torch.nn.Module.html#torch.nn.Module.register_full_backward_hook " # noqa: B950 + "for more details.", + stacklevel=5) + grad_inputs = self._pack_with_none([], [], self.n_inputs) + for user_hook in self.user_hooks: + res = user_hook(self.module, grad_inputs, self.grad_outputs) + if res is not None and not (isinstance(res, tuple) and all(el is None for el in res)): + raise RuntimeError("Backward hook for Modules where no input requires " + "gradient should always return None or None for all gradients.") + self.grad_outputs = None + + if local_grad_outputs is not None: + if self.output_tensors_index is None: + raise AssertionError("output_tensors_index should not be None when grad_outputs is not None") + return tuple(local_grad_outputs[i] for i in self.output_tensors_index) + + grad_fn.register_hook(hook) + + is_tuple = True + if not isinstance(args, tuple): + args = (args,) + is_tuple = False + + res, output_idx = self._apply_on_tensors(fn, args) + self.n_outputs = len(args) + self.output_tensors_index = output_idx + + if not is_tuple: + res = res[0] + return res diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/jit/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/jit/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/jit/log_extract.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/jit/log_extract.py new file mode 100644 index 0000000000000000000000000000000000000000..9e018457802f4aafd05ba6a8d10ef1c4953b1047 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/jit/log_extract.py @@ -0,0 +1,118 @@ +# mypy: allow-untyped-defs +from contextlib import contextmanager +from typing import Any, cast +import random +import torch +import time +from torch.utils.benchmark import Timer + +def extract_ir(filename: str) -> list[str]: + BEGIN = "" + END = "" + pfx = None + graphs = [] + with open(filename) as f: + split_strs = f.read().split(BEGIN) + for i, split_str in enumerate(split_strs): + if i == 0: + continue + end_loc = split_str.find(END) + if end_loc == -1: + continue + s = split_str[:end_loc] + pfx = split_strs[i - 1].splitlines()[-1] + lines = [x[len(pfx):] for x in s.splitlines(keepends=True)] + graphs.append(''.join(lines)) + + return graphs + + +def make_tensor_from_type(inp_type: torch._C.TensorType): + size = inp_type.sizes() + stride = inp_type.strides() + device = inp_type.device() + dtype = inp_type.dtype() + if size is None: + raise AssertionError("make_tensor_from_type: 'size' is None (inp_type.sizes() returned None)") + if stride is None: + raise AssertionError("make_tensor_from_type: 'stride' is None (inp_type.strides() returned None)") + if device is None: + raise AssertionError("make_tensor_from_type: 'device' is None (inp_type.device() returned None)") + if dtype is None: + raise AssertionError("make_tensor_from_type: 'dtype' is None (inp_type.dtype() returned None)") + return torch.empty_strided(size=size, stride=stride, device=device, dtype=dtype) + +def load_graph_and_inputs(ir: str) -> tuple[Any, list[Any]]: + graph = torch._C.parse_ir(ir, parse_tensor_constants=True) + graph.makeMultiOutputIntoTuple() + inputs = [] + for inp in graph.inputs(): + if isinstance(inp.type(), torch._C.FloatType): + inputs.append(random.uniform(.1, 100)) + elif isinstance(inp.type(), torch._C.IntType): + inputs.append(random.randint(1, 100)) + elif isinstance(inp.type(), torch._C.TensorType): + tensorType = cast(torch._C.TensorType, inp.type()) + inputs.append(make_tensor_from_type(tensorType)) + elif isinstance(inp.type(), torch._C.BoolType): + inputs.append(random.randint(0, 1) == 1) + else: + raise NotImplementedError(f"A default value is not implemented for type {inp.type()}") + + func = torch._C._create_function_from_graph("forward", graph) + torch._C._jit_pass_erase_shape_information(func.graph) + return (func, inputs) + +def time_cuda(fn, inputs, test_runs): + t = Timer(stmt="fn(*inputs)", globals={"fn": fn, "inputs" : inputs}) + times = t.blocked_autorange() + return times.median * 1000 # time in ms + +def time_cpu(fn, inputs, test_runs): + s = time.perf_counter() + for _ in range(test_runs): + fn(*inputs) + e = time.perf_counter() + return (e - s) / test_runs * 1000 # time in ms + +def run_test(ir, inputs, *, warmup_runs=10, test_runs=20) -> float: + graph, _ = load_graph_and_inputs(ir) + for _ in range(warmup_runs): + graph(*inputs) + + is_cpu = None + for input in inputs: + if isinstance(input, torch.Tensor): + is_cpu = input.device.type == "cpu" + break + if is_cpu is None: + raise AssertionError("No tensor found in inputs") + + out = time_cpu(graph, inputs, test_runs) if is_cpu else time_cuda(graph, inputs, test_runs) + return out + +@contextmanager +def no_fuser(*args, **kwargs): + old_optimize = torch._C._get_graph_executor_optimize(False) + try: + yield + finally: + torch._C._get_graph_executor_optimize(old_optimize) + +def run_baseline_no_fusion(ir, inputs) -> float: + with no_fuser(): + return run_test(ir, inputs) + + +def run_nnc(ir, inputs, dynamic) -> float: + try: + strat = [("DYNAMIC", 10)] if dynamic else [("STATIC", 10)] + old_strat = torch.jit.set_fusion_strategy(strat) + with torch.jit.fuser("fuser1"): + return run_test(ir, inputs) + finally: + torch.jit.set_fusion_strategy(old_strat) + +def run_nvfuser(ir, inputs) -> float: + with torch.jit.fuser("fuser2"): + return run_test(ir, inputs) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/mkldnn.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/mkldnn.py new file mode 100644 index 0000000000000000000000000000000000000000..11bb4e442b2960a601c3c6c66c5e326ac3c9c166 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/mkldnn.py @@ -0,0 +1,238 @@ +# mypy: allow-untyped-defs +import torch + + +class MkldnnLinear(torch.jit.ScriptModule): + def __init__(self, dense_module, dtype) -> None: + super().__init__() + self.register_buffer('weight', dense_module.weight.to_mkldnn(dtype)) + if dense_module.bias is not None: + # Bias can be fp32 or bf16 for OneDNN bf16 path, but for good accuracy, + # we use fp32 dtype. + self.register_buffer('bias', dense_module.bias.to_mkldnn()) + else: + # TODO: Remove this once ScriptModule supports registering None buffer + self.register_buffer( + 'bias', + torch.zeros([dense_module.weight.size(0)], dtype=torch.float).to_mkldnn()) + + @torch.jit.script_method + def __getstate__(self): + return (self.weight.to_dense(), self.bias.to_dense(), self.training) + + @torch.jit.script_method + def __setstate__(self, state): + self.weight = state[0].to_mkldnn() + self.bias = state[1].to_mkldnn() + self.training = state[2] + + @torch.jit.script_method + def forward(self, x): + x_mkldnn = x if x.is_mkldnn else x.to_mkldnn() + y_mkldnn = torch._C._nn.mkldnn_linear(x_mkldnn, self.weight, self.bias) + y = y_mkldnn if x.is_mkldnn else y_mkldnn.to_dense() + return y + + +class _MkldnnConvNd(torch.jit.ScriptModule): + """Common base of MkldnnConv1d and MkldnnConv2d.""" + + __constants__ = ['stride', 'padding', 'dilation', 'groups'] + + def __init__(self, dense_module) -> None: + super().__init__() + + self.stride = dense_module.stride + self.padding = dense_module.padding + self.dilation = dense_module.dilation + self.groups = dense_module.groups + + if dense_module.bias is not None: + self.register_buffer('bias', dense_module.bias.to_mkldnn()) + else: + # Bias can be fp32 or bf16 for OneDNN bf16 path, but for good accuracy, + # we use fp32 dtype. + # TODO: Remove this once ScriptModule supports registering None buffer + self.register_buffer( + 'bias', + torch.zeros([dense_module.weight.size(0)], dtype=torch.float).to_mkldnn()) + + @torch.jit.script_method + def __getstate__(self): + return (self.weight.to_dense(), self.bias.to_dense(), self.training) + + @torch.jit.script_method + def forward(self, x): + return torch.mkldnn_convolution( + x, + self.weight, + self.bias, + self.padding, + self.stride, + self.dilation, + self.groups) + + +class MkldnnConv1d(_MkldnnConvNd): + def __init__(self, dense_module, dtype) -> None: + super().__init__(dense_module) + + self.register_buffer('weight', dense_module.weight.to_mkldnn(dtype)) + + @torch.jit.script_method + def __setstate__(self, state): + self.weight = state[0].to_mkldnn() + self.bias = state[1].to_mkldnn() + self.training = state[2] + + +class MkldnnConv2d(_MkldnnConvNd): + def __init__(self, dense_module, dtype) -> None: + super().__init__(dense_module) + + self.register_buffer('weight', torch._C._nn.mkldnn_reorder_conv2d_weight( + dense_module.weight.to_mkldnn(dtype), + self.padding, + self.stride, + self.dilation, + self.groups)) + + @torch.jit.script_method + def __setstate__(self, state): + self.weight = torch._C._nn.mkldnn_reorder_conv2d_weight( + state[0].to_mkldnn(), + self.padding, + self.stride, + self.dilation, + self.groups) + self.bias = state[1].to_mkldnn() + self.training = state[2] + +class MkldnnConv3d(_MkldnnConvNd): + def __init__(self, dense_module, dtype) -> None: + super().__init__(dense_module) + + self.register_buffer('weight', torch._C._nn.mkldnn_reorder_conv3d_weight( + dense_module.weight.to_mkldnn(dtype), + self.padding, + self.stride, + self.dilation, + self.groups)) + + @torch.jit.script_method + def __setstate__(self, state): + self.weight = torch._C._nn.mkldnn_reorder_conv3d_weight( + state[0].to_mkldnn(), + self.padding, + self.stride, + self.dilation, + self.groups) + self.bias = state[1].to_mkldnn() + self.training = state[2] + + +class MkldnnBatchNorm(torch.jit.ScriptModule): + __constants__ = ['exponential_average_factor', 'eps'] + + def __init__(self, dense_module) -> None: + super().__init__() + + if dense_module.training: + raise AssertionError("Only support eval mode batchnorm for mkldnn path now") + if not dense_module.track_running_stats: + raise AssertionError("Only support track_running_stats=True for mkldnn path now") + if not dense_module.affine: + raise AssertionError("Only support affine=True for mkldnn path now") + + if dense_module.momentum is None: + self.exponential_average_factor = 0.0 + else: + self.exponential_average_factor = dense_module.momentum + self.eps = dense_module.eps + + self.register_buffer('weight', dense_module.weight.to_mkldnn()) + self.register_buffer('bias', dense_module.bias.to_mkldnn()) + self.register_buffer('running_mean', dense_module.running_mean.to_mkldnn()) + self.register_buffer('running_var', dense_module.running_var.to_mkldnn()) + + @torch.jit.script_method + def __getstate__(self): + weight = self.weight.to_dense() + bias = self.bias.to_dense() + running_mean = self.running_mean.to_dense() + running_var = self.running_var.to_dense() + return (weight, bias, running_mean, running_var, self.training) + + @torch.jit.script_method + def __setstate__(self, state): + self.weight = state[0].to_mkldnn() + self.bias = state[1].to_mkldnn() + self.running_mean = state[2].to_mkldnn() + self.running_var = state[3].to_mkldnn() + self.training = state[4] + + @torch.jit.script_method + def forward(self, x): + return torch.batch_norm( + x, + self.weight, + self.bias, + self.running_mean, + self.running_var, + False, # training + self.exponential_average_factor, + self.eps, + False, # cuda_enabled + ) + +class MkldnnPrelu(torch.jit.ScriptModule): + def __init__(self, dense_module, dtype) -> None: + super().__init__() + self.register_buffer('weight', dense_module.weight.to_mkldnn(dtype)) + + @torch.jit.script_method + def __getstate__(self): + return (self.weight.to_dense(), self.training) + + @torch.jit.script_method + def __setstate__(self, state): + self.weight = state[0].to_mkldnn() + self.training = state[1] + + @torch.jit.script_method + def forward(self, x): + x_mkldnn = x if x.is_mkldnn else x.to_mkldnn() + y_mkldnn = torch.prelu(x_mkldnn, self.weight) + y = y_mkldnn if x.is_mkldnn else y_mkldnn.to_dense() + return y + +def to_mkldnn(module, dtype=torch.float): + if dtype not in (torch.float, torch.bfloat16, torch.half): + raise AssertionError("MKLDNN only support float, bfloat16, and half path now") + + + def m_fn(m, d): + if isinstance(m, torch.nn.Linear): + return MkldnnLinear(m, d) + elif isinstance(m, torch.nn.Conv1d): + return MkldnnConv1d(m, d) + elif isinstance(m, torch.nn.Conv2d): + return MkldnnConv2d(m, d) + elif isinstance(m, torch.nn.Conv3d): + return MkldnnConv3d(m, d) + elif isinstance(m, (torch.nn.BatchNorm2d, torch.nn.BatchNorm3d)): + # For batchnorm bf16 path, OneDNN requires weight and bias need fp32 dtype. + # so it doesn't need dtype argument. + return MkldnnBatchNorm(m) + elif isinstance(m, torch.nn.PReLU): + return MkldnnPrelu(m, d) + else: + return m + + def m_fn_rec(m, d): + new_m = m_fn(m, d) + for name, sub_m in m.named_children(): + setattr(new_m, name, m_fn_rec(sub_m, d)) + return new_m + + return m_fn_rec(module, dtype) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/mobile_optimizer.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/mobile_optimizer.py new file mode 100644 index 0000000000000000000000000000000000000000..1ad0a65204a4733323e7ed29a51403aa47556bbd --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/mobile_optimizer.py @@ -0,0 +1,135 @@ +# mypy: allow-untyped-defs +"""This module contains utility method for mobile model optimization and lint.""" + +import torch +from enum import Enum +from torch._C import _MobileOptimizerType as MobileOptimizerType +from typing import AnyStr + +class LintCode(Enum): + BUNDLED_INPUT = 1 + REQUIRES_GRAD = 2 + DROPOUT = 3 + BATCHNORM = 4 + +def optimize_for_mobile( + script_module: torch.jit.ScriptModule, + optimization_blocklist: set[MobileOptimizerType] | None = None, + preserved_methods: list[AnyStr] | None = None, + backend: str = 'CPU') -> torch.jit.RecursiveScriptModule: + """ + Optimize a torch script module for mobile deployment. + + Args: + script_module: An instance of torch script module with type of ScriptModule. + optimization_blocklist: A set with type of MobileOptimizerType. When set is not passed, + optimization method will run all the optimizer pass; otherwise, optimizer + method will run the optimization pass that is not included inside optimization_blocklist. + preserved_methods: A list of methods that needed to be preserved when freeze_module pass is invoked + backend: Device type to use for running the result model ('CPU'(default), 'Vulkan' or 'Metal'). + Returns: + A new optimized torch script module + """ + if not isinstance(script_module, torch.jit.ScriptModule): + raise TypeError( + f'Got {type(script_module)}, but ScriptModule is expected.') + + if optimization_blocklist is None: + optimization_blocklist = set() + + if preserved_methods is None: + preserved_methods = [] + + # Convert potential byte arrays into strings (if there is any) to pass type checking + # Here we use a new name as assigning it back to preserved_methods will invoke + # mypy errors (i.e. List[AnyStr] = List[str]) + preserved_methods_str: list[str] = [str(method) for method in preserved_methods] + + bundled_inputs_attributes = _get_bundled_inputs_preserved_attributes(script_module, preserved_methods_str) + if all(hasattr(script_module, method) for method in bundled_inputs_attributes): + preserved_methods_str = list(set(preserved_methods_str + bundled_inputs_attributes)) + + non_exist_methods = [method for method in preserved_methods_str if not hasattr(script_module, method)] + if non_exist_methods: + raise AttributeError( + f"The following methods to preserve do not exist in script_module: {', '.join(non_exist_methods)}") + + backend = backend.lower() + if backend == 'cpu': + optimized_cpp_module = torch._C._jit_pass_optimize_for_mobile( + script_module._c, + optimization_blocklist, + preserved_methods_str) + elif backend == 'vulkan': + optimized_cpp_module = torch._C._jit_pass_vulkan_optimize_for_mobile( + script_module._c, + optimization_blocklist, + preserved_methods_str) + elif backend == 'metal': + optimized_cpp_module = torch._C._jit_pass_metal_optimize_for_mobile(script_module._c, preserved_methods_str) + else: + raise TypeError("Unknown backend, must be one of 'CPU', 'Vulkan' or 'Metal'") + + return torch.jit._recursive.wrap_cpp_module(optimized_cpp_module) + + +def generate_mobile_module_lints(script_module: torch.jit.ScriptModule): + """ + Generate a list of lints for a given torch script module. + + Args: + script_module: An instance of torch script module with type of ScriptModule. + + Returns: + lint_map: A list of dictionary that contains modules lints + """ + if not isinstance(script_module, torch.jit.ScriptModule): + raise TypeError( + f'Got {type(script_module)}, but ScriptModule is expected.') + + lint_list = [] + + if not hasattr(script_module, "_generate_bundled_inputs_for_forward"): + lint_list.append({"name": LintCode.BUNDLED_INPUT.name, "message": "No bundled input for forward, please add bundled inputs " + "before saving the module using torch.utils.bundled_inputs.augment_model_with_bundled_inputs."}) + + for name, param in script_module.named_parameters(): + if param.requires_grad: + lint_list.append({"name": LintCode.REQUIRES_GRAD.name, "message": f"Param {name} requires grad, " + "please set torch.no_grad() to reduce memory usage and improve computation speed during " + "inference phase."}) + + op_names = torch.jit.export_opnames(script_module) + for op_name in op_names: + if "dropout" in op_name: + lint_list.append({"name": LintCode.DROPOUT.name, + "message": f"Operator {op_name} exists, remember to call eval() before " + "saving the module.and call torch.utils.mobile_optimizer.optimize_for_mobile to drop dropout " + "operator."}) + if "batch_norm" in op_name: + lint_list.append({"name": LintCode.BATCHNORM.name, + "message": f"Operator {op_name} exists, remember to call eval() before " + "saving the module and call torch.utils.mobile_optimizer.optimize_for_mobile to drop batch_norm " + "operator."}) + + return lint_list + +def _get_bundled_inputs_preserved_attributes(script_module: torch.jit.ScriptModule, preserved_methods: list[str]) -> list[str]: + + bundled_inputs_attributes = [] + # Has bundled inputs for forward + if hasattr(script_module, 'get_all_bundled_inputs'): + bundled_inputs_attributes.append('get_all_bundled_inputs') + bundled_inputs_attributes.append('get_num_bundled_inputs') + + # Bundled inputs in module after the change that introduced bundled inputs for multiple functions + if hasattr(script_module, 'get_bundled_inputs_functions_and_info'): + bundled_inputs_attributes.append('get_bundled_inputs_functions_and_info') + all_info = script_module.get_bundled_inputs_functions_and_info() + for function_name in all_info: + if function_name not in preserved_methods: + bundled_inputs_attributes.append(function_name) + bundled_inputs_attributes.append("get_all_bundled_inputs_for_" + function_name) + bundled_inputs_attributes.append("_bundled_inputs_deflated_" + function_name) + + return bundled_inputs_attributes diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/model_dump/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/model_dump/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..16d1ab1c6dd1a2d422cae74eaa5b5888dd2fa175 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/model_dump/__init__.py @@ -0,0 +1,450 @@ +#!/usr/bin/env python3 +# mypy: allow-untyped-defs +""" +model_dump: a one-stop shop for TorchScript model inspection. + +The goal of this tool is to provide a simple way to extract lots of +useful information from a TorchScript model and make it easy for humans +to consume. It (mostly) replaces zipinfo, common uses of show_pickle, +and various ad-hoc analysis notebooks. + +The tool extracts information from the model and serializes it as JSON. +That JSON can then be rendered by an HTML+JS page, either by +loading the JSON over HTTP or producing a fully self-contained page +with all of the code and data burned-in. +""" + +# Maintainer notes follow. +""" +The implementation strategy has tension between 3 goals: +- Small file size. +- Fully self-contained. +- Easy, modern JS environment. +Using Preact and HTM achieves 1 and 2 with a decent result for 3. +However, the models I tested with result in ~1MB JSON output, +so even using something heavier like full React might be tolerable +if the build process can be worked out. + +One principle I have followed that I think is very beneficial +is to keep the JSON data as close as possible to the model +and do most of the rendering logic on the client. +This makes for easier development (just refresh, usually), +allows for more laziness and dynamism, and lets us add more +views of the same data without bloating the HTML file. + +Currently, this code doesn't actually load the model or even +depend on any part of PyTorch. I don't know if that's an important +feature to maintain, but it's probably worth preserving the ability +to run at least basic analysis on models that cannot be loaded. + +I think the easiest way to develop this code is to cd into model_dump and +run "python -m http.server", then load http://localhost:8000/skeleton.html +in the browser. In another terminal, run +"python -m torch.utils.model_dump --style=json FILE > \ + torch/utils/model_dump/model_info.json" +every time you update the Python code or model. +When you update JS, just refresh. + +Possible improvements: + - Fix various TODO comments in this file and the JS. + - Make the HTML much less janky, especially the auxiliary data panel. + - Make the auxiliary data panel start small, expand when + data is available, and have a button to clear/contract. + - Clean up the JS. There's a lot of copypasta because + I don't really know how to use Preact. + - Make the HTML render and work nicely inside a Jupyter notebook. + - Add the ability for JS to choose the URL to load the JSON based + on the page URL (query or hash). That way we could publish the + inlined skeleton once and have it load various JSON blobs. + - Add a button to expand all expandable sections so ctrl-F works well. + - Add hyperlinking from data to code, and code to code. + - Add hyperlinking from debug info to Diffusion. + - Make small tensor contents available. + - Do something nice for quantized models + (they probably don't work at all right now). +""" + +import argparse +import io +import itertools +import json +import os +import pickle +import pprint +import re +import sys +import urllib.parse +import zipfile +from pathlib import Path +import warnings + +import torch.utils.show_pickle + + +DEFAULT_EXTRA_FILE_SIZE_LIMIT = 16 * 1024 + +__all__ = ['get_storage_info', 'hierarchical_pickle', 'get_model_info', 'get_inline_skeleton', + 'burn_in_info', 'get_info_and_burn_skeleton'] + +def get_storage_info(storage): + if not isinstance(storage, torch.utils.show_pickle.FakeObject): + raise AssertionError(f"storage is not FakeObject: {type(storage)}") + if storage.module != "pers": + raise AssertionError(f"storage.module is not 'pers': {storage.module!r}") + if storage.name != "obj": + raise AssertionError(f"storage.name is not 'obj': {storage.name!r}") + if storage.state is not None: + raise AssertionError(f"storage.state is not None: {storage.state!r}") + if not isinstance(storage.args, tuple): + raise AssertionError(f"storage.args is not a tuple: {type(storage.args)}") + if len(storage.args) != 1: + raise AssertionError(f"len(storage.args) is not 1: {len(storage.args)}") + sa = storage.args[0] + if not isinstance(sa, tuple): + raise AssertionError(f"sa is not a tuple: {type(sa)}") + if len(sa) != 5: + raise AssertionError(f"len(sa) is not 5: {len(sa)}") + if sa[0] != "storage": + raise AssertionError(f"sa[0] is not 'storage': {sa[0]!r}") + if not isinstance(sa[1], torch.utils.show_pickle.FakeClass): + raise AssertionError(f"sa[1] is not FakeClass: {type(sa[1])}") + if sa[1].module != "torch": + raise AssertionError(f"sa[1].module is not 'torch': {sa[1].module!r}") + if not sa[1].name.endswith("Storage"): + raise AssertionError(f"sa[1].name does not end with 'Storage': {sa[1].name!r}") + storage_info = [sa[1].name.replace("Storage", "")] + list(sa[2:]) + return storage_info + + +def hierarchical_pickle(data): + if isinstance(data, (bool, int, float, str, type(None))): + return data + if isinstance(data, list): + return [hierarchical_pickle(d) for d in data] + if isinstance(data, tuple): + return { + "__tuple_values__": hierarchical_pickle(list(data)), + } + if isinstance(data, dict): + return { + "__is_dict__": True, + "keys": hierarchical_pickle(list(data.keys())), + "values": hierarchical_pickle(list(data.values())), + } + if isinstance(data, torch.utils.show_pickle.FakeObject): + typename = f"{data.module}.{data.name}" + if ( + typename.startswith(('__torch__.', 'torch.jit.LoweredWrapper.', 'torch.jit.LoweredModule.')) + ): + if data.args != (): + raise AssertionError("data.args is not ()") + return { + "__module_type__": typename, + "state": hierarchical_pickle(data.state), + } + if typename == "torch._utils._rebuild_tensor_v2": + if data.state is not None: + raise AssertionError("data.state is not None") + storage, offset, size, stride, requires_grad, *_ = data.args + storage_info = get_storage_info(storage) + return {"__tensor_v2__": [storage_info, offset, size, stride, requires_grad]} + if typename == "torch._utils._rebuild_qtensor": + if data.state is not None: + raise AssertionError("data.state is not None") + storage, offset, size, stride, quantizer, requires_grad, *_ = data.args + storage_info = get_storage_info(storage) + if not isinstance(quantizer, tuple): + raise AssertionError("quantizer is not a tuple") + if not isinstance(quantizer[0], torch.utils.show_pickle.FakeClass): + raise AssertionError("quantizer[0] is not a FakeClass") + if quantizer[0].module != "torch": + raise AssertionError("quantizer[0].module is not torch") + if quantizer[0].name == "per_tensor_affine": + if len(quantizer) != 3: + raise AssertionError("len(quantizer) is not 3") + if not isinstance(quantizer[1], float): + raise AssertionError("quantizer[1] is not a float") + if not isinstance(quantizer[2], int): + raise AssertionError("quantizer[2] is not an int") + quantizer_extra = list(quantizer[1:3]) + else: + quantizer_extra = [] + quantizer_json = [quantizer[0].name] + quantizer_extra + return {"__qtensor__": [storage_info, offset, size, stride, quantizer_json, requires_grad]} + if typename == "torch.jit._pickle.restore_type_tag": + if data.state is not None: + raise AssertionError("data.state is not None") + obj, typ = data.args + if not isinstance(typ, str): + raise AssertionError("typ is not a string") + return hierarchical_pickle(obj) + if re.fullmatch(r"torch\.jit\._pickle\.build_[a-z]+list", typename): + if data.state is not None: + raise AssertionError("data.state is not None") + ls, = data.args + if not isinstance(ls, list): + raise AssertionError("ls is not a list") + return hierarchical_pickle(ls) + if typename == "torch.device": + if data.state is not None: + raise AssertionError("data.state is not None") + name, = data.args + if not isinstance(name, str): + raise AssertionError("name is not a string") + # Just forget that it was a device and return the name. + return name + if typename == "builtin.UnicodeDecodeError": + if data.state is not None: + raise AssertionError("data.state is not None") + msg, = data.args + if not isinstance(msg, str): + raise AssertionError("msg is not a string") + # Hack: Pretend this is a module so we don't need custom serialization. + # Hack: Wrap the message in a tuple so it looks like a nice state object. + # TODO: Undo at least that second hack. We should support string states. + return { + "__module_type__": typename, + "state": hierarchical_pickle((msg,)), + } + raise Exception(f"Can't prepare fake object of type for JS: {typename}") # noqa: TRY002 + raise Exception(f"Can't prepare data of type for JS: {type(data)}") # noqa: TRY002 + + +def get_model_info( + path_or_file, + title=None, + extra_file_size_limit=DEFAULT_EXTRA_FILE_SIZE_LIMIT): + """Get JSON-friendly information about a model. + + The result is suitable for being saved as model_info.json, + or passed to burn_in_info. + """ + + if isinstance(path_or_file, os.PathLike): + default_title = os.fspath(path_or_file) + file_size = path_or_file.stat().st_size # type: ignore[attr-defined] + elif isinstance(path_or_file, str): + default_title = path_or_file + file_size = Path(path_or_file).stat().st_size + else: + default_title = "buffer" + path_or_file.seek(0, io.SEEK_END) + file_size = path_or_file.tell() + path_or_file.seek(0) + + title = title or default_title + + with zipfile.ZipFile(path_or_file) as zf: + path_prefix = None + zip_files = [] + # pyrefly: ignore [bad-assignment] + for zi in zf.infolist(): + prefix = re.sub("/.*", "", zi.filename) + if path_prefix is None: + path_prefix = prefix + elif prefix != path_prefix: + raise Exception(f"Mismatched prefixes: {path_prefix} != {prefix}") # noqa: TRY002 + zip_files.append( + { + "filename": zi.filename, + "compression": zi.compress_type, + "compressed_size": zi.compress_size, + "file_size": zi.file_size, + } + ) + if path_prefix is None: + raise AssertionError("path_prefix is None") + version = zf.read(path_prefix + "/version").decode("utf-8").strip() + + def get_pickle(name): + if path_prefix is None: + raise AssertionError("path_prefix is None") + with zf.open(path_prefix + f"/{name}.pkl") as handle: + raw = torch.utils.show_pickle.DumpUnpickler(handle, catch_invalid_utf8=True).load() + return hierarchical_pickle(raw) + + model_data = get_pickle("data") + constants = get_pickle("constants") + + # Intern strings that are likely to be reused. + # Pickle automatically detects shared structure, + # so reused strings are stored efficiently. + # However, JSON has no way of representing this, + # so we have to do it manually. + interned_strings : dict[str, int] = {} + + def intern(s): + if s not in interned_strings: + interned_strings[s] = len(interned_strings) + return interned_strings[s] + + code_files = {} + for zi in zf.infolist(): + if not zi.filename.endswith(".py"): + continue + with zf.open(zi) as handle: + raw_code = handle.read() + with zf.open(zi.filename + ".debug_pkl") as handle: + raw_debug = handle.read() + + # Parse debug info and add begin/end markers if not present + # to ensure that we cover the entire source code. + debug_info_t = pickle.loads(raw_debug) + text_table = None + + if (len(debug_info_t) == 3 and + isinstance(debug_info_t[0], str) and + debug_info_t[0] == 'FORMAT_WITH_STRING_TABLE'): + _, text_table, content = debug_info_t + + def parse_new_format(line): + # (0, (('', '', 0), 0, 0)) + num, ((text_indexes, fname_idx, offset), start, end), tag = line + text = ''.join(text_table[x] for x in text_indexes) # type: ignore[index] + fname = text_table[fname_idx] # type: ignore[index] + return num, ((text, fname, offset), start, end), tag + + debug_info_t = map(parse_new_format, content) + + debug_info = list(debug_info_t) + if not debug_info: + debug_info.append((0, (('', '', 0), 0, 0))) + if debug_info[-1][0] != len(raw_code): + debug_info.append((len(raw_code), (('', '', 0), 0, 0))) + + code_parts = [] + for di, di_next in itertools.pairwise(debug_info): + start, source_range, *_ = di + end = di_next[0] + if end <= start: + raise AssertionError("end is not greater than start") + source, s_start, s_end = source_range + s_text, s_file, s_line = source + # TODO: Handle this case better. TorchScript ranges are in bytes, + # but JS doesn't really handle byte strings. + # if bytes and chars are not equivalent for this string, + # zero out the ranges so we don't highlight the wrong thing. + if len(s_text) != len(s_text.encode("utf-8")): + s_start = 0 + s_end = 0 + text = raw_code[start:end] + code_parts.append([text.decode("utf-8"), intern(s_file), s_line, intern(s_text), s_start, s_end]) + code_files[zi.filename] = code_parts + + extra_files_json_pattern = re.compile(re.escape(path_prefix) + "/extra/.*\\.json") + extra_files_jsons = {} + for zi in zf.infolist(): + if not extra_files_json_pattern.fullmatch(zi.filename): + continue + if zi.file_size > extra_file_size_limit: + continue + with zf.open(zi) as handle: + try: + json_content = json.load(handle) + extra_files_jsons[zi.filename] = json_content + except json.JSONDecodeError: + extra_files_jsons[zi.filename] = "INVALID JSON" + + always_render_pickles = { + "bytecode.pkl", + } + extra_pickles = {} + for zi in zf.infolist(): + if not zi.filename.endswith(".pkl"): + continue + with zf.open(zi) as handle: + # TODO: handle errors here and just ignore the file? + # NOTE: For a lot of these files (like bytecode), + # we could get away with just unpickling, but this should be safer. + obj = torch.utils.show_pickle.DumpUnpickler(handle, catch_invalid_utf8=True).load() + buf = io.StringIO() + pprint.pprint(obj, buf) + contents = buf.getvalue() + # Checked the rendered length instead of the file size + # because pickles with shared structure can explode in size during rendering. + if os.path.basename(zi.filename) not in always_render_pickles and \ + len(contents) > extra_file_size_limit: + continue + extra_pickles[zi.filename] = contents + + return { + "model": { + "title": title, + "file_size": file_size, + "version": version, + "zip_files": zip_files, + "interned_strings": list(interned_strings), + "code_files": code_files, + "model_data": model_data, + "constants": constants, + "extra_files_jsons": extra_files_jsons, + "extra_pickles": extra_pickles, + } + } + + +def get_inline_skeleton(): + """Get a fully-inlined skeleton of the frontend. + + The returned HTML page has no external network dependencies for code. + It can load model_info.json over HTTP, or be passed to burn_in_info. + """ + + import importlib.resources + + # pyrefly: ignore [bad-argument-type] + skeleton = importlib.resources.read_text(__package__, "skeleton.html") + # pyrefly: ignore [bad-argument-type] + js_code = importlib.resources.read_text(__package__, "code.js") + for js_module in ["preact", "htm"]: + # pyrefly: ignore [bad-argument-type] + js_lib = importlib.resources.read_binary(__package__, f"{js_module}.mjs") + js_url = "data:application/javascript," + urllib.parse.quote(js_lib) + js_code = js_code.replace(f"https://unpkg.com/{js_module}?module", js_url) + skeleton = skeleton.replace(' src="./code.js">', ">\n" + js_code) + return skeleton + + +def burn_in_info(skeleton, info): + """Burn model info into the HTML skeleton. + + The result will render the hard-coded model info and + have no external network dependencies for code or data. + """ + + # Note that Python's json serializer does not escape slashes in strings. + # Since we're inlining this JSON directly into a script tag, a string + # containing "" would end the script prematurely and + # mess up our page. Unconditionally escape fixes that. + return skeleton.replace( + "BURNED_IN_MODEL_INFO = null", + "BURNED_IN_MODEL_INFO = " + json.dumps(info, sort_keys=True).replace("/", "\\/")) + + +def get_info_and_burn_skeleton(path_or_bytesio, **kwargs): + model_info = get_model_info(path_or_bytesio, **kwargs) + skeleton = get_inline_skeleton() + page = burn_in_info(skeleton, model_info) + return page + + +def main(argv, *, stdout=None) -> None: + warnings.warn("torch.utils.model_dump is deprecated and will be removed in a future PyTorch release.", stacklevel=2) + parser = argparse.ArgumentParser() + parser.add_argument("--style", choices=["json", "html"]) + parser.add_argument("--title") + parser.add_argument("model") + args = parser.parse_args(argv[1:]) + + info = get_model_info(args.model, title=args.title) + + output = stdout or sys.stdout + + if args.style == "json": + output.write(json.dumps(info, sort_keys=True) + "\n") + elif args.style == "html": + skeleton = get_inline_skeleton() + page = burn_in_info(skeleton, info) + output.write(page) + else: + raise Exception("Invalid style") # noqa: TRY002 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/model_dump/__main__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/model_dump/__main__.py new file mode 100644 index 0000000000000000000000000000000000000000..5d4bdac389bb1f270d74efb6c876258d46077110 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/model_dump/__main__.py @@ -0,0 +1,5 @@ +#!/usr/bin/env python3 +import sys +from . import main + +sys.exit(main(sys.argv)) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/model_dump/code.js b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/model_dump/code.js new file mode 100644 index 0000000000000000000000000000000000000000..173ddfb639d847159ee4fdf46691404bf1bbb7a3 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/model_dump/code.js @@ -0,0 +1,689 @@ +import { h, Component, render } from 'https://unpkg.com/preact?module'; +import htm from 'https://unpkg.com/htm?module'; + +const html = htm.bind(h); + +const BURNED_IN_MODEL_INFO = null; + +// https://stackoverflow.com/a/20732091 +function humanFileSize(size) { + if (size == 0) { return "0 B"; } + var i = Math.floor( Math.log(size) / Math.log(1024) ); + return (size / Math.pow(1024, i)).toFixed(2) * 1 + ' ' + ['B', 'kB', 'MB', 'GB', 'TB'][i]; +} + +function caret(down) { + return down ? "\u25BE" : "\u25B8"; +} + +class Blamer { + constructor() { + this.blame_on_click = false; + this.aux_content_pane = null; + } + + setAuxContentPane(pane) { + this.aux_content_pane = pane; + } + + readyBlame() { + this.blame_on_click = true; + } + + maybeBlame(arg) { + if (!this.blame_on_click) { + return; + } + this.blame_on_click = false; + if (!this.aux_content_pane) { + return; + } + this.aux_content_pane.doBlame(arg); + } +} + +let blame = new Blamer(); + +class Hider extends Component { + constructor() { + super(); + this.state = { shown: null }; + } + + componentDidMount() { + this.setState({ shown: this.props.shown === "true" }); + } + + render({name, children}, {shown}) { + let my_caret = html` this.click()} >${caret(shown)}`; + return html`
+

${my_caret} ${name}

+
${shown ? this.props.children : []}
`; + } + + click() { + this.setState({shown: !this.state.shown}); + } +} + +function ModelSizeSection({model: {file_size, zip_files}}) { + let store_size = 0; + let compr_size = 0; + for (const zi of zip_files) { + if (zi.compression === 0) { + // TODO: Maybe check that compressed_size === file_size. + store_size += zi.compressed_size; + } else { + compr_size += zi.compressed_size; + } + } + let zip_overhead = file_size - store_size - compr_size; + // TODO: Better formatting. Right-align this. + return html` + <${Hider} name="Model Size" shown=true> +
.
+      Model size: ${file_size} (${humanFileSize(file_size)})
+      Stored files: ${store_size} (${humanFileSize(store_size)})
+      Compressed files: ${compr_size} (${humanFileSize(compr_size)})
+      Zip overhead: ${zip_overhead} (${humanFileSize(zip_overhead)})
+    
`; +} + +function StructuredDataSection({name, data, shown}) { + return html` + <${Hider} name=${name} shown=${shown}> +
+ <${StructuredData} data=${data} indent="" prefix=""/> +
`; +} + +class StructuredData extends Component { + constructor() { + super(); + this.state = { shown: false }; + + this.INLINE_TYPES = new Set(["boolean", "number", "string"]) + this.IGNORED_STATE_KEYS = new Set(["training", "_is_full_backward_hook"]) + } + + click() { + this.setState({shown: !this.state.shown}); + } + + expando(data) { + if (data === null || this.INLINE_TYPES.has(typeof(data))) { + return false; + } + if (typeof(data) != "object") { + throw new Error("Not an object"); + } + if (Array.isArray(data)) { + // TODO: Maybe show simple lists and tuples on one line. + return true; + } + if (data.__tuple_values__) { + // TODO: Maybe show simple lists and tuples on one line. + return true; + } + if (data.__is_dict__) { + // TODO: Maybe show simple (empty?) dicts on one line. + return true; + } + if (data.__module_type__) { + return true; + } + if (data.__tensor_v2__) { + return false; + } + if (data.__qtensor__) { + return false; + } + throw new Error("Can't handle data type.", data); + } + + renderHeadline(data) { + if (data === null) { + return "None"; + } + if (typeof(data) == "boolean") { + const sd = String(data); + return sd.charAt(0).toUpperCase() + sd.slice(1); + } + if (typeof(data) == "number") { + return JSON.stringify(data); + } + if (typeof(data) == "string") { + return JSON.stringify(data); + } + if (typeof(data) != "object") { + throw new Error("Not an object"); + } + if (Array.isArray(data)) { + return "list(["; + } + if (data.__tuple_values__) { + return "tuple(("; + } + if (data.__is_dict__) { + return "dict({"; + } + if (data.__module_type__) { + return data.__module_type__ + "()"; + } + if (data.__tensor_v2__) { + const [storage, offset, size, stride, grad] = data.__tensor_v2__; + const [dtype, key, device, numel] = storage; + return this.renderTensor( + "tensor", dtype, key, device, numel, offset, size, stride, grad, []); + } + if (data.__qtensor__) { + const [storage, offset, size, stride, quantizer, grad] = data.__qtensor__; + const [dtype, key, device, numel] = storage; + let extra_parts = []; + if (quantizer[0] == "per_tensor_affine") { + extra_parts.push(`scale=${quantizer[1]}`); + extra_parts.push(`zero_point=${quantizer[2]}`); + } else { + extra_parts.push(`quantizer=${quantizer[0]}`); + } + return this.renderTensor( + "qtensor", dtype, key, device, numel, offset, size, stride, grad, extra_parts); + } + throw new Error("Can't handle data type.", data); + } + + renderTensor( + prefix, + dtype, + storage_key, + device, + storage_numel, + offset, + size, + stride, + grad, + extra_parts) { + let parts = [ + "(" + size.join(",") + ")", + dtype, + ]; + parts.push(...extra_parts); + if (device != "cpu") { + parts.push(device); + } + if (grad) { + parts.push("grad"); + } + // TODO: Check stride and indicate if the tensor is channels-last or non-contiguous + // TODO: Check size, stride, offset, and numel and indicate if + // the tensor doesn't use all data in storage. + // TODO: Maybe show key? + void(offset); + void(stride); + void(storage_key); + void(storage_numel); + return prefix + "(" + parts.join(", ") + ")"; + } + + renderBody(indent, data) { + if (data === null || this.INLINE_TYPES.has(typeof(data))) { + throw "Should not reach here." + } + if (typeof(data) != "object") { + throw new Error("Not an object"); + } + if (Array.isArray(data)) { + let new_indent = indent + "\u00A0\u00A0"; + let parts = []; + for (let idx = 0; idx < data.length; idx++) { + // Does it make sense to put explicit index numbers here? + parts.push(html`
<${StructuredData} prefix=${idx + ": "} indent=${new_indent} data=${data[idx]} />`); + } + return parts; + } + if (data.__tuple_values__) { + // Handled the same as lists. + return this.renderBody(indent, data.__tuple_values__); + } + if (data.__is_dict__) { + let new_indent = indent + "\u00A0\u00A0"; + let parts = []; + for (let idx = 0; idx < data.keys.length; idx++) { + if (typeof(data.keys[idx]) != "string") { + parts.push(html`
${new_indent}Non-string key`); + } else { + parts.push(html`
<${StructuredData} prefix=${data.keys[idx] + ": "} indent=${new_indent} data=${data.values[idx]} />`); + } + } + return parts; + } + if (data.__module_type__) { + const mstate = data.state; + if (mstate === null || typeof(mstate) != "object") { + throw new Error("Bad module state"); + } + let new_indent = indent + "\u00A0\u00A0"; + let parts = []; + if (mstate.__is_dict__) { + // TODO: Less copy/paste between this and normal dicts. + for (let idx = 0; idx < mstate.keys.length; idx++) { + if (typeof(mstate.keys[idx]) != "string") { + parts.push(html`
${new_indent}Non-string key`); + } else if (this.IGNORED_STATE_KEYS.has(mstate.keys[idx])) { + // Do nothing. + } else { + parts.push(html`
<${StructuredData} prefix=${mstate.keys[idx] + ": "} indent=${new_indent} data=${mstate.values[idx]} />`); + } + } + } else if (mstate.__tuple_values__) { + parts.push(html`
<${StructuredData} prefix="" indent=${new_indent} data=${mstate} />`); + } else if (mstate.__module_type__) { + // We normally wouldn't have the state of a module be another module, + // but we use "modules" to encode special values (like Unicode decode + // errors) that might be valid states. Just go with it. + parts.push(html`
<${StructuredData} prefix="" indent=${new_indent} data=${mstate} />`); + } else { + throw new Error("Bad module state"); + } + return parts; + } + if (data.__tensor_v2__) { + throw "Should not reach here." + } + if (data.__qtensor__) { + throw "Should not reach here." + } + throw new Error("Can't handle data type.", data); + } + + render({data, indent, prefix}, {shown}) { + const exp = this.expando(data) ? html` this.click()} >${caret(shown)} ` : ""; + const headline = this.renderHeadline(data); + const body = shown ? this.renderBody(indent, data) : ""; + return html`${indent}${exp}${prefix}${headline}${body}`; + } +} + +function ZipContentsSection({model: {zip_files}}) { + // TODO: Add human-readable sizes? + // TODO: Add sorting options? + // TODO: Add hierarchical collapsible tree? + return html` + <${Hider} name="Zip Contents" shown=false> + + + + + + + + + + + ${zip_files.map(zf => html` + + + + + `)} + +
ModeSizeCompressedName
${{0: "store", 8: "deflate"}[zf.compression] || zf.compression}${zf.file_size}${zf.compressed_size}${zf.filename}
`; +} + +function CodeSection({model: {code_files}}) { + return html` + <${Hider} name="Code" shown=false> +
+ ${Object.entries(code_files).map(([fn, code]) => html`<${OneCodeSection} + filename=${fn} code=${code} />`)} +
`; +} + +class OneCodeSection extends Component { + constructor() { + super(); + this.state = { shown: false }; + } + + click() { + const shown = !this.state.shown; + this.setState({shown: shown}); + } + + render({filename, code}, {shown}) { + const header = html` +

+ this.click()} >${caret(shown)} + ${filename}

+ `; + if (!shown) { + return header; + } + return html` + ${header} +
${code.map(c => this.renderBlock(c))}
+ `; + } + + renderBlock([text, ist_file, line, ist_s_text, s_start, s_end]) { + return html` blame.maybeBlame({ist_file, line, ist_s_text, s_start, s_end})} + >${text}`; + } +} + +function ExtraJsonSection({files}) { + return html` + <${Hider} name="Extra files (JSON)" shown=false> +
+

Use "Log Raw Model Info" for hierarchical view in browser console.

+ ${Object.entries(files).map(([fn, json]) => html`<${OneJsonSection} + filename=${fn} json=${json} />`)} +
`; +} + +class OneJsonSection extends Component { + constructor() { + super(); + this.state = { shown: false }; + } + + click() { + const shown = !this.state.shown; + this.setState({shown: shown}); + } + + render({filename, json}, {shown}) { + const header = html` +

+ this.click()} >${caret(shown)} + ${filename}

+ `; + if (!shown) { + return header; + } + return html` + ${header} +
${JSON.stringify(json, null, 2)}
+ `; + } +} + +function ExtraPicklesSection({files}) { + return html` + <${Hider} name="Extra Pickles" shown=false> +
+ ${Object.entries(files).map(([fn, content]) => html`<${OnePickleSection} + filename=${fn} content=${content} />`)} +
`; +} + +class OnePickleSection extends Component { + constructor() { + super(); + this.state = { shown: false }; + } + + click() { + const shown = !this.state.shown; + this.setState({shown: shown}); + } + + render({filename, content}, {shown}) { + const header = html` +

+ this.click()} >${caret(shown)} + ${filename}

+ `; + if (!shown) { + return header; + } + return html` + ${header} +
${content}
+ `; + } +} + +function assertStorageAreEqual(key, lhs, rhs) { + if (lhs.length !== rhs.length || + !lhs.every((val, idx) => val === rhs[idx])) { + throw new Error("Storage mismatch for key '" + key + "'"); + } +} + +function computeTensorMemory(numel, dtype) { + const sizes = { + "Byte": 1, + "Char": 1, + "Short": 2, + "Int": 4, + "Long": 8, + "Half": 2, + "Float": 4, + "Double": 8, + "ComplexHalf": 4, + "ComplexFloat": 8, + "ComplexDouble": 16, + "Bool": 1, + "QInt8": 1, + "QUInt8": 1, + "QInt32": 4, + "BFloat16": 2, + }; + let dtsize = sizes[dtype]; + if (!dtsize) { + throw new Error("Unrecognized dtype: " + dtype); + } + return numel * dtsize; +} + +// TODO: Maybe track by dtype as well. +// TODO: Maybe distinguish between visible size and storage size. +function getTensorStorages(data) { + if (data === null) { + return new Map(); + } + if (typeof(data) == "boolean") { + return new Map(); + } + if (typeof(data) == "number") { + return new Map(); + } + if (typeof(data) == "string") { + return new Map(); + } + if (typeof(data) != "object") { + throw new Error("Not an object"); + } + if (Array.isArray(data)) { + let result = new Map(); + for (const item of data) { + const tensors = getTensorStorages(item); + for (const [key, storage] of tensors.entries()) { + if (!result.has(key)) { + result.set(key, storage); + } else { + const old_storage = result.get(key); + assertStorageAreEqual(key, old_storage, storage); + } + } + } + return result; + } + if (data.__tuple_values__) { + return getTensorStorages(data.__tuple_values__); + } + if (data.__is_dict__) { + return getTensorStorages(data.values); + } + if (data.__module_type__) { + return getTensorStorages(data.state); + } + if (data.__tensor_v2__) { + const [storage, offset, size, stride, grad] = data.__tensor_v2__; + const [dtype, key, device, numel] = storage; + return new Map([[key, storage]]); + } + if (data.__qtensor__) { + const [storage, offset, size, stride, quantizer, grad] = data.__qtensor__; + const [dtype, key, device, numel] = storage; + return new Map([[key, storage]]); + } + throw new Error("Can't handle data type.", data); +} + +function getTensorMemoryByDevice(pickles) { + let all_tensors = []; + for (const [name, pickle] of pickles) { + const tensors = getTensorStorages(pickle); + all_tensors.push(...tensors.values()); + } + let result = {}; + for (const storage of all_tensors.values()) { + const [dtype, key, device, numel] = storage; + const size = computeTensorMemory(numel, dtype); + result[device] = (result[device] || 0) + size; + } + return result; +} + +// Make this a separate component so it is rendered lazily. +class OpenTensorMemorySection extends Component { + render({model: {model_data, constants}}) { + let sizes = getTensorMemoryByDevice(new Map([ + ["data", model_data], + ["constants", constants], + ])); + return html` + + + + + + + + + + ${Object.entries(sizes).map(([dev, size]) => html` + + + + `)} + +
DeviceBytesHuman
${dev}${size}${humanFileSize(size)}
`; + } +} + +function TensorMemorySection({model}) { + return html` + <${Hider} name="Tensor Memory" shown=false> + <${OpenTensorMemorySection} model=${model} />`; +} + +class AuxContentPane extends Component { + constructor() { + super(); + this.state = { + blame_info: null, + }; + } + + doBlame(arg) { + this.setState({...this.state, blame_info: arg}); + } + + render({model: {interned_strings}}, {blame_info}) { + let blame_content = ""; + if (blame_info) { + const {ist_file, line, ist_s_text, s_start, s_end} = blame_info; + let s_text = interned_strings[ist_s_text]; + if (s_start != 0 || s_end != s_text.length) { + let prefix = s_text.slice(0, s_start); + let main = s_text.slice(s_start, s_end); + let suffix = s_text.slice(s_end); + s_text = html`${prefix}${main}${suffix}`; + } + blame_content = html` +

${interned_strings[ist_file]}:${line}

+
${s_start}:${s_end}
+
${s_text}

+ `; + } + return html` + +
+ ${blame_content} + `; + } +} + +class App extends Component { + constructor() { + super(); + this.state = { + err: false, + model: null, + }; + } + + componentDidMount() { + const app = this; + if (BURNED_IN_MODEL_INFO !== null) { + app.setState({model: BURNED_IN_MODEL_INFO}); + } else { + fetch("./model_info.json").then(function(response) { + if (!response.ok) { + throw new Error("Response not ok."); + } + return response.json(); + }).then(function(body) { + app.setState({model: body}); + }).catch(function(error) { + console.log("Top-level error: ", error); + }); + } + } + + componentDidCatch(error) { + void(error); + this.setState({...this.state, err: true}); + } + + render(_, {err}) { + if (this.state.model === null) { + return html`

Loading...

`; + } + + const model = this.state.model.model; + + let error_msg = ""; + if (err) { + error_msg = html`

An error occurred. Check console

`; + } + + return html` + ${error_msg} +
+

TorchScript Model (version ${model.version}): ${model.title}

+ + <${ModelSizeSection} model=${model}/> + <${StructuredDataSection} name="Model Data" data=${model.model_data} shown=true/> + <${StructuredDataSection} name="Constants" data=${model.constants} shown=false/> + <${ZipContentsSection} model=${model}/> + <${CodeSection} model=${model}/> + <${ExtraJsonSection} files=${model.extra_files_jsons}/> + <${ExtraPicklesSection} files=${model.extra_pickles}/> + <${TensorMemorySection} model=${model}/> +
+
+ <${AuxContentPane} + err=${this.state.error} + model=${model} + ref=${(p) => blame.setAuxContentPane(p)}/> +
+ `; + } +} + +render(h(App), document.body); diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/model_dump/htm.mjs b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/model_dump/htm.mjs new file mode 100644 index 0000000000000000000000000000000000000000..06f25a13d8021ff4f43de442bbf0279f24735d6c --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/model_dump/htm.mjs @@ -0,0 +1,2 @@ +// HTM, Apache License +var n=function(t,s,r,e){var u;s[0]=0;for(var h=1;h=5&&((e||!n&&5===r)&&(h.push(r,0,e,s),r=6),n&&(h.push(r,n,0,s),r=6)),e=""},a=0;a"===t?(r=1,e=""):e=t+e[0]:u?t===u?u="":e+=t:'"'===t||"'"===t?u=t:">"===t?(p(),r=1):r&&("="===t?(r=5,s=e,e=""):"/"===t&&(r<5||">"===n[a][l+1])?(p(),3===r&&(h=h[0]),r=h,(h=h[0]).push(2,0,r),r=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(p(),r=2):e+=t),3===r&&"!--"===e&&(r=4,h=h[0])}return p(),h}(s)),r),arguments,[])).length>1?r:r[0]} diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/model_dump/preact.mjs b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/model_dump/preact.mjs new file mode 100644 index 0000000000000000000000000000000000000000..8c85bd948c6772ca8d40fc8d6fab6a220d55a1ef --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/model_dump/preact.mjs @@ -0,0 +1,2 @@ +// Preact, MIT License +var n,l,u,i,t,o,r={},f=[],e=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function c(e,n){for(var t in n)e[t]=n[t];return e}function s(e){var n=e.parentNode;n&&n.removeChild(e)}function a(e,n,t){var _,l,o,r=arguments,i={};for(o in n)"key"==o?_=n[o]:"ref"==o?l=n[o]:i[o]=n[o];if(arguments.length>3)for(t=[t],o=3;o0?v(m.type,m.props,m.key,null,m.__v):m)){if(m.__=t,m.__b=t.__b+1,null===(h=P[p])||h&&m.key==h.key&&m.type===h.type)P[p]=void 0;else for(a=0;a3)for(t=[t],o=3;o + + + TorchScript Model + + + + + + + + diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/model_zoo.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/model_zoo.py new file mode 100644 index 0000000000000000000000000000000000000000..e0c6004e23ea806a2c83e12cd2998e0279e0b16f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/model_zoo.py @@ -0,0 +1,2 @@ +# torchvision imports tqdm from here. +from torch.hub import tqdm, load_state_dict_from_url as load_url # noqa: F401 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/module_tracker.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/module_tracker.py new file mode 100644 index 0000000000000000000000000000000000000000..7b5a8aad4dda9880c860850e42071a55ee7442e5 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/module_tracker.py @@ -0,0 +1,160 @@ +# mypy: allow-untyped-defs +import logging +import weakref +from typing import TYPE_CHECKING + +import torch +from torch.autograd.graph import register_multi_grad_hook +from torch.nn.modules.module import ( + register_module_forward_hook, + register_module_forward_pre_hook, +) +from torch.utils._pytree import tree_flatten + + +if TYPE_CHECKING: + from torch.utils.hooks import RemovableHandle + + +logger = logging.getLogger(__name__) + + +__all__ = ["ModuleTracker"] + + +class ModuleTracker: + """ + ``ModuleTracker`` is a context manager that tracks the nn.Module hierarchy during execution + so that other system can query which Module is currently being executed (or its backward is being + executed). + + You can access the ``parents`` attribute on this context manager to get the set of all the + Modules currently being executed via their fqn (fully qualified name, also used as the key within + the state_dict). + You can access the ``is_bw`` attribute to know if you are currently running in backward or not. + + Note that ``parents`` is never empty and always contains the "Global" key. The ``is_bw`` flag + will remain ``True`` after the forward until another Module is executed. If you need it to be + more accurate, please submit an issue requesting this. Adding a map from fqn to the module instance + is possible but not done yet, please submit an issue requesting this if you need it. + + Example usage + + .. code-block:: python + + mod = torch.nn.Linear(2, 2) + + with ModuleTracker() as tracker: + # Access anything during the forward pass + def my_linear(m1, m2, bias): + print(f"Current modules: {tracker.parents}") + return torch.mm(m1, m2.t()) + bias + + torch.nn.functional.linear = my_linear + + mod(torch.rand(2, 2)) + + """ + + parents: set[str] + """ + A Set containing the fqn for each module currently running their forward + """ + + def __init__(self) -> None: + self.parents = {"Global"} + self._known_modules: weakref.WeakKeyDictionary = weakref.WeakKeyDictionary() + self._seen_modules: weakref.WeakSet = weakref.WeakSet() + self._has_callback = False + self._hooks: list[RemovableHandle] = [] + + def _maybe_set_engine_callback(self) -> None: + # This assumes no concurrent calls to backward + if self._has_callback: + return + + def callback() -> None: + self.parents = {"Global"} + self._has_callback = False + + torch.autograd.Variable._execution_engine.queue_callback(callback) + self._has_callback = True + + @property + def is_bw(self): + """ + A boolean marking if this is currently running during the backward pass or not + """ + return torch._C._current_graph_task_id() != -1 + + def _get_mod_name(self, mod): + if mod not in self._known_modules: + self._known_modules[mod] = type(mod).__name__ + mod_name = self._known_modules[mod] + if mod not in self._seen_modules: + for name, submod in mod.named_children(): + self._known_modules[submod] = f"{mod_name}.{name}" + self._get_mod_name(submod) + self._seen_modules.add(mod) + return mod_name + + def _get_append_fn(self, name, is_bw): + def fn(*args) -> None: + if is_bw: + self._maybe_set_engine_callback() + if name in self.parents: + logger.info( + "The module hierarchy tracking seems to be broken as this Module was already entered. %s during %s", + name, + "backward" if is_bw else "forward", + ) + self.parents.add(name) + + return fn + + def _get_pop_fn(self, name, is_bw): + def fn(*args) -> None: + if name in self.parents: + self.parents.remove(name) + else: + logger.info( + "The Module hierarchy tracking is confused as we're exiting a Module that was never entered. %s during %s", + name, + "backward" if is_bw else "forward", + ) + + return fn + + def _fw_pre_hook(self, mod, input) -> None: + name = self._get_mod_name(mod) + self._get_append_fn(name, False)() + + args, _ = tree_flatten(input) + tensors = [a for a in args if isinstance(a, torch.Tensor) and a.requires_grad] + if tensors: + self._hooks.append( + register_multi_grad_hook(tensors, self._get_pop_fn(name, True)) + ) + + def _fw_post_hook(self, mod, input, output) -> None: + name = self._get_mod_name(mod) + self._get_pop_fn(name, False)() + + args, _ = tree_flatten(output) + tensors = [a for a in args if isinstance(a, torch.Tensor) and a.requires_grad] + if tensors: + self._hooks.append( + register_multi_grad_hook(tensors, self._get_append_fn(name, True)) + ) + + def __enter__(self): + self._fw_pre_handle = register_module_forward_pre_hook(self._fw_pre_hook) + self._fw_post_handle = register_module_forward_hook(self._fw_post_hook) + return self + + def __exit__(self, *args): + self._fw_pre_handle.remove() + self._fw_post_handle.remove() + for hook in self._hooks: + hook.remove() + self._hooks.clear() diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/serialization/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/serialization/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d63bc18b69b138a026622de599aed656cc868c8e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/serialization/__init__.py @@ -0,0 +1 @@ +from . import config diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/serialization/config.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/serialization/config.py new file mode 100644 index 0000000000000000000000000000000000000000..c3e6729c68583f7206d07df7bfa2666007a6bd67 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/serialization/config.py @@ -0,0 +1,25 @@ +import sys +from typing import Optional as _Optional, TYPE_CHECKING as _TYPE_CHECKING + + +if _TYPE_CHECKING: + from torch.serialization import LoadEndianness as _LoadEndianess + +from torch.utils._config_module import install_config_module as _install_config_module + + +class load: + mmap: bool = False + endianness: _Optional["_LoadEndianess"] = None + # MAP_PRIVATE = 2 + mmap_flags: int | None = None if sys.platform == "win32" else 2 + calculate_storage_offsets: bool = False + + +class save: + compute_crc32: bool = True + use_pinned_memory_for_d2h: bool = False + storage_alignment: int = 64 + + +_install_config_module(sys.modules[__name__]) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/show_pickle.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/show_pickle.py new file mode 100644 index 0000000000000000000000000000000000000000..269ba3fbda4230c71ff14fe0e97872f6a8c57e6d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/show_pickle.py @@ -0,0 +1,151 @@ +#!/usr/bin/env python3 +# mypy: allow-untyped-defs +import sys +import pickle +import struct +import pprint +import zipfile +import fnmatch +from typing import Any, IO + +__all__ = ["FakeObject", "FakeClass", "DumpUnpickler", "main"] + +class FakeObject: + def __init__(self, module, name, args) -> None: + self.module = module + self.name = name + self.args = args + # NOTE: We don't distinguish between state never set and state set to None. + self.state = None + + def __repr__(self) -> str: + state_str = "" if self.state is None else f"(state={self.state!r})" + return f"{self.module}.{self.name}{self.args!r}{state_str}" + + def __setstate__(self, state): + self.state = state + + @staticmethod + def pp_format(printer, obj, stream, indent, allowance, context, level) -> None: + if not obj.args and obj.state is None: + stream.write(repr(obj)) + return + if obj.state is None: + stream.write(f"{obj.module}.{obj.name}") + printer._format(obj.args, stream, indent + 1, allowance + 1, context, level) + return + if not obj.args: + stream.write(f"{obj.module}.{obj.name}()(state=\n") + indent += printer._indent_per_level + stream.write(" " * indent) + printer._format(obj.state, stream, indent, allowance + 1, context, level + 1) + stream.write(")") + return + raise Exception("Need to implement") # noqa: TRY002 + + +class FakeClass: + def __init__(self, module, name) -> None: + self.module = module + self.name = name + self.__new__ = self.fake_new # type: ignore[assignment] + + def __repr__(self) -> str: + return f"{self.module}.{self.name}" + + def __call__(self, *args): + return FakeObject(self.module, self.name, args) + + def fake_new(self, *args): + return FakeObject(self.module, self.name, args[1:]) + + +class DumpUnpickler(pickle._Unpickler): # type: ignore[name-defined] + def __init__( + self, + file, + *, + catch_invalid_utf8=False, + **kwargs) -> None: + super().__init__(file, **kwargs) + self.catch_invalid_utf8 = catch_invalid_utf8 + + def find_class(self, module, name): + return FakeClass(module, name) + + def persistent_load(self, pid): + return FakeObject("pers", "obj", (pid,)) + + dispatch = dict(pickle._Unpickler.dispatch) # type: ignore[attr-defined] + + # Custom objects in TorchScript are able to return invalid UTF-8 strings + # from their pickle (__getstate__) functions. Install a custom loader + # for strings that catches the decode exception and replaces it with + # a sentinel object. + def load_binunicode(self) -> None: + strlen, = struct.unpack(" sys.maxsize: + raise Exception("String too long.") # noqa: TRY002 + str_bytes = self.read(strlen) # type: ignore[attr-defined] + obj: Any + try: + obj = str(str_bytes, "utf-8", "surrogatepass") + except UnicodeDecodeError as exn: + if not self.catch_invalid_utf8: + raise + obj = FakeObject("builtin", "UnicodeDecodeError", (str(exn),)) + self.append(obj) # type: ignore[attr-defined] + dispatch[pickle.BINUNICODE[0]] = load_binunicode # type: ignore[assignment] + + @classmethod + def dump(cls, in_stream, out_stream): + value = cls(in_stream).load() + pprint.pprint(value, stream=out_stream) + return value + + +def main(argv, output_stream=None) -> int | None: + if len(argv) != 2: + # Don't spam stderr if not using stdout. + if output_stream is not None: + raise Exception("Pass argv of length 2.") # noqa: TRY002 + sys.stderr.write("usage: show_pickle PICKLE_FILE\n") + sys.stderr.write(" PICKLE_FILE can be any of:\n") + sys.stderr.write(" path to a pickle file\n") + sys.stderr.write(" file.zip@member.pkl\n") + sys.stderr.write(" file.zip@*/pattern.*\n") + sys.stderr.write(" (shell glob pattern for members)\n") + sys.stderr.write(" (only first match will be shown)\n") + return 2 + + fname = argv[1] + handle: IO[bytes] + if "@" not in fname: + with open(fname, "rb") as handle: + DumpUnpickler.dump(handle, output_stream) + else: + zfname, mname = fname.split("@", 1) + with zipfile.ZipFile(zfname) as zf: + if "*" not in mname: + with zf.open(mname) as handle: + DumpUnpickler.dump(handle, output_stream) + else: + found = False + for info in zf.infolist(): + if fnmatch.fnmatch(info.filename, mname): + with zf.open(info) as handle: + DumpUnpickler.dump(handle, output_stream) + found = True + break + if not found: + raise Exception(f"Could not find member matching {mname} in {zfname}") # noqa: TRY002 + + +if __name__ == "__main__": + # This hack works on every version of Python I've tested. + # I've tested on the following versions: + # 3.7.4 + if True: + pprint.PrettyPrinter._dispatch[FakeObject.__repr__] = FakeObject.pp_format # type: ignore[attr-defined] + + sys.exit(main(sys.argv)) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/tensorboard/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/tensorboard/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9b2ac5edd05e16ef51e75f2ca68864b65da5d58 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/tensorboard/__init__.py @@ -0,0 +1,19 @@ +import tensorboard +from torch._vendor.packaging.version import Version + +if not hasattr(tensorboard, "__version__") or Version( + tensorboard.__version__ +) < Version("1.15"): + raise ImportError("TensorBoard logging requires TensorBoard version 1.15 or above") + +del Version +del tensorboard + +from .writer import FileWriter, SummaryWriter +from tensorboard.summary.writer.record_writer import RecordWriter + +__all__ = [ + "FileWriter", + "RecordWriter", + "SummaryWriter", +] diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/tensorboard/_convert_np.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/tensorboard/_convert_np.py new file mode 100644 index 0000000000000000000000000000000000000000..f0e8910580de16d9e7cf90f10d6327556e9a37a6 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/tensorboard/_convert_np.py @@ -0,0 +1,37 @@ +"""This module converts objects into numpy array.""" + +import numpy as np + +import torch + + +def make_np(x: torch.Tensor) -> np.ndarray: + """ + Convert an object into numpy array. + + Args: + x: An instance of torch tensor + + Returns: + numpy.array: Numpy array + """ + if isinstance(x, np.ndarray): + return x + if np.isscalar(x): + return np.array([x]) + if isinstance(x, torch.Tensor): + if x.device.type == "meta": + return np.random.randn(1) + return _prepare_pytorch(x) + raise NotImplementedError( + f"Got {type(x)}, but numpy array or torch tensor are expected." + ) + + +def _prepare_pytorch(x: torch.Tensor) -> np.ndarray: + if x.dtype == torch.bfloat16: + x = x.to(torch.float16) + # pyrefly: ignore [bad-assignment] + x = x.detach().cpu().numpy() + # pyrefly: ignore [bad-return] + return x diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/tensorboard/_embedding.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/tensorboard/_embedding.py new file mode 100644 index 0000000000000000000000000000000000000000..73413e219d0efbabe7d66747bd108ee5e8be4319 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/tensorboard/_embedding.py @@ -0,0 +1,87 @@ +# mypy: allow-untyped-defs +import math +import numpy as np +from ._convert_np import make_np +from ._utils import make_grid +from tensorboard.compat import tf +from tensorboard.plugins.projector.projector_config_pb2 import EmbeddingInfo + + +_HAS_GFILE_JOIN = hasattr(tf.io.gfile, "join") + + +def _gfile_join(a, b): + # The join API is different between tensorboard's TF stub and TF: + # https://github.com/tensorflow/tensorboard/issues/6080 + # We need to try both because `tf` may point to either the stub or the real TF. + if _HAS_GFILE_JOIN: + return tf.io.gfile.join(a, b) + else: + fs = tf.io.gfile.get_filesystem(a) + return fs.join(a, b) + + +def make_tsv(metadata, save_path, metadata_header=None) -> None: + if not metadata_header: + metadata = [str(x) for x in metadata] + else: + if len(metadata_header) != len( + metadata[0] + ): + raise AssertionError("len of header must be equal to the number of columns in metadata") + metadata = ["\t".join(str(e) for e in l) for l in [metadata_header] + metadata] + + metadata_bytes = tf.compat.as_bytes("\n".join(metadata) + "\n") + with tf.io.gfile.GFile(_gfile_join(save_path, "metadata.tsv"), "wb") as f: + f.write(metadata_bytes) + + +# https://github.com/tensorflow/tensorboard/issues/44 image label will be squared +def make_sprite(label_img, save_path) -> None: + from PIL import Image + from io import BytesIO + + # this ensures the sprite image has correct dimension as described in + # https://www.tensorflow.org/get_started/embedding_viz + nrow = math.ceil((label_img.size(0)) ** 0.5) + arranged_img_CHW = make_grid(make_np(label_img), ncols=nrow) + + # augment images so that #images equals nrow*nrow + arranged_augment_square_HWC = np.zeros( + (arranged_img_CHW.shape[2], arranged_img_CHW.shape[2], 3) + ) + arranged_img_HWC = arranged_img_CHW.transpose(1, 2, 0) # chw -> hwc + arranged_augment_square_HWC[: arranged_img_HWC.shape[0], :, :] = arranged_img_HWC + im = Image.fromarray(np.uint8((arranged_augment_square_HWC * 255).clip(0, 255))) + + with BytesIO() as buf: + im.save(buf, format="PNG") + im_bytes = buf.getvalue() + + with tf.io.gfile.GFile(_gfile_join(save_path, "sprite.png"), "wb") as f: + f.write(im_bytes) + + +def get_embedding_info(metadata, label_img, subdir, global_step, tag): + info = EmbeddingInfo() + info.tensor_name = f"{tag}:{str(global_step).zfill(5)}" + info.tensor_path = _gfile_join(subdir, "tensors.tsv") + if metadata is not None: + info.metadata_path = _gfile_join(subdir, "metadata.tsv") + if label_img is not None: + info.sprite.image_path = _gfile_join(subdir, "sprite.png") + info.sprite.single_image_dim.extend([label_img.size(3), label_img.size(2)]) + return info + + +def write_pbtxt(save_path, contents) -> None: + config_path = _gfile_join(save_path, "projector_config.pbtxt") + with tf.io.gfile.GFile(config_path, "wb") as f: + f.write(tf.compat.as_bytes(contents)) + + +def make_mat(matlist, save_path) -> None: + with tf.io.gfile.GFile(_gfile_join(save_path, "tensors.tsv"), "wb") as f: + for x in matlist: + x = [str(i.item()) for i in x] + f.write(tf.compat.as_bytes("\t".join(x) + "\n")) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/tensorboard/_onnx_graph.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/tensorboard/_onnx_graph.py new file mode 100644 index 0000000000000000000000000000000000000000..abadb7c9fdb421eb328f031a81aab5e231d4ca40 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/tensorboard/_onnx_graph.py @@ -0,0 +1,62 @@ +# mypy: allow-untyped-defs +from tensorboard.compat.proto.graph_pb2 import GraphDef +from tensorboard.compat.proto.node_def_pb2 import NodeDef +from tensorboard.compat.proto.versions_pb2 import VersionDef +from tensorboard.compat.proto.attr_value_pb2 import AttrValue +from tensorboard.compat.proto.tensor_shape_pb2 import TensorShapeProto + + +def load_onnx_graph(fname): + import onnx + + m = onnx.load(fname) # type: ignore[attr-defined] + g = m.graph + return parse(g) + + +def parse(graph): + nodes = [] + import itertools + + nodes_proto = list(itertools.chain(graph.input, graph.output)) + + for node in nodes_proto: + print(node.name) + shapeproto = TensorShapeProto( + dim=[ + # pyrefly: ignore [missing-attribute] + TensorShapeProto.Dim(size=d.dim_value) + for d in node.type.tensor_type.shape.dim + ] + ) + nodes.append( + NodeDef( + name=node.name.encode(encoding="utf_8"), + op="Variable", + input=[], + attr={ + "dtype": AttrValue(type=node.type.tensor_type.elem_type), + "shape": AttrValue(shape=shapeproto), + }, + ) + ) + + for node in graph.node: + _attr = [" = ".join([str(f[1]) for f in s.ListFields()]) for s in node.attribute] + attr = ", ".join(_attr).encode(encoding="utf_8") + print(node.output[0]) + nodes.append( + NodeDef( + name=node.output[0].encode(encoding="utf_8"), + op=node.op_type, + input=node.input, + attr={"parameters": AttrValue(s=attr)}, + ) + ) + + # two pass token replacement, appends opname to object id + mapping = {} + for node in nodes: + mapping[node.name] = node.op + "_" + node.name + + return GraphDef(node=nodes, versions=VersionDef(producer=22)) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/tensorboard/_proto_graph.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/tensorboard/_proto_graph.py new file mode 100644 index 0000000000000000000000000000000000000000..b79ba0dfac04802b057a1c29109a0ff163711d6e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/tensorboard/_proto_graph.py @@ -0,0 +1,59 @@ +import torch + +from collections.abc import Sequence +from tensorboard.compat.proto.node_def_pb2 import NodeDef +from tensorboard.compat.proto.attr_value_pb2 import AttrValue +from tensorboard.compat.proto.tensor_shape_pb2 import TensorShapeProto + + +# pyrefly: ignore [not-a-type] +def attr_value_proto(dtype: object, shape: Sequence[int] | None, s: str | None) -> dict[str, AttrValue]: + """Create a dict of objects matching a NodeDef's attr field. + + Follows https://github.com/tensorflow/tensorboard/blob/master/tensorboard/compat/proto/attr_value.proto + specifically designed for a NodeDef. The values have been reverse engineered from + standard TensorBoard logged data. + """ + attr = {} + if s is not None: + attr["attr"] = AttrValue(s=s.encode(encoding="utf_8")) + if shape is not None: + shapeproto = tensor_shape_proto(shape) + # pyrefly: ignore [missing-attribute] + attr["_output_shapes"] = AttrValue(list=AttrValue.ListValue(shape=[shapeproto])) + return attr + + +# pyrefly: ignore [not-a-type] +def tensor_shape_proto(outputsize: Sequence[int]) -> TensorShapeProto: + """Create an object matching a tensor_shape field. + + Follows https://github.com/tensorflow/tensorboard/blob/master/tensorboard/compat/proto/tensor_shape.proto . + """ + # pyrefly: ignore [missing-attribute] + return TensorShapeProto(dim=[TensorShapeProto.Dim(size=d) for d in outputsize]) + + +def node_proto( + name: str, + op: str = "UnSpecified", + input: list[str] | str | None = None, + dtype: torch.dtype | None = None, + shape: tuple[int, ...] | None = None, + outputsize: Sequence[int] | None = None, + attributes: str = "", +) -> NodeDef: # pyrefly: ignore [not-a-type] + """Create an object matching a NodeDef. + + Follows https://github.com/tensorflow/tensorboard/blob/master/tensorboard/compat/proto/node_def.proto . + """ + if input is None: + input = [] + if not isinstance(input, list): + input = [input] + return NodeDef( + name=name.encode(encoding="utf_8"), + op=op, + input=input, + attr=attr_value_proto(dtype, outputsize, attributes), + ) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/tensorboard/_pytorch_graph.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/tensorboard/_pytorch_graph.py new file mode 100644 index 0000000000000000000000000000000000000000..5a052016130b100f80b9a07dbb126182bce530cd --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/tensorboard/_pytorch_graph.py @@ -0,0 +1,378 @@ +# mypy: allow-untyped-defs +from collections import OrderedDict +import contextlib +from typing import Any + +from tensorboard.compat.proto.config_pb2 import RunMetadata +from tensorboard.compat.proto.graph_pb2 import GraphDef +from tensorboard.compat.proto.step_stats_pb2 import StepStats, DeviceStepStats +from tensorboard.compat.proto.versions_pb2 import VersionDef + +import torch +from ._proto_graph import node_proto + +methods_OP = [ + "attributeNames", + "hasMultipleOutputs", + "hasUses", + "inputs", + "kind", + "outputs", + "outputsSize", + "scopeName", +] +# Some additional methods to explure for methods_IO are +# +# 'unique' (type int) +# 'type' (type >) +# +# But the below are sufficient for now. +methods_IO = ["node", "offset", "debugName"] + +GETATTR_KIND = "prim::GetAttr" +CLASSTYPE_KIND = "ClassType" + + +class NodeBase: + def __init__( + self, + debugName=None, + inputs=None, + scope=None, + tensor_size=None, + op_type="UnSpecified", + attributes="", + ) -> None: + # TODO; Specify a __slots__ for this class or potentially + # used namedtuple instead + self.debugName = debugName + self.inputs = inputs + self.tensor_size = tensor_size + self.kind = op_type + self.attributes = attributes + self.scope = scope + + def __repr__(self) -> str: + repr = [] + repr.append(str(type(self))) + repr.extend( + m + ": " + str(getattr(self, m)) + str(type(getattr(self, m))) + for m in dir(self) + if "__" not in m + ) + return "\n".join(repr) + "\n\n" + + +class NodePy(NodeBase): + def __init__(self, node_cpp, valid_methods) -> None: + super().__init__(node_cpp) + valid_methods = valid_methods[:] + self.inputs = [] + + for m in valid_methods: + if m == "inputs" or m == "outputs": + list_of_node = list(getattr(node_cpp, m)()) + io_unique_names = [] + io_tensor_sizes = [] + for n in list_of_node: + io_unique_names.append(n.debugName()) + if n.isCompleteTensor(): + io_tensor_sizes.append(n.type().sizes()) + else: + io_tensor_sizes.append(None) + + setattr(self, m, io_unique_names) + setattr(self, m + "tensor_size", io_tensor_sizes) + + else: + setattr(self, m, getattr(node_cpp, m)()) + + +class NodePyIO(NodePy): + def __init__(self, node_cpp, input_or_output=None) -> None: + super().__init__(node_cpp, methods_IO) + try: + tensor_size = node_cpp.type().sizes() + except RuntimeError: + tensor_size = [ + 1, + ] # fail when constant model is used. + self.tensor_size = tensor_size + # Kind attribute string is purely descriptive and will be shown + # in detailed information for the node in TensorBoard's graph plugin. + # + # NodePyOP nodes get this from their kind() method. + self.kind = "Parameter" + if input_or_output: + self.input_or_output = input_or_output + self.kind = "IO Node" + + +class NodePyOP(NodePy): + def __init__(self, node_cpp) -> None: + super().__init__(node_cpp, methods_OP) + # Replace single quote which causes strange behavior in TensorBoard + # TODO: See if we can remove this in the future + self.attributes = str( + {k: _node_get(node_cpp, k) for k in node_cpp.attributeNames()} + ).replace("'", " ") + self.kind = node_cpp.kind() + + +class GraphPy: + """Helper class to convert torch.nn.Module to GraphDef proto and visualization with TensorBoard. + + GraphDef generation operates in two passes: + + In the first pass, all nodes are read and saved to two lists. + One list is for input/output nodes (nodes_io), which only have inbound + or outbound connections, but not both. Another list is for internal + operator nodes (nodes_op). The first pass also saves all scope name + appeared in the nodes in scope_name_appeared list for later processing. + + In the second pass, scope names are fully applied to all nodes. + debugNameToScopedName is a mapping from a node's ID to its fully qualified + scope name. e.g. Net1/Linear[0]/1. Unfortunately torch.jit doesn't have + totally correct scope output, so this is nontrivial. The function + populate_namespace_from_OP_to_IO and find_common_root are used to + assign scope name to a node based on the connection between nodes + in a heuristic kind of way. Bookkeeping is done with shallowest_scope_name + and scope_name_appeared. + """ + + def __init__(self) -> None: + self.nodes_op = [] + self.nodes_io = OrderedDict() + self.unique_name_to_scoped_name = {} + self.shallowest_scope_name = "default" + self.scope_name_appeared = [] + + def append(self, x) -> None: + if isinstance(x, NodePyIO): + self.nodes_io[x.debugName] = x + if isinstance(x, NodePyOP): + self.nodes_op.append(x) + + def printall(self) -> None: + print("all nodes") + for node in self.nodes_op: + print(node) + for key in self.nodes_io: + print(self.nodes_io[key]) + + def find_common_root(self) -> None: + for fullscope in self.scope_name_appeared: + if fullscope: + self.shallowest_scope_name = fullscope.split("/")[0] + + def populate_namespace_from_OP_to_IO(self) -> None: + for node in self.nodes_op: + for node_output, outputSize in zip(node.outputs, node.outputstensor_size, strict=True): + self.scope_name_appeared.append(node.scopeName) + self.nodes_io[node_output] = NodeBase( + node_output, + node.inputs, + node.scopeName, + outputSize, + op_type=node.kind, + attributes=node.attributes, + ) + + self.find_common_root() + + for node in self.nodes_op: + for input_node_id in node.inputs: + self.unique_name_to_scoped_name[input_node_id] = ( + node.scopeName + "/" + input_node_id + ) + + for key, node in self.nodes_io.items(): + if type(node) is NodeBase: + # pyrefly: ignore [unsupported-operation] + self.unique_name_to_scoped_name[key] = node.scope + "/" + node.debugName + if hasattr(node, "input_or_output"): + self.unique_name_to_scoped_name[key] = ( + node.input_or_output + "/" + node.debugName + ) + + if hasattr(node, "scope") and node.scope is not None: + self.unique_name_to_scoped_name[key] = node.scope + "/" + node.debugName + if node.scope == "" and self.shallowest_scope_name: + self.unique_name_to_scoped_name[node.debugName] = ( + # pyrefly: ignore [unsupported-operation] + self.shallowest_scope_name + "/" + node.debugName + ) + + # replace name + for key, node in self.nodes_io.items(): + self.nodes_io[key].inputs = [ + self.unique_name_to_scoped_name[node_input_id] + for node_input_id in node.inputs + ] + if node.debugName in self.unique_name_to_scoped_name: + self.nodes_io[key].debugName = self.unique_name_to_scoped_name[ + node.debugName + ] + + def to_proto(self): + """Convert graph representation of GraphPy object to TensorBoard required format.""" + # TODO: compute correct memory usage and CPU time once + # PyTorch supports it + nodes = [ + node_proto( + v.debugName, + input=v.inputs, + outputsize=v.tensor_size, + op=v.kind, + attributes=v.attributes, + ) + for v in self.nodes_io.values() + ] + return nodes + + +def parse(graph, trace, args=None, omit_useless_nodes=True): + """Parse an optimized PyTorch model graph and produces a list of nodes and node stats. + + Useful for eventual conversion to TensorBoard protobuf format. + + Args: + graph (PyTorch module): The model graph to be parsed. + trace (PyTorch JIT TracedModule): The model trace to be parsed. + args (tuple): input tensor[s] for the model. + omit_useless_nodes (boolean): Whether to remove nodes from the graph. + """ + nodes_py = GraphPy() + for node in graph.inputs(): + if omit_useless_nodes: + if ( + len(node.uses()) == 0 + ): # number of user of the node (= number of outputs/ fanout) + continue + + if node.type().kind() != CLASSTYPE_KIND: + nodes_py.append(NodePyIO(node, "input")) + + attr_to_scope: dict[Any, str] = {} + for node in graph.nodes(): + if node.kind() == GETATTR_KIND: + attr_name = node.s("name") + attr_key = node.output().debugName() + parent = node.input().node() + if ( + parent.kind() == GETATTR_KIND + ): # If the parent node is not the top-level "self" node + parent_attr_key = parent.output().debugName() + parent_scope = attr_to_scope[parent_attr_key] + attr_scope = parent_scope.split("/")[-1] + attr_to_scope[attr_key] = f"{parent_scope}/{attr_scope}.{attr_name}" + else: + attr_to_scope[attr_key] = f"__module.{attr_name}" + # We don't need classtype nodes; scope will provide this information + if node.output().type().kind() != CLASSTYPE_KIND: + node_py = NodePyOP(node) + node_py.scopeName = attr_to_scope[attr_key] # type: ignore[attr-defined] + nodes_py.append(node_py) + else: + nodes_py.append(NodePyOP(node)) + + for i, node in enumerate(graph.outputs()): # Create sink nodes for output ops + node_pyio = NodePyIO(node, "output") + node_pyio.debugName = f"output.{i + 1}" + node_pyio.inputs = [node.debugName()] + nodes_py.append(node_pyio) + + def parse_traced_name(module): + if isinstance(module, torch.jit.TracedModule): + module_name = module._name + else: + module_name = getattr(module, "original_name", "Module") + return module_name + + alias_to_name = {} + base_name = parse_traced_name(trace) + for name, module in trace.named_modules(prefix="__module"): + mod_name = parse_traced_name(module) + attr_name = name.split(".")[-1] + alias_to_name[name] = f"{mod_name}[{attr_name}]" + + for node in nodes_py.nodes_op: + module_aliases = node.scopeName.split("/") + replacements = [ + alias_to_name[alias] if alias in alias_to_name else alias.split(".")[-1] + for alias in module_aliases + ] + node.scopeName = base_name + if any(replacements): + node.scopeName += "/" + "/".join(replacements) + + nodes_py.populate_namespace_from_OP_to_IO() + return nodes_py.to_proto() + + +def graph(model, args, verbose=False, use_strict_trace=True): + """ + Process a PyTorch model and produces a `GraphDef` proto that can be logged to TensorBoard. + + Args: + model (PyTorch module): The model to be parsed. + args (tuple): input tensor[s] for the model. + verbose (bool): Whether to print out verbose information while + processing. + use_strict_trace (bool): Whether to pass keyword argument `strict` to + `torch.jit.trace`. Pass False when you want the tracer to + record your mutable container types (list, dict) + """ + with _set_model_to_eval(model): + try: + trace = torch.jit.trace(model, args, strict=use_strict_trace) + graph = trace.graph + torch._C._jit_pass_inline(graph) + except RuntimeError as e: + print(e) + print("Error occurs, No graph saved") + raise e + + if verbose: + print(graph) + list_of_nodes = parse(graph, trace, args) + # We are hardcoding that this was run on CPU even though it might have actually + # run on GPU. Note this is what is shown in TensorBoard and has no bearing + # on actual execution. + # TODO: See if we can extract GPU vs CPU information from the PyTorch model + # and pass it correctly to TensorBoard. + # + # Definition of StepStats and DeviceStepStats can be found at + # https://github.com/tensorflow/tensorboard/blob/master/tensorboard/plugins/graph/tf_graph_common/proto.ts + # and + # https://github.com/tensorflow/tensorboard/blob/master/tensorboard/compat/proto/step_stats.proto + stepstats = RunMetadata( + step_stats=StepStats(dev_stats=[DeviceStepStats(device="/device:CPU:0")]) + ) + return GraphDef(node=list_of_nodes, versions=VersionDef(producer=22)), stepstats + # The producer version has been reverse engineered from standard + # TensorBoard logged data. + + +@contextlib.contextmanager +def _set_model_to_eval(model): + """Context manager to temporarily set the training mode of ``model`` to eval.""" + if not isinstance(model, torch.jit.ScriptFunction): + originally_training = model.training + model.train(False) + try: + yield + finally: + model.train(originally_training) + else: + # Do nothing for ScriptFunction + try: + yield + finally: + pass + + +def _node_get(node: torch._C.Node, key: str): + """Get attributes of a node which is polymorphic over return type.""" + sel = node.kindOf(key) + return getattr(node, sel)(key) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/tensorboard/_utils.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/tensorboard/_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..1bafc22183afbce001c8db20bd62f35cbcc2a663 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/tensorboard/_utils.py @@ -0,0 +1,131 @@ +# mypy: allow-untyped-defs +import numpy as np +import numpy.typing as npt + + +# Functions for converting +def figure_to_image(figures, close=True): + """Render matplotlib figure to numpy format. + + Note that this requires the ``matplotlib`` package. + + Args: + figures (matplotlib.pyplot.figure or list of figures): figure or a list of figures + close (bool): Flag to automatically close the figure + + Returns: + numpy.array: image in [CHW] order + """ + import matplotlib.pyplot as plt + import matplotlib.backends.backend_agg as plt_backend_agg + + def render_to_rgb(figure): + canvas = plt_backend_agg.FigureCanvasAgg(figure) + canvas.draw() + data: npt.NDArray = np.frombuffer(canvas.buffer_rgba(), dtype=np.uint8) + w, h = figure.canvas.get_width_height() + image_hwc = data.reshape([h, w, 4])[:, :, 0:3] + image_chw = np.moveaxis(image_hwc, source=2, destination=0) + if close: + plt.close(figure) + return image_chw + + if isinstance(figures, list): + images = [render_to_rgb(figure) for figure in figures] + return np.stack(images) + else: + image = render_to_rgb(figures) + return image + + +def _prepare_video(V): + """ + Convert a 5D tensor into 4D tensor. + + Convesrion is done from [batchsize, time(frame), channel(color), height, width] (5D tensor) + to [time(frame), new_width, new_height, channel] (4D tensor). + + A batch of images are spread to a grid, which forms a frame. + e.g. Video with batchsize 16 will have a 4x4 grid. + """ + b, t, c, h, w = V.shape + + if V.dtype == np.uint8: + V = np.float32(V) / 255.0 + + def is_power2(num): + return num != 0 and ((num & (num - 1)) == 0) + + # pad to nearest power of 2, all at once + # pyrefly: ignore [index-error] + if not is_power2(V.shape[0]): + # pyrefly: ignore [index-error] + len_addition = int(2 ** V.shape[0].bit_length() - V.shape[0]) + V = np.concatenate((V, np.zeros(shape=(len_addition, t, c, h, w))), axis=0) + + n_rows = 2 ** ((b.bit_length() - 1) // 2) + # pyrefly: ignore [index-error] + n_cols = V.shape[0] // n_rows + + V = np.reshape(V, (n_rows, n_cols, t, c, h, w)) + V = np.transpose(V, axes=(2, 0, 4, 1, 5, 3)) + V = np.reshape(V, (t, n_rows * h, n_cols * w, c)) + + return V + + +def make_grid(I, ncols=8): + # I: N1HW or N3HW + if not isinstance(I, np.ndarray): + raise AssertionError("plugin error, should pass numpy array here") + if I.shape[1] == 1: + I = np.concatenate([I, I, I], 1) + if I.ndim != 4 or I.shape[1] != 3: + raise AssertionError("Input should be a 4D numpy array with 3 channels") + nimg = I.shape[0] + H = I.shape[2] + W = I.shape[3] + ncols = min(nimg, ncols) + nrows = int(np.ceil(float(nimg) / ncols)) + canvas = np.zeros((3, H * nrows, W * ncols), dtype=I.dtype) + i = 0 + for y in range(nrows): + for x in range(ncols): + if i >= nimg: + break + canvas[:, y * H : (y + 1) * H, x * W : (x + 1) * W] = I[i] + i = i + 1 + return canvas + + # if modality == 'IMG': + # if x.dtype == np.uint8: + # x = x.astype(np.float32) / 255.0 + + +def convert_to_HWC(tensor, input_format): # tensor: numpy array + if len(set(input_format)) != len(input_format): + raise AssertionError(f"You can not use the same dimension shordhand twice. \ + input_format: {input_format}") + if len(tensor.shape) != len(input_format): + raise AssertionError(f"size of input tensor and input format are different. \ + tensor shape: {tensor.shape}, input_format: {input_format}") + input_format = input_format.upper() + + if len(input_format) == 4: + index = [input_format.find(c) for c in "NCHW"] + tensor_NCHW = tensor.transpose(index) + tensor_CHW = make_grid(tensor_NCHW) + return tensor_CHW.transpose(1, 2, 0) + + if len(input_format) == 3: + index = [input_format.find(c) for c in "HWC"] + tensor_HWC = tensor.transpose(index) + if tensor_HWC.shape[2] == 1: + tensor_HWC = np.concatenate([tensor_HWC, tensor_HWC, tensor_HWC], 2) + return tensor_HWC + + if len(input_format) == 2: + index = [input_format.find(c) for c in "HW"] + tensor = tensor.transpose(index) + tensor = np.stack([tensor, tensor, tensor], 2) + return tensor diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/tensorboard/summary.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/tensorboard/summary.py new file mode 100644 index 0000000000000000000000000000000000000000..3e538ddc4c02d9f26d80e653eb57e66ae7146ed4 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/tensorboard/summary.py @@ -0,0 +1,1032 @@ +# mypy: allow-untyped-defs +import json +import logging +import struct + +from typing import Any + +import torch +import numpy as np + + +from google.protobuf import struct_pb2 + +from tensorboard.compat.proto.summary_pb2 import ( + HistogramProto, + Summary, + SummaryMetadata, +) +from tensorboard.compat.proto.tensor_pb2 import TensorProto +from tensorboard.compat.proto.tensor_shape_pb2 import TensorShapeProto +from tensorboard.plugins.custom_scalar import layout_pb2 +from tensorboard.plugins.pr_curve.plugin_data_pb2 import PrCurvePluginData +from tensorboard.plugins.text.plugin_data_pb2 import TextPluginData + +from ._convert_np import make_np +from ._utils import _prepare_video, convert_to_HWC + +__all__ = [ + "half_to_int", + "int_to_half", + "hparams", + "scalar", + "histogram_raw", + "histogram", + "make_histogram", + "image", + "image_boxes", + "draw_boxes", + "make_image", + "video", + "make_video", + "audio", + "custom_scalars", + "text", + "tensor_proto", + "pr_curve_raw", + "pr_curve", + "compute_curve", + "mesh", +] + +logger = logging.getLogger(__name__) + +def half_to_int(f: float) -> int: + """Casts a half-precision float value into an integer. + + Converts a half precision floating point value, such as `torch.half` or + `torch.bfloat16`, into an integer value which can be written into the + half_val field of a TensorProto for storage. + + To undo the effects of this conversion, use int_to_half(). + + """ + buf = struct.pack("f", f) + return struct.unpack("i", buf)[0] + +def int_to_half(i: int) -> float: + """Casts an integer value to a half-precision float. + + Converts an integer value obtained from half_to_int back into a floating + point value. + + """ + buf = struct.pack("i", i) + return struct.unpack("f", buf)[0] + +def _tensor_to_half_val(t: torch.Tensor) -> list[int]: + return [half_to_int(x) for x in t.flatten().tolist()] + +def _tensor_to_complex_val(t: torch.Tensor) -> list[float]: + return torch.view_as_real(t).flatten().tolist() + +def _tensor_to_list(t: torch.Tensor) -> list[Any]: + return t.flatten().tolist() + +# type maps: torch.Tensor type -> (protobuf type, protobuf val field) +_TENSOR_TYPE_MAP = { + torch.half: ("DT_HALF", "half_val", _tensor_to_half_val), + torch.float16: ("DT_HALF", "half_val", _tensor_to_half_val), + torch.bfloat16: ("DT_BFLOAT16", "half_val", _tensor_to_half_val), + torch.float32: ("DT_FLOAT", "float_val", _tensor_to_list), + torch.float: ("DT_FLOAT", "float_val", _tensor_to_list), + torch.float64: ("DT_DOUBLE", "double_val", _tensor_to_list), + torch.double: ("DT_DOUBLE", "double_val", _tensor_to_list), + torch.int8: ("DT_INT8", "int_val", _tensor_to_list), + torch.uint8: ("DT_UINT8", "int_val", _tensor_to_list), + torch.qint8: ("DT_UINT8", "int_val", _tensor_to_list), + torch.int16: ("DT_INT16", "int_val", _tensor_to_list), + torch.short: ("DT_INT16", "int_val", _tensor_to_list), + torch.int: ("DT_INT32", "int_val", _tensor_to_list), + torch.int32: ("DT_INT32", "int_val", _tensor_to_list), + torch.qint32: ("DT_INT32", "int_val", _tensor_to_list), + torch.int64: ("DT_INT64", "int64_val", _tensor_to_list), + torch.complex32: ("DT_COMPLEX32", "scomplex_val", _tensor_to_complex_val), + torch.chalf: ("DT_COMPLEX32", "scomplex_val", _tensor_to_complex_val), + torch.complex64: ("DT_COMPLEX64", "scomplex_val", _tensor_to_complex_val), + torch.cfloat: ("DT_COMPLEX64", "scomplex_val", _tensor_to_complex_val), + torch.bool: ("DT_BOOL", "bool_val", _tensor_to_list), + torch.complex128: ("DT_COMPLEX128", "dcomplex_val", _tensor_to_complex_val), + torch.cdouble: ("DT_COMPLEX128", "dcomplex_val", _tensor_to_complex_val), + torch.uint8: ("DT_UINT8", "uint32_val", _tensor_to_list), + torch.quint8: ("DT_UINT8", "uint32_val", _tensor_to_list), + torch.quint4x2: ("DT_UINT8", "uint32_val", _tensor_to_list), +} + + +def _calc_scale_factor(tensor) -> int: + converted = tensor.numpy() if not isinstance(tensor, np.ndarray) else tensor + return 1 if converted.dtype == np.uint8 else 255 + + +def _draw_single_box( + image, + xmin, + ymin, + xmax, + ymax, + display_str, + color="black", + color_text="black", + thickness=2, +): + from PIL import ImageDraw, ImageFont + + font = ImageFont.load_default() + draw = ImageDraw.Draw(image) + (left, right, top, bottom) = (xmin, xmax, ymin, ymax) + draw.line( + [(left, top), (left, bottom), (right, bottom), (right, top), (left, top)], + width=thickness, + fill=color, + ) + if display_str: + text_bottom = bottom + # Reverse list and print from bottom to top. + _left, _top, _right, _bottom = font.getbbox(display_str) + text_width, text_height = _right - _left, _bottom - _top + margin = np.ceil(0.05 * text_height) + draw.rectangle( + [ + (left, text_bottom - text_height - 2 * margin), + (left + text_width, text_bottom), + ], + fill=color, + ) + draw.text( + (left + margin, text_bottom - text_height - margin), + display_str, + fill=color_text, + font=font, + ) + return image + + +def hparams(hparam_dict=None, metric_dict=None, hparam_domain_discrete=None): + """Output three `Summary` protocol buffers needed by hparams plugin. + + `Experiment` keeps the metadata of an experiment, such as the name of the + hyperparameters and the name of the metrics. + `SessionStartInfo` keeps key-value pairs of the hyperparameters + `SessionEndInfo` describes status of the experiment e.g. STATUS_SUCCESS + + Args: + hparam_dict: A dictionary that contains names of the hyperparameters + and their values. + metric_dict: A dictionary that contains names of the metrics + and their values. + hparam_domain_discrete: (Optional[Dict[str, List[Any]]]) A dictionary that + contains names of the hyperparameters and all discrete values they can hold + + Returns: + The `Summary` protobufs for Experiment, SessionStartInfo and + SessionEndInfo + """ + import torch + from tensorboard.plugins.hparams.api_pb2 import ( + DataType, + Experiment, + HParamInfo, + MetricInfo, + MetricName, + Status, + ) + from tensorboard.plugins.hparams.metadata import ( + EXPERIMENT_TAG, + PLUGIN_DATA_VERSION, + PLUGIN_NAME, + SESSION_END_INFO_TAG, + SESSION_START_INFO_TAG, + ) + from tensorboard.plugins.hparams.plugin_data_pb2 import ( + HParamsPluginData, + SessionEndInfo, + SessionStartInfo, + ) + + # TODO: expose other parameters in the future. + # hp = HParamInfo(name='lr',display_name='learning rate', + # type=DataType.DATA_TYPE_FLOAT64, domain_interval=Interval(min_value=10, + # max_value=100)) + # mt = MetricInfo(name=MetricName(tag='accuracy'), display_name='accuracy', + # description='', dataset_type=DatasetType.DATASET_VALIDATION) + # exp = Experiment(name='123', description='456', time_created_secs=100.0, + # hparam_infos=[hp], metric_infos=[mt], user='tw') + + if not isinstance(hparam_dict, dict): + logger.warning("parameter: hparam_dict should be a dictionary, nothing logged.") + raise TypeError( + "parameter: hparam_dict should be a dictionary, nothing logged." + ) + if not isinstance(metric_dict, dict): + logger.warning("parameter: metric_dict should be a dictionary, nothing logged.") + raise TypeError( + "parameter: metric_dict should be a dictionary, nothing logged." + ) + + hparam_domain_discrete = hparam_domain_discrete or {} + if not isinstance(hparam_domain_discrete, dict): + raise TypeError( + "parameter: hparam_domain_discrete should be a dictionary, nothing logged." + ) + for k, v in hparam_domain_discrete.items(): + if ( + k not in hparam_dict + or not isinstance(v, list) + or not all(isinstance(d, type(hparam_dict[k])) for d in v) + ): + raise TypeError( + f"parameter: hparam_domain_discrete[{k}] should be a list of same type as hparam_dict[{k}]." + ) + hps = [] + + ssi = SessionStartInfo() + for k, v in hparam_dict.items(): + if v is None: + continue + if isinstance(v, (int, float)): + ssi.hparams[k].number_value = v + + if k in hparam_domain_discrete: + domain_discrete: struct_pb2.ListValue | None = struct_pb2.ListValue( + values=[ + struct_pb2.Value(number_value=d) + for d in hparam_domain_discrete[k] + ] + ) + else: + domain_discrete = None + + hps.append( + HParamInfo( + name=k, + # pyrefly: ignore [missing-attribute] + type=DataType.Value("DATA_TYPE_FLOAT64"), + domain_discrete=domain_discrete, + ) + ) + continue + + if isinstance(v, str): + ssi.hparams[k].string_value = v + + if k in hparam_domain_discrete: + domain_discrete = struct_pb2.ListValue( + values=[ + struct_pb2.Value(string_value=d) + for d in hparam_domain_discrete[k] + ] + ) + else: + domain_discrete = None + + hps.append( + HParamInfo( + name=k, + # pyrefly: ignore [missing-attribute] + type=DataType.Value("DATA_TYPE_STRING"), + domain_discrete=domain_discrete, + ) + ) + continue + + if isinstance(v, bool): + ssi.hparams[k].bool_value = v + + if k in hparam_domain_discrete: + domain_discrete = struct_pb2.ListValue( + values=[ + struct_pb2.Value(bool_value=d) + for d in hparam_domain_discrete[k] + ] + ) + else: + domain_discrete = None + + hps.append( + HParamInfo( + name=k, + # pyrefly: ignore [missing-attribute] + type=DataType.Value("DATA_TYPE_BOOL"), + domain_discrete=domain_discrete, + ) + ) + continue + + if isinstance(v, torch.Tensor): + v = make_np(v)[0] + ssi.hparams[k].number_value = v + # pyrefly: ignore [missing-attribute] + hps.append(HParamInfo(name=k, type=DataType.Value("DATA_TYPE_FLOAT64"))) + continue + raise ValueError( + "value should be one of int, float, str, bool, or torch.Tensor" + ) + + content = HParamsPluginData(session_start_info=ssi, version=PLUGIN_DATA_VERSION) + smd = SummaryMetadata( + # pyrefly: ignore [missing-attribute] + plugin_data=SummaryMetadata.PluginData( + plugin_name=PLUGIN_NAME, content=content.SerializeToString() + ) + ) + # pyrefly: ignore [missing-attribute] + ssi = Summary(value=[Summary.Value(tag=SESSION_START_INFO_TAG, metadata=smd)]) + + mts = [MetricInfo(name=MetricName(tag=k)) for k in metric_dict] + + exp = Experiment(hparam_infos=hps, metric_infos=mts) + + content = HParamsPluginData(experiment=exp, version=PLUGIN_DATA_VERSION) + smd = SummaryMetadata( + # pyrefly: ignore [missing-attribute] + plugin_data=SummaryMetadata.PluginData( + plugin_name=PLUGIN_NAME, content=content.SerializeToString() + ) + ) + # pyrefly: ignore [missing-attribute] + exp = Summary(value=[Summary.Value(tag=EXPERIMENT_TAG, metadata=smd)]) + + # pyrefly: ignore [missing-attribute] + sei = SessionEndInfo(status=Status.Value("STATUS_SUCCESS")) + content = HParamsPluginData(session_end_info=sei, version=PLUGIN_DATA_VERSION) + smd = SummaryMetadata( + # pyrefly: ignore [missing-attribute] + plugin_data=SummaryMetadata.PluginData( + plugin_name=PLUGIN_NAME, content=content.SerializeToString() + ) + ) + # pyrefly: ignore [missing-attribute] + sei = Summary(value=[Summary.Value(tag=SESSION_END_INFO_TAG, metadata=smd)]) + + return exp, ssi, sei + + +def scalar(name, tensor, collections=None, new_style=False, double_precision=False): + """Output a `Summary` protocol buffer containing a single scalar value. + + The generated Summary has a Tensor.proto containing the input Tensor. + Args: + name: A name for the generated node. Will also serve as the series name in + TensorBoard. + tensor: A real numeric Tensor containing a single value. + collections: Optional list of graph collections keys. The new summary op is + added to these collections. Defaults to `[GraphKeys.SUMMARIES]`. + new_style: Whether to use new style (tensor field) or old style (simple_value + field). New style could lead to faster data loading. + Returns: + A scalar `Tensor` of type `string`. Which contains a `Summary` protobuf. + Raises: + ValueError: If tensor has the wrong shape or type. + """ + tensor = make_np(tensor).squeeze() + if tensor.ndim != 0: + raise AssertionError(f"Tensor should contain one element (0 dimensions). \ + Was given size: {tensor.size} and {tensor.ndim} dimensions.") + # python float is double precision in numpy + scalar = float(tensor) + if new_style: + tensor_proto = TensorProto(float_val=[scalar], dtype="DT_FLOAT") + if double_precision: + tensor_proto = TensorProto(double_val=[scalar], dtype="DT_DOUBLE") + + # pyrefly: ignore [missing-attribute] + plugin_data = SummaryMetadata.PluginData(plugin_name="scalars") + smd = SummaryMetadata(plugin_data=plugin_data) + return Summary( + value=[ + # pyrefly: ignore [missing-attribute] + Summary.Value( + tag=name, + tensor=tensor_proto, + metadata=smd, + ) + ] + ) + else: + # pyrefly: ignore [missing-attribute] + return Summary(value=[Summary.Value(tag=name, simple_value=scalar)]) + + +def tensor_proto(tag, tensor): + """Outputs a `Summary` protocol buffer containing the full tensor. + The generated Summary has a Tensor.proto containing the input Tensor. + Args: + tag: A name for the generated node. Will also serve as the series name in + TensorBoard. + tensor: Tensor to be converted to protobuf + Returns: + A tensor protobuf in a `Summary` protobuf. + Raises: + ValueError: If tensor is too big to be converted to protobuf, or + tensor data type is not supported + """ + if tensor.numel() * tensor.itemsize >= (1 << 31): + raise ValueError( + "tensor is bigger than protocol buffer's hard limit of 2GB in size" + ) + + if tensor.dtype in _TENSOR_TYPE_MAP: + dtype, field_name, conversion_fn = _TENSOR_TYPE_MAP[tensor.dtype] + tensor_proto = TensorProto( + **{ + "dtype": dtype, + "tensor_shape": TensorShapeProto( + # pyrefly: ignore [missing-attribute] + dim=[TensorShapeProto.Dim(size=x) for x in tensor.shape] + ), + field_name: conversion_fn(tensor), + }, + ) + else: + raise ValueError(f"{tag} has unsupported tensor dtype {tensor.dtype}") + + # pyrefly: ignore [missing-attribute] + plugin_data = SummaryMetadata.PluginData(plugin_name="tensor") + smd = SummaryMetadata(plugin_data=plugin_data) + # pyrefly: ignore [missing-attribute] + return Summary(value=[Summary.Value(tag=tag, metadata=smd, tensor=tensor_proto)]) + + +def histogram_raw(name, min, max, num, sum, sum_squares, bucket_limits, bucket_counts): + # pylint: disable=line-too-long + """Output a `Summary` protocol buffer with a histogram. + + The generated + [`Summary`](https://www.tensorflow.org/code/tensorflow/core/framework/summary.proto) + has one summary value containing a histogram for `values`. + Args: + name: A name for the generated node. Will also serve as a series name in + TensorBoard. + min: A float or int min value + max: A float or int max value + num: Int number of values + sum: Float or int sum of all values + sum_squares: Float or int sum of squares for all values + bucket_limits: A numeric `Tensor` with upper value per bucket + bucket_counts: A numeric `Tensor` with number of values per bucket + Returns: + A scalar `Tensor` of type `string`. The serialized `Summary` protocol + buffer. + """ + hist = HistogramProto( + min=min, + max=max, + num=num, + sum=sum, + sum_squares=sum_squares, + bucket_limit=bucket_limits, + bucket=bucket_counts, + ) + # pyrefly: ignore [missing-attribute] + return Summary(value=[Summary.Value(tag=name, histo=hist)]) + + +def histogram(name, values, bins, max_bins=None): + # pylint: disable=line-too-long + """Output a `Summary` protocol buffer with a histogram. + + The generated + [`Summary`](https://www.tensorflow.org/code/tensorflow/core/framework/summary.proto) + has one summary value containing a histogram for `values`. + This op reports an `InvalidArgument` error if any value is not finite. + Args: + name: A name for the generated node. Will also serve as a series name in + TensorBoard. + values: A real numeric `Tensor`. Any shape. Values to use to + build the histogram. + Returns: + A scalar `Tensor` of type `string`. The serialized `Summary` protocol + buffer. + """ + values = make_np(values) + hist = make_histogram(values.astype(float), bins, max_bins) + # pyrefly: ignore [missing-attribute] + return Summary(value=[Summary.Value(tag=name, histo=hist)]) + + +def make_histogram(values, bins, max_bins=None): + """Convert values into a histogram proto using logic from histogram.cc.""" + if values.size == 0: + raise ValueError("The input has no element.") + values = values.reshape(-1) + counts, limits = np.histogram(values, bins=bins) + num_bins = len(counts) + if max_bins is not None and num_bins > max_bins: + subsampling = num_bins // max_bins + subsampling_remainder = num_bins % subsampling + if subsampling_remainder != 0: + # pyrefly: ignore [no-matching-overload] + counts = np.pad( + counts, + pad_width=[[0, subsampling - subsampling_remainder]], + mode="constant", + constant_values=0, + ) + counts = counts.reshape(-1, subsampling).sum(axis=-1) + new_limits = np.empty((counts.size + 1,), limits.dtype) + new_limits[:-1] = limits[:-1:subsampling] + new_limits[-1] = limits[-1] + limits = new_limits + + # Find the first and the last bin defining the support of the histogram: + + cum_counts = np.cumsum(np.greater(counts, 0)) + start, end = np.searchsorted(cum_counts, [0, cum_counts[-1] - 1], side="right") + start = int(start) + end = int(end) + 1 + del cum_counts + + # TensorBoard only includes the right bin limits. To still have the leftmost limit + # included, we include an empty bin left. + # If start == 0, we need to add an empty one left, otherwise we can just include the bin left to the + # first nonzero-count bin: + counts = ( + counts[start - 1 : end] if start > 0 else np.concatenate([[0], counts[:end]]) + ) + limits = limits[start : end + 1] + + if counts.size == 0 or limits.size == 0: + raise ValueError("The histogram is empty, please file a bug report.") + + sum_sq = values.dot(values) + return HistogramProto( + min=values.min(), + max=values.max(), + num=len(values), + sum=values.sum(), + sum_squares=sum_sq, + bucket_limit=limits.tolist(), + bucket=counts.tolist(), + ) + + +def image(tag, tensor, rescale=1, dataformats="NCHW"): + """Output a `Summary` protocol buffer with images. + + The summary has up to `max_images` summary values containing images. The + images are built from `tensor` which must be 3-D with shape `[height, width, + channels]` and where `channels` can be: + * 1: `tensor` is interpreted as Grayscale. + * 3: `tensor` is interpreted as RGB. + * 4: `tensor` is interpreted as RGBA. + The `name` in the outputted Summary.Value protobufs is generated based on the + name, with a suffix depending on the max_outputs setting: + * If `max_outputs` is 1, the summary value tag is '*name*/image'. + * If `max_outputs` is greater than 1, the summary value tags are + generated sequentially as '*name*/image/0', '*name*/image/1', etc. + Args: + tag: A name for the generated node. Will also serve as a series name in + TensorBoard. + tensor: A 3-D `uint8` or `float32` `Tensor` of shape `[height, width, + channels]` where `channels` is 1, 3, or 4. + 'tensor' can either have values in [0, 1] (float32) or [0, 255] (uint8). + The image() function will scale the image values to [0, 255] by applying + a scale factor of either 1 (uint8) or 255 (float32). Out-of-range values + will be clipped. + Returns: + A scalar `Tensor` of type `string`. The serialized `Summary` protocol + buffer. + """ + tensor = make_np(tensor) + tensor = convert_to_HWC(tensor, dataformats) + # Do not assume that user passes in values in [0, 255], use data type to detect + scale_factor = _calc_scale_factor(tensor) + tensor = tensor.astype(np.float32) + tensor = (tensor * scale_factor).clip(0, 255).astype(np.uint8) + image = make_image(tensor, rescale=rescale) + # pyrefly: ignore [missing-attribute] + return Summary(value=[Summary.Value(tag=tag, image=image)]) + + +def image_boxes( + tag, tensor_image, tensor_boxes, rescale=1, dataformats="CHW", labels=None +): + """Output a `Summary` protocol buffer with images.""" + tensor_image = make_np(tensor_image) + tensor_image = convert_to_HWC(tensor_image, dataformats) + tensor_boxes = make_np(tensor_boxes) + tensor_image = tensor_image.astype(np.float32) * _calc_scale_factor(tensor_image) + image = make_image( + tensor_image.clip(0, 255).astype(np.uint8), + rescale=rescale, + rois=tensor_boxes, + labels=labels, + ) + # pyrefly: ignore [missing-attribute] + return Summary(value=[Summary.Value(tag=tag, image=image)]) + + +def draw_boxes(disp_image, boxes, labels=None): + # xyxy format + num_boxes = boxes.shape[0] + list_gt = range(num_boxes) + for i in list_gt: + disp_image = _draw_single_box( + disp_image, + boxes[i, 0], + boxes[i, 1], + boxes[i, 2], + boxes[i, 3], + display_str=None if labels is None else labels[i], + color="Red", + ) + return disp_image + + +def make_image(tensor, rescale=1, rois=None, labels=None): + """Convert a numpy representation of an image to Image protobuf.""" + from PIL import Image + + height, width, channel = tensor.shape + scaled_height = int(height * rescale) + scaled_width = int(width * rescale) + image = Image.fromarray(tensor) + if rois is not None: + image = draw_boxes(image, rois, labels=labels) + ANTIALIAS = Image.Resampling.LANCZOS + image = image.resize((scaled_width, scaled_height), ANTIALIAS) + import io + + output = io.BytesIO() + image.save(output, format="PNG") + image_string = output.getvalue() + output.close() + # pyrefly: ignore [missing-attribute] + return Summary.Image( + height=height, + width=width, + colorspace=channel, + encoded_image_string=image_string, + ) + + +def video(tag, tensor, fps=4): + tensor = make_np(tensor) + tensor = _prepare_video(tensor) + # If user passes in uint8, then we don't need to rescale by 255 + scale_factor = _calc_scale_factor(tensor) + tensor = tensor.astype(np.float32) + tensor = (tensor * scale_factor).clip(0, 255).astype(np.uint8) + video = make_video(tensor, fps) + # pyrefly: ignore [missing-attribute] + return Summary(value=[Summary.Value(tag=tag, image=video)]) + + +def make_video(tensor, fps): + try: + import moviepy # noqa: F401 + except ImportError: + print("add_video needs package moviepy") + return + try: + from moviepy import editor as mpy + except ImportError: + print( + "moviepy is installed, but can't import moviepy.editor.", + "Some packages could be missing [imageio, requests]", + ) + return + import tempfile + + _t, h, w, c = tensor.shape + + # encode sequence of images into gif string + clip = mpy.ImageSequenceClip(list(tensor), fps=fps) + + with tempfile.NamedTemporaryFile(suffix=".gif") as f: + filename = f.name + try: # newer version of moviepy use logger instead of progress_bar argument. + clip.write_gif(filename, verbose=False, logger=None) + except TypeError: + try: # older version of moviepy does not support progress_bar argument. + clip.write_gif(filename, verbose=False, progress_bar=False) + except TypeError: + clip.write_gif(filename, verbose=False) + + f.seek(0) + tensor_string = f.read() + + # pyrefly: ignore [missing-attribute] + return Summary.Image( + height=h, width=w, colorspace=c, encoded_image_string=tensor_string + ) + + +def audio(tag, tensor, sample_rate=44100): + array = make_np(tensor) + array = array.squeeze() + if abs(array).max() > 1: + print("warning: audio amplitude out of range, auto clipped.") + array = array.clip(-1, 1) + if array.ndim != 1: + raise AssertionError("input tensor should be 1 dimensional.") + array = (array * np.iinfo(np.int16).max).astype(" 127: # weird, value > 127 breaks protobuf + num_thresholds = 127 + data = np.stack((tp, fp, tn, fn, precision, recall)) + pr_curve_plugin_data = PrCurvePluginData( + version=0, num_thresholds=num_thresholds + ).SerializeToString() + # pyrefly: ignore [missing-attribute] + plugin_data = SummaryMetadata.PluginData( + plugin_name="pr_curves", content=pr_curve_plugin_data + ) + smd = SummaryMetadata(plugin_data=plugin_data) + tensor = TensorProto( + dtype="DT_FLOAT", + float_val=data.reshape(-1).tolist(), + tensor_shape=TensorShapeProto( + dim=[ + # pyrefly: ignore [missing-attribute] + TensorShapeProto.Dim(size=data.shape[0]), + # pyrefly: ignore [missing-attribute] + TensorShapeProto.Dim(size=data.shape[1]), + ] + ), + ) + # pyrefly: ignore [missing-attribute] + return Summary(value=[Summary.Value(tag=tag, metadata=smd, tensor=tensor)]) + + +def pr_curve(tag, labels, predictions, num_thresholds=127, weights=None): + # weird, value > 127 breaks protobuf + num_thresholds = min(num_thresholds, 127) + data = compute_curve( + labels, predictions, num_thresholds=num_thresholds, weights=weights + ) + pr_curve_plugin_data = PrCurvePluginData( + version=0, num_thresholds=num_thresholds + ).SerializeToString() + # pyrefly: ignore [missing-attribute] + plugin_data = SummaryMetadata.PluginData( + plugin_name="pr_curves", content=pr_curve_plugin_data + ) + smd = SummaryMetadata(plugin_data=plugin_data) + tensor = TensorProto( + dtype="DT_FLOAT", + float_val=data.reshape(-1).tolist(), + tensor_shape=TensorShapeProto( + dim=[ + # pyrefly: ignore [missing-attribute] + TensorShapeProto.Dim(size=data.shape[0]), + # pyrefly: ignore [missing-attribute] + TensorShapeProto.Dim(size=data.shape[1]), + ] + ), + ) + # pyrefly: ignore [missing-attribute] + return Summary(value=[Summary.Value(tag=tag, metadata=smd, tensor=tensor)]) + + +# https://github.com/tensorflow/tensorboard/blob/master/tensorboard/plugins/pr_curve/summary.py +def compute_curve(labels, predictions, num_thresholds=None, weights=None): + _MINIMUM_COUNT = 1e-7 + + if weights is None: + weights = 1.0 + + # Compute bins of true positives and false positives. + # pyrefly: ignore [unsupported-operation] + bucket_indices = np.int32(np.floor(predictions * (num_thresholds - 1))) + float_labels = labels.astype(np.float64) + # pyrefly: ignore [unsupported-operation] + histogram_range = (0, num_thresholds - 1) + tp_buckets, _ = np.histogram( + bucket_indices, + # pyrefly: ignore [bad-argument-type] + bins=num_thresholds, + range=histogram_range, + weights=float_labels * weights, + ) + fp_buckets, _ = np.histogram( + bucket_indices, + # pyrefly: ignore [bad-argument-type] + bins=num_thresholds, + range=histogram_range, + weights=(1.0 - float_labels) * weights, + ) + + # Obtain the reverse cumulative sum. + tp = np.cumsum(tp_buckets[::-1])[::-1] + fp = np.cumsum(fp_buckets[::-1])[::-1] + tn = fp[0] - fp + fn = tp[0] - tp + precision = tp / np.maximum(_MINIMUM_COUNT, tp + fp) + recall = tp / np.maximum(_MINIMUM_COUNT, tp + fn) + return np.stack((tp, fp, tn, fn, precision, recall)) + + +def _get_tensor_summary( + name, display_name, description, tensor, content_type, components, json_config +): + """Create a tensor summary with summary metadata. + + Args: + name: Uniquely identifiable name of the summary op. Could be replaced by + combination of name and type to make it unique even outside of this + summary. + display_name: Will be used as the display name in TensorBoard. + Defaults to `name`. + description: A longform readable description of the summary data. Markdown + is supported. + tensor: Tensor to display in summary. + content_type: Type of content inside the Tensor. + components: Bitmask representing present parts (vertices, colors, etc.) that + belong to the summary. + json_config: A string, JSON-serialized dictionary of ThreeJS classes + configuration. + + Returns: + Tensor summary with metadata. + """ + import torch + from tensorboard.plugins.mesh import metadata + + tensor = torch.as_tensor(tensor) + + tensor_metadata = metadata.create_summary_metadata( + name, + display_name, + content_type, + components, + tensor.shape, + description, + json_config=json_config, + ) + + tensor = TensorProto( + dtype="DT_FLOAT", + float_val=tensor.reshape(-1).tolist(), + tensor_shape=TensorShapeProto( + dim=[ + # pyrefly: ignore [missing-attribute] + TensorShapeProto.Dim(size=tensor.shape[0]), + # pyrefly: ignore [missing-attribute] + TensorShapeProto.Dim(size=tensor.shape[1]), + # pyrefly: ignore [missing-attribute] + TensorShapeProto.Dim(size=tensor.shape[2]), + ] + ), + ) + + # pyrefly: ignore [missing-attribute] + tensor_summary = Summary.Value( + tag=metadata.get_instance_name(name, content_type), + tensor=tensor, + metadata=tensor_metadata, + ) + + return tensor_summary + + +def _get_json_config(config_dict): + """Parse and returns JSON string from python dictionary.""" + json_config = "{}" + if config_dict is not None: + json_config = json.dumps(config_dict, sort_keys=True) + return json_config + + +# https://github.com/tensorflow/tensorboard/blob/master/tensorboard/plugins/mesh/summary.py +def mesh( + tag, vertices, colors, faces, config_dict, display_name=None, description=None +): + """Output a merged `Summary` protocol buffer with a mesh/point cloud. + + Args: + tag: A name for this summary operation. + vertices: Tensor of shape `[dim_1, ..., dim_n, 3]` representing the 3D + coordinates of vertices. + faces: Tensor of shape `[dim_1, ..., dim_n, 3]` containing indices of + vertices within each triangle. + colors: Tensor of shape `[dim_1, ..., dim_n, 3]` containing colors for each + vertex. + display_name: If set, will be used as the display name in TensorBoard. + Defaults to `name`. + description: A longform readable description of the summary data. Markdown + is supported. + config_dict: Dictionary with ThreeJS classes names and configuration. + + Returns: + Merged summary for mesh/point cloud representation. + """ + from tensorboard.plugins.mesh import metadata + from tensorboard.plugins.mesh.plugin_data_pb2 import MeshPluginData + + json_config = _get_json_config(config_dict) + + summaries = [] + tensors = [ + # pyrefly: ignore [missing-attribute] + (vertices, MeshPluginData.VERTEX), + # pyrefly: ignore [missing-attribute] + (faces, MeshPluginData.FACE), + # pyrefly: ignore [missing-attribute] + (colors, MeshPluginData.COLOR), + ] + tensors = [tensor for tensor in tensors if tensor[0] is not None] + components = metadata.get_components_bitmask( + [content_type for (tensor, content_type) in tensors] + ) + + for tensor, content_type in tensors: + summaries.append( + _get_tensor_summary( + tag, + display_name, + description, + tensor, + content_type, + components, + json_config, + ) + ) + + return Summary(value=summaries) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/tensorboard/writer.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/tensorboard/writer.py new file mode 100644 index 0000000000000000000000000000000000000000..008ae59e94e6a5172907b39df7062752ca74c954 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/tensorboard/writer.py @@ -0,0 +1,1219 @@ +# mypy: allow-untyped-defs +"""Provide an API for writing protocol buffers to event files to be consumed by TensorBoard for visualization.""" + +import os +import time +from typing import TYPE_CHECKING, Union + +import torch + +if TYPE_CHECKING: + from matplotlib.figure import Figure +from tensorboard.compat import tf +from tensorboard.compat.proto import event_pb2 +from tensorboard.compat.proto.event_pb2 import Event, SessionLog +from tensorboard.plugins.projector.projector_config_pb2 import ProjectorConfig +from tensorboard.summary.writer.event_file_writer import EventFileWriter + +from ._convert_np import make_np +from ._embedding import get_embedding_info, make_mat, make_sprite, make_tsv, write_pbtxt +from ._onnx_graph import load_onnx_graph +from ._pytorch_graph import graph +from ._utils import figure_to_image +from .summary import ( + audio, + custom_scalars, + histogram, + histogram_raw, + hparams, + image, + image_boxes, + mesh, + pr_curve, + pr_curve_raw, + scalar, + tensor_proto, + text, + video, +) + +__all__ = ["FileWriter", "SummaryWriter"] + + +class FileWriter: + """Writes protocol buffers to event files to be consumed by TensorBoard. + + The `FileWriter` class provides a mechanism to create an event file in a + given directory and add summaries and events to it. The class updates the + file contents asynchronously. This allows a training program to call methods + to add data to the file directly from the training loop, without slowing down + training. + """ + + def __init__(self, log_dir, max_queue=10, flush_secs=120, filename_suffix="") -> None: + """Create a `FileWriter` and an event file. + + On construction the writer creates a new event file in `log_dir`. + The other arguments to the constructor control the asynchronous writes to + the event file. + + Args: + log_dir: A string. Directory where event file will be written. + max_queue: Integer. Size of the queue for pending events and + summaries before one of the 'add' calls forces a flush to disk. + Default is ten items. + flush_secs: Number. How often, in seconds, to flush the + pending events and summaries to disk. Default is every two minutes. + filename_suffix: A string. Suffix added to all event filenames + in the log_dir directory. More details on filename construction in + tensorboard.summary.writer.event_file_writer.EventFileWriter. + """ + # Sometimes PosixPath is passed in and we need to coerce it to + # a string in all cases + # TODO: See if we can remove this in the future if we are + # actually the ones passing in a PosixPath + log_dir = str(log_dir) + self.event_writer = EventFileWriter( + log_dir, max_queue, flush_secs, filename_suffix + ) + + def get_logdir(self): + """Return the directory where event file will be written.""" + return self.event_writer.get_logdir() + + def add_event(self, event, step=None, walltime=None) -> None: + """Add an event to the event file. + + Args: + event: An `Event` protocol buffer. + step: Number. Optional global step value for training process + to record with the event. + walltime: float. Optional walltime to override the default (current) + walltime (from time.time()) seconds after epoch + """ + event.wall_time = time.time() if walltime is None else walltime + if step is not None: + # Make sure step is converted from numpy or other formats + # since protobuf might not convert depending on version + event.step = int(step) + self.event_writer.add_event(event) + + def add_summary(self, summary, global_step=None, walltime=None) -> None: + """Add a `Summary` protocol buffer to the event file. + + This method wraps the provided summary in an `Event` protocol buffer + and adds it to the event file. + + Args: + summary: A `Summary` protocol buffer. + global_step: Number. Optional global step value for training process + to record with the summary. + walltime: float. Optional walltime to override the default (current) + walltime (from time.time()) seconds after epoch + """ + event = event_pb2.Event(summary=summary) + self.add_event(event, global_step, walltime) + + def add_graph(self, graph_profile, walltime=None) -> None: + """Add a `Graph` and step stats protocol buffer to the event file. + + Args: + graph_profile: A `Graph` and step stats protocol buffer. + walltime: float. Optional walltime to override the default (current) + walltime (from time.time()) seconds after epoch + """ + graph = graph_profile[0] + stepstats = graph_profile[1] + event = event_pb2.Event(graph_def=graph.SerializeToString()) + self.add_event(event, None, walltime) + + trm = event_pb2.TaggedRunMetadata( + tag="step1", run_metadata=stepstats.SerializeToString() + ) + event = event_pb2.Event(tagged_run_metadata=trm) + self.add_event(event, None, walltime) + + def add_onnx_graph(self, graph, walltime=None) -> None: + """Add a `Graph` protocol buffer to the event file. + + Args: + graph: A `Graph` protocol buffer. + walltime: float. Optional walltime to override the default (current) + _get_file_writerfrom time.time()) + """ + event = event_pb2.Event(graph_def=graph.SerializeToString()) + self.add_event(event, None, walltime) + + def flush(self) -> None: + """Flushes the event file to disk. + + Call this method to make sure that all pending events have been written to + disk. + """ + self.event_writer.flush() + + def close(self) -> None: + """Flushes the event file to disk and close the file. + + Call this method when you do not need the summary writer anymore. + """ + self.event_writer.close() + + def reopen(self) -> None: + """Reopens the EventFileWriter. + + Can be called after `close()` to add more events in the same directory. + The events will go into a new events file. + Does nothing if the EventFileWriter was not closed. + """ + # pyrefly: ignore [missing-attribute] + self.event_writer.reopen() + + +class SummaryWriter: + """Writes entries directly to event files in the log_dir to be consumed by TensorBoard. + + The `SummaryWriter` class provides a high-level API to create an event file + in a given directory and add summaries and events to it. The class updates the + file contents asynchronously. This allows a training program to call methods + to add data to the file directly from the training loop, without slowing down + training. + """ + + def __init__( + self, + log_dir=None, + comment="", + purge_step=None, + max_queue=10, + flush_secs=120, + filename_suffix="", + ) -> None: + """Create a `SummaryWriter` that will write out events and summaries to the event file. + + Args: + log_dir (str): Save directory location. Default is + runs/**CURRENT_DATETIME_HOSTNAME**, which changes after each run. + Use hierarchical folder structure to compare + between runs easily. e.g. pass in 'runs/exp1', 'runs/exp2', etc. + for each new experiment to compare across them. + comment (str): Comment log_dir suffix appended to the default + ``log_dir``. If ``log_dir`` is assigned, this argument has no effect. + purge_step (int): + When logging crashes at step :math:`T+X` and restarts at step :math:`T`, + any events whose global_step larger or equal to :math:`T` will be + purged and hidden from TensorBoard. + Note that crashed and resumed experiments should have the same ``log_dir``. + max_queue (int): Size of the queue for pending events and + summaries before one of the 'add' calls forces a flush to disk. + Default is ten items. + flush_secs (int): How often, in seconds, to flush the + pending events and summaries to disk. Default is every two minutes. + filename_suffix (str): Suffix added to all event filenames in + the log_dir directory. More details on filename construction in + tensorboard.summary.writer.event_file_writer.EventFileWriter. + + Examples:: + + from torch.utils.tensorboard import SummaryWriter + + # create a summary writer with automatically generated folder name. + writer = SummaryWriter() + # folder location: runs/May04_22-14-54_s-MacBook-Pro.local/ + + # create a summary writer using the specified folder name. + writer = SummaryWriter("my_experiment") + # folder location: my_experiment + + # create a summary writer with comment appended. + writer = SummaryWriter(comment="LR_0.1_BATCH_16") + # folder location: runs/May04_22-14-54_s-MacBook-Pro.localLR_0.1_BATCH_16/ + + """ + torch._C._log_api_usage_once("tensorboard.create.summarywriter") + if not log_dir: + import socket + from datetime import datetime + + current_time = datetime.now().strftime("%b%d_%H-%M-%S") + log_dir = os.path.join( + "runs", current_time + "_" + socket.gethostname() + comment + ) + self.log_dir = log_dir + self.purge_step = purge_step + self.max_queue = max_queue + self.flush_secs = flush_secs + self.filename_suffix = filename_suffix + + # Initialize the file writers, but they can be cleared out on close + # and recreated later as needed. + self.file_writer = self.all_writers = None + self._get_file_writer() + + # Create default bins for histograms, see generate_testdata.py in tensorflow/tensorboard + v = 1e-12 + buckets = [] + neg_buckets = [] + while v < 1e20: + # pyrefly: ignore [bad-argument-type] + buckets.append(v) + # pyrefly: ignore [bad-argument-type] + neg_buckets.append(-v) + v *= 1.1 + self.default_bins = neg_buckets[::-1] + [0] + buckets + + def _get_file_writer(self): + """Return the default FileWriter instance. Recreates it if closed.""" + if self.all_writers is None or self.file_writer is None: + # pyrefly: ignore [bad-assignment] + self.file_writer = FileWriter( + self.log_dir, self.max_queue, self.flush_secs, self.filename_suffix + ) + # pyrefly: ignore [bad-assignment, missing-attribute] + self.all_writers = {self.file_writer.get_logdir(): self.file_writer} + if self.purge_step is not None: + most_recent_step = self.purge_step + # pyrefly: ignore [missing-attribute] + self.file_writer.add_event( + Event(step=most_recent_step, file_version="brain.Event:2") + ) + # pyrefly: ignore [missing-attribute] + self.file_writer.add_event( + Event( + step=most_recent_step, + # pyrefly: ignore [missing-attribute] + session_log=SessionLog(status=SessionLog.START), + ) + ) + self.purge_step = None + return self.file_writer + + def get_logdir(self): + """Return the directory where event files will be written.""" + return self.log_dir + + def add_hparams( + self, + hparam_dict, + metric_dict, + hparam_domain_discrete=None, + run_name=None, + global_step=None, + ) -> None: + """Add a set of hyperparameters to be compared in TensorBoard. + + Args: + hparam_dict (dict): Each key-value pair in the dictionary is the + name of the hyper parameter and it's corresponding value. + The type of the value can be one of `bool`, `string`, `float`, + `int`, or `None`. + metric_dict (dict): Each key-value pair in the dictionary is the + name of the metric and it's corresponding value. Note that the key used + here should be unique in the tensorboard record. Otherwise the value + you added by ``add_scalar`` will be displayed in hparam plugin. In most + cases, this is unwanted. + hparam_domain_discrete: (Optional[Dict[str, List[Any]]]) A dictionary that + contains names of the hyperparameters and all discrete values they can hold + run_name (str): Name of the run, to be included as part of the logdir. + If unspecified, will use current timestamp. + global_step (int): Global step value to record + + Examples:: + + from torch.utils.tensorboard import SummaryWriter + with SummaryWriter() as w: + for i in range(5): + w.add_hparams({'lr': 0.1*i, 'bsize': i}, + {'hparam/accuracy': 10*i, 'hparam/loss': 10*i}) + + Expected result: + + .. image:: _static/img/tensorboard/add_hparam.png + :scale: 50 % + + """ + torch._C._log_api_usage_once("tensorboard.logging.add_hparams") + if type(hparam_dict) is not dict or type(metric_dict) is not dict: + raise TypeError("hparam_dict and metric_dict should be dictionary.") + exp, ssi, sei = hparams(hparam_dict, metric_dict, hparam_domain_discrete) + + if not run_name: + run_name = str(time.time()) + logdir = os.path.join(self._get_file_writer().get_logdir(), run_name) + with SummaryWriter(log_dir=logdir) as w_hp: + w_hp.file_writer.add_summary(exp, global_step) + w_hp.file_writer.add_summary(ssi, global_step) + w_hp.file_writer.add_summary(sei, global_step) + for k, v in metric_dict.items(): + w_hp.add_scalar(k, v, global_step) + + def add_scalar( + self, + tag, + scalar_value, + global_step=None, + walltime=None, + new_style=False, + double_precision=False, + ) -> None: + """Add scalar data to summary. + + Args: + tag (str): Data identifier + scalar_value (float or string/blobname): Value to save + global_step (int): Global step value to record + walltime (float): Optional override default walltime (time.time()) + with seconds after epoch of event + new_style (boolean): Whether to use new style (tensor field) or old + style (simple_value field). New style could lead to faster data loading. + Examples:: + + from torch.utils.tensorboard import SummaryWriter + writer = SummaryWriter() + x = range(100) + for i in x: + writer.add_scalar('y=2x', i * 2, i) + writer.close() + + Expected result: + + .. image:: _static/img/tensorboard/add_scalar.png + :scale: 50 % + + """ + torch._C._log_api_usage_once("tensorboard.logging.add_scalar") + + summary = scalar( + tag, scalar_value, new_style=new_style, double_precision=double_precision + ) + self._get_file_writer().add_summary(summary, global_step, walltime) + + def add_scalars(self, main_tag, tag_scalar_dict, global_step=None, walltime=None) -> None: + """Add many scalar data to summary. + + Args: + main_tag (str): The parent name for the tags + tag_scalar_dict (dict): Key-value pair storing the tag and corresponding values + global_step (int): Global step value to record + walltime (float): Optional override default walltime (time.time()) + seconds after epoch of event + + Examples:: + + from torch.utils.tensorboard import SummaryWriter + writer = SummaryWriter() + r = 5 + for i in range(100): + writer.add_scalars('run_14h', {'xsinx':i*np.sin(i/r), + 'xcosx':i*np.cos(i/r), + 'tanx': np.tan(i/r)}, i) + writer.close() + # This call adds three values to the same scalar plot with the tag + # 'run_14h' in TensorBoard's scalar section. + + Expected result: + + .. image:: _static/img/tensorboard/add_scalars.png + :scale: 50 % + + """ + torch._C._log_api_usage_once("tensorboard.logging.add_scalars") + walltime = time.time() if walltime is None else walltime + fw_logdir = self._get_file_writer().get_logdir() + for tag, scalar_value in tag_scalar_dict.items(): + fw_tag = fw_logdir + "/" + main_tag.replace("/", "_") + "_" + tag + if self.all_writers is None: + raise AssertionError("self.all_writers is None") + if fw_tag in self.all_writers: + fw = self.all_writers[fw_tag] + else: + fw = FileWriter( + fw_tag, self.max_queue, self.flush_secs, self.filename_suffix + ) + self.all_writers[fw_tag] = fw + fw.add_summary(scalar(main_tag, scalar_value), global_step, walltime) + + def add_tensor( + self, + tag, + tensor, + global_step=None, + walltime=None, + ) -> None: + """Add tensor data to summary. + + Args: + tag (str): Data identifier + tensor (torch.Tensor): tensor to save + global_step (int): Global step value to record + Examples:: + + from torch.utils.tensorboard import SummaryWriter + writer = SummaryWriter() + x = torch.tensor([1,2,3]) + writer.add_scalar('x', x) + writer.close() + + Expected result: + Summary::tensor::float_val [1,2,3] + ::tensor::shape [3] + ::tag 'x' + + """ + torch._C._log_api_usage_once("tensorboard.logging.add_tensor") + + summary = tensor_proto(tag, tensor) + self._get_file_writer().add_summary(summary, global_step, walltime) + + def add_histogram( + self, + tag, + values, + global_step=None, + bins="tensorflow", + walltime=None, + max_bins=None, + ) -> None: + """Add histogram to summary. + + Args: + tag (str): Data identifier + values (torch.Tensor, numpy.ndarray, or string/blobname): Values to build histogram + global_step (int): Global step value to record + bins (str): One of {'tensorflow','auto', 'fd', ...}. This determines how the bins are made. You can find + other options in: https://numpy.org/doc/stable/reference/generated/numpy.histogram.html + walltime (float): Optional override default walltime (time.time()) + seconds after epoch of event + + Examples:: + + from torch.utils.tensorboard import SummaryWriter + import numpy as np + writer = SummaryWriter() + for i in range(10): + x = np.random.random(1000) + writer.add_histogram('distribution centers', x + i, i) + writer.close() + + Expected result: + + .. image:: _static/img/tensorboard/add_histogram.png + :scale: 50 % + + """ + torch._C._log_api_usage_once("tensorboard.logging.add_histogram") + if isinstance(bins, str) and bins == "tensorflow": + bins = self.default_bins + self._get_file_writer().add_summary( + histogram(tag, values, bins, max_bins=max_bins), global_step, walltime + ) + + def add_histogram_raw( + self, + tag, + min, + max, + num, + sum, + sum_squares, + bucket_limits, + bucket_counts, + global_step=None, + walltime=None, + ) -> None: + """Add histogram with raw data. + + Args: + tag (str): Data identifier + min (float or int): Min value + max (float or int): Max value + num (int): Number of values + sum (float or int): Sum of all values + sum_squares (float or int): Sum of squares for all values + bucket_limits (torch.Tensor, numpy.ndarray): Upper value per bucket. + The number of elements of it should be the same as `bucket_counts`. + bucket_counts (torch.Tensor, numpy.ndarray): Number of values per bucket + global_step (int): Global step value to record + walltime (float): Optional override default walltime (time.time()) + seconds after epoch of event + see: https://github.com/tensorflow/tensorboard/blob/master/tensorboard/plugins/histogram/README.md + + Examples:: + + from torch.utils.tensorboard import SummaryWriter + import numpy as np + writer = SummaryWriter() + dummy_data = [] + for idx, value in enumerate(range(50)): + dummy_data += [idx + 0.001] * value + + bins = list(range(50+2)) + bins = np.array(bins) + values = np.array(dummy_data).astype(float).reshape(-1) + counts, limits = np.histogram(values, bins=bins) + sum_sq = values.dot(values) + writer.add_histogram_raw( + tag='histogram_with_raw_data', + min=values.min(), + max=values.max(), + num=len(values), + sum=values.sum(), + sum_squares=sum_sq, + bucket_limits=limits[1:].tolist(), + bucket_counts=counts.tolist(), + global_step=0) + writer.close() + + Expected result: + + .. image:: _static/img/tensorboard/add_histogram_raw.png + :scale: 50 % + + """ + torch._C._log_api_usage_once("tensorboard.logging.add_histogram_raw") + if len(bucket_limits) != len(bucket_counts): + raise ValueError( + "len(bucket_limits) != len(bucket_counts), see the document." + ) + self._get_file_writer().add_summary( + histogram_raw( + tag, min, max, num, sum, sum_squares, bucket_limits, bucket_counts + ), + global_step, + walltime, + ) + + def add_image( + self, tag, img_tensor, global_step=None, walltime=None, dataformats="CHW" + ) -> None: + """Add image data to summary. + + Note that this requires the ``pillow`` package. + + Args: + tag (str): Data identifier + img_tensor (torch.Tensor, numpy.ndarray, or string/blobname): Image data + global_step (int): Global step value to record + walltime (float): Optional override default walltime (time.time()) + seconds after epoch of event + dataformats (str): Image data format specification of the form + CHW, HWC, HW, WH, etc. + Shape: + img_tensor: Default is :math:`(3, H, W)`. You can use ``torchvision.utils.make_grid()`` to + convert a batch of tensor into 3xHxW format or call ``add_images`` and let us do the job. + Tensor with :math:`(1, H, W)`, :math:`(H, W)`, :math:`(H, W, 3)` is also suitable as long as + corresponding ``dataformats`` argument is passed, e.g. ``CHW``, ``HWC``, ``HW``. + + Examples:: + + from torch.utils.tensorboard import SummaryWriter + import numpy as np + img = np.zeros((3, 100, 100)) + img[0] = np.arange(0, 10000).reshape(100, 100) / 10000 + img[1] = 1 - np.arange(0, 10000).reshape(100, 100) / 10000 + + img_HWC = np.zeros((100, 100, 3)) + img_HWC[:, :, 0] = np.arange(0, 10000).reshape(100, 100) / 10000 + img_HWC[:, :, 1] = 1 - np.arange(0, 10000).reshape(100, 100) / 10000 + + writer = SummaryWriter() + writer.add_image('my_image', img, 0) + + # If you have non-default dimension setting, set the dataformats argument. + writer.add_image('my_image_HWC', img_HWC, 0, dataformats='HWC') + writer.close() + + Expected result: + + .. image:: _static/img/tensorboard/add_image.png + :scale: 50 % + + """ + torch._C._log_api_usage_once("tensorboard.logging.add_image") + self._get_file_writer().add_summary( + image(tag, img_tensor, dataformats=dataformats), global_step, walltime + ) + + def add_images( + self, tag, img_tensor, global_step=None, walltime=None, dataformats="NCHW" + ) -> None: + """Add batched image data to summary. + + Note that this requires the ``pillow`` package. + + Args: + tag (str): Data identifier + img_tensor (torch.Tensor, numpy.ndarray, or string/blobname): Image data + global_step (int): Global step value to record + walltime (float): Optional override default walltime (time.time()) + seconds after epoch of event + dataformats (str): Image data format specification of the form + NCHW, NHWC, CHW, HWC, HW, WH, etc. + Shape: + img_tensor: Default is :math:`(N, 3, H, W)`. If ``dataformats`` is specified, other shape will be + accepted. e.g. NCHW or NHWC. + + Examples:: + + from torch.utils.tensorboard import SummaryWriter + import numpy as np + + img_batch = np.zeros((16, 3, 100, 100)) + for i in range(16): + img_batch[i, 0] = np.arange(0, 10000).reshape(100, 100) / 10000 / 16 * i + img_batch[i, 1] = (1 - np.arange(0, 10000).reshape(100, 100) / 10000) / 16 * i + + writer = SummaryWriter() + writer.add_images('my_image_batch', img_batch, 0) + writer.close() + + Expected result: + + .. image:: _static/img/tensorboard/add_images.png + :scale: 30 % + + """ + torch._C._log_api_usage_once("tensorboard.logging.add_images") + self._get_file_writer().add_summary( + image(tag, img_tensor, dataformats=dataformats), global_step, walltime + ) + + def add_image_with_boxes( + self, + tag, + img_tensor, + box_tensor, + global_step=None, + walltime=None, + rescale=1, + dataformats="CHW", + labels=None, + ) -> None: + """Add image and draw bounding boxes on the image. + + Args: + tag (str): Data identifier + img_tensor (torch.Tensor, numpy.ndarray, or string/blobname): Image data + box_tensor (torch.Tensor, numpy.ndarray, or string/blobname): Box data (for detected objects) + box should be represented as [x1, y1, x2, y2]. + global_step (int): Global step value to record + walltime (float): Optional override default walltime (time.time()) + seconds after epoch of event + rescale (float): Optional scale override + dataformats (str): Image data format specification of the form + NCHW, NHWC, CHW, HWC, HW, WH, etc. + labels (list of string): The label to be shown for each bounding box. + Shape: + img_tensor: Default is :math:`(3, H, W)`. It can be specified with ``dataformats`` argument. + e.g. CHW or HWC + + box_tensor: (torch.Tensor, numpy.ndarray, or string/blobname): NX4, where N is the number of + boxes and each 4 elements in a row represents (xmin, ymin, xmax, ymax). + """ + torch._C._log_api_usage_once("tensorboard.logging.add_image_with_boxes") + if labels is not None: + if isinstance(labels, str): + labels = [labels] + if len(labels) != box_tensor.shape[0]: + labels = None + self._get_file_writer().add_summary( + image_boxes( + tag, + img_tensor, + box_tensor, + rescale=rescale, + dataformats=dataformats, + labels=labels, + ), + global_step, + walltime, + ) + + def add_figure( + self, + tag: str, + figure: Union["Figure", list["Figure"]], + global_step: int | None = None, + close: bool = True, + walltime: float | None = None, + ) -> None: + """Render matplotlib figure into an image and add it to summary. + + Note that this requires the ``matplotlib`` package. + + Args: + tag: Data identifier + figure: Figure or a list of figures + global_step: Global step value to record + close: Flag to automatically close the figure + walltime: Optional override default walltime (time.time()) + seconds after epoch of event + """ + torch._C._log_api_usage_once("tensorboard.logging.add_figure") + if isinstance(figure, list): + self.add_image( + tag, + figure_to_image(figure, close), + global_step, + walltime, + dataformats="NCHW", + ) + else: + self.add_image( + tag, + figure_to_image(figure, close), + global_step, + walltime, + dataformats="CHW", + ) + + def add_video(self, tag, vid_tensor, global_step=None, fps=4, walltime=None) -> None: + """Add video data to summary. + + Note that this requires the ``moviepy`` package. + + Args: + tag (str): Data identifier + vid_tensor (torch.Tensor): Video data + global_step (int): Global step value to record + fps (float or int): Frames per second + walltime (float): Optional override default walltime (time.time()) + seconds after epoch of event + Shape: + vid_tensor: :math:`(N, T, C, H, W)`. The values should lie in [0, 255] for type `uint8` or [0, 1] for type `float`. + """ + torch._C._log_api_usage_once("tensorboard.logging.add_video") + self._get_file_writer().add_summary( + video(tag, vid_tensor, fps), global_step, walltime + ) + + def add_audio( + self, tag, snd_tensor, global_step=None, sample_rate=44100, walltime=None + ) -> None: + """Add audio data to summary. + + Args: + tag (str): Data identifier + snd_tensor (torch.Tensor): Sound data + global_step (int): Global step value to record + sample_rate (int): sample rate in Hz + walltime (float): Optional override default walltime (time.time()) + seconds after epoch of event + Shape: + snd_tensor: :math:`(1, L)`. The values should lie between [-1, 1]. + """ + torch._C._log_api_usage_once("tensorboard.logging.add_audio") + self._get_file_writer().add_summary( + audio(tag, snd_tensor, sample_rate=sample_rate), global_step, walltime + ) + + def add_text(self, tag, text_string, global_step=None, walltime=None) -> None: + """Add text data to summary. + + Args: + tag (str): Data identifier + text_string (str): String to save + global_step (int): Global step value to record + walltime (float): Optional override default walltime (time.time()) + seconds after epoch of event + Examples:: + + writer.add_text('lstm', 'This is an lstm', 0) + writer.add_text('rnn', 'This is an rnn', 10) + """ + torch._C._log_api_usage_once("tensorboard.logging.add_text") + self._get_file_writer().add_summary( + text(tag, text_string), global_step, walltime + ) + + def add_onnx_graph(self, prototxt) -> None: + torch._C._log_api_usage_once("tensorboard.logging.add_onnx_graph") + self._get_file_writer().add_onnx_graph(load_onnx_graph(prototxt)) + + def add_graph( + self, model, input_to_model=None, verbose=False, use_strict_trace=True + ) -> None: + """Add graph data to summary. + + Args: + model (torch.nn.Module): Model to draw. + input_to_model (torch.Tensor or list of torch.Tensor): A variable or a tuple of + variables to be fed. + verbose (bool): Whether to print graph structure in console. + use_strict_trace (bool): Whether to pass keyword argument `strict` to + `torch.jit.trace`. Pass False when you want the tracer to + record your mutable container types (list, dict) + """ + torch._C._log_api_usage_once("tensorboard.logging.add_graph") + # A valid PyTorch model should have a 'forward' method + self._get_file_writer().add_graph( + graph(model, input_to_model, verbose, use_strict_trace) + ) + + @staticmethod + def _encode(rawstr): + # I'd use urllib but, I'm unsure about the differences from python3 to python2, etc. + retval = rawstr + retval = retval.replace("%", f"%{ord('%'):02x}") + retval = retval.replace("/", f"%{ord('/'):02x}") + retval = retval.replace("\\", "%%%02x" % (ord("\\"))) # noqa: UP031 + return retval + + def add_embedding( + self, + mat, + metadata=None, + label_img=None, + global_step=None, + tag="default", + metadata_header=None, + ) -> None: + """Add embedding projector data to summary. + + Args: + mat (torch.Tensor or numpy.ndarray): A matrix which each row is the feature vector of the data point + metadata (list): A list of labels, each element will be converted to string + label_img (torch.Tensor): Images correspond to each data point + global_step (int): Global step value to record + tag (str): Name for the embedding + metadata_header (list): A list of headers for multi-column metadata. If given, each metadata must be + a list with values corresponding to headers. + Shape: + mat: :math:`(N, D)`, where N is number of data and D is feature dimension + + label_img: :math:`(N, C, H, W)` + + Examples:: + + import keyword + import torch + meta = [] + while len(meta)<100: + meta = meta+keyword.kwlist # get some strings + meta = meta[:100] + + for i, v in enumerate(meta): + meta[i] = v+str(i) + + label_img = torch.rand(100, 3, 10, 32) + for i in range(100): + label_img[i]*=i/100.0 + + writer.add_embedding(torch.randn(100, 5), metadata=meta, label_img=label_img) + writer.add_embedding(torch.randn(100, 5), label_img=label_img) + writer.add_embedding(torch.randn(100, 5), metadata=meta) + + .. note:: + Categorical (i.e. non-numeric) metadata cannot have more than 50 unique values if they are to be used for + coloring in the embedding projector. + + """ + torch._C._log_api_usage_once("tensorboard.logging.add_embedding") + mat = make_np(mat) + if global_step is None: + global_step = 0 + # clear pbtxt? + + # Maybe we should encode the tag so slashes don't trip us up? + # I don't think this will mess us up, but better safe than sorry. + subdir = f"{str(global_step).zfill(5)}/{self._encode(tag)}" + save_path = os.path.join(self._get_file_writer().get_logdir(), subdir) + + fs = tf.io.gfile + if fs.exists(save_path): + if fs.isdir(save_path): + print( + "warning: Embedding dir exists, did you set global_step for add_embedding()?" + ) + else: + raise NotADirectoryError( + f"Path: `{save_path}` exists, but is a file. Cannot proceed." + ) + else: + fs.makedirs(save_path) + + if metadata is not None: + if mat.shape[0] != len( + metadata + ): + raise AssertionError("#labels should equal with #data points") + make_tsv(metadata, save_path, metadata_header=metadata_header) + + if label_img is not None: + if mat.shape[0] != label_img.shape[0]: + raise AssertionError("#images should equal with #data points") + make_sprite(label_img, save_path) + + if mat.ndim != 2: + raise AssertionError("mat should be 2D, where mat.size(0) is the number of data points") + make_mat(mat, save_path) + + # Filesystem doesn't necessarily have append semantics, so we store an + # internal buffer to append to and re-write whole file after each + # embedding is added + if not hasattr(self, "_projector_config"): + self._projector_config = ProjectorConfig() + embedding_info = get_embedding_info( + metadata, label_img, subdir, global_step, tag + ) + self._projector_config.embeddings.extend([embedding_info]) + + + from google.protobuf import text_format + + config_pbtxt = text_format.MessageToString(self._projector_config) + write_pbtxt(self._get_file_writer().get_logdir(), config_pbtxt) + + def add_pr_curve( + self, + tag, + labels, + predictions, + global_step=None, + num_thresholds=127, + weights=None, + walltime=None, + ) -> None: + """Add precision recall curve. + + Plotting a precision-recall curve lets you understand your model's + performance under different threshold settings. With this function, + you provide the ground truth labeling (T/F) and prediction confidence + (usually the output of your model) for each target. The TensorBoard UI + will let you choose the threshold interactively. + + Args: + tag (str): Data identifier + labels (torch.Tensor, numpy.ndarray, or string/blobname): + Ground truth data. Binary label for each element. + predictions (torch.Tensor, numpy.ndarray, or string/blobname): + The probability that an element be classified as true. + Value should be in [0, 1] + global_step (int): Global step value to record + num_thresholds (int): Number of thresholds used to draw the curve. + walltime (float): Optional override default walltime (time.time()) + seconds after epoch of event + + Examples:: + + from torch.utils.tensorboard import SummaryWriter + import numpy as np + labels = np.random.randint(2, size=100) # binary label + predictions = np.random.rand(100) + writer = SummaryWriter() + writer.add_pr_curve('pr_curve', labels, predictions, 0) + writer.close() + + """ + torch._C._log_api_usage_once("tensorboard.logging.add_pr_curve") + labels, predictions = make_np(labels), make_np(predictions) + self._get_file_writer().add_summary( + pr_curve(tag, labels, predictions, num_thresholds, weights), + global_step, + walltime, + ) + + def add_pr_curve_raw( + self, + tag, + true_positive_counts, + false_positive_counts, + true_negative_counts, + false_negative_counts, + precision, + recall, + global_step=None, + num_thresholds=127, + weights=None, + walltime=None, + ) -> None: + """Add precision recall curve with raw data. + + Args: + tag (str): Data identifier + true_positive_counts (torch.Tensor, numpy.ndarray, or string/blobname): true positive counts + false_positive_counts (torch.Tensor, numpy.ndarray, or string/blobname): false positive counts + true_negative_counts (torch.Tensor, numpy.ndarray, or string/blobname): true negative counts + false_negative_counts (torch.Tensor, numpy.ndarray, or string/blobname): false negative counts + precision (torch.Tensor, numpy.ndarray, or string/blobname): precision + recall (torch.Tensor, numpy.ndarray, or string/blobname): recall + global_step (int): Global step value to record + num_thresholds (int): Number of thresholds used to draw the curve. + walltime (float): Optional override default walltime (time.time()) + seconds after epoch of event + see: https://github.com/tensorflow/tensorboard/blob/master/tensorboard/plugins/pr_curve/README.md + """ + torch._C._log_api_usage_once("tensorboard.logging.add_pr_curve_raw") + self._get_file_writer().add_summary( + pr_curve_raw( + tag, + true_positive_counts, + false_positive_counts, + true_negative_counts, + false_negative_counts, + precision, + recall, + num_thresholds, + weights, + ), + global_step, + walltime, + ) + + def add_custom_scalars_multilinechart( + self, tags, category="default", title="untitled" + ) -> None: + """Shorthand for creating multilinechart. Similar to ``add_custom_scalars()``, but the only necessary argument is *tags*. + + Args: + tags (list): list of tags that have been used in ``add_scalar()`` + + Examples:: + + writer.add_custom_scalars_multilinechart(['twse/0050', 'twse/2330']) + """ + torch._C._log_api_usage_once( + "tensorboard.logging.add_custom_scalars_multilinechart" + ) + layout = {category: {title: ["Multiline", tags]}} + self._get_file_writer().add_summary(custom_scalars(layout)) + + def add_custom_scalars_marginchart( + self, tags, category="default", title="untitled" + ) -> None: + """Shorthand for creating marginchart. + + Similar to ``add_custom_scalars()``, but the only necessary argument is *tags*, + which should have exactly 3 elements. + + Args: + tags (list): list of tags that have been used in ``add_scalar()`` + + Examples:: + + writer.add_custom_scalars_marginchart(['twse/0050', 'twse/2330', 'twse/2006']) + """ + torch._C._log_api_usage_once( + "tensorboard.logging.add_custom_scalars_marginchart" + ) + if len(tags) != 3: + raise AssertionError(f"Expected 3 tags, got {len(tags)}.") + layout = {category: {title: ["Margin", tags]}} + self._get_file_writer().add_summary(custom_scalars(layout)) + + def add_custom_scalars(self, layout) -> None: + """Create special chart by collecting charts tags in 'scalars'. + + NOTE: This function can only be called once for each SummaryWriter() object. + + Because it only provides metadata to tensorboard, the function can be called before or after the training loop. + + Args: + layout (dict): {categoryName: *charts*}, where *charts* is also a dictionary + {chartName: *ListOfProperties*}. The first element in *ListOfProperties* is the chart's type + (one of **Multiline** or **Margin**) and the second element should be a list containing the tags + you have used in add_scalar function, which will be collected into the new chart. + + Examples:: + + layout = {'Taiwan':{'twse':['Multiline',['twse/0050', 'twse/2330']]}, + 'USA':{ 'dow':['Margin', ['dow/aaa', 'dow/bbb', 'dow/ccc']], + 'nasdaq':['Margin', ['nasdaq/aaa', 'nasdaq/bbb', 'nasdaq/ccc']]}} + + writer.add_custom_scalars(layout) + """ + torch._C._log_api_usage_once("tensorboard.logging.add_custom_scalars") + self._get_file_writer().add_summary(custom_scalars(layout)) + + def add_mesh( + self, + tag, + vertices, + colors=None, + faces=None, + config_dict=None, + global_step=None, + walltime=None, + ) -> None: + """Add meshes or 3D point clouds to TensorBoard. + + The visualization is based on Three.js, + so it allows users to interact with the rendered object. Besides the basic definitions + such as vertices, faces, users can further provide camera parameter, lighting condition, etc. + Please check https://threejs.org/docs/index.html#manual/en/introduction/Creating-a-scene for + advanced usage. + + Args: + tag (str): Data identifier + vertices (torch.Tensor): List of the 3D coordinates of vertices. + colors (torch.Tensor): Colors for each vertex + faces (torch.Tensor): Indices of vertices within each triangle. (Optional) + config_dict: Dictionary with ThreeJS classes names and configuration. + global_step (int): Global step value to record + walltime (float): Optional override default walltime (time.time()) + seconds after epoch of event + + Shape: + vertices: :math:`(B, N, 3)`. (batch, number_of_vertices, channels) + + colors: :math:`(B, N, 3)`. The values should lie in [0, 255] for type `uint8` or [0, 1] for type `float`. + + faces: :math:`(B, N, 3)`. The values should lie in [0, number_of_vertices] for type `uint8`. + + Examples:: + + from torch.utils.tensorboard import SummaryWriter + vertices_tensor = torch.as_tensor([ + [1, 1, 1], + [-1, -1, 1], + [1, -1, -1], + [-1, 1, -1], + ], dtype=torch.float).unsqueeze(0) + colors_tensor = torch.as_tensor([ + [255, 0, 0], + [0, 255, 0], + [0, 0, 255], + [255, 0, 255], + ], dtype=torch.int).unsqueeze(0) + faces_tensor = torch.as_tensor([ + [0, 2, 3], + [0, 3, 1], + [0, 1, 2], + [1, 3, 2], + ], dtype=torch.int).unsqueeze(0) + + writer = SummaryWriter() + writer.add_mesh('my_mesh', vertices=vertices_tensor, colors=colors_tensor, faces=faces_tensor) + + writer.close() + """ + torch._C._log_api_usage_once("tensorboard.logging.add_mesh") + self._get_file_writer().add_summary( + mesh(tag, vertices, colors, faces, config_dict), global_step, walltime + ) + + def flush(self) -> None: + """Flushes the event file to disk. + + Call this method to make sure that all pending events have been written to + disk. + """ + if self.all_writers is None: + return + for writer in self.all_writers.values(): + writer.flush() + + def close(self) -> None: + if self.all_writers is None: + return # ignore double close + for writer in self.all_writers.values(): + writer.flush() + writer.close() + # pyrefly: ignore [bad-assignment] + self.file_writer = self.all_writers = None + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_val, exc_tb): + self.close() diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/throughput_benchmark.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/throughput_benchmark.py new file mode 100644 index 0000000000000000000000000000000000000000..d4b94e0b13a39fbe192f89e791c663b2ecf45ea2 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/throughput_benchmark.py @@ -0,0 +1,161 @@ +# mypy: allow-untyped-defs + +import torch._C + + +def format_time(time_us=None, time_ms=None, time_s=None) -> str: + """Define time formatting.""" + if sum([time_us is not None, time_ms is not None, time_s is not None]) != 1: + raise AssertionError("Expected only one of time_us, time_ms, time_s is given.") + + US_IN_SECOND = 1e6 + US_IN_MS = 1e3 + + if time_us is None: + if time_ms is not None: + time_us = time_ms * US_IN_MS + elif time_s is not None: + time_us = time_s * US_IN_SECOND + else: + raise AssertionError("Shouldn't reach here :)") + + if time_us >= US_IN_SECOND: + return f'{time_us / US_IN_SECOND:.3f}s' + if time_us >= US_IN_MS: + return f'{time_us / US_IN_MS:.3f}ms' + return f'{time_us:.3f}us' + + +class ExecutionStats: + def __init__(self, c_stats, benchmark_config) -> None: + self._c_stats = c_stats + self.benchmark_config = benchmark_config + + @property + def latency_avg_ms(self): + return self._c_stats.latency_avg_ms + + @property + def num_iters(self): + return self._c_stats.num_iters + + @property + def iters_per_second(self): + """Return total number of iterations per second across all calling threads.""" + return self.num_iters / self.total_time_seconds + + @property + def total_time_seconds(self): + return self.num_iters * ( + self.latency_avg_ms / 1000.0) / self.benchmark_config.num_calling_threads + + def __str__(self) -> str: + return '\n'.join([ + "Average latency per example: " + format_time(time_ms=self.latency_avg_ms), + f"Total number of iterations: {self.num_iters}", + f"Total number of iterations per second (across all threads): {self.iters_per_second:.2f}", + "Total time: " + format_time(time_s=self.total_time_seconds) + ]) + + +class ThroughputBenchmark: + """ + This class is a wrapper around a c++ component throughput_benchmark::ThroughputBenchmark. + + This wrapper on the throughput_benchmark::ThroughputBenchmark component is responsible + for executing a PyTorch module (nn.Module or ScriptModule) under an inference + server like load. It can emulate multiple calling threads to a single module + provided. In the future we plan to enhance this component to support inter and + intra-op parallelism as well as multiple models running in a single process. + + Please note that even though nn.Module is supported, it might incur an overhead + from the need to hold GIL every time we execute Python code or pass around + inputs as Python objects. As soon as you have a ScriptModule version of your + model for inference deployment it is better to switch to using it in this + benchmark. + + Example:: + + >>> # xdoctest: +SKIP("undefined vars") + >>> from torch.utils import ThroughputBenchmark + >>> bench = ThroughputBenchmark(my_module) + >>> # Pre-populate benchmark's data set with the inputs + >>> for input in inputs: + ... # Both args and kwargs work, same as any PyTorch Module / ScriptModule + ... bench.add_input(input[0], x2=input[1]) + >>> # Inputs supplied above are randomly used during the execution + >>> stats = bench.benchmark( + ... num_calling_threads=4, + ... num_warmup_iters = 100, + ... num_iters = 1000, + ... ) + >>> print("Avg latency (ms): {}".format(stats.latency_avg_ms)) + >>> print("Number of iterations: {}".format(stats.num_iters)) + """ + + def __init__(self, module) -> None: + if isinstance(module, torch.jit.ScriptModule): + self._benchmark = torch._C.ThroughputBenchmark(module._c) + else: + self._benchmark = torch._C.ThroughputBenchmark(module) + + def run_once(self, *args, **kwargs): + """ + Given input id (input_idx) run benchmark once and return prediction. + + This is useful for testing that benchmark actually runs the module you + want it to run. input_idx here is an index into inputs array populated + by calling add_input() method. + """ + return self._benchmark.run_once(*args, **kwargs) + + def add_input(self, *args, **kwargs) -> None: + """ + Store a single input to a module into the benchmark memory and keep it there. + + During the benchmark execution every thread is going to pick up a + random input from the all the inputs ever supplied to the benchmark via + this function. + """ + self._benchmark.add_input(*args, **kwargs) + + def benchmark( + self, + num_calling_threads=1, + num_warmup_iters=10, + num_iters=100, + profiler_output_path=""): + """ + Run a benchmark on the module. + + Args: + num_warmup_iters (int): Warmup iters are used to make sure we run a module + a few times before actually measuring things. This way we avoid cold + caches and any other similar problems. This is the number of warmup + iterations for each of the thread in separate + + num_iters (int): Number of iterations the benchmark should run with. + This number is separate from the warmup iterations. Also the number is + shared across all the threads. Once the num_iters iterations across all + the threads is reached, we will stop execution. Though total number of + iterations might be slightly larger. Which is reported as + stats.num_iters where stats is the result of this function + + profiler_output_path (str): Location to save Autograd Profiler trace. + If not empty, Autograd Profiler will be enabled for the main benchmark + execution (but not the warmup phase). The full trace will be saved + into the file path provided by this argument + + + This function returns BenchmarkExecutionStats object which is defined via pybind11. + It currently has two fields: + - num_iters - number of actual iterations the benchmark have made + - avg_latency_ms - average time it took to infer on one input example in milliseconds + """ + config = torch._C.BenchmarkConfig() + config.num_calling_threads = num_calling_threads + config.num_warmup_iters = num_warmup_iters + config.num_iters = num_iters + config.profiler_output_path = profiler_output_path + c_stats = self._benchmark.benchmark(config) + return ExecutionStats(c_stats, config) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/viz/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/viz/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/viz/_cycles.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/viz/_cycles.py new file mode 100644 index 0000000000000000000000000000000000000000..df4bf34db211486edf89a9d4580c1bd792ee7097 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/viz/_cycles.py @@ -0,0 +1,506 @@ +# mypy: allow-untyped-defs +import gc +import sys +from typing import Any, NamedTuple +import types +import weakref +import json +from tempfile import NamedTemporaryFile +import torch +from torch.cuda._memory_viz import _frames_fmt, _block_extra +import atexit +import logging +logger = logging.getLogger(__name__) + +def observe_garbage(observer): + enabled = True + + def disable() -> None: + # when GC runs during exit, things like `sys` will already be unloaded + # so we have to disable the callback to avoid hitting errors. + nonlocal enabled + enabled = False + atexit.register(disable) + + def gc_callback(phase, info) -> None: + nonlocal enabled + if not enabled: + return + if phase == "start": + gc.set_debug(gc.DEBUG_SAVEALL) + elif phase == "stop": + orig_trace = sys.getprofile() + self_return = [False] + + def do_collect(*args, **kwargs): + nonlocal enabled + if not self_return[0]: + self_return[0] = True + else: + sys.setprofile(orig_trace) + enabled = False + try: + # things in gc.garbage have survived a collection + # so to free them we have to collect a generation greater than them + # but that might _also_ free other stuff and we don't want to miss + # that stuff. So we have to now force gc at the highest level here, + # report all of what we found, _then_ we can free it up. + if info['generation'] != 2: + gc.collect() + observer(gc.garbage) + gc.garbage.clear() + # we have to re-run GC to clean up the cycles + # we saved from before. + gc.set_debug(0) + before = torch.cuda.memory_allocated() + gc.collect() + after = torch.cuda.memory_allocated() + if before != after: + logger.warning("CUDA Memory changed during GC, %d bytes freed.", before - after) + finally: + enabled = True + if orig_trace is not None: + return orig_trace(*args, **kwargs) + sys.setprofile(do_collect) + + gc.callbacks.append(gc_callback) + + # provide a way to disarm the callback + def remove() -> None: + gc.callbacks.remove(gc_callback) + return remove + +# Function to visualize cycles adapted from refcycle: +# Copyright 2013 Mark Dickinson +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +def _get_cell_type(): + def f(x=None): + return lambda: x + return type(f().__closure__[0]) + +CellType = _get_cell_type() + +def annotated_references(obj): + """ + Return known information about references held by the given object. + + Returns a mapping from referents to lists of descriptions. Note that there + may be more than one edge leading to any particular referent; hence the + need for a list. Descriptions are currently strings. + + """ + references: dict[int, list[str]] = {} + + def add_reference(name, obj) -> None: + references.setdefault(id(obj), []).append(name) + + def add_attrs(*attrs) -> None: + for attr in attrs: + if hasattr(obj, attr): + add_reference(attr, getattr(obj, attr)) + + def add_cell_references() -> None: + try: + add_attrs("cell_contents") + except ValueError: + # if cell_contents is empty, + # accessing it raises ValueError + # in this case there is no object to + # annotate + pass + + def add_function_references() -> None: + add_attrs("__defaults__", + "__closure__", + "__globals__", + "__code__", + "__name__", + "__module__", + "__doc__" + "__qualname__", + "__annotations__", + "__kwdefaults__") + + + def add_sequence_references() -> None: + for position, item in enumerate(obj): + add_reference(f"[{position}]", item) + + def add_dict_references() -> None: + for key, value in obj.items(): + add_reference("key", key) + add_reference(f"[{repr(key)}]", value) + + def add_set_references() -> None: + for elt in obj: + add_reference("element", elt) + + def add_bound_method_references() -> None: + add_attrs("__self__", "__func__", "im_class") + + def add_weakref_references() -> None: + # For subclasses of weakref, we can't reliably distinguish the + # callback (if any) from other attributes. + if type(obj) is weakref.ref: + referents = gc.get_referents(obj) + if len(referents) == 1: + target = referents[0] + add_reference("__callback__", target) + + + def add_frame_references() -> None: + f_locals = obj.f_locals + add_attrs("f_back", "f_code", "f_builtins", "f_globals", "f_trace", "f_locals") + # Some badly-behaved code replaces the f_locals dict with + # something that doesn't support the full dict interface. So we + # only continue with the annotation if f_locals is a Python dict. + if type(f_locals) is dict: + for name, local in obj.f_locals.items(): + add_reference(f"local {name}", local) + + def add_getset_descriptor_references() -> None: + add_attrs("__objclass__", "__name__", "__doc__") + + type_based_references = { + tuple: add_sequence_references, + list: add_sequence_references, + dict: add_dict_references, + set: add_set_references, + frozenset: add_set_references, + types.FunctionType: add_function_references, + types.FrameType: add_frame_references, + CellType: add_cell_references, + types.MethodType: add_bound_method_references, + weakref.ref: add_weakref_references, + types.GetSetDescriptorType: add_getset_descriptor_references, + } + + for type_ in type(obj).__mro__: + if type_ in type_based_references: + type_based_references[type_]() + + add_attrs("__dict__", "__class__") + if isinstance(obj, type): + add_attrs("__mro__") + + return references + +############################################################################### +# Object annotations. + + +BASE_TYPES = (int, float, complex, type(None), str, bytes) +FRAME_FILENAME_LIMIT = 32 + +def object_annotation(obj): + """ + Return a string to be used for Graphviz nodes. + + The string should be short but as informative as possible. + """ + + def format_sequence(obj): + body = ','.join(repr(x) if isinstance(x, BASE_TYPES) else type(x).__name__ for x in obj[:8]) + if len(obj) > 8: + body = f'{body}, ...{len(obj) - 8}' + return body + + # For basic types, use the repr. + if isinstance(obj, BASE_TYPES): + return repr(obj) + if type(obj).__name__ == 'function': + return f"function\n{obj.__name__}" + elif isinstance(obj, types.MethodType): + try: + func_name = obj.__func__.__qualname__ + except AttributeError: + func_name = "" + return f"instancemethod\n{func_name}" + elif isinstance(obj, list): + return f"[{format_sequence(obj)}]" + elif isinstance(obj, tuple): + return f"({format_sequence(obj)})" + elif isinstance(obj, dict): + return f"dict[{len(obj)}]" + elif isinstance(obj, types.ModuleType): + return f"module\n{obj.__name__}" + elif isinstance(obj, type): + return f"type\n{obj.__name__}" + elif isinstance(obj, weakref.ref): + referent = obj() + if referent is None: + return "weakref (dead referent)" + else: + return f"weakref to id 0x{id(referent):x}" + elif isinstance(obj, types.FrameType): + filename = obj.f_code.co_filename + if len(filename) > FRAME_FILENAME_LIMIT: + filename = "..." + filename[-(FRAME_FILENAME_LIMIT - 3):] + return f"frame\n{filename}:{obj.f_lineno}" + elif is_cuda_tensor(obj): + return f"object\n{type(obj).__module__}.{type(obj).__name__} ({obj.shape})" + else: + return f"object\n{type(obj).__module__}.{type(obj).__name__}" + + + +class Node(NamedTuple): + label: str + context: str | None + root: bool + referrents: list[tuple[str, int]] + +def create_graph(objects, *, context=None, filter=None): + if context is None: + context = cuda_allocation_context() + if filter is None: + filter = is_cuda_tensor + + objects = [obj for obj in objects if not isinstance(obj, weakref.ProxyTypes)] + nodes = [Node(object_annotation(obj), context(obj), filter(obj), []) for obj in objects] + node_referrers: list[list[int]] = [[] for obj in objects] + + id_to_node = {id(obj): i for i, obj in enumerate(objects)} + for obj in objects: + fidx = id_to_node[id(obj)] + f = nodes[fidx] + references = annotated_references(obj) + for referrent in gc.get_referents(obj): + rid = id(referrent) + tidx = id_to_node.get(rid) + if tidx is None: + continue + labels = references.get(rid, ["?"]) + node_referrers[tidx].append(fidx) + for label in labels: + f.referrents.append((label, tidx)) + + to_search = [i for i, n in enumerate(nodes) if n.root] + to_keep = set() + while to_search: + idx = to_search.pop() + if idx in to_keep: + continue + to_keep.add(idx) + referrers = node_referrers[idx] + to_search.extend(referrers) + id_to_filtered_id: dict[int, int] = {} + filtered: list[Any] = [] + for i, n in enumerate(nodes): + if i in to_keep: + id_to_filtered_id[i] = len(id_to_filtered_id) + filtered.append(n) + for n in filtered: + n.referrents[:] = [(label, id_to_filtered_id[idx]) + for (label, idx) in n.referrents + if idx in id_to_filtered_id] + return filtered + +def escape(n): + return json.dumps(n) + + +def is_cuda_tensor(obj): + return ( + isinstance(obj, torch.Tensor) and + obj.device.type == "cuda" and + not isinstance(obj, torch._subclasses.FakeTensor) + ) + +def cuda_allocation_context(): + snapshot = torch.cuda.memory._snapshot() + addr_to_frame = {} + for seg in snapshot['segments']: + addr = seg['address'] + for blk in seg['blocks']: + if blk['state'] == 'active_allocated': + frames, _real_size = _block_extra(blk) + addr_to_frame[addr] = frames + addr += blk['size'] + + def object_context(obj): + if is_cuda_tensor(obj): + addr = obj.untyped_storage().data_ptr() + frames = addr_to_frame.get(addr) + if frames is not None: + return '\n'.join(_frames_fmt(frames, full_filename=True)) + return None + return object_context + +def to_dot(nodes): + lines = ["digraph GraphName {", "node [shape=rect];", 'rankdir=LR;'] + for i, n in enumerate(nodes): + lines.append(f'{i} [label={escape(n.label)}, color={"red" if n.root else "black"}];') + + for i, f in enumerate(nodes): + for label, j in f.referrents: + lines.append(f'{i} -> {j} [label = {escape(label)}]') + lines.append("}\n") + return '\n'.join(lines) + +_template = """ + + + + + + +
+
+
+
+
Mouse over tensor objects to see where they were allocated.
+
+
+ + + + +""" +_listener_template = """ +document.getElementById('node{id}').addEventListener('mouseover', function(event) {{ + document.getElementById("stacktrace").textContent = {stack} +}}) +""" +def to_html(nodes): + listeners = [] + for i, n in enumerate(nodes): + if n.context is None: + continue + s = _listener_template.format(id=str(i + 1), stack=escape(f'{n.label}:\n{n.context}')) + # pyrefly: ignore [bad-argument-type] + listeners.append(s) + dot = to_dot(nodes) + return _template.replace('$DOT', repr(dot)).replace('$LISTENERS', '\n'.join(listeners)) + +def observe_tensor_cycles(callback): + torch.cuda.memory._record_memory_history(max_entries=100000) + + def observer(garbage) -> None: + if garbage: + if not any(is_cuda_tensor(obj) for obj in garbage): + logger.info("No CUDA Tensors found in garbage") + return + callback(to_html(create_graph(garbage))) + return observe_garbage(observer) + + +def warn_tensor_cycles(): + """ + Install a warning that reports whenever a cycle that is holding CUDA memory is observed. + + The warning produces an .html file that visualizes the cycle, + and links it to the stack frame that allocated the CUDA tensor. + + Reference cycles are freed by the cycle collector rather than being cleaned up + when the objects in the cycle first become unreachable. If a cycle points to a tensor, + the CUDA memory for that tensor will not be freed until garbage collection runs. + Accumulation of CUDA allocations can lead to out of memory errors (OOMs), as well as + non-deterministic allocation behavior which is harder to debug. + """ + logger.info("Watching Python reference cycles for CUDA Tensors.") + + def write_and_log(html) -> None: + with NamedTemporaryFile('w', suffix='.html') as f: + f.write(html) + logger.warning('Reference cycle includes a CUDA Tensor see visualization of cycle %s', f.name) + return observe_tensor_cycles(write_and_log) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/weak.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/weak.py new file mode 100644 index 0000000000000000000000000000000000000000..f71912b59f53aaf70058a498dffcbe22b3d695e3 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/utils/weak.py @@ -0,0 +1,367 @@ +# mypy: allow-untyped-defs +from __future__ import annotations + +import collections.abc as _collections_abc +import weakref +from collections.abc import Mapping, MutableMapping +from weakref import ref + +from torch import Tensor + + +WeakRef = ref + + +__all__ = [ + "TensorWeakRef", + "WeakIdRef", + "WeakIdKeyDictionary", + "WeakTensorKeyDictionary", +] + + +# TODO: make weakref properly thread safe following +# https://github.com/python/cpython/pull/125325 +class _IterationGuard: + # This context manager registers itself in the current iterators of the + # weak container, such as to delay all removals until the context manager + # exits. + # This technique should be relatively thread-safe (since sets are). + + def __init__(self, weakcontainer) -> None: + # Don't create cycles + self.weakcontainer = ref(weakcontainer) + + def __enter__(self): + w = self.weakcontainer() + if w is not None: + w._iterating.add(self) + return self + + def __exit__(self, e, t, b): + w = self.weakcontainer() + if w is not None: + s = w._iterating + s.remove(self) + if not s: + w._commit_removals() + + +# This file defines a variant of WeakKeyDictionary that overrides the hashing +# behavior of the key to use object identity, rather than the builtin +# __eq__/__hash__ functions. This is useful for Tensor weak keys, as their +# __eq__ implementation return a Tensor (elementwise equality), which means +# you can't use them directly with the WeakKeyDictionary in standard library. +# +# Our implementation strategy is to create a wrapper weak key object, which we +# use as a key in a stock Python dictionary. This is similar to how weakref +# implements WeakKeyDictionary, but instead of using weakref.ref as the +# wrapper, we use a custom wrapper that has different __eq__ and __hash__ +# behavior. Note that we subsequently store this weak key directly in an +# ORDINARY dictionary, since the newly constructed WeakIdKey's only use would +# be a dictionary so it would have no strong references. Ensuring that +# only live WeakIdKeys are in the map is handled by putting finalizers on the +# original key object. + + +# It is simpler to implement this with composition, but if we want to +# directly reuse the callback mechanism on weakref, we need the weakref +# and the key to be exactly the same object. Reusing the callback mechanism +# minimizes the divergence between our implementation and Lib/weakref.py +# +# NB: Prefer using this when working with weakrefs of Tensors; e.g., do +# WeakIdRef(tensor) rather than weakref.ref(tensor); it handles a number of +# easy to get wrong cases transparently for you. +class WeakIdRef(weakref.ref): + __slots__ = ["_id"] + + def __init__(self, key, callback=None) -> None: + # Unlike stock weakref, which preserves hash semantics of the + # original object but lazily defers hash calls until the first + # time the user attempts to hash the weakref, we can eagerly + # cache the id of the key as we know this is definitely the hash + # method + self._id = id(key) + super().__init__(key, callback) # type: ignore[call-arg] + + def __call__(self): + r = super().__call__() + # Special logic for Tensor PyObject resurrection + if hasattr(r, "_fix_weakref"): + r._fix_weakref() # type: ignore[union-attr] + return r + + def __hash__(self): + return self._id + + def __eq__(self, other): + # An attractive but wrong alternate implementation is to only test if + # the stored _ids match. This can lead to an ABA problem if you have: + # + # a1 = A() + # w1 = WeakIdRef(a1) + # del a1 + # a2 = A() # suppose it gets the same ID as a1 + # w2 = WeakIdRef(a2) + # print(w1 == w2) + # + # This should be False, as a1 and a2 are unrelated (and a1 is + # dead anyway) + a = self() + b = other() + if a is not None and b is not None: + return a is b + return self is other + + +# This is the same as WeakIdRef but equality is checked using hash() rather than id. +# This will be equivalent to the one above except for classes where hash is not their id. +class _WeakHashRef(weakref.ref): + __slots__ = ["_id"] + + def __init__(self, key, callback=None) -> None: + # Unlike stock weakref, which preserves hash semantics of the + # original object but lazily defers hash calls until the first + # time the user attempts to hash the weakref, we can eagerly + # cache the id of the key as we know this is definitely the hash + # method + self._id = hash(key) + super().__init__(key, callback) # type: ignore[call-arg] + + def __call__(self): + r = super().__call__() + # Special logic for Tensor PyObject resurrection + if hasattr(r, "_fix_weakref"): + r._fix_weakref() # type: ignore[union-attr] + return r + + def __hash__(self): + return self._id + + def __eq__(self, other): + # Use hash equality to determine ref equality. + # ScriptObject implements __hash__ to return the wrapped IValue's id, so + # this is equivalent to doing an identity comparison. + a = self() + b = other() + if a is not None and b is not None: + return hash(a) == hash(b) + return self is other + + +# This is directly adapted from cpython/Lib/weakref.py +class WeakIdKeyDictionary(MutableMapping): + def __init__(self, dict=None, ref_type=WeakIdRef) -> None: # CHANGED + self.data = {} + + self.ref_type = ref_type # CHANGED + + def remove(k, selfref=ref(self)) -> None: + self = selfref() + if self is not None: + if self._iterating: + self._pending_removals.append(k) + else: + try: + del self.data[k] + except KeyError: + pass + + self._remove = remove + # A list of dead weakrefs (keys to be removed) + self._pending_removals = [] + self._iterating = set() + self._dirty_len = False + if dict is not None: + self.update(dict) + + def _commit_removals(self) -> None: + # NOTE: We don't need to call this method before mutating the dict, + # because a dead weakref never compares equal to a live weakref, + # even if they happened to refer to equal objects. + # However, it means keys may already have been removed. + pop = self._pending_removals.pop + d = self.data + while True: + try: + key = pop() + except IndexError: + return + + try: + del d[key] + except KeyError: + pass + + def _scrub_removals(self) -> None: + d = self.data + self._pending_removals = [k for k in self._pending_removals if k in d] + self._dirty_len = False + + def __delitem__(self, key) -> None: + self._dirty_len = True + del self.data[self.ref_type(key)] # CHANGED + + def __getitem__(self, key): + return self.data[self.ref_type(key)] # CHANGED + + def __len__(self) -> int: + if self._dirty_len and self._pending_removals: + # self._pending_removals may still contain keys which were + # explicitly removed, we have to scrub them (see issue #21173). + self._scrub_removals() + return len(self.data) - len(self._pending_removals) + + def __repr__(self) -> str: + return f"<{self.__class__.__name__} at {id(self):#x}>" + + def __setitem__(self, key, value) -> None: + self.data[self.ref_type(key, self._remove)] = value # CHANGED + + def copy(self): + new = WeakIdKeyDictionary() + with _IterationGuard(self): + for key, value in self.data.items(): + o = key() + if o is not None: + new[o] = value + return new + + __copy__ = copy + + def __deepcopy__(self, memo): + from copy import deepcopy + + new = self.__class__() + with _IterationGuard(self): + for key, value in self.data.items(): + o = key() + if o is not None: + new[o] = deepcopy(value, memo) + return new + + def get(self, key, default=None): + return self.data.get(self.ref_type(key), default) # CHANGED + + def __contains__(self, key) -> bool: + try: + wr = self.ref_type(key) # CHANGED + except TypeError: + return False + return wr in self.data + + def items(self): + with _IterationGuard(self): + for wr, value in self.data.items(): + key = wr() + if key is not None: + yield key, value + + def keys(self): + with _IterationGuard(self): + for wr in self.data: + obj = wr() + if obj is not None: + yield obj + + __iter__ = keys + + def values(self): + with _IterationGuard(self): + for wr, value in self.data.items(): + if wr() is not None: + yield value + + def keyrefs(self): + """Return a list of weak references to the keys. + + The references are not guaranteed to be 'live' at the time + they are used, so the result of calling the references needs + to be checked before being used. This can be used to avoid + creating references that will cause the garbage collector to + keep the keys around longer than needed. + + """ + return list(self.data) + + def popitem(self): + self._dirty_len = True + while True: + key, value = self.data.popitem() + o = key() + if o is not None: + return o, value + + # pyrefly: ignore [bad-override] + def pop(self, key, *args): + self._dirty_len = True + # pyrefly: ignore [not-iterable] + return self.data.pop(self.ref_type(key), *args) # CHANGED + + def setdefault(self, key, default=None): + return self.data.setdefault( + self.ref_type(key, self._remove), default + ) # CHANGED + + def update(self, dict=None, **kwargs) -> None: # type: ignore[override] + d = self.data + if dict is not None: + if not hasattr(dict, "items"): + dict = type({})(dict) + for key, value in dict.items(): + d[self.ref_type(key, self._remove)] = value # CHANGED + if kwargs: + self.update(kwargs) + + def __ior__(self, other): + self.update(other) + return self + + def __or__(self, other): + if isinstance(other, _collections_abc.Mapping): + c = self.copy() + c.update(other) + return c + return NotImplemented + + def __ror__(self, other): + if isinstance(other, _collections_abc.Mapping): + c = self.__class__() + c.update(other) + c.update(self) + return c + return NotImplemented + + # Default Mapping equality will tests keys for equality, but + # we want to test ids for equality + def __eq__(self, other): + if not isinstance(other, Mapping): + return NotImplemented + return {id(k): v for k, v in self.items()} == { + id(k): v for k, v in other.items() + } + + +# Convenience alias +WeakTensorKeyDictionary = WeakIdKeyDictionary + + +class TensorWeakRef: + """Wrapper around a weak ref of a Tensor that handles the _fix_weakref() call required when unwrapping a Tensor weakref.""" + + ref: WeakRef[Tensor] + + def __init__(self, tensor: Tensor) -> None: + if not isinstance(tensor, Tensor): + raise AssertionError(f"expected torch.Tensor, got {type(tensor)}.") + self.ref = weakref.ref(tensor) + + def __call__(self): + out = self.ref() + if out is None: + return out + if not isinstance(out, Tensor): + raise AssertionError(f"expected torch.Tensor, got {type(out)}.") + # TODO, add _fix_weakref type binding + out._fix_weakref() # type: ignore[attr-defined] + return out diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/xpu/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/xpu/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1dd8d6684f0e239fb295f8649623b415e777900a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/xpu/__init__.py @@ -0,0 +1,599 @@ +# mypy: allow-untyped-defs +r""" +This package introduces support for the XPU backend, specifically tailored for +Intel GPU optimization. + +This package is lazily initialized, so you can always import it, and use +:func:`is_available()` to determine if your system supports XPU. +""" + +import threading +import traceback +from collections.abc import Callable +from functools import lru_cache +from typing import Any, Optional, Union + +import torch +import torch._C +from torch import device as _device +from torch._utils import _dummy_type, _LazySeedTracker + +from ._utils import _get_device_index +from .streams import Event, Stream + + +_initialized = False +_tls = threading.local() +_initialization_lock = threading.Lock() +_queued_calls: list[ + tuple[Callable[[], None], list[str]] +] = [] # don't invoke these until initialization occurs +_is_in_bad_fork = getattr(torch._C, "_xpu_isInBadFork", lambda: False) +_device_t = Union[_device, str, int, None] +_lazy_seed_tracker = _LazySeedTracker() +default_generators: tuple[torch._C.Generator] = () # type: ignore[assignment] + + +def _is_compiled() -> bool: + r"""Return true if compile with XPU support.""" + return torch._C._has_xpu + + +if _is_compiled(): + _XpuDeviceProperties = torch._C._XpuDeviceProperties + _exchange_device = torch._C._xpu_exchangeDevice + _maybe_exchange_device = torch._C._xpu_maybeExchangeDevice +else: + # Define dummy if PyTorch was compiled without XPU + _XpuDeviceProperties = _dummy_type("_XpuDeviceProperties") # type: ignore[assignment, misc] + + def _exchange_device(device: int) -> int: + raise NotImplementedError("PyTorch was compiled without XPU support") + + def _maybe_exchange_device(device: int) -> int: + raise NotImplementedError("PyTorch was compiled without XPU support") + + +@lru_cache(maxsize=1) +def device_count() -> int: + r"""Return the number of XPU device available.""" + if not _is_compiled(): + return 0 + return torch._C._xpu_getDeviceCount() + + +def is_available() -> bool: + r"""Return a bool indicating if XPU is currently available.""" + # This function never throws. + return device_count() > 0 + + +def is_bf16_supported(including_emulation: bool = True) -> bool: + r"""Return a bool indicating if the current XPU device supports dtype bfloat16.""" + if not is_available(): + return False + return ( + including_emulation + or torch.xpu.get_device_properties().has_bfloat16_conversions + ) + + +def is_tf32_supported() -> bool: + r"""Return a bool indicating if the current XPU device supports dtype tf32.""" + if not is_available(): + return False + # On Intel Xe architecture and newer, TF32 operations can be accelerated + # through DPAS (Dot Product Accumulate Systolic) instructions. Therefore, + # TF32 support can be determined by checking whether the device supports + # subgroup matrix multiply-accumulate operations. + return torch.xpu.get_device_properties().has_subgroup_matrix_multiply_accumulate + + +def is_initialized(): + r"""Return whether PyTorch's XPU state has been initialized.""" + return _initialized and not _is_in_bad_fork() + + +def _lazy_call(callable, **kwargs) -> None: + if is_initialized(): + callable() + else: + global _lazy_seed_tracker + if kwargs.get("seed_all", False): + _lazy_seed_tracker.queue_seed_all(callable, traceback.format_stack()) + elif kwargs.get("seed", False): + _lazy_seed_tracker.queue_seed(callable, traceback.format_stack()) + else: + # Don't store the actual traceback to avoid memory cycle + _queued_calls.append((callable, traceback.format_stack())) + + +def init() -> None: + r"""Initialize PyTorch's XPU state. + This is a Python API about lazy initialization that avoids initializing + XPU until the first time it is accessed. Does nothing if the XPU state is + already initialized. + """ + _lazy_init() + + +def _lazy_init() -> None: + global _initialized, _queued_calls + if is_initialized() or hasattr(_tls, "is_initializing"): + return + with _initialization_lock: + # This test was was protected via GIL. Double-check whether XPU has + # already been initialized. + if is_initialized(): + return + # Stop promptly upon encountering a bad fork error. + if _is_in_bad_fork(): + raise RuntimeError( + "Cannot re-initialize XPU in forked subprocess. To use XPU with " + "multiprocessing, you must use the 'spawn' start method" + ) + if not _is_compiled(): + raise AssertionError("Torch not compiled with XPU enabled") + # This function inits XPU backend and detects bad fork processing. + torch._C._xpu_init() + # Some of the queued calls may reentrantly call _lazy_init(); We need to + # just return without initializing in that case. + _tls.is_initializing = True + + _queued_calls.extend(calls for calls in _lazy_seed_tracker.get_calls() if calls) + + try: + for queued_call, orig_traceback in _queued_calls: + try: + queued_call() + except Exception as e: + msg = ( + f"XPU call failed lazily at initialization with error: {str(e)}\n\n" + f"XPU call was originally invoked at:\n\n{''.join(orig_traceback)}" + ) + raise Exception(msg) from e # noqa: TRY002 + finally: + delattr(_tls, "is_initializing") + _initialized = True + + +class _DeviceGuard: + def __init__(self, index: int) -> None: + self.idx = index + self.prev_idx = -1 + + def __enter__(self): + self.prev_idx = torch.xpu._exchange_device(self.idx) + + def __exit__(self, type: Any, value: Any, traceback: Any): + self.idx = torch.xpu._maybe_exchange_device(self.prev_idx) + return False + + +class device: + r"""Context-manager that changes the selected device. + + Args: + device (torch.device or int or str): device index to select. It's a no-op if + this argument is a negative integer or ``None``. + """ + + def __init__(self, device: Any) -> None: + self.idx = _get_device_index(device, optional=True) + self.prev_idx = -1 + + def __enter__(self): + self.prev_idx = torch.xpu._exchange_device(self.idx) + + def __exit__(self, type: Any, value: Any, traceback: Any): + self.idx = torch.xpu._maybe_exchange_device(self.prev_idx) + return False + + +class device_of(device): + r"""Context-manager that changes the current device to that of given object. + + You can use both tensors and storages as arguments. If a given object is + not allocated on a XPU, this is a no-op. + + Args: + obj (Tensor or Storage): object allocated on the selected device. + """ + + def __init__(self, obj) -> None: + idx = obj.get_device() if obj.is_xpu else -1 + super().__init__(idx) + + +def set_device(device: _device_t) -> None: + r"""Set the current device. + + Args: + device (torch.device or int or str): selected device. This function is a + no-op if this argument is negative. + """ + _lazy_init() + device = _get_device_index(device) + if device >= 0: + torch._C._xpu_setDevice(device) + + +def get_device_name(device: _device_t | None = None) -> str: + r"""Get the name of a device. + + Args: + device (torch.device or int or str, optional): device for which to + return the name. This function is a no-op if this argument is a + negative integer. It uses the current device, given by :func:`~torch.xpu.current_device`, + if :attr:`device` is ``None`` (default). + + Returns: + str: the name of the device + """ + return get_device_properties(device).name + + +@lru_cache(None) +def get_device_capability(device: _device_t | None = None) -> dict[str, Any]: + r"""Get the xpu capability of a device. + + Args: + device (torch.device or int or str, optional): device for which to + return the device capability. This function is a no-op if this + argument is a negative integer. It uses the current device, given by + :func:`~torch.xpu.current_device`, if :attr:`device` is ``None`` + (default). + + Returns: + dict[str, Any]: the xpu capability dictionary of the device + """ + props = get_device_properties(device) + # Only keep attributes that are safe for dictionary serialization. + serializable_types = (int, float, bool, str, type(None), list, tuple, dict) + return { + key: value + for key in dir(props) + if not key.startswith("__") + and isinstance((value := getattr(props, key)), serializable_types) + } + + +def get_device_properties( + device: _device_t | None = None, +) -> _XpuDeviceProperties: # pyrefly: ignore # not-a-type + r"""Get the properties of a device. + + Args: + device (torch.device or int or str): device for which to return the + properties of the device. + + Returns: + _XpuDeviceProperties: the properties of the device + """ + _lazy_init() + device = _get_device_index(device, optional=True) + return _get_device_properties(device) # type: ignore[name-defined] # noqa: F821 + + +def current_device() -> int: + r"""Return the index of a currently selected device.""" + _lazy_init() + return torch._C._xpu_getDevice() + + +def _get_device(device: int | str | torch.device) -> torch.device: + r"""Return the torch.device type object from the passed in device. + + Args: + device (torch.device or int or str): selected device. + """ + if isinstance(device, str): + device = torch.device(device) + elif isinstance(device, int): + device = torch.device("xpu", device) + return device + + +def can_device_access_peer(device: _device_t, peer: _device_t) -> bool: + r"""Query whether a device can access a peer device's memory. + + Args: + device (torch.device or int or str): selected device. + peer (torch.device or int or str): peer device to query access to. + + Returns: + bool: ``True`` if ``device`` can access ``peer``, ``False`` otherwise. + """ + _lazy_init() + device = _get_device_index(device, optional=True) + peer = _get_device_index(peer, optional=True) + return torch._C._xpu_canDeviceAccessPeer(device, peer) + + +class StreamContext: + r"""Context-manager that selects a given stream. + + All XPU kernels queued within its context will be enqueued on a selected + stream. + + Args: + Stream (Stream): selected stream. This manager is a no-op if it's + ``None``. + .. note:: Streams are per-device. + """ + + cur_stream: Optional["torch.xpu.Stream"] + + def __init__(self, stream: Optional["torch.xpu.Stream"]) -> None: + self.stream = stream + self.idx = _get_device_index(None, True) + if self.idx is None: + self.idx = -1 # pyrefly: ignore [bad-assignment] + + def __enter__(self): + cur_stream = self.stream + if cur_stream is None or self.idx == -1: + return + self.src_prev_stream = torch.xpu.current_stream(None) + + # If the stream is not on the current device, then set the current stream on the device + if self.src_prev_stream.device != cur_stream.device: + with device(cur_stream.device): + self.dst_prev_stream = torch.xpu.current_stream(cur_stream.device) + torch.xpu.set_stream(cur_stream) + + def __exit__(self, type: Any, value: Any, traceback: Any): + cur_stream = self.stream + if cur_stream is None or self.idx == -1: + return + + # Reset the stream on the original device and destination device + if self.src_prev_stream.device != cur_stream.device: + torch.xpu.set_stream(self.dst_prev_stream) + torch.xpu.set_stream(self.src_prev_stream) + + +def stream(stream: Optional["torch.xpu.Stream"]) -> StreamContext: + r"""Wrap around the Context-manager StreamContext that selects a given stream. + + Arguments: + stream (Stream): selected stream. This manager is a no-op if it's ``None``. + """ + return StreamContext(stream) + + +def _set_stream_by_id(stream_id, device_index, device_type) -> None: + r"""set stream specified by the stream id, device index and device type + + Args: stream_id (int): not visible to the user, used to assigned to the specific stream. + device_index (int): selected device index. + device_type (int): selected device type. + """ + torch._C._xpu_setStream( + stream_id=stream_id, + device_index=device_index, + device_type=device_type, + ) + + +def set_stream(stream: Stream) -> None: + r"""Set the current stream.This is a wrapper API to set the stream. + Usage of this function is discouraged in favor of the ``stream`` + context manager. + + Args: + stream (Stream): selected stream. This function is a no-op + if this argument is ``None``. + """ + if stream is None: + return + _lazy_init() + _set_stream_by_id( + stream_id=stream.stream_id, + device_index=stream.device_index, + device_type=stream.device_type, + ) + + +def current_stream(device: _device_t | None = None) -> Stream: + r"""Return the currently selected :class:`Stream` for a given device. + + Args: + device (torch.device or int, optional): selected device. Returns + the currently selected :class:`Stream` for the current device, given + by :func:`~torch.xpu.current_device`, if :attr:`device` is ``None`` + (default). + """ + _lazy_init() + streamdata = torch._C._xpu_getCurrentStream( + _get_device_index(device, optional=True) + ) + return Stream( + stream_id=streamdata[0], device_index=streamdata[1], device_type=streamdata[2] + ) + + +def get_stream_from_external(data_ptr: int, device: _device_t | None = None) -> Stream: + r"""Return a :class:`Stream` from an external SYCL queue. + + This function is used to wrap SYCL queue created in other libraries in order + to facilitate data exchange and multi-library interactions. + + .. note:: This function doesn't manage the queue life-cycle, it is the user + responsibility to keep the referenced queue alive while this returned stream is + being used. The different SYCL queue pointers will result in distinct + :class:`Stream` objects, even if the SYCL queues they dereference are equivalent. + + Args: + data_ptr(int): Integer representation of the `sycl::queue*` value passed externally. + device(torch.device or int, optional): the device where the queue was originally created. + It is the user responsibility to ensure the device is specified correctly. + """ + _lazy_init() + streamdata = torch._C._xpu_getStreamFromExternal( + data_ptr, _get_device_index(device, optional=True) + ) + return Stream( + stream_id=streamdata[0], device_index=streamdata[1], device_type=streamdata[2] + ) + + +def synchronize(device: _device_t = None) -> None: + r"""Wait for all kernels in all streams on a XPU device to complete. + + Args: + device (torch.device or int, optional): device for which to synchronize. + It uses the current device, given by :func:`~torch.xpu.current_device`, + if :attr:`device` is ``None`` (default). + """ + _lazy_init() + device = _get_device_index(device, optional=True) + return torch._C._xpu_synchronize(device) + + +def get_arch_list() -> list[str]: + r"""Return list XPU architectures this library was compiled for.""" + if not _is_compiled(): + return [] + arch_flags = torch._C._xpu_getArchFlags() + if arch_flags is None: + return [] + return arch_flags.split() + + +def get_gencode_flags() -> str: + r"""Return XPU AOT(ahead-of-time) build flags this library was compiled with.""" + arch_list = get_arch_list() + if len(arch_list) == 0: + return "" + return f"-device {','.join(arch for arch in arch_list)}" + + +def _get_generator(device: torch.device) -> torch._C.Generator: + r"""Return the XPU Generator object for the given device. + + Args: + device (torch.device): selected device. + """ + idx = device.index + if idx is None: + idx = current_device() + return torch.xpu.default_generators[idx] + + +def _set_rng_state_offset( + offset: int, device: int | str | torch.device = "xpu" +) -> None: + r"""Set the random number generator state offset of the specified GPU. + + Args: + offset (int): The desired offset + device (torch.device or int, optional): The device to set the RNG state. + Default: ``'xpu'`` (i.e., ``torch.device('xpu')``, the current XPU device). + """ + final_device = _get_device(device) + + def cb() -> None: + default_generator = _get_generator(final_device) + default_generator.set_offset(offset) + + _lazy_call(cb) + + +def _get_rng_state_offset(device: int | str | torch.device = "xpu") -> int: + r"""Return the random number generator state offset of the specified GPU. + + Args: + device (torch.device or int, optional): The device to return the RNG state offset of. + Default: ``'xpu'`` (i.e., ``torch.device('xpu')``, the current XPU device). + + .. warning:: + This function eagerly initializes XPU. + """ + _lazy_init() + final_device = _get_device(device) + default_generator = _get_generator(final_device) + return default_generator.get_offset() + + +# import here to avoid circular import +from .memory import ( + change_current_allocator, + empty_cache, + get_per_process_memory_fraction, + max_memory_allocated, + max_memory_reserved, + mem_get_info, + memory_allocated, + memory_reserved, + memory_stats, + memory_stats_as_nested_dict, + reset_accumulated_memory_stats, + reset_peak_memory_stats, + set_per_process_memory_fraction, + XPUPluggableAllocator, +) +from .random import ( + get_rng_state, + get_rng_state_all, + initial_seed, + manual_seed, + manual_seed_all, + seed, + seed_all, + set_rng_state, + set_rng_state_all, +) + + +__all__ = [ + "Event", + "Stream", + "StreamContext", + "XPUPluggableAllocator", + "can_device_access_peer", + "change_current_allocator", + "current_device", + "current_stream", + "default_generators", + "device", + "device_of", + "device_count", + "empty_cache", + "get_arch_list", + "get_device_capability", + "get_device_name", + "get_device_properties", + "get_gencode_flags", + "get_per_process_memory_fraction", + "get_rng_state", + "get_rng_state_all", + "get_stream_from_external", + "init", + "initial_seed", + "is_available", + "is_bf16_supported", + "is_initialized", + "is_tf32_supported", + "manual_seed", + "manual_seed_all", + "max_memory_allocated", + "max_memory_reserved", + "mem_get_info", + "memory_allocated", + "memory_reserved", + "memory_stats", + "memory_stats_as_nested_dict", + "reset_accumulated_memory_stats", + "reset_peak_memory_stats", + "seed", + "seed_all", + "set_device", + "set_per_process_memory_fraction", + "set_rng_state", + "set_rng_state_all", + "set_stream", + "stream", + "streams", + "synchronize", +] diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/xpu/_gpu_trace.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/xpu/_gpu_trace.py new file mode 100644 index 0000000000000000000000000000000000000000..7c3a8b9bf785bee0d46f657d0ea1754dea3c7dcc --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/xpu/_gpu_trace.py @@ -0,0 +1,69 @@ +from collections.abc import Callable + +from torch._utils import CallbackRegistry + + +EventCreationCallbacks: "CallbackRegistry[int]" = CallbackRegistry("XPU event creation") +EventDeletionCallbacks: "CallbackRegistry[int]" = CallbackRegistry("XPU event deletion") +EventRecordCallbacks: "CallbackRegistry[int, int]" = CallbackRegistry( + "XPU event record" +) +EventWaitCallbacks: "CallbackRegistry[int, int]" = CallbackRegistry("XPU event wait") +MemoryAllocationCallbacks: "CallbackRegistry[int]" = CallbackRegistry( + "XPU memory allocation" +) +MemoryDeallocationCallbacks: "CallbackRegistry[int]" = CallbackRegistry( + "XPU memory deallocation" +) +StreamCreationCallbacks: "CallbackRegistry[int]" = CallbackRegistry( + "XPU stream creation" +) +DeviceSynchronizationCallbacks: "CallbackRegistry[[]]" = CallbackRegistry( + "XPU device synchronization" +) +StreamSynchronizationCallbacks: "CallbackRegistry[int]" = CallbackRegistry( + "XPU stream synchronization" +) +EventSynchronizationCallbacks: "CallbackRegistry[int]" = CallbackRegistry( + "XPU event synchronization" +) + + +def register_callback_for_event_creation(cb: Callable[[int], None]) -> None: + EventCreationCallbacks.add_callback(cb) + + +def register_callback_for_event_deletion(cb: Callable[[int], None]) -> None: + EventDeletionCallbacks.add_callback(cb) + + +def register_callback_for_event_record(cb: Callable[[int, int], None]) -> None: + EventRecordCallbacks.add_callback(cb) + + +def register_callback_for_event_wait(cb: Callable[[int, int], None]) -> None: + EventWaitCallbacks.add_callback(cb) + + +def register_callback_for_memory_allocation(cb: Callable[[int], None]) -> None: + MemoryAllocationCallbacks.add_callback(cb) + + +def register_callback_for_memory_deallocation(cb: Callable[[int], None]) -> None: + MemoryDeallocationCallbacks.add_callback(cb) + + +def register_callback_for_stream_creation(cb: Callable[[int], None]) -> None: + StreamCreationCallbacks.add_callback(cb) + + +def register_callback_for_device_synchronization(cb: Callable[[], None]) -> None: + DeviceSynchronizationCallbacks.add_callback(cb) + + +def register_callback_for_stream_synchronization(cb: Callable[[int], None]) -> None: + StreamSynchronizationCallbacks.add_callback(cb) + + +def register_callback_for_event_synchronization(cb: Callable[[int], None]) -> None: + EventSynchronizationCallbacks.add_callback(cb) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/xpu/_utils.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/xpu/_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..8f738267459a2791a4a33ca4bec74800a58f0b9a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/xpu/_utils.py @@ -0,0 +1,39 @@ +from typing import Any + +import torch + +# The _get_device_index has been moved to torch.utils._get_device_index +from torch._utils import _get_device_index as _torch_get_device_index + + +def _get_device_index( + device: Any, optional: bool = False, allow_cpu: bool = False +) -> int: + r"""Get the device index from :attr:`device`, which can be a torch.device + object, a Python integer, or ``None``. + + If :attr:`device` is a torch.device object, returns the device index if it + is a XPU device. Note that for a XPU device without a specified index, + i.e., ``torch.device('xpu')``, this will return the current default XPU + device if :attr:`optional` is ``True``. If :attr:`allow_cpu` is ``True``, + CPU devices will be accepted and ``-1`` will be returned in this case. + + If :attr:`device` is a Python integer, it is returned as is. + + If :attr:`device` is ``None``, this will return the current default XPU + device if :attr:`optional` is ``True``. + """ + if isinstance(device, int): + return device + if isinstance(device, str): + device = torch.device(device) + if isinstance(device, torch.device): + if allow_cpu: + if device.type not in ["xpu", "cpu"]: + raise ValueError(f"Expected a xpu or cpu device, but got: {device}") + elif device.type != "xpu": + raise ValueError(f"Expected a xpu device, but got: {device}") + if not torch.jit.is_scripting(): + if isinstance(device, torch.xpu.device): + return device.idx + return _torch_get_device_index(device, optional, allow_cpu) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/xpu/memory.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/xpu/memory.py new file mode 100644 index 0000000000000000000000000000000000000000..e9a95c7cde37c8d5d31726edb27a8fffb6730e32 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/xpu/memory.py @@ -0,0 +1,339 @@ +import collections +import ctypes +from typing import Any, Union + +import torch +from torch._utils import _dummy_type +from torch.types import Device + +from . import _get_device_index, _is_compiled, _lazy_init, is_initialized + + +if not _is_compiled(): + # Define dummy base classes + torch._C.__dict__["_xpu_XPUAllocator"] = _dummy_type("_xpu_XPUAllocator") + +_device_t = Union[Device, str, int, None] + + +def empty_cache() -> None: + r"""Release all unoccupied cached memory currently held by the caching + allocator so that those can be used in other XPU application. + + .. note:: + :func:`~torch.xpu.empty_cache` doesn't increase the amount of XPU + memory available for PyTorch. However, it may help reduce fragmentation + of XPU memory in certain cases. + """ + if is_initialized(): + torch._C._xpu_emptyCache() + + +def reset_peak_memory_stats(device: _device_t = None) -> None: + r"""Reset the "peak" stats tracked by the XPU memory allocator. + + See :func:`~torch.xpu.memory_stats` for details. Peak stats correspond to the + `"peak"` key in each individual stat dict. + + Args: + device (torch.device or int or str, optional): selected device. Returns + statistic for the current device, given by :func:`~torch.xpu.current_device`, + if :attr:`device` is ``None`` (default). + """ + device = _get_device_index(device, optional=True) + return torch._C._xpu_resetPeakMemoryStats(device) + + +def reset_accumulated_memory_stats(device: _device_t = None) -> None: + r"""Reset the "accumulated" (historical) stats tracked by the XPU memory allocator. + + See :func:`~torch.xpu.memory_stats` for details. Accumulated stats correspond to + the `"allocated"` and `"freed"` keys in each individual stat dict. + + Args: + device (torch.device or int or str, optional): selected device. Returns + statistic for the current device, given by :func:`~torch.xpu.current_device`, + if :attr:`device` is ``None`` (default). + """ + device = _get_device_index(device, optional=True) + return torch._C._xpu_resetAccumulatedMemoryStats(device) + + +def memory_stats_as_nested_dict(device: _device_t = None) -> dict[str, Any]: + r"""Return the result of :func:`~torch.xpu.memory_stats` as a nested dictionary.""" + if not is_initialized(): + return {} + device = _get_device_index(device, optional=True) + return torch._C._xpu_memoryStats(device) + + +def memory_stats(device: _device_t = None) -> dict[str, Any]: + r"""Return a dictionary of XPU memory allocator statistics for a given device. + + The return value of this function is a dictionary of statistics, each of + which is a non-negative integer. + + Core statistics: + + - ``"allocated_bytes.{all,large_pool,small_pool}.{current,peak,allocated,freed}"``: + amount of allocated memory. + - ``"reserved_bytes.{all,large_pool,small_pool}.{current,peak,allocated,freed}"``: + amount of reserved memory. + - ``"active_bytes.{all,large_pool,small_pool}.{current,peak,allocated,freed}"``: + amount of active memory. + - ``"requested_bytes.{all,large_pool,small_pool}.{current,peak,allocated,freed}"``: + memory requested by client code, compare this with allocated_bytes to check if + allocation rounding adds too much overhead. + + For these core statistics, values are broken down as follows. + + Pool type: + + - ``all``: combined statistics across all memory pools. + - ``large_pool``: statistics for the large allocation pool (for size >= 1MB allocations). + - ``small_pool``: statistics for the small allocation pool (for size < 1MB allocations). + + Metric type: + + - ``current``: current value of this metric. + - ``peak``: maximum value of this metric. + - ``allocated``: historical total increase in this metric. + - ``freed``: historical total decrease in this metric. + + Args: + device (torch.device or int or str, optional): selected device. Returns + statistics for the current device, given by :func:`~torch.xpu.current_device`, + if :attr:`device` is ``None`` (default). + """ + result = [] + + def _recurse_add_to_result(prefix: str, obj: Any) -> None: + if isinstance(obj, dict): + if len(prefix) > 0: + prefix += "." + for k, v in obj.items(): + _recurse_add_to_result(prefix + k, v) + else: + result.append((prefix, obj)) + + stats = memory_stats_as_nested_dict(device=device) + _recurse_add_to_result("", stats) + result.sort() + + return collections.OrderedDict(result) + + +def memory_allocated(device: _device_t = None) -> int: + r"""Return the current GPU memory occupied by tensors in bytes for a given device. + + Args: + device (torch.device or int or str, optional): selected device. Returns + statistic for the current device, given by :func:`~torch.xpu.current_device`, + if :attr:`device` is ``None`` (default). + + .. note:: + This is likely less than the amount shown in `xpu-smi` since some + unused memory can be held by the caching allocator and some context + needs to be created on GPU. + """ + return memory_stats(device=device).get("allocated_bytes.all.current", 0) + + +def max_memory_allocated(device: _device_t = None) -> int: + r"""Return the maximum GPU memory occupied by tensors in bytes for a given device. + + By default, this returns the peak allocated memory since the beginning of + this program. :func:`~torch.xpu.reset_peak_memory_stats` can be used to + reset the starting point in tracking this metric. For example, these two + functions can measure the peak allocated memory usage of each iteration in a + training loop. + + Args: + device (torch.device or int or str, optional): selected device. Returns + statistic for the current device, given by :func:`~torch.xpu.current_device`, + if :attr:`device` is ``None`` (default). + """ + return memory_stats(device=device).get("allocated_bytes.all.peak", 0) + + +def memory_reserved(device: _device_t = None) -> int: + r"""Return the current GPU memory managed by the caching allocator in bytes for a given device. + + Args: + device (torch.device or int or str, optional): selected device. Returns + statistic for the current device, given by :func:`~torch.xpu.current_device`, + if :attr:`device` is ``None`` (default). + """ + return memory_stats(device=device).get("reserved_bytes.all.current", 0) + + +def max_memory_reserved(device: _device_t = None) -> int: + r"""Return the maximum GPU memory managed by the caching allocator in bytes for a given device. + + By default, this returns the peak cached memory since the beginning of this + program. :func:`~torch.xpu.reset_peak_memory_stats` can be used to reset + the starting point in tracking this metric. For example, these two functions + can measure the peak cached memory amount of each iteration in a training + loop. + + Args: + device (torch.device or int or str, optional): selected device. Returns + statistic for the current device, given by :func:`~torch.xpu.current_device`, + if :attr:`device` is ``None`` (default). + """ + return memory_stats(device=device).get("reserved_bytes.all.peak", 0) + + +def mem_get_info(device: _device_t = None) -> tuple[int, int]: + r"""Return the global free and total GPU memory for a given device. + + Args: + device (torch.device or int or str, optional): selected device. Returns + statistic for the current device, given by :func:`~torch.xpu.current_device`, + if :attr:`device` is ``None`` (default). + + Returns: + int: the memory available on the device in units of bytes. + int: the total memory on the device in units of bytes + """ + _lazy_init() + device = _get_device_index(device, optional=True) + return torch._C._xpu_getMemoryInfo(device) + + +def get_per_process_memory_fraction(device: _device_t = None) -> float: + r""" + Retrieve the memory fraction currently set for a process on a given XPU device. + This fraction represents the portion of the total device memory that + the caching allocator is allowed to use. The allowed memory is calculated as: + + .. math:: \text{allowed\_memory} = \text{total\_memory} \times \text{fraction} + + Args: + device (torch.device or int or str, optional): selected device. It uses the current device, + given by :func:`~torch.xpu.current_device`, if :attr:`device` is ``None`` (default). + + Returns: + float: The memory fraction in the range 0.0 to 1.0. + """ + _lazy_init() + device = _get_device_index(device, optional=True) + return torch._C._xpu_getMemoryFraction(device) + + +def set_per_process_memory_fraction(fraction: float, device: _device_t = None) -> None: + r""" + Set the memory fraction for a single process on XPU device. + This function limits the amount of memory that the caching allocator can allocate + on the specified XPU device. The allowed memory is computed as: + + .. math:: \text{allowed\_memory} = \text{total\_memory} \times \text{fraction} + + If the process attempts to allocate more than this allowed memory, + an out-of-memory error will be raised by the allocator. + + Arguments: + fraction (float): Range: 0~1. Allowed memory equals total_memory * fraction. + device (torch.device or int or str, optional): selected device. It uses the current device, + given by :func:`~torch.xpu.current_device`, if :attr:`device` is ``None`` (default). + + .. note:: In general, the total available free memory is less than the total capacity. + """ + _lazy_init() + device = _get_device_index(device, optional=True) + if not isinstance(fraction, float): + raise TypeError("Invalid type for fraction argument, must be `float`") + # pyrefly: ignore [missing-attribute] + torch._C._xpu_setMemoryFraction(fraction, device) + + +class _XPUAllocator: + r"""Wrapper over internal XPU memory allocators.""" + + def __init__(self, allocator: torch._C._xpu_XPUAllocator): + self._allocator = allocator + + def allocator(self): + return self._allocator + + +class XPUPluggableAllocator(_XPUAllocator): + r"""XPU memory allocator loaded from a shared library.""" + + def __init__(self, path_to_lib_file: str, alloc_fn_name: str, free_fn_name: str): + r"""XPU memory allocator loaded dynamically from a shared library. + + This lets users provide custom allocation and free functions implemented + in a separate shared library. The allocator is registered through + ``torch._C._xpu_customAllocator`` and becomes available for use via + ``torch.memory.xpu.change_current_allocator``. + + Arguments: + path_to_lib_file (str): + Filesystem path to the shared library file containing the allocation + and free functions. + alloc_fn_name (str): + Name of the allocation function exported from the shared library. + The function must have the signature: + + ``void* alloc_fn(size_t size, int device, sycl::queue* queue);`` + + free_fn_name (str): + Name of the free function exported from the shared library. + The function must have the signature: + + ``void free_fn(void* ptr, size_t size, sycl::queue* queue);`` + """ + allocator_lib = ctypes.CDLL(path_to_lib_file) + + alloc_fn_ptr = getattr(allocator_lib, alloc_fn_name) + free_fn_ptr = getattr(allocator_lib, free_fn_name) + + alloc_fn_addr = ctypes.cast(alloc_fn_ptr, ctypes.c_void_p).value + free_fn_addr = ctypes.cast(free_fn_ptr, ctypes.c_void_p).value + + if alloc_fn_addr is None or free_fn_addr is None: + raise RuntimeError( + "Failed to load allocator symbols from the shared library." + ) + + self._allocator = torch._C._xpu_customAllocator(alloc_fn_addr, free_fn_addr) + + +def change_current_allocator(allocator: _XPUAllocator) -> None: + r"""Change the currently used memory allocator to be the one provided. + + .. note:: + If the current allocator has already been used/initialized, this function will error. + + Arguments: + allocator (torch.xpu.memory._XPUAllocator): allocator to be set as the active one. + """ + torch._C._xpu_changeCurrentAllocator(allocator.allocator()) + + +def _get_current_allocator() -> _XPUAllocator: + r"""Return the allocator being currently used. + + Returns: + _XPUAllocator: the allocator being currently used. + """ + return _XPUAllocator(torch._C._xpu_getAllocator()) + + +__all__ = [ + "XPUPluggableAllocator", + "change_current_allocator", + "empty_cache", + "get_per_process_memory_fraction", + "max_memory_allocated", + "max_memory_reserved", + "mem_get_info", + "memory_allocated", + "memory_reserved", + "memory_stats", + "memory_stats_as_nested_dict", + "reset_accumulated_memory_stats", + "reset_peak_memory_stats", + "set_per_process_memory_fraction", +] diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/xpu/random.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/xpu/random.py new file mode 100644 index 0000000000000000000000000000000000000000..f58e49e29d1a93954353f6f24cb0696a37e17d23 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/xpu/random.py @@ -0,0 +1,176 @@ +# mypy: allow-untyped-defs +from collections.abc import Iterable + +import torch +from torch import Tensor + +from . import _lazy_call, _lazy_init, current_device, device_count, is_initialized + + +def get_rng_state(device: int | str | torch.device = "xpu") -> Tensor: + r"""Return the random number generator state of the specified GPU as a ByteTensor. + + Args: + device (torch.device or int, optional): The device to return the RNG state of. + Default: ``'xpu'`` (i.e., ``torch.device('xpu')``, the current XPU device). + + .. warning:: + This function eagerly initializes XPU. + """ + _lazy_init() + if isinstance(device, str): + device = torch.device(device) + elif isinstance(device, int): + device = torch.device("xpu", device) + idx = device.index + if idx is None: + idx = current_device() + default_generator = torch.xpu.default_generators[idx] + return default_generator.get_state() + + +def get_rng_state_all() -> list[Tensor]: + r"""Return a list of ByteTensor representing the random number states of all devices.""" + results = [get_rng_state(i) for i in range(device_count())] + return results + + +def set_rng_state(new_state: Tensor, device: int | str | torch.device = "xpu") -> None: + r"""Set the random number generator state of the specified GPU. + + Args: + new_state (torch.ByteTensor): The desired state + device (torch.device or int, optional): The device to set the RNG state. + Default: ``'xpu'`` (i.e., ``torch.device('xpu')``, the current XPU device). + """ + if not is_initialized(): + with torch._C._DisableFuncTorch(): + new_state = new_state.clone(memory_format=torch.contiguous_format) + + if isinstance(device, str): + device = torch.device(device) + elif isinstance(device, int): + device = torch.device("xpu", device) + + def cb() -> None: + idx = device.index + if idx is None: + idx = current_device() + default_generator = torch.xpu.default_generators[idx] + default_generator.set_state(new_state) + + _lazy_call(cb) + + +def set_rng_state_all(new_states: Iterable[Tensor]) -> None: + r"""Set the random number generator state of all devices. + + Args: + new_states (Iterable of torch.ByteTensor): The desired state for each device. + """ + for i, state in enumerate(new_states): + set_rng_state(state, i) + + +def manual_seed(seed: int) -> None: + r"""Set the seed for generating random numbers for the current GPU. + + It's safe to call this function if XPU is not available; in that case, it is silently ignored. + + Args: + seed (int): The desired seed. + + .. warning:: + If you are working with a multi-GPU model, this function is insufficient + to get determinism. To seed all GPUs, use :func:`manual_seed_all`. + """ + seed = int(seed) + + def cb() -> None: + idx = current_device() + default_generator = torch.xpu.default_generators[idx] + default_generator.manual_seed(seed) + + _lazy_call(cb, seed=True) + + +def manual_seed_all(seed: int) -> None: + r"""Set the seed for generating random numbers on all GPUs. + + It's safe to call this function if XPU is not available; in that case, it is silently ignored. + + Args: + seed (int): The desired seed. + """ + seed = int(seed) + + def cb() -> None: + for i in range(device_count()): + default_generator = torch.xpu.default_generators[i] + default_generator.manual_seed(seed) + + _lazy_call(cb, seed_all=True) + + +def seed() -> None: + r"""Set the seed for generating random numbers to a random number for the current GPU. + + It's safe to call this function if XPU is not available; in that case, it is silently ignored. + + .. warning:: + If you are working with a multi-GPU model, this function will only initialize + the seed on one GPU. To initialize all GPUs, use :func:`seed_all`. + """ + + def cb() -> None: + idx = current_device() + default_generator = torch.xpu.default_generators[idx] + default_generator.seed() + + _lazy_call(cb) + + +def seed_all() -> None: + r"""Set the seed for generating random numbers to a random number on all GPUs. + + It's safe to call this function if XPU is not available; in that case, it is silently ignored. + """ + + def cb() -> None: + random_seed = 0 + seeded = False + for i in range(device_count()): + default_generator = torch.xpu.default_generators[i] + if not seeded: + default_generator.seed() + random_seed = default_generator.initial_seed() + seeded = True + else: + default_generator.manual_seed(random_seed) + + _lazy_call(cb) + + +def initial_seed() -> int: + r"""Return the current random seed of the current GPU. + + .. warning:: + This function eagerly initializes XPU. + """ + _lazy_init() + idx = current_device() + default_generator = torch.xpu.default_generators[idx] + return default_generator.initial_seed() + + +__all__ = [ + "get_rng_state", + "get_rng_state_all", + "set_rng_state", + "set_rng_state_all", + "manual_seed", + "manual_seed_all", + "seed", + "seed_all", + "initial_seed", +] diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/xpu/streams.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/xpu/streams.py new file mode 100644 index 0000000000000000000000000000000000000000..2a12d1a96d36cb09bbe1763e7f19c3d65b2df5f6 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torch/xpu/streams.py @@ -0,0 +1,174 @@ +# mypy: allow-untyped-defs +# pylint: disable=useless-parent-delegation +import ctypes + +import torch +from torch._utils import _dummy_type + + +if not hasattr(torch._C, "_XpuStreamBase"): + # Define dummy base classes + torch._C.__dict__["_XpuStreamBase"] = _dummy_type("_XpuStreamBase") + torch._C.__dict__["_XpuEventBase"] = _dummy_type("_XpuEventBase") + + +class Stream(torch._C._XpuStreamBase): + r"""Wrapper around a XPU stream. + + A XPU stream is a linear sequence of execution that belongs to a specific + device, independent from other streams. It supports with statement as a + context manager to ensure the operators within the with block are running + on the corresponding stream. + + Args: + device(torch.device or int, optional): a device on which to allocate + the stream. If :attr:`device` is ``None`` (default) or a negative + integer, this will use the current device. + priority(int, optional): priority of the stream, which can be positive, 0, or negative. + A lower number indicates a higher priority. By default, the priority is set to 0. + If the value falls outside of the allowed priority range, it will automatically be + mapped to the nearest valid priority (lowest for large positive numbers or + highest for large negative numbers). + """ + + def __new__(cls, device=None, priority=0, **kwargs): + # setting device manager is expensive, so we avoid it unless necessary + if device is None or ("stream_id" in kwargs and "device_index" in kwargs): + return super().__new__(cls, priority=priority, **kwargs) + else: + with torch.xpu.device(device): + return super().__new__(cls, priority=priority, **kwargs) + + def wait_event(self, event) -> None: + r"""Make all future work submitted to the stream wait for an event. + + Args: + event (torch.xpu.Event): an event to wait for. + """ + event.wait(self) + + def wait_stream(self, stream) -> None: + r"""Synchronize with another stream. + + All future work submitted to this stream will wait until all kernels + submitted to a given stream at the time of call complete. + + Args: + stream (Stream): a stream to synchronize. + """ + self.wait_event(stream.record_event()) + + def record_event(self, event=None): + r"""Record an event. + + Args: + event (torch.xpu.Event, optional): event to record. If not given, a new one + will be allocated. + + Returns: + Recorded event. + """ + if event is None: + event = Event() + event.record(self) + return event + + def query(self) -> bool: + r"""Check if all the work submitted has been completed. + + Returns: + A boolean indicating if all kernels in this stream are completed. + """ + return super().query() + + def synchronize(self) -> None: + r"""Wait for all the kernels in this stream to complete.""" + super().synchronize() + + @property + def _as_parameter_(self): + return ctypes.c_void_p(self.sycl_queue) + + def __eq__(self, o): + if isinstance(o, Stream): + return super().__eq__(o) + return False + + def __hash__(self): + return hash((self.sycl_queue, self.device)) + + def __repr__(self) -> str: + return f"torch.xpu.Stream(device={self.device} sycl_queue={self.sycl_queue:#x})" + + +class Event(torch._C._XpuEventBase): + r"""Wrapper around a XPU event. + + XPU events are synchronization markers that can be used to monitor the + device's progress, and to synchronize XPU streams. + + The underlying XPU events are lazily initialized when the event is first + recorded. After creation, only streams on the same device may record the + event. However, streams on any device can wait on the event. + + Args: + enable_timing (bool, optional): indicates if the event should measure time + (default: ``False``) + """ + + def __new__(cls, enable_timing=False): + return super().__new__(cls, enable_timing=enable_timing) + + def record(self, stream=None) -> None: + r"""Record the event in a given stream. + + Uses ``torch.xpu.current_stream()`` if no stream is specified. The + stream's device must match the event's device. + """ + if stream is None: + stream = torch.xpu.current_stream() + super().record(stream) # pyrefly: ignore [bad-argument-type] + + def wait(self, stream=None) -> None: + r"""Make all future work submitted to the given stream wait for this event. + + Use ``torch.xpu.current_stream()`` if no stream is specified. + """ + if stream is None: + stream = torch.xpu.current_stream() + super().wait(stream) + + def query(self) -> bool: + r"""Check if all work currently captured by event has completed. + + Returns: + A boolean indicating if all work currently captured by event has + completed. + """ + return super().query() + + def elapsed_time(self, end_event): + r"""Return the time elapsed. + + Time reported in milliseconds after the event was recorded and + before the end_event was recorded. + """ + return super().elapsed_time(end_event) + + def synchronize(self) -> None: + r"""Wait for the event to complete. + + Waits until the completion of all work currently captured in this event. + This prevents the CPU thread from proceeding until the event completes. + """ + super().synchronize() + + @property + def _as_parameter_(self): + return ctypes.c_void_p(self.sycl_event) + + def __repr__(self) -> str: + if self.sycl_event: + return f"torch.xpu.Event(sycl_event={self.sycl_event:#x})" + else: + return "torch.xpu.Event(uninitialized)" diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio-2.10.0.dist-info/INSTALLER b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio-2.10.0.dist-info/INSTALLER new file mode 100644 index 0000000000000000000000000000000000000000..a1b589e38a32041e49332e5e81c2d363dc418d68 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio-2.10.0.dist-info/INSTALLER @@ -0,0 +1 @@ +pip diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio-2.10.0.dist-info/METADATA b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio-2.10.0.dist-info/METADATA new file mode 100644 index 0000000000000000000000000000000000000000..1c5cc4e7649bca90cd37ee3d7c3de7ba21cf5b65 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio-2.10.0.dist-info/METADATA @@ -0,0 +1,133 @@ +Metadata-Version: 2.4 +Name: torchaudio +Version: 2.10.0 +Summary: An audio package for PyTorch +Home-page: https://github.com/pytorch/audio +Author: Soumith Chintala, David Pollack, Sean Naren, Peter Goldsborough, Moto Hira, Caroline Chen, Jeff Hwang, Zhaoheng Ni, Xiaohui Zhang +Author-email: soumith@pytorch.org +Maintainer: Moto Hira, Caroline Chen, Jeff Hwang, Zhaoheng Ni, Xiaohui Zhang +Maintainer-email: moto@meta.com +Classifier: Environment :: Plugins +Classifier: Intended Audience :: Developers +Classifier: Intended Audience :: Science/Research +Classifier: License :: OSI Approved :: BSD License +Classifier: Operating System :: MacOS :: MacOS X +Classifier: Operating System :: Microsoft :: Windows +Classifier: Operating System :: POSIX +Classifier: Programming Language :: C++ +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 +Classifier: Programming Language :: Python :: 3.13 +Classifier: Programming Language :: Python :: 3.14 +Classifier: Programming Language :: Python :: Implementation :: CPython +Classifier: Topic :: Multimedia :: Sound/Audio +Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence +Description-Content-Type: text/markdown +License-File: LICENSE +Requires-Dist: torch==2.10.0 +Dynamic: author +Dynamic: author-email +Dynamic: classifier +Dynamic: description +Dynamic: description-content-type +Dynamic: home-page +Dynamic: license-file +Dynamic: maintainer +Dynamic: maintainer-email +Dynamic: requires-dist +Dynamic: summary + +torchaudio: an audio library for PyTorch +======================================== + +[![Documentation](https://img.shields.io/badge/dynamic/json.svg?label=docs&url=https%3A%2F%2Fpypi.org%2Fpypi%2Ftorchaudio%2Fjson&query=%24.info.version&colorB=brightgreen&prefix=v)](https://pytorch.org/audio/main/) +[![Anaconda Badge](https://anaconda.org/pytorch/torchaudio/badges/downloads.svg)](https://anaconda.org/pytorch/torchaudio) +[![Anaconda-Server Badge](https://anaconda.org/pytorch/torchaudio/badges/platforms.svg)](https://anaconda.org/pytorch/torchaudio) + +![TorchAudio Logo](docs/source/_static/img/logo.png) + +> [!NOTE] +> **We have transitioned TorchAudio into a +> maintenance phase. This process removed some user-facing +> features. These features were deprecated from TorchAudio 2.8 and removed in 2.9. +> Our main goals were to reduce redundancies with the rest of the +> PyTorch ecosystem, make it easier to maintain, and create a version of +> TorchAudio that is more tightly scoped to its strengths: processing audio +> data for ML. Please see +> [our community message](https://github.com/pytorch/audio/issues/3902) +> for more details.** + +The aim of torchaudio is to apply [PyTorch](https://github.com/pytorch/pytorch) to +the audio domain. By supporting PyTorch, torchaudio follows the same philosophy +of providing strong GPU acceleration, having a focus on trainable features through +the autograd system, and having consistent style (tensor names and dimension names). +Therefore, it is primarily a machine learning library and not a general signal +processing library. The benefits of PyTorch can be seen in torchaudio through +having all the computations be through PyTorch operations which makes it easy +to use and feel like a natural extension. + +- [Dataloaders for common audio datasets](http://pytorch.org/audio/main/datasets.html) +- Audio and speech processing functions + - [forced_align](https://pytorch.org/audio/main/generated/torchaudio.functional.forced_align.html) +- Common audio transforms + - [Spectrogram, AmplitudeToDB, MelScale, MelSpectrogram, MFCC, MuLawEncoding, MuLawDecoding, Resample](http://pytorch.org/audio/main/transforms.html) +- Compliance interfaces: Run code using PyTorch that align with other libraries + - [Kaldi: spectrogram, fbank, mfcc](https://pytorch.org/audio/main/compliance.kaldi.html) + +Installation +------------ + +Please refer to https://pytorch.org/audio/main/installation.html for installation and build process of TorchAudio. + + +API Reference +------------- + +API Reference is located here: http://pytorch.org/audio/main/ + +Contributing Guidelines +----------------------- + +Please refer to [CONTRIBUTING.md](./CONTRIBUTING.md) + +Citation +-------- + +If you find this package useful, please cite as: + +```bibtex +@article{yang2021torchaudio, + title={TorchAudio: Building Blocks for Audio and Speech Processing}, + author={Yao-Yuan Yang and Moto Hira and Zhaoheng Ni and Anjali Chourdia and Artyom Astafurov and Caroline Chen and Ching-Feng Yeh and Christian Puhrsch and David Pollack and Dmitriy Genzel and Donny Greenberg and Edward Z. Yang and Jason Lian and Jay Mahadeokar and Jeff Hwang and Ji Chen and Peter Goldsborough and Prabhat Roy and Sean Narenthiran and Shinji Watanabe and Soumith Chintala and Vincent Quenneville-Bélair and Yangyang Shi}, + journal={arXiv preprint arXiv:2110.15018}, + year={2021} +} +``` + +```bibtex +@misc{hwang2023torchaudio, + title={TorchAudio 2.1: Advancing speech recognition, self-supervised learning, and audio processing components for PyTorch}, + author={Jeff Hwang and Moto Hira and Caroline Chen and Xiaohui Zhang and Zhaoheng Ni and Guangzhi Sun and Pingchuan Ma and Ruizhe Huang and Vineel Pratap and Yuekai Zhang and Anurag Kumar and Chin-Yun Yu and Chuang Zhu and Chunxi Liu and Jacob Kahn and Mirco Ravanelli and Peng Sun and Shinji Watanabe and Yangyang Shi and Yumeng Tao and Robin Scheibler and Samuele Cornell and Sean Kim and Stavros Petridis}, + year={2023}, + eprint={2310.17864}, + archivePrefix={arXiv}, + primaryClass={eess.AS} +} +``` + +Disclaimer on Datasets +---------------------- + +This is a utility library that downloads and prepares public datasets. We do not host or distribute these datasets, vouch for their quality or fairness, or claim that you have license to use the dataset. It is your responsibility to determine whether you have permission to use the dataset under the dataset's license. + +If you're a dataset owner and wish to update any part of it (description, citation, etc.), or do not want your dataset to be included in this library, please get in touch through a GitHub issue. Thanks for your contribution to the ML community! + +Pre-trained Model License +------------------------- + +The pre-trained models provided in this library may have their own licenses or terms and conditions derived from the dataset used for training. It is your responsibility to determine whether you have permission to use the models for your use case. + +For instance, SquimSubjective model is released under the Creative Commons Attribution Non Commercial 4.0 International (CC-BY-NC 4.0) license. See [the link](https://zenodo.org/record/4660670#.ZBtWPOxuerN) for additional details. + +Other pre-trained models that have different license are noted in documentation. Please checkout the [documentation page](https://pytorch.org/audio/main/). diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio-2.10.0.dist-info/RECORD b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio-2.10.0.dist-info/RECORD new file mode 100644 index 0000000000000000000000000000000000000000..7a6173224b41219e316dab2a30a3f75b06f0cbdb --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio-2.10.0.dist-info/RECORD @@ -0,0 +1,166 @@ +torchaudio-2.10.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +torchaudio-2.10.0.dist-info/METADATA,sha256=iVZ1FZzwnoNIHArVvdibkJl7IzVG38BtuM9RD9VL12o,6913 +torchaudio-2.10.0.dist-info/RECORD,, +torchaudio-2.10.0.dist-info/WHEEL,sha256=yzF9ixp0XVYLhnovZSdud9vspTPdVe52BzwI7Tv3jTM,113 +torchaudio-2.10.0.dist-info/licenses/LICENSE,sha256=k6WIYahYzBCOa2uDPgjnbosqZjOeSoAHyKWowf-cQNY,1338 +torchaudio-2.10.0.dist-info/top_level.txt,sha256=mPKWMIRWWW2JwbJN6wRckeN1gpbjhifapAF0Z9t7SMo,11 +torchaudio/__init__.py,sha256=8OB3EPGCViF7LgBWy_bUyZUF6HJUIpbTI8ouRGwn6lU,7878 +torchaudio/__pycache__/__init__.cpython-310.pyc,, +torchaudio/__pycache__/_torchcodec.cpython-310.pyc,, +torchaudio/__pycache__/version.cpython-310.pyc,, +torchaudio/_extension/__init__.py,sha256=5tYNtMOvBClgGF5RLoxU_x1JtAB54D7C-edCYYVdWfo,1371 +torchaudio/_extension/__pycache__/__init__.cpython-310.pyc,, +torchaudio/_extension/__pycache__/utils.cpython-310.pyc,, +torchaudio/_extension/utils.py,sha256=UQCObmKAsgdHhXU2dQYYxyFXwfdTsBO9bnrQmpQNN_I,4926 +torchaudio/_internal/__init__.py,sha256=gjU8g9HhVd9hHrHXJM0xOlZL6cT8ktO60MN8RHI6ZbA,241 +torchaudio/_internal/__pycache__/__init__.cpython-310.pyc,, +torchaudio/_internal/__pycache__/module_utils.cpython-310.pyc,, +torchaudio/_internal/module_utils.py,sha256=88W0xr_xbTUjzBOkglM2v0cT2VvmaEi92Zmb9N1jT4g,2417 +torchaudio/_torchcodec.py,sha256=Z1TpONctbL80DufuWhLRj4dC0rVhjKu6hOYeglcLwvU,13424 +torchaudio/compliance/__init__.py,sha256=hhNObUS0c-fS-VMudM7zl3-CvupvCDmESlikntSMn5g,48 +torchaudio/compliance/__pycache__/__init__.cpython-310.pyc,, +torchaudio/compliance/__pycache__/kaldi.cpython-310.pyc,, +torchaudio/compliance/kaldi.py,sha256=XL6hpYTd6nSPb2imIdeU4TM06I2fqh1AmG968y8ZbSk,36666 +torchaudio/datasets/__init__.py,sha256=taRr3duDaEK1Pfzj9N1dFuZpXfy8e4uFItcJiRLAQwQ,1171 +torchaudio/datasets/__pycache__/__init__.cpython-310.pyc,, +torchaudio/datasets/__pycache__/cmuarctic.cpython-310.pyc,, +torchaudio/datasets/__pycache__/cmudict.cpython-310.pyc,, +torchaudio/datasets/__pycache__/commonvoice.cpython-310.pyc,, +torchaudio/datasets/__pycache__/dr_vctk.cpython-310.pyc,, +torchaudio/datasets/__pycache__/fluentcommands.cpython-310.pyc,, +torchaudio/datasets/__pycache__/gtzan.cpython-310.pyc,, +torchaudio/datasets/__pycache__/iemocap.cpython-310.pyc,, +torchaudio/datasets/__pycache__/librilight_limited.cpython-310.pyc,, +torchaudio/datasets/__pycache__/librimix.cpython-310.pyc,, +torchaudio/datasets/__pycache__/librispeech.cpython-310.pyc,, +torchaudio/datasets/__pycache__/librispeech_biasing.cpython-310.pyc,, +torchaudio/datasets/__pycache__/libritts.cpython-310.pyc,, +torchaudio/datasets/__pycache__/ljspeech.cpython-310.pyc,, +torchaudio/datasets/__pycache__/musdb_hq.cpython-310.pyc,, +torchaudio/datasets/__pycache__/quesst14.cpython-310.pyc,, +torchaudio/datasets/__pycache__/snips.cpython-310.pyc,, +torchaudio/datasets/__pycache__/speechcommands.cpython-310.pyc,, +torchaudio/datasets/__pycache__/tedlium.cpython-310.pyc,, +torchaudio/datasets/__pycache__/utils.cpython-310.pyc,, +torchaudio/datasets/__pycache__/vctk.cpython-310.pyc,, +torchaudio/datasets/__pycache__/voxceleb1.cpython-310.pyc,, +torchaudio/datasets/__pycache__/yesno.cpython-310.pyc,, +torchaudio/datasets/cmuarctic.py,sha256=TgIrDnPXTKCZwHpJUPTgFQTeVTEYMnRpitg6iKpt09U,7084 +torchaudio/datasets/cmudict.py,sha256=9OEpNDYpyqeEyinAnyGIU8FampDj7ziSOHRwJLIlq2M,5990 +torchaudio/datasets/commonvoice.py,sha256=9khedUCmdEkCKPU6_r8VWz6I2VdJokatuziZ6BxJMZs,2763 +torchaudio/datasets/dr_vctk.py,sha256=Km4-tKllAgnOKCuq66YRWhTlNWmC7D0Xz3dAttRRGSo,4377 +torchaudio/datasets/fluentcommands.py,sha256=u3tkO4-AAaTWdbRQi6lIvad4x2plZgXM39KljGtmRsw,3245 +torchaudio/datasets/gtzan.py,sha256=I5dRP_QGuQ1joXWRwZwtvpwi22uZTb8QZm9Mr2W55Mg,24357 +torchaudio/datasets/iemocap.py,sha256=X_WCoXOzRqcWRRRoUtY0AlD9SJcUUOACIcgbV0irt48,4930 +torchaudio/datasets/librilight_limited.py,sha256=fAwpX0hEMze5aV57BP7rjBLwRiZa3Aje_NXi_3o16wA,4179 +torchaudio/datasets/librimix.py,sha256=VtKOhf6VJc1ysWCvUvh0SbtjOkXJChmBM_BhoSkg_2A,5116 +torchaudio/datasets/librispeech.py,sha256=zkzJFWchWs4AktYAI-ghmWH4ZeJ84C0uDo9E1_pTgSI,6308 +torchaudio/datasets/librispeech_biasing.py,sha256=d-02tyrXI-CSGbXBFYFcnM_yT8WSGABHfpNiFxyadL0,6958 +torchaudio/datasets/libritts.py,sha256=EtWOoCDz7_qGLZF5YcZfnHaLxH4Y8QJCnopafLiqFno,5870 +torchaudio/datasets/ljspeech.py,sha256=92NeLQsC1iKpqfiMkKKbcJDpaYdZKVdVEBQJze1wmxY,3494 +torchaudio/datasets/musdb_hq.py,sha256=TYKjpat6JKr9bkFqUecu7_hRdshRfQP2UbknaYR3Q0U,5075 +torchaudio/datasets/quesst14.py,sha256=QyGd4fMS820ATbP8YgBtu7bSSK09pw5RZklsPJ8Jf0Y,4455 +torchaudio/datasets/snips.py,sha256=WaYUknGFM3rnLklOj5ZYHSX5mhlf_Ce4p3LBZdA9yJc,5008 +torchaudio/datasets/speechcommands.py,sha256=cLSgiVYlQjEOuYPpFeAtcXSGirraH4IMoP8p9WIvUoY,7481 +torchaudio/datasets/tedlium.py,sha256=a8Hf2QvOki7_chgXcMAFMk-piTjodktfnc3HRbUVJkU,8698 +torchaudio/datasets/utils.py,sha256=P6nckh2YrAfOPMphHlxyfI-HBmNg39DTlxQ8-asG4MY,1703 +torchaudio/datasets/vctk.py,sha256=twR_n8LyQcT8A_HrJoMx3RkaVrRXXZAnIVU1d0E0npQ,5699 +torchaudio/datasets/voxceleb1.py,sha256=9vU0ftB4-2usO8ZiEUKR_IQTEdHhA0M8l9scXCNehnw,11725 +torchaudio/datasets/yesno.py,sha256=4sgfMeSxz8HaRDk6A2UIFP-20q29MwEO_r8DoEtfbvE,3026 +torchaudio/functional/__init__.py,sha256=F4-n94hvyjPamNS_h5lqwPzRuRj_K23xSlkXFJN4mzw,2322 +torchaudio/functional/__pycache__/__init__.cpython-310.pyc,, +torchaudio/functional/__pycache__/_alignment.cpython-310.pyc,, +torchaudio/functional/__pycache__/filtering.cpython-310.pyc,, +torchaudio/functional/__pycache__/functional.cpython-310.pyc,, +torchaudio/functional/_alignment.py,sha256=NveQ74x8PmleuB-Ka9eEYYyshbV7nYc0g-Tu3NGHdz0,4739 +torchaudio/functional/filtering.py,sha256=rML8MismfehSeglw65kUkfugoP6XDtWcs_XhCl6aJM4,62325 +torchaudio/functional/functional.py,sha256=eLS1uofyEy4ecLpJOiAmk-vGZgMiodTRpARGLn_nmEg,94520 +torchaudio/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torchaudio/lib/__pycache__/__init__.cpython-310.pyc,, +torchaudio/lib/_torchaudio.so,sha256=Nw1knBehCbZVSRwLrYDed1Sohg_W5gq8-_GHzggmGiI,170080 +torchaudio/lib/libctc_prefix_decoder.so,sha256=pjTdwKoHQDMnwHH55y5MU1u6Qp4d4j6IctHZrC9Qhmk,6268592 +torchaudio/lib/libtorchaudio.so,sha256=3HtbyWWzpldIGtTu_X9HFtJydzZObcIcZxFMdS2xslM,2033648 +torchaudio/lib/pybind11_prefixctc.so,sha256=iaywOO29C9meiBNfcWN3akA1b5n1J0KtqNMHFpJTE_0,272912 +torchaudio/models/__init__.py,sha256=BNMNGuwpJAFRsdtwHYQ6slGClkrUTu31_7mXh7FjeV4,1995 +torchaudio/models/__pycache__/__init__.cpython-310.pyc,, +torchaudio/models/__pycache__/_hdemucs.cpython-310.pyc,, +torchaudio/models/__pycache__/conformer.cpython-310.pyc,, +torchaudio/models/__pycache__/conv_tasnet.cpython-310.pyc,, +torchaudio/models/__pycache__/deepspeech.cpython-310.pyc,, +torchaudio/models/__pycache__/emformer.cpython-310.pyc,, +torchaudio/models/__pycache__/rnnt.cpython-310.pyc,, +torchaudio/models/__pycache__/rnnt_decoder.cpython-310.pyc,, +torchaudio/models/__pycache__/tacotron2.cpython-310.pyc,, +torchaudio/models/__pycache__/wav2letter.cpython-310.pyc,, +torchaudio/models/__pycache__/wavernn.cpython-310.pyc,, +torchaudio/models/_hdemucs.py,sha256=VPnQ73lA9lfAxRjZ85NCGJYP36mPNwTjS-TU4qelu_k,38242 +torchaudio/models/conformer.py,sha256=5IceU-jcZKofkHTTqRKoytubQ75MzZPrPlfkLsIlxeA,10068 +torchaudio/models/conv_tasnet.py,sha256=v-DI_Ej9FCBBbSH-Spkh3tzq8rkBhbQNA-Wp52Uf32E,12540 +torchaudio/models/decoder/__init__.py,sha256=4IS_DyQageh2_uY3YE1aBCYEE3HArCFd8ZUfbgww-Tc,1206 +torchaudio/models/decoder/__pycache__/__init__.cpython-310.pyc,, +torchaudio/models/decoder/__pycache__/_ctc_decoder.cpython-310.pyc,, +torchaudio/models/decoder/__pycache__/_cuda_ctc_decoder.cpython-310.pyc,, +torchaudio/models/decoder/_ctc_decoder.py,sha256=AmLQAcm4Q4bFPqnq-SF7Lpvg2QPK88xyio8ol_OJjvU,20086 +torchaudio/models/decoder/_cuda_ctc_decoder.py,sha256=xFrj1cTEsS-MxAO5Vgdutcb3kTb7Jv-OFhS6cmfFKhA,7186 +torchaudio/models/deepspeech.py,sha256=kQW3B6YcjYuq7xRzWjRJFGr7ZNraY9gMYDTxII7Cgtg,2746 +torchaudio/models/emformer.py,sha256=ncDeEcYegUmIKQoDBoufUhVWj4dYpZAXxLX0qmEqt1A,37766 +torchaudio/models/rnnt.py,sha256=jz66nwDd1qGT6KQR1lbA_urPktygewhm0FH66T7P3Ek,35541 +torchaudio/models/rnnt_decoder.py,sha256=IwlDsuw1SA-uCRrXGMBqm05auGFSha2bZ-8BOImnK0c,12839 +torchaudio/models/squim/__init__.py,sha256=b98nAaL28Q4w3lrqd_6wUd0An-xNhhJn4Tj8oZlzQnc,346 +torchaudio/models/squim/__pycache__/__init__.cpython-310.pyc,, +torchaudio/models/squim/__pycache__/objective.cpython-310.pyc,, +torchaudio/models/squim/__pycache__/subjective.cpython-310.pyc,, +torchaudio/models/squim/objective.py,sha256=gvUasz7RpqgKeGf04yHUotshSIzH3KzjW90-iHeDo2g,12281 +torchaudio/models/squim/subjective.py,sha256=N00kILSPm0akWyNsrNYKmHgZmooo8gbyUm5IVLf7bx8,5797 +torchaudio/models/tacotron2.py,sha256=FimYhGSI8FKwWb87CLk4h3yKWatCU2HvFmU1t5WUn4E,45914 +torchaudio/models/wav2letter.py,sha256=KNcq4p0qZG2Bwfdakv7YwLCvi_yGT-qB4fJwGMuFQhg,3278 +torchaudio/models/wav2vec2/__init__.py,sha256=WlafukV6GwuSNh0CZifrYUt4V5l59kjvGX7AZNonjfk,927 +torchaudio/models/wav2vec2/__pycache__/__init__.cpython-310.pyc,, +torchaudio/models/wav2vec2/__pycache__/components.cpython-310.pyc,, +torchaudio/models/wav2vec2/__pycache__/model.cpython-310.pyc,, +torchaudio/models/wav2vec2/__pycache__/wavlm_attention.cpython-310.pyc,, +torchaudio/models/wav2vec2/components.py,sha256=DRmW-GHYf-JReCg_0l1ovNWJBnAavePO3S2vPY-1ze4,47077 +torchaudio/models/wav2vec2/model.py,sha256=Z2VN6KbDOOdq5JtP7lxPQebwYqsxKms1Eu4IjDJtZaQ,60092 +torchaudio/models/wav2vec2/utils/__init__.py,sha256=qmMbz4HAN5kEEyl4cSGm_JQZI47beyh4witydPC_qns,181 +torchaudio/models/wav2vec2/utils/__pycache__/__init__.cpython-310.pyc,, +torchaudio/models/wav2vec2/utils/__pycache__/import_fairseq.cpython-310.pyc,, +torchaudio/models/wav2vec2/utils/__pycache__/import_huggingface.cpython-310.pyc,, +torchaudio/models/wav2vec2/utils/import_fairseq.py,sha256=oCwG6qpG0bCXue2V56fjDcC8cA2rgy4b3O_nu_FI9ZY,9198 +torchaudio/models/wav2vec2/utils/import_huggingface.py,sha256=1nVCipp-lOUAyl_-P103DWLUeTOZi9X_ffX93bOXxEk,5946 +torchaudio/models/wav2vec2/wavlm_attention.py,sha256=1DU_pkoLCeHQwSF4lJ06cez0PsMVoXNxiYKP0Yv0qFQ,10844 +torchaudio/models/wavernn.py,sha256=5xUyao5g69jRXX4ReNi4mP_aTSIonJPP6XcPrqKybEk,15446 +torchaudio/pipelines/__init__.py,sha256=Xy8NmInKwTcNBHwLTTjHjrfczRLuQq8a67ENt1OTVXM,2745 +torchaudio/pipelines/__pycache__/__init__.cpython-310.pyc,, +torchaudio/pipelines/__pycache__/_source_separation_pipeline.cpython-310.pyc,, +torchaudio/pipelines/__pycache__/_squim_pipeline.cpython-310.pyc,, +torchaudio/pipelines/__pycache__/rnnt_pipeline.cpython-310.pyc,, +torchaudio/pipelines/_source_separation_pipeline.py,sha256=ogWakvaOv6OegmREcbagvfIm0jNWjzEtsdMYTialRNk,4225 +torchaudio/pipelines/_squim_pipeline.py,sha256=852SYXqUZDgTPegL7LqgVQr0PXG94da_DTDF2bwDhVE,6282 +torchaudio/pipelines/_tts/__init__.py,sha256=PP7l8XzVURqelwuMJFgfOCv4fvzZunDiy90ZQlRkv7g,426 +torchaudio/pipelines/_tts/__pycache__/__init__.cpython-310.pyc,, +torchaudio/pipelines/_tts/__pycache__/impl.cpython-310.pyc,, +torchaudio/pipelines/_tts/__pycache__/interface.cpython-310.pyc,, +torchaudio/pipelines/_tts/__pycache__/utils.cpython-310.pyc,, +torchaudio/pipelines/_tts/impl.py,sha256=Tig4_5sITJADwxN5eZGek7Ath_-e3sV8CTM5t6UpeUU,15374 +torchaudio/pipelines/_tts/interface.py,sha256=yUaS0UK3PTRruYXRWFil7lAhr-1iYiyBaDBLmEnJPUQ,10224 +torchaudio/pipelines/_tts/utils.py,sha256=KGrFoetCZ4l4FJkINFptAc8Pvrbo9e4QQhCIMCp8NYY,4810 +torchaudio/pipelines/_wav2vec2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torchaudio/pipelines/_wav2vec2/__pycache__/__init__.cpython-310.pyc,, +torchaudio/pipelines/_wav2vec2/__pycache__/aligner.cpython-310.pyc,, +torchaudio/pipelines/_wav2vec2/__pycache__/impl.cpython-310.pyc,, +torchaudio/pipelines/_wav2vec2/__pycache__/utils.cpython-310.pyc,, +torchaudio/pipelines/_wav2vec2/aligner.py,sha256=pIWRgQ-kdYUxtL8bdc0qk9wBjwRrHY1uSWL3L4e2vxs,2709 +torchaudio/pipelines/_wav2vec2/impl.py,sha256=zdXFjytJO5MvnB-3aygzUUFKxCTkQGU_OX_rhUh9c0k,65561 +torchaudio/pipelines/_wav2vec2/utils.py,sha256=Q8_fWOR2JDnHu0TTRmHzRjI3BOJa0hGIAl0cjtALgsQ,6971 +torchaudio/pipelines/rnnt_pipeline.py,sha256=56nQnCcjY4xewDqXR1Rkrh_hyoK42CsYumpU8mUNs1w,13753 +torchaudio/transforms/__init__.py,sha256=XQsROPk4YKZmiHR5l527NQkSjG-Tt_zTqb_pCBelyu0,1269 +torchaudio/transforms/__pycache__/__init__.cpython-310.pyc,, +torchaudio/transforms/__pycache__/_multi_channel.cpython-310.pyc,, +torchaudio/transforms/__pycache__/_transforms.cpython-310.pyc,, +torchaudio/transforms/_multi_channel.py,sha256=GZ2rrwFt2KtSG7At7kS9Bqh1KmYYw0HwcUnEjc-AWr8,22221 +torchaudio/transforms/_transforms.py,sha256=p2kN8glo8lN_oWhODncaRvcleoKP2pc2SsAnFV0OcEM,86917 +torchaudio/utils/__init__.py,sha256=adAdfYm9DJBC2JXxRCTrjxOUU1vKJ9w3rFke-DzKKqU,70 +torchaudio/utils/__pycache__/__init__.cpython-310.pyc,, +torchaudio/utils/__pycache__/download.cpython-310.pyc,, +torchaudio/utils/download.py,sha256=gZA7CijUoAu3Q0Qd6dKpFQAEjcdnxR6xOT59lTgEIOo,2883 +torchaudio/version.py,sha256=lpQnB8qliiG2JZs6gQ8jJKoxPeGC42kXEA1K4P-0Uy0,86 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio-2.10.0.dist-info/WHEEL b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio-2.10.0.dist-info/WHEEL new file mode 100644 index 0000000000000000000000000000000000000000..296667c0520a9eb33ddac307bd393b232c1b8ee2 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio-2.10.0.dist-info/WHEEL @@ -0,0 +1,5 @@ +Wheel-Version: 1.0 +Generator: setuptools (80.9.0) +Root-Is-Purelib: false +Tag: cp310-cp310-manylinux_2_28_x86_64 + diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio-2.10.0.dist-info/licenses/LICENSE b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio-2.10.0.dist-info/licenses/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..1bec23eaf1dd562ae3d3216420b1b1bbfbd39cbc --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio-2.10.0.dist-info/licenses/LICENSE @@ -0,0 +1,25 @@ +BSD 2-Clause License + +Copyright (c) 2017 Facebook Inc. (Soumith Chintala), +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio-2.10.0.dist-info/top_level.txt b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio-2.10.0.dist-info/top_level.txt new file mode 100644 index 0000000000000000000000000000000000000000..3daffcdd3d8f90b1f600c41c0f21cc75922902e8 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio-2.10.0.dist-info/top_level.txt @@ -0,0 +1 @@ +torchaudio diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6e2a9652976aa4fc166c9e151eee09d3a80896e0 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/__init__.py @@ -0,0 +1,204 @@ +import os +from typing import BinaryIO, Optional, Tuple, Union + +import torch + +# Initialize extension and backend first +from . import _extension # noqa # usort: skip +from . import compliance, datasets, functional, models, pipelines, transforms, utils # noqa: F401 +from ._torchcodec import load_with_torchcodec, save_with_torchcodec + + +try: + from .version import __version__, git_version # noqa: F401 +except ImportError: + pass + + +def load( + uri: Union[BinaryIO, str, os.PathLike], + frame_offset: int = 0, + num_frames: int = -1, + normalize: bool = True, + channels_first: bool = True, + format: Optional[str] = None, + buffer_size: int = 4096, + backend: Optional[str] = None, +) -> Tuple[torch.Tensor, int]: + """Load audio data from source using TorchCodec's AudioDecoder. + + .. note:: + + As of TorchAudio 2.9, this function relies on TorchCodec's decoding capabilities under the hood. It is + provided for convenience, but we do recommend that you port your code to + natively use ``torchcodec``'s ``AudioDecoder`` class for better + performance: + https://docs.pytorch.org/torchcodec/stable/generated/torchcodec.decoders.AudioDecoder. + Because of the reliance on Torchcodec, the parameters ``normalize``, ``buffer_size``, and + ``backend`` are ignored and accepted only for backwards compatibility. + To install torchcodec, follow the instructions at https://github.com/pytorch/torchcodec#installing-torchcodec. + + + Args: + uri (path-like object or file-like object): + Source of audio data. The following types are accepted: + + * ``path-like``: File path or URL. + * ``file-like``: Object with ``read(size: int) -> bytes`` method. + + frame_offset (int, optional): + Number of samples to skip before start reading data. + num_frames (int, optional): + Maximum number of samples to read. ``-1`` reads all the remaining samples, + starting from ``frame_offset``. + normalize (bool, optional): + TorchCodec always returns normalized float32 samples. This parameter + is ignored and a warning is issued if set to False. + Default: ``True``. + channels_first (bool, optional): + When True, the returned Tensor has dimension `[channel, time]`. + Otherwise, the returned Tensor's dimension is `[time, channel]`. + format (str or None, optional): + Format hint for the decoder. May not be supported by all TorchCodec + decoders. (Default: ``None``) + buffer_size (int, optional): + Not used by TorchCodec AudioDecoder. Provided for API compatibility. + backend (str or None, optional): + Not used by TorchCodec AudioDecoder. Provided for API compatibility. + + Returns: + (torch.Tensor, int): Resulting Tensor and sample rate. + Always returns float32 tensors. If ``channels_first=True``, shape is + `[channel, time]`, otherwise `[time, channel]`. + + Raises: + ImportError: If torchcodec is not available. + ValueError: If unsupported parameters are used. + RuntimeError: If TorchCodec fails to decode the audio. + + Note: + - TorchCodec always returns normalized float32 samples, so the ``normalize`` + parameter has no effect. + - The ``buffer_size`` and ``backend`` parameters are ignored. + - Not all audio formats supported by torchaudio backends may be supported + by TorchCodec. + """ + return load_with_torchcodec( + uri, + frame_offset=frame_offset, + num_frames=num_frames, + normalize=normalize, + channels_first=channels_first, + format=format, + buffer_size=buffer_size, + backend=backend, + ) + + +def save( + uri: Union[str, os.PathLike], + src: torch.Tensor, + sample_rate: int, + channels_first: bool = True, + format: Optional[str] = None, + encoding: Optional[str] = None, + bits_per_sample: Optional[int] = None, + buffer_size: int = 4096, + backend: Optional[str] = None, + compression: Optional[Union[float, int]] = None, +) -> None: + """Save audio data to file using TorchCodec's AudioEncoder. + + .. note:: + + As of TorchAudio 2.9, this function relies on TorchCodec's encoding capabilities under the hood. + It is provided for convenience, but we do recommend that you port your code to + natively use ``torchcodec``'s ``AudioEncoder`` class for better + performance: + https://docs.pytorch.org/torchcodec/stable/generated/torchcodec.encoders.AudioEncoder. + Because of the reliance on Torchcodec, the parameters ``format``, ``encoding``, + ``bits_per_sample``, ``buffer_size``, and ``backend``, are ignored and accepted only for + backwards compatibility. + To install torchcodec, follow the instructions at https://github.com/pytorch/torchcodec#installing-torchcodec. + + Args: + uri (path-like object): + Path to save the audio file. The file extension determines the format. + + src (torch.Tensor): + Audio data to save. Must be a 1D or 2D tensor with float32 values + in the range [-1, 1]. If 2D, shape should be [channel, time] when + channels_first=True, or [time, channel] when channels_first=False. + + sample_rate (int): + Sample rate of the audio data. + + channels_first (bool, optional): + Indicates whether the input tensor has channels as the first dimension. + If True, expects [channel, time]. If False, expects [time, channel]. + Default: True. + + format (str or None, optional): + Audio format hint. Not used by TorchCodec (format is determined by + file extension). A warning is issued if provided. + Default: None. + + encoding (str or None, optional): + Audio encoding. Not fully supported by TorchCodec AudioEncoder. + A warning is issued if provided. Default: None. + + bits_per_sample (int or None, optional): + Bits per sample. Not directly supported by TorchCodec AudioEncoder. + A warning is issued if provided. Default: None. + + buffer_size (int, optional): + Not used by TorchCodec AudioEncoder. Provided for API compatibility. + A warning is issued if not default value. Default: 4096. + + backend (str or None, optional): + Not used by TorchCodec AudioEncoder. Provided for API compatibility. + A warning is issued if provided. Default: None. + + compression (float, int or None, optional): + Compression level or bit rate. Maps to bit_rate parameter in + TorchCodec AudioEncoder. Default: None. + + Raises: + ImportError: If torchcodec is not available. + ValueError: If input parameters are invalid. + RuntimeError: If TorchCodec fails to encode the audio. + + Note: + - TorchCodec AudioEncoder expects float32 samples in [-1, 1] range. + - Some parameters (format, encoding, bits_per_sample, buffer_size, backend) + are not used by TorchCodec but are provided for API compatibility. + - The output format is determined by the file extension in the uri. + - TorchCodec uses FFmpeg under the hood for encoding. + """ + return save_with_torchcodec( + uri, + src, + sample_rate, + channels_first=channels_first, + format=format, + encoding=encoding, + bits_per_sample=bits_per_sample, + buffer_size=buffer_size, + backend=backend, + compression=compression, + ) + + +__all__ = [ + "load", + "load_with_torchcodec", + "save_with_torchcodec", + "save", + "compliance", + "datasets", + "functional", + "models", + "pipelines", + "utils", + "transforms", +] diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/_extension/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/_extension/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..16f5dac74148fddf9db0b2d8303e7917ee813e39 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/_extension/__init__.py @@ -0,0 +1,47 @@ +import logging +import os +import sys + +from torchaudio._internal.module_utils import fail_with_message, is_module_available, no_op + +from .utils import _check_cuda_version, _init_dll_path, _load_lib + +_LG = logging.getLogger(__name__) + + +# Note: +# `_check_cuda_version` is not meant to be used by regular users. +# Builder uses it for debugging purpose, so we export it. +# https://github.com/pytorch/builder/blob/e2e4542b8eb0bdf491214451a1a4128bd606cce2/test/smoke_test/smoke_test.py#L80 +__all__ = [ + "_check_cuda_version", + "_IS_TORCHAUDIO_EXT_AVAILABLE", +] + + +if os.name == "nt" and (3, 8) <= sys.version_info < (3, 9): + _init_dll_path() + + +# When the extension module is built, we initialize it. +# In case of an error, we do not catch the failure as it suggests there is something +# wrong with the installation. +_IS_TORCHAUDIO_EXT_AVAILABLE = is_module_available("torchaudio.lib._torchaudio") +_IS_ALIGN_AVAILABLE = False +if _IS_TORCHAUDIO_EXT_AVAILABLE: + _load_lib("libtorchaudio") + + import torchaudio.lib._torchaudio # noqa + + _check_cuda_version() + _IS_ALIGN_AVAILABLE = torchaudio.lib._torchaudio.is_align_available() + + +fail_if_no_align = ( + no_op + if _IS_ALIGN_AVAILABLE + else fail_with_message( + "Requires alignment extension, but TorchAudio is not compiled with it. \ + Please build TorchAudio with alignment support." + ) +) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/_extension/utils.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/_extension/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..bc1dc1404a8f0be35a8abd85bae93e99000817e7 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/_extension/utils.py @@ -0,0 +1,133 @@ +"""Module to implement logics used for initializing extensions. + +The implementations here should be stateless. +They should not depend on external state. +Anything that depends on external state should happen in __init__.py +""" +import logging +import os +import types +from pathlib import Path + +import torch + +_LG = logging.getLogger(__name__) +_LIB_DIR = Path(__file__).parent.parent / "lib" + + +def _get_lib_path(lib: str): + suffix = "pyd" if os.name == "nt" else "so" + path = _LIB_DIR / f"{lib}.{suffix}" + return path + + +def _load_lib(lib: str) -> bool: + """Load extension module + + Note: + In case `torchaudio` is deployed with `pex` format, the library file + is not in a standard location. + In this case, we expect that `libtorchaudio` is available somewhere + in the search path of dynamic loading mechanism, so that importing + `_torchaudio` will have library loader find and load `libtorchaudio`. + This is the reason why the function should not raising an error when the library + file is not found. + + Returns: + bool: + True if the library file is found AND the library loaded without failure. + False if the library file is not found (like in the case where torchaudio + is deployed with pex format, thus the shared library file is + in a non-standard location.). + If the library file is found but there is an issue loading the library, + (such as missing dependency) then this function raises the exception as-is. + + Raises: + Exception: + If the library file is found, but there is an issue loading the library file, + (when underlying `ctype.DLL` throws an exception), this function will pass + the exception as-is, instead of catching it and returning bool. + The expected case is `OSError` thrown by `ctype.DLL` when a dynamic dependency + is not found. + This behavior was chosen because the expected failure case is not recoverable. + If a dependency is missing, then users have to install it. + """ + path = _get_lib_path(lib) + if not path.exists(): + return False + torch.ops.load_library(path) + return True + + +class _LazyImporter(types.ModuleType): + """Lazily import module/extension.""" + + def __init__(self, name, import_func): + super().__init__(name) + self.import_func = import_func + self.module = None + + # Note: + # Python caches what was retrieved with `__getattr__`, so this method will not be + # called again for the same item. + def __getattr__(self, item): + self._import_once() + return getattr(self.module, item) + + def __repr__(self): + if self.module is None: + return f"" + return repr(self.module) + + def __dir__(self): + self._import_once() + return dir(self.module) + + def _import_once(self): + if self.module is None: + self.module = self.import_func() + # Note: + # By attaching the module attributes to self, + # module attributes are directly accessible. + # This allows to avoid calling __getattr__ for every attribute access. + self.__dict__.update(self.module.__dict__) + + def is_available(self): + try: + self._import_once() + except Exception: + return False + return True + + +def _init_dll_path(): + # On Windows Python-3.8+ has `os.add_dll_directory` call, + # which is called to configure dll search path. + # To find cuda related dlls we need to make sure the + # conda environment/bin path is configured Please take a look: + # https://stackoverflow.com/questions/59330863/cant-import-dll-module-in-python + # Please note: if some path can't be added using add_dll_directory we simply ignore this path + for path in os.environ.get("PATH", "").split(";"): + if os.path.exists(path): + try: + os.add_dll_directory(path) + except Exception: + pass + + +def _check_cuda_version(): + import torchaudio.lib._torchaudio + + version = torchaudio.lib._torchaudio.cuda_version() + if version is not None and torch.version.cuda is not None: + version_str = str(version) + ta_version = f"{version_str[:-3]}.{version_str[-2]}" + t_version = torch.version.cuda.split(".") + t_version = f"{t_version[0]}.{t_version[1]}" + if ta_version != t_version: + raise RuntimeError( + "Detected that PyTorch and TorchAudio were compiled with different CUDA versions. " + f"PyTorch has CUDA version {t_version} whereas TorchAudio has CUDA version {ta_version}. " + "Please install the TorchAudio version that matches your PyTorch version." + ) + return version diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/_internal/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/_internal/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..363e94f13bb5059ab6888af2fb60314699f1ab1e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/_internal/__init__.py @@ -0,0 +1,10 @@ +try: + from .fb import download_url_to_file, load_state_dict_from_url +except ImportError: + from torch.hub import download_url_to_file, load_state_dict_from_url + + +__all__ = [ + "load_state_dict_from_url", + "download_url_to_file", +] diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/_internal/module_utils.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/_internal/module_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..8159668361e75485a3baa5052cfab8a668d83cb1 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/_internal/module_utils.py @@ -0,0 +1,76 @@ +import importlib.util +import os +from functools import wraps + + +def eval_env(var, default): + """Check if environment varable has True-y value""" + if var not in os.environ: + return default + + val = os.environ.get(var, "0") + trues = ["1", "true", "TRUE", "on", "ON", "yes", "YES"] + falses = ["0", "false", "FALSE", "off", "OFF", "no", "NO"] + if val in trues: + return True + if val not in falses: + # fmt: off + raise RuntimeError( + f"Unexpected environment variable value `{var}={val}`. " + f"Expected one of {trues + falses}") + # fmt: on + return False + + +def is_module_available(*modules: str) -> bool: + r"""Returns if a top-level module with :attr:`name` exists *without** + importing it. This is generally safer than try-catch block around a + `import X`. It avoids third party libraries breaking assumptions of some of + our tests, e.g., setting multiprocessing start method when imported + (see librosa/#747, torchvision/#544). + """ + return all(importlib.util.find_spec(m) is not None for m in modules) + + +def requires_module(*modules: str): + """Decorate function to give error message if invoked without required optional modules. + + This decorator is to give better error message to users rather + than raising ``NameError: name 'module' is not defined`` at random places. + """ + missing = [m for m in modules if not is_module_available(m)] + + if not missing: + # fall through. If all the modules are available, no need to decorate + def decorator(func): + return func + + else: + req = f"module: {missing[0]}" if len(missing) == 1 else f"modules: {missing}" + + def decorator(func): + @wraps(func) + def wrapped(*args, **kwargs): + raise RuntimeError(f"{func.__module__}.{func.__name__} requires {req}") + + return wrapped + + return decorator + + +def fail_with_message(message): + """Generate decorator to give users message about missing TorchAudio extension.""" + + def decorator(func): + @wraps(func) + def wrapped(*args, **kwargs): + raise RuntimeError(f"{func.__module__}.{func.__name__} {message}") + + return wrapped + + return decorator + + +def no_op(func): + """Op-op decorator. Used in place of fail_with_message when a functionality that requires extension works fine.""" + return func diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/_torchcodec.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/_torchcodec.py new file mode 100644 index 0000000000000000000000000000000000000000..a785fe50ad33adc9bf970ad29c40da703e056cdf --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/_torchcodec.py @@ -0,0 +1,340 @@ +"""TorchCodec integration for TorchAudio.""" + +import os +from typing import BinaryIO, Optional, Tuple, Union + +import torch + + +def load_with_torchcodec( + uri: Union[BinaryIO, str, os.PathLike], + frame_offset: int = 0, + num_frames: int = -1, + normalize: bool = True, + channels_first: bool = True, + format: Optional[str] = None, + buffer_size: int = 4096, + backend: Optional[str] = None, +) -> Tuple[torch.Tensor, int]: + """Load audio data from source using TorchCodec's AudioDecoder. + + .. note:: + + This function supports the same API as :func:`~torchaudio.load`, and + relies on TorchCodec's decoding capabilities under the hood. It is + provided for convenience, but we do recommend that you port your code to + natively use ``torchcodec``'s ``AudioDecoder`` class for better + performance: + https://docs.pytorch.org/torchcodec/stable/generated/torchcodec.decoders.AudioDecoder. + As of TorchAudio 2.9, :func:`~torchaudio.load` relies on + :func:`~torchaudio.load_with_torchcodec`. Note that some parameters of + :func:`~torchaudio.load`, like ``normalize``, ``buffer_size``, and + ``backend``, are ignored by :func:`~torchaudio.load_with_torchcodec`. + To install torchcodec, follow the instructions at https://github.com/pytorch/torchcodec#installing-torchcodec. + + + Args: + uri (path-like object or file-like object): + Source of audio data. The following types are accepted: + + * ``path-like``: File path or URL. + * ``file-like``: Object with ``read(size: int) -> bytes`` method. + + frame_offset (int, optional): + Number of samples to skip before start reading data. + num_frames (int, optional): + Maximum number of samples to read. ``-1`` reads all the remaining samples, + starting from ``frame_offset``. + normalize (bool, optional): + TorchCodec always returns normalized float32 samples. This parameter + is ignored and a warning is issued if set to False. + Default: ``True``. + channels_first (bool, optional): + When True, the returned Tensor has dimension `[channel, time]`. + Otherwise, the returned Tensor's dimension is `[time, channel]`. + format (str or None, optional): + Format hint for the decoder. May not be supported by all TorchCodec + decoders. (Default: ``None``) + buffer_size (int, optional): + Not used by TorchCodec AudioDecoder. Provided for API compatibility. + backend (str or None, optional): + Not used by TorchCodec AudioDecoder. Provided for API compatibility. + + Returns: + (torch.Tensor, int): Resulting Tensor and sample rate. + Always returns float32 tensors. If ``channels_first=True``, shape is + `[channel, time]`, otherwise `[time, channel]`. + + Raises: + ImportError: If torchcodec is not available. + ValueError: If unsupported parameters are used. + RuntimeError: If TorchCodec fails to decode the audio. + + Note: + - TorchCodec always returns normalized float32 samples, so the ``normalize`` + parameter has no effect. + - The ``buffer_size`` and ``backend`` parameters are ignored. + - Not all audio formats supported by torchaudio backends may be supported + by TorchCodec. + """ + # Import torchcodec here to provide clear error if not available + try: + from torchcodec.decoders import AudioDecoder + except ImportError as e: + raise ImportError( + "TorchCodec is required for load_with_torchcodec. " "Please install torchcodec to use this function." + ) from e + + # Parameter validation and warnings + if not normalize: + import warnings + + warnings.warn( + "TorchCodec AudioDecoder always returns normalized float32 samples. " + "The 'normalize=False' parameter is ignored.", + UserWarning, + stacklevel=2, + ) + + if buffer_size != 4096: + import warnings + + warnings.warn("The 'buffer_size' parameter is not used by TorchCodec AudioDecoder.", UserWarning, stacklevel=2) + + if backend is not None: + import warnings + + warnings.warn("The 'backend' parameter is not used by TorchCodec AudioDecoder.", UserWarning, stacklevel=2) + + if format is not None: + import warnings + + warnings.warn("The 'format' parameter is not supported by TorchCodec AudioDecoder.", UserWarning, stacklevel=2) + + # Create AudioDecoder + try: + decoder = AudioDecoder(uri) + except Exception as e: + raise RuntimeError(f"Failed to create AudioDecoder for {uri}: {e}") from e + + # Get sample rate from metadata + sample_rate = decoder.metadata.sample_rate + if sample_rate is None: + raise RuntimeError("Unable to determine sample rate from audio metadata") + + # Decode the entire file first, then subsample manually + # This is the simplest approach since torchcodec uses time-based indexing + try: + audio_samples = decoder.get_all_samples() + except Exception as e: + raise RuntimeError(f"Failed to decode audio samples: {e}") from e + + data = audio_samples.data + + # Apply frame_offset and num_frames (which are actually sample offsets) + if frame_offset > 0: + if frame_offset >= data.shape[1]: + # Return empty tensor if offset is beyond available data + empty_shape = (data.shape[0], 0) if channels_first else (0, data.shape[0]) + return torch.zeros(empty_shape, dtype=torch.float32), sample_rate + data = data[:, frame_offset:] + + if num_frames == 0: + # Return empty tensor if num_frames is 0 + empty_shape = (data.shape[0], 0) if channels_first else (0, data.shape[0]) + return torch.zeros(empty_shape, dtype=torch.float32), sample_rate + elif num_frames > 0: + data = data[:, :num_frames] + + # TorchCodec returns data in [channel, time] format by default + # Handle channels_first parameter + if not channels_first: + data = data.transpose(0, 1) # [channel, time] -> [time, channel] + + return data, sample_rate + + +def save_with_torchcodec( + uri: Union[str, os.PathLike], + src: torch.Tensor, + sample_rate: int, + channels_first: bool = True, + format: Optional[str] = None, + encoding: Optional[str] = None, + bits_per_sample: Optional[int] = None, + buffer_size: int = 4096, + backend: Optional[str] = None, + compression: Optional[Union[float, int]] = None, +) -> None: + """Save audio data to file using TorchCodec's AudioEncoder. + + .. note:: + + This function supports the same API as :func:`~torchaudio.save`, and + relies on TorchCodec's encoding capabilities under the hood. It is + provided for convenience, but we do recommend that you port your code to + natively use ``torchcodec``'s ``AudioEncoder`` class for better + performance: + https://docs.pytorch.org/torchcodec/stable/generated/torchcodec.encoders.AudioEncoder. + As of TorchAudio 2.9, :func:`~torchaudio.save` relies on + :func:`~torchaudio.save_with_torchcodec`. Note that some parameters of + :func:`~torchaudio.save`, like ``format``, ``encoding``, + ``bits_per_sample``, ``buffer_size``, and ``backend``, are ignored by + are ignored by :func:`~torchaudio.save_with_torchcodec`. + To install torchcodec, follow the instructions at https://github.com/pytorch/torchcodec#installing-torchcodec. + + This function provides a TorchCodec-based alternative to torchaudio.save + with the same API. TorchCodec's AudioEncoder provides efficient encoding + with FFmpeg under the hood. + + Args: + uri (path-like object): + Path to save the audio file. The file extension determines the format. + + src (torch.Tensor): + Audio data to save. Must be a 1D or 2D tensor with float32 values + in the range [-1, 1]. If 2D, shape should be [channel, time] when + channels_first=True, or [time, channel] when channels_first=False. + + sample_rate (int): + Sample rate of the audio data. + + channels_first (bool, optional): + Indicates whether the input tensor has channels as the first dimension. + If True, expects [channel, time]. If False, expects [time, channel]. + Default: True. + + format (str or None, optional): + Audio format hint. Not used by TorchCodec (format is determined by + file extension). A warning is issued if provided. + Default: None. + + encoding (str or None, optional): + Audio encoding. Not fully supported by TorchCodec AudioEncoder. + A warning is issued if provided. Default: None. + + bits_per_sample (int or None, optional): + Bits per sample. Not directly supported by TorchCodec AudioEncoder. + A warning is issued if provided. Default: None. + + buffer_size (int, optional): + Not used by TorchCodec AudioEncoder. Provided for API compatibility. + A warning is issued if not default value. Default: 4096. + + backend (str or None, optional): + Not used by TorchCodec AudioEncoder. Provided for API compatibility. + A warning is issued if provided. Default: None. + + compression (float, int or None, optional): + Compression level or bit rate. Maps to bit_rate parameter in + TorchCodec AudioEncoder. Default: None. + + Raises: + ImportError: If torchcodec is not available. + ValueError: If input parameters are invalid. + RuntimeError: If TorchCodec fails to encode the audio. + + Note: + - TorchCodec AudioEncoder expects float32 samples in [-1, 1] range. + - Some parameters (format, encoding, bits_per_sample, buffer_size, backend) + are not used by TorchCodec but are provided for API compatibility. + - The output format is determined by the file extension in the uri. + - TorchCodec uses FFmpeg under the hood for encoding. + """ + # Import torchcodec here to provide clear error if not available + try: + from torchcodec.encoders import AudioEncoder + except ImportError as e: + raise ImportError( + "TorchCodec is required for save_with_torchcodec. " "Please install torchcodec to use this function." + ) from e + + # Parameter validation and warnings + if format is not None: + import warnings + + warnings.warn( + "The 'format' parameter is not used by TorchCodec AudioEncoder. " + "Format is determined by the file extension.", + UserWarning, + stacklevel=2, + ) + + if encoding is not None: + import warnings + + warnings.warn( + "The 'encoding' parameter is not fully supported by TorchCodec AudioEncoder.", UserWarning, stacklevel=2 + ) + + if bits_per_sample is not None: + import warnings + + warnings.warn( + "The 'bits_per_sample' parameter is not directly supported by TorchCodec AudioEncoder.", + UserWarning, + stacklevel=2, + ) + + if buffer_size != 4096: + import warnings + + warnings.warn("The 'buffer_size' parameter is not used by TorchCodec AudioEncoder.", UserWarning, stacklevel=2) + + if backend is not None: + import warnings + + warnings.warn("The 'backend' parameter is not used by TorchCodec AudioEncoder.", UserWarning, stacklevel=2) + + # Input validation + if not isinstance(src, torch.Tensor): + raise ValueError(f"Expected src to be a torch.Tensor, got {type(src)}") + + if src.dtype != torch.float32: + src = src.float() + + if sample_rate <= 0: + raise ValueError(f"sample_rate must be positive, got {sample_rate}") + + # Handle tensor shape and channels_first + if src.ndim == 1: + # Convert to 2D: [1, time] for channels_first=True + if channels_first: + data = src.unsqueeze(0) # [1, time] + else: + # For channels_first=False, input is [time] -> reshape to [time, 1] -> transpose to [1, time] + data = src.unsqueeze(1).transpose(0, 1) # [time, 1] -> [1, time] + elif src.ndim == 2: + if channels_first: + data = src # Already [channel, time] + else: + data = src.transpose(0, 1) # [time, channel] -> [channel, time] + else: + raise ValueError(f"Expected 1D or 2D tensor, got {src.ndim}D tensor") + + # Create AudioEncoder + try: + encoder = AudioEncoder(data, sample_rate=sample_rate) + except Exception as e: + raise RuntimeError(f"Failed to create AudioEncoder: {e}") from e + + # Determine bit_rate from compression parameter + bit_rate = None + if compression is not None: + if isinstance(compression, (int, float)): + bit_rate = int(compression) + else: + import warnings + + warnings.warn( + f"Unsupported compression type {type(compression)}. " + "TorchCodec AudioEncoder expects int or float for bit_rate.", + UserWarning, + stacklevel=2, + ) + + # Save to file + try: + encoder.to_file(uri, bit_rate=bit_rate) + except Exception as e: + raise RuntimeError(f"Failed to save audio to {uri}: {e}") from e diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/compliance/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/compliance/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..65579b4f01ba09695860717f1e6cd90d6e42b631 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/compliance/__init__.py @@ -0,0 +1,5 @@ +from . import kaldi + +__all__ = [ + "kaldi", +] diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/compliance/kaldi.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/compliance/kaldi.py new file mode 100644 index 0000000000000000000000000000000000000000..98358f40b522facc0abdfbaceec45f5887e00e54 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/compliance/kaldi.py @@ -0,0 +1,813 @@ +import math +from typing import Tuple + +import torch +import torchaudio +from torch import Tensor + +__all__ = [ + "get_mel_banks", + "inverse_mel_scale", + "inverse_mel_scale_scalar", + "mel_scale", + "mel_scale_scalar", + "spectrogram", + "fbank", + "mfcc", + "vtln_warp_freq", + "vtln_warp_mel_freq", +] + +# numeric_limits::epsilon() 1.1920928955078125e-07 +EPSILON = torch.tensor(torch.finfo(torch.float).eps) +# 1 milliseconds = 0.001 seconds +MILLISECONDS_TO_SECONDS = 0.001 + +# window types +HAMMING = "hamming" +HANNING = "hanning" +POVEY = "povey" +RECTANGULAR = "rectangular" +BLACKMAN = "blackman" +WINDOWS = [HAMMING, HANNING, POVEY, RECTANGULAR, BLACKMAN] + + +def _get_epsilon(device, dtype): + return EPSILON.to(device=device, dtype=dtype) + + +def _next_power_of_2(x: int) -> int: + r"""Returns the smallest power of 2 that is greater than x""" + return 1 if x == 0 else 2 ** (x - 1).bit_length() + + +def _get_strided(waveform: Tensor, window_size: int, window_shift: int, snip_edges: bool) -> Tensor: + r"""Given a waveform (1D tensor of size ``num_samples``), it returns a 2D tensor (m, ``window_size``) + representing how the window is shifted along the waveform. Each row is a frame. + + Args: + waveform (Tensor): Tensor of size ``num_samples`` + window_size (int): Frame length + window_shift (int): Frame shift + snip_edges (bool): If True, end effects will be handled by outputting only frames that completely fit + in the file, and the number of frames depends on the frame_length. If False, the number of frames + depends only on the frame_shift, and we reflect the data at the ends. + + Returns: + Tensor: 2D tensor of size (m, ``window_size``) where each row is a frame + """ + assert waveform.dim() == 1 + num_samples = waveform.size(0) + strides = (window_shift * waveform.stride(0), waveform.stride(0)) + + if snip_edges: + if num_samples < window_size: + return torch.empty((0, 0), dtype=waveform.dtype, device=waveform.device) + else: + m = 1 + (num_samples - window_size) // window_shift + else: + reversed_waveform = torch.flip(waveform, [0]) + m = (num_samples + (window_shift // 2)) // window_shift + pad = window_size // 2 - window_shift // 2 + pad_right = reversed_waveform + if pad > 0: + # torch.nn.functional.pad returns [2,1,0,1,2] for 'reflect' + # but we want [2, 1, 0, 0, 1, 2] + pad_left = reversed_waveform[-pad:] + waveform = torch.cat((pad_left, waveform, pad_right), dim=0) + else: + # pad is negative so we want to trim the waveform at the front + waveform = torch.cat((waveform[-pad:], pad_right), dim=0) + + sizes = (m, window_size) + return waveform.as_strided(sizes, strides) + + +def _feature_window_function( + window_type: str, + window_size: int, + blackman_coeff: float, + device: torch.device, + dtype: int, +) -> Tensor: + r"""Returns a window function with the given type and size""" + if window_type == HANNING: + return torch.hann_window(window_size, periodic=False, device=device, dtype=dtype) + elif window_type == HAMMING: + return torch.hamming_window(window_size, periodic=False, alpha=0.54, beta=0.46, device=device, dtype=dtype) + elif window_type == POVEY: + # like hanning but goes to zero at edges + return torch.hann_window(window_size, periodic=False, device=device, dtype=dtype).pow(0.85) + elif window_type == RECTANGULAR: + return torch.ones(window_size, device=device, dtype=dtype) + elif window_type == BLACKMAN: + a = 2 * math.pi / (window_size - 1) + window_function = torch.arange(window_size, device=device, dtype=dtype) + # can't use torch.blackman_window as they use different coefficients + return ( + blackman_coeff + - 0.5 * torch.cos(a * window_function) + + (0.5 - blackman_coeff) * torch.cos(2 * a * window_function) + ).to(device=device, dtype=dtype) + else: + raise Exception("Invalid window type " + window_type) + + +def _get_log_energy(strided_input: Tensor, epsilon: Tensor, energy_floor: float) -> Tensor: + r"""Returns the log energy of size (m) for a strided_input (m,*)""" + device, dtype = strided_input.device, strided_input.dtype + log_energy = torch.max(strided_input.pow(2).sum(1), epsilon).log() # size (m) + if energy_floor == 0.0: + return log_energy + return torch.max(log_energy, torch.tensor(math.log(energy_floor), device=device, dtype=dtype)) + + +def _get_waveform_and_window_properties( + waveform: Tensor, + channel: int, + sample_frequency: float, + frame_shift: float, + frame_length: float, + round_to_power_of_two: bool, + preemphasis_coefficient: float, +) -> Tuple[Tensor, int, int, int]: + r"""Gets the waveform and window properties""" + channel = max(channel, 0) + assert channel < waveform.size(0), "Invalid channel {} for size {}".format(channel, waveform.size(0)) + waveform = waveform[channel, :] # size (n) + window_shift = int(sample_frequency * frame_shift * MILLISECONDS_TO_SECONDS) + window_size = int(sample_frequency * frame_length * MILLISECONDS_TO_SECONDS) + padded_window_size = _next_power_of_2(window_size) if round_to_power_of_two else window_size + + assert 2 <= window_size <= len(waveform), "choose a window size {} that is [2, {}]".format( + window_size, len(waveform) + ) + assert 0 < window_shift, "`window_shift` must be greater than 0" + assert padded_window_size % 2 == 0, ( + "the padded `window_size` must be divisible by two." " use `round_to_power_of_two` or change `frame_length`" + ) + assert 0.0 <= preemphasis_coefficient <= 1.0, "`preemphasis_coefficient` must be between [0,1]" + assert sample_frequency > 0, "`sample_frequency` must be greater than zero" + return waveform, window_shift, window_size, padded_window_size + + +def _get_window( + waveform: Tensor, + padded_window_size: int, + window_size: int, + window_shift: int, + window_type: str, + blackman_coeff: float, + snip_edges: bool, + raw_energy: bool, + energy_floor: float, + dither: float, + remove_dc_offset: bool, + preemphasis_coefficient: float, +) -> Tuple[Tensor, Tensor]: + r"""Gets a window and its log energy + + Returns: + (Tensor, Tensor): strided_input of size (m, ``padded_window_size``) and signal_log_energy of size (m) + """ + device, dtype = waveform.device, waveform.dtype + epsilon = _get_epsilon(device, dtype) + + # size (m, window_size) + strided_input = _get_strided(waveform, window_size, window_shift, snip_edges) + + if dither != 0.0: + rand_gauss = torch.randn(strided_input.shape, device=device, dtype=dtype) + strided_input = strided_input + rand_gauss * dither + + if remove_dc_offset: + # Subtract each row/frame by its mean + row_means = torch.mean(strided_input, dim=1).unsqueeze(1) # size (m, 1) + strided_input = strided_input - row_means + + if raw_energy: + # Compute the log energy of each row/frame before applying preemphasis and + # window function + signal_log_energy = _get_log_energy(strided_input, epsilon, energy_floor) # size (m) + + if preemphasis_coefficient != 0.0: + # strided_input[i,j] -= preemphasis_coefficient * strided_input[i, max(0, j-1)] for all i,j + offset_strided_input = torch.nn.functional.pad(strided_input.unsqueeze(0), (1, 0), mode="replicate").squeeze( + 0 + ) # size (m, window_size + 1) + strided_input = strided_input - preemphasis_coefficient * offset_strided_input[:, :-1] + + # Apply window_function to each row/frame + window_function = _feature_window_function(window_type, window_size, blackman_coeff, device, dtype).unsqueeze( + 0 + ) # size (1, window_size) + strided_input = strided_input * window_function # size (m, window_size) + + # Pad columns with zero until we reach size (m, padded_window_size) + if padded_window_size != window_size: + padding_right = padded_window_size - window_size + strided_input = torch.nn.functional.pad( + strided_input.unsqueeze(0), (0, padding_right), mode="constant", value=0 + ).squeeze(0) + + # Compute energy after window function (not the raw one) + if not raw_energy: + signal_log_energy = _get_log_energy(strided_input, epsilon, energy_floor) # size (m) + + return strided_input, signal_log_energy + + +def _subtract_column_mean(tensor: Tensor, subtract_mean: bool) -> Tensor: + # subtracts the column mean of the tensor size (m, n) if subtract_mean=True + # it returns size (m, n) + if subtract_mean: + col_means = torch.mean(tensor, dim=0).unsqueeze(0) + tensor = tensor - col_means + return tensor + + +def spectrogram( + waveform: Tensor, + blackman_coeff: float = 0.42, + channel: int = -1, + dither: float = 0.0, + energy_floor: float = 1.0, + frame_length: float = 25.0, + frame_shift: float = 10.0, + min_duration: float = 0.0, + preemphasis_coefficient: float = 0.97, + raw_energy: bool = True, + remove_dc_offset: bool = True, + round_to_power_of_two: bool = True, + sample_frequency: float = 16000.0, + snip_edges: bool = True, + subtract_mean: bool = False, + window_type: str = POVEY, +) -> Tensor: + r"""Create a spectrogram from a raw audio signal. This matches the input/output of Kaldi's + compute-spectrogram-feats. + + Args: + waveform (Tensor): Tensor of audio of size (c, n) where c is in the range [0,2) + blackman_coeff (float, optional): Constant coefficient for generalized Blackman window. (Default: ``0.42``) + channel (int, optional): Channel to extract (-1 -> expect mono, 0 -> left, 1 -> right) (Default: ``-1``) + dither (float, optional): Dithering constant (0.0 means no dither). If you turn this off, you should set + the energy_floor option, e.g. to 1.0 or 0.1 (Default: ``0.0``) + energy_floor (float, optional): Floor on energy (absolute, not relative) in Spectrogram computation. Caution: + this floor is applied to the zeroth component, representing the total signal energy. The floor on the + individual spectrogram elements is fixed at std::numeric_limits::epsilon(). (Default: ``1.0``) + frame_length (float, optional): Frame length in milliseconds (Default: ``25.0``) + frame_shift (float, optional): Frame shift in milliseconds (Default: ``10.0``) + min_duration (float, optional): Minimum duration of segments to process (in seconds). (Default: ``0.0``) + preemphasis_coefficient (float, optional): Coefficient for use in signal preemphasis (Default: ``0.97``) + raw_energy (bool, optional): If True, compute energy before preemphasis and windowing (Default: ``True``) + remove_dc_offset (bool, optional): Subtract mean from waveform on each frame (Default: ``True``) + round_to_power_of_two (bool, optional): If True, round window size to power of two by zero-padding input + to FFT. (Default: ``True``) + sample_frequency (float, optional): Waveform data sample frequency (must match the waveform file, if + specified there) (Default: ``16000.0``) + snip_edges (bool, optional): If True, end effects will be handled by outputting only frames that completely fit + in the file, and the number of frames depends on the frame_length. If False, the number of frames + depends only on the frame_shift, and we reflect the data at the ends. (Default: ``True``) + subtract_mean (bool, optional): Subtract mean of each feature file [CMS]; not recommended to do + it this way. (Default: ``False``) + window_type (str, optional): Type of window ('hamming'|'hanning'|'povey'|'rectangular'|'blackman') + (Default: ``'povey'``) + + Returns: + Tensor: A spectrogram identical to what Kaldi would output. The shape is + (m, ``padded_window_size // 2 + 1``) where m is calculated in _get_strided + """ + device, dtype = waveform.device, waveform.dtype + epsilon = _get_epsilon(device, dtype) + + waveform, window_shift, window_size, padded_window_size = _get_waveform_and_window_properties( + waveform, channel, sample_frequency, frame_shift, frame_length, round_to_power_of_two, preemphasis_coefficient + ) + + if len(waveform) < min_duration * sample_frequency: + # signal is too short + return torch.empty(0) + + strided_input, signal_log_energy = _get_window( + waveform, + padded_window_size, + window_size, + window_shift, + window_type, + blackman_coeff, + snip_edges, + raw_energy, + energy_floor, + dither, + remove_dc_offset, + preemphasis_coefficient, + ) + + # size (m, padded_window_size // 2 + 1, 2) + fft = torch.fft.rfft(strided_input) + + # Convert the FFT into a power spectrum + power_spectrum = torch.max(fft.abs().pow(2.0), epsilon).log() # size (m, padded_window_size // 2 + 1) + power_spectrum[:, 0] = signal_log_energy + + power_spectrum = _subtract_column_mean(power_spectrum, subtract_mean) + return power_spectrum + + +def inverse_mel_scale_scalar(mel_freq: float) -> float: + return 700.0 * (math.exp(mel_freq / 1127.0) - 1.0) + + +def inverse_mel_scale(mel_freq: Tensor) -> Tensor: + return 700.0 * ((mel_freq / 1127.0).exp() - 1.0) + + +def mel_scale_scalar(freq: float) -> float: + return 1127.0 * math.log(1.0 + freq / 700.0) + + +def mel_scale(freq: Tensor) -> Tensor: + return 1127.0 * (1.0 + freq / 700.0).log() + + +def vtln_warp_freq( + vtln_low_cutoff: float, + vtln_high_cutoff: float, + low_freq: float, + high_freq: float, + vtln_warp_factor: float, + freq: Tensor, +) -> Tensor: + r"""This computes a VTLN warping function that is not the same as HTK's one, + but has similar inputs (this function has the advantage of never producing + empty bins). + + This function computes a warp function F(freq), defined between low_freq + and high_freq inclusive, with the following properties: + F(low_freq) == low_freq + F(high_freq) == high_freq + The function is continuous and piecewise linear with two inflection + points. + The lower inflection point (measured in terms of the unwarped + frequency) is at frequency l, determined as described below. + The higher inflection point is at a frequency h, determined as + described below. + If l <= f <= h, then F(f) = f/vtln_warp_factor. + If the higher inflection point (measured in terms of the unwarped + frequency) is at h, then max(h, F(h)) == vtln_high_cutoff. + Since (by the last point) F(h) == h/vtln_warp_factor, then + max(h, h/vtln_warp_factor) == vtln_high_cutoff, so + h = vtln_high_cutoff / max(1, 1/vtln_warp_factor). + = vtln_high_cutoff * min(1, vtln_warp_factor). + If the lower inflection point (measured in terms of the unwarped + frequency) is at l, then min(l, F(l)) == vtln_low_cutoff + This implies that l = vtln_low_cutoff / min(1, 1/vtln_warp_factor) + = vtln_low_cutoff * max(1, vtln_warp_factor) + Args: + vtln_low_cutoff (float): Lower frequency cutoffs for VTLN + vtln_high_cutoff (float): Upper frequency cutoffs for VTLN + low_freq (float): Lower frequency cutoffs in mel computation + high_freq (float): Upper frequency cutoffs in mel computation + vtln_warp_factor (float): Vtln warp factor + freq (Tensor): given frequency in Hz + + Returns: + Tensor: Freq after vtln warp + """ + assert vtln_low_cutoff > low_freq, "be sure to set the vtln_low option higher than low_freq" + assert vtln_high_cutoff < high_freq, "be sure to set the vtln_high option lower than high_freq [or negative]" + l = vtln_low_cutoff * max(1.0, vtln_warp_factor) + h = vtln_high_cutoff * min(1.0, vtln_warp_factor) + scale = 1.0 / vtln_warp_factor + Fl = scale * l # F(l) + Fh = scale * h # F(h) + assert l > low_freq and h < high_freq + # slope of left part of the 3-piece linear function + scale_left = (Fl - low_freq) / (l - low_freq) + # [slope of center part is just "scale"] + + # slope of right part of the 3-piece linear function + scale_right = (high_freq - Fh) / (high_freq - h) + + res = torch.empty_like(freq) + + outside_low_high_freq = torch.lt(freq, low_freq) | torch.gt(freq, high_freq) # freq < low_freq || freq > high_freq + before_l = torch.lt(freq, l) # freq < l + before_h = torch.lt(freq, h) # freq < h + after_h = torch.ge(freq, h) # freq >= h + + # order of operations matter here (since there is overlapping frequency regions) + res[after_h] = high_freq + scale_right * (freq[after_h] - high_freq) + res[before_h] = scale * freq[before_h] + res[before_l] = low_freq + scale_left * (freq[before_l] - low_freq) + res[outside_low_high_freq] = freq[outside_low_high_freq] + + return res + + +def vtln_warp_mel_freq( + vtln_low_cutoff: float, + vtln_high_cutoff: float, + low_freq, + high_freq: float, + vtln_warp_factor: float, + mel_freq: Tensor, +) -> Tensor: + r""" + Args: + vtln_low_cutoff (float): Lower frequency cutoffs for VTLN + vtln_high_cutoff (float): Upper frequency cutoffs for VTLN + low_freq (float): Lower frequency cutoffs in mel computation + high_freq (float): Upper frequency cutoffs in mel computation + vtln_warp_factor (float): Vtln warp factor + mel_freq (Tensor): Given frequency in Mel + + Returns: + Tensor: ``mel_freq`` after vtln warp + """ + return mel_scale( + vtln_warp_freq( + vtln_low_cutoff, vtln_high_cutoff, low_freq, high_freq, vtln_warp_factor, inverse_mel_scale(mel_freq) + ) + ) + + +def get_mel_banks( + num_bins: int, + window_length_padded: int, + sample_freq: float, + low_freq: float, + high_freq: float, + vtln_low: float, + vtln_high: float, + vtln_warp_factor: float, +) -> Tuple[Tensor, Tensor]: + """ + Returns: + (Tensor, Tensor): The tuple consists of ``bins`` (which is + melbank of size (``num_bins``, ``num_fft_bins``)) and ``center_freqs`` (which is + center frequencies of bins of size (``num_bins``)). + """ + assert num_bins > 3, "Must have at least 3 mel bins" + assert window_length_padded % 2 == 0 + num_fft_bins = window_length_padded / 2 + nyquist = 0.5 * sample_freq + + if high_freq <= 0.0: + high_freq += nyquist + + assert ( + (0.0 <= low_freq < nyquist) and (0.0 < high_freq <= nyquist) and (low_freq < high_freq) + ), "Bad values in options: low-freq {} and high-freq {} vs. nyquist {}".format(low_freq, high_freq, nyquist) + + # fft-bin width [think of it as Nyquist-freq / half-window-length] + fft_bin_width = sample_freq / window_length_padded + mel_low_freq = mel_scale_scalar(low_freq) + mel_high_freq = mel_scale_scalar(high_freq) + + # divide by num_bins+1 in next line because of end-effects where the bins + # spread out to the sides. + mel_freq_delta = (mel_high_freq - mel_low_freq) / (num_bins + 1) + + if vtln_high < 0.0: + vtln_high += nyquist + + assert vtln_warp_factor == 1.0 or ( + (low_freq < vtln_low < high_freq) and (0.0 < vtln_high < high_freq) and (vtln_low < vtln_high) + ), "Bad values in options: vtln-low {} and vtln-high {}, versus " "low-freq {} and high-freq {}".format( + vtln_low, vtln_high, low_freq, high_freq + ) + + bin = torch.arange(num_bins).unsqueeze(1) + left_mel = mel_low_freq + bin * mel_freq_delta # size(num_bins, 1) + center_mel = mel_low_freq + (bin + 1.0) * mel_freq_delta # size(num_bins, 1) + right_mel = mel_low_freq + (bin + 2.0) * mel_freq_delta # size(num_bins, 1) + + if vtln_warp_factor != 1.0: + left_mel = vtln_warp_mel_freq(vtln_low, vtln_high, low_freq, high_freq, vtln_warp_factor, left_mel) + center_mel = vtln_warp_mel_freq(vtln_low, vtln_high, low_freq, high_freq, vtln_warp_factor, center_mel) + right_mel = vtln_warp_mel_freq(vtln_low, vtln_high, low_freq, high_freq, vtln_warp_factor, right_mel) + + center_freqs = inverse_mel_scale(center_mel) # size (num_bins) + # size(1, num_fft_bins) + mel = mel_scale(fft_bin_width * torch.arange(num_fft_bins)).unsqueeze(0) + + # size (num_bins, num_fft_bins) + up_slope = (mel - left_mel) / (center_mel - left_mel) + down_slope = (right_mel - mel) / (right_mel - center_mel) + + if vtln_warp_factor == 1.0: + # left_mel < center_mel < right_mel so we can min the two slopes and clamp negative values + bins = torch.max(torch.zeros(1), torch.min(up_slope, down_slope)) + else: + # warping can move the order of left_mel, center_mel, right_mel anywhere + bins = torch.zeros_like(up_slope) + up_idx = torch.gt(mel, left_mel) & torch.le(mel, center_mel) # left_mel < mel <= center_mel + down_idx = torch.gt(mel, center_mel) & torch.lt(mel, right_mel) # center_mel < mel < right_mel + bins[up_idx] = up_slope[up_idx] + bins[down_idx] = down_slope[down_idx] + + return bins, center_freqs + + +def fbank( + waveform: Tensor, + blackman_coeff: float = 0.42, + channel: int = -1, + dither: float = 0.0, + energy_floor: float = 1.0, + frame_length: float = 25.0, + frame_shift: float = 10.0, + high_freq: float = 0.0, + htk_compat: bool = False, + low_freq: float = 20.0, + min_duration: float = 0.0, + num_mel_bins: int = 23, + preemphasis_coefficient: float = 0.97, + raw_energy: bool = True, + remove_dc_offset: bool = True, + round_to_power_of_two: bool = True, + sample_frequency: float = 16000.0, + snip_edges: bool = True, + subtract_mean: bool = False, + use_energy: bool = False, + use_log_fbank: bool = True, + use_power: bool = True, + vtln_high: float = -500.0, + vtln_low: float = 100.0, + vtln_warp: float = 1.0, + window_type: str = POVEY, +) -> Tensor: + r"""Create a fbank from a raw audio signal. This matches the input/output of Kaldi's + compute-fbank-feats. + + Args: + waveform (Tensor): Tensor of audio of size (c, n) where c is in the range [0,2) + blackman_coeff (float, optional): Constant coefficient for generalized Blackman window. (Default: ``0.42``) + channel (int, optional): Channel to extract (-1 -> expect mono, 0 -> left, 1 -> right) (Default: ``-1``) + dither (float, optional): Dithering constant (0.0 means no dither). If you turn this off, you should set + the energy_floor option, e.g. to 1.0 or 0.1 (Default: ``0.0``) + energy_floor (float, optional): Floor on energy (absolute, not relative) in Spectrogram computation. Caution: + this floor is applied to the zeroth component, representing the total signal energy. The floor on the + individual spectrogram elements is fixed at std::numeric_limits::epsilon(). (Default: ``1.0``) + frame_length (float, optional): Frame length in milliseconds (Default: ``25.0``) + frame_shift (float, optional): Frame shift in milliseconds (Default: ``10.0``) + high_freq (float, optional): High cutoff frequency for mel bins (if <= 0, offset from Nyquist) + (Default: ``0.0``) + htk_compat (bool, optional): If true, put energy last. Warning: not sufficient to get HTK compatible features + (need to change other parameters). (Default: ``False``) + low_freq (float, optional): Low cutoff frequency for mel bins (Default: ``20.0``) + min_duration (float, optional): Minimum duration of segments to process (in seconds). (Default: ``0.0``) + num_mel_bins (int, optional): Number of triangular mel-frequency bins (Default: ``23``) + preemphasis_coefficient (float, optional): Coefficient for use in signal preemphasis (Default: ``0.97``) + raw_energy (bool, optional): If True, compute energy before preemphasis and windowing (Default: ``True``) + remove_dc_offset (bool, optional): Subtract mean from waveform on each frame (Default: ``True``) + round_to_power_of_two (bool, optional): If True, round window size to power of two by zero-padding input + to FFT. (Default: ``True``) + sample_frequency (float, optional): Waveform data sample frequency (must match the waveform file, if + specified there) (Default: ``16000.0``) + snip_edges (bool, optional): If True, end effects will be handled by outputting only frames that completely fit + in the file, and the number of frames depends on the frame_length. If False, the number of frames + depends only on the frame_shift, and we reflect the data at the ends. (Default: ``True``) + subtract_mean (bool, optional): Subtract mean of each feature file [CMS]; not recommended to do + it this way. (Default: ``False``) + use_energy (bool, optional): Add an extra dimension with energy to the FBANK output. (Default: ``False``) + use_log_fbank (bool, optional):If true, produce log-filterbank, else produce linear. (Default: ``True``) + use_power (bool, optional): If true, use power, else use magnitude. (Default: ``True``) + vtln_high (float, optional): High inflection point in piecewise linear VTLN warping function (if + negative, offset from high-mel-freq (Default: ``-500.0``) + vtln_low (float, optional): Low inflection point in piecewise linear VTLN warping function (Default: ``100.0``) + vtln_warp (float, optional): Vtln warp factor (only applicable if vtln_map not specified) (Default: ``1.0``) + window_type (str, optional): Type of window ('hamming'|'hanning'|'povey'|'rectangular'|'blackman') + (Default: ``'povey'``) + + Returns: + Tensor: A fbank identical to what Kaldi would output. The shape is (m, ``num_mel_bins + use_energy``) + where m is calculated in _get_strided + """ + device, dtype = waveform.device, waveform.dtype + + waveform, window_shift, window_size, padded_window_size = _get_waveform_and_window_properties( + waveform, channel, sample_frequency, frame_shift, frame_length, round_to_power_of_two, preemphasis_coefficient + ) + + if len(waveform) < min_duration * sample_frequency: + # signal is too short + return torch.empty(0, device=device, dtype=dtype) + + # strided_input, size (m, padded_window_size) and signal_log_energy, size (m) + strided_input, signal_log_energy = _get_window( + waveform, + padded_window_size, + window_size, + window_shift, + window_type, + blackman_coeff, + snip_edges, + raw_energy, + energy_floor, + dither, + remove_dc_offset, + preemphasis_coefficient, + ) + + # size (m, padded_window_size // 2 + 1) + spectrum = torch.fft.rfft(strided_input).abs() + if use_power: + spectrum = spectrum.pow(2.0) + + # size (num_mel_bins, padded_window_size // 2) + mel_energies, _ = get_mel_banks( + num_mel_bins, padded_window_size, sample_frequency, low_freq, high_freq, vtln_low, vtln_high, vtln_warp + ) + mel_energies = mel_energies.to(device=device, dtype=dtype) + + # pad right column with zeros and add dimension, size (num_mel_bins, padded_window_size // 2 + 1) + mel_energies = torch.nn.functional.pad(mel_energies, (0, 1), mode="constant", value=0) + + # sum with mel fiterbanks over the power spectrum, size (m, num_mel_bins) + mel_energies = torch.mm(spectrum, mel_energies.T) + if use_log_fbank: + # avoid log of zero (which should be prevented anyway by dithering) + mel_energies = torch.max(mel_energies, _get_epsilon(device, dtype)).log() + + # if use_energy then add it as the last column for htk_compat == true else first column + if use_energy: + signal_log_energy = signal_log_energy.unsqueeze(1) # size (m, 1) + # returns size (m, num_mel_bins + 1) + if htk_compat: + mel_energies = torch.cat((mel_energies, signal_log_energy), dim=1) + else: + mel_energies = torch.cat((signal_log_energy, mel_energies), dim=1) + + mel_energies = _subtract_column_mean(mel_energies, subtract_mean) + return mel_energies + + +def _get_dct_matrix(num_ceps: int, num_mel_bins: int) -> Tensor: + # returns a dct matrix of size (num_mel_bins, num_ceps) + # size (num_mel_bins, num_mel_bins) + dct_matrix = torchaudio.functional.create_dct(num_mel_bins, num_mel_bins, "ortho") + # kaldi expects the first cepstral to be weighted sum of factor sqrt(1/num_mel_bins) + # this would be the first column in the dct_matrix for torchaudio as it expects a + # right multiply (which would be the first column of the kaldi's dct_matrix as kaldi + # expects a left multiply e.g. dct_matrix * vector). + dct_matrix[:, 0] = math.sqrt(1 / float(num_mel_bins)) + dct_matrix = dct_matrix[:, :num_ceps] + return dct_matrix + + +def _get_lifter_coeffs(num_ceps: int, cepstral_lifter: float) -> Tensor: + # returns size (num_ceps) + # Compute liftering coefficients (scaling on cepstral coeffs) + # coeffs are numbered slightly differently from HTK: the zeroth index is C0, which is not affected. + i = torch.arange(num_ceps) + return 1.0 + 0.5 * cepstral_lifter * torch.sin(math.pi * i / cepstral_lifter) + + +def mfcc( + waveform: Tensor, + blackman_coeff: float = 0.42, + cepstral_lifter: float = 22.0, + channel: int = -1, + dither: float = 0.0, + energy_floor: float = 1.0, + frame_length: float = 25.0, + frame_shift: float = 10.0, + high_freq: float = 0.0, + htk_compat: bool = False, + low_freq: float = 20.0, + num_ceps: int = 13, + min_duration: float = 0.0, + num_mel_bins: int = 23, + preemphasis_coefficient: float = 0.97, + raw_energy: bool = True, + remove_dc_offset: bool = True, + round_to_power_of_two: bool = True, + sample_frequency: float = 16000.0, + snip_edges: bool = True, + subtract_mean: bool = False, + use_energy: bool = False, + vtln_high: float = -500.0, + vtln_low: float = 100.0, + vtln_warp: float = 1.0, + window_type: str = POVEY, +) -> Tensor: + r"""Create a mfcc from a raw audio signal. This matches the input/output of Kaldi's + compute-mfcc-feats. + + Args: + waveform (Tensor): Tensor of audio of size (c, n) where c is in the range [0,2) + blackman_coeff (float, optional): Constant coefficient for generalized Blackman window. (Default: ``0.42``) + cepstral_lifter (float, optional): Constant that controls scaling of MFCCs (Default: ``22.0``) + channel (int, optional): Channel to extract (-1 -> expect mono, 0 -> left, 1 -> right) (Default: ``-1``) + dither (float, optional): Dithering constant (0.0 means no dither). If you turn this off, you should set + the energy_floor option, e.g. to 1.0 or 0.1 (Default: ``0.0``) + energy_floor (float, optional): Floor on energy (absolute, not relative) in Spectrogram computation. Caution: + this floor is applied to the zeroth component, representing the total signal energy. The floor on the + individual spectrogram elements is fixed at std::numeric_limits::epsilon(). (Default: ``1.0``) + frame_length (float, optional): Frame length in milliseconds (Default: ``25.0``) + frame_shift (float, optional): Frame shift in milliseconds (Default: ``10.0``) + high_freq (float, optional): High cutoff frequency for mel bins (if <= 0, offset from Nyquist) + (Default: ``0.0``) + htk_compat (bool, optional): If true, put energy last. Warning: not sufficient to get HTK compatible + features (need to change other parameters). (Default: ``False``) + low_freq (float, optional): Low cutoff frequency for mel bins (Default: ``20.0``) + num_ceps (int, optional): Number of cepstra in MFCC computation (including C0) (Default: ``13``) + min_duration (float, optional): Minimum duration of segments to process (in seconds). (Default: ``0.0``) + num_mel_bins (int, optional): Number of triangular mel-frequency bins (Default: ``23``) + preemphasis_coefficient (float, optional): Coefficient for use in signal preemphasis (Default: ``0.97``) + raw_energy (bool, optional): If True, compute energy before preemphasis and windowing (Default: ``True``) + remove_dc_offset (bool, optional): Subtract mean from waveform on each frame (Default: ``True``) + round_to_power_of_two (bool, optional): If True, round window size to power of two by zero-padding input + to FFT. (Default: ``True``) + sample_frequency (float, optional): Waveform data sample frequency (must match the waveform file, if + specified there) (Default: ``16000.0``) + snip_edges (bool, optional): If True, end effects will be handled by outputting only frames that completely fit + in the file, and the number of frames depends on the frame_length. If False, the number of frames + depends only on the frame_shift, and we reflect the data at the ends. (Default: ``True``) + subtract_mean (bool, optional): Subtract mean of each feature file [CMS]; not recommended to do + it this way. (Default: ``False``) + use_energy (bool, optional): Add an extra dimension with energy to the FBANK output. (Default: ``False``) + vtln_high (float, optional): High inflection point in piecewise linear VTLN warping function (if + negative, offset from high-mel-freq (Default: ``-500.0``) + vtln_low (float, optional): Low inflection point in piecewise linear VTLN warping function (Default: ``100.0``) + vtln_warp (float, optional): Vtln warp factor (only applicable if vtln_map not specified) (Default: ``1.0``) + window_type (str, optional): Type of window ('hamming'|'hanning'|'povey'|'rectangular'|'blackman') + (Default: ``"povey"``) + + Returns: + Tensor: A mfcc identical to what Kaldi would output. The shape is (m, ``num_ceps``) + where m is calculated in _get_strided + """ + assert num_ceps <= num_mel_bins, "num_ceps cannot be larger than num_mel_bins: %d vs %d" % (num_ceps, num_mel_bins) + + device, dtype = waveform.device, waveform.dtype + + # The mel_energies should not be squared (use_power=True), not have mean subtracted + # (subtract_mean=False), and use log (use_log_fbank=True). + # size (m, num_mel_bins + use_energy) + feature = fbank( + waveform=waveform, + blackman_coeff=blackman_coeff, + channel=channel, + dither=dither, + energy_floor=energy_floor, + frame_length=frame_length, + frame_shift=frame_shift, + high_freq=high_freq, + htk_compat=htk_compat, + low_freq=low_freq, + min_duration=min_duration, + num_mel_bins=num_mel_bins, + preemphasis_coefficient=preemphasis_coefficient, + raw_energy=raw_energy, + remove_dc_offset=remove_dc_offset, + round_to_power_of_two=round_to_power_of_two, + sample_frequency=sample_frequency, + snip_edges=snip_edges, + subtract_mean=False, + use_energy=use_energy, + use_log_fbank=True, + use_power=True, + vtln_high=vtln_high, + vtln_low=vtln_low, + vtln_warp=vtln_warp, + window_type=window_type, + ) + + if use_energy: + # size (m) + signal_log_energy = feature[:, num_mel_bins if htk_compat else 0] + # offset is 0 if htk_compat==True else 1 + mel_offset = int(not htk_compat) + feature = feature[:, mel_offset : (num_mel_bins + mel_offset)] + + # size (num_mel_bins, num_ceps) + dct_matrix = _get_dct_matrix(num_ceps, num_mel_bins).to(dtype=dtype, device=device) + + # size (m, num_ceps) + feature = feature.matmul(dct_matrix) + + if cepstral_lifter != 0.0: + # size (1, num_ceps) + lifter_coeffs = _get_lifter_coeffs(num_ceps, cepstral_lifter).unsqueeze(0) + feature *= lifter_coeffs.to(device=device, dtype=dtype) + + # if use_energy then replace the last column for htk_compat == true else first column + if use_energy: + feature[:, 0] = signal_log_energy + + if htk_compat: + energy = feature[:, 0].unsqueeze(1) # size (m, 1) + feature = feature[:, 1:] # size (m, num_ceps - 1) + if not use_energy: + # scale on C0 (actually removing a scale we previously added that's + # part of one common definition of the cosine transform.) + energy *= math.sqrt(2) + + feature = torch.cat((feature, energy), dim=1) + + feature = _subtract_column_mean(feature, subtract_mean) + return feature diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..609cb14fdcc38c48270acd5803f4bfe603c39e71 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/__init__.py @@ -0,0 +1,47 @@ +from .cmuarctic import CMUARCTIC +from .cmudict import CMUDict +from .commonvoice import COMMONVOICE +from .dr_vctk import DR_VCTK +from .fluentcommands import FluentSpeechCommands +from .gtzan import GTZAN +from .iemocap import IEMOCAP +from .librilight_limited import LibriLightLimited +from .librimix import LibriMix +from .librispeech import LIBRISPEECH +from .librispeech_biasing import LibriSpeechBiasing +from .libritts import LIBRITTS +from .ljspeech import LJSPEECH +from .musdb_hq import MUSDB_HQ +from .quesst14 import QUESST14 +from .snips import Snips +from .speechcommands import SPEECHCOMMANDS +from .tedlium import TEDLIUM +from .vctk import VCTK_092 +from .voxceleb1 import VoxCeleb1Identification, VoxCeleb1Verification +from .yesno import YESNO + + +__all__ = [ + "COMMONVOICE", + "LIBRISPEECH", + "LibriSpeechBiasing", + "LibriLightLimited", + "SPEECHCOMMANDS", + "VCTK_092", + "DR_VCTK", + "YESNO", + "LJSPEECH", + "GTZAN", + "CMUARCTIC", + "CMUDict", + "LibriMix", + "LIBRITTS", + "TEDLIUM", + "QUESST14", + "MUSDB_HQ", + "FluentSpeechCommands", + "VoxCeleb1Identification", + "VoxCeleb1Verification", + "IEMOCAP", + "Snips", +] diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/cmuarctic.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/cmuarctic.py new file mode 100644 index 0000000000000000000000000000000000000000..2d124d2db39cc47663b4c0d41ebc7aff21e35d15 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/cmuarctic.py @@ -0,0 +1,155 @@ +import os +from pathlib import Path +from typing import Tuple, Union + +import torchaudio +from torch import Tensor +from torch.utils.data import Dataset +from torchaudio._internal import download_url_to_file +from torchaudio.datasets.utils import _extract_tar + +URL = "aew" +FOLDER_IN_ARCHIVE = "ARCTIC" +_CHECKSUMS = { + "http://festvox.org/cmu_arctic/packed/cmu_us_aew_arctic.tar.bz2": "645cb33c0f0b2ce41384fdd8d3db2c3f5fc15c1e688baeb74d2e08cab18ab406", # noqa: E501 + "http://festvox.org/cmu_arctic/packed/cmu_us_ahw_arctic.tar.bz2": "024664adeb892809d646a3efd043625b46b5bfa3e6189b3500b2d0d59dfab06c", # noqa: E501 + "http://festvox.org/cmu_arctic/packed/cmu_us_aup_arctic.tar.bz2": "2c55bc3050caa996758869126ad10cf42e1441212111db034b3a45189c18b6fc", # noqa: E501 + "http://festvox.org/cmu_arctic/packed/cmu_us_awb_arctic.tar.bz2": "d74a950c9739a65f7bfc4dfa6187f2730fa03de5b8eb3f2da97a51b74df64d3c", # noqa: E501 + "http://festvox.org/cmu_arctic/packed/cmu_us_axb_arctic.tar.bz2": "dd65c3d2907d1ee52f86e44f578319159e60f4bf722a9142be01161d84e330ff", # noqa: E501 + "http://festvox.org/cmu_arctic/packed/cmu_us_bdl_arctic.tar.bz2": "26b91aaf48b2799b2956792b4632c2f926cd0542f402b5452d5adecb60942904", # noqa: E501 + "http://festvox.org/cmu_arctic/packed/cmu_us_clb_arctic.tar.bz2": "3f16dc3f3b97955ea22623efb33b444341013fc660677b2e170efdcc959fa7c6", # noqa: E501 + "http://festvox.org/cmu_arctic/packed/cmu_us_eey_arctic.tar.bz2": "8a0ee4e5acbd4b2f61a4fb947c1730ab3adcc9dc50b195981d99391d29928e8a", # noqa: E501 + "http://festvox.org/cmu_arctic/packed/cmu_us_fem_arctic.tar.bz2": "3fcff629412b57233589cdb058f730594a62c4f3a75c20de14afe06621ef45e2", # noqa: E501 + "http://festvox.org/cmu_arctic/packed/cmu_us_gka_arctic.tar.bz2": "dc82e7967cbd5eddbed33074b0699128dbd4482b41711916d58103707e38c67f", # noqa: E501 + "http://festvox.org/cmu_arctic/packed/cmu_us_jmk_arctic.tar.bz2": "3a37c0e1dfc91e734fdbc88b562d9e2ebca621772402cdc693bbc9b09b211d73", # noqa: E501 + "http://festvox.org/cmu_arctic/packed/cmu_us_ksp_arctic.tar.bz2": "8029cafce8296f9bed3022c44ef1e7953332b6bf6943c14b929f468122532717", # noqa: E501 + "http://festvox.org/cmu_arctic/packed/cmu_us_ljm_arctic.tar.bz2": "b23993765cbf2b9e7bbc3c85b6c56eaf292ac81ee4bb887b638a24d104f921a0", # noqa: E501 + "http://festvox.org/cmu_arctic/packed/cmu_us_lnh_arctic.tar.bz2": "4faf34d71aa7112813252fb20c5433e2fdd9a9de55a00701ffcbf05f24a5991a", # noqa: E501 + "http://festvox.org/cmu_arctic/packed/cmu_us_rms_arctic.tar.bz2": "c6dc11235629c58441c071a7ba8a2d067903dfefbaabc4056d87da35b72ecda4", # noqa: E501 + "http://festvox.org/cmu_arctic/packed/cmu_us_rxr_arctic.tar.bz2": "1fa4271c393e5998d200e56c102ff46fcfea169aaa2148ad9e9469616fbfdd9b", # noqa: E501 + "http://festvox.org/cmu_arctic/packed/cmu_us_slp_arctic.tar.bz2": "54345ed55e45c23d419e9a823eef427f1cc93c83a710735ec667d068c916abf1", # noqa: E501 + "http://festvox.org/cmu_arctic/packed/cmu_us_slt_arctic.tar.bz2": "7c173297916acf3cc7fcab2713be4c60b27312316765a90934651d367226b4ea", # noqa: E501 +} + + +def load_cmuarctic_item(line: str, path: str, folder_audio: str, ext_audio: str) -> Tuple[Tensor, int, str, str]: + + utterance_id, transcript = line[0].strip().split(" ", 2)[1:] + + # Remove space, double quote, and single parenthesis from transcript + transcript = transcript[1:-3] + + file_audio = os.path.join(path, folder_audio, utterance_id + ext_audio) + + # Load audio + waveform, sample_rate = torchaudio.load(file_audio) + + return (waveform, sample_rate, transcript, utterance_id.split("_")[1]) + + +class CMUARCTIC(Dataset): + """*CMU ARCTIC* :cite:`Kominek03cmuarctic` dataset. + + Args: + root (str or Path): Path to the directory where the dataset is found or downloaded. + url (str, optional): + The URL to download the dataset from or the type of the dataset to download. + (default: ``"aew"``) + Allowed type values are ``"aew"``, ``"ahw"``, ``"aup"``, ``"awb"``, ``"axb"``, ``"bdl"``, + ``"clb"``, ``"eey"``, ``"fem"``, ``"gka"``, ``"jmk"``, ``"ksp"``, ``"ljm"``, ``"lnh"``, + ``"rms"``, ``"rxr"``, ``"slp"`` or ``"slt"``. + folder_in_archive (str, optional): + The top-level directory of the dataset. (default: ``"ARCTIC"``) + download (bool, optional): + Whether to download the dataset if it is not found at root path. (default: ``False``). + """ + + _file_text = "txt.done.data" + _folder_text = "etc" + _ext_audio = ".wav" + _folder_audio = "wav" + + def __init__( + self, root: Union[str, Path], url: str = URL, folder_in_archive: str = FOLDER_IN_ARCHIVE, download: bool = False + ) -> None: + + if url in [ + "aew", + "ahw", + "aup", + "awb", + "axb", + "bdl", + "clb", + "eey", + "fem", + "gka", + "jmk", + "ksp", + "ljm", + "lnh", + "rms", + "rxr", + "slp", + "slt", + ]: + + url = "cmu_us_" + url + "_arctic" + ext_archive = ".tar.bz2" + base_url = "http://www.festvox.org/cmu_arctic/packed/" + + url = os.path.join(base_url, url + ext_archive) + + # Get string representation of 'root' in case Path object is passed + root = os.fspath(root) + + basename = os.path.basename(url) + root = os.path.join(root, folder_in_archive) + if not os.path.isdir(root): + os.mkdir(root) + archive = os.path.join(root, basename) + + basename = basename.split(".")[0] + + self._path = os.path.join(root, basename) + + if download: + if not os.path.isdir(self._path): + if not os.path.isfile(archive): + checksum = _CHECKSUMS.get(url, None) + download_url_to_file(url, archive, hash_prefix=checksum) + _extract_tar(archive) + else: + if not os.path.exists(self._path): + raise RuntimeError( + f"The path {self._path} doesn't exist. " + "Please check the ``root`` path or set `download=True` to download it" + ) + self._text = os.path.join(self._path, self._folder_text, self._file_text) + + with open(self._text, "r", newline=None) as text: + self._walker = [[line.rstrip("\n")] for line in text.readlines()] + + def __getitem__(self, n: int) -> Tuple[Tensor, int, str, str]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + Tensor: + Waveform + int: + Sample rate + str: + Transcript + str: + Utterance ID + """ + line = self._walker[n] + return load_cmuarctic_item(line, self._path, self._folder_audio, self._ext_audio) + + def __len__(self) -> int: + return len(self._walker) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/cmudict.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/cmudict.py new file mode 100644 index 0000000000000000000000000000000000000000..d1038f48badde6f5db589691c5aee2ddf1f1d5de --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/cmudict.py @@ -0,0 +1,186 @@ +import os +import re +from pathlib import Path +from typing import Iterable, List, Tuple, Union + +from torch.utils.data import Dataset +from torchaudio._internal import download_url_to_file + + +_CHECKSUMS = { + "http://svn.code.sf.net/p/cmusphinx/code/trunk/cmudict/cmudict-0.7b": "209a8b4cd265013e96f4658632a9878103b0c5abf62b50d4ef3ae1be226b29e4", # noqa: E501 + "http://svn.code.sf.net/p/cmusphinx/code/trunk/cmudict/cmudict-0.7b.symbols": "408ccaae803641c6d7b626b6299949320c2dbca96b2220fd3fb17887b023b027", # noqa: E501 +} +_PUNCTUATIONS = { + "!EXCLAMATION-POINT", + '"CLOSE-QUOTE', + '"DOUBLE-QUOTE', + '"END-OF-QUOTE', + '"END-QUOTE', + '"IN-QUOTES', + '"QUOTE', + '"UNQUOTE', + "#HASH-MARK", + "#POUND-SIGN", + "#SHARP-SIGN", + "%PERCENT", + "&ERSAND", + "'END-INNER-QUOTE", + "'END-QUOTE", + "'INNER-QUOTE", + "'QUOTE", + "'SINGLE-QUOTE", + "(BEGIN-PARENS", + "(IN-PARENTHESES", + "(LEFT-PAREN", + "(OPEN-PARENTHESES", + "(PAREN", + "(PARENS", + "(PARENTHESES", + ")CLOSE-PAREN", + ")CLOSE-PARENTHESES", + ")END-PAREN", + ")END-PARENS", + ")END-PARENTHESES", + ")END-THE-PAREN", + ")PAREN", + ")PARENS", + ")RIGHT-PAREN", + ")UN-PARENTHESES", + "+PLUS", + ",COMMA", + "--DASH", + "-DASH", + "-HYPHEN", + "...ELLIPSIS", + ".DECIMAL", + ".DOT", + ".FULL-STOP", + ".PERIOD", + ".POINT", + "/SLASH", + ":COLON", + ";SEMI-COLON", + ";SEMI-COLON(1)", + "?QUESTION-MARK", + "{BRACE", + "{LEFT-BRACE", + "{OPEN-BRACE", + "}CLOSE-BRACE", + "}RIGHT-BRACE", +} + + +def _parse_dictionary(lines: Iterable[str], exclude_punctuations: bool) -> List[str]: + _alt_re = re.compile(r"\([0-9]+\)") + cmudict: List[Tuple[str, List[str]]] = [] + for line in lines: + if not line or line.startswith(";;;"): # ignore comments + continue + + word, phones = line.strip().split(" ") + if word in _PUNCTUATIONS: + if exclude_punctuations: + continue + # !EXCLAMATION-POINT -> ! + # --DASH -> -- + # ...ELLIPSIS -> ... + if word.startswith("..."): + word = "..." + elif word.startswith("--"): + word = "--" + else: + word = word[0] + + # if a word have multiple pronunciations, there will be (number) appended to it + # for example, DATAPOINTS and DATAPOINTS(1), + # the regular expression `_alt_re` removes the '(1)' and change the word DATAPOINTS(1) to DATAPOINTS + word = re.sub(_alt_re, "", word) + phones = phones.split(" ") + cmudict.append((word, phones)) + + return cmudict + + +class CMUDict(Dataset): + """*CMU Pronouncing Dictionary* :cite:`cmudict` (CMUDict) dataset. + + Args: + root (str or Path): Path to the directory where the dataset is found or downloaded. + exclude_punctuations (bool, optional): + When enabled, exclude the pronounciation of punctuations, such as + `!EXCLAMATION-POINT` and `#HASH-MARK`. + download (bool, optional): + Whether to download the dataset if it is not found at root path. (default: ``False``). + url (str, optional): + The URL to download the dictionary from. + (default: ``"http://svn.code.sf.net/p/cmusphinx/code/trunk/cmudict/cmudict-0.7b"``) + url_symbols (str, optional): + The URL to download the list of symbols from. + (default: ``"http://svn.code.sf.net/p/cmusphinx/code/trunk/cmudict/cmudict-0.7b.symbols"``) + """ + + def __init__( + self, + root: Union[str, Path], + exclude_punctuations: bool = True, + *, + download: bool = False, + url: str = "http://svn.code.sf.net/p/cmusphinx/code/trunk/cmudict/cmudict-0.7b", + url_symbols: str = "http://svn.code.sf.net/p/cmusphinx/code/trunk/cmudict/cmudict-0.7b.symbols", + ) -> None: + + self.exclude_punctuations = exclude_punctuations + + self._root_path = Path(root) + if not os.path.isdir(self._root_path): + raise RuntimeError(f"The root directory does not exist; {root}") + + dict_file = self._root_path / os.path.basename(url) + symbol_file = self._root_path / os.path.basename(url_symbols) + if not os.path.exists(dict_file): + if not download: + raise RuntimeError( + "The dictionary file is not found in the following location. " + f"Set `download=True` to download it. {dict_file}" + ) + checksum = _CHECKSUMS.get(url, None) + download_url_to_file(url, dict_file, checksum) + if not os.path.exists(symbol_file): + if not download: + raise RuntimeError( + "The symbol file is not found in the following location. " + f"Set `download=True` to download it. {symbol_file}" + ) + checksum = _CHECKSUMS.get(url_symbols, None) + download_url_to_file(url_symbols, symbol_file, checksum) + + with open(symbol_file, "r") as text: + self._symbols = [line.strip() for line in text.readlines()] + + with open(dict_file, "r", encoding="latin-1") as text: + self._dictionary = _parse_dictionary(text.readlines(), exclude_punctuations=self.exclude_punctuations) + + def __getitem__(self, n: int) -> Tuple[str, List[str]]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded. + + Returns: + Tuple of a word and its phonemes + + str: + Word + List[str]: + Phonemes + """ + return self._dictionary[n] + + def __len__(self) -> int: + return len(self._dictionary) + + @property + def symbols(self) -> List[str]: + """list[str]: A list of phonemes symbols, such as ``"AA"``, ``"AE"``, ``"AH"``.""" + return self._symbols.copy() diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/commonvoice.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/commonvoice.py new file mode 100644 index 0000000000000000000000000000000000000000..db0e035c6116487a87efcffaeea31a19212be458 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/commonvoice.py @@ -0,0 +1,86 @@ +import csv +import os +from pathlib import Path +from typing import Dict, List, Tuple, Union + +import torchaudio +from torch import Tensor +from torch.utils.data import Dataset + + +def load_commonvoice_item( + line: List[str], header: List[str], path: str, folder_audio: str, ext_audio: str +) -> Tuple[Tensor, int, Dict[str, str]]: + # Each line as the following data: + # client_id, path, sentence, up_votes, down_votes, age, gender, accent + + if header[1] != "path": + raise ValueError(f"expect `header[1]` to be 'path', but got {header[1]}") + fileid = line[1] + filename = os.path.join(path, folder_audio, fileid) + if not filename.endswith(ext_audio): + filename += ext_audio + waveform, sample_rate = torchaudio.load(filename) + + dic = dict(zip(header, line)) + + return waveform, sample_rate, dic + + +class COMMONVOICE(Dataset): + """*CommonVoice* :cite:`ardila2020common` dataset. + + Args: + root (str or Path): Path to the directory where the dataset is located. + (Where the ``tsv`` file is present.) + tsv (str, optional): + The name of the tsv file used to construct the metadata, such as + ``"train.tsv"``, ``"test.tsv"``, ``"dev.tsv"``, ``"invalidated.tsv"``, + ``"validated.tsv"`` and ``"other.tsv"``. (default: ``"train.tsv"``) + """ + + _ext_txt = ".txt" + _ext_audio = ".mp3" + _folder_audio = "clips" + + def __init__(self, root: Union[str, Path], tsv: str = "train.tsv") -> None: + + # Get string representation of 'root' in case Path object is passed + self._path = os.fspath(root) + self._tsv = os.path.join(self._path, tsv) + + with open(self._tsv, "r") as tsv_: + walker = csv.reader(tsv_, delimiter="\t") + self._header = next(walker) + self._walker = list(walker) + + def __getitem__(self, n: int) -> Tuple[Tensor, int, Dict[str, str]]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + Tensor: + Waveform + int: + Sample rate + Dict[str, str]: + Dictionary containing the following items from the corresponding TSV file; + + * ``"client_id"`` + * ``"path"`` + * ``"sentence"`` + * ``"up_votes"`` + * ``"down_votes"`` + * ``"age"`` + * ``"gender"`` + * ``"accent"`` + """ + line = self._walker[n] + return load_commonvoice_item(line, self._header, self._path, self._folder_audio, self._ext_audio) + + def __len__(self) -> int: + return len(self._walker) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/dr_vctk.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/dr_vctk.py new file mode 100644 index 0000000000000000000000000000000000000000..a634b968949480738eefef926d25b05846f0b67d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/dr_vctk.py @@ -0,0 +1,121 @@ +from pathlib import Path +from typing import Dict, Tuple, Union + +import torchaudio +from torch import Tensor +from torch.utils.data import Dataset +from torchaudio._internal import download_url_to_file +from torchaudio.datasets.utils import _extract_zip + + +_URL = "https://datashare.ed.ac.uk/bitstream/handle/10283/3038/DR-VCTK.zip" +_CHECKSUM = "781f12f4406ed36ed27ae3bce55da47ba176e2d8bae67319e389e07b2c9bd769" +_SUPPORTED_SUBSETS = {"train", "test"} + + +class DR_VCTK(Dataset): + """*Device Recorded VCTK (Small subset version)* :cite:`Sarfjoo2018DeviceRV` dataset. + + Args: + root (str or Path): Root directory where the dataset's top level directory is found. + subset (str): The subset to use. Can be one of ``"train"`` and ``"test"``. (default: ``"train"``). + download (bool): + Whether to download the dataset if it is not found at root path. (default: ``False``). + url (str): The URL to download the dataset from. + (default: ``"https://datashare.ed.ac.uk/bitstream/handle/10283/3038/DR-VCTK.zip"``) + """ + + def __init__( + self, + root: Union[str, Path], + subset: str = "train", + *, + download: bool = False, + url: str = _URL, + ) -> None: + if subset not in _SUPPORTED_SUBSETS: + raise RuntimeError( + f"The subset '{subset}' does not match any of the supported subsets: {_SUPPORTED_SUBSETS}" + ) + + root = Path(root).expanduser() + archive = root / "DR-VCTK.zip" + + self._subset = subset + self._path = root / "DR-VCTK" / "DR-VCTK" + self._clean_audio_dir = self._path / f"clean_{self._subset}set_wav_16k" + self._noisy_audio_dir = self._path / f"device-recorded_{self._subset}set_wav_16k" + self._config_filepath = self._path / "configurations" / f"{self._subset}_ch_log.txt" + + if not self._path.is_dir(): + if not archive.is_file(): + if not download: + raise RuntimeError("Dataset not found. Please use `download=True` to download it.") + download_url_to_file(url, archive, hash_prefix=_CHECKSUM) + _extract_zip(archive, root) + + self._config = self._load_config(self._config_filepath) + self._filename_list = sorted(self._config) + + def _load_config(self, filepath: str) -> Dict[str, Tuple[str, int]]: + # Skip header + skip_rows = 2 if self._subset == "train" else 1 + + config = {} + with open(filepath) as f: + for i, line in enumerate(f): + if i < skip_rows or not line: + continue + filename, source, channel_id = line.strip().split("\t") + config[filename] = (source, int(channel_id)) + return config + + def _load_dr_vctk_item(self, filename: str) -> Tuple[Tensor, int, Tensor, int, str, str, str, int]: + speaker_id, utterance_id = filename.split(".")[0].split("_") + source, channel_id = self._config[filename] + file_clean_audio = self._clean_audio_dir / filename + file_noisy_audio = self._noisy_audio_dir / filename + waveform_clean, sample_rate_clean = torchaudio.load(file_clean_audio) + waveform_noisy, sample_rate_noisy = torchaudio.load(file_noisy_audio) + return ( + waveform_clean, + sample_rate_clean, + waveform_noisy, + sample_rate_noisy, + speaker_id, + utterance_id, + source, + channel_id, + ) + + def __getitem__(self, n: int) -> Tuple[Tensor, int, Tensor, int, str, str, str, int]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + Tensor: + Clean waveform + int: + Sample rate of the clean waveform + Tensor: + Noisy waveform + int: + Sample rate of the noisy waveform + str: + Speaker ID + str: + Utterance ID + str: + Source + int: + Channel ID + """ + filename = self._filename_list[n] + return self._load_dr_vctk_item(filename) + + def __len__(self) -> int: + return len(self._filename_list) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/fluentcommands.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/fluentcommands.py new file mode 100644 index 0000000000000000000000000000000000000000..5cdee398d6e31a5e622321d1f73177606d9c8640 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/fluentcommands.py @@ -0,0 +1,108 @@ +import csv +import os +from pathlib import Path +from typing import Tuple, Union + +from torch import Tensor +from torch.utils.data import Dataset +from torchaudio.datasets.utils import _load_waveform + +SAMPLE_RATE = 16000 + + +class FluentSpeechCommands(Dataset): + """*Fluent Speech Commands* :cite:`fluent` dataset + + Args: + root (str of Path): Path to the directory where the dataset is found. + subset (str, optional): subset of the dataset to use. + Options: [``"train"``, ``"valid"``, ``"test"``]. + (Default: ``"train"``) + """ + + def __init__(self, root: Union[str, Path], subset: str = "train"): + if subset not in ["train", "valid", "test"]: + raise ValueError("`subset` must be one of ['train', 'valid', 'test']") + + root = os.fspath(root) + self._path = os.path.join(root, "fluent_speech_commands_dataset") + + if not os.path.isdir(self._path): + raise RuntimeError("Dataset not found.") + + subset_path = os.path.join(self._path, "data", f"{subset}_data.csv") + with open(subset_path) as subset_csv: + subset_reader = csv.reader(subset_csv) + data = list(subset_reader) + + self.header = data[0] + self.data = data[1:] + + def get_metadata(self, n: int) -> Tuple[str, int, str, int, str, str, str, str]: + """Get metadata for the n-th sample from the dataset. Returns filepath instead of waveform, + but otherwise returns the same fields as :py:func:`__getitem__`. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + str: + Path to audio + int: + Sample rate + str: + File name + int: + Speaker ID + str: + Transcription + str: + Action + str: + Object + str: + Location + """ + sample = self.data[n] + + file_name = sample[self.header.index("path")].split("/")[-1] + file_name = file_name.split(".")[0] + speaker_id, transcription, action, obj, location = sample[2:] + file_path = os.path.join("wavs", "speakers", speaker_id, f"{file_name}.wav") + + return file_path, SAMPLE_RATE, file_name, speaker_id, transcription, action, obj, location + + def __len__(self) -> int: + return len(self.data) + + def __getitem__(self, n: int) -> Tuple[Tensor, int, str, int, str, str, str, str]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + Tensor: + Waveform + int: + Sample rate + str: + File name + int: + Speaker ID + str: + Transcription + str: + Action + str: + Object + str: + Location + """ + metadata = self.get_metadata(n) + waveform = _load_waveform(self._path, metadata[0], metadata[1]) + return (waveform,) + metadata[1:] diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/gtzan.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/gtzan.py new file mode 100644 index 0000000000000000000000000000000000000000..347e7e71831770f42d7fdaf0b3c63a09409f659d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/gtzan.py @@ -0,0 +1,1118 @@ +import os +from pathlib import Path +from typing import Optional, Tuple, Union + +import torchaudio +from torch import Tensor +from torch.utils.data import Dataset +from torchaudio._internal import download_url_to_file +from torchaudio.datasets.utils import _extract_tar + +# The following lists prefixed with `filtered_` provide a filtered split +# that: +# +# a. Mitigate a known issue with GTZAN (duplication) +# +# b. Provide a standard split for testing it against other +# methods (e.g. the one in jordipons/sklearn-audio-transfer-learning). +# +# Those are used when GTZAN is initialised with the `filtered` keyword. +# The split was taken from (github) jordipons/sklearn-audio-transfer-learning. + +gtzan_genres = [ + "blues", + "classical", + "country", + "disco", + "hiphop", + "jazz", + "metal", + "pop", + "reggae", + "rock", +] + +filtered_test = [ + "blues.00012", + "blues.00013", + "blues.00014", + "blues.00015", + "blues.00016", + "blues.00017", + "blues.00018", + "blues.00019", + "blues.00020", + "blues.00021", + "blues.00022", + "blues.00023", + "blues.00024", + "blues.00025", + "blues.00026", + "blues.00027", + "blues.00028", + "blues.00061", + "blues.00062", + "blues.00063", + "blues.00064", + "blues.00065", + "blues.00066", + "blues.00067", + "blues.00068", + "blues.00069", + "blues.00070", + "blues.00071", + "blues.00072", + "blues.00098", + "blues.00099", + "classical.00011", + "classical.00012", + "classical.00013", + "classical.00014", + "classical.00015", + "classical.00016", + "classical.00017", + "classical.00018", + "classical.00019", + "classical.00020", + "classical.00021", + "classical.00022", + "classical.00023", + "classical.00024", + "classical.00025", + "classical.00026", + "classical.00027", + "classical.00028", + "classical.00029", + "classical.00034", + "classical.00035", + "classical.00036", + "classical.00037", + "classical.00038", + "classical.00039", + "classical.00040", + "classical.00041", + "classical.00049", + "classical.00077", + "classical.00078", + "classical.00079", + "country.00030", + "country.00031", + "country.00032", + "country.00033", + "country.00034", + "country.00035", + "country.00036", + "country.00037", + "country.00038", + "country.00039", + "country.00040", + "country.00043", + "country.00044", + "country.00046", + "country.00047", + "country.00048", + "country.00050", + "country.00051", + "country.00053", + "country.00054", + "country.00055", + "country.00056", + "country.00057", + "country.00058", + "country.00059", + "country.00060", + "country.00061", + "country.00062", + "country.00063", + "country.00064", + "disco.00001", + "disco.00021", + "disco.00058", + "disco.00062", + "disco.00063", + "disco.00064", + "disco.00065", + "disco.00066", + "disco.00069", + "disco.00076", + "disco.00077", + "disco.00078", + "disco.00079", + "disco.00080", + "disco.00081", + "disco.00082", + "disco.00083", + "disco.00084", + "disco.00085", + "disco.00086", + "disco.00087", + "disco.00088", + "disco.00091", + "disco.00092", + "disco.00093", + "disco.00094", + "disco.00096", + "disco.00097", + "disco.00099", + "hiphop.00000", + "hiphop.00026", + "hiphop.00027", + "hiphop.00030", + "hiphop.00040", + "hiphop.00043", + "hiphop.00044", + "hiphop.00045", + "hiphop.00051", + "hiphop.00052", + "hiphop.00053", + "hiphop.00054", + "hiphop.00062", + "hiphop.00063", + "hiphop.00064", + "hiphop.00065", + "hiphop.00066", + "hiphop.00067", + "hiphop.00068", + "hiphop.00069", + "hiphop.00070", + "hiphop.00071", + "hiphop.00072", + "hiphop.00073", + "hiphop.00074", + "hiphop.00075", + "hiphop.00099", + "jazz.00073", + "jazz.00074", + "jazz.00075", + "jazz.00076", + "jazz.00077", + "jazz.00078", + "jazz.00079", + "jazz.00080", + "jazz.00081", + "jazz.00082", + "jazz.00083", + "jazz.00084", + "jazz.00085", + "jazz.00086", + "jazz.00087", + "jazz.00088", + "jazz.00089", + "jazz.00090", + "jazz.00091", + "jazz.00092", + "jazz.00093", + "jazz.00094", + "jazz.00095", + "jazz.00096", + "jazz.00097", + "jazz.00098", + "jazz.00099", + "metal.00012", + "metal.00013", + "metal.00014", + "metal.00015", + "metal.00022", + "metal.00023", + "metal.00025", + "metal.00026", + "metal.00027", + "metal.00028", + "metal.00029", + "metal.00030", + "metal.00031", + "metal.00032", + "metal.00033", + "metal.00038", + "metal.00039", + "metal.00067", + "metal.00070", + "metal.00073", + "metal.00074", + "metal.00075", + "metal.00078", + "metal.00083", + "metal.00085", + "metal.00087", + "metal.00088", + "pop.00000", + "pop.00001", + "pop.00013", + "pop.00014", + "pop.00043", + "pop.00063", + "pop.00064", + "pop.00065", + "pop.00066", + "pop.00069", + "pop.00070", + "pop.00071", + "pop.00072", + "pop.00073", + "pop.00074", + "pop.00075", + "pop.00076", + "pop.00077", + "pop.00078", + "pop.00079", + "pop.00082", + "pop.00088", + "pop.00089", + "pop.00090", + "pop.00091", + "pop.00092", + "pop.00093", + "pop.00094", + "pop.00095", + "pop.00096", + "reggae.00034", + "reggae.00035", + "reggae.00036", + "reggae.00037", + "reggae.00038", + "reggae.00039", + "reggae.00040", + "reggae.00046", + "reggae.00047", + "reggae.00048", + "reggae.00052", + "reggae.00053", + "reggae.00064", + "reggae.00065", + "reggae.00066", + "reggae.00067", + "reggae.00068", + "reggae.00071", + "reggae.00079", + "reggae.00082", + "reggae.00083", + "reggae.00084", + "reggae.00087", + "reggae.00088", + "reggae.00089", + "reggae.00090", + "rock.00010", + "rock.00011", + "rock.00012", + "rock.00013", + "rock.00014", + "rock.00015", + "rock.00027", + "rock.00028", + "rock.00029", + "rock.00030", + "rock.00031", + "rock.00032", + "rock.00033", + "rock.00034", + "rock.00035", + "rock.00036", + "rock.00037", + "rock.00039", + "rock.00040", + "rock.00041", + "rock.00042", + "rock.00043", + "rock.00044", + "rock.00045", + "rock.00046", + "rock.00047", + "rock.00048", + "rock.00086", + "rock.00087", + "rock.00088", + "rock.00089", + "rock.00090", +] + +filtered_train = [ + "blues.00029", + "blues.00030", + "blues.00031", + "blues.00032", + "blues.00033", + "blues.00034", + "blues.00035", + "blues.00036", + "blues.00037", + "blues.00038", + "blues.00039", + "blues.00040", + "blues.00041", + "blues.00042", + "blues.00043", + "blues.00044", + "blues.00045", + "blues.00046", + "blues.00047", + "blues.00048", + "blues.00049", + "blues.00073", + "blues.00074", + "blues.00075", + "blues.00076", + "blues.00077", + "blues.00078", + "blues.00079", + "blues.00080", + "blues.00081", + "blues.00082", + "blues.00083", + "blues.00084", + "blues.00085", + "blues.00086", + "blues.00087", + "blues.00088", + "blues.00089", + "blues.00090", + "blues.00091", + "blues.00092", + "blues.00093", + "blues.00094", + "blues.00095", + "blues.00096", + "blues.00097", + "classical.00030", + "classical.00031", + "classical.00032", + "classical.00033", + "classical.00043", + "classical.00044", + "classical.00045", + "classical.00046", + "classical.00047", + "classical.00048", + "classical.00050", + "classical.00051", + "classical.00052", + "classical.00053", + "classical.00054", + "classical.00055", + "classical.00056", + "classical.00057", + "classical.00058", + "classical.00059", + "classical.00060", + "classical.00061", + "classical.00062", + "classical.00063", + "classical.00064", + "classical.00065", + "classical.00066", + "classical.00067", + "classical.00080", + "classical.00081", + "classical.00082", + "classical.00083", + "classical.00084", + "classical.00085", + "classical.00086", + "classical.00087", + "classical.00088", + "classical.00089", + "classical.00090", + "classical.00091", + "classical.00092", + "classical.00093", + "classical.00094", + "classical.00095", + "classical.00096", + "classical.00097", + "classical.00098", + "classical.00099", + "country.00019", + "country.00020", + "country.00021", + "country.00022", + "country.00023", + "country.00024", + "country.00025", + "country.00026", + "country.00028", + "country.00029", + "country.00065", + "country.00066", + "country.00067", + "country.00068", + "country.00069", + "country.00070", + "country.00071", + "country.00072", + "country.00073", + "country.00074", + "country.00075", + "country.00076", + "country.00077", + "country.00078", + "country.00079", + "country.00080", + "country.00081", + "country.00082", + "country.00083", + "country.00084", + "country.00085", + "country.00086", + "country.00087", + "country.00088", + "country.00089", + "country.00090", + "country.00091", + "country.00092", + "country.00093", + "country.00094", + "country.00095", + "country.00096", + "country.00097", + "country.00098", + "country.00099", + "disco.00005", + "disco.00015", + "disco.00016", + "disco.00017", + "disco.00018", + "disco.00019", + "disco.00020", + "disco.00022", + "disco.00023", + "disco.00024", + "disco.00025", + "disco.00026", + "disco.00027", + "disco.00028", + "disco.00029", + "disco.00030", + "disco.00031", + "disco.00032", + "disco.00033", + "disco.00034", + "disco.00035", + "disco.00036", + "disco.00037", + "disco.00039", + "disco.00040", + "disco.00041", + "disco.00042", + "disco.00043", + "disco.00044", + "disco.00045", + "disco.00047", + "disco.00049", + "disco.00053", + "disco.00054", + "disco.00056", + "disco.00057", + "disco.00059", + "disco.00061", + "disco.00070", + "disco.00073", + "disco.00074", + "disco.00089", + "hiphop.00002", + "hiphop.00003", + "hiphop.00004", + "hiphop.00005", + "hiphop.00006", + "hiphop.00007", + "hiphop.00008", + "hiphop.00009", + "hiphop.00010", + "hiphop.00011", + "hiphop.00012", + "hiphop.00013", + "hiphop.00014", + "hiphop.00015", + "hiphop.00016", + "hiphop.00017", + "hiphop.00018", + "hiphop.00019", + "hiphop.00020", + "hiphop.00021", + "hiphop.00022", + "hiphop.00023", + "hiphop.00024", + "hiphop.00025", + "hiphop.00028", + "hiphop.00029", + "hiphop.00031", + "hiphop.00032", + "hiphop.00033", + "hiphop.00034", + "hiphop.00035", + "hiphop.00036", + "hiphop.00037", + "hiphop.00038", + "hiphop.00041", + "hiphop.00042", + "hiphop.00055", + "hiphop.00056", + "hiphop.00057", + "hiphop.00058", + "hiphop.00059", + "hiphop.00060", + "hiphop.00061", + "hiphop.00077", + "hiphop.00078", + "hiphop.00079", + "hiphop.00080", + "jazz.00000", + "jazz.00001", + "jazz.00011", + "jazz.00012", + "jazz.00013", + "jazz.00014", + "jazz.00015", + "jazz.00016", + "jazz.00017", + "jazz.00018", + "jazz.00019", + "jazz.00020", + "jazz.00021", + "jazz.00022", + "jazz.00023", + "jazz.00024", + "jazz.00041", + "jazz.00047", + "jazz.00048", + "jazz.00049", + "jazz.00050", + "jazz.00051", + "jazz.00052", + "jazz.00053", + "jazz.00054", + "jazz.00055", + "jazz.00056", + "jazz.00057", + "jazz.00058", + "jazz.00059", + "jazz.00060", + "jazz.00061", + "jazz.00062", + "jazz.00063", + "jazz.00064", + "jazz.00065", + "jazz.00066", + "jazz.00067", + "jazz.00068", + "jazz.00069", + "jazz.00070", + "jazz.00071", + "jazz.00072", + "metal.00002", + "metal.00003", + "metal.00005", + "metal.00021", + "metal.00024", + "metal.00035", + "metal.00046", + "metal.00047", + "metal.00048", + "metal.00049", + "metal.00050", + "metal.00051", + "metal.00052", + "metal.00053", + "metal.00054", + "metal.00055", + "metal.00056", + "metal.00057", + "metal.00059", + "metal.00060", + "metal.00061", + "metal.00062", + "metal.00063", + "metal.00064", + "metal.00065", + "metal.00066", + "metal.00069", + "metal.00071", + "metal.00072", + "metal.00079", + "metal.00080", + "metal.00084", + "metal.00086", + "metal.00089", + "metal.00090", + "metal.00091", + "metal.00092", + "metal.00093", + "metal.00094", + "metal.00095", + "metal.00096", + "metal.00097", + "metal.00098", + "metal.00099", + "pop.00002", + "pop.00003", + "pop.00004", + "pop.00005", + "pop.00006", + "pop.00007", + "pop.00008", + "pop.00009", + "pop.00011", + "pop.00012", + "pop.00016", + "pop.00017", + "pop.00018", + "pop.00019", + "pop.00020", + "pop.00023", + "pop.00024", + "pop.00025", + "pop.00026", + "pop.00027", + "pop.00028", + "pop.00029", + "pop.00031", + "pop.00032", + "pop.00033", + "pop.00034", + "pop.00035", + "pop.00036", + "pop.00038", + "pop.00039", + "pop.00040", + "pop.00041", + "pop.00042", + "pop.00044", + "pop.00046", + "pop.00049", + "pop.00050", + "pop.00080", + "pop.00097", + "pop.00098", + "pop.00099", + "reggae.00000", + "reggae.00001", + "reggae.00002", + "reggae.00004", + "reggae.00006", + "reggae.00009", + "reggae.00011", + "reggae.00012", + "reggae.00014", + "reggae.00015", + "reggae.00016", + "reggae.00017", + "reggae.00018", + "reggae.00019", + "reggae.00020", + "reggae.00021", + "reggae.00022", + "reggae.00023", + "reggae.00024", + "reggae.00025", + "reggae.00026", + "reggae.00027", + "reggae.00028", + "reggae.00029", + "reggae.00030", + "reggae.00031", + "reggae.00032", + "reggae.00042", + "reggae.00043", + "reggae.00044", + "reggae.00045", + "reggae.00049", + "reggae.00050", + "reggae.00051", + "reggae.00054", + "reggae.00055", + "reggae.00056", + "reggae.00057", + "reggae.00058", + "reggae.00059", + "reggae.00060", + "reggae.00063", + "reggae.00069", + "rock.00000", + "rock.00001", + "rock.00002", + "rock.00003", + "rock.00004", + "rock.00005", + "rock.00006", + "rock.00007", + "rock.00008", + "rock.00009", + "rock.00016", + "rock.00017", + "rock.00018", + "rock.00019", + "rock.00020", + "rock.00021", + "rock.00022", + "rock.00023", + "rock.00024", + "rock.00025", + "rock.00026", + "rock.00057", + "rock.00058", + "rock.00059", + "rock.00060", + "rock.00061", + "rock.00062", + "rock.00063", + "rock.00064", + "rock.00065", + "rock.00066", + "rock.00067", + "rock.00068", + "rock.00069", + "rock.00070", + "rock.00091", + "rock.00092", + "rock.00093", + "rock.00094", + "rock.00095", + "rock.00096", + "rock.00097", + "rock.00098", + "rock.00099", +] + +filtered_valid = [ + "blues.00000", + "blues.00001", + "blues.00002", + "blues.00003", + "blues.00004", + "blues.00005", + "blues.00006", + "blues.00007", + "blues.00008", + "blues.00009", + "blues.00010", + "blues.00011", + "blues.00050", + "blues.00051", + "blues.00052", + "blues.00053", + "blues.00054", + "blues.00055", + "blues.00056", + "blues.00057", + "blues.00058", + "blues.00059", + "blues.00060", + "classical.00000", + "classical.00001", + "classical.00002", + "classical.00003", + "classical.00004", + "classical.00005", + "classical.00006", + "classical.00007", + "classical.00008", + "classical.00009", + "classical.00010", + "classical.00068", + "classical.00069", + "classical.00070", + "classical.00071", + "classical.00072", + "classical.00073", + "classical.00074", + "classical.00075", + "classical.00076", + "country.00000", + "country.00001", + "country.00002", + "country.00003", + "country.00004", + "country.00005", + "country.00006", + "country.00007", + "country.00009", + "country.00010", + "country.00011", + "country.00012", + "country.00013", + "country.00014", + "country.00015", + "country.00016", + "country.00017", + "country.00018", + "country.00027", + "country.00041", + "country.00042", + "country.00045", + "country.00049", + "disco.00000", + "disco.00002", + "disco.00003", + "disco.00004", + "disco.00006", + "disco.00007", + "disco.00008", + "disco.00009", + "disco.00010", + "disco.00011", + "disco.00012", + "disco.00013", + "disco.00014", + "disco.00046", + "disco.00048", + "disco.00052", + "disco.00067", + "disco.00068", + "disco.00072", + "disco.00075", + "disco.00090", + "disco.00095", + "hiphop.00081", + "hiphop.00082", + "hiphop.00083", + "hiphop.00084", + "hiphop.00085", + "hiphop.00086", + "hiphop.00087", + "hiphop.00088", + "hiphop.00089", + "hiphop.00090", + "hiphop.00091", + "hiphop.00092", + "hiphop.00093", + "hiphop.00094", + "hiphop.00095", + "hiphop.00096", + "hiphop.00097", + "hiphop.00098", + "jazz.00002", + "jazz.00003", + "jazz.00004", + "jazz.00005", + "jazz.00006", + "jazz.00007", + "jazz.00008", + "jazz.00009", + "jazz.00010", + "jazz.00025", + "jazz.00026", + "jazz.00027", + "jazz.00028", + "jazz.00029", + "jazz.00030", + "jazz.00031", + "jazz.00032", + "metal.00000", + "metal.00001", + "metal.00006", + "metal.00007", + "metal.00008", + "metal.00009", + "metal.00010", + "metal.00011", + "metal.00016", + "metal.00017", + "metal.00018", + "metal.00019", + "metal.00020", + "metal.00036", + "metal.00037", + "metal.00068", + "metal.00076", + "metal.00077", + "metal.00081", + "metal.00082", + "pop.00010", + "pop.00053", + "pop.00055", + "pop.00058", + "pop.00059", + "pop.00060", + "pop.00061", + "pop.00062", + "pop.00081", + "pop.00083", + "pop.00084", + "pop.00085", + "pop.00086", + "reggae.00061", + "reggae.00062", + "reggae.00070", + "reggae.00072", + "reggae.00074", + "reggae.00076", + "reggae.00077", + "reggae.00078", + "reggae.00085", + "reggae.00092", + "reggae.00093", + "reggae.00094", + "reggae.00095", + "reggae.00096", + "reggae.00097", + "reggae.00098", + "reggae.00099", + "rock.00038", + "rock.00049", + "rock.00050", + "rock.00051", + "rock.00052", + "rock.00053", + "rock.00054", + "rock.00055", + "rock.00056", + "rock.00071", + "rock.00072", + "rock.00073", + "rock.00074", + "rock.00075", + "rock.00076", + "rock.00077", + "rock.00078", + "rock.00079", + "rock.00080", + "rock.00081", + "rock.00082", + "rock.00083", + "rock.00084", + "rock.00085", +] + + +URL = "http://opihi.cs.uvic.ca/sound/genres.tar.gz" +FOLDER_IN_ARCHIVE = "genres" +_CHECKSUMS = { + "http://opihi.cs.uvic.ca/sound/genres.tar.gz": "24347e0223d2ba798e0a558c4c172d9d4a19c00bb7963fe055d183dadb4ef2c6" +} + + +def load_gtzan_item(fileid: str, path: str, ext_audio: str) -> Tuple[Tensor, str]: + """ + Loads a file from the dataset and returns the raw waveform + as a Torch Tensor, its sample rate as an integer, and its + genre as a string. + """ + # Filenames are of the form label.id, e.g. blues.00078 + label, _ = fileid.split(".") + + # Read wav + file_audio = os.path.join(path, label, fileid + ext_audio) + waveform, sample_rate = torchaudio.load(file_audio) + + return waveform, sample_rate, label + + +class GTZAN(Dataset): + """*GTZAN* :cite:`tzanetakis_essl_cook_2001` dataset. + + Note: + Please see http://marsyas.info/downloads/datasets.html if you are planning to use + this dataset to publish results. + + Note: + As of October 2022, the download link is not currently working. Setting ``download=True`` + in GTZAN dataset will result in a URL connection error. + + Args: + root (str or Path): Path to the directory where the dataset is found or downloaded. + url (str, optional): The URL to download the dataset from. + (default: ``"http://opihi.cs.uvic.ca/sound/genres.tar.gz"``) + folder_in_archive (str, optional): The top-level directory of the dataset. + download (bool, optional): + Whether to download the dataset if it is not found at root path. (default: ``False``). + subset (str or None, optional): Which subset of the dataset to use. + One of ``"training"``, ``"validation"``, ``"testing"`` or ``None``. + If ``None``, the entire dataset is used. (default: ``None``). + """ + + _ext_audio = ".wav" + + def __init__( + self, + root: Union[str, Path], + url: str = URL, + folder_in_archive: str = FOLDER_IN_ARCHIVE, + download: bool = False, + subset: Optional[str] = None, + ) -> None: + + # super(GTZAN, self).__init__() + + # Get string representation of 'root' in case Path object is passed + root = os.fspath(root) + + self.root = root + self.url = url + self.folder_in_archive = folder_in_archive + self.download = download + self.subset = subset + + if subset is not None and subset not in ["training", "validation", "testing"]: + raise ValueError("When `subset` is not None, it must be one of ['training', 'validation', 'testing'].") + + archive = os.path.basename(url) + archive = os.path.join(root, archive) + self._path = os.path.join(root, folder_in_archive) + + if download: + if not os.path.isdir(self._path): + if not os.path.isfile(archive): + checksum = _CHECKSUMS.get(url, None) + download_url_to_file(url, archive, hash_prefix=checksum) + _extract_tar(archive) + + if not os.path.isdir(self._path): + raise RuntimeError("Dataset not found. Please use `download=True` to download it.") + + if self.subset is None: + # Check every subdirectory under dataset root + # which has the same name as the genres in + # GTZAN (e.g. `root_dir'/blues/, `root_dir'/rock, etc.) + # This lets users remove or move around song files, + # useful when e.g. they want to use only some of the files + # in a genre or want to label other files with a different + # genre. + self._walker = [] + + root = os.path.expanduser(self._path) + + for directory in gtzan_genres: + fulldir = os.path.join(root, directory) + + if not os.path.exists(fulldir): + continue + + songs_in_genre = os.listdir(fulldir) + songs_in_genre.sort() + for fname in songs_in_genre: + name, ext = os.path.splitext(fname) + if ext.lower() == ".wav" and "." in name: + # Check whether the file is of the form + # `gtzan_genre`.`5 digit number`.wav + genre, num = name.split(".") + if genre in gtzan_genres and len(num) == 5 and num.isdigit(): + self._walker.append(name) + else: + if self.subset == "training": + self._walker = filtered_train + elif self.subset == "validation": + self._walker = filtered_valid + elif self.subset == "testing": + self._walker = filtered_test + + def __getitem__(self, n: int) -> Tuple[Tensor, int, str]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + Tensor: + Waveform + int: + Sample rate + str: + Label + """ + fileid = self._walker[n] + item = load_gtzan_item(fileid, self._path, self._ext_audio) + waveform, sample_rate, label = item + return waveform, sample_rate, label + + def __len__(self) -> int: + return len(self._walker) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/iemocap.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/iemocap.py new file mode 100644 index 0000000000000000000000000000000000000000..224300a84f5ec3ae217f030783c825fc3db56c8a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/iemocap.py @@ -0,0 +1,147 @@ +import os +import re +from pathlib import Path +from typing import Optional, Tuple, Union + +from torch import Tensor +from torch.utils.data import Dataset +from torchaudio.datasets.utils import _load_waveform + + +_SAMPLE_RATE = 16000 + + +def _get_wavs_paths(data_dir): + wav_dir = data_dir / "sentences" / "wav" + wav_paths = sorted(str(p) for p in wav_dir.glob("*/*.wav")) + relative_paths = [] + for wav_path in wav_paths: + start = wav_path.find("Session") + wav_path = wav_path[start:] + relative_paths.append(wav_path) + return relative_paths + + +class IEMOCAP(Dataset): + """*IEMOCAP* :cite:`iemocap` dataset. + + Args: + root (str or Path): Root directory where the dataset's top level directory is found + sessions (Tuple[int]): Tuple of sessions (1-5) to use. (Default: ``(1, 2, 3, 4, 5)``) + utterance_type (str or None, optional): Which type(s) of utterances to include in the dataset. + Options: ("scripted", "improvised", ``None``). If ``None``, both scripted and improvised + data are used. + """ + + def __init__( + self, + root: Union[str, Path], + sessions: Tuple[str] = (1, 2, 3, 4, 5), + utterance_type: Optional[str] = None, + ): + root = Path(root) + self._path = root / "IEMOCAP" + + if not os.path.isdir(self._path): + raise RuntimeError("Dataset not found.") + + if utterance_type not in ["scripted", "improvised", None]: + raise ValueError("utterance_type must be one of ['scripted', 'improvised', or None]") + + all_data = [] + self.data = [] + self.mapping = {} + + for session in sessions: + session_name = f"Session{session}" + session_dir = self._path / session_name + + # get wav paths + wav_paths = _get_wavs_paths(session_dir) + for wav_path in wav_paths: + wav_stem = str(Path(wav_path).stem) + all_data.append(wav_stem) + + # add labels + label_dir = session_dir / "dialog" / "EmoEvaluation" + query = "*.txt" + if utterance_type == "scripted": + query = "*script*.txt" + elif utterance_type == "improvised": + query = "*impro*.txt" + label_paths = label_dir.glob(query) + + for label_path in label_paths: + with open(label_path, "r") as f: + for line in f: + if not line.startswith("["): + continue + line = re.split("[\t\n]", line) + wav_stem = line[1] + label = line[2] + if wav_stem not in all_data: + continue + if label not in ["neu", "hap", "ang", "sad", "exc", "fru"]: + continue + self.mapping[wav_stem] = {} + self.mapping[wav_stem]["label"] = label + + for wav_path in wav_paths: + wav_stem = str(Path(wav_path).stem) + if wav_stem in self.mapping: + self.data.append(wav_stem) + self.mapping[wav_stem]["path"] = wav_path + + def get_metadata(self, n: int) -> Tuple[str, int, str, str, str]: + """Get metadata for the n-th sample from the dataset. Returns filepath instead of waveform, + but otherwise returns the same fields as :py:meth:`__getitem__`. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + str: + Path to audio + int: + Sample rate + str: + File name + str: + Label (one of ``"neu"``, ``"hap"``, ``"ang"``, ``"sad"``, ``"exc"``, ``"fru"``) + str: + Speaker + """ + wav_stem = self.data[n] + wav_path = self.mapping[wav_stem]["path"] + label = self.mapping[wav_stem]["label"] + speaker = wav_stem.split("_")[0] + return (wav_path, _SAMPLE_RATE, wav_stem, label, speaker) + + def __getitem__(self, n: int) -> Tuple[Tensor, int, str, str, str]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + Tensor: + Waveform + int: + Sample rate + str: + File name + str: + Label (one of ``"neu"``, ``"hap"``, ``"ang"``, ``"sad"``, ``"exc"``, ``"fru"``) + str: + Speaker + """ + metadata = self.get_metadata(n) + waveform = _load_waveform(self._path, metadata[0], metadata[1]) + return (waveform,) + metadata[1:] + + def __len__(self): + return len(self.data) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/librilight_limited.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/librilight_limited.py new file mode 100644 index 0000000000000000000000000000000000000000..f0cb3100f7c4ad2e488c20bdfaac3833e0a136dd --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/librilight_limited.py @@ -0,0 +1,111 @@ +import os +from pathlib import Path +from typing import List, Tuple, Union + +import torchaudio +from torch import Tensor +from torch.utils.data import Dataset +from torchaudio._internal import download_url_to_file +from torchaudio.datasets.librispeech import _get_librispeech_metadata +from torchaudio.datasets.utils import _extract_tar + + +_ARCHIVE_NAME = "librispeech_finetuning" +_URL = "https://dl.fbaipublicfiles.com/librilight/data/librispeech_finetuning.tgz" +_CHECKSUM = "5d1efdc777b548194d7e09ba89126e2188026df9fd57aa57eb14408d2b2342af" +_SUBSET_MAP = {"10min": ["1h/0"], "1h": ["1h/*"], "10h": ["1h/*", "9h"]} + + +def _get_fileids_paths(path: Path, folders: List[str], _ext_audio: str) -> List[Tuple[str, str]]: + """Get the file names and the corresponding file paths without `speaker_id` + and `chapter_id` directories. + The format of path is like: + {root}/{_ARCHIVE_NAME}/1h/[0-5]/[clean, other] or + {root}/{_ARCHIVE_NAME}/9h/[clean, other] + + Args: + path (Path): Root path to the dataset. + folders (List[str]): Folders that contain the desired audio files. + _ext_audio (str): Extension of audio files. + + Returns: + List[Tuple[str, str]]: + List of tuples where the first element is the relative path to the audio file. + The format of relative path is like: + 1h/[0-5]/[clean, other] or 9h/[clean, other] + The second element is the file name without audio extension. + """ + + path = Path(path) + files_paths = [] + for folder in folders: + paths = [p.relative_to(path) for p in path.glob(f"{folder}/*/*/*/*{_ext_audio}")] + files_paths += [(str(p.parent.parent.parent), str(p.stem)) for p in paths] # get subset folder and file name + files_paths.sort(key=lambda x: x[0] + x[1]) + return files_paths + + +class LibriLightLimited(Dataset): + """Subset of Libri-light :cite:`librilight` dataset, + which was used in HuBERT :cite:`hsu2021hubert` for supervised fine-tuning. + + Args: + root (str or Path): Path to the directory where the dataset is found or downloaded. + subset (str, optional): The subset to use. Options: [``"10min"``, ``"1h"``, ``"10h"``] + (Default: ``"10min"``). + download (bool, optional): + Whether to download the dataset if it is not found at root path. (default: ``False``). + """ + + _ext_txt = ".trans.txt" + _ext_audio = ".flac" + + def __init__( + self, + root: Union[str, Path], + subset: str = "10min", + download: bool = False, + ) -> None: + if subset not in _SUBSET_MAP: + raise ValueError(f"`subset` must be one of {_SUBSET_MAP.keys()}. Found: {subset}") + folders = _SUBSET_MAP[subset] + + root = os.fspath(root) + self._path = os.path.join(root, _ARCHIVE_NAME) + archive = os.path.join(root, f"{_ARCHIVE_NAME}.tgz") + if not os.path.isdir(self._path): + if not download: + raise RuntimeError("Dataset not found. Please use `download=True` to download") + if not os.path.isfile(archive): + download_url_to_file(_URL, archive, hash_prefix=_CHECKSUM) + _extract_tar(archive) + self._fileids_paths = _get_fileids_paths(self._path, folders, self._ext_audio) + + def __getitem__(self, n: int) -> Tuple[Tensor, int, str, int, int, int]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + Returns: + Tuple of the following items; + + Tensor: + Waveform + int: + Sample rate + str: + Transcript + int: + Speaker ID + int: + Chapter ID + int: + Utterance ID + """ + file_path, fileid = self._fileids_paths[n] + metadata = _get_librispeech_metadata(fileid, self._path, file_path, self._ext_audio, self._ext_txt) + waveform, _ = torchaudio.load(os.path.join(self._path, metadata[0])) + return (waveform,) + metadata[1:] + + def __len__(self) -> int: + return len(self._fileids_paths) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/librimix.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/librimix.py new file mode 100644 index 0000000000000000000000000000000000000000..2c6c6f18600ab35f037dda11f9f5bc32c8a5cbf5 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/librimix.py @@ -0,0 +1,133 @@ +import os +from pathlib import Path +from typing import List, Tuple, Union + +import torch +from torch.utils.data import Dataset +from torchaudio.datasets.utils import _load_waveform + +_TASKS_TO_MIXTURE = { + "sep_clean": "mix_clean", + "enh_single": "mix_single", + "enh_both": "mix_both", + "sep_noisy": "mix_both", +} + + +class LibriMix(Dataset): + r"""*LibriMix* :cite:`cosentino2020librimix` dataset. + + Args: + root (str or Path): The path where the directory ``Libri2Mix`` or + ``Libri3Mix`` is stored. Not the path of those directories. + subset (str, optional): The subset to use. Options: [``"train-360"``, ``"train-100"``, + ``"dev"``, and ``"test"``] (Default: ``"train-360"``). + num_speakers (int, optional): The number of speakers, which determines the directories + to traverse. The Dataset will traverse ``s1`` to ``sN`` directories to collect + N source audios. (Default: 2) + sample_rate (int, optional): Sample rate of audio files. The ``sample_rate`` determines + which subdirectory the audio are fetched. If any of the audio has a different sample + rate, raises ``ValueError``. Options: [8000, 16000] (Default: 8000) + task (str, optional): The task of LibriMix. + Options: [``"enh_single"``, ``"enh_both"``, ``"sep_clean"``, ``"sep_noisy"``] + (Default: ``"sep_clean"``) + mode (str, optional): The mode when creating the mixture. If set to ``"min"``, the lengths of mixture + and sources are the minimum length of all sources. If set to ``"max"``, the lengths of mixture and + sources are zero padded to the maximum length of all sources. + Options: [``"min"``, ``"max"``] + (Default: ``"min"``) + + Note: + The LibriMix dataset needs to be manually generated. Please check https://github.com/JorisCos/LibriMix + """ + + def __init__( + self, + root: Union[str, Path], + subset: str = "train-360", + num_speakers: int = 2, + sample_rate: int = 8000, + task: str = "sep_clean", + mode: str = "min", + ): + self.root = Path(root) / f"Libri{num_speakers}Mix" + if not os.path.exists(self.root): + raise RuntimeError( + f"The path {self.root} doesn't exist. " + "Please check the ``root`` path and ``num_speakers`` or download the dataset manually." + ) + if mode not in ["max", "min"]: + raise ValueError(f'Expect ``mode`` to be one in ["min", "max"]. Found {mode}.') + if sample_rate == 8000: + mix_dir = self.root / "wav8k" / mode / subset + elif sample_rate == 16000: + mix_dir = self.root / "wav16k" / mode / subset + else: + raise ValueError(f"Unsupported sample rate. Found {sample_rate}.") + self.sample_rate = sample_rate + self.task = task + + self.mix_dir = mix_dir / _TASKS_TO_MIXTURE[task] + if task == "enh_both": + self.src_dirs = [(mix_dir / "mix_clean")] + else: + self.src_dirs = [(mix_dir / f"s{i+1}") for i in range(num_speakers)] + + self.files = [p.name for p in self.mix_dir.glob("*.wav")] + self.files.sort() + + def _load_sample(self, key) -> Tuple[int, torch.Tensor, List[torch.Tensor]]: + metadata = self.get_metadata(key) + mixed = _load_waveform(self.root, metadata[1], metadata[0]) + srcs = [] + for i, path_ in enumerate(metadata[2]): + src = _load_waveform(self.root, path_, metadata[0]) + if mixed.shape != src.shape: + raise ValueError(f"Different waveform shapes. mixed: {mixed.shape}, src[{i}]: {src.shape}") + srcs.append(src) + return self.sample_rate, mixed, srcs + + def get_metadata(self, key: int) -> Tuple[int, str, List[str]]: + """Get metadata for the n-th sample from the dataset. + + Args: + key (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + int: + Sample rate + str: + Path to mixed audio + List of str: + List of paths to source audios + """ + filename = self.files[key] + mixed_path = os.path.relpath(self.mix_dir / filename, self.root) + srcs_paths = [] + for dir_ in self.src_dirs: + src = os.path.relpath(dir_ / filename, self.root) + srcs_paths.append(src) + return self.sample_rate, mixed_path, srcs_paths + + def __len__(self) -> int: + return len(self.files) + + def __getitem__(self, key: int) -> Tuple[int, torch.Tensor, List[torch.Tensor]]: + """Load the n-th sample from the dataset. + + Args: + key (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + int: + Sample rate + Tensor: + Mixture waveform + List of Tensors: + List of source waveforms + """ + return self._load_sample(key) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/librispeech.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/librispeech.py new file mode 100644 index 0000000000000000000000000000000000000000..7cf05dbecb5cce24c91e3bbcf232935e1f6d8cd9 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/librispeech.py @@ -0,0 +1,174 @@ +import os +from pathlib import Path +from typing import Tuple, Union + +from torch import Tensor +from torch.utils.data import Dataset +from torchaudio._internal import download_url_to_file +from torchaudio.datasets.utils import _extract_tar, _load_waveform + +URL = "train-clean-100" +FOLDER_IN_ARCHIVE = "LibriSpeech" +SAMPLE_RATE = 16000 +_DATA_SUBSETS = [ + "dev-clean", + "dev-other", + "test-clean", + "test-other", + "train-clean-100", + "train-clean-360", + "train-other-500", +] +_CHECKSUMS = { + "http://www.openslr.org/resources/12/dev-clean.tar.gz": "76f87d090650617fca0cac8f88b9416e0ebf80350acb97b343a85fa903728ab3", # noqa: E501 + "http://www.openslr.org/resources/12/dev-other.tar.gz": "12661c48e8c3fe1de2c1caa4c3e135193bfb1811584f11f569dd12645aa84365", # noqa: E501 + "http://www.openslr.org/resources/12/test-clean.tar.gz": "39fde525e59672dc6d1551919b1478f724438a95aa55f874b576be21967e6c23", # noqa: E501 + "http://www.openslr.org/resources/12/test-other.tar.gz": "d09c181bba5cf717b3dee7d4d592af11a3ee3a09e08ae025c5506f6ebe961c29", # noqa: E501 + "http://www.openslr.org/resources/12/train-clean-100.tar.gz": "d4ddd1d5a6ab303066f14971d768ee43278a5f2a0aa43dc716b0e64ecbbbf6e2", # noqa: E501 + "http://www.openslr.org/resources/12/train-clean-360.tar.gz": "146a56496217e96c14334a160df97fffedd6e0a04e66b9c5af0d40be3c792ecf", # noqa: E501 + "http://www.openslr.org/resources/12/train-other-500.tar.gz": "ddb22f27f96ec163645d53215559df6aa36515f26e01dd70798188350adcb6d2", # noqa: E501 +} + + +def _download_librispeech(root, url): + base_url = "http://www.openslr.org/resources/12/" + ext_archive = ".tar.gz" + + filename = url + ext_archive + archive = os.path.join(root, filename) + download_url = os.path.join(base_url, filename) + if not os.path.isfile(archive): + checksum = _CHECKSUMS.get(download_url, None) + download_url_to_file(download_url, archive, hash_prefix=checksum) + _extract_tar(archive) + + +def _get_librispeech_metadata( + fileid: str, root: str, folder: str, ext_audio: str, ext_txt: str +) -> Tuple[str, int, str, int, int, int]: + speaker_id, chapter_id, utterance_id = fileid.split("-") + + # Get audio path and sample rate + fileid_audio = f"{speaker_id}-{chapter_id}-{utterance_id}" + filepath = os.path.join(folder, speaker_id, chapter_id, f"{fileid_audio}{ext_audio}") + + # Load text + file_text = f"{speaker_id}-{chapter_id}{ext_txt}" + file_text = os.path.join(root, folder, speaker_id, chapter_id, file_text) + with open(file_text) as ft: + for line in ft: + fileid_text, transcript = line.strip().split(" ", 1) + if fileid_audio == fileid_text: + break + else: + # Translation not found + raise FileNotFoundError(f"Translation not found for {fileid_audio}") + + return ( + filepath, + SAMPLE_RATE, + transcript, + int(speaker_id), + int(chapter_id), + int(utterance_id), + ) + + +class LIBRISPEECH(Dataset): + """*LibriSpeech* :cite:`7178964` dataset. + + Args: + root (str or Path): Path to the directory where the dataset is found or downloaded. + url (str, optional): The URL to download the dataset from, + or the type of the dataset to dowload. + Allowed type values are ``"dev-clean"``, ``"dev-other"``, ``"test-clean"``, + ``"test-other"``, ``"train-clean-100"``, ``"train-clean-360"`` and + ``"train-other-500"``. (default: ``"train-clean-100"``) + folder_in_archive (str, optional): + The top-level directory of the dataset. (default: ``"LibriSpeech"``) + download (bool, optional): + Whether to download the dataset if it is not found at root path. (default: ``False``). + """ + + _ext_txt = ".trans.txt" + _ext_audio = ".flac" + + def __init__( + self, + root: Union[str, Path], + url: str = URL, + folder_in_archive: str = FOLDER_IN_ARCHIVE, + download: bool = False, + ) -> None: + self._url = url + if url not in _DATA_SUBSETS: + raise ValueError(f"Invalid url '{url}' given; please provide one of {_DATA_SUBSETS}.") + + root = os.fspath(root) + self._archive = os.path.join(root, folder_in_archive) + self._path = os.path.join(root, folder_in_archive, url) + + if not os.path.isdir(self._path): + if download: + _download_librispeech(root, url) + else: + raise RuntimeError( + f"Dataset not found at {self._path}. Please set `download=True` to download the dataset." + ) + + self._walker = sorted(str(p.stem) for p in Path(self._path).glob("*/*/*" + self._ext_audio)) + + def get_metadata(self, n: int) -> Tuple[str, int, str, int, int, int]: + """Get metadata for the n-th sample from the dataset. Returns filepath instead of waveform, + but otherwise returns the same fields as :py:func:`__getitem__`. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + str: + Path to audio + int: + Sample rate + str: + Transcript + int: + Speaker ID + int: + Chapter ID + int: + Utterance ID + """ + fileid = self._walker[n] + return _get_librispeech_metadata(fileid, self._archive, self._url, self._ext_audio, self._ext_txt) + + def __getitem__(self, n: int) -> Tuple[Tensor, int, str, int, int, int]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + Tensor: + Waveform + int: + Sample rate + str: + Transcript + int: + Speaker ID + int: + Chapter ID + int: + Utterance ID + """ + metadata = self.get_metadata(n) + waveform = _load_waveform(self._archive, metadata[0], metadata[1]) + return (waveform,) + metadata[1:] + + def __len__(self) -> int: + return len(self._walker) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/librispeech_biasing.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/librispeech_biasing.py new file mode 100644 index 0000000000000000000000000000000000000000..bd518cf2b69094728f8693fe2cb8a2a535bd7d3c --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/librispeech_biasing.py @@ -0,0 +1,189 @@ +import os +from pathlib import Path +from typing import List, Tuple, Union + +from torch import Tensor +from torch.utils.data import Dataset +from torchaudio._internal import download_url_to_file +from torchaudio.datasets.utils import _extract_tar, _load_waveform + +URL = "train-clean-100" +FOLDER_IN_ARCHIVE = "LibriSpeech" +SAMPLE_RATE = 16000 +_DATA_SUBSETS = [ + "dev-clean", + "dev-other", + "test-clean", + "test-other", + "train-clean-100", + "train-clean-360", + "train-other-500", +] +_CHECKSUMS = { + "http://www.openslr.org/resources/12/dev-clean.tar.gz": "76f87d090650617fca0cac8f88b9416e0ebf80350acb97b343a85fa903728ab3", # noqa: E501 + "http://www.openslr.org/resources/12/dev-other.tar.gz": "12661c48e8c3fe1de2c1caa4c3e135193bfb1811584f11f569dd12645aa84365", # noqa: E501 + "http://www.openslr.org/resources/12/test-clean.tar.gz": "39fde525e59672dc6d1551919b1478f724438a95aa55f874b576be21967e6c23", # noqa: E501 + "http://www.openslr.org/resources/12/test-other.tar.gz": "d09c181bba5cf717b3dee7d4d592af11a3ee3a09e08ae025c5506f6ebe961c29", # noqa: E501 + "http://www.openslr.org/resources/12/train-clean-100.tar.gz": "d4ddd1d5a6ab303066f14971d768ee43278a5f2a0aa43dc716b0e64ecbbbf6e2", # noqa: E501 + "http://www.openslr.org/resources/12/train-clean-360.tar.gz": "146a56496217e96c14334a160df97fffedd6e0a04e66b9c5af0d40be3c792ecf", # noqa: E501 + "http://www.openslr.org/resources/12/train-other-500.tar.gz": "ddb22f27f96ec163645d53215559df6aa36515f26e01dd70798188350adcb6d2", # noqa: E501 +} + + +def _download_librispeech(root, url): + base_url = "http://www.openslr.org/resources/12/" + ext_archive = ".tar.gz" + + filename = url + ext_archive + archive = os.path.join(root, filename) + download_url = os.path.join(base_url, filename) + if not os.path.isfile(archive): + checksum = _CHECKSUMS.get(download_url, None) + download_url_to_file(download_url, archive, hash_prefix=checksum) + _extract_tar(archive) + + +def _get_librispeech_metadata( + fileid: str, root: str, folder: str, ext_audio: str, ext_txt: str, blist: List[str] +) -> Tuple[str, int, str, int, int, int]: + blist = blist or [] + speaker_id, chapter_id, utterance_id = fileid.split("-") + + # Get audio path and sample rate + fileid_audio = f"{speaker_id}-{chapter_id}-{utterance_id}" + filepath = os.path.join(folder, speaker_id, chapter_id, f"{fileid_audio}{ext_audio}") + + # Load text + file_text = f"{speaker_id}-{chapter_id}{ext_txt}" + file_text = os.path.join(root, folder, speaker_id, chapter_id, file_text) + uttblist = [] + with open(file_text) as ft: + for line in ft: + fileid_text, transcript = line.strip().split(" ", 1) + if fileid_audio == fileid_text: + # get utterance biasing list + for word in transcript.split(): + if word in blist and word not in uttblist: + uttblist.append(word) + break + else: + # Translation not found + raise FileNotFoundError(f"Translation not found for {fileid_audio}") + + return ( + filepath, + SAMPLE_RATE, + transcript, + int(speaker_id), + int(chapter_id), + int(utterance_id), + uttblist, + ) + + +class LibriSpeechBiasing(Dataset): + """*LibriSpeech* :cite:`7178964` dataset with prefix-tree construction and biasing support. + + Args: + root (str or Path): Path to the directory where the dataset is found or downloaded. + url (str, optional): The URL to download the dataset from, + or the type of the dataset to dowload. + Allowed type values are ``"dev-clean"``, ``"dev-other"``, ``"test-clean"``, + ``"test-other"``, ``"train-clean-100"``, ``"train-clean-360"`` and + ``"train-other-500"``. (default: ``"train-clean-100"``) + folder_in_archive (str, optional): + The top-level directory of the dataset. (default: ``"LibriSpeech"``) + download (bool, optional): + Whether to download the dataset if it is not found at root path. (default: ``False``). + blist (list, optional): + The list of biasing words (default: ``[]``). + """ + + _ext_txt = ".trans.txt" + _ext_audio = ".flac" + + def __init__( + self, + root: Union[str, Path], + url: str = URL, + folder_in_archive: str = FOLDER_IN_ARCHIVE, + download: bool = False, + blist: List[str] = None, + ) -> None: + self._url = url + if url not in _DATA_SUBSETS: + raise ValueError(f"Invalid url '{url}' given; please provide one of {_DATA_SUBSETS}.") + + root = os.fspath(root) + self._archive = os.path.join(root, folder_in_archive) + self._path = os.path.join(root, folder_in_archive, url) + + if not os.path.isdir(self._path): + if download: + _download_librispeech(root, url) + else: + raise RuntimeError( + f"Dataset not found at {self._path}. Please set `download=True` to download the dataset." + ) + + self._walker = sorted(str(p.stem) for p in Path(self._path).glob("*/*/*" + self._ext_audio)) + self.blist = blist + + def get_metadata(self, n: int) -> Tuple[str, int, str, int, int, int]: + """Get metadata for the n-th sample from the dataset. Returns filepath instead of waveform, + but otherwise returns the same fields as :py:func:`__getitem__`. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + str: + Path to audio + int: + Sample rate + str: + Transcript + int: + Speaker ID + int: + Chapter ID + int: + Utterance ID + list: + List of biasing words in the utterance + """ + fileid = self._walker[n] + return _get_librispeech_metadata(fileid, self._archive, self._url, self._ext_audio, self._ext_txt, self.blist) + + def __getitem__(self, n: int) -> Tuple[Tensor, int, str, int, int, int]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + Tensor: + Waveform + int: + Sample rate + str: + Transcript + int: + Speaker ID + int: + Chapter ID + int: + Utterance ID + list: + List of biasing words in the utterance + """ + metadata = self.get_metadata(n) + waveform = _load_waveform(self._archive, metadata[0], metadata[1]) + return (waveform,) + metadata[1:] + + def __len__(self) -> int: + return len(self._walker) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/libritts.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/libritts.py new file mode 100644 index 0000000000000000000000000000000000000000..829ce9572920c31ec7a4b393379f779a7df14ea9 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/libritts.py @@ -0,0 +1,168 @@ +import os +from pathlib import Path +from typing import Tuple, Union + +import torchaudio +from torch import Tensor +from torch.utils.data import Dataset +from torchaudio._internal import download_url_to_file +from torchaudio.datasets.utils import _extract_tar + +URL = "train-clean-100" +FOLDER_IN_ARCHIVE = "LibriTTS" +_CHECKSUMS = { + "http://www.openslr.org/resources/60/dev-clean.tar.gz": "da0864e1bd26debed35da8a869dd5c04dfc27682921936de7cff9c8a254dbe1a", # noqa: E501 + "http://www.openslr.org/resources/60/dev-other.tar.gz": "d413eda26f3a152ac7c9cf3658ef85504dfb1b625296e5fa83727f5186cca79c", # noqa: E501 + "http://www.openslr.org/resources/60/test-clean.tar.gz": "234ea5b25859102a87024a4b9b86641f5b5aaaf1197335c95090cde04fe9a4f5", # noqa: E501 + "http://www.openslr.org/resources/60/test-other.tar.gz": "33a5342094f3bba7ccc2e0500b9e72d558f72eb99328ac8debe1d9080402f10d", # noqa: E501 + "http://www.openslr.org/resources/60/train-clean-100.tar.gz": "c5608bf1ef74bb621935382b8399c5cdd51cd3ee47cec51f00f885a64c6c7f6b", # noqa: E501 + "http://www.openslr.org/resources/60/train-clean-360.tar.gz": "ce7cff44dcac46009d18379f37ef36551123a1dc4e5c8e4eb73ae57260de4886", # noqa: E501 + "http://www.openslr.org/resources/60/train-other-500.tar.gz": "e35f7e34deeb2e2bdfe4403d88c8fdd5fbf64865cae41f027a185a6965f0a5df", # noqa: E501 +} + + +def load_libritts_item( + fileid: str, + path: str, + ext_audio: str, + ext_original_txt: str, + ext_normalized_txt: str, +) -> Tuple[Tensor, int, str, str, int, int, str]: + speaker_id, chapter_id, segment_id, utterance_id = fileid.split("_") + utterance_id = fileid + + normalized_text = utterance_id + ext_normalized_txt + normalized_text = os.path.join(path, speaker_id, chapter_id, normalized_text) + + original_text = utterance_id + ext_original_txt + original_text = os.path.join(path, speaker_id, chapter_id, original_text) + + file_audio = utterance_id + ext_audio + file_audio = os.path.join(path, speaker_id, chapter_id, file_audio) + + # Load audio + waveform, sample_rate = torchaudio.load(file_audio) + + # Load original text + with open(original_text) as ft: + original_text = ft.readline() + + # Load normalized text + with open(normalized_text, "r") as ft: + normalized_text = ft.readline() + + return ( + waveform, + sample_rate, + original_text, + normalized_text, + int(speaker_id), + int(chapter_id), + utterance_id, + ) + + +class LIBRITTS(Dataset): + """*LibriTTS* :cite:`Zen2019LibriTTSAC` dataset. + + Args: + root (str or Path): Path to the directory where the dataset is found or downloaded. + url (str, optional): The URL to download the dataset from, + or the type of the dataset to dowload. + Allowed type values are ``"dev-clean"``, ``"dev-other"``, ``"test-clean"``, + ``"test-other"``, ``"train-clean-100"``, ``"train-clean-360"`` and + ``"train-other-500"``. (default: ``"train-clean-100"``) + folder_in_archive (str, optional): + The top-level directory of the dataset. (default: ``"LibriTTS"``) + download (bool, optional): + Whether to download the dataset if it is not found at root path. (default: ``False``). + """ + + _ext_original_txt = ".original.txt" + _ext_normalized_txt = ".normalized.txt" + _ext_audio = ".wav" + + def __init__( + self, + root: Union[str, Path], + url: str = URL, + folder_in_archive: str = FOLDER_IN_ARCHIVE, + download: bool = False, + ) -> None: + + if url in [ + "dev-clean", + "dev-other", + "test-clean", + "test-other", + "train-clean-100", + "train-clean-360", + "train-other-500", + ]: + + ext_archive = ".tar.gz" + base_url = "http://www.openslr.org/resources/60/" + + url = os.path.join(base_url, url + ext_archive) + + # Get string representation of 'root' in case Path object is passed + root = os.fspath(root) + + basename = os.path.basename(url) + archive = os.path.join(root, basename) + + basename = basename.split(".")[0] + folder_in_archive = os.path.join(folder_in_archive, basename) + + self._path = os.path.join(root, folder_in_archive) + + if download: + if not os.path.isdir(self._path): + if not os.path.isfile(archive): + checksum = _CHECKSUMS.get(url, None) + download_url_to_file(url, archive, hash_prefix=checksum) + _extract_tar(archive) + else: + if not os.path.exists(self._path): + raise RuntimeError( + f"The path {self._path} doesn't exist. " + "Please check the ``root`` path or set `download=True` to download it" + ) + + self._walker = sorted(str(p.stem) for p in Path(self._path).glob("*/*/*" + self._ext_audio)) + + def __getitem__(self, n: int) -> Tuple[Tensor, int, str, str, int, int, str]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + Tensor: + Waveform + int: + Sample rate + str: + Original text + str: + Normalized text + int: + Speaker ID + int: + Chapter ID + str: + Utterance ID + """ + fileid = self._walker[n] + return load_libritts_item( + fileid, + self._path, + self._ext_audio, + self._ext_original_txt, + self._ext_normalized_txt, + ) + + def __len__(self) -> int: + return len(self._walker) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/ljspeech.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/ljspeech.py new file mode 100644 index 0000000000000000000000000000000000000000..9cdaeeb0f3e67a29fc57e9d0e9ed3056d98c24df --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/ljspeech.py @@ -0,0 +1,107 @@ +import csv +import os +from pathlib import Path +from typing import Tuple, Union + +import torchaudio +from torch import Tensor +from torch.utils.data import Dataset +from torchaudio._internal import download_url_to_file +from torchaudio.datasets.utils import _extract_tar + + +_RELEASE_CONFIGS = { + "release1": { + "folder_in_archive": "wavs", + "url": "https://data.keithito.com/data/speech/LJSpeech-1.1.tar.bz2", + "checksum": "be1a30453f28eb8dd26af4101ae40cbf2c50413b1bb21936cbcdc6fae3de8aa5", + } +} + + +class LJSPEECH(Dataset): + """*LJSpeech-1.1* :cite:`ljspeech17` dataset. + + Args: + root (str or Path): Path to the directory where the dataset is found or downloaded. + url (str, optional): The URL to download the dataset from. + (default: ``"https://data.keithito.com/data/speech/LJSpeech-1.1.tar.bz2"``) + folder_in_archive (str, optional): + The top-level directory of the dataset. (default: ``"wavs"``) + download (bool, optional): + Whether to download the dataset if it is not found at root path. (default: ``False``). + """ + + def __init__( + self, + root: Union[str, Path], + url: str = _RELEASE_CONFIGS["release1"]["url"], + folder_in_archive: str = _RELEASE_CONFIGS["release1"]["folder_in_archive"], + download: bool = False, + ) -> None: + + self._parse_filesystem(root, url, folder_in_archive, download) + + def _parse_filesystem(self, root: str, url: str, folder_in_archive: str, download: bool) -> None: + root = Path(root) + + basename = os.path.basename(url) + archive = root / basename + + basename = Path(basename.split(".tar.bz2")[0]) + folder_in_archive = basename / folder_in_archive + + self._path = root / folder_in_archive + self._metadata_path = root / basename / "metadata.csv" + + if download: + if not os.path.isdir(self._path): + if not os.path.isfile(archive): + checksum = _RELEASE_CONFIGS["release1"]["checksum"] + download_url_to_file(url, archive, hash_prefix=checksum) + _extract_tar(archive) + else: + if not os.path.exists(self._path): + raise RuntimeError( + f"The path {self._path} doesn't exist. " + "Please check the ``root`` path or set `download=True` to download it" + ) + + with open(self._metadata_path, "r", newline="") as metadata: + flist = csv.reader(metadata, delimiter="|", quoting=csv.QUOTE_NONE) + self._flist = list(flist) + + def __getitem__(self, n: int) -> Tuple[Tensor, int, str, str]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + Tensor: + Waveform + int: + Sample rate + str: + Transcript + str: + Normalized Transcript + """ + line = self._flist[n] + fileid, transcript, normalized_transcript = line + fileid_audio = self._path / (fileid + ".wav") + + # Load audio + waveform, sample_rate = torchaudio.load(fileid_audio) + + return ( + waveform, + sample_rate, + transcript, + normalized_transcript, + ) + + def __len__(self) -> int: + return len(self._flist) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/musdb_hq.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/musdb_hq.py new file mode 100644 index 0000000000000000000000000000000000000000..dd4bc9f340f3fde076ea31a683a7b41b7b3741d7 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/musdb_hq.py @@ -0,0 +1,139 @@ +import os +from pathlib import Path +from typing import List, Optional, Tuple, Union + +import torch +import torchaudio +from torch.utils.data import Dataset +from torchaudio._internal import download_url_to_file +from torchaudio.datasets.utils import _extract_zip + +_URL = "https://zenodo.org/record/3338373/files/musdb18hq.zip" +_CHECKSUM = "baac80d0483c61d74b2e5f3be75fa557eec52898339e6aa45c1fa48833c5d21d" +_EXT = ".wav" +_SAMPLE_RATE = 44100 +_VALIDATION_SET = [ + "Actions - One Minute Smile", + "Clara Berry And Wooldog - Waltz For My Victims", + "Johnny Lokke - Promises & Lies", + "Patrick Talbot - A Reason To Leave", + "Triviul - Angelsaint", + "Alexander Ross - Goodbye Bolero", + "Fergessen - Nos Palpitants", + "Leaf - Summerghost", + "Skelpolu - Human Mistakes", + "Young Griffo - Pennies", + "ANiMAL - Rockshow", + "James May - On The Line", + "Meaxic - Take A Step", + "Traffic Experiment - Sirens", +] + + +class MUSDB_HQ(Dataset): + """*MUSDB_HQ* :cite:`MUSDB18HQ` dataset. + + Args: + root (str or Path): Root directory where the dataset's top level directory is found + subset (str): Subset of the dataset to use. Options: [``"train"``, ``"test"``]. + sources (List[str] or None, optional): Sources extract data from. + List can contain the following options: [``"bass"``, ``"drums"``, ``"other"``, ``"mixture"``, ``"vocals"``]. + If ``None``, dataset consists of tracks except mixture. + (default: ``None``) + split (str or None, optional): Whether to split training set into train and validation set. + If ``None``, no splitting occurs. If ``train`` or ``validation``, returns respective set. + (default: ``None``) + download (bool, optional): Whether to download the dataset if it is not found at root path. + (default: ``False``) + """ + + def __init__( + self, + root: Union[str, Path], + subset: str, + sources: Optional[List[str]] = None, + split: Optional[str] = None, + download: bool = False, + ) -> None: + self.sources = ["bass", "drums", "other", "vocals"] if not sources else sources + self.split = split + + basename = os.path.basename(_URL) + archive = os.path.join(root, basename) + basename = basename.rsplit(".", 2)[0] + + if subset not in ["test", "train"]: + raise ValueError("`subset` must be one of ['test', 'train']") + if self.split is not None and self.split not in ["train", "validation"]: + raise ValueError("`split` must be one of ['train', 'validation']") + base_path = os.path.join(root, basename) + self._path = os.path.join(base_path, subset) + if not os.path.isdir(self._path): + if not os.path.isfile(archive): + if not download: + raise RuntimeError("Dataset not found. Please use `download=True` to download") + download_url_to_file(_URL, archive, hash_prefix=_CHECKSUM) + os.makedirs(base_path, exist_ok=True) + _extract_zip(archive, base_path) + + self.names = self._collect_songs() + + def _get_track(self, name, source): + return Path(self._path) / name / f"{source}{_EXT}" + + def _load_sample(self, n: int) -> Tuple[torch.Tensor, int, int, str]: + name = self.names[n] + wavs = [] + num_frames = None + for source in self.sources: + track = self._get_track(name, source) + wav, sr = torchaudio.load(str(track)) + if sr != _SAMPLE_RATE: + raise ValueError(f"expected sample rate {_SAMPLE_RATE}, but got {sr}") + if num_frames is None: + num_frames = wav.shape[-1] + else: + if wav.shape[-1] != num_frames: + raise ValueError("num_frames do not match across sources") + wavs.append(wav) + + stacked = torch.stack(wavs) + + return stacked, _SAMPLE_RATE, num_frames, name + + def _collect_songs(self): + if self.split == "validation": + return _VALIDATION_SET + path = Path(self._path) + names = [] + for root, folders, _ in os.walk(path, followlinks=True): + root = Path(root) + if root.name.startswith(".") or folders or root == path: + continue + name = str(root.relative_to(path)) + if self.split and name in _VALIDATION_SET: + continue + names.append(name) + return sorted(names) + + def __getitem__(self, n: int) -> Tuple[torch.Tensor, int, int, str]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + Returns: + Tuple of the following items; + + Tensor: + Waveform + int: + Sample rate + int: + Num frames + str: + Track name + """ + return self._load_sample(n) + + def __len__(self) -> int: + return len(self.names) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/quesst14.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/quesst14.py new file mode 100644 index 0000000000000000000000000000000000000000..064423c4494850f2ad8f43fb00a956be21fcb95e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/quesst14.py @@ -0,0 +1,136 @@ +import os +import re +from pathlib import Path +from typing import Optional, Tuple, Union + +import torch +from torch.utils.data import Dataset +from torchaudio._internal import download_url_to_file +from torchaudio.datasets.utils import _extract_tar, _load_waveform + + +URL = "https://speech.fit.vutbr.cz/files/quesst14Database.tgz" +SAMPLE_RATE = 8000 +_CHECKSUM = "4f869e06bc066bbe9c5dde31dbd3909a0870d70291110ebbb38878dcbc2fc5e4" +_LANGUAGES = [ + "albanian", + "basque", + "czech", + "nnenglish", + "romanian", + "slovak", +] + + +class QUESST14(Dataset): + """*QUESST14* :cite:`Mir2015QUESST2014EQ` dataset. + + Args: + root (str or Path): Root directory where the dataset's top level directory is found + subset (str): Subset of the dataset to use. Options: [``"docs"``, ``"dev"``, ``"eval"``]. + language (str or None, optional): Language to get dataset for. + Options: [``None``, ``albanian``, ``basque``, ``czech``, ``nnenglish``, ``romanian``, ``slovak``]. + If ``None``, dataset consists of all languages. (default: ``"nnenglish"``) + download (bool, optional): Whether to download the dataset if it is not found at root path. + (default: ``False``) + """ + + def __init__( + self, + root: Union[str, Path], + subset: str, + language: Optional[str] = "nnenglish", + download: bool = False, + ) -> None: + if subset not in ["docs", "dev", "eval"]: + raise ValueError("`subset` must be one of ['docs', 'dev', 'eval']") + + if language is not None and language not in _LANGUAGES: + raise ValueError(f"`language` must be None or one of {str(_LANGUAGES)}") + + # Get string representation of 'root' + root = os.fspath(root) + + basename = os.path.basename(URL) + archive = os.path.join(root, basename) + + basename = basename.rsplit(".", 2)[0] + self._path = os.path.join(root, basename) + + if not os.path.isdir(self._path): + if not os.path.isfile(archive): + if not download: + raise RuntimeError("Dataset not found. Please use `download=True` to download") + download_url_to_file(URL, archive, hash_prefix=_CHECKSUM) + _extract_tar(archive, root) + + if subset == "docs": + self.data = filter_audio_paths(self._path, language, "language_key_utterances.lst") + elif subset == "dev": + self.data = filter_audio_paths(self._path, language, "language_key_dev.lst") + elif subset == "eval": + self.data = filter_audio_paths(self._path, language, "language_key_eval.lst") + + def get_metadata(self, n: int) -> Tuple[str, int, str]: + """Get metadata for the n-th sample from the dataset. Returns filepath instead of waveform, + but otherwise returns the same fields as :py:func:`__getitem__`. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + str: + Path to audio + int: + Sample rate + str: + File name + """ + audio_path = self.data[n] + relpath = os.path.relpath(audio_path, self._path) + return relpath, SAMPLE_RATE, audio_path.with_suffix("").name + + def __getitem__(self, n: int) -> Tuple[torch.Tensor, int, str]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + Tensor: + Waveform + int: + Sample rate + str: + File name + """ + metadata = self.get_metadata(n) + waveform = _load_waveform(self._path, metadata[0], metadata[1]) + return (waveform,) + metadata[1:] + + def __len__(self) -> int: + return len(self.data) + + +def filter_audio_paths( + path: str, + language: str, + lst_name: str, +): + """Extract audio paths for the given language.""" + audio_paths = [] + + path = Path(path) + with open(path / "scoring" / lst_name) as f: + for line in f: + audio_path, lang = line.strip().split() + if language is not None and lang != language: + continue + audio_path = re.sub(r"^.*?\/", "", audio_path) + audio_paths.append(path / audio_path) + + return audio_paths diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/snips.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/snips.py new file mode 100644 index 0000000000000000000000000000000000000000..6b15d677f7fa1f9c1baccad7625a6fa14c73d70f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/snips.py @@ -0,0 +1,157 @@ +import os +from pathlib import Path +from typing import List, Optional, Tuple, Union + +import torch +from torch.utils.data import Dataset +from torchaudio.datasets.utils import _load_waveform + + +_SAMPLE_RATE = 16000 +_SPEAKERS = [ + "Aditi", + "Amy", + "Brian", + "Emma", + "Geraint", + "Ivy", + "Joanna", + "Joey", + "Justin", + "Kendra", + "Kimberly", + "Matthew", + "Nicole", + "Raveena", + "Russell", + "Salli", +] + + +def _load_labels(file: Path, subset: str): + """Load transcirpt, iob, and intent labels for all utterances. + + Args: + file (Path): The path to the label file. + subset (str): Subset of the dataset to use. Options: [``"train"``, ``"valid"``, ``"test"``]. + + Returns: + Dictionary of labels, where the key is the filename of the audio, + and the label is a Tuple of transcript, Inside–outside–beginning (IOB) label, and intention label. + """ + labels = {} + with open(file, "r") as f: + for line in f: + line = line.strip().split(" ") + index = line[0] + trans, iob_intent = " ".join(line[1:]).split("\t") + trans = " ".join(trans.split(" ")[1:-1]) + iob = " ".join(iob_intent.split(" ")[1:-1]) + intent = iob_intent.split(" ")[-1] + if subset in index: + labels[index] = (trans, iob, intent) + return labels + + +class Snips(Dataset): + """*Snips* :cite:`coucke2018snips` dataset. + + Args: + root (str or Path): Root directory where the dataset's top level directory is found. + subset (str): Subset of the dataset to use. Options: [``"train"``, ``"valid"``, ``"test"``]. + speakers (List[str] or None, optional): The speaker list to include in the dataset. If ``None``, + include all speakers in the subset. (Default: ``None``) + audio_format (str, optional): The extension of the audios. Options: [``"mp3"``, ``"wav"``]. + (Default: ``"mp3"``) + """ + + _trans_file = "all.iob.snips.txt" + + def __init__( + self, + root: Union[str, Path], + subset: str, + speakers: Optional[List[str]] = None, + audio_format: str = "mp3", + ) -> None: + if subset not in ["train", "valid", "test"]: + raise ValueError('`subset` must be one of ["train", "valid", "test"].') + if audio_format not in ["mp3", "wav"]: + raise ValueError('`audio_format` must be one of ["mp3", "wav].') + + root = Path(root) + self._path = root / "SNIPS" + self.audio_path = self._path / subset + if speakers is None: + speakers = _SPEAKERS + + if not os.path.isdir(self._path): + raise RuntimeError("Dataset not found.") + + self.audio_paths = self.audio_path.glob(f"*.{audio_format}") + self.data = [] + for audio_path in sorted(self.audio_paths): + audio_name = str(audio_path.name) + speaker = audio_name.split("-")[0] + if speaker in speakers: + self.data.append(audio_path) + transcript_path = self._path / self._trans_file + self.labels = _load_labels(transcript_path, subset) + + def get_metadata(self, n: int) -> Tuple[str, int, str, str, str]: + """Get metadata for the n-th sample from the dataset. Returns filepath instead of waveform, + but otherwise returns the same fields as :py:func:`__getitem__`. + + Args: + n (int): The index of the sample to be loaded. + + Returns: + Tuple of the following items: + + str: + Path to audio + int: + Sample rate + str: + File name + str: + Transcription of audio + str: + Inside–outside–beginning (IOB) label of transcription + str: + Intention label of the audio. + """ + audio_path = self.data[n] + relpath = os.path.relpath(audio_path, self._path) + file_name = audio_path.with_suffix("").name + transcript, iob, intent = self.labels[file_name] + return relpath, _SAMPLE_RATE, file_name, transcript, iob, intent + + def __getitem__(self, n: int) -> Tuple[torch.Tensor, int, str, str, str]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items: + + Tensor: + Waveform + int: + Sample rate + str: + File name + str: + Transcription of audio + str: + Inside–outside–beginning (IOB) label of transcription + str: + Intention label of the audio. + """ + metadata = self.get_metadata(n) + waveform = _load_waveform(self._path, metadata[0], metadata[1]) + return (waveform,) + metadata[1:] + + def __len__(self) -> int: + return len(self.data) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/speechcommands.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/speechcommands.py new file mode 100644 index 0000000000000000000000000000000000000000..1945fc75c18b474404b733e43d50156f3c3d6652 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/speechcommands.py @@ -0,0 +1,183 @@ +import os +from pathlib import Path +from typing import Optional, Tuple, Union + +from torch import Tensor +from torch.utils.data import Dataset +from torchaudio._internal import download_url_to_file +from torchaudio.datasets.utils import _extract_tar, _load_waveform + +FOLDER_IN_ARCHIVE = "SpeechCommands" +URL = "speech_commands_v0.02" +HASH_DIVIDER = "_nohash_" +EXCEPT_FOLDER = "_background_noise_" +SAMPLE_RATE = 16000 +_CHECKSUMS = { + "http://download.tensorflow.org/data/speech_commands_v0.01.tar.gz": "743935421bb51cccdb6bdd152e04c5c70274e935c82119ad7faeec31780d811d", # noqa: E501 + "http://download.tensorflow.org/data/speech_commands_v0.02.tar.gz": "af14739ee7dc311471de98f5f9d2c9191b18aedfe957f4a6ff791c709868ff58", # noqa: E501 +} + + +def _load_list(root, *filenames): + output = [] + for filename in filenames: + filepath = os.path.join(root, filename) + with open(filepath) as fileobj: + output += [os.path.normpath(os.path.join(root, line.strip())) for line in fileobj] + return output + + +def _get_speechcommands_metadata(filepath: str, path: str) -> Tuple[str, int, str, str, int]: + relpath = os.path.relpath(filepath, path) + reldir, filename = os.path.split(relpath) + _, label = os.path.split(reldir) + # Besides the officially supported split method for datasets defined by "validation_list.txt" + # and "testing_list.txt" over "speech_commands_v0.0x.tar.gz" archives, an alternative split + # method referred to in paragraph 2-3 of Section 7.1, references 13 and 14 of the original + # paper, and the checksums file from the tensorflow_datasets package [1] is also supported. + # Some filenames in those "speech_commands_test_set_v0.0x.tar.gz" archives have the form + # "xxx.wav.wav", so file extensions twice needs to be stripped twice. + # [1] https://github.com/tensorflow/datasets/blob/master/tensorflow_datasets/url_checksums/speech_commands.txt + speaker, _ = os.path.splitext(filename) + speaker, _ = os.path.splitext(speaker) + + speaker_id, utterance_number = speaker.split(HASH_DIVIDER) + utterance_number = int(utterance_number) + + return relpath, SAMPLE_RATE, label, speaker_id, utterance_number + + +class SPEECHCOMMANDS(Dataset): + """*Speech Commands* :cite:`speechcommandsv2` dataset. + + Args: + root (str or Path): Path to the directory where the dataset is found or downloaded. + url (str, optional): The URL to download the dataset from, + or the type of the dataset to dowload. + Allowed type values are ``"speech_commands_v0.01"`` and ``"speech_commands_v0.02"`` + (default: ``"speech_commands_v0.02"``) + folder_in_archive (str, optional): + The top-level directory of the dataset. (default: ``"SpeechCommands"``) + download (bool, optional): + Whether to download the dataset if it is not found at root path. (default: ``False``). + subset (str or None, optional): + Select a subset of the dataset [None, "training", "validation", "testing"]. None means + the whole dataset. "validation" and "testing" are defined in "validation_list.txt" and + "testing_list.txt", respectively, and "training" is the rest. Details for the files + "validation_list.txt" and "testing_list.txt" are explained in the README of the dataset + and in the introduction of Section 7 of the original paper and its reference 12. The + original paper can be found `here `_. (Default: ``None``) + """ + + def __init__( + self, + root: Union[str, Path], + url: str = URL, + folder_in_archive: str = FOLDER_IN_ARCHIVE, + download: bool = False, + subset: Optional[str] = None, + ) -> None: + + if subset is not None and subset not in ["training", "validation", "testing"]: + raise ValueError("When `subset` is not None, it must be one of ['training', 'validation', 'testing'].") + + if url in [ + "speech_commands_v0.01", + "speech_commands_v0.02", + ]: + base_url = "http://download.tensorflow.org/data/" + ext_archive = ".tar.gz" + + url = os.path.join(base_url, url + ext_archive) + + # Get string representation of 'root' in case Path object is passed + root = os.fspath(root) + self._archive = os.path.join(root, folder_in_archive) + + basename = os.path.basename(url) + archive = os.path.join(root, basename) + + basename = basename.rsplit(".", 2)[0] + folder_in_archive = os.path.join(folder_in_archive, basename) + + self._path = os.path.join(root, folder_in_archive) + + if download: + if not os.path.isdir(self._path): + if not os.path.isfile(archive): + checksum = _CHECKSUMS.get(url, None) + download_url_to_file(url, archive, hash_prefix=checksum) + _extract_tar(archive, self._path) + else: + if not os.path.exists(self._path): + raise RuntimeError( + f"The path {self._path} doesn't exist. " + "Please check the ``root`` path or set `download=True` to download it" + ) + + if subset == "validation": + self._walker = _load_list(self._path, "validation_list.txt") + elif subset == "testing": + self._walker = _load_list(self._path, "testing_list.txt") + elif subset == "training": + excludes = set(_load_list(self._path, "validation_list.txt", "testing_list.txt")) + walker = sorted(str(p) for p in Path(self._path).glob("*/*.wav")) + self._walker = [ + w + for w in walker + if HASH_DIVIDER in w and EXCEPT_FOLDER not in w and os.path.normpath(w) not in excludes + ] + else: + walker = sorted(str(p) for p in Path(self._path).glob("*/*.wav")) + self._walker = [w for w in walker if HASH_DIVIDER in w and EXCEPT_FOLDER not in w] + + def get_metadata(self, n: int) -> Tuple[str, int, str, str, int]: + """Get metadata for the n-th sample from the dataset. Returns filepath instead of waveform, + but otherwise returns the same fields as :py:func:`__getitem__`. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + str: + Path to the audio + int: + Sample rate + str: + Label + str: + Speaker ID + int: + Utterance number + """ + fileid = self._walker[n] + return _get_speechcommands_metadata(fileid, self._archive) + + def __getitem__(self, n: int) -> Tuple[Tensor, int, str, str, int]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + Tensor: + Waveform + int: + Sample rate + str: + Label + str: + Speaker ID + int: + Utterance number + """ + metadata = self.get_metadata(n) + waveform = _load_waveform(self._archive, metadata[0], metadata[1]) + return (waveform,) + metadata[1:] + + def __len__(self) -> int: + return len(self._walker) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/tedlium.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/tedlium.py new file mode 100644 index 0000000000000000000000000000000000000000..7e7d22195a772d18770f6db3253d83672743c81c --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/tedlium.py @@ -0,0 +1,218 @@ +import os +from pathlib import Path +from typing import Tuple, Union + +import torchaudio +from torch import Tensor +from torch.utils.data import Dataset +from torchaudio._internal import download_url_to_file +from torchaudio.datasets.utils import _extract_tar + + +_RELEASE_CONFIGS = { + "release1": { + "folder_in_archive": "TEDLIUM_release1", + "url": "http://www.openslr.org/resources/7/TEDLIUM_release1.tar.gz", + "checksum": "30301975fd8c5cac4040c261c0852f57cfa8adbbad2ce78e77e4986957445f27", + "data_path": "", + "subset": "train", + "supported_subsets": ["train", "test", "dev"], + "dict": "TEDLIUM.150K.dic", + }, + "release2": { + "folder_in_archive": "TEDLIUM_release2", + "url": "http://www.openslr.org/resources/19/TEDLIUM_release2.tar.gz", + "checksum": "93281b5fcaaae5c88671c9d000b443cb3c7ea3499ad12010b3934ca41a7b9c58", + "data_path": "", + "subset": "train", + "supported_subsets": ["train", "test", "dev"], + "dict": "TEDLIUM.152k.dic", + }, + "release3": { + "folder_in_archive": "TEDLIUM_release-3", + "url": "http://www.openslr.org/resources/51/TEDLIUM_release-3.tgz", + "checksum": "ad1e454d14d1ad550bc2564c462d87c7a7ec83d4dc2b9210f22ab4973b9eccdb", + "data_path": "data/", + "subset": "train", + "supported_subsets": ["train", "test", "dev"], + "dict": "TEDLIUM.152k.dic", + }, +} + + +class TEDLIUM(Dataset): + """*Tedlium* :cite:`rousseau2012tedlium` dataset (releases 1,2 and 3). + + Args: + root (str or Path): Path to the directory where the dataset is found or downloaded. + release (str, optional): Release version. + Allowed values are ``"release1"``, ``"release2"`` or ``"release3"``. + (default: ``"release1"``). + subset (str, optional): The subset of dataset to use. Valid options are ``"train"``, ``"dev"``, + and ``"test"``. Defaults to ``"train"``. + download (bool, optional): + Whether to download the dataset if it is not found at root path. (default: ``False``). + audio_ext (str, optional): extension for audio file (default: ``".sph"``) + """ + + def __init__( + self, + root: Union[str, Path], + release: str = "release1", + subset: str = "train", + download: bool = False, + audio_ext: str = ".sph", + ) -> None: + self._ext_audio = audio_ext + if release in _RELEASE_CONFIGS.keys(): + folder_in_archive = _RELEASE_CONFIGS[release]["folder_in_archive"] + url = _RELEASE_CONFIGS[release]["url"] + subset = subset if subset else _RELEASE_CONFIGS[release]["subset"] + else: + # Raise warning + raise RuntimeError( + "The release {} does not match any of the supported tedlium releases{} ".format( + release, + _RELEASE_CONFIGS.keys(), + ) + ) + if subset not in _RELEASE_CONFIGS[release]["supported_subsets"]: + # Raise warning + raise RuntimeError( + "The subset {} does not match any of the supported tedlium subsets{} ".format( + subset, + _RELEASE_CONFIGS[release]["supported_subsets"], + ) + ) + + # Get string representation of 'root' in case Path object is passed + root = os.fspath(root) + + basename = os.path.basename(url) + archive = os.path.join(root, basename) + + basename = basename.split(".")[0] + + if release == "release3": + if subset == "train": + self._path = os.path.join(root, folder_in_archive, _RELEASE_CONFIGS[release]["data_path"]) + else: + self._path = os.path.join(root, folder_in_archive, "legacy", subset) + else: + self._path = os.path.join(root, folder_in_archive, _RELEASE_CONFIGS[release]["data_path"], subset) + + if download: + if not os.path.isdir(self._path): + if not os.path.isfile(archive): + checksum = _RELEASE_CONFIGS[release]["checksum"] + download_url_to_file(url, archive, hash_prefix=checksum) + _extract_tar(archive) + else: + if not os.path.exists(self._path): + raise RuntimeError( + f"The path {self._path} doesn't exist. " + "Please check the ``root`` path or set `download=True` to download it" + ) + + # Create list for all samples + self._filelist = [] + stm_path = os.path.join(self._path, "stm") + for file in sorted(os.listdir(stm_path)): + if file.endswith(".stm"): + stm_path = os.path.join(self._path, "stm", file) + with open(stm_path) as f: + l = len(f.readlines()) + file = file.replace(".stm", "") + self._filelist.extend((file, line) for line in range(l)) + # Create dict path for later read + self._dict_path = os.path.join(root, folder_in_archive, _RELEASE_CONFIGS[release]["dict"]) + self._phoneme_dict = None + + def _load_tedlium_item(self, fileid: str, line: int, path: str) -> Tuple[Tensor, int, str, int, int, int]: + """Loads a TEDLIUM dataset sample given a file name and corresponding sentence name. + + Args: + fileid (str): File id to identify both text and audio files corresponding to the sample + line (int): Line identifier for the sample inside the text file + path (str): Dataset root path + + Returns: + (Tensor, int, str, int, int, int): + ``(waveform, sample_rate, transcript, talk_id, speaker_id, identifier)`` + """ + transcript_path = os.path.join(path, "stm", fileid) + with open(transcript_path + ".stm") as f: + transcript = f.readlines()[line] + talk_id, _, speaker_id, start_time, end_time, identifier, transcript = transcript.split(" ", 6) + + wave_path = os.path.join(path, "sph", fileid) + waveform, sample_rate = self._load_audio(wave_path + self._ext_audio, start_time=start_time, end_time=end_time) + + return (waveform, sample_rate, transcript, talk_id, speaker_id, identifier) + + def _load_audio(self, path: str, start_time: float, end_time: float, sample_rate: int = 16000) -> [Tensor, int]: + """Default load function used in TEDLIUM dataset, you can overwrite this function to customize functionality + and load individual sentences from a full ted audio talk file. + + Args: + path (str): Path to audio file + start_time (int): Time in seconds where the sample sentence stars + end_time (int): Time in seconds where the sample sentence finishes + sample_rate (float, optional): Sampling rate + + Returns: + [Tensor, int]: Audio tensor representation and sample rate + """ + start_time = int(float(start_time) * sample_rate) + end_time = int(float(end_time) * sample_rate) + + kwargs = {"frame_offset": start_time, "num_frames": end_time - start_time} + + return torchaudio.load(path, **kwargs) + + def __getitem__(self, n: int) -> Tuple[Tensor, int, str, int, int, int]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + Tensor: + Waveform + int: + Sample rate + str: + Transcript + int: + Talk ID + int: + Speaker ID + int: + Identifier + """ + fileid, line = self._filelist[n] + return self._load_tedlium_item(fileid, line, self._path) + + def __len__(self) -> int: + """TEDLIUM dataset custom function overwritting len default behaviour. + + Returns: + int: TEDLIUM dataset length + """ + return len(self._filelist) + + @property + def phoneme_dict(self): + """dict[str, tuple[str]]: Phonemes. Mapping from word to tuple of phonemes. + Note that some words have empty phonemes. + """ + # Read phoneme dictionary + if not self._phoneme_dict: + self._phoneme_dict = {} + with open(self._dict_path, "r", encoding="utf-8") as f: + for line in f.readlines(): + content = line.strip().split() + self._phoneme_dict[content[0]] = tuple(content[1:]) # content[1:] can be empty list + return self._phoneme_dict.copy() diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/utils.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..b9ee2aa51ee98b84da59d938fc5521e53473cdf8 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/utils.py @@ -0,0 +1,54 @@ +import logging +import os +import tarfile +import zipfile +from typing import Any, List, Optional # noqa: F401 + +import torchaudio + +_LG = logging.getLogger(__name__) + + +def _extract_tar(from_path: str, to_path: Optional[str] = None, overwrite: bool = False) -> List[str]: + if to_path is None: + to_path = os.path.dirname(from_path) + with tarfile.open(from_path, "r") as tar: + files = [] + for file_ in tar: # type: Any + file_path = os.path.join(to_path, file_.name) + if file_.isfile(): + files.append(file_path) + if os.path.exists(file_path): + _LG.info("%s already extracted.", file_path) + if not overwrite: + continue + tar.extract(file_, to_path) + return files + + +def _extract_zip(from_path: str, to_path: Optional[str] = None, overwrite: bool = False) -> List[str]: + if to_path is None: + to_path = os.path.dirname(from_path) + + with zipfile.ZipFile(from_path, "r") as zfile: + files = zfile.namelist() + for file_ in files: + file_path = os.path.join(to_path, file_) + if os.path.exists(file_path): + _LG.info("%s already extracted.", file_path) + if not overwrite: + continue + zfile.extract(file_, to_path) + return files + + +def _load_waveform( + root: str, + filename: str, + exp_sample_rate: int, +): + path = os.path.join(root, filename) + waveform, sample_rate = torchaudio.load(path) + if exp_sample_rate != sample_rate: + raise ValueError(f"sample rate should be {exp_sample_rate}, but got {sample_rate}") + return waveform diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/vctk.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/vctk.py new file mode 100644 index 0000000000000000000000000000000000000000..3195b9b4276b643e934baadc26c872fc690383df --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/vctk.py @@ -0,0 +1,143 @@ +import os +from typing import Tuple + +import torchaudio +from torch import Tensor +from torch.utils.data import Dataset +from torchaudio._internal import download_url_to_file +from torchaudio.datasets.utils import _extract_zip + +URL = "https://datashare.is.ed.ac.uk/bitstream/handle/10283/3443/VCTK-Corpus-0.92.zip" +_CHECKSUMS = { + "https://datashare.is.ed.ac.uk/bitstream/handle/10283/3443/VCTK-Corpus-0.92.zip": "f96258be9fdc2cbff6559541aae7ea4f59df3fcaf5cf963aae5ca647357e359c" # noqa: E501 +} + + +SampleType = Tuple[Tensor, int, str, str, str] + + +class VCTK_092(Dataset): + """*VCTK 0.92* :cite:`yamagishi2019vctk` dataset + + Args: + root (str): Root directory where the dataset's top level directory is found. + mic_id (str, optional): Microphone ID. Either ``"mic1"`` or ``"mic2"``. (default: ``"mic2"``) + download (bool, optional): + Whether to download the dataset if it is not found at root path. (default: ``False``). + url (str, optional): The URL to download the dataset from. + (default: ``"https://datashare.is.ed.ac.uk/bitstream/handle/10283/3443/VCTK-Corpus-0.92.zip"``) + audio_ext (str, optional): Custom audio extension if dataset is converted to non-default audio format. + + Note: + * All the speeches from speaker ``p315`` will be skipped due to the lack of the corresponding text files. + * All the speeches from ``p280`` will be skipped for ``mic_id="mic2"`` due to the lack of the audio files. + * Some of the speeches from speaker ``p362`` will be skipped due to the lack of the audio files. + * See Also: https://datashare.is.ed.ac.uk/handle/10283/3443 + """ + + def __init__( + self, + root: str, + mic_id: str = "mic2", + download: bool = False, + url: str = URL, + audio_ext=".flac", + ): + if mic_id not in ["mic1", "mic2"]: + raise RuntimeError(f'`mic_id` has to be either "mic1" or "mic2". Found: {mic_id}') + + archive = os.path.join(root, "VCTK-Corpus-0.92.zip") + + self._path = os.path.join(root, "VCTK-Corpus-0.92") + self._txt_dir = os.path.join(self._path, "txt") + self._audio_dir = os.path.join(self._path, "wav48_silence_trimmed") + self._mic_id = mic_id + self._audio_ext = audio_ext + + if download: + if not os.path.isdir(self._path): + if not os.path.isfile(archive): + checksum = _CHECKSUMS.get(url, None) + download_url_to_file(url, archive, hash_prefix=checksum) + _extract_zip(archive, self._path) + + if not os.path.isdir(self._path): + raise RuntimeError("Dataset not found. Please use `download=True` to download it.") + + # Extracting speaker IDs from the folder structure + self._speaker_ids = sorted(os.listdir(self._txt_dir)) + self._sample_ids = [] + + """ + Due to some insufficient data complexity in the 0.92 version of this dataset, + we start traversing the audio folder structure in accordance with the text folder. + As some of the audio files are missing of either ``mic_1`` or ``mic_2`` but the + text is present for the same, we first check for the existence of the audio file + before adding it to the ``sample_ids`` list. + + Once the ``audio_ids`` are loaded into memory we can quickly access the list for + different parameters required by the user. + """ + for speaker_id in self._speaker_ids: + if speaker_id == "p280" and mic_id == "mic2": + continue + utterance_dir = os.path.join(self._txt_dir, speaker_id) + for utterance_file in sorted(f for f in os.listdir(utterance_dir) if f.endswith(".txt")): + utterance_id = os.path.splitext(utterance_file)[0] + audio_path_mic = os.path.join( + self._audio_dir, + speaker_id, + f"{utterance_id}_{mic_id}{self._audio_ext}", + ) + if speaker_id == "p362" and not os.path.isfile(audio_path_mic): + continue + self._sample_ids.append(utterance_id.split("_")) + + def _load_text(self, file_path) -> str: + with open(file_path) as file_path: + return file_path.readlines()[0] + + def _load_audio(self, file_path) -> Tuple[Tensor, int]: + return torchaudio.load(file_path) + + def _load_sample(self, speaker_id: str, utterance_id: str, mic_id: str) -> SampleType: + transcript_path = os.path.join(self._txt_dir, speaker_id, f"{speaker_id}_{utterance_id}.txt") + audio_path = os.path.join( + self._audio_dir, + speaker_id, + f"{speaker_id}_{utterance_id}_{mic_id}{self._audio_ext}", + ) + + # Reading text + transcript = self._load_text(transcript_path) + + # Reading FLAC + waveform, sample_rate = self._load_audio(audio_path) + + return (waveform, sample_rate, transcript, speaker_id, utterance_id) + + def __getitem__(self, n: int) -> SampleType: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + Tensor: + Waveform + int: + Sample rate + str: + Transcript + str: + Speaker ID + std: + Utterance ID + """ + speaker_id, utterance_id = self._sample_ids[n] + return self._load_sample(speaker_id, utterance_id, self._mic_id) + + def __len__(self) -> int: + return len(self._sample_ids) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/voxceleb1.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/voxceleb1.py new file mode 100644 index 0000000000000000000000000000000000000000..5112fff0898a88adb1d2c33acf9bdd905ca883f3 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/voxceleb1.py @@ -0,0 +1,309 @@ +import os +from pathlib import Path +from typing import List, Tuple, Union + +from torch import Tensor +from torch.utils.data import Dataset +from torchaudio._internal import download_url_to_file +from torchaudio.datasets.utils import _extract_zip, _load_waveform + + +SAMPLE_RATE = 16000 +_ARCHIVE_CONFIGS = { + "dev": { + "archive_name": "vox1_dev_wav.zip", + "urls": [ + "https://thor.robots.ox.ac.uk/~vgg/data/voxceleb/vox1a/vox1_dev_wav_partaa", + "https://thor.robots.ox.ac.uk/~vgg/data/voxceleb/vox1a/vox1_dev_wav_partab", + "https://thor.robots.ox.ac.uk/~vgg/data/voxceleb/vox1a/vox1_dev_wav_partac", + "https://thor.robots.ox.ac.uk/~vgg/data/voxceleb/vox1a/vox1_dev_wav_partad", + ], + "checksums": [ + "21ec6ca843659ebc2fdbe04b530baa4f191ad4b0971912672d92c158f32226a0", + "311d21e0c8cbf33573a4fce6c80e5a279d80736274b381c394319fc557159a04", + "92b64465f2b2a3dc0e4196ae8dd6828cbe9ddd1f089419a11e4cbfe2e1750df0", + "00e6190c770b27f27d2a3dd26ee15596b17066b715ac111906861a7d09a211a5", + ], + }, + "test": { + "archive_name": "vox1_test_wav.zip", + "url": "https://thor.robots.ox.ac.uk/~vgg/data/voxceleb/vox1a/vox1_test_wav.zip", + "checksum": "8de57f347fe22b2c24526e9f444f689ecf5096fc2a92018cf420ff6b5b15eaea", + }, +} +_IDEN_SPLIT_URL = "https://www.robots.ox.ac.uk/~vgg/data/voxceleb/meta/iden_split.txt" +_VERI_TEST_URL = "https://www.robots.ox.ac.uk/~vgg/data/voxceleb/meta/veri_test.txt" + + +def _download_extract_wavs(root: str): + for archive in ["dev", "test"]: + archive_name = _ARCHIVE_CONFIGS[archive]["archive_name"] + archive_path = os.path.join(root, archive_name) + # The zip file of dev data is splited to 4 chunks. + # Download and combine them into one file before extraction. + if archive == "dev": + urls = _ARCHIVE_CONFIGS[archive]["urls"] + checksums = _ARCHIVE_CONFIGS[archive]["checksums"] + with open(archive_path, "wb") as f: + for url, checksum in zip(urls, checksums): + file_path = os.path.join(root, os.path.basename(url)) + download_url_to_file(url, file_path, hash_prefix=checksum) + with open(file_path, "rb") as f_split: + f.write(f_split.read()) + else: + url = _ARCHIVE_CONFIGS[archive]["url"] + checksum = _ARCHIVE_CONFIGS[archive]["checksum"] + download_url_to_file(url, archive_path, hash_prefix=checksum) + _extract_zip(archive_path) + + +def _get_flist(root: str, file_path: str, subset: str) -> List[str]: + f_list = [] + if subset == "train": + index = 1 + elif subset == "dev": + index = 2 + else: + index = 3 + with open(file_path, "r") as f: + for line in f: + id, path = line.split() + if int(id) == index: + f_list.append(path) + return sorted(f_list) + + +def _get_paired_flist(root: str, veri_test_path: str): + f_list = [] + with open(veri_test_path, "r") as f: + for line in f: + label, path1, path2 = line.split() + f_list.append((label, path1, path2)) + return f_list + + +def _get_file_id(file_path: str, _ext_audio: str): + speaker_id, youtube_id, utterance_id = file_path.split("/")[-3:] + utterance_id = utterance_id.replace(_ext_audio, "") + file_id = "-".join([speaker_id, youtube_id, utterance_id]) + return file_id + + +class VoxCeleb1(Dataset): + """*VoxCeleb1* :cite:`nagrani2017voxceleb` dataset. + + Args: + root (str or Path): Path to the directory where the dataset is found or downloaded. + download (bool, optional): + Whether to download the dataset if it is not found at root path. (Default: ``False``). + """ + + _ext_audio = ".wav" + + def __init__(self, root: Union[str, Path], download: bool = False) -> None: + # Get string representation of 'root' in case Path object is passed + root = os.fspath(root) + self._path = os.path.join(root, "wav") + if not os.path.isdir(self._path): + if not download: + raise RuntimeError( + f"Dataset not found at {self._path}. Please set `download=True` to download the dataset." + ) + _download_extract_wavs(root) + + def get_metadata(self, n: int): + raise NotImplementedError + + def __getitem__(self, n: int): + raise NotImplementedError + + def __len__(self) -> int: + raise NotImplementedError + + +class VoxCeleb1Identification(VoxCeleb1): + """*VoxCeleb1* :cite:`nagrani2017voxceleb` dataset for speaker identification task. + + Each data sample contains the waveform, sample rate, speaker id, and the file id. + + Args: + root (str or Path): Path to the directory where the dataset is found or downloaded. + subset (str, optional): Subset of the dataset to use. Options: ["train", "dev", "test"]. (Default: ``"train"``) + meta_url (str, optional): The url of meta file that contains the list of subset labels and file paths. + The format of each row is ``subset file_path". For example: ``1 id10006/nLEBBc9oIFs/00003.wav``. + ``1``, ``2``, ``3`` mean ``train``, ``dev``, and ``test`` subest, respectively. + (Default: ``"https://www.robots.ox.ac.uk/~vgg/data/voxceleb/meta/iden_split.txt"``) + download (bool, optional): + Whether to download the dataset if it is not found at root path. (Default: ``False``). + + Note: + The file structure of `VoxCeleb1Identification` dataset is as follows: + + └─ root/ + + └─ wav/ + + └─ speaker_id folders + + Users who pre-downloaded the ``"vox1_dev_wav.zip"`` and ``"vox1_test_wav.zip"`` files need to move + the extracted files into the same ``root`` directory. + """ + + def __init__( + self, root: Union[str, Path], subset: str = "train", meta_url: str = _IDEN_SPLIT_URL, download: bool = False + ) -> None: + super().__init__(root, download) + if subset not in ["train", "dev", "test"]: + raise ValueError("`subset` must be one of ['train', 'dev', 'test']") + # download the iden_split.txt to get the train, dev, test lists. + meta_list_path = os.path.join(root, os.path.basename(meta_url)) + if not os.path.exists(meta_list_path): + download_url_to_file(meta_url, meta_list_path) + self._flist = _get_flist(self._path, meta_list_path, subset) + + def get_metadata(self, n: int) -> Tuple[str, int, int, str]: + """Get metadata for the n-th sample from the dataset. Returns filepath instead of waveform, + but otherwise returns the same fields as :py:func:`__getitem__`. + + Args: + n (int): The index of the sample + + Returns: + Tuple of the following items; + + str: + Path to audio + int: + Sample rate + int: + Speaker ID + str: + File ID + """ + file_path = self._flist[n] + file_id = _get_file_id(file_path, self._ext_audio) + speaker_id = file_id.split("-")[0] + speaker_id = int(speaker_id[3:]) + return file_path, SAMPLE_RATE, speaker_id, file_id + + def __getitem__(self, n: int) -> Tuple[Tensor, int, int, str]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + Tensor: + Waveform + int: + Sample rate + int: + Speaker ID + str: + File ID + """ + metadata = self.get_metadata(n) + waveform = _load_waveform(self._path, metadata[0], metadata[1]) + return (waveform,) + metadata[1:] + + def __len__(self) -> int: + return len(self._flist) + + +class VoxCeleb1Verification(VoxCeleb1): + """*VoxCeleb1* :cite:`nagrani2017voxceleb` dataset for speaker verification task. + + Each data sample contains a pair of waveforms, sample rate, the label indicating if they are + from the same speaker, and the file ids. + + Args: + root (str or Path): Path to the directory where the dataset is found or downloaded. + meta_url (str, optional): The url of meta file that contains a list of utterance pairs + and the corresponding labels. The format of each row is ``label file_path1 file_path2". + For example: ``1 id10270/x6uYqmx31kE/00001.wav id10270/8jEAjG6SegY/00008.wav``. + ``1`` means the two utterances are from the same speaker, ``0`` means not. + (Default: ``"https://www.robots.ox.ac.uk/~vgg/data/voxceleb/meta/veri_test.txt"``) + download (bool, optional): + Whether to download the dataset if it is not found at root path. (Default: ``False``). + + Note: + The file structure of `VoxCeleb1Verification` dataset is as follows: + + └─ root/ + + └─ wav/ + + └─ speaker_id folders + + Users who pre-downloaded the ``"vox1_dev_wav.zip"`` and ``"vox1_test_wav.zip"`` files need to move + the extracted files into the same ``root`` directory. + """ + + def __init__(self, root: Union[str, Path], meta_url: str = _VERI_TEST_URL, download: bool = False) -> None: + super().__init__(root, download) + # download the veri_test.txt to get the list of training pairs and labels. + meta_list_path = os.path.join(root, os.path.basename(meta_url)) + if not os.path.exists(meta_list_path): + download_url_to_file(meta_url, meta_list_path) + self._flist = _get_paired_flist(self._path, meta_list_path) + + def get_metadata(self, n: int) -> Tuple[str, str, int, int, str, str]: + """Get metadata for the n-th sample from the dataset. Returns filepaths instead of waveforms, + but otherwise returns the same fields as :py:func:`__getitem__`. + + Args: + n (int): The index of the sample + + Returns: + Tuple of the following items; + + str: + Path to audio file of speaker 1 + str: + Path to audio file of speaker 2 + int: + Sample rate + int: + Label + str: + File ID of speaker 1 + str: + File ID of speaker 2 + """ + label, file_path_spk1, file_path_spk2 = self._flist[n] + label = int(label) + file_id_spk1 = _get_file_id(file_path_spk1, self._ext_audio) + file_id_spk2 = _get_file_id(file_path_spk2, self._ext_audio) + return file_path_spk1, file_path_spk2, SAMPLE_RATE, label, file_id_spk1, file_id_spk2 + + def __getitem__(self, n: int) -> Tuple[Tensor, Tensor, int, int, str, str]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded. + + Returns: + Tuple of the following items; + + Tensor: + Waveform of speaker 1 + Tensor: + Waveform of speaker 2 + int: + Sample rate + int: + Label + str: + File ID of speaker 1 + str: + File ID of speaker 2 + """ + metadata = self.get_metadata(n) + waveform_spk1 = _load_waveform(self._path, metadata[0], metadata[2]) + waveform_spk2 = _load_waveform(self._path, metadata[1], metadata[2]) + return (waveform_spk1, waveform_spk2) + metadata[2:] + + def __len__(self) -> int: + return len(self._flist) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/yesno.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/yesno.py new file mode 100644 index 0000000000000000000000000000000000000000..baad08f1593a49af5f95658e8d4b67be6d3deeb9 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/datasets/yesno.py @@ -0,0 +1,89 @@ +import os +from pathlib import Path +from typing import List, Tuple, Union + +import torchaudio +from torch import Tensor +from torch.utils.data import Dataset +from torchaudio._internal import download_url_to_file +from torchaudio.datasets.utils import _extract_tar + + +_RELEASE_CONFIGS = { + "release1": { + "folder_in_archive": "waves_yesno", + "url": "http://www.openslr.org/resources/1/waves_yesno.tar.gz", + "checksum": "c3f49e0cca421f96b75b41640749167b52118f232498667ca7a5f9416aef8e73", + } +} + + +class YESNO(Dataset): + """*YesNo* :cite:`YesNo` dataset. + + Args: + root (str or Path): Path to the directory where the dataset is found or downloaded. + url (str, optional): The URL to download the dataset from. + (default: ``"http://www.openslr.org/resources/1/waves_yesno.tar.gz"``) + folder_in_archive (str, optional): + The top-level directory of the dataset. (default: ``"waves_yesno"``) + download (bool, optional): + Whether to download the dataset if it is not found at root path. (default: ``False``). + """ + + def __init__( + self, + root: Union[str, Path], + url: str = _RELEASE_CONFIGS["release1"]["url"], + folder_in_archive: str = _RELEASE_CONFIGS["release1"]["folder_in_archive"], + download: bool = False, + ) -> None: + + self._parse_filesystem(root, url, folder_in_archive, download) + + def _parse_filesystem(self, root: str, url: str, folder_in_archive: str, download: bool) -> None: + root = Path(root) + archive = os.path.basename(url) + archive = root / archive + + self._path = root / folder_in_archive + if download: + if not os.path.isdir(self._path): + if not os.path.isfile(archive): + checksum = _RELEASE_CONFIGS["release1"]["checksum"] + download_url_to_file(url, archive, hash_prefix=checksum) + _extract_tar(archive) + + if not os.path.isdir(self._path): + raise RuntimeError("Dataset not found. Please use `download=True` to download it.") + + self._walker = sorted(str(p.stem) for p in Path(self._path).glob("*.wav")) + + def _load_item(self, fileid: str, path: str): + labels = [int(c) for c in fileid.split("_")] + file_audio = os.path.join(path, fileid + ".wav") + waveform, sample_rate = torchaudio.load(file_audio) + return waveform, sample_rate, labels + + def __getitem__(self, n: int) -> Tuple[Tensor, int, List[int]]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + Tensor: + Waveform + int: + Sample rate + List[int]: + labels + """ + fileid = self._walker[n] + item = self._load_item(fileid, self._path) + return item + + def __len__(self) -> int: + return len(self._walker) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/functional/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/functional/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7f86f1c3c3abd74e43aead2f4c2b422c56d309a6 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/functional/__init__.py @@ -0,0 +1,126 @@ +from ._alignment import forced_align, merge_tokens, TokenSpan +from .filtering import ( + allpass_biquad, + band_biquad, + bandpass_biquad, + bandreject_biquad, + bass_biquad, + biquad, + contrast, + dcshift, + deemph_biquad, + dither, + equalizer_biquad, + filtfilt, + flanger, + gain, + highpass_biquad, + lfilter, + lowpass_biquad, + overdrive, + phaser, + riaa_biquad, + treble_biquad, + vad, +) + +from .functional import ( + add_noise, + amplitude_to_DB, + apply_beamforming, + compute_deltas, + convolve, + create_dct, + DB_to_amplitude, + deemphasis, + detect_pitch_frequency, + edit_distance, + fftconvolve, + frechet_distance, + griffinlim, + inverse_spectrogram, + linear_fbanks, + loudness, + mask_along_axis, + mask_along_axis_iid, + melscale_fbanks, + mu_law_decoding, + mu_law_encoding, + mvdr_weights_rtf, + mvdr_weights_souden, + phase_vocoder, + pitch_shift, + preemphasis, + psd, + resample, + rnnt_loss, + rtf_evd, + rtf_power, + sliding_window_cmn, + spectral_centroid, + spectrogram, + speed, +) + +__all__ = [ + "amplitude_to_DB", + "compute_deltas", + "create_dct", + "melscale_fbanks", + "linear_fbanks", + "DB_to_amplitude", + "loudness", + "detect_pitch_frequency", + "griffinlim", + "mask_along_axis", + "mask_along_axis_iid", + "mu_law_encoding", + "mu_law_decoding", + "phase_vocoder", + "sliding_window_cmn", + "spectrogram", + "inverse_spectrogram", + "spectral_centroid", + "allpass_biquad", + "band_biquad", + "bandpass_biquad", + "bandreject_biquad", + "bass_biquad", + "biquad", + "contrast", + "dither", + "dcshift", + "deemph_biquad", + "equalizer_biquad", + "filtfilt", + "flanger", + "forced_align", + "merge_tokens", + "TokenSpan", + "gain", + "highpass_biquad", + "lfilter", + "lowpass_biquad", + "overdrive", + "phaser", + "riaa_biquad", + "treble_biquad", + "vad", + "resample", + "edit_distance", + "pitch_shift", + "rnnt_loss", + "psd", + "mvdr_weights_souden", + "mvdr_weights_rtf", + "rtf_evd", + "rtf_power", + "apply_beamforming", + "fftconvolve", + "convolve", + "add_noise", + "speed", + "preemphasis", + "deemphasis", + "frechet_distance", +] diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/functional/_alignment.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/functional/_alignment.py new file mode 100644 index 0000000000000000000000000000000000000000..911e2ba8d255863e3897be30c8bd7873c7bef03d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/functional/_alignment.py @@ -0,0 +1,128 @@ +from dataclasses import dataclass +from typing import List, Optional, Tuple + +import torch +from torch import Tensor +from torchaudio._extension import fail_if_no_align + +__all__ = [] + + +@fail_if_no_align +def forced_align( + log_probs: Tensor, + targets: Tensor, + input_lengths: Optional[Tensor] = None, + target_lengths: Optional[Tensor] = None, + blank: int = 0, +) -> Tuple[Tensor, Tensor]: + r"""Align a CTC label sequence to an emission. + + .. devices:: CPU CUDA + + .. properties:: TorchScript + + Args: + log_probs (Tensor): log probability of CTC emission output. + Tensor of shape `(B, T, C)`. where `B` is the batch size, `T` is the input length, + `C` is the number of characters in alphabet including blank. + targets (Tensor): Target sequence. Tensor of shape `(B, L)`, + where `L` is the target length. + input_lengths (Tensor or None, optional): + Lengths of the inputs (max value must each be <= `T`). 1-D Tensor of shape `(B,)`. + target_lengths (Tensor or None, optional): + Lengths of the targets. 1-D Tensor of shape `(B,)`. + blank_id (int, optional): The index of blank symbol in CTC emission. (Default: 0) + + Returns: + Tuple(Tensor, Tensor): + Tensor: Label for each time step in the alignment path computed using forced alignment. + + Tensor: Log probability scores of the labels for each time step. + + Note: + The sequence length of `log_probs` must satisfy: + + + .. math:: + L_{\text{log\_probs}} \ge L_{\text{label}} + N_{\text{repeat}} + + where :math:`N_{\text{repeat}}` is the number of consecutively repeated tokens. + For example, in str `"aabbc"`, the number of repeats are `2`. + + Note: + The current version only supports ``batch_size==1``. + """ + if blank in targets: + raise ValueError(f"targets Tensor shouldn't contain blank index. Found {targets}.") + if torch.max(targets) >= log_probs.shape[-1]: + raise ValueError("targets values must be less than the CTC dimension") + + if input_lengths is None: + batch_size, length = log_probs.size(0), log_probs.size(1) + input_lengths = torch.full((batch_size,), length, dtype=torch.int64, device=log_probs.device) + if target_lengths is None: + batch_size, length = targets.size(0), targets.size(1) + target_lengths = torch.full((batch_size,), length, dtype=torch.int64, device=targets.device) + + # For TorchScript compatibility + assert input_lengths is not None + assert target_lengths is not None + + paths, scores = torch.ops.torchaudio.forced_align(log_probs, targets, input_lengths, target_lengths, blank) + return paths, scores[:, torch.arange(scores.shape[1]), paths[0]] + + +@dataclass +class TokenSpan: + """TokenSpan() + Token with time stamps and score. Returned by :py:func:`merge_tokens`. + """ + + token: int + """The token""" + start: int + """The start time (inclusive) in emission time axis.""" + end: int + """The end time (exclusive) in emission time axis.""" + score: float + """The score of the this token.""" + + def __len__(self) -> int: + """Returns the time span""" + return self.end - self.start + + +def merge_tokens(tokens: Tensor, scores: Tensor, blank: int = 0) -> List[TokenSpan]: + """Removes repeated tokens and blank tokens from the given CTC token sequence. + + Args: + tokens (Tensor): Alignment tokens (unbatched) returned from :py:func:`forced_align`. + Shape: `(time, )`. + scores (Tensor): Alignment scores (unbatched) returned from :py:func:`forced_align`. + Shape: `(time, )`. When computing the token-size score, the given score is averaged + across the corresponding time span. + + Returns: + list of TokenSpan + + Example: + >>> aligned_tokens, scores = forced_align(emission, targets, input_lengths, target_lengths) + >>> token_spans = merge_tokens(aligned_tokens[0], scores[0]) + """ + if tokens.ndim != 1 or scores.ndim != 1: + raise ValueError("`tokens` and `scores` must be 1D Tensor.") + if len(tokens) != len(scores): + raise ValueError("`tokens` and `scores` must be the same length.") + + diff = torch.diff( + tokens, prepend=torch.tensor([-1], device=tokens.device), append=torch.tensor([-1], device=tokens.device) + ) + changes_wo_blank = torch.nonzero((diff != 0)).squeeze().tolist() + tokens = tokens.tolist() + spans = [ + TokenSpan(token=token, start=start, end=end, score=scores[start:end].mean().item()) + for start, end in zip(changes_wo_blank[:-1], changes_wo_blank[1:]) + if (token := tokens[start]) != blank + ] + return spans diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/functional/filtering.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/functional/filtering.py new file mode 100644 index 0000000000000000000000000000000000000000..1a7aa3e37ebe3603912b42d9bf085536fb278207 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/functional/filtering.py @@ -0,0 +1,1685 @@ +import math +import warnings +from typing import Optional + +import torch +import torch.nn.functional as F +from torch import Tensor + +from torchaudio._extension import _IS_TORCHAUDIO_EXT_AVAILABLE + + +def _dB2Linear(x: float) -> float: + return math.exp(x * math.log(10) / 20.0) + + +def _generate_wave_table( + wave_type: str, + data_type: str, + table_size: int, + min: float, + max: float, + phase: float, + device: torch.device, +) -> Tensor: + r"""A helper function for phaser. Generates a table with given parameters. + + Args: + wave_type (str): SINE or TRIANGULAR + data_type (str): desired data_type ( `INT` or `FLOAT` ) + table_size (int): desired table size + min (float): desired min value + max (float): desired max value + phase (float): desired phase + device (torch.device): Torch device on which table must be generated + Returns: + Tensor: A 1D tensor with wave table values + """ + + phase_offset = int(phase / math.pi / 2 * table_size + 0.5) + + t = torch.arange(table_size, device=device, dtype=torch.int32) + + point = (t + phase_offset) % table_size + + d = torch.zeros_like(point, device=device, dtype=torch.float64) + + if wave_type == "SINE": + d = (torch.sin(point.to(torch.float64) / table_size * 2 * math.pi) + 1) / 2 + elif wave_type == "TRIANGLE": + d = point.to(torch.float64) * 2 / table_size + value = torch.div(4 * point, table_size, rounding_mode="floor") + d[value == 0] = d[value == 0] + 0.5 + d[value == 1] = 1.5 - d[value == 1] + d[value == 2] = 1.5 - d[value == 2] + d[value == 3] = d[value == 3] - 1.5 + + d = d * (max - min) + min + + if data_type == "INT": + mask = d < 0 + d[mask] = d[mask] - 0.5 + d[~mask] = d[~mask] + 0.5 + d = d.to(torch.int32) + elif data_type == "FLOAT": + d = d.to(torch.float32) + + return d + + +def allpass_biquad(waveform: Tensor, sample_rate: int, central_freq: float, Q: float = 0.707) -> Tensor: + r"""Design two-pole all-pass filter. Similar to SoX implementation. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform(torch.Tensor): audio waveform of dimension of `(..., time)` + sample_rate (int): sampling rate of the waveform, e.g. 44100 (Hz) + central_freq (float or torch.Tensor): central frequency (in Hz) + Q (float or torch.Tensor, optional): https://en.wikipedia.org/wiki/Q_factor (Default: ``0.707``) + + Returns: + Tensor: Waveform of dimension of `(..., time)` + + Reference: + - http://sox.sourceforge.net/sox.html + - https://www.w3.org/2011/audio/audio-eq-cookbook.html#APF + """ + dtype = waveform.dtype + device = waveform.device + central_freq = torch.as_tensor(central_freq, dtype=dtype, device=device) + Q = torch.as_tensor(Q, dtype=dtype, device=device) + + w0 = 2 * math.pi * central_freq / sample_rate + + alpha = torch.sin(w0) / 2 / Q + + b0 = 1 - alpha + b1 = -2 * torch.cos(w0) + b2 = 1 + alpha + a0 = 1 + alpha + a1 = -2 * torch.cos(w0) + a2 = 1 - alpha + return biquad(waveform, b0, b1, b2, a0, a1, a2) + + +def band_biquad( + waveform: Tensor, + sample_rate: int, + central_freq: float, + Q: float = 0.707, + noise: bool = False, +) -> Tensor: + r"""Design two-pole band filter. Similar to SoX implementation. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (Tensor): audio waveform of dimension of `(..., time)` + sample_rate (int): sampling rate of the waveform, e.g. 44100 (Hz) + central_freq (float or torch.Tensor): central frequency (in Hz) + Q (float or torch.Tensor, optional): https://en.wikipedia.org/wiki/Q_factor (Default: ``0.707``). + noise (bool, optional) : If ``True``, uses the alternate mode for un-pitched audio (e.g. percussion). + If ``False``, uses mode oriented to pitched audio, i.e. voice, singing, + or instrumental music (Default: ``False``). + + Returns: + Tensor: Waveform of dimension of `(..., time)` + + Reference: + - http://sox.sourceforge.net/sox.html + - https://www.w3.org/2011/audio/audio-eq-cookbook.html#APF + """ + dtype = waveform.dtype + device = waveform.device + central_freq = torch.as_tensor(central_freq, dtype=dtype, device=device) + Q = torch.as_tensor(Q, dtype=dtype, device=device) + + w0 = 2 * math.pi * central_freq / sample_rate + bw_Hz = central_freq / Q + + a0 = 1.0 + a2 = torch.exp(-2 * math.pi * bw_Hz / sample_rate) + a1 = -4 * a2 / (1 + a2) * torch.cos(w0) + + b0 = torch.sqrt(1 - a1 * a1 / (4 * a2)) * (1 - a2) + + if noise: + mult = torch.sqrt(((1 + a2) * (1 + a2) - a1 * a1) * (1 - a2) / (1 + a2)) / b0 + b0 = mult * b0 + + b1 = 0.0 + b2 = 0.0 + + return biquad(waveform, b0, b1, b2, a0, a1, a2) + + +def bandpass_biquad( + waveform: Tensor, + sample_rate: int, + central_freq: float, + Q: float = 0.707, + const_skirt_gain: bool = False, +) -> Tensor: + r"""Design two-pole band-pass filter. Similar to SoX implementation. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (Tensor): audio waveform of dimension of `(..., time)` + sample_rate (int): sampling rate of the waveform, e.g. 44100 (Hz) + central_freq (float or torch.Tensor): central frequency (in Hz) + Q (float or torch.Tensor, optional): https://en.wikipedia.org/wiki/Q_factor (Default: ``0.707``) + const_skirt_gain (bool, optional) : If ``True``, uses a constant skirt gain (peak gain = Q). + If ``False``, uses a constant 0dB peak gain. (Default: ``False``) + + Returns: + Tensor: Waveform of dimension of `(..., time)` + + Reference: + - http://sox.sourceforge.net/sox.html + - https://www.w3.org/2011/audio/audio-eq-cookbook.html#APF + """ + dtype = waveform.dtype + device = waveform.device + central_freq = torch.as_tensor(central_freq, dtype=dtype, device=device) + Q = torch.as_tensor(Q, dtype=dtype, device=device) + + w0 = 2 * math.pi * central_freq / sample_rate + alpha = torch.sin(w0) / 2 / Q + + temp = torch.sin(w0) / 2 if const_skirt_gain else alpha + b0 = temp + b1 = 0.0 + b2 = -temp + a0 = 1 + alpha + a1 = -2 * torch.cos(w0) + a2 = 1 - alpha + return biquad(waveform, b0, b1, b2, a0, a1, a2) + + +def bandreject_biquad(waveform: Tensor, sample_rate: int, central_freq: float, Q: float = 0.707) -> Tensor: + r"""Design two-pole band-reject filter. Similar to SoX implementation. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (Tensor): audio waveform of dimension of `(..., time)` + sample_rate (int): sampling rate of the waveform, e.g. 44100 (Hz) + central_freq (float or torch.Tensor): central frequency (in Hz) + Q (float or torch.Tensor, optional): https://en.wikipedia.org/wiki/Q_factor (Default: ``0.707``) + + Returns: + Tensor: Waveform of dimension of `(..., time)` + + Reference: + - http://sox.sourceforge.net/sox.html + - https://www.w3.org/2011/audio/audio-eq-cookbook.html#APF + """ + dtype = waveform.dtype + device = waveform.device + central_freq = torch.as_tensor(central_freq, dtype=dtype, device=device) + Q = torch.as_tensor(Q, dtype=dtype, device=device) + + w0 = 2 * math.pi * central_freq / sample_rate + alpha = torch.sin(w0) / 2 / Q + + b0 = 1.0 + b1 = -2 * torch.cos(w0) + b2 = 1.0 + a0 = 1 + alpha + a1 = -2 * torch.cos(w0) + a2 = 1 - alpha + return biquad(waveform, b0, b1, b2, a0, a1, a2) + + +def bass_biquad( + waveform: Tensor, + sample_rate: int, + gain: float, + central_freq: float = 100, + Q: float = 0.707, +) -> Tensor: + r"""Design a bass tone-control effect. Similar to SoX implementation. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (Tensor): audio waveform of dimension of `(..., time)` + sample_rate (int): sampling rate of the waveform, e.g. 44100 (Hz) + gain (float or torch.Tensor): desired gain at the boost (or attenuation) in dB. + central_freq (float or torch.Tensor, optional): central frequency (in Hz). (Default: ``100``) + Q (float or torch.Tensor, optional): https://en.wikipedia.org/wiki/Q_factor (Default: ``0.707``). + + Returns: + Tensor: Waveform of dimension of `(..., time)` + + Reference: + - http://sox.sourceforge.net/sox.html + - https://www.w3.org/2011/audio/audio-eq-cookbook.html#APF + """ + dtype = waveform.dtype + device = waveform.device + central_freq = torch.as_tensor(central_freq, dtype=dtype, device=device) + Q = torch.as_tensor(Q, dtype=dtype, device=device) + gain = torch.as_tensor(gain, dtype=dtype, device=device) + + w0 = 2 * math.pi * central_freq / sample_rate + alpha = torch.sin(w0) / 2 / Q + A = torch.exp(gain / 40 * math.log(10)) + + temp1 = 2 * torch.sqrt(A) * alpha + temp2 = (A - 1) * torch.cos(w0) + temp3 = (A + 1) * torch.cos(w0) + + b0 = A * ((A + 1) - temp2 + temp1) + b1 = 2 * A * ((A - 1) - temp3) + b2 = A * ((A + 1) - temp2 - temp1) + a0 = (A + 1) + temp2 + temp1 + a1 = -2 * ((A - 1) + temp3) + a2 = (A + 1) + temp2 - temp1 + + return biquad(waveform, b0 / a0, b1 / a0, b2 / a0, a0 / a0, a1 / a0, a2 / a0) + + +def biquad(waveform: Tensor, b0: float, b1: float, b2: float, a0: float, a1: float, a2: float) -> Tensor: + r"""Perform a biquad filter of input tensor. Initial conditions set to 0. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (Tensor): audio waveform of dimension of `(..., time)` + b0 (float or torch.Tensor): numerator coefficient of current input, x[n] + b1 (float or torch.Tensor): numerator coefficient of input one time step ago x[n-1] + b2 (float or torch.Tensor): numerator coefficient of input two time steps ago x[n-2] + a0 (float or torch.Tensor): denominator coefficient of current output y[n], typically 1 + a1 (float or torch.Tensor): denominator coefficient of current output y[n-1] + a2 (float or torch.Tensor): denominator coefficient of current output y[n-2] + + Returns: + Tensor: Waveform with dimension of `(..., time)` + + Reference: + - https://en.wikipedia.org/wiki/Digital_biquad_filter + """ + + device = waveform.device + dtype = waveform.dtype + + b0 = torch.as_tensor(b0, dtype=dtype, device=device).view(1) + b1 = torch.as_tensor(b1, dtype=dtype, device=device).view(1) + b2 = torch.as_tensor(b2, dtype=dtype, device=device).view(1) + a0 = torch.as_tensor(a0, dtype=dtype, device=device).view(1) + a1 = torch.as_tensor(a1, dtype=dtype, device=device).view(1) + a2 = torch.as_tensor(a2, dtype=dtype, device=device).view(1) + + output_waveform = lfilter( + waveform, + torch.cat([a0, a1, a2]), + torch.cat([b0, b1, b2]), + ) + return output_waveform + + +def contrast(waveform: Tensor, enhancement_amount: float = 75.0) -> Tensor: + r"""Apply contrast effect. Similar to SoX implementation. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Comparable with compression, this effect modifies an audio signal to make it sound louder + + Args: + waveform (Tensor): audio waveform of dimension of `(..., time)` + enhancement_amount (float, optional): controls the amount of the enhancement + Allowed range of values for enhancement_amount : 0-100 + Note that enhancement_amount = 0 still gives a significant contrast enhancement + + Returns: + Tensor: Waveform of dimension of `(..., time)` + + Reference: + - http://sox.sourceforge.net/sox.html + """ + + if not 0 <= enhancement_amount <= 100: + raise ValueError("Allowed range of values for enhancement_amount : 0-100") + + contrast = enhancement_amount / 750.0 + + temp1 = waveform * (math.pi / 2) + temp2 = contrast * torch.sin(temp1 * 4) + output_waveform = torch.sin(temp1 + temp2) + + return output_waveform + + +def dcshift(waveform: Tensor, shift: float, limiter_gain: Optional[float] = None) -> Tensor: + r"""Apply a DC shift to the audio. Similar to SoX implementation. + + .. devices:: CPU CUDA + + .. properties:: TorchScript + + This can be useful to remove a DC offset + (caused perhaps by a hardware problem in the recording chain) from the audio + + Args: + waveform (Tensor): audio waveform of dimension of `(..., time)` + shift (float): indicates the amount to shift the audio + Allowed range of values for shift : -2.0 to +2.0 + limiter_gain (float of None, optional): It is used only on peaks to prevent clipping + It should have a value much less than 1 (e.g. 0.05 or 0.02) + + Returns: + Tensor: Waveform of dimension of `(..., time)` + + Reference: + - http://sox.sourceforge.net/sox.html + """ + output_waveform = waveform + limiter_threshold = 0.0 + + if limiter_gain is not None: + limiter_threshold = 1.0 - (abs(shift) - limiter_gain) + + # Note: + # the following index-based update breaks auto-grad support + if limiter_gain is not None and shift > 0: + mask = waveform > limiter_threshold + temp = (waveform[mask] - limiter_threshold) * limiter_gain / (1 - limiter_threshold) + output_waveform[mask] = (temp + limiter_threshold + shift).clamp(max=limiter_threshold) + output_waveform[~mask] = (waveform[~mask] + shift).clamp(min=-1, max=1) + elif limiter_gain is not None and shift < 0: + mask = waveform < -limiter_threshold + temp = (waveform[mask] + limiter_threshold) * limiter_gain / (1 - limiter_threshold) + output_waveform[mask] = (temp - limiter_threshold + shift).clamp(min=-limiter_threshold) + output_waveform[~mask] = (waveform[~mask] + shift).clamp(min=-1, max=1) + else: + output_waveform = (waveform + shift).clamp(min=-1, max=1) + + return output_waveform + + +def deemph_biquad(waveform: Tensor, sample_rate: int) -> Tensor: + r"""Apply ISO 908 CD de-emphasis (shelving) IIR filter. Similar to SoX implementation. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (Tensor): audio waveform of dimension of `(..., time)` + sample_rate (int): sampling rate of the waveform, Allowed sample rate ``44100`` or ``48000`` + + Returns: + Tensor: Waveform of dimension of `(..., time)` + + Reference: + - http://sox.sourceforge.net/sox.html + - https://www.w3.org/2011/audio/audio-eq-cookbook.html#APF + """ + + if sample_rate == 44100: + central_freq = 5283 + width_slope = 0.4845 + gain = -9.477 + elif sample_rate == 48000: + central_freq = 5356 + width_slope = 0.479 + gain = -9.62 + else: + raise ValueError("Sample rate must be 44100 (audio-CD) or 48000 (DAT)") + + w0 = 2 * math.pi * central_freq / sample_rate + A = math.exp(gain / 40.0 * math.log(10)) + alpha = math.sin(w0) / 2 * math.sqrt((A + 1 / A) * (1 / width_slope - 1) + 2) + + temp1 = 2 * math.sqrt(A) * alpha + temp2 = (A - 1) * math.cos(w0) + temp3 = (A + 1) * math.cos(w0) + + b0 = A * ((A + 1) + temp2 + temp1) + b1 = -2 * A * ((A - 1) + temp3) + b2 = A * ((A + 1) + temp2 - temp1) + a0 = (A + 1) - temp2 + temp1 + a1 = 2 * ((A - 1) - temp3) + a2 = (A + 1) - temp2 - temp1 + + return biquad(waveform, b0, b1, b2, a0, a1, a2) + + +def _add_noise_shaping(dithered_waveform: Tensor, waveform: Tensor) -> Tensor: + r"""Noise shaping is calculated by error: + error[n] = dithered[n] - original[n] + noise_shaped_waveform[n] = dithered[n] + error[n-1] + """ + wf_shape = waveform.size() + waveform = waveform.reshape(-1, wf_shape[-1]) + + dithered_shape = dithered_waveform.size() + dithered_waveform = dithered_waveform.reshape(-1, dithered_shape[-1]) + + error = dithered_waveform - waveform + + # add error[n-1] to dithered_waveform[n], so offset the error by 1 index + zeros = torch.zeros(1, dtype=error.dtype, device=error.device) + for index in range(error.size()[0]): + err = error[index] + error_offset = torch.cat((zeros, err)) + error[index] = error_offset[: waveform.size()[1]] + + noise_shaped = dithered_waveform + error + return noise_shaped.reshape(dithered_shape[:-1] + noise_shaped.shape[-1:]) + + +def _apply_probability_distribution(waveform: Tensor, density_function: str = "TPDF") -> Tensor: + r"""Apply a probability distribution function on a waveform. + + Triangular probability density function (TPDF) dither noise has a + triangular distribution; values in the center of the range have a higher + probability of occurring. + + Rectangular probability density function (RPDF) dither noise has a + uniform distribution; any value in the specified range has the same + probability of occurring. + + Gaussian probability density function (GPDF) has a normal distribution. + The relationship of probabilities of results follows a bell-shaped, + or Gaussian curve, typical of dither generated by analog sources. + Args: + waveform (Tensor): Tensor of audio of dimension (..., time) + density_function (str, optional): The density function of a + continuous random variable (Default: ``"TPDF"``) + Options: Triangular Probability Density Function - `TPDF` + Rectangular Probability Density Function - `RPDF` + Gaussian Probability Density Function - `GPDF` + Returns: + Tensor: waveform dithered with TPDF + """ + + # pack batch + shape = waveform.size() + waveform = waveform.reshape(-1, shape[-1]) + + channel_size = waveform.size()[0] - 1 + time_size = waveform.size()[-1] - 1 + + random_channel = ( + int( + torch.randint( + channel_size, + [ + 1, + ], + ).item() + ) + if channel_size > 0 + else 0 + ) + random_time = ( + int( + torch.randint( + time_size, + [ + 1, + ], + ).item() + ) + if time_size > 0 + else 0 + ) + + number_of_bits = 16 + up_scaling = 2 ** (number_of_bits - 1) - 2 + signal_scaled = waveform * up_scaling + down_scaling = 2 ** (number_of_bits - 1) + + signal_scaled_dis = waveform + if density_function == "RPDF": + RPDF = waveform[random_channel][random_time] - 0.5 + + signal_scaled_dis = signal_scaled + RPDF + elif density_function == "GPDF": + # TODO Replace by distribution code once + # https://github.com/pytorch/pytorch/issues/29843 is resolved + # gaussian = torch.distributions.normal.Normal(torch.mean(waveform, -1), 1).sample() + + num_rand_variables = 6 + + gaussian = waveform[random_channel][random_time] + for ws in num_rand_variables * [time_size]: + rand_chan = int( + torch.randint( + channel_size, + [ + 1, + ], + ).item() + ) + gaussian += waveform[rand_chan][ + int( + torch.randint( + ws, + [ + 1, + ], + ).item() + ) + ] + + signal_scaled_dis = signal_scaled + gaussian + else: + # dtype needed for https://github.com/pytorch/pytorch/issues/32358 + TPDF = torch.bartlett_window(time_size + 1, dtype=signal_scaled.dtype, device=signal_scaled.device) + TPDF = TPDF.repeat((channel_size + 1), 1) + signal_scaled_dis = signal_scaled + TPDF + + quantised_signal_scaled = torch.round(signal_scaled_dis) + quantised_signal = quantised_signal_scaled / down_scaling + + # unpack batch + return quantised_signal.reshape(shape[:-1] + quantised_signal.shape[-1:]) + + +def dither(waveform: Tensor, density_function: str = "TPDF", noise_shaping: bool = False) -> Tensor: + r"""Apply dither + + .. devices:: CPU CUDA + + .. properties:: TorchScript + + Dither increases the perceived dynamic range of audio stored at a + particular bit-depth by eliminating nonlinear truncation distortion + (i.e. adding minimally perceived noise to mask distortion caused by quantization). + + Args: + waveform (Tensor): Tensor of audio of dimension (..., time) + density_function (str, optional): + The density function of a continuous random variable. One of + ``"TPDF"`` (Triangular Probability Density Function), + ``"RPDF"`` (Rectangular Probability Density Function) or + ``"GPDF"`` (Gaussian Probability Density Function) (Default: ``"TPDF"``). + noise_shaping (bool, optional): a filtering process that shapes the spectral + energy of quantisation error (Default: ``False``) + + Returns: + Tensor: waveform dithered + """ + dithered = _apply_probability_distribution(waveform, density_function=density_function) + + if noise_shaping: + return _add_noise_shaping(dithered, waveform) + else: + return dithered + + +def equalizer_biquad( + waveform: Tensor, + sample_rate: int, + center_freq: float, + gain: float, + Q: float = 0.707, +) -> Tensor: + r"""Design biquad peaking equalizer filter and perform filtering. Similar to SoX implementation. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (Tensor): audio waveform of dimension of `(..., time)` + sample_rate (int): sampling rate of the waveform, e.g. 44100 (Hz) + center_freq (float): filter's central frequency + gain (float or torch.Tensor): desired gain at the boost (or attenuation) in dB + Q (float or torch.Tensor, optional): https://en.wikipedia.org/wiki/Q_factor (Default: ``0.707``) + + Returns: + Tensor: Waveform of dimension of `(..., time)` + """ + dtype = waveform.dtype + device = waveform.device + center_freq = torch.as_tensor(center_freq, dtype=dtype, device=device) + Q = torch.as_tensor(Q, dtype=dtype, device=device) + gain = torch.as_tensor(gain, dtype=dtype, device=device) + + w0 = 2 * math.pi * center_freq / sample_rate + A = torch.exp(gain / 40.0 * math.log(10)) + alpha = torch.sin(w0) / 2 / Q + + b0 = 1 + alpha * A + b1 = -2 * torch.cos(w0) + b2 = 1 - alpha * A + a0 = 1 + alpha / A + a1 = -2 * torch.cos(w0) + a2 = 1 - alpha / A + return biquad(waveform, b0, b1, b2, a0, a1, a2) + + +def filtfilt( + waveform: Tensor, + a_coeffs: Tensor, + b_coeffs: Tensor, + clamp: bool = True, +) -> Tensor: + r"""Apply an IIR filter forward and backward to a waveform. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Inspired by https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.filtfilt.html + + Args: + waveform (Tensor): audio waveform of dimension of `(..., time)`. Must be normalized to -1 to 1. + a_coeffs (Tensor): denominator coefficients of difference equation of dimension of either + 1D with shape `(num_order + 1)` or 2D with shape `(num_filters, num_order + 1)`. + Lower delay coefficients are first, e.g. ``[a0, a1, a2, ...]``. + Must be same size as b_coeffs (pad with 0's as necessary). + b_coeffs (Tensor): numerator coefficients of difference equation of dimension of either + 1D with shape `(num_order + 1)` or 2D with shape `(num_filters, num_order + 1)`. + Lower delay coefficients are first, e.g. ``[b0, b1, b2, ...]``. + Must be same size as a_coeffs (pad with 0's as necessary). + clamp (bool, optional): If ``True``, clamp the output signal to be in the range [-1, 1] (Default: ``True``) + + Returns: + Tensor: Waveform with dimension of either `(..., num_filters, time)` if ``a_coeffs`` and ``b_coeffs`` + are 2D Tensors, or `(..., time)` otherwise. + """ + forward_filtered = lfilter(waveform, a_coeffs, b_coeffs, clamp=False, batching=True) + backward_filtered = lfilter( + forward_filtered.flip(-1), + a_coeffs, + b_coeffs, + clamp=clamp, + batching=True, + ).flip(-1) + return backward_filtered + + +def flanger( + waveform: Tensor, + sample_rate: int, + delay: float = 0.0, + depth: float = 2.0, + regen: float = 0.0, + width: float = 71.0, + speed: float = 0.5, + phase: float = 25.0, + modulation: str = "sinusoidal", + interpolation: str = "linear", +) -> Tensor: + r"""Apply a flanger effect to the audio. Similar to SoX implementation. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (Tensor): audio waveform of dimension of `(..., channel, time)` . + Max 4 channels allowed + sample_rate (int): sampling rate of the waveform, e.g. 44100 (Hz) + delay (float, optional): desired delay in milliseconds(ms) + Allowed range of values are 0 to 30 + depth (float, optional): desired delay depth in milliseconds(ms) + Allowed range of values are 0 to 10 + regen (float, optional): desired regen(feedback gain) in dB + Allowed range of values are -95 to 95 + width (float, optional): desired width(delay gain) in dB + Allowed range of values are 0 to 100 + speed (float, optional): modulation speed in Hz + Allowed range of values are 0.1 to 10 + phase (float, optional): percentage phase-shift for multi-channel + Allowed range of values are 0 to 100 + modulation (str, optional): Use either "sinusoidal" or "triangular" modulation. (Default: ``sinusoidal``) + interpolation (str, optional): Use either "linear" or "quadratic" for delay-line interpolation. + (Default: ``linear``) + + Returns: + Tensor: Waveform of dimension of `(..., channel, time)` + + Reference: + - http://sox.sourceforge.net/sox.html + + - Scott Lehman, `Effects Explained`_, + + .. _Effects Explained: + https://web.archive.org/web/20051125072557/http://www.harmony-central.com/Effects/effects-explained.html + """ + + if modulation not in ("sinusoidal", "triangular"): + raise ValueError('Only "sinusoidal" or "triangular" modulation allowed') + + if interpolation not in ("linear", "quadratic"): + raise ValueError('Only "linear" or "quadratic" interpolation allowed') + + actual_shape = waveform.shape + device, dtype = waveform.device, waveform.dtype + + if actual_shape[-2] > 4: + raise ValueError("Max 4 channels allowed") + + # convert to 3D (batch, channels, time) + waveform = waveform.view(-1, actual_shape[-2], actual_shape[-1]) + + # Scaling + feedback_gain = regen / 100 + delay_gain = width / 100 + channel_phase = phase / 100 + delay_min = delay / 1000 + delay_depth = depth / 1000 + + n_channels = waveform.shape[-2] + + if modulation == "sinusoidal": + wave_type = "SINE" + else: + wave_type = "TRIANGLE" + + # Balance output: + in_gain = 1.0 / (1 + delay_gain) + delay_gain = delay_gain / (1 + delay_gain) + + # Balance feedback loop: + delay_gain = delay_gain * (1 - abs(feedback_gain)) + + delay_buf_length = int((delay_min + delay_depth) * sample_rate + 0.5) + delay_buf_length = delay_buf_length + 2 + + delay_bufs = torch.zeros(waveform.shape[0], n_channels, delay_buf_length, dtype=dtype, device=device) + delay_last = torch.zeros(waveform.shape[0], n_channels, dtype=dtype, device=device) + + lfo_length = int(sample_rate / speed) + + table_min = math.floor(delay_min * sample_rate + 0.5) + table_max = delay_buf_length - 2.0 + + lfo = _generate_wave_table( + wave_type=wave_type, + data_type="FLOAT", + table_size=lfo_length, + min=float(table_min), + max=float(table_max), + phase=3 * math.pi / 2, + device=device, + ) + + output_waveform = torch.zeros_like(waveform, dtype=dtype, device=device) + + delay_buf_pos = 0 + lfo_pos = 0 + channel_idxs = torch.arange(0, n_channels, device=device) + + for i in range(waveform.shape[-1]): + + delay_buf_pos = (delay_buf_pos + delay_buf_length - 1) % delay_buf_length + + cur_channel_phase = (channel_idxs * lfo_length * channel_phase + 0.5).to(torch.int64) + delay_tensor = lfo[(lfo_pos + cur_channel_phase) % lfo_length] + frac_delay = torch.frac(delay_tensor) + delay_tensor = torch.floor(delay_tensor) + + int_delay = delay_tensor.to(torch.int64) + + temp = waveform[:, :, i] + + delay_bufs[:, :, delay_buf_pos] = temp + delay_last * feedback_gain + + delayed_0 = delay_bufs[:, channel_idxs, (delay_buf_pos + int_delay) % delay_buf_length] + + int_delay = int_delay + 1 + + delayed_1 = delay_bufs[:, channel_idxs, (delay_buf_pos + int_delay) % delay_buf_length] + + int_delay = int_delay + 1 + + if interpolation == "linear": + delayed = delayed_0 + (delayed_1 - delayed_0) * frac_delay + else: + delayed_2 = delay_bufs[:, channel_idxs, (delay_buf_pos + int_delay) % delay_buf_length] + + int_delay = int_delay + 1 + + delayed_2 = delayed_2 - delayed_0 + delayed_1 = delayed_1 - delayed_0 + a = delayed_2 * 0.5 - delayed_1 + b = delayed_1 * 2 - delayed_2 * 0.5 + + delayed = delayed_0 + (a * frac_delay + b) * frac_delay + + delay_last = delayed + output_waveform[:, :, i] = waveform[:, :, i] * in_gain + delayed * delay_gain + + lfo_pos = (lfo_pos + 1) % lfo_length + + return output_waveform.clamp(min=-1, max=1).view(actual_shape) + + +def gain(waveform: Tensor, gain_db: float = 1.0) -> Tensor: + r"""Apply amplification or attenuation to the whole waveform. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (Tensor): Tensor of audio of dimension (..., time). + gain_db (float, optional) Gain adjustment in decibels (dB) (Default: ``1.0``). + + Returns: + Tensor: the whole waveform amplified by gain_db. + """ + if gain_db == 0: + return waveform + + ratio = 10 ** (gain_db / 20) + + return waveform * ratio + + +def highpass_biquad(waveform: Tensor, sample_rate: int, cutoff_freq: float, Q: float = 0.707) -> Tensor: + r"""Design biquad highpass filter and perform filtering. Similar to SoX implementation. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (Tensor): audio waveform of dimension of `(..., time)` + sample_rate (int): sampling rate of the waveform, e.g. 44100 (Hz) + cutoff_freq (float or torch.Tensor): filter cutoff frequency + Q (float or torch.Tensor, optional): https://en.wikipedia.org/wiki/Q_factor (Default: ``0.707``) + + Returns: + Tensor: Waveform dimension of `(..., time)` + """ + dtype = waveform.dtype + device = waveform.device + cutoff_freq = torch.as_tensor(cutoff_freq, dtype=dtype, device=device) + Q = torch.as_tensor(Q, dtype=dtype, device=device) + + w0 = 2 * math.pi * cutoff_freq / sample_rate + alpha = torch.sin(w0) / 2.0 / Q + + b0 = (1 + torch.cos(w0)) / 2 + b1 = -1 - torch.cos(w0) + b2 = b0 + a0 = 1 + alpha + a1 = -2 * torch.cos(w0) + a2 = 1 - alpha + return biquad(waveform, b0, b1, b2, a0, a1, a2) + + +def _lfilter_core_generic_loop(input_signal_windows: Tensor, a_coeffs_flipped: Tensor, padded_output_waveform: Tensor): + n_order = a_coeffs_flipped.size(1) + a_coeffs_flipped = a_coeffs_flipped.unsqueeze(2) + for i_sample, o0 in enumerate(input_signal_windows.permute(2, 0, 1)): + windowed_output_signal = padded_output_waveform[:, :, i_sample : i_sample + n_order] + o0 -= (windowed_output_signal.transpose(0, 1) @ a_coeffs_flipped)[..., 0].t() + padded_output_waveform[:, :, i_sample + n_order - 1] = o0 + + +if _IS_TORCHAUDIO_EXT_AVAILABLE: + _lfilter_core_loop = torch.ops.torchaudio._lfilter_core_loop +else: + _lfilter_core_loop = _lfilter_core_generic_loop + + +class DifferentiableFIR(torch.autograd.Function): + @staticmethod + def forward(ctx, waveform, b_coeffs): + n_order = b_coeffs.size(1) + n_channel = b_coeffs.size(0) + b_coeff_flipped = b_coeffs.flip(1).contiguous() + padded_waveform = F.pad(waveform, (n_order - 1, 0)) + output = F.conv1d(padded_waveform, b_coeff_flipped.unsqueeze(1), groups=n_channel) + ctx.save_for_backward(waveform, b_coeffs, output) + return output + + @staticmethod + def backward(ctx, dy): + x, b_coeffs, y = ctx.saved_tensors + n_batch = x.size(0) + n_channel = x.size(1) + n_order = b_coeffs.size(1) + db = ( + F.conv1d( + F.pad(x, (n_order - 1, 0)).view(1, n_batch * n_channel, -1), + dy.view(n_batch * n_channel, 1, -1), + groups=n_batch * n_channel, + ) + .view(n_batch, n_channel, -1) + .sum(0) + .flip(1) + if b_coeffs.requires_grad + else None + ) + dx = F.conv1d(F.pad(dy, (0, n_order - 1)), b_coeffs.unsqueeze(1), groups=n_channel) if x.requires_grad else None + return (dx, db) + + +class DifferentiableIIR(torch.autograd.Function): + @staticmethod + def forward(ctx, waveform, a_coeffs_normalized): + n_batch, n_channel, n_sample = waveform.shape + n_order = a_coeffs_normalized.size(1) + n_sample_padded = n_sample + n_order - 1 + + a_coeff_flipped = a_coeffs_normalized.flip(1).contiguous() + padded_output_waveform = torch.zeros( + n_batch, n_channel, n_sample_padded, device=waveform.device, dtype=waveform.dtype + ) + _lfilter_core_loop(waveform, a_coeff_flipped, padded_output_waveform) + output = padded_output_waveform[:, :, n_order - 1 :] + ctx.save_for_backward(waveform, a_coeffs_normalized, output) + return output + + @staticmethod + def backward(ctx, dy): + x, a_coeffs_normalized, y = ctx.saved_tensors + n_channel = x.size(1) + n_order = a_coeffs_normalized.size(1) + tmp = DifferentiableIIR.apply(dy.flip(2).contiguous(), a_coeffs_normalized).flip(2) + dx = tmp if x.requires_grad else None + da = ( + -( + tmp.transpose(0, 1).reshape(n_channel, 1, -1) + @ F.pad(y, (n_order - 1, 0)).unfold(2, n_order, 1).transpose(0, 1).reshape(n_channel, -1, n_order) + ) + .squeeze(1) + .flip(1) + if a_coeffs_normalized.requires_grad + else None + ) + return (dx, da) + + +def _lfilter(waveform, a_coeffs, b_coeffs): + filtered_waveform = DifferentiableFIR.apply(waveform, b_coeffs / a_coeffs[:, 0:1]) + return DifferentiableIIR.apply(filtered_waveform, a_coeffs / a_coeffs[:, 0:1]) + + +def lfilter(waveform: Tensor, a_coeffs: Tensor, b_coeffs: Tensor, clamp: bool = True, batching: bool = True) -> Tensor: + r"""Perform an IIR filter by evaluating difference equation, using differentiable implementation + developed separately by *Yu et al.* :cite:`ismir_YuF23` and *Forgione et al.* :cite:`forgione2021dynonet`. + The gradients of ``a_coeffs`` are computed based on a faster algorithm from :cite:`ycy2024diffapf`. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Note: + To avoid numerical problems, small filter order is preferred. + Using double precision could also minimize numerical precision errors. + + Args: + waveform (Tensor): audio waveform of dimension of `(..., time)`. Must be normalized to -1 to 1. + a_coeffs (Tensor): denominator coefficients of difference equation of dimension of either + 1D with shape `(num_order + 1)` or 2D with shape `(num_filters, num_order + 1)`. + Lower delays coefficients are first, e.g. ``[a0, a1, a2, ...]``. + Must be same size as b_coeffs (pad with 0's as necessary). + b_coeffs (Tensor): numerator coefficients of difference equation of dimension of either + 1D with shape `(num_order + 1)` or 2D with shape `(num_filters, num_order + 1)`. + Lower delays coefficients are first, e.g. ``[b0, b1, b2, ...]``. + Must be same size as a_coeffs (pad with 0's as necessary). + clamp (bool, optional): If ``True``, clamp the output signal to be in the range [-1, 1] (Default: ``True``) + batching (bool, optional): Effective only when coefficients are 2D. If ``True``, then waveform should be at + least 2D, and the size of second axis from last should equals to ``num_filters``. + The output can be expressed as ``output[..., i, :] = lfilter(waveform[..., i, :], + a_coeffs[i], b_coeffs[i], clamp=clamp, batching=False)``. (Default: ``True``) + + Returns: + Tensor: Waveform with dimension of either `(..., num_filters, time)` if ``a_coeffs`` and ``b_coeffs`` + are 2D Tensors, or `(..., time)` otherwise. + """ + if a_coeffs.size() != b_coeffs.size(): + raise ValueError( + "Expected coeffs to be the same size." + f"Found: a_coeffs size: {a_coeffs.size()}, b_coeffs size: {b_coeffs.size()}" + ) + if a_coeffs.ndim > 2: + raise ValueError(f"Expected coeffs to have greater than 1 dimension. Found: {a_coeffs.ndim}") + + if a_coeffs.ndim > 1: + if batching: + if waveform.ndim <= 0: + raise ValueError("Expected waveform to have a positive number of dimensions." f"Found: {waveform.ndim}") + if waveform.shape[-2] != a_coeffs.shape[0]: + raise ValueError( + "Expected number of batches in waveform and coeffs to be the same." + f"Found: coeffs batches: {a_coeffs.shape[0]}, waveform batches: {waveform.shape[-2]}" + ) + else: + waveform = torch.stack([waveform] * a_coeffs.shape[0], -2) + else: + a_coeffs = a_coeffs.unsqueeze(0) + b_coeffs = b_coeffs.unsqueeze(0) + + # pack batch + shape = waveform.size() + waveform = waveform.reshape(-1, a_coeffs.shape[0], shape[-1]) + output = _lfilter(waveform, a_coeffs, b_coeffs) + + if clamp: + output = torch.clamp(output, min=-1.0, max=1.0) + + # unpack batch + output = output.reshape(shape[:-1] + output.shape[-1:]) + + return output + + +def lowpass_biquad(waveform: Tensor, sample_rate: int, cutoff_freq: float, Q: float = 0.707) -> Tensor: + r"""Design biquad lowpass filter and perform filtering. Similar to SoX implementation. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (torch.Tensor): audio waveform of dimension of `(..., time)` + sample_rate (int): sampling rate of the waveform, e.g. 44100 (Hz) + cutoff_freq (float or torch.Tensor): filter cutoff frequency + Q (float or torch.Tensor, optional): https://en.wikipedia.org/wiki/Q_factor (Default: ``0.707``) + + Returns: + Tensor: Waveform of dimension of `(..., time)` + """ + dtype = waveform.dtype + device = waveform.device + cutoff_freq = torch.as_tensor(cutoff_freq, dtype=dtype, device=device) + Q = torch.as_tensor(Q, dtype=dtype, device=device) + + w0 = 2 * math.pi * cutoff_freq / sample_rate + alpha = torch.sin(w0) / 2 / Q + + b0 = (1 - torch.cos(w0)) / 2 + b1 = 1 - torch.cos(w0) + b2 = b0 + a0 = 1 + alpha + a1 = -2 * torch.cos(w0) + a2 = 1 - alpha + return biquad(waveform, b0, b1, b2, a0, a1, a2) + + +def _overdrive_core_loop_generic( + waveform: Tensor, temp: Tensor, last_in: Tensor, last_out: Tensor, output_waveform: Tensor +): + for i in range(waveform.shape[-1]): + last_out = temp[:, i] - last_in + 0.995 * last_out + last_in = temp[:, i] + output_waveform[:, i] = waveform[:, i] * 0.5 + last_out * 0.75 + + +if _IS_TORCHAUDIO_EXT_AVAILABLE: + _overdrive_core_loop_cpu = torch.ops.torchaudio._overdrive_core_loop +else: + _overdrive_core_loop_cpu = _overdrive_core_loop_generic + + +def overdrive(waveform: Tensor, gain: float = 20, colour: float = 20) -> Tensor: + r"""Apply a overdrive effect to the audio. Similar to SoX implementation. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + This effect applies a non linear distortion to the audio signal. + + Args: + waveform (Tensor): audio waveform of dimension of `(..., time)` + gain (float, optional): desired gain at the boost (or attenuation) in dB + Allowed range of values are 0 to 100 + colour (float, optional): controls the amount of even harmonic content in the over-driven output + Allowed range of values are 0 to 100 + + Returns: + Tensor: Waveform of dimension of `(..., time)` + + Reference: + - http://sox.sourceforge.net/sox.html + """ + actual_shape = waveform.shape + device, dtype = waveform.device, waveform.dtype + + # convert to 2D (..,time) + waveform = waveform.view(-1, actual_shape[-1]) + + gain = _dB2Linear(gain) + colour = colour / 200 + last_in = torch.zeros(waveform.shape[:-1], dtype=dtype, device=device) + last_out = torch.zeros(waveform.shape[:-1], dtype=dtype, device=device) + + temp = waveform * gain + colour + + mask1 = temp < -1 + temp[mask1] = torch.tensor(-2.0 / 3.0, dtype=dtype, device=device) + # Wrapping the constant with Tensor is required for Torchscript + + mask2 = temp > 1 + temp[mask2] = torch.tensor(2.0 / 3.0, dtype=dtype, device=device) + + mask3 = ~mask1 & ~mask2 + temp[mask3] = temp[mask3] - (temp[mask3] ** 3) * (1.0 / 3) + + output_waveform = torch.zeros_like(waveform, dtype=dtype, device=device) + + # Uses CPU optimized loop function if available for CPU device + if device == torch.device("cpu"): + _overdrive_core_loop_cpu(waveform, temp, last_in, last_out, output_waveform) + else: + _overdrive_core_loop_generic(waveform, temp, last_in, last_out, output_waveform) + + return output_waveform.clamp(min=-1, max=1).view(actual_shape) + + +def phaser( + waveform: Tensor, + sample_rate: int, + gain_in: float = 0.4, + gain_out: float = 0.74, + delay_ms: float = 3.0, + decay: float = 0.4, + mod_speed: float = 0.5, + sinusoidal: bool = True, +) -> Tensor: + r"""Apply a phasing effect to the audio. Similar to SoX implementation. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (Tensor): audio waveform of dimension of `(..., time)` + sample_rate (int): sampling rate of the waveform, e.g. 44100 (Hz) + gain_in (float, optional): desired input gain at the boost (or attenuation) in dB + Allowed range of values are 0 to 1 + gain_out (float, optional): desired output gain at the boost (or attenuation) in dB + Allowed range of values are 0 to 1e9 + delay_ms (float, optional): desired delay in milliseconds + Allowed range of values are 0 to 5.0 + decay (float, optional): desired decay relative to gain-in + Allowed range of values are 0 to 0.99 + mod_speed (float, optional): modulation speed in Hz + Allowed range of values are 0.1 to 2 + sinusoidal (bool, optional): If ``True``, uses sinusoidal modulation (preferable for multiple instruments) + If ``False``, uses triangular modulation (gives single instruments a sharper phasing effect) + (Default: ``True``) + + Returns: + Tensor: Waveform of dimension of `(..., time)` + + Reference: + - http://sox.sourceforge.net/sox.html + - Scott Lehman, `Effects Explained`_. + + .. _Effects Explained: + https://web.archive.org/web/20051125072557/http://www.harmony-central.com/Effects/effects-explained.html + """ + actual_shape = waveform.shape + device, dtype = waveform.device, waveform.dtype + + # convert to 2D (channels,time) + waveform = waveform.view(-1, actual_shape[-1]) + + delay_buf_len = int((delay_ms * 0.001 * sample_rate) + 0.5) + delay_buf = torch.zeros(waveform.shape[0], delay_buf_len, dtype=dtype, device=device) + + mod_buf_len = int(sample_rate / mod_speed + 0.5) + + if sinusoidal: + wave_type = "SINE" + else: + wave_type = "TRIANGLE" + + mod_buf = _generate_wave_table( + wave_type=wave_type, + data_type="INT", + table_size=mod_buf_len, + min=1.0, + max=float(delay_buf_len), + phase=math.pi / 2, + device=device, + ) + + delay_pos = 0 + mod_pos = 0 + + output_waveform_pre_gain_list = [] + waveform = waveform * gain_in + delay_buf = delay_buf * decay + waveform_list = [waveform[:, i] for i in range(waveform.size(1))] + delay_buf_list = [delay_buf[:, i] for i in range(delay_buf.size(1))] + mod_buf_list = [mod_buf[i] for i in range(mod_buf.size(0))] + + for i in range(waveform.shape[-1]): + idx = int((delay_pos + mod_buf_list[mod_pos]) % delay_buf_len) + mod_pos = (mod_pos + 1) % mod_buf_len + delay_pos = (delay_pos + 1) % delay_buf_len + temp = (waveform_list[i]) + (delay_buf_list[idx]) + delay_buf_list[delay_pos] = temp * decay + output_waveform_pre_gain_list.append(temp) + + output_waveform = torch.stack(output_waveform_pre_gain_list, dim=1).to(dtype=dtype, device=device) + output_waveform.mul_(gain_out) + + return output_waveform.clamp(min=-1, max=1).view(actual_shape) + + +def riaa_biquad(waveform: Tensor, sample_rate: int) -> Tensor: + r"""Apply RIAA vinyl playback equalization. Similar to SoX implementation. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (Tensor): audio waveform of dimension of `(..., time)` + sample_rate (int): sampling rate of the waveform, e.g. 44100 (Hz). + Allowed sample rates in Hz : ``44100``,``48000``,``88200``,``96000`` + + Returns: + Tensor: Waveform of dimension of `(..., time)` + + Reference: + - http://sox.sourceforge.net/sox.html + - https://www.w3.org/2011/audio/audio-eq-cookbook.html#APF + """ + + if sample_rate == 44100: + zeros = [-0.2014898, 0.9233820] + poles = [0.7083149, 0.9924091] + + elif sample_rate == 48000: + zeros = [-0.1766069, 0.9321590] + poles = [0.7396325, 0.9931330] + + elif sample_rate == 88200: + zeros = [-0.1168735, 0.9648312] + poles = [0.8590646, 0.9964002] + + elif sample_rate == 96000: + zeros = [-0.1141486, 0.9676817] + poles = [0.8699137, 0.9966946] + + else: + raise ValueError("Sample rate must be 44.1k, 48k, 88.2k, or 96k") + + # polynomial coefficients with roots zeros[0] and zeros[1] + b0 = 1.0 + b1 = -(zeros[0] + zeros[1]) + b2 = zeros[0] * zeros[1] + + # polynomial coefficients with roots poles[0] and poles[1] + a0 = 1.0 + a1 = -(poles[0] + poles[1]) + a2 = poles[0] * poles[1] + + # Normalize to 0dB at 1kHz + y = 2 * math.pi * 1000 / sample_rate + b_re = b0 + b1 * math.cos(-y) + b2 * math.cos(-2 * y) + a_re = a0 + a1 * math.cos(-y) + a2 * math.cos(-2 * y) + b_im = b1 * math.sin(-y) + b2 * math.sin(-2 * y) + a_im = a1 * math.sin(-y) + a2 * math.sin(-2 * y) + g = 1 / math.sqrt((b_re**2 + b_im**2) / (a_re**2 + a_im**2)) + + b0 *= g + b1 *= g + b2 *= g + + return biquad(waveform, b0, b1, b2, a0, a1, a2) + + +def treble_biquad( + waveform: Tensor, + sample_rate: int, + gain: float, + central_freq: float = 3000, + Q: float = 0.707, +) -> Tensor: + r"""Design a treble tone-control effect. Similar to SoX implementation. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (Tensor): audio waveform of dimension of `(..., time)` + sample_rate (int): sampling rate of the waveform, e.g. 44100 (Hz) + gain (float or torch.Tensor): desired gain at the boost (or attenuation) in dB. + central_freq (float or torch.Tensor, optional): central frequency (in Hz). (Default: ``3000``) + Q (float or torch.Tensor, optional): https://en.wikipedia.org/wiki/Q_factor (Default: ``0.707``). + + Returns: + Tensor: Waveform of dimension of `(..., time)` + + Reference: + - http://sox.sourceforge.net/sox.html + - https://www.w3.org/2011/audio/audio-eq-cookbook.html#APF + """ + dtype = waveform.dtype + device = waveform.device + central_freq = torch.as_tensor(central_freq, dtype=dtype, device=device) + Q = torch.as_tensor(Q, dtype=dtype, device=device) + gain = torch.as_tensor(gain, dtype=dtype, device=device) + + w0 = 2 * math.pi * central_freq / sample_rate + alpha = torch.sin(w0) / 2 / Q + A = torch.exp(gain / 40 * math.log(10)) + + temp1 = 2 * torch.sqrt(A) * alpha + temp2 = (A - 1) * torch.cos(w0) + temp3 = (A + 1) * torch.cos(w0) + + b0 = A * ((A + 1) + temp2 + temp1) + b1 = -2 * A * ((A - 1) + temp3) + b2 = A * ((A + 1) + temp2 - temp1) + a0 = (A + 1) - temp2 + temp1 + a1 = 2 * ((A - 1) - temp3) + a2 = (A + 1) - temp2 - temp1 + + return biquad(waveform, b0, b1, b2, a0, a1, a2) + + +def _measure( + measure_len_ws: int, + samples: Tensor, + spectrum: Tensor, + noise_spectrum: Tensor, + spectrum_window: Tensor, + spectrum_start: int, + spectrum_end: int, + cepstrum_window: Tensor, + cepstrum_start: int, + cepstrum_end: int, + noise_reduction_amount: float, + measure_smooth_time_mult: float, + noise_up_time_mult: Tensor, + noise_down_time_mult: Tensor, + boot_count: int, +) -> float: + device = samples.device + + if spectrum.size(-1) != noise_spectrum.size(-1): + raise ValueError( + "Expected spectrum size to match noise spectrum size in final dimension." + f"Found: spectrum size: {spectrum.size()}, noise_spectrum size: {noise_spectrum.size()}" + ) + + dft_len_ws = spectrum.size()[-1] + + dftBuf = torch.zeros(dft_len_ws, device=device) + + dftBuf[:measure_len_ws] = samples * spectrum_window[:measure_len_ws] + + # lsx_safe_rdft((int)p->dft_len_ws, 1, c->dftBuf); + _dftBuf = torch.fft.rfft(dftBuf) + + mult: float = boot_count / (1.0 + boot_count) if boot_count >= 0 else measure_smooth_time_mult + + _d = _dftBuf[spectrum_start:spectrum_end].abs() + spectrum[spectrum_start:spectrum_end].mul_(mult).add_(_d * (1 - mult)) + _d = spectrum[spectrum_start:spectrum_end] ** 2 + + _zeros = torch.zeros(spectrum_end - spectrum_start, device=device) + _mult = ( + _zeros + if boot_count >= 0 + else torch.where( + _d > noise_spectrum[spectrum_start:spectrum_end], + noise_up_time_mult, # if + noise_down_time_mult, # else, + ) + ) + + noise_spectrum[spectrum_start:spectrum_end].mul_(_mult).add_(_d * (1 - _mult)) + _d = torch.sqrt( + torch.max( + _zeros, + _d - noise_reduction_amount * noise_spectrum[spectrum_start:spectrum_end], + ), + ) + + _cepstrum_Buf: Tensor = torch.zeros(dft_len_ws >> 1, device=device) + _cepstrum_Buf[spectrum_start:spectrum_end] = _d * cepstrum_window + _cepstrum_Buf[spectrum_end : dft_len_ws >> 1].zero_() + + # lsx_safe_rdft((int)p->dft_len_ws >> 1, 1, c->dftBuf); + _cepstrum_Buf = torch.fft.rfft(_cepstrum_Buf) + + result: float = float(torch.sum(_cepstrum_Buf[cepstrum_start:cepstrum_end].abs().pow(2))) + result = math.log(result / (cepstrum_end - cepstrum_start)) if result > 0 else -math.inf + return max(0, 21 + result) + + +def vad( + waveform: Tensor, + sample_rate: int, + trigger_level: float = 7.0, + trigger_time: float = 0.25, + search_time: float = 1.0, + allowed_gap: float = 0.25, + pre_trigger_time: float = 0.0, + # Fine-tuning parameters + boot_time: float = 0.35, + noise_up_time: float = 0.1, + noise_down_time: float = 0.01, + noise_reduction_amount: float = 1.35, + measure_freq: float = 20.0, + measure_duration: Optional[float] = None, + measure_smooth_time: float = 0.4, + hp_filter_freq: float = 50.0, + lp_filter_freq: float = 6000.0, + hp_lifter_freq: float = 150.0, + lp_lifter_freq: float = 2000.0, +) -> Tensor: + r"""Voice Activity Detector. Similar to SoX implementation. + + .. devices:: CPU CUDA + + .. properties:: TorchScript + + Attempts to trim silence and quiet background sounds from the ends of recordings of speech. + The algorithm currently uses a simple cepstral power measurement to detect voice, + so may be fooled by other things, especially music. + + The effect can trim only from the front of the audio, + so in order to trim from the back, the reverse effect must also be used. + + Args: + waveform (Tensor): Tensor of audio of dimension `(channels, time)` or `(time)` + Tensor of shape `(channels, time)` is treated as a multi-channel recording + of the same event and the resulting output will be trimmed to the earliest + voice activity in any channel. + sample_rate (int): Sample rate of audio signal. + trigger_level (float, optional): The measurement level used to trigger activity detection. + This may need to be cahnged depending on the noise level, signal level, + and other characteristics of the input audio. (Default: 7.0) + trigger_time (float, optional): The time constant (in seconds) + used to help ignore short bursts of sound. (Default: 0.25) + search_time (float, optional): The amount of audio (in seconds) + to search for quieter/shorter bursts of audio to include prior + to the detected trigger point. (Default: 1.0) + allowed_gap (float, optional): The allowed gap (in seconds) between + quieter/shorter bursts of audio to include prior + to the detected trigger point. (Default: 0.25) + pre_trigger_time (float, optional): The amount of audio (in seconds) to preserve + before the trigger point and any found quieter/shorter bursts. (Default: 0.0) + boot_time (float, optional) The algorithm (internally) uses adaptive noise + estimation/reduction in order to detect the start of the wanted audio. + This option sets the time for the initial noise estimate. (Default: 0.35) + noise_up_time (float, optional) Time constant used by the adaptive noise estimator + for when the noise level is increasing. (Default: 0.1) + noise_down_time (float, optional) Time constant used by the adaptive noise estimator + for when the noise level is decreasing. (Default: 0.01) + noise_reduction_amount (float, optional) Amount of noise reduction to use in + the detection algorithm (e.g. 0, 0.5, ...). (Default: 1.35) + measure_freq (float, optional) Frequency of the algorithm's + processing/measurements. (Default: 20.0) + measure_duration: (float, optional) Measurement duration. + (Default: Twice the measurement period; i.e. with overlap.) + measure_smooth_time (float, optional) Time constant used to smooth + spectral measurements. (Default: 0.4) + hp_filter_freq (float, optional) "Brick-wall" frequency of high-pass filter applied + at the input to the detector algorithm. (Default: 50.0) + lp_filter_freq (float, optional) "Brick-wall" frequency of low-pass filter applied + at the input to the detector algorithm. (Default: 6000.0) + hp_lifter_freq (float, optional) "Brick-wall" frequency of high-pass lifter used + in the detector algorithm. (Default: 150.0) + lp_lifter_freq (float, optional) "Brick-wall" frequency of low-pass lifter used + in the detector algorithm. (Default: 2000.0) + + Returns: + Tensor: Tensor of audio of dimension `(..., time)`. + + Reference: + - http://sox.sourceforge.net/sox.html + """ + device = waveform.device + + if waveform.ndim > 2: + warnings.warn( + "Expected input tensor dimension of 1 for single channel" + f" or 2 for multi-channel. Got {waveform.ndim} instead. " + "Batch semantics is not supported. " + "Please refer to https://github.com/pytorch/audio/issues/1348" + " and https://github.com/pytorch/audio/issues/1468." + ) + + measure_duration: float = 2.0 / measure_freq if measure_duration is None else measure_duration + + measure_len_ws = int(sample_rate * measure_duration + 0.5) + measure_len_ns = measure_len_ws + # for (dft_len_ws = 16; dft_len_ws < measure_len_ws; dft_len_ws <<= 1); + dft_len_ws = 16 + while dft_len_ws < measure_len_ws: + dft_len_ws *= 2 + + measure_period_ns = int(sample_rate / measure_freq + 0.5) + measures_len = math.ceil(search_time * measure_freq) + search_pre_trigger_len_ns = measures_len * measure_period_ns + gap_len = int(allowed_gap * measure_freq + 0.5) + + fixed_pre_trigger_len_ns = int(pre_trigger_time * sample_rate + 0.5) + samplesLen_ns = fixed_pre_trigger_len_ns + search_pre_trigger_len_ns + measure_len_ns + + spectrum_window = torch.zeros(measure_len_ws, device=device) + for i in range(measure_len_ws): + # sox.h:741 define SOX_SAMPLE_MIN (sox_sample_t)SOX_INT_MIN(32) + spectrum_window[i] = 2.0 / math.sqrt(float(measure_len_ws)) + # lsx_apply_hann(spectrum_window, (int)measure_len_ws); + spectrum_window *= torch.hann_window(measure_len_ws, device=device, dtype=torch.float) + + spectrum_start: int = int(hp_filter_freq / sample_rate * dft_len_ws + 0.5) + spectrum_start: int = max(spectrum_start, 1) + spectrum_end: int = int(lp_filter_freq / sample_rate * dft_len_ws + 0.5) + spectrum_end: int = min(spectrum_end, dft_len_ws // 2) + + cepstrum_window = torch.zeros(spectrum_end - spectrum_start, device=device) + for i in range(spectrum_end - spectrum_start): + cepstrum_window[i] = 2.0 / math.sqrt(float(spectrum_end) - spectrum_start) + # lsx_apply_hann(cepstrum_window,(int)(spectrum_end - spectrum_start)); + cepstrum_window *= torch.hann_window(spectrum_end - spectrum_start, device=device, dtype=torch.float) + + cepstrum_start = math.ceil(sample_rate * 0.5 / lp_lifter_freq) + cepstrum_end = math.floor(sample_rate * 0.5 / hp_lifter_freq) + cepstrum_end = min(cepstrum_end, dft_len_ws // 4) + + if cepstrum_end <= cepstrum_start: + raise ValueError( + "Expected cepstrum_start to be smaller than cepstrum_end." + f"Found: cepstrum_start: {cepstrum_start}, cepstrum_end: {cepstrum_end}." + ) + + noise_up_time_mult = torch.tensor(math.exp(-1.0 / (noise_up_time * measure_freq)), device=device) + noise_down_time_mult = torch.tensor(math.exp(-1.0 / (noise_down_time * measure_freq)), device=device) + measure_smooth_time_mult = math.exp(-1.0 / (measure_smooth_time * measure_freq)) + trigger_meas_time_mult = math.exp(-1.0 / (trigger_time * measure_freq)) + + boot_count_max = int(boot_time * measure_freq - 0.5) + boot_count = measures_index = flushedLen_ns = 0 + + # pack batch + shape = waveform.size() + waveform = waveform.view(-1, shape[-1]) + + n_channels, ilen = waveform.size() + + mean_meas = torch.zeros(n_channels, device=device) + spectrum = torch.zeros(n_channels, dft_len_ws, device=device) + noise_spectrum = torch.zeros(n_channels, dft_len_ws, device=device) + measures = torch.zeros(n_channels, measures_len, device=device) + + has_triggered: bool = False + num_measures_to_flush: int = 0 + + pos = 0 + for pos in range(measure_len_ns, ilen, measure_period_ns): + for i in range(n_channels): + meas: float = _measure( + measure_len_ws=measure_len_ws, + samples=waveform[i, pos - measure_len_ws : pos], + spectrum=spectrum[i], + noise_spectrum=noise_spectrum[i], + spectrum_window=spectrum_window, + spectrum_start=spectrum_start, + spectrum_end=spectrum_end, + cepstrum_window=cepstrum_window, + cepstrum_start=cepstrum_start, + cepstrum_end=cepstrum_end, + noise_reduction_amount=noise_reduction_amount, + measure_smooth_time_mult=measure_smooth_time_mult, + noise_up_time_mult=noise_up_time_mult, + noise_down_time_mult=noise_down_time_mult, + boot_count=boot_count, + ) + measures[i, measures_index] = meas + mean_meas[i] = mean_meas[i] * trigger_meas_time_mult + meas * (1.0 - trigger_meas_time_mult) + + has_triggered = has_triggered or (mean_meas[i] >= trigger_level) + if has_triggered: + n: int = measures_len + k: int = measures_index + jTrigger: int = n + jZero: int = n + j: int = 0 + + for j in range(n): + if (measures[i, k] >= trigger_level) and (j <= jTrigger + gap_len): + jZero = jTrigger = j + elif (measures[i, k] == 0) and (jTrigger >= jZero): + jZero = j + k = (k + n - 1) % n + j = min(j, jZero) + # num_measures_to_flush = range_limit(j, num_measures_to_flush, n); + num_measures_to_flush = min(max(num_measures_to_flush, j), n) + # end if has_triggered + # end for channel + measures_index += 1 + measures_index = measures_index % measures_len + if boot_count >= 0: + boot_count = -1 if boot_count == boot_count_max else boot_count + 1 + + if has_triggered: + flushedLen_ns = (measures_len - num_measures_to_flush) * measure_period_ns + break + # end for window + if not has_triggered and shape[-1] >= fixed_pre_trigger_len_ns: + return waveform[..., :fixed_pre_trigger_len_ns].view(shape[:-1] + torch.Size([fixed_pre_trigger_len_ns])) + + res = waveform[:, max(pos - samplesLen_ns + flushedLen_ns, 0) :] + # unpack batch + return res.view(shape[:-1] + res.shape[-1:]) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/functional/functional.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/functional/functional.py new file mode 100644 index 0000000000000000000000000000000000000000..cf9967c8f24d0bb74e95698d9a6756510c7ed1e6 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/functional/functional.py @@ -0,0 +1,2499 @@ +# -*- coding: utf-8 -*- + +import math +import warnings +from collections.abc import Sequence +from typing import List, Optional, Tuple, Union + +import torch +import torchaudio +from torch import Tensor + +from .filtering import highpass_biquad, treble_biquad + +__all__ = [ + "spectrogram", + "inverse_spectrogram", + "griffinlim", + "amplitude_to_DB", + "DB_to_amplitude", + "compute_deltas", + "melscale_fbanks", + "linear_fbanks", + "create_dct", + "compute_deltas", + "detect_pitch_frequency", + "DB_to_amplitude", + "mu_law_encoding", + "mu_law_decoding", + "phase_vocoder", + "mask_along_axis", + "mask_along_axis_iid", + "sliding_window_cmn", + "spectral_centroid", + "resample", + "edit_distance", + "loudness", + "pitch_shift", + "rnnt_loss", + "psd", + "mvdr_weights_souden", + "mvdr_weights_rtf", + "rtf_evd", + "rtf_power", + "apply_beamforming", + "fftconvolve", + "convolve", + "add_noise", + "speed", + "preemphasis", + "deemphasis", +] + + +def spectrogram( + waveform: Tensor, + pad: int, + window: Tensor, + n_fft: int, + hop_length: int, + win_length: int, + power: Optional[float], + normalized: Union[bool, str], + center: bool = True, + pad_mode: str = "reflect", + onesided: bool = True, + return_complex: Optional[bool] = None, +) -> Tensor: + r"""Create a spectrogram or a batch of spectrograms from a raw audio signal. + The spectrogram can be either magnitude-only or complex. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (Tensor): Tensor of audio of dimension `(..., time)` + pad (int): Two sided padding of signal + window (Tensor): Window tensor that is applied/multiplied to each frame/window + n_fft (int): Size of FFT + hop_length (int): Length of hop between STFT windows + win_length (int): Window size + power (float or None): Exponent for the magnitude spectrogram, + (must be > 0) e.g., 1 for magnitude, 2 for power, etc. + If None, then the complex spectrum is returned instead. + normalized (bool or str): Whether to normalize by magnitude after stft. If input is str, choices are + ``"window"`` and ``"frame_length"``, if specific normalization type is desirable. ``True`` maps to + ``"window"``. When normalized on ``"window"``, waveform is normalized upon the window's L2 energy. If + normalized on ``"frame_length"``, waveform is normalized by dividing by + :math:`(\text{frame\_length})^{0.5}`. + center (bool, optional): whether to pad :attr:`waveform` on both sides so + that the :math:`t`-th frame is centered at time :math:`t \times \text{hop\_length}`. + Default: ``True`` + pad_mode (string, optional): controls the padding method used when + :attr:`center` is ``True``. Default: ``"reflect"`` + onesided (bool, optional): controls whether to return half of results to + avoid redundancy. Default: ``True`` + return_complex (bool, optional): + Deprecated and not used. + + Returns: + Tensor: Dimension `(..., freq, time)`, freq is + ``n_fft // 2 + 1`` and ``n_fft`` is the number of + Fourier bins, and time is the number of window hops (n_frame). + """ + if return_complex is not None: + warnings.warn( + "`return_complex` argument is now deprecated and is not effective." + "`torchaudio.functional.spectrogram(power=None)` always returns a tensor with " + "complex dtype. Please remove the argument in the function call." + ) + + if pad > 0: + # TODO add "with torch.no_grad():" back when JIT supports it + waveform = torch.nn.functional.pad(waveform, (pad, pad), "constant") + + frame_length_norm, window_norm = _get_spec_norms(normalized) + + # pack batch + shape = waveform.size() + waveform = waveform.reshape(-1, shape[-1]) + + # default values are consistent with librosa.core.spectrum._spectrogram + spec_f = torch.stft( + input=waveform, + n_fft=n_fft, + hop_length=hop_length, + win_length=win_length, + window=window, + center=center, + pad_mode=pad_mode, + normalized=frame_length_norm, + onesided=onesided, + return_complex=True, + ) + + # unpack batch + spec_f = spec_f.reshape(shape[:-1] + spec_f.shape[-2:]) + + if window_norm: + spec_f /= window.pow(2.0).sum().sqrt() + if power is not None: + if power == 1.0: + return spec_f.abs() + return spec_f.abs().pow(power) + return spec_f + + +def inverse_spectrogram( + spectrogram: Tensor, + length: Optional[int], + pad: int, + window: Tensor, + n_fft: int, + hop_length: int, + win_length: int, + normalized: Union[bool, str], + center: bool = True, + pad_mode: str = "reflect", + onesided: bool = True, +) -> Tensor: + r"""Create an inverse spectrogram or a batch of inverse spectrograms from the provided + complex-valued spectrogram. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + spectrogram (Tensor): Complex tensor of audio of dimension (..., freq, time). + length (int or None): The output length of the waveform. + pad (int): Two sided padding of signal. It is only effective when ``length`` is provided. + window (Tensor): Window tensor that is applied/multiplied to each frame/window + n_fft (int): Size of FFT + hop_length (int): Length of hop between STFT windows + win_length (int): Window size + normalized (bool or str): Whether the stft output was normalized by magnitude. If input is str, choices are + ``"window"`` and ``"frame_length"``, dependent on normalization mode. ``True`` maps to + ``"window"``. + center (bool, optional): whether the waveform was padded on both sides so + that the :math:`t`-th frame is centered at time :math:`t \times \text{hop\_length}`. + Default: ``True`` + pad_mode (string, optional): controls the padding method used when + :attr:`center` is ``True``. This parameter is provided for compatibility with the + spectrogram function and is not used. Default: ``"reflect"`` + onesided (bool, optional): controls whether spectrogram was done in onesided mode. + Default: ``True`` + + Returns: + Tensor: Dimension `(..., time)`. Least squares estimation of the original signal. + """ + + frame_length_norm, window_norm = _get_spec_norms(normalized) + + if not spectrogram.is_complex(): + raise ValueError("Expected `spectrogram` to be complex dtype.") + + if window_norm: + spectrogram = spectrogram * window.pow(2.0).sum().sqrt() + + # pack batch + shape = spectrogram.size() + spectrogram = spectrogram.reshape(-1, shape[-2], shape[-1]) + + # default values are consistent with librosa.core.spectrum._spectrogram + waveform = torch.istft( + input=spectrogram, + n_fft=n_fft, + hop_length=hop_length, + win_length=win_length, + window=window, + center=center, + normalized=frame_length_norm, + onesided=onesided, + length=length + 2 * pad if length is not None else None, + return_complex=False, + ) + + if length is not None and pad > 0: + # remove padding from front and back + waveform = waveform[:, pad:-pad] + + # unpack batch + waveform = waveform.reshape(shape[:-2] + waveform.shape[-1:]) + + return waveform + + +def _get_spec_norms(normalized: Union[str, bool]): + frame_length_norm, window_norm = False, False + if torch.jit.isinstance(normalized, str): + if normalized not in ["frame_length", "window"]: + raise ValueError("Invalid normalized parameter: {}".format(normalized)) + if normalized == "frame_length": + frame_length_norm = True + elif normalized == "window": + window_norm = True + elif torch.jit.isinstance(normalized, bool): + if normalized: + window_norm = True + else: + raise TypeError("Input type not supported") + return frame_length_norm, window_norm + + +def _get_complex_dtype(real_dtype: torch.dtype): + if real_dtype == torch.double: + return torch.cdouble + if real_dtype == torch.float: + return torch.cfloat + if real_dtype == torch.half: + return torch.complex32 + raise ValueError(f"Unexpected dtype {real_dtype}") + + +def griffinlim( + specgram: Tensor, + window: Tensor, + n_fft: int, + hop_length: int, + win_length: int, + power: float, + n_iter: int, + momentum: float, + length: Optional[int], + rand_init: bool, +) -> Tensor: + r"""Compute waveform from a linear scale magnitude spectrogram using the Griffin-Lim transformation. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Implementation ported from + *librosa* :cite:`brian_mcfee-proc-scipy-2015`, *A fast Griffin-Lim algorithm* :cite:`6701851` + and *Signal estimation from modified short-time Fourier transform* :cite:`1172092`. + + Args: + specgram (Tensor): A magnitude-only STFT spectrogram of dimension `(..., freq, frames)` + where freq is ``n_fft // 2 + 1``. + window (Tensor): Window tensor that is applied/multiplied to each frame/window + n_fft (int): Size of FFT, creates ``n_fft // 2 + 1`` bins + hop_length (int): Length of hop between STFT windows. ( + Default: ``win_length // 2``) + win_length (int): Window size. (Default: ``n_fft``) + power (float): Exponent for the magnitude spectrogram, + (must be > 0) e.g., 1 for magnitude, 2 for power, etc. + n_iter (int): Number of iteration for phase recovery process. + momentum (float): The momentum parameter for fast Griffin-Lim. + Setting this to 0 recovers the original Griffin-Lim method. + Values near 1 can lead to faster convergence, but above 1 may not converge. + length (int or None): Array length of the expected output. + rand_init (bool): Initializes phase randomly if True, to zero otherwise. + + Returns: + Tensor: waveform of `(..., time)`, where time equals the ``length`` parameter if given. + """ + if not 0 <= momentum < 1: + raise ValueError("momentum must be in range [0, 1). Found: {}".format(momentum)) + + momentum = momentum / (1 + momentum) + + # pack batch + shape = specgram.size() + specgram = specgram.reshape([-1] + list(shape[-2:])) + + specgram = specgram.pow(1 / power) + + # initialize the phase + if rand_init: + angles = torch.rand(specgram.size(), dtype=_get_complex_dtype(specgram.dtype), device=specgram.device) + else: + angles = torch.full(specgram.size(), 1, dtype=_get_complex_dtype(specgram.dtype), device=specgram.device) + + # And initialize the previous iterate to 0 + tprev = torch.tensor(0.0, dtype=specgram.dtype, device=specgram.device) + for _ in range(n_iter): + # Invert with our current estimate of the phases + inverse = torch.istft( + specgram * angles, n_fft=n_fft, hop_length=hop_length, win_length=win_length, window=window, length=length + ) + + # Rebuild the spectrogram + rebuilt = torch.stft( + input=inverse, + n_fft=n_fft, + hop_length=hop_length, + win_length=win_length, + window=window, + center=True, + pad_mode="reflect", + normalized=False, + onesided=True, + return_complex=True, + ) + + # Update our phase estimates + angles = rebuilt + if momentum: + angles = angles - tprev.mul_(momentum) + angles = angles.div(angles.abs().add(1e-16)) + + # Store the previous iterate + tprev = rebuilt + + # Return the final phase estimates + waveform = torch.istft( + specgram * angles, n_fft=n_fft, hop_length=hop_length, win_length=win_length, window=window, length=length + ) + + # unpack batch + waveform = waveform.reshape(shape[:-2] + waveform.shape[-1:]) + + return waveform + + +def amplitude_to_DB( + x: Tensor, multiplier: float, amin: float, db_multiplier: float, top_db: Optional[float] = None +) -> Tensor: + r"""Turn a spectrogram from the power/amplitude scale to the decibel scale. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + The output of each tensor in a batch depends on the maximum value of that tensor, + and so may return different values for an audio clip split into snippets vs. a full clip. + + Args: + + x (Tensor): Input spectrogram(s) before being converted to decibel scale. + The expected shapes are ``(freq, time)``, ``(channel, freq, time)`` or + ``(..., batch, channel, freq, time)``. + + .. note:: + + When ``top_db`` is specified, cut-off values are computed for each audio + in the batch. Therefore if the input shape is 4D (or larger), different + cut-off values are used for audio data in the batch. + If the input shape is 2D or 3D, a single cutoff value is used. + + multiplier (float): Use 10. for power and 20. for amplitude + amin (float): Number to clamp ``x`` + db_multiplier (float): Log10(max(reference value and amin)) + top_db (float or None, optional): Minimum negative cut-off in decibels. A reasonable number + is 80. (Default: ``None``) + + Returns: + Tensor: Output tensor in decibel scale + """ + x_db = multiplier * torch.log10(torch.clamp(x, min=amin)) + x_db -= multiplier * db_multiplier + + if top_db is not None: + # Expand batch + shape = x_db.size() + packed_channels = shape[-3] if x_db.dim() > 2 else 1 + x_db = x_db.reshape(-1, packed_channels, shape[-2], shape[-1]) + + x_db = torch.max(x_db, (x_db.amax(dim=(-3, -2, -1)) - top_db).view(-1, 1, 1, 1)) + + # Repack batch + x_db = x_db.reshape(shape) + + return x_db + + +def DB_to_amplitude(x: Tensor, ref: float, power: float) -> Tensor: + r"""Turn a tensor from the decibel scale to the power/amplitude scale. + + .. devices:: CPU CUDA + + .. properties:: TorchScript + + Args: + x (Tensor): Input tensor before being converted to power/amplitude scale. + ref (float): Reference which the output will be scaled by. + power (float): If power equals 1, will compute DB to power. If 0.5, will compute DB to amplitude. + + Returns: + Tensor: Output tensor in power/amplitude scale. + """ + return ref * torch.pow(torch.pow(10.0, 0.1 * x), power) + + +def _hz_to_mel(freq: float, mel_scale: str = "htk") -> float: + r"""Convert Hz to Mels. + + Args: + freqs (float): Frequencies in Hz + mel_scale (str, optional): Scale to use: ``htk`` or ``slaney``. (Default: ``htk``) + + Returns: + mels (float): Frequency in Mels + """ + + if mel_scale not in ["slaney", "htk"]: + raise ValueError('mel_scale should be one of "htk" or "slaney".') + + if mel_scale == "htk": + return 2595.0 * math.log10(1.0 + (freq / 700.0)) + + # Fill in the linear part + f_min = 0.0 + f_sp = 200.0 / 3 + + mels = (freq - f_min) / f_sp + + # Fill in the log-scale part + min_log_hz = 1000.0 + min_log_mel = (min_log_hz - f_min) / f_sp + logstep = math.log(6.4) / 27.0 + + if freq >= min_log_hz: + mels = min_log_mel + math.log(freq / min_log_hz) / logstep + + return mels + + +def _mel_to_hz(mels: Tensor, mel_scale: str = "htk") -> Tensor: + """Convert mel bin numbers to frequencies. + + Args: + mels (Tensor): Mel frequencies + mel_scale (str, optional): Scale to use: ``htk`` or ``slaney``. (Default: ``htk``) + + Returns: + freqs (Tensor): Mels converted in Hz + """ + + if mel_scale not in ["slaney", "htk"]: + raise ValueError('mel_scale should be one of "htk" or "slaney".') + + if mel_scale == "htk": + return 700.0 * (10.0 ** (mels / 2595.0) - 1.0) + + # Fill in the linear scale + f_min = 0.0 + f_sp = 200.0 / 3 + freqs = f_min + f_sp * mels + + # And now the nonlinear scale + min_log_hz = 1000.0 + min_log_mel = (min_log_hz - f_min) / f_sp + logstep = math.log(6.4) / 27.0 + + log_t = mels >= min_log_mel + freqs[log_t] = min_log_hz * torch.exp(logstep * (mels[log_t] - min_log_mel)) + + return freqs + + +def _create_triangular_filterbank( + all_freqs: Tensor, + f_pts: Tensor, +) -> Tensor: + """Create a triangular filter bank. + + Args: + all_freqs (Tensor): STFT freq points of size (`n_freqs`). + f_pts (Tensor): Filter mid points of size (`n_filter`). + + Returns: + fb (Tensor): The filter bank of size (`n_freqs`, `n_filter`). + """ + # Adopted from Librosa + # calculate the difference between each filter mid point and each stft freq point in hertz + f_diff = f_pts[1:] - f_pts[:-1] # (n_filter + 1) + slopes = f_pts.unsqueeze(0) - all_freqs.unsqueeze(1) # (n_freqs, n_filter + 2) + # create overlapping triangles + zero = torch.zeros(1) + down_slopes = (-1.0 * slopes[:, :-2]) / f_diff[:-1] # (n_freqs, n_filter) + up_slopes = slopes[:, 2:] / f_diff[1:] # (n_freqs, n_filter) + fb = torch.max(zero, torch.min(down_slopes, up_slopes)) + + return fb + + +def melscale_fbanks( + n_freqs: int, + f_min: float, + f_max: float, + n_mels: int, + sample_rate: int, + norm: Optional[str] = None, + mel_scale: str = "htk", +) -> Tensor: + r"""Create a frequency bin conversion matrix. + + .. devices:: CPU + + .. properties:: TorchScript + + Note: + For the sake of the numerical compatibility with librosa, not all the coefficients + in the resulting filter bank has magnitude of 1. + + .. image:: https://download.pytorch.org/torchaudio/doc-assets/mel_fbanks.png + :alt: Visualization of generated filter bank + + Args: + n_freqs (int): Number of frequencies to highlight/apply + f_min (float): Minimum frequency (Hz) + f_max (float): Maximum frequency (Hz) + n_mels (int): Number of mel filterbanks + sample_rate (int): Sample rate of the audio waveform + norm (str or None, optional): If "slaney", divide the triangular mel weights by the width of the mel band + (area normalization). (Default: ``None``) + mel_scale (str, optional): Scale to use: ``htk`` or ``slaney``. (Default: ``htk``) + + Returns: + Tensor: Triangular filter banks (fb matrix) of size (``n_freqs``, ``n_mels``) + meaning number of frequencies to highlight/apply to x the number of filterbanks. + Each column is a filterbank so that assuming there is a matrix A of + size (..., ``n_freqs``), the applied result would be + ``A @ melscale_fbanks(A.size(-1), ...)``. + + """ + + if norm is not None and norm != "slaney": + raise ValueError('norm must be one of None or "slaney"') + + # freq bins + all_freqs = torch.linspace(0, sample_rate // 2, n_freqs) + + # calculate mel freq bins + m_min = _hz_to_mel(f_min, mel_scale=mel_scale) + m_max = _hz_to_mel(f_max, mel_scale=mel_scale) + + m_pts = torch.linspace(m_min, m_max, n_mels + 2) + f_pts = _mel_to_hz(m_pts, mel_scale=mel_scale) + + # create filterbank + fb = _create_triangular_filterbank(all_freqs, f_pts) + + if norm is not None and norm == "slaney": + # Slaney-style mel is scaled to be approx constant energy per channel + enorm = 2.0 / (f_pts[2 : n_mels + 2] - f_pts[:n_mels]) + fb *= enorm.unsqueeze(0) + + if (fb.max(dim=0).values == 0.0).any(): + warnings.warn( + "At least one mel filterbank has all zero values. " + f"The value for `n_mels` ({n_mels}) may be set too high. " + f"Or, the value for `n_freqs` ({n_freqs}) may be set too low." + ) + + return fb + + +def linear_fbanks( + n_freqs: int, + f_min: float, + f_max: float, + n_filter: int, + sample_rate: int, +) -> Tensor: + r"""Creates a linear triangular filterbank. + + .. devices:: CPU + + .. properties:: TorchScript + + Note: + For the sake of the numerical compatibility with librosa, not all the coefficients + in the resulting filter bank has magnitude of 1. + + .. image:: https://download.pytorch.org/torchaudio/doc-assets/lin_fbanks.png + :alt: Visualization of generated filter bank + + Args: + n_freqs (int): Number of frequencies to highlight/apply + f_min (float): Minimum frequency (Hz) + f_max (float): Maximum frequency (Hz) + n_filter (int): Number of (linear) triangular filter + sample_rate (int): Sample rate of the audio waveform + + Returns: + Tensor: Triangular filter banks (fb matrix) of size (``n_freqs``, ``n_filter``) + meaning number of frequencies to highlight/apply to x the number of filterbanks. + Each column is a filterbank so that assuming there is a matrix A of + size (..., ``n_freqs``), the applied result would be + ``A * linear_fbanks(A.size(-1), ...)``. + """ + # freq bins + all_freqs = torch.linspace(0, sample_rate // 2, n_freqs) + + # filter mid-points + f_pts = torch.linspace(f_min, f_max, n_filter + 2) + + # create filterbank + fb = _create_triangular_filterbank(all_freqs, f_pts) + + return fb + + +def create_dct(n_mfcc: int, n_mels: int, norm: Optional[str]) -> Tensor: + r"""Create a DCT transformation matrix with shape (``n_mels``, ``n_mfcc``), + normalized depending on norm. + + .. devices:: CPU + + .. properties:: TorchScript + + Args: + n_mfcc (int): Number of mfc coefficients to retain + n_mels (int): Number of mel filterbanks + norm (str or None): Norm to use (either "ortho" or None) + + Returns: + Tensor: The transformation matrix, to be right-multiplied to + row-wise data of size (``n_mels``, ``n_mfcc``). + """ + + if norm is not None and norm != "ortho": + raise ValueError('norm must be either "ortho" or None') + + # http://en.wikipedia.org/wiki/Discrete_cosine_transform#DCT-II + n = torch.arange(float(n_mels)) + k = torch.arange(float(n_mfcc)).unsqueeze(1) + dct = torch.cos(math.pi / float(n_mels) * (n + 0.5) * k) # size (n_mfcc, n_mels) + + if norm is None: + dct *= 2.0 + else: + dct[0] *= 1.0 / math.sqrt(2.0) + dct *= math.sqrt(2.0 / float(n_mels)) + return dct.t() + + +def mu_law_encoding(x: Tensor, quantization_channels: int) -> Tensor: + r"""Encode signal based on mu-law companding. + + .. devices:: CPU CUDA + + .. properties:: TorchScript + + For more info see the + `Wikipedia Entry `_ + + This algorithm expects the signal has been scaled to between -1 and 1 and + returns a signal encoded with values from 0 to quantization_channels - 1. + + Args: + x (Tensor): Input tensor + quantization_channels (int): Number of channels + + Returns: + Tensor: Input after mu-law encoding + """ + mu = quantization_channels - 1.0 + if not x.is_floating_point(): + warnings.warn( + "The input Tensor must be of floating type. \ + This will be an error in the v0.12 release." + ) + x = x.to(torch.float) + mu = torch.tensor(mu, dtype=x.dtype) + x_mu = torch.sign(x) * torch.log1p(mu * torch.abs(x)) / torch.log1p(mu) + x_mu = ((x_mu + 1) / 2 * mu + 0.5).to(torch.int64) + return x_mu + + +def mu_law_decoding(x_mu: Tensor, quantization_channels: int) -> Tensor: + r"""Decode mu-law encoded signal. + + .. devices:: CPU CUDA + + .. properties:: TorchScript + + For more info see the + `Wikipedia Entry `_ + + This expects an input with values between 0 and quantization_channels - 1 + and returns a signal scaled between -1 and 1. + + Args: + x_mu (Tensor): Input tensor + quantization_channels (int): Number of channels + + Returns: + Tensor: Input after mu-law decoding + """ + mu = quantization_channels - 1.0 + if not x_mu.is_floating_point(): + x_mu = x_mu.to(torch.float) + mu = torch.tensor(mu, dtype=x_mu.dtype) + x = ((x_mu) / mu) * 2 - 1.0 + x = torch.sign(x) * (torch.exp(torch.abs(x) * torch.log1p(mu)) - 1.0) / mu + return x + + +def phase_vocoder(complex_specgrams: Tensor, rate: float, phase_advance: Tensor) -> Tensor: + r"""Given a STFT tensor, speed up in time without modifying pitch by a factor of ``rate``. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + complex_specgrams (Tensor): + A tensor of dimension `(..., freq, num_frame)` with complex dtype. + rate (float): Speed-up factor + phase_advance (Tensor): Expected phase advance in each bin. Dimension of `(freq, 1)` + + Returns: + Tensor: + Stretched spectrogram. The resulting tensor is of the same dtype as the input + spectrogram, but the number of frames is changed to ``ceil(num_frame / rate)``. + + Example + >>> freq, hop_length = 1025, 512 + >>> # (channel, freq, time) + >>> complex_specgrams = torch.randn(2, freq, 300, dtype=torch.cfloat) + >>> rate = 1.3 # Speed up by 30% + >>> phase_advance = torch.linspace( + >>> 0, math.pi * hop_length, freq)[..., None] + >>> x = phase_vocoder(complex_specgrams, rate, phase_advance) + >>> x.shape # with 231 == ceil(300 / 1.3) + torch.Size([2, 1025, 231]) + """ + if rate == 1.0: + return complex_specgrams + + # pack batch + shape = complex_specgrams.size() + complex_specgrams = complex_specgrams.reshape([-1] + list(shape[-2:])) + + # Figures out the corresponding real dtype, i.e. complex128 -> float64, complex64 -> float32 + # Note torch.real is a view so it does not incur any memory copy. + real_dtype = torch.real(complex_specgrams).dtype + time_steps = torch.arange(0, complex_specgrams.size(-1), rate, device=complex_specgrams.device, dtype=real_dtype) + + alphas = time_steps % 1.0 + phase_0 = complex_specgrams[..., :1].angle() + + # Time Padding + complex_specgrams = torch.nn.functional.pad(complex_specgrams, [0, 2]) + + # (new_bins, freq, 2) + complex_specgrams_0 = complex_specgrams.index_select(-1, time_steps.long()) + complex_specgrams_1 = complex_specgrams.index_select(-1, (time_steps + 1).long()) + + angle_0 = complex_specgrams_0.angle() + angle_1 = complex_specgrams_1.angle() + + norm_0 = complex_specgrams_0.abs() + norm_1 = complex_specgrams_1.abs() + + phase = angle_1 - angle_0 - phase_advance + phase = phase - 2 * math.pi * torch.round(phase / (2 * math.pi)) + + # Compute Phase Accum + phase = phase + phase_advance + phase = torch.cat([phase_0, phase[..., :-1]], dim=-1) + phase_acc = torch.cumsum(phase, -1) + + mag = alphas * norm_1 + (1 - alphas) * norm_0 + + complex_specgrams_stretch = torch.polar(mag, phase_acc) + + # unpack batch + complex_specgrams_stretch = complex_specgrams_stretch.reshape(shape[:-2] + complex_specgrams_stretch.shape[1:]) + return complex_specgrams_stretch + + +def _get_mask_param(mask_param: int, p: float, axis_length: int) -> int: + if p == 1.0: + return mask_param + else: + return min(mask_param, int(axis_length * p)) + + +def mask_along_axis_iid( + specgrams: Tensor, + mask_param: int, + mask_value: Union[float, Tensor], + axis: int, + p: float = 1.0, +) -> Tensor: + r"""Apply a mask along ``axis``. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Mask will be applied from indices ``[v_0, v_0 + v)``, + where ``v`` is sampled from ``uniform(0, max_v)`` and + ``v_0`` from ``uniform(0, specgrams.size(axis) - v)``, + with ``max_v = mask_param`` when ``p = 1.0`` and + ``max_v = min(mask_param, floor(specgrams.size(axis) * p))`` otherwise. + + Args: + specgrams (Tensor): Real spectrograms `(..., freq, time)`, with at least 3 dimensions. + mask_param (int): Number of columns to be masked will be uniformly sampled from [0, mask_param] + mask_value (float): Value to assign to the masked columns + axis (int): Axis to apply masking on, which should be the one of the last two dimensions. + p (float, optional): maximum proportion of columns that can be masked. (Default: 1.0) + + Returns: + Tensor: Masked spectrograms with the same dimensions as input specgrams Tensor` + """ + + dim = specgrams.dim() + + if dim < 3: + raise ValueError(f"Spectrogram must have at least three dimensions ({dim} given).") + + if axis not in [dim - 2, dim - 1]: + raise ValueError( + f"Only Frequency and Time masking are supported (axis {dim-2} and axis {dim-1} supported; {axis} given)." + ) + + if not 0.0 <= p <= 1.0: + raise ValueError(f"The value of p must be between 0.0 and 1.0 ({p} given).") + + mask_param = _get_mask_param(mask_param, p, specgrams.shape[axis]) + if mask_param < 1: + return specgrams + + device = specgrams.device + dtype = specgrams.dtype + + value = torch.rand(specgrams.shape[: (dim - 2)], device=device, dtype=dtype) * mask_param + min_value = torch.rand(specgrams.shape[: (dim - 2)], device=device, dtype=dtype) * (specgrams.size(axis) - value) + + # Create broadcastable mask + mask_start = min_value.long()[..., None, None] + mask_end = (min_value.long() + value.long())[..., None, None] + mask = torch.arange(0, specgrams.size(axis), device=device, dtype=dtype) + + # Per batch example masking + specgrams = specgrams.transpose(axis, -1) + # this aims to avoid CPU-GPU sync from upstream + specgrams = ( + torch.where((mask >= mask_start) & (mask < mask_end), mask_value.repeat(specgrams.shape), specgrams) + if isinstance(mask_value, Tensor) + else specgrams.masked_fill((mask >= mask_start) & (mask < mask_end), mask_value) + ) + specgrams = specgrams.transpose(axis, -1) + + return specgrams + + +def mask_along_axis( + specgram: Tensor, + mask_param: int, + mask_value: float, + axis: int, + p: float = 1.0, +) -> Tensor: + r"""Apply a mask along ``axis``. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Mask will be applied from indices ``[v_0, v_0 + v)``, + where ``v`` is sampled from ``uniform(0, max_v)`` and + ``v_0`` from ``uniform(0, specgram.size(axis) - v)``, with + ``max_v = mask_param`` when ``p = 1.0`` and + ``max_v = min(mask_param, floor(specgram.size(axis) * p))`` + otherwise. + All examples will have the same mask interval. + + Args: + specgram (Tensor): Real spectrograms `(..., freq, time)`, with at least 2 dimensions. + mask_param (int): Number of columns to be masked will be uniformly sampled from [0, mask_param] + mask_value (float): Value to assign to the masked columns + axis (int): Axis to apply masking on, which should be the one of the last two dimensions. + p (float, optional): maximum proportion of columns that can be masked. (Default: 1.0) + + Returns: + Tensor: Masked spectrograms with the same dimensions as input specgram Tensor + """ + dim = specgram.dim() + + if dim < 2: + raise ValueError(f"Spectrogram must have at least two dimensions (time and frequency) ({dim} given).") + + if axis not in [dim - 2, dim - 1]: + raise ValueError( + f"Only Frequency and Time masking are supported (axis {dim-2} and axis {dim-1} supported; {axis} given)." + ) + + if not 0.0 <= p <= 1.0: + raise ValueError(f"The value of p must be between 0.0 and 1.0 ({p} given).") + + mask_param = _get_mask_param(mask_param, p, specgram.shape[axis]) + if mask_param < 1: + return specgram + + # pack batch + shape = specgram.size() + specgram = specgram.reshape([-1] + list(shape[-2:])) + # After packing, specgram is a 3D tensor, and the axis corresponding to the to-be-masked dimension + # is now (axis - dim + 3), e.g. a tensor of shape (10, 2, 50, 10, 2) becomes a tensor of shape (1000, 10, 2). + value = torch.rand(1) * mask_param + min_value = torch.rand(1) * (specgram.size(axis - dim + 3) - value) + + mask_start = (min_value.long()).squeeze() + mask_end = (min_value.long() + value.long()).squeeze() + mask = torch.arange(0, specgram.shape[axis - dim + 3], device=specgram.device, dtype=specgram.dtype) + mask = (mask >= mask_start) & (mask < mask_end) + # unsqueeze the mask if the axis is frequency + if axis == dim - 2: + mask = mask.unsqueeze(-1) + + if mask_end - mask_start >= mask_param: + raise ValueError("Number of columns to be masked should be less than mask_param") + + specgram = specgram.masked_fill(mask, mask_value) + + # unpack batch + specgram = specgram.reshape(shape[:-2] + specgram.shape[-2:]) + + return specgram + + +def compute_deltas(specgram: Tensor, win_length: int = 5, mode: str = "replicate") -> Tensor: + r"""Compute delta coefficients of a tensor, usually a spectrogram: + + .. devices:: CPU CUDA + + .. properties:: TorchScript + + .. math:: + d_t = \frac{\sum_{n=1}^{\text{N}} n (c_{t+n} - c_{t-n})}{2 \sum_{n=1}^{\text{N}} n^2} + + where :math:`d_t` is the deltas at time :math:`t`, + :math:`c_t` is the spectrogram coeffcients at time :math:`t`, + :math:`N` is ``(win_length-1)//2``. + + Args: + specgram (Tensor): Tensor of audio of dimension `(..., freq, time)` + win_length (int, optional): The window length used for computing delta (Default: ``5``) + mode (str, optional): Mode parameter passed to padding (Default: ``"replicate"``) + + Returns: + Tensor: Tensor of deltas of dimension `(..., freq, time)` + + Example + >>> specgram = torch.randn(1, 40, 1000) + >>> delta = compute_deltas(specgram) + >>> delta2 = compute_deltas(delta) + """ + device = specgram.device + dtype = specgram.dtype + + # pack batch + shape = specgram.size() + specgram = specgram.reshape(1, -1, shape[-1]) + + if win_length < 3: + raise ValueError(f"Window length should be greater than or equal to 3. Found win_length {win_length}") + + n = (win_length - 1) // 2 + + # twice sum of integer squared + denom = n * (n + 1) * (2 * n + 1) / 3 + + specgram = torch.nn.functional.pad(specgram, (n, n), mode=mode) + + kernel = torch.arange(-n, n + 1, 1, device=device, dtype=dtype).repeat(specgram.shape[1], 1, 1) + + output = torch.nn.functional.conv1d(specgram, kernel, groups=specgram.shape[1]) / denom + + # unpack batch + output = output.reshape(shape) + + return output + + +def _compute_nccf(waveform: Tensor, sample_rate: int, frame_time: float, freq_low: int) -> Tensor: + r""" + Compute Normalized Cross-Correlation Function (NCCF). + + .. math:: + \phi_i(m) = \frac{\sum_{n=b_i}^{b_i + N-1} w(n) w(m+n)}{\sqrt{E(b_i) E(m+b_i)}}, + + where + :math:`\phi_i(m)` is the NCCF at frame :math:`i` with lag :math:`m`, + :math:`w` is the waveform, + :math:`N` is the length of a frame, + :math:`b_i` is the beginning of frame :math:`i`, + :math:`E(j)` is the energy :math:`\sum_{n=j}^{j+N-1} w^2(n)`. + """ + + EPSILON = 10 ** (-9) + + # Number of lags to check + lags = int(math.ceil(sample_rate / freq_low)) + + frame_size = int(math.ceil(sample_rate * frame_time)) + + waveform_length = waveform.size()[-1] + num_of_frames = int(math.ceil(waveform_length / frame_size)) + + p = lags + num_of_frames * frame_size - waveform_length + waveform = torch.nn.functional.pad(waveform, (0, p)) + + # Compute lags + output_lag = [] + for lag in range(1, lags + 1): + s1 = waveform[..., :-lag].unfold(-1, frame_size, frame_size)[..., :num_of_frames, :] + s2 = waveform[..., lag:].unfold(-1, frame_size, frame_size)[..., :num_of_frames, :] + + output_frames = ( + (s1 * s2).sum(-1) + / (EPSILON + torch.linalg.vector_norm(s1, ord=2, dim=-1)).pow(2) + / (EPSILON + torch.linalg.vector_norm(s2, ord=2, dim=-1)).pow(2) + ) + + output_lag.append(output_frames.unsqueeze(-1)) + + nccf = torch.cat(output_lag, -1) + + return nccf + + +def _combine_max(a: Tuple[Tensor, Tensor], b: Tuple[Tensor, Tensor], thresh: float = 0.99) -> Tuple[Tensor, Tensor]: + """ + Take value from first if bigger than a multiplicative factor of the second, elementwise. + """ + mask = a[0] > thresh * b[0] + values = mask * a[0] + ~mask * b[0] + indices = mask * a[1] + ~mask * b[1] + return values, indices + + +def _find_max_per_frame(nccf: Tensor, sample_rate: int, freq_high: int) -> Tensor: + r""" + For each frame, take the highest value of NCCF, + apply centered median smoothing, and convert to frequency. + + Note: If the max among all the lags is very close + to the first half of lags, then the latter is taken. + """ + + lag_min = int(math.ceil(sample_rate / freq_high)) + + # Find near enough max that is smallest + + best = torch.max(nccf[..., lag_min:], -1) + + half_size = nccf.shape[-1] // 2 + half = torch.max(nccf[..., lag_min:half_size], -1) + + best = _combine_max(half, best) + indices = best[1] + + # Add back minimal lag + indices += lag_min + # Add 1 empirical calibration offset + indices += 1 + + return indices + + +def _median_smoothing(indices: Tensor, win_length: int) -> Tensor: + r""" + Apply median smoothing to the 1D tensor over the given window. + """ + + # Centered windowed + pad_length = (win_length - 1) // 2 + + # "replicate" padding in any dimension + indices = torch.nn.functional.pad(indices, (pad_length, 0), mode="constant", value=0.0) + + indices[..., :pad_length] = torch.cat(pad_length * [indices[..., pad_length].unsqueeze(-1)], dim=-1) + roll = indices.unfold(-1, win_length, 1) + + values, _ = torch.median(roll, -1) + return values + + +def detect_pitch_frequency( + waveform: Tensor, + sample_rate: int, + frame_time: float = 10 ** (-2), + win_length: int = 30, + freq_low: int = 85, + freq_high: int = 3400, +) -> Tensor: + r"""Detect pitch frequency. + + .. devices:: CPU CUDA + + .. properties:: TorchScript + + It is implemented using normalized cross-correlation function and median smoothing. + + Args: + waveform (Tensor): Tensor of audio of dimension `(..., freq, time)` + sample_rate (int): The sample rate of the waveform (Hz) + frame_time (float, optional): Duration of a frame (Default: ``10 ** (-2)``). + win_length (int, optional): The window length for median smoothing (in number of frames) (Default: ``30``). + freq_low (int, optional): Lowest frequency that can be detected (Hz) (Default: ``85``). + freq_high (int, optional): Highest frequency that can be detected (Hz) (Default: ``3400``). + + Returns: + Tensor: Tensor of freq of dimension `(..., frame)` + """ + # pack batch + shape = list(waveform.size()) + waveform = waveform.reshape([-1] + shape[-1:]) + + nccf = _compute_nccf(waveform, sample_rate, frame_time, freq_low) + indices = _find_max_per_frame(nccf, sample_rate, freq_high) + indices = _median_smoothing(indices, win_length) + + # Convert indices to frequency + EPSILON = 10 ** (-9) + freq = sample_rate / (EPSILON + indices.to(torch.float)) + + # unpack batch + freq = freq.reshape(shape[:-1] + list(freq.shape[-1:])) + + return freq + + +def sliding_window_cmn( + specgram: Tensor, + cmn_window: int = 600, + min_cmn_window: int = 100, + center: bool = False, + norm_vars: bool = False, +) -> Tensor: + r""" + Apply sliding-window cepstral mean (and optionally variance) normalization per utterance. + + .. devices:: CPU CUDA + + .. properties:: TorchScript + + Args: + specgram (Tensor): Tensor of spectrogram of dimension `(..., time, freq)` + cmn_window (int, optional): Window in frames for running average CMN computation (int, default = 600) + min_cmn_window (int, optional): Minimum CMN window used at start of decoding (adds latency only at start). + Only applicable if center == false, ignored if center==true (int, default = 100) + center (bool, optional): If true, use a window centered on the current frame + (to the extent possible, modulo end effects). If false, window is to the left. (bool, default = false) + norm_vars (bool, optional): If true, normalize variance to one. (bool, default = false) + + Returns: + Tensor: Tensor matching input shape `(..., freq, time)` + """ + input_shape = specgram.shape + num_frames, num_feats = input_shape[-2:] + specgram = specgram.view(-1, num_frames, num_feats) + num_channels = specgram.shape[0] + + dtype = specgram.dtype + device = specgram.device + last_window_start = last_window_end = -1 + cur_sum = torch.zeros(num_channels, num_feats, dtype=dtype, device=device) + cur_sumsq = torch.zeros(num_channels, num_feats, dtype=dtype, device=device) + cmn_specgram = torch.zeros(num_channels, num_frames, num_feats, dtype=dtype, device=device) + for t in range(num_frames): + window_start = 0 + window_end = 0 + if center: + window_start = t - cmn_window // 2 + window_end = window_start + cmn_window + else: + window_start = t - cmn_window + window_end = t + 1 + if window_start < 0: + window_end -= window_start + window_start = 0 + if not center: + if window_end > t: + window_end = max(t + 1, min_cmn_window) + if window_end > num_frames: + window_start -= window_end - num_frames + window_end = num_frames + if window_start < 0: + window_start = 0 + if last_window_start == -1: + input_part = specgram[:, window_start : window_end - window_start, :] + cur_sum += torch.sum(input_part, 1) + if norm_vars: + cur_sumsq += torch.cumsum(input_part**2, 1)[:, -1, :] + else: + if window_start > last_window_start: + frame_to_remove = specgram[:, last_window_start, :] + cur_sum -= frame_to_remove + if norm_vars: + cur_sumsq -= frame_to_remove**2 + if window_end > last_window_end: + frame_to_add = specgram[:, last_window_end, :] + cur_sum += frame_to_add + if norm_vars: + cur_sumsq += frame_to_add**2 + window_frames = window_end - window_start + last_window_start = window_start + last_window_end = window_end + cmn_specgram[:, t, :] = specgram[:, t, :] - cur_sum / window_frames + if norm_vars: + if window_frames == 1: + cmn_specgram[:, t, :] = torch.zeros(num_channels, num_feats, dtype=dtype, device=device) + else: + variance = cur_sumsq + variance = variance / window_frames + variance -= (cur_sum**2) / (window_frames**2) + variance = torch.pow(variance, -0.5) + cmn_specgram[:, t, :] *= variance + + cmn_specgram = cmn_specgram.view(input_shape[:-2] + (num_frames, num_feats)) + if len(input_shape) == 2: + cmn_specgram = cmn_specgram.squeeze(0) + return cmn_specgram + + +def spectral_centroid( + waveform: Tensor, + sample_rate: int, + pad: int, + window: Tensor, + n_fft: int, + hop_length: int, + win_length: int, +) -> Tensor: + r"""Compute the spectral centroid for each channel along the time axis. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + The spectral centroid is defined as the weighted average of the + frequency values, weighted by their magnitude. + + Args: + waveform (Tensor): Tensor of audio of dimension `(..., time)` + sample_rate (int): Sample rate of the audio waveform + pad (int): Two sided padding of signal + window (Tensor): Window tensor that is applied/multiplied to each frame/window + n_fft (int): Size of FFT + hop_length (int): Length of hop between STFT windows + win_length (int): Window size + + Returns: + Tensor: Dimension `(..., time)` + """ + specgram = spectrogram( + waveform, + pad=pad, + window=window, + n_fft=n_fft, + hop_length=hop_length, + win_length=win_length, + power=1.0, + normalized=False, + ) + freqs = torch.linspace(0, sample_rate // 2, steps=1 + n_fft // 2, device=specgram.device).reshape((-1, 1)) + freq_dim = -2 + return (freqs * specgram).sum(dim=freq_dim) / specgram.sum(dim=freq_dim) + + +_CPU = torch.device("cpu") + + +def _get_sinc_resample_kernel( + orig_freq: int, + new_freq: int, + gcd: int, + lowpass_filter_width: int = 6, + rolloff: float = 0.99, + resampling_method: str = "sinc_interp_hann", + beta: Optional[float] = None, + device: torch.device = _CPU, + dtype: Optional[torch.dtype] = None, +): + if not (int(orig_freq) == orig_freq and int(new_freq) == new_freq): + raise Exception( + "Frequencies must be of integer type to ensure quality resampling computation. " + "To work around this, manually convert both frequencies to integer values " + "that maintain their resampling rate ratio before passing them into the function. " + "Example: To downsample a 44100 hz waveform by a factor of 8, use " + "`orig_freq=8` and `new_freq=1` instead of `orig_freq=44100` and `new_freq=5512.5`. " + "For more information, please refer to https://github.com/pytorch/audio/issues/1487." + ) + + if resampling_method in ["sinc_interpolation", "kaiser_window"]: + method_map = { + "sinc_interpolation": "sinc_interp_hann", + "kaiser_window": "sinc_interp_kaiser", + } + warnings.warn( + f'"{resampling_method}" resampling method name is being deprecated and replaced by ' + f'"{method_map[resampling_method]}" in the next release. ' + "The default behavior remains unchanged.", + stacklevel=3, + ) + elif resampling_method not in ["sinc_interp_hann", "sinc_interp_kaiser"]: + raise ValueError("Invalid resampling method: {}".format(resampling_method)) + + orig_freq = int(orig_freq) // gcd + new_freq = int(new_freq) // gcd + + if lowpass_filter_width <= 0: + raise ValueError("Low pass filter width should be positive.") + base_freq = min(orig_freq, new_freq) + # This will perform antialiasing filtering by removing the highest frequencies. + # At first I thought I only needed this when downsampling, but when upsampling + # you will get edge artifacts without this, as the edge is equivalent to zero padding, + # which will add high freq artifacts. + base_freq *= rolloff + + # The key idea of the algorithm is that x(t) can be exactly reconstructed from x[i] (tensor) + # using the sinc interpolation formula: + # x(t) = sum_i x[i] sinc(pi * orig_freq * (i / orig_freq - t)) + # We can then sample the function x(t) with a different sample rate: + # y[j] = x(j / new_freq) + # or, + # y[j] = sum_i x[i] sinc(pi * orig_freq * (i / orig_freq - j / new_freq)) + + # We see here that y[j] is the convolution of x[i] with a specific filter, for which + # we take an FIR approximation, stopping when we see at least `lowpass_filter_width` zeros crossing. + # But y[j+1] is going to have a different set of weights and so on, until y[j + new_freq]. + # Indeed: + # y[j + new_freq] = sum_i x[i] sinc(pi * orig_freq * ((i / orig_freq - (j + new_freq) / new_freq)) + # = sum_i x[i] sinc(pi * orig_freq * ((i - orig_freq) / orig_freq - j / new_freq)) + # = sum_i x[i + orig_freq] sinc(pi * orig_freq * (i / orig_freq - j / new_freq)) + # so y[j+new_freq] uses the same filter as y[j], but on a shifted version of x by `orig_freq`. + # This will explain the F.conv1d after, with a stride of orig_freq. + width = math.ceil(lowpass_filter_width * orig_freq / base_freq) + # If orig_freq is still big after GCD reduction, most filters will be very unbalanced, i.e., + # they will have a lot of almost zero values to the left or to the right... + # There is probably a way to evaluate those filters more efficiently, but this is kept for + # future work. + idx_dtype = dtype if dtype is not None else torch.float64 + + idx = torch.arange(-width, width + orig_freq, dtype=idx_dtype, device=device)[None, None] / orig_freq + + t = torch.arange(0, -new_freq, -1, dtype=dtype, device=device)[:, None, None] / new_freq + idx + t *= base_freq + t = t.clamp_(-lowpass_filter_width, lowpass_filter_width) + + # we do not use built in torch windows here as we need to evaluate the window + # at specific positions, not over a regular grid. + if resampling_method == "sinc_interp_hann": + window = torch.cos(t * math.pi / lowpass_filter_width / 2) ** 2 + else: + # sinc_interp_kaiser + if beta is None: + beta = 14.769656459379492 + beta_tensor = torch.tensor(float(beta)) + window = torch.i0(beta_tensor * torch.sqrt(1 - (t / lowpass_filter_width) ** 2)) / torch.i0(beta_tensor) + + t *= math.pi + + scale = base_freq / orig_freq + kernels = torch.where(t == 0, torch.tensor(1.0).to(t), t.sin() / t) + kernels *= window * scale + + if dtype is None: + kernels = kernels.to(dtype=torch.float32) + + return kernels, width + + +def _apply_sinc_resample_kernel( + waveform: Tensor, + orig_freq: int, + new_freq: int, + gcd: int, + kernel: Tensor, + width: int, +): + if not waveform.is_floating_point(): + raise TypeError(f"Expected floating point type for waveform tensor, but received {waveform.dtype}.") + + orig_freq = int(orig_freq) // gcd + new_freq = int(new_freq) // gcd + + # pack batch + shape = waveform.size() + waveform = waveform.view(-1, shape[-1]) + + num_wavs, length = waveform.shape + waveform = torch.nn.functional.pad(waveform, (width, width + orig_freq)) + resampled = torch.nn.functional.conv1d(waveform[:, None], kernel, stride=orig_freq) + resampled = resampled.transpose(1, 2).reshape(num_wavs, -1) + target_length = torch.ceil(torch.as_tensor(new_freq * length / orig_freq)).long() + resampled = resampled[..., :target_length] + + # unpack batch + resampled = resampled.view(shape[:-1] + resampled.shape[-1:]) + return resampled + + +def resample( + waveform: Tensor, + orig_freq: int, + new_freq: int, + lowpass_filter_width: int = 6, + rolloff: float = 0.99, + resampling_method: str = "sinc_interp_hann", + beta: Optional[float] = None, +) -> Tensor: + r"""Resamples the waveform at the new frequency using bandlimited interpolation. :cite:`RESAMPLE`. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Note: + ``transforms.Resample`` precomputes and reuses the resampling kernel, so using it will result in + more efficient computation if resampling multiple waveforms with the same resampling parameters. + + Args: + waveform (Tensor): The input signal of dimension `(..., time)` + orig_freq (int): The original frequency of the signal + new_freq (int): The desired frequency + lowpass_filter_width (int, optional): Controls the sharpness of the filter, more == sharper + but less efficient. (Default: ``6``) + rolloff (float, optional): The roll-off frequency of the filter, as a fraction of the Nyquist. + Lower values reduce anti-aliasing, but also reduce some of the highest frequencies. (Default: ``0.99``) + resampling_method (str, optional): The resampling method to use. + Options: [``"sinc_interp_hann"``, ``"sinc_interp_kaiser"``] (Default: ``"sinc_interp_hann"``) + beta (float or None, optional): The shape parameter used for kaiser window. + + Returns: + Tensor: The waveform at the new frequency of dimension `(..., time).` + """ + + if orig_freq <= 0.0 or new_freq <= 0.0: + raise ValueError("Original frequency and desired frequecy should be positive") + + if orig_freq == new_freq: + return waveform + + gcd = math.gcd(int(orig_freq), int(new_freq)) + + kernel, width = _get_sinc_resample_kernel( + orig_freq, + new_freq, + gcd, + lowpass_filter_width, + rolloff, + resampling_method, + beta, + waveform.device, + waveform.dtype, + ) + resampled = _apply_sinc_resample_kernel(waveform, orig_freq, new_freq, gcd, kernel, width) + return resampled + + +@torch.jit.unused +def edit_distance(seq1: Sequence, seq2: Sequence) -> int: + """ + Calculate the word level edit (Levenshtein) distance between two sequences. + + .. devices:: CPU + + The function computes an edit distance allowing deletion, insertion and + substitution. The result is an integer. + + For most applications, the two input sequences should be the same type. If + two strings are given, the output is the edit distance between the two + strings (character edit distance). If two lists of strings are given, the + output is the edit distance between sentences (word edit distance). Users + may want to normalize the output by the length of the reference sequence. + + Args: + seq1 (Sequence): the first sequence to compare. + seq2 (Sequence): the second sequence to compare. + Returns: + int: The distance between the first and second sequences. + """ + len_sent2 = len(seq2) + dold = list(range(len_sent2 + 1)) + dnew = [0 for _ in range(len_sent2 + 1)] + + for i in range(1, len(seq1) + 1): + dnew[0] = i + for j in range(1, len_sent2 + 1): + if seq1[i - 1] == seq2[j - 1]: + dnew[j] = dold[j - 1] + else: + substitution = dold[j - 1] + 1 + insertion = dnew[j - 1] + 1 + deletion = dold[j] + 1 + dnew[j] = min(substitution, insertion, deletion) + + dnew, dold = dold, dnew + + return int(dold[-1]) + + +def loudness(waveform: Tensor, sample_rate: int): + r"""Measure audio loudness according to the ITU-R BS.1770-4 recommendation. + + .. devices:: CPU CUDA + + .. properties:: TorchScript + + Args: + waveform(torch.Tensor): audio waveform of dimension `(..., channels, time)` + sample_rate (int): sampling rate of the waveform + + Returns: + Tensor: loudness estimates (LKFS) + + Reference: + - https://www.itu.int/rec/R-REC-BS.1770-4-201510-I/en + """ + + if waveform.size(-2) > 5: + raise ValueError("Only up to 5 channels are supported.") + + gate_duration = 0.4 + overlap = 0.75 + gamma_abs = -70.0 + kweight_bias = -0.691 + gate_samples = int(round(gate_duration * sample_rate)) + step = int(round(gate_samples * (1 - overlap))) + + # Apply K-weighting + waveform = treble_biquad(waveform, sample_rate, 4.0, 1500.0, 1 / math.sqrt(2)) + waveform = highpass_biquad(waveform, sample_rate, 38.0, 0.5) + + # Compute the energy for each block + energy = torch.square(waveform).unfold(-1, gate_samples, step) + energy = torch.mean(energy, dim=-1) + + # Compute channel-weighted summation + g = torch.tensor([1.0, 1.0, 1.0, 1.41, 1.41], dtype=waveform.dtype, device=waveform.device) + g = g[: energy.size(-2)] + + energy_weighted = torch.sum(g.unsqueeze(-1) * energy, dim=-2) + loudness = -0.691 + 10 * torch.log10(energy_weighted) + + # Apply absolute gating of the blocks + gated_blocks = loudness > gamma_abs + gated_blocks = gated_blocks.unsqueeze(-2) + + energy_filtered = torch.sum(gated_blocks * energy, dim=-1) / torch.count_nonzero(gated_blocks, dim=-1) + energy_weighted = torch.sum(g * energy_filtered, dim=-1) + gamma_rel = kweight_bias + 10 * torch.log10(energy_weighted) - 10 + + # Apply relative gating of the blocks + gated_blocks = torch.logical_and(gated_blocks.squeeze(-2), loudness > gamma_rel.unsqueeze(-1)) + gated_blocks = gated_blocks.unsqueeze(-2) + + energy_filtered = torch.sum(gated_blocks * energy, dim=-1) / torch.count_nonzero(gated_blocks, dim=-1) + energy_weighted = torch.sum(g * energy_filtered, dim=-1) + LKFS = kweight_bias + 10 * torch.log10(energy_weighted) + return LKFS + + +def pitch_shift( + waveform: Tensor, + sample_rate: int, + n_steps: int, + bins_per_octave: int = 12, + n_fft: int = 512, + win_length: Optional[int] = None, + hop_length: Optional[int] = None, + window: Optional[Tensor] = None, +) -> Tensor: + """ + Shift the pitch of a waveform by ``n_steps`` steps. + + .. devices:: CPU CUDA + + .. properties:: TorchScript + + Args: + waveform (Tensor): The input waveform of shape `(..., time)`. + sample_rate (int): Sample rate of `waveform`. + n_steps (int): The (fractional) steps to shift `waveform`. + bins_per_octave (int, optional): The number of steps per octave (Default: ``12``). + n_fft (int, optional): Size of FFT, creates ``n_fft // 2 + 1`` bins (Default: ``512``). + win_length (int or None, optional): Window size. If None, then ``n_fft`` is used. (Default: ``None``). + hop_length (int or None, optional): Length of hop between STFT windows. If None, then + ``win_length // 4`` is used (Default: ``None``). + window (Tensor or None, optional): Window tensor that is applied/multiplied to each frame/window. + If None, then ``torch.hann_window(win_length)`` is used (Default: ``None``). + + + Returns: + Tensor: The pitch-shifted audio waveform of shape `(..., time)`. + """ + waveform_stretch = _stretch_waveform( + waveform, + n_steps, + bins_per_octave, + n_fft, + win_length, + hop_length, + window, + ) + rate = 2.0 ** (-float(n_steps) / bins_per_octave) + waveform_shift = resample(waveform_stretch, int(sample_rate / rate), sample_rate) + + return _fix_waveform_shape(waveform_shift, waveform.size()) + + +def _stretch_waveform( + waveform: Tensor, + n_steps: int, + bins_per_octave: int = 12, + n_fft: int = 512, + win_length: Optional[int] = None, + hop_length: Optional[int] = None, + window: Optional[Tensor] = None, +) -> Tensor: + """ + Pitch shift helper function to preprocess and stretch waveform before resampling step. + + Args: + See pitch_shift arg descriptions. + + Returns: + Tensor: The preprocessed waveform stretched prior to resampling. + """ + if hop_length is None: + hop_length = n_fft // 4 + if win_length is None: + win_length = n_fft + if window is None: + window = torch.hann_window(window_length=win_length, device=waveform.device) + + # pack batch + shape = waveform.size() + waveform = waveform.reshape(-1, shape[-1]) + + ori_len = shape[-1] + rate = 2.0 ** (-float(n_steps) / bins_per_octave) + spec_f = torch.stft( + input=waveform, + n_fft=n_fft, + hop_length=hop_length, + win_length=win_length, + window=window, + center=True, + pad_mode="reflect", + normalized=False, + onesided=True, + return_complex=True, + ) + phase_advance = torch.linspace(0, math.pi * hop_length, spec_f.shape[-2], device=spec_f.device)[..., None] + spec_stretch = phase_vocoder(spec_f, rate, phase_advance) + len_stretch = int(round(ori_len / rate)) + waveform_stretch = torch.istft( + spec_stretch, n_fft=n_fft, hop_length=hop_length, win_length=win_length, window=window, length=len_stretch + ) + return waveform_stretch + + +def _fix_waveform_shape( + waveform_shift: Tensor, + shape: List[int], +) -> Tensor: + """ + PitchShift helper function to process after resampling step to fix the shape back. + + Args: + waveform_shift(Tensor): The waveform after stretch and resample + shape (List[int]): The shape of initial waveform + + Returns: + Tensor: The pitch-shifted audio waveform of shape `(..., time)`. + """ + ori_len = shape[-1] + shift_len = waveform_shift.size()[-1] + if shift_len > ori_len: + waveform_shift = waveform_shift[..., :ori_len] + else: + waveform_shift = torch.nn.functional.pad(waveform_shift, [0, ori_len - shift_len]) + + # unpack batch + waveform_shift = waveform_shift.view(shape[:-1] + waveform_shift.shape[-1:]) + return waveform_shift + + +class RnntLoss(torch.autograd.Function): + @staticmethod + def forward(ctx, *args): + output, saved = torch.ops.torchaudio.rnnt_loss_forward(*args) + ctx.save_for_backward(saved) + return output + + @staticmethod + def backward(ctx, dy): + grad = ctx.saved_tensors[0] + grad_out = dy.view((-1, 1, 1, 1)) + result = grad * grad_out + return (result, None, None, None, None, None, None, None) + + +def rnnt_loss( + logits: Tensor, + targets: Tensor, + logit_lengths: Tensor, + target_lengths: Tensor, + blank: int = -1, + clamp: float = -1, + reduction: str = "mean", + fused_log_softmax: bool = True, +): + """Compute the RNN Transducer loss from *Sequence Transduction with Recurrent Neural Networks* + :cite:`graves2012sequence`. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + The RNN Transducer loss extends the CTC loss by defining a distribution over output + sequences of all lengths, and by jointly modelling both input-output and output-output + dependencies. + + Args: + logits (Tensor): Tensor of dimension `(batch, max seq length, max target length + 1, class)` + containing output from joiner + targets (Tensor): Tensor of dimension `(batch, max target length)` containing targets with zero padded + logit_lengths (Tensor): Tensor of dimension `(batch)` containing lengths of each sequence from encoder + target_lengths (Tensor): Tensor of dimension `(batch)` containing lengths of targets for each sequence + blank (int, optional): blank label (Default: ``-1``) + clamp (float, optional): clamp for gradients (Default: ``-1``) + reduction (string, optional): Specifies the reduction to apply to the output: + ``"none"`` | ``"mean"`` | ``"sum"``. (Default: ``"mean"``) + fused_log_softmax (bool): set to False if calling log_softmax outside of loss (Default: ``True``) + Returns: + Tensor: Loss with the reduction option applied. If ``reduction`` is ``"none"``, then size `(batch)`, + otherwise scalar. + """ + if reduction not in ["none", "mean", "sum"]: + raise ValueError('reduction should be one of "none", "mean", or "sum"') + + if blank < 0: # reinterpret blank index if blank < 0. + blank = logits.shape[-1] + blank + + costs = RnntLoss.apply(logits, targets, logit_lengths, target_lengths, blank, clamp, fused_log_softmax) + + if reduction == "mean": + return costs.mean() + elif reduction == "sum": + return costs.sum() + + return costs + + +def psd( + specgram: Tensor, + mask: Optional[Tensor] = None, + normalize: bool = True, + eps: float = 1e-10, +) -> Tensor: + """Compute cross-channel power spectral density (PSD) matrix. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + specgram (torch.Tensor): Multi-channel complex-valued spectrum. + Tensor with dimensions `(..., channel, freq, time)`. + mask (torch.Tensor or None, optional): Time-Frequency mask for normalization. + Tensor with dimensions `(..., freq, time)`. (Default: ``None``) + normalize (bool, optional): If ``True``, normalize the mask along the time dimension. (Default: ``True``) + eps (float, optional): Value to add to the denominator in mask normalization. (Default: ``1e-15``) + + Returns: + torch.Tensor: The complex-valued PSD matrix of the input spectrum. + Tensor with dimensions `(..., freq, channel, channel)` + """ + specgram = specgram.transpose(-3, -2) # shape (freq, channel, time) + # outer product: + # (..., ch_1, time) x (..., ch_2, time) -> (..., time, ch_1, ch_2) + psd = torch.einsum("...ct,...et->...tce", [specgram, specgram.conj()]) + + if mask is not None: + if mask.shape[:-1] != specgram.shape[:-2] or mask.shape[-1] != specgram.shape[-1]: + raise ValueError( + "The dimensions of mask except the channel dimension should be the same as specgram." + f"Found {mask.shape} for mask and {specgram.shape} for specgram." + ) + # Normalized mask along time dimension: + if normalize: + mask = mask / (mask.sum(dim=-1, keepdim=True) + eps) + + psd = psd * mask[..., None, None] + + psd = psd.sum(dim=-3) + return psd + + +def _compute_mat_trace(input: torch.Tensor, dim1: int = -1, dim2: int = -2) -> torch.Tensor: + r"""Compute the trace of a Tensor along ``dim1`` and ``dim2`` dimensions. + + Args: + input (torch.Tensor): Tensor with dimensions `(..., channel, channel)`. + dim1 (int, optional): The first dimension of the diagonal matrix. + (Default: ``-1``) + dim2 (int, optional): The second dimension of the diagonal matrix. + (Default: ``-2``) + + Returns: + Tensor: The trace of the input Tensor. + """ + if input.ndim < 2: + raise ValueError("The dimension of the tensor must be at least 2.") + if input.shape[dim1] != input.shape[dim2]: + raise ValueError("The size of ``dim1`` and ``dim2`` must be the same.") + input = torch.diagonal(input, 0, dim1=dim1, dim2=dim2) + return input.sum(dim=-1) + + +def _tik_reg(mat: torch.Tensor, reg: float = 1e-7, eps: float = 1e-8) -> torch.Tensor: + """Perform Tikhonov regularization (only modifying real part). + + Args: + mat (torch.Tensor): Input matrix with dimensions `(..., channel, channel)`. + reg (float, optional): Regularization factor. (Default: 1e-8) + eps (float, optional): Value to avoid the correlation matrix is all-zero. (Default: ``1e-8``) + + Returns: + Tensor: Regularized matrix with dimensions `(..., channel, channel)`. + """ + # Add eps + C = mat.size(-1) + eye = torch.eye(C, dtype=mat.dtype, device=mat.device) + epsilon = _compute_mat_trace(mat).real[..., None, None] * reg + # in case that correlation_matrix is all-zero + epsilon = epsilon + eps + mat = mat + epsilon * eye[..., :, :] + return mat + + +def _assert_psd_matrices(psd_s: torch.Tensor, psd_n: torch.Tensor) -> None: + """Assertion checks of the PSD matrices of target speech and noise. + + Args: + psd_s (torch.Tensor): The complex-valued power spectral density (PSD) matrix of target speech. + Tensor with dimensions `(..., freq, channel, channel)`. + psd_n (torch.Tensor): The complex-valued power spectral density (PSD) matrix of noise. + Tensor with dimensions `(..., freq, channel, channel)`. + """ + if psd_s.ndim < 3 or psd_n.ndim < 3: + raise ValueError( + "Expected at least 3D Tensor (..., freq, channel, channel) for psd_s and psd_n. " + f"Found {psd_s.shape} for psd_s and {psd_n.shape} for psd_n." + ) + if not (psd_s.is_complex() and psd_n.is_complex()): + raise TypeError( + "The type of psd_s and psd_n must be ``torch.cfloat`` or ``torch.cdouble``. " + f"Found {psd_s.dtype} for psd_s and {psd_n.dtype} for psd_n." + ) + if psd_s.shape != psd_n.shape: + raise ValueError( + f"The dimensions of psd_s and psd_n should be the same. Found {psd_s.shape} and {psd_n.shape}." + ) + if psd_s.shape[-1] != psd_s.shape[-2]: + raise ValueError(f"The last two dimensions of psd_s should be the same. Found {psd_s.shape}.") + + +def mvdr_weights_souden( + psd_s: Tensor, + psd_n: Tensor, + reference_channel: Union[int, Tensor], + diagonal_loading: bool = True, + diag_eps: float = 1e-7, + eps: float = 1e-8, +) -> Tensor: + r"""Compute the Minimum Variance Distortionless Response (*MVDR* :cite:`capon1969high`) beamforming weights + by the method proposed by *Souden et, al.* :cite:`souden2009optimal`. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Given the power spectral density (PSD) matrix of target speech :math:`\bf{\Phi}_{\textbf{SS}}`, + the PSD matrix of noise :math:`\bf{\Phi}_{\textbf{NN}}`, and a one-hot vector that represents the + reference channel :math:`\bf{u}`, the method computes the MVDR beamforming weight martrix + :math:`\textbf{w}_{\text{MVDR}}`. The formula is defined as: + + .. math:: + \textbf{w}_{\text{MVDR}}(f) = + \frac{{{\bf{\Phi}_{\textbf{NN}}^{-1}}(f){\bf{\Phi}_{\textbf{SS}}}}(f)} + {\text{Trace}({{{\bf{\Phi}_{\textbf{NN}}^{-1}}(f) \bf{\Phi}_{\textbf{SS}}}(f))}}\bm{u} + + Args: + psd_s (torch.Tensor): The complex-valued power spectral density (PSD) matrix of target speech. + Tensor with dimensions `(..., freq, channel, channel)`. + psd_n (torch.Tensor): The complex-valued power spectral density (PSD) matrix of noise. + Tensor with dimensions `(..., freq, channel, channel)`. + reference_channel (int or torch.Tensor): Specifies the reference channel. + If the dtype is ``int``, it represents the reference channel index. + If the dtype is ``torch.Tensor``, its shape is `(..., channel)`, where the ``channel`` dimension + is one-hot. + diagonal_loading (bool, optional): If ``True``, enables applying diagonal loading to ``psd_n``. + (Default: ``True``) + diag_eps (float, optional): The coefficient multiplied to the identity matrix for diagonal loading. + It is only effective when ``diagonal_loading`` is set to ``True``. (Default: ``1e-7``) + eps (float, optional): Value to add to the denominator in the beamforming weight formula. + (Default: ``1e-8``) + + Returns: + torch.Tensor: The complex-valued MVDR beamforming weight matrix with dimensions `(..., freq, channel)`. + """ + _assert_psd_matrices(psd_s, psd_n) + + if diagonal_loading: + psd_n = _tik_reg(psd_n, reg=diag_eps) + numerator = torch.linalg.solve(psd_n, psd_s) # psd_n.inv() @ psd_s + # ws: (..., C, C) / (...,) -> (..., C, C) + ws = numerator / (_compute_mat_trace(numerator)[..., None, None] + eps) + if torch.jit.isinstance(reference_channel, int): + beamform_weights = ws[..., :, reference_channel] + elif torch.jit.isinstance(reference_channel, Tensor): + reference_channel = reference_channel.to(psd_n.dtype) + # h: (..., F, C_1, C_2) x (..., C_2) -> (..., F, C_1) + beamform_weights = torch.einsum("...c,...c->...", [ws, reference_channel[..., None, None, :]]) + else: + raise TypeError(f'Expected "int" or "Tensor" for reference_channel. Found: {type(reference_channel)}.') + + return beamform_weights + + +def mvdr_weights_rtf( + rtf: Tensor, + psd_n: Tensor, + reference_channel: Optional[Union[int, Tensor]] = None, + diagonal_loading: bool = True, + diag_eps: float = 1e-7, + eps: float = 1e-8, +) -> Tensor: + r"""Compute the Minimum Variance Distortionless Response (*MVDR* :cite:`capon1969high`) beamforming weights + based on the relative transfer function (RTF) and power spectral density (PSD) matrix of noise. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Given the relative transfer function (RTF) matrix or the steering vector of target speech :math:`\bm{v}`, + the PSD matrix of noise :math:`\bf{\Phi}_{\textbf{NN}}`, and a one-hot vector that represents the + reference channel :math:`\bf{u}`, the method computes the MVDR beamforming weight martrix + :math:`\textbf{w}_{\text{MVDR}}`. The formula is defined as: + + .. math:: + \textbf{w}_{\text{MVDR}}(f) = + \frac{{{\bf{\Phi}_{\textbf{NN}}^{-1}}(f){\bm{v}}(f)}} + {{\bm{v}^{\mathsf{H}}}(f){\bf{\Phi}_{\textbf{NN}}^{-1}}(f){\bm{v}}(f)} + + where :math:`(.)^{\mathsf{H}}` denotes the Hermitian Conjugate operation. + + Args: + rtf (torch.Tensor): The complex-valued RTF vector of target speech. + Tensor with dimensions `(..., freq, channel)`. + psd_n (torch.Tensor): The complex-valued power spectral density (PSD) matrix of noise. + Tensor with dimensions `(..., freq, channel, channel)`. + reference_channel (int or torch.Tensor): Specifies the reference channel. + If the dtype is ``int``, it represents the reference channel index. + If the dtype is ``torch.Tensor``, its shape is `(..., channel)`, where the ``channel`` dimension + is one-hot. + diagonal_loading (bool, optional): If ``True``, enables applying diagonal loading to ``psd_n``. + (Default: ``True``) + diag_eps (float, optional): The coefficient multiplied to the identity matrix for diagonal loading. + It is only effective when ``diagonal_loading`` is set to ``True``. (Default: ``1e-7``) + eps (float, optional): Value to add to the denominator in the beamforming weight formula. + (Default: ``1e-8``) + + Returns: + torch.Tensor: The complex-valued MVDR beamforming weight matrix with dimensions `(..., freq, channel)`. + """ + if rtf.ndim < 2: + raise ValueError(f"Expected at least 2D Tensor (..., freq, channel) for rtf. Found {rtf.shape}.") + if psd_n.ndim < 3: + raise ValueError(f"Expected at least 3D Tensor (..., freq, channel, channel) for psd_n. Found {psd_n.shape}.") + if not (rtf.is_complex() and psd_n.is_complex()): + raise TypeError( + "The type of rtf and psd_n must be ``torch.cfloat`` or ``torch.cdouble``. " + f"Found {rtf.dtype} for rtf and {psd_n.dtype} for psd_n." + ) + if rtf.shape != psd_n.shape[:-1]: + raise ValueError( + "The dimensions of rtf and the dimensions withou the last dimension of psd_n should be the same. " + f"Found {rtf.shape} for rtf and {psd_n.shape} for psd_n." + ) + if psd_n.shape[-1] != psd_n.shape[-2]: + raise ValueError(f"The last two dimensions of psd_n should be the same. Found {psd_n.shape}.") + + if diagonal_loading: + psd_n = _tik_reg(psd_n, reg=diag_eps) + # numerator = psd_n.inv() @ stv + numerator = torch.linalg.solve(psd_n, rtf.unsqueeze(-1)).squeeze(-1) # (..., freq, channel) + # denominator = stv^H @ psd_n.inv() @ stv + denominator = torch.einsum("...d,...d->...", [rtf.conj(), numerator]) + beamform_weights = numerator / (denominator.real.unsqueeze(-1) + eps) + # normalize the numerator + if reference_channel is not None: + if torch.jit.isinstance(reference_channel, int): + scale = rtf[..., reference_channel].conj() + elif torch.jit.isinstance(reference_channel, Tensor): + reference_channel = reference_channel.to(psd_n.dtype) + scale = torch.einsum("...c,...c->...", [rtf.conj(), reference_channel[..., None, :]]) + else: + raise TypeError(f'Expected "int" or "Tensor" for reference_channel. Found: {type(reference_channel)}.') + + beamform_weights = beamform_weights * scale[..., None] + + return beamform_weights + + +def rtf_evd(psd_s: Tensor) -> Tensor: + r"""Estimate the relative transfer function (RTF) or the steering vector by eigenvalue decomposition. + + .. devices:: CPU CUDA + + .. properties:: TorchScript + + Args: + psd_s (Tensor): The complex-valued power spectral density (PSD) matrix of target speech. + Tensor of dimension `(..., freq, channel, channel)` + + Returns: + Tensor: The estimated complex-valued RTF of target speech. + Tensor of dimension `(..., freq, channel)` + """ + if not psd_s.is_complex(): + raise TypeError(f"The type of psd_s must be ``torch.cfloat`` or ``torch.cdouble``. Found {psd_s.dtype}.") + if psd_s.shape[-1] != psd_s.shape[-2]: + raise ValueError(f"The last two dimensions of psd_s should be the same. Found {psd_s.shape}.") + _, v = torch.linalg.eigh(psd_s) # v is sorted along with eigenvalues in ascending order + rtf = v[..., -1] # choose the eigenvector with max eigenvalue + return rtf + + +def rtf_power( + psd_s: Tensor, + psd_n: Tensor, + reference_channel: Union[int, Tensor], + n_iter: int = 3, + diagonal_loading: bool = True, + diag_eps: float = 1e-7, +) -> Tensor: + r"""Estimate the relative transfer function (RTF) or the steering vector by the power method. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + psd_s (torch.Tensor): The complex-valued power spectral density (PSD) matrix of target speech. + Tensor with dimensions `(..., freq, channel, channel)`. + psd_n (torch.Tensor): The complex-valued power spectral density (PSD) matrix of noise. + Tensor with dimensions `(..., freq, channel, channel)`. + reference_channel (int or torch.Tensor): Specifies the reference channel. + If the dtype is ``int``, it represents the reference channel index. + If the dtype is ``torch.Tensor``, its shape is `(..., channel)`, where the ``channel`` dimension + is one-hot. + diagonal_loading (bool, optional): If ``True``, enables applying diagonal loading to ``psd_n``. + (Default: ``True``) + diag_eps (float, optional): The coefficient multiplied to the identity matrix for diagonal loading. + It is only effective when ``diagonal_loading`` is set to ``True``. (Default: ``1e-7``) + + Returns: + torch.Tensor: The estimated complex-valued RTF of target speech. + Tensor of dimension `(..., freq, channel)`. + """ + _assert_psd_matrices(psd_s, psd_n) + if n_iter <= 0: + raise ValueError("The number of iteration must be greater than 0.") + + # Apply diagonal loading to psd_n to improve robustness. + if diagonal_loading: + psd_n = _tik_reg(psd_n, reg=diag_eps) + # phi is regarded as the first iteration + phi = torch.linalg.solve(psd_n, psd_s) # psd_n.inv() @ psd_s + if torch.jit.isinstance(reference_channel, int): + rtf = phi[..., reference_channel] + elif torch.jit.isinstance(reference_channel, Tensor): + reference_channel = reference_channel.to(psd_n.dtype) + rtf = torch.einsum("...c,...c->...", [phi, reference_channel[..., None, None, :]]) + else: + raise TypeError(f'Expected "int" or "Tensor" for reference_channel. Found: {type(reference_channel)}.') + rtf = rtf.unsqueeze(-1) # (..., freq, channel, 1) + if n_iter >= 2: + # The number of iterations in the for loop is `n_iter - 2` + # because the `phi` above and `torch.matmul(psd_s, rtf)` are regarded as + # two iterations. + for _ in range(n_iter - 2): + rtf = torch.matmul(phi, rtf) + rtf = torch.matmul(psd_s, rtf) + else: + # if there is only one iteration, the rtf is the psd_s[..., referenc_channel] + # which is psd_n @ phi @ ref_channel + rtf = torch.matmul(psd_n, rtf) + return rtf.squeeze(-1) + + +def apply_beamforming(beamform_weights: Tensor, specgram: Tensor) -> Tensor: + r"""Apply the beamforming weight to the multi-channel noisy spectrum to obtain the single-channel enhanced spectrum. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + .. math:: + \hat{\textbf{S}}(f) = \textbf{w}_{\text{bf}}(f)^{\mathsf{H}} \textbf{Y}(f) + + where :math:`\textbf{w}_{\text{bf}}(f)` is the beamforming weight for the :math:`f`-th frequency bin, + :math:`\textbf{Y}` is the multi-channel spectrum for the :math:`f`-th frequency bin. + + Args: + beamform_weights (Tensor): The complex-valued beamforming weight matrix. + Tensor of dimension `(..., freq, channel)` + specgram (Tensor): The multi-channel complex-valued noisy spectrum. + Tensor of dimension `(..., channel, freq, time)` + + Returns: + Tensor: The single-channel complex-valued enhanced spectrum. + Tensor of dimension `(..., freq, time)` + """ + if beamform_weights.shape[:-2] != specgram.shape[:-3]: + raise ValueError( + "The dimensions except the last two dimensions of beamform_weights should be the same " + "as the dimensions except the last three dimensions of specgram. " + f"Found {beamform_weights.shape} for beamform_weights and {specgram.shape} for specgram." + ) + + if not (beamform_weights.is_complex() and specgram.is_complex()): + raise TypeError( + "The type of beamform_weights and specgram must be ``torch.cfloat`` or ``torch.cdouble``. " + f"Found {beamform_weights.dtype} for beamform_weights and {specgram.dtype} for specgram." + ) + + # (..., freq, channel) x (..., channel, freq, time) -> (..., freq, time) + specgram_enhanced = torch.einsum("...fc,...cft->...ft", [beamform_weights.conj(), specgram]) + return specgram_enhanced + + +def _check_shape_compatible(x: torch.Tensor, y: torch.Tensor) -> None: + if x.ndim != y.ndim: + raise ValueError(f"The operands must be the same dimension (got {x.ndim} and {y.ndim}).") + + for i in range(x.ndim - 1): + xi = x.size(i) + yi = y.size(i) + if xi == yi or xi == 1 or yi == 1: + continue + raise ValueError(f"Leading dimensions of x and y are not broadcastable (got {x.shape} and {y.shape}).") + + +def _check_convolve_mode(mode: str) -> None: + valid_convolve_modes = ["full", "valid", "same"] + if mode not in valid_convolve_modes: + raise ValueError(f"Unrecognized mode value '{mode}'. Please specify one of {valid_convolve_modes}.") + + +def _apply_convolve_mode(conv_result: torch.Tensor, x_length: int, y_length: int, mode: str) -> torch.Tensor: + valid_convolve_modes = ["full", "valid", "same"] + if mode == "full": + return conv_result + elif mode == "valid": + target_length = max(x_length, y_length) - min(x_length, y_length) + 1 + start_idx = (conv_result.size(-1) - target_length) // 2 + return conv_result[..., start_idx : start_idx + target_length] + elif mode == "same": + start_idx = (conv_result.size(-1) - x_length) // 2 + return conv_result[..., start_idx : start_idx + x_length] + else: + raise ValueError(f"Unrecognized mode value '{mode}'. Please specify one of {valid_convolve_modes}.") + + +def fftconvolve(x: torch.Tensor, y: torch.Tensor, mode: str = "full") -> torch.Tensor: + r""" + Convolves inputs along their last dimension using FFT. For inputs with large last dimensions, this function + is generally much faster than :meth:`convolve`. + Note that, in contrast to :meth:`torch.nn.functional.conv1d`, which actually applies the valid cross-correlation + operator, this function applies the true `convolution`_ operator. + Also note that this function can only output float tensors (int tensor inputs will be cast to float). + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + x (torch.Tensor): First convolution operand, with shape `(..., N)`. + y (torch.Tensor): Second convolution operand, with shape `(..., M)` + (leading dimensions must be broadcast-able with those of ``x``). + mode (str, optional): Must be one of ("full", "valid", "same"). + + * "full": Returns the full convolution result, with shape `(..., N + M - 1)`. (Default) + * "valid": Returns the segment of the full convolution result corresponding to where + the two inputs overlap completely, with shape `(..., max(N, M) - min(N, M) + 1)`. + * "same": Returns the center segment of the full convolution result, with shape `(..., N)`. + + Returns: + torch.Tensor: Result of convolving ``x`` and ``y``, with shape `(..., L)`, where + the leading dimensions match those of ``x`` and `L` is dictated by ``mode``. + + .. _convolution: + https://en.wikipedia.org/wiki/Convolution + """ + _check_shape_compatible(x, y) + _check_convolve_mode(mode) + + n = x.size(-1) + y.size(-1) - 1 + fresult = torch.fft.rfft(x, n=n) * torch.fft.rfft(y, n=n) + result = torch.fft.irfft(fresult, n=n) + return _apply_convolve_mode(result, x.size(-1), y.size(-1), mode) + + +def convolve(x: torch.Tensor, y: torch.Tensor, mode: str = "full") -> torch.Tensor: + r""" + Convolves inputs along their last dimension using the direct method. + Note that, in contrast to :meth:`torch.nn.functional.conv1d`, which actually applies the valid cross-correlation + operator, this function applies the true `convolution`_ operator. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + x (torch.Tensor): First convolution operand, with shape `(..., N)`. + y (torch.Tensor): Second convolution operand, with shape `(..., M)` + (leading dimensions must be broadcast-able with those of ``x``). + mode (str, optional): Must be one of ("full", "valid", "same"). + + * "full": Returns the full convolution result, with shape `(..., N + M - 1)`. (Default) + * "valid": Returns the segment of the full convolution result corresponding to where + the two inputs overlap completely, with shape `(..., max(N, M) - min(N, M) + 1)`. + * "same": Returns the center segment of the full convolution result, with shape `(..., N)`. + + Returns: + torch.Tensor: Result of convolving ``x`` and ``y``, with shape `(..., L)`, where + the leading dimensions match those of ``x`` and `L` is dictated by ``mode``. + + .. _convolution: + https://en.wikipedia.org/wiki/Convolution + """ + _check_shape_compatible(x, y) + _check_convolve_mode(mode) + + x_size, y_size = x.size(-1), y.size(-1) + + if x.size(-1) < y.size(-1): + x, y = y, x + + if x.shape[:-1] != y.shape[:-1]: + new_shape = [max(i, j) for i, j in zip(x.shape[:-1], y.shape[:-1])] + x = x.broadcast_to(new_shape + [x.shape[-1]]) + y = y.broadcast_to(new_shape + [y.shape[-1]]) + + num_signals = torch.tensor(x.shape[:-1]).prod() + reshaped_x = x.reshape((int(num_signals), x.size(-1))) + reshaped_y = y.reshape((int(num_signals), y.size(-1))) + output = torch.nn.functional.conv1d( + input=reshaped_x, + weight=reshaped_y.flip(-1).unsqueeze(1), + stride=1, + groups=reshaped_x.size(0), + padding=reshaped_y.size(-1) - 1, + ) + output_shape = x.shape[:-1] + (-1,) + result = output.reshape(output_shape) + return _apply_convolve_mode(result, x_size, y_size, mode) + + +def add_noise( + waveform: torch.Tensor, noise: torch.Tensor, snr: torch.Tensor, lengths: Optional[torch.Tensor] = None +) -> torch.Tensor: + r"""Scales and adds noise to waveform per signal-to-noise ratio. + + Specifically, for each pair of waveform vector :math:`x \in \mathbb{R}^L` and noise vector + :math:`n \in \mathbb{R}^L`, the function computes output :math:`y` as + + .. math:: + y = x + a n \, \text{,} + + where + + .. math:: + a = \sqrt{ \frac{ ||x||_{2}^{2} }{ ||n||_{2}^{2} } \cdot 10^{-\frac{\text{SNR}}{10}} } \, \text{,} + + with :math:`\text{SNR}` being the desired signal-to-noise ratio between :math:`x` and :math:`n`, in dB. + + Note that this function broadcasts singleton leading dimensions in its inputs in a manner that is + consistent with the above formulae and PyTorch's broadcasting semantics. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (torch.Tensor): Input waveform, with shape `(..., L)`. + noise (torch.Tensor): Noise, with shape `(..., L)` (same shape as ``waveform``). + snr (torch.Tensor): Signal-to-noise ratios in dB, with shape `(...,)`. + lengths (torch.Tensor or None, optional): Valid lengths of signals in ``waveform`` and ``noise``, with shape + `(...,)` (leading dimensions must match those of ``waveform``). If ``None``, all elements in ``waveform`` + and ``noise`` are treated as valid. (Default: ``None``) + + Returns: + torch.Tensor: Result of scaling and adding ``noise`` to ``waveform``, with shape `(..., L)` + (same shape as ``waveform``). + """ + + if not (waveform.ndim - 1 == noise.ndim - 1 == snr.ndim and (lengths is None or lengths.ndim == snr.ndim)): + raise ValueError("Input leading dimensions don't match.") + + L = waveform.size(-1) + + if L != noise.size(-1): + raise ValueError(f"Length dimensions of waveform and noise don't match (got {L} and {noise.size(-1)}).") + + # compute scale + if lengths is not None: + mask = torch.arange(0, L, device=lengths.device).expand(waveform.shape) < lengths.unsqueeze( + -1 + ) # (*, L) < (*, 1) = (*, L) + masked_waveform = waveform * mask + masked_noise = noise * mask + else: + masked_waveform = waveform + masked_noise = noise + + energy_signal = torch.linalg.vector_norm(masked_waveform, ord=2, dim=-1) ** 2 # (*,) + energy_noise = torch.linalg.vector_norm(masked_noise, ord=2, dim=-1) ** 2 # (*,) + original_snr_db = 10 * (torch.log10(energy_signal) - torch.log10(energy_noise)) + scale = 10 ** ((original_snr_db - snr) / 20.0) # (*,) + + # scale noise + scaled_noise = scale.unsqueeze(-1) * noise # (*, 1) * (*, L) = (*, L) + + return waveform + scaled_noise # (*, L) + + +def speed( + waveform: torch.Tensor, orig_freq: int, factor: float, lengths: Optional[torch.Tensor] = None +) -> Tuple[torch.Tensor, Optional[torch.Tensor]]: + r"""Adjusts waveform speed. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (torch.Tensor): Input signals, with shape `(..., time)`. + orig_freq (int): Original frequency of the signals in ``waveform``. + factor (float): Factor by which to adjust speed of input. Values greater than 1.0 + compress ``waveform`` in time, whereas values less than 1.0 stretch ``waveform`` in time. + lengths (torch.Tensor or None, optional): Valid lengths of signals in ``waveform``, with shape `(...)`. + If ``None``, all elements in ``waveform`` are treated as valid. (Default: ``None``) + + Returns: + (torch.Tensor, torch.Tensor or None): + torch.Tensor + Speed-adjusted waveform, with shape `(..., new_time).` + torch.Tensor or None + If ``lengths`` is not ``None``, valid lengths of signals in speed-adjusted waveform, + with shape `(...)`; otherwise, ``None``. + """ + + source_sample_rate = int(factor * orig_freq) + target_sample_rate = int(orig_freq) + + gcd = math.gcd(source_sample_rate, target_sample_rate) + source_sample_rate = source_sample_rate // gcd + target_sample_rate = target_sample_rate // gcd + + if lengths is None: + out_lengths = None + else: + out_lengths = torch.ceil(lengths * target_sample_rate / source_sample_rate).to(lengths.dtype) + + return resample(waveform, source_sample_rate, target_sample_rate), out_lengths + + +def preemphasis(waveform, coeff: float = 0.97) -> torch.Tensor: + r"""Pre-emphasizes a waveform along its last dimension, i.e. + for each signal :math:`x` in ``waveform``, computes + output :math:`y` as + + .. math:: + y[i] = x[i] - \text{coeff} \cdot x[i - 1] + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (torch.Tensor): Waveform, with shape `(..., N)`. + coeff (float, optional): Pre-emphasis coefficient. Typically between 0.0 and 1.0. + (Default: 0.97) + + Returns: + torch.Tensor: Pre-emphasized waveform, with shape `(..., N)`. + """ + waveform = waveform.clone() + waveform[..., 1:] -= coeff * waveform[..., :-1] + return waveform + + +def deemphasis(waveform, coeff: float = 0.97) -> torch.Tensor: + r"""De-emphasizes a waveform along its last dimension. + Inverse of :meth:`preemphasis`. Concretely, for each signal + :math:`x` in ``waveform``, computes output :math:`y` as + + .. math:: + y[i] = x[i] + \text{coeff} \cdot y[i - 1] + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (torch.Tensor): Waveform, with shape `(..., N)`. + coeff (float, optional): De-emphasis coefficient. Typically between 0.0 and 1.0. + (Default: 0.97) + + Returns: + torch.Tensor: De-emphasized waveform, with shape `(..., N)`. + """ + a_coeffs = torch.tensor([1.0, -coeff], dtype=waveform.dtype, device=waveform.device) + b_coeffs = torch.tensor([1.0, 0.0], dtype=waveform.dtype, device=waveform.device) + return torchaudio.functional.filtering.lfilter(waveform, a_coeffs=a_coeffs, b_coeffs=b_coeffs) + + +def frechet_distance(mu_x, sigma_x, mu_y, sigma_y): + r"""Computes the Fréchet distance between two multivariate normal distributions :cite:`dowson1982frechet`. + + Concretely, for multivariate Gaussians :math:`X(\mu_X, \Sigma_X)` + and :math:`Y(\mu_Y, \Sigma_Y)`, the function computes and returns :math:`F` as + + .. math:: + F(X, Y) = || \mu_X - \mu_Y ||_2^2 + + \text{Tr}\left( \Sigma_X + \Sigma_Y - 2 \sqrt{\Sigma_X \Sigma_Y} \right) + + Args: + mu_x (torch.Tensor): mean :math:`\mu_X` of multivariate Gaussian :math:`X`, with shape `(N,)`. + sigma_x (torch.Tensor): covariance matrix :math:`\Sigma_X` of :math:`X`, with shape `(N, N)`. + mu_y (torch.Tensor): mean :math:`\mu_Y` of multivariate Gaussian :math:`Y`, with shape `(N,)`. + sigma_y (torch.Tensor): covariance matrix :math:`\Sigma_Y` of :math:`Y`, with shape `(N, N)`. + + Returns: + torch.Tensor: the Fréchet distance between :math:`X` and :math:`Y`. + """ + if len(mu_x.size()) != 1: + raise ValueError(f"Input mu_x must be one-dimensional; got dimension {len(mu_x.size())}.") + if len(sigma_x.size()) != 2: + raise ValueError(f"Input sigma_x must be two-dimensional; got dimension {len(sigma_x.size())}.") + if sigma_x.size(0) != sigma_x.size(1) != mu_x.size(0): + raise ValueError("Each of sigma_x's dimensions must match mu_x's size.") + if mu_x.size() != mu_y.size(): + raise ValueError(f"Inputs mu_x and mu_y must have the same shape; got {mu_x.size()} and {mu_y.size()}.") + if sigma_x.size() != sigma_y.size(): + raise ValueError( + f"Inputs sigma_x and sigma_y must have the same shape; got {sigma_x.size()} and {sigma_y.size()}." + ) + + a = (mu_x - mu_y).square().sum() + b = sigma_x.trace() + sigma_y.trace() + c = torch.linalg.eigvals(sigma_x @ sigma_y).sqrt().real.sum() + return a + b - 2 * c diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/lib/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/lib/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5d344400d3b8771d2c1b93ba48def361615a132f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/__init__.py @@ -0,0 +1,85 @@ +from ._hdemucs import HDemucs, hdemucs_high, hdemucs_low, hdemucs_medium +from .conformer import Conformer +from .conv_tasnet import conv_tasnet_base, ConvTasNet +from .deepspeech import DeepSpeech +from .emformer import Emformer +from .rnnt import emformer_rnnt_base, emformer_rnnt_model, RNNT +from .rnnt_decoder import Hypothesis, RNNTBeamSearch +from .squim import ( + squim_objective_base, + squim_objective_model, + squim_subjective_base, + squim_subjective_model, + SquimObjective, + SquimSubjective, +) +from .tacotron2 import Tacotron2 +from .wav2letter import Wav2Letter +from .wav2vec2 import ( + hubert_base, + hubert_large, + hubert_pretrain_base, + hubert_pretrain_large, + hubert_pretrain_model, + hubert_pretrain_xlarge, + hubert_xlarge, + HuBERTPretrainModel, + wav2vec2_base, + wav2vec2_large, + wav2vec2_large_lv60k, + wav2vec2_model, + wav2vec2_xlsr_1b, + wav2vec2_xlsr_2b, + wav2vec2_xlsr_300m, + Wav2Vec2Model, + wavlm_base, + wavlm_large, + wavlm_model, +) +from .wavernn import WaveRNN + + +__all__ = [ + "Wav2Letter", + "WaveRNN", + "ConvTasNet", + "conv_tasnet_base", + "DeepSpeech", + "Wav2Vec2Model", + "HuBERTPretrainModel", + "wavlm_model", + "wavlm_base", + "wavlm_large", + "wav2vec2_model", + "wav2vec2_base", + "wav2vec2_large", + "wav2vec2_large_lv60k", + "hubert_base", + "hubert_large", + "hubert_xlarge", + "hubert_pretrain_model", + "hubert_pretrain_base", + "hubert_pretrain_large", + "hubert_pretrain_xlarge", + "wav2vec2_xlsr_300m", + "wav2vec2_xlsr_1b", + "wav2vec2_xlsr_2b", + "Tacotron2", + "Conformer", + "Emformer", + "Hypothesis", + "RNNT", + "RNNTBeamSearch", + "emformer_rnnt_base", + "emformer_rnnt_model", + "HDemucs", + "hdemucs_low", + "hdemucs_medium", + "hdemucs_high", + "squim_objective_base", + "squim_objective_model", + "squim_subjective_base", + "squim_subjective_model", + "SquimObjective", + "SquimSubjective", +] diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/_hdemucs.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/_hdemucs.py new file mode 100644 index 0000000000000000000000000000000000000000..74a3ebd1d609e67edd09f4356a8cefa305c1fc49 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/_hdemucs.py @@ -0,0 +1,1008 @@ +# ***************************************************************************** +# MIT License +# +# Copyright (c) Facebook, Inc. and its affiliates. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# ***************************************************************************** + + +import math +import typing as tp +from typing import Any, Dict, List, Optional + +import torch +from torch import nn +from torch.nn import functional as F + + +class _ScaledEmbedding(torch.nn.Module): + r"""Make continuous embeddings and boost learning rate + + Args: + num_embeddings (int): number of embeddings + embedding_dim (int): embedding dimensions + scale (float, optional): amount to scale learning rate (Default: 10.0) + smooth (bool, optional): choose to apply smoothing (Default: ``False``) + """ + + def __init__(self, num_embeddings: int, embedding_dim: int, scale: float = 10.0, smooth: bool = False): + super().__init__() + self.embedding = nn.Embedding(num_embeddings, embedding_dim) + if smooth: + weight = torch.cumsum(self.embedding.weight.data, dim=0) + # when summing gaussian, scale raises as sqrt(n), so we normalize by that. + weight = weight / torch.arange(1, num_embeddings + 1).sqrt()[:, None] + self.embedding.weight.data[:] = weight + self.embedding.weight.data /= scale + self.scale = scale + + @property + def weight(self) -> torch.Tensor: + return self.embedding.weight * self.scale + + def forward(self, x: torch.Tensor) -> torch.Tensor: + r"""Forward pass for embedding with scale. + Args: + x (torch.Tensor): input tensor of shape `(num_embeddings)` + + Returns: + (Tensor): + Embedding output of shape `(num_embeddings, embedding_dim)` + """ + out = self.embedding(x) * self.scale + return out + + +class _HEncLayer(torch.nn.Module): + + r"""Encoder layer. This used both by the time and the frequency branch. + Args: + chin (int): number of input channels. + chout (int): number of output channels. + kernel_size (int, optional): Kernel size for encoder (Default: 8) + stride (int, optional): Stride for encoder layer (Default: 4) + norm_groups (int, optional): number of groups for group norm. (Default: 4) + empty (bool, optional): used to make a layer with just the first conv. this is used + before merging the time and freq. branches. (Default: ``False``) + freq (bool, optional): boolean for whether conv layer is for frequency domain (Default: ``True``) + norm_type (string, optional): Norm type, either ``group_norm `` or ``none`` (Default: ``group_norm``) + context (int, optional): context size for the 1x1 conv. (Default: 0) + dconv_kw (Dict[str, Any] or None, optional): dictionary of kwargs for the DConv class. (Default: ``None``) + pad (bool, optional): true to pad the input. Padding is done so that the output size is + always the input size / stride. (Default: ``True``) + """ + + def __init__( + self, + chin: int, + chout: int, + kernel_size: int = 8, + stride: int = 4, + norm_groups: int = 4, + empty: bool = False, + freq: bool = True, + norm_type: str = "group_norm", + context: int = 0, + dconv_kw: Optional[Dict[str, Any]] = None, + pad: bool = True, + ): + super().__init__() + if dconv_kw is None: + dconv_kw = {} + norm_fn = lambda d: nn.Identity() # noqa + if norm_type == "group_norm": + norm_fn = lambda d: nn.GroupNorm(norm_groups, d) # noqa + pad_val = kernel_size // 4 if pad else 0 + klass = nn.Conv1d + self.freq = freq + self.kernel_size = kernel_size + self.stride = stride + self.empty = empty + self.pad = pad_val + if freq: + kernel_size = [kernel_size, 1] + stride = [stride, 1] + pad_val = [pad_val, 0] + klass = nn.Conv2d + self.conv = klass(chin, chout, kernel_size, stride, pad_val) + self.norm1 = norm_fn(chout) + + if self.empty: + self.rewrite = nn.Identity() + self.norm2 = nn.Identity() + self.dconv = nn.Identity() + else: + self.rewrite = klass(chout, 2 * chout, 1 + 2 * context, 1, context) + self.norm2 = norm_fn(2 * chout) + self.dconv = _DConv(chout, **dconv_kw) + + def forward(self, x: torch.Tensor, inject: Optional[torch.Tensor] = None) -> torch.Tensor: + r"""Forward pass for encoding layer. + + Size depends on whether frequency or time + + Args: + x (torch.Tensor): tensor input of shape `(B, C, F, T)` for frequency and shape + `(B, C, T)` for time + inject (torch.Tensor, optional): on last layer, combine frequency and time branches through inject param, + same shape as x (default: ``None``) + + Returns: + Tensor + output tensor after encoder layer of shape `(B, C, F / stride, T)` for frequency + and shape `(B, C, ceil(T / stride))` for time + """ + + if not self.freq and x.dim() == 4: + B, C, Fr, T = x.shape + x = x.view(B, -1, T) + + if not self.freq: + le = x.shape[-1] + if not le % self.stride == 0: + x = F.pad(x, (0, self.stride - (le % self.stride))) + y = self.conv(x) + if self.empty: + return y + if inject is not None: + if inject.shape[-1] != y.shape[-1]: + raise ValueError("Injection shapes do not align") + if inject.dim() == 3 and y.dim() == 4: + inject = inject[:, :, None] + y = y + inject + y = F.gelu(self.norm1(y)) + if self.freq: + B, C, Fr, T = y.shape + y = y.permute(0, 2, 1, 3).reshape(-1, C, T) + y = self.dconv(y) + y = y.view(B, Fr, C, T).permute(0, 2, 1, 3) + else: + y = self.dconv(y) + z = self.norm2(self.rewrite(y)) + z = F.glu(z, dim=1) + return z + + +class _HDecLayer(torch.nn.Module): + r"""Decoder layer. This used both by the time and the frequency branches. + Args: + chin (int): number of input channels. + chout (int): number of output channels. + last (bool, optional): whether current layer is final layer (Default: ``False``) + kernel_size (int, optional): Kernel size for encoder (Default: 8) + stride (int): Stride for encoder layer (Default: 4) + norm_groups (int, optional): number of groups for group norm. (Default: 1) + empty (bool, optional): used to make a layer with just the first conv. this is used + before merging the time and freq. branches. (Default: ``False``) + freq (bool, optional): boolean for whether conv layer is for frequency (Default: ``True``) + norm_type (str, optional): Norm type, either ``group_norm `` or ``none`` (Default: ``group_norm``) + context (int, optional): context size for the 1x1 conv. (Default: 1) + dconv_kw (Dict[str, Any] or None, optional): dictionary of kwargs for the DConv class. (Default: ``None``) + pad (bool, optional): true to pad the input. Padding is done so that the output size is + always the input size / stride. (Default: ``True``) + """ + + def __init__( + self, + chin: int, + chout: int, + last: bool = False, + kernel_size: int = 8, + stride: int = 4, + norm_groups: int = 1, + empty: bool = False, + freq: bool = True, + norm_type: str = "group_norm", + context: int = 1, + dconv_kw: Optional[Dict[str, Any]] = None, + pad: bool = True, + ): + super().__init__() + if dconv_kw is None: + dconv_kw = {} + norm_fn = lambda d: nn.Identity() # noqa + if norm_type == "group_norm": + norm_fn = lambda d: nn.GroupNorm(norm_groups, d) # noqa + if pad: + if (kernel_size - stride) % 2 != 0: + raise ValueError("Kernel size and stride do not align") + pad = (kernel_size - stride) // 2 + else: + pad = 0 + self.pad = pad + self.last = last + self.freq = freq + self.chin = chin + self.empty = empty + self.stride = stride + self.kernel_size = kernel_size + klass = nn.Conv1d + klass_tr = nn.ConvTranspose1d + if freq: + kernel_size = [kernel_size, 1] + stride = [stride, 1] + klass = nn.Conv2d + klass_tr = nn.ConvTranspose2d + self.conv_tr = klass_tr(chin, chout, kernel_size, stride) + self.norm2 = norm_fn(chout) + if self.empty: + self.rewrite = nn.Identity() + self.norm1 = nn.Identity() + else: + self.rewrite = klass(chin, 2 * chin, 1 + 2 * context, 1, context) + self.norm1 = norm_fn(2 * chin) + + def forward(self, x: torch.Tensor, skip: Optional[torch.Tensor], length): + r"""Forward pass for decoding layer. + + Size depends on whether frequency or time + + Args: + x (torch.Tensor): tensor input of shape `(B, C, F, T)` for frequency and shape + `(B, C, T)` for time + skip (torch.Tensor, optional): on first layer, separate frequency and time branches using param + (default: ``None``) + length (int): Size of tensor for output + + Returns: + (Tensor, Tensor): + Tensor + output tensor after decoder layer of shape `(B, C, F * stride, T)` for frequency domain except last + frequency layer shape is `(B, C, kernel_size, T)`. Shape is `(B, C, stride * T)` + for time domain. + Tensor + contains the output just before final transposed convolution, which is used when the + freq. and time branch separate. Otherwise, does not matter. Shape is + `(B, C, F, T)` for frequency and `(B, C, T)` for time. + """ + if self.freq and x.dim() == 3: + B, C, T = x.shape + x = x.view(B, self.chin, -1, T) + + if not self.empty: + x = x + skip + y = F.glu(self.norm1(self.rewrite(x)), dim=1) + else: + y = x + if skip is not None: + raise ValueError("Skip must be none when empty is true.") + + z = self.norm2(self.conv_tr(y)) + if self.freq: + if self.pad: + z = z[..., self.pad : -self.pad, :] + else: + z = z[..., self.pad : self.pad + length] + if z.shape[-1] != length: + raise ValueError("Last index of z must be equal to length") + if not self.last: + z = F.gelu(z) + + return z, y + + +class HDemucs(torch.nn.Module): + r"""Hybrid Demucs model from + *Hybrid Spectrogram and Waveform Source Separation* :cite:`defossez2021hybrid`. + + See Also: + * :class:`torchaudio.pipelines.SourceSeparationBundle`: Source separation pipeline with pre-trained models. + + Args: + sources (List[str]): list of source names. List can contain the following source + options: [``"bass"``, ``"drums"``, ``"other"``, ``"mixture"``, ``"vocals"``]. + audio_channels (int, optional): input/output audio channels. (Default: 2) + channels (int, optional): initial number of hidden channels. (Default: 48) + growth (int, optional): increase the number of hidden channels by this factor at each layer. (Default: 2) + nfft (int, optional): number of fft bins. Note that changing this requires careful computation of + various shape parameters and will not work out of the box for hybrid models. (Default: 4096) + depth (int, optional): number of layers in encoder and decoder (Default: 6) + freq_emb (float, optional): add frequency embedding after the first frequency layer if > 0, + the actual value controls the weight of the embedding. (Default: 0.2) + emb_scale (int, optional): equivalent to scaling the embedding learning rate (Default: 10) + emb_smooth (bool, optional): initialize the embedding with a smooth one (with respect to frequencies). + (Default: ``True``) + kernel_size (int, optional): kernel_size for encoder and decoder layers. (Default: 8) + time_stride (int, optional): stride for the final time layer, after the merge. (Default: 2) + stride (int, optional): stride for encoder and decoder layers. (Default: 4) + context (int, optional): context for 1x1 conv in the decoder. (Default: 4) + context_enc (int, optional): context for 1x1 conv in the encoder. (Default: 0) + norm_starts (int, optional): layer at which group norm starts being used. + decoder layers are numbered in reverse order. (Default: 4) + norm_groups (int, optional): number of groups for group norm. (Default: 4) + dconv_depth (int, optional): depth of residual DConv branch. (Default: 2) + dconv_comp (int, optional): compression of DConv branch. (Default: 4) + dconv_attn (int, optional): adds attention layers in DConv branch starting at this layer. (Default: 4) + dconv_lstm (int, optional): adds a LSTM layer in DConv branch starting at this layer. (Default: 4) + dconv_init (float, optional): initial scale for the DConv branch LayerScale. (Default: 1e-4) + """ + + def __init__( + self, + sources: List[str], + audio_channels: int = 2, + channels: int = 48, + growth: int = 2, + nfft: int = 4096, + depth: int = 6, + freq_emb: float = 0.2, + emb_scale: int = 10, + emb_smooth: bool = True, + kernel_size: int = 8, + time_stride: int = 2, + stride: int = 4, + context: int = 1, + context_enc: int = 0, + norm_starts: int = 4, + norm_groups: int = 4, + dconv_depth: int = 2, + dconv_comp: int = 4, + dconv_attn: int = 4, + dconv_lstm: int = 4, + dconv_init: float = 1e-4, + ): + super().__init__() + self.depth = depth + self.nfft = nfft + self.audio_channels = audio_channels + self.sources = sources + self.kernel_size = kernel_size + self.context = context + self.stride = stride + self.channels = channels + + self.hop_length = self.nfft // 4 + self.freq_emb = None + + self.freq_encoder = nn.ModuleList() + self.freq_decoder = nn.ModuleList() + + self.time_encoder = nn.ModuleList() + self.time_decoder = nn.ModuleList() + + chin = audio_channels + chin_z = chin * 2 # number of channels for the freq branch + chout = channels + chout_z = channels + freqs = self.nfft // 2 + + for index in range(self.depth): + lstm = index >= dconv_lstm + attn = index >= dconv_attn + norm_type = "group_norm" if index >= norm_starts else "none" + freq = freqs > 1 + stri = stride + ker = kernel_size + if not freq: + if freqs != 1: + raise ValueError("When freq is false, freqs must be 1.") + ker = time_stride * 2 + stri = time_stride + + pad = True + last_freq = False + if freq and freqs <= kernel_size: + ker = freqs + pad = False + last_freq = True + + kw = { + "kernel_size": ker, + "stride": stri, + "freq": freq, + "pad": pad, + "norm_type": norm_type, + "norm_groups": norm_groups, + "dconv_kw": { + "lstm": lstm, + "attn": attn, + "depth": dconv_depth, + "compress": dconv_comp, + "init": dconv_init, + }, + } + kwt = dict(kw) + kwt["freq"] = 0 + kwt["kernel_size"] = kernel_size + kwt["stride"] = stride + kwt["pad"] = True + kw_dec = dict(kw) + + if last_freq: + chout_z = max(chout, chout_z) + chout = chout_z + + enc = _HEncLayer(chin_z, chout_z, context=context_enc, **kw) + if freq: + if last_freq is True and nfft == 2048: + kwt["stride"] = 2 + kwt["kernel_size"] = 4 + tenc = _HEncLayer(chin, chout, context=context_enc, empty=last_freq, **kwt) + self.time_encoder.append(tenc) + + self.freq_encoder.append(enc) + if index == 0: + chin = self.audio_channels * len(self.sources) + chin_z = chin * 2 + dec = _HDecLayer(chout_z, chin_z, last=index == 0, context=context, **kw_dec) + if freq: + tdec = _HDecLayer(chout, chin, empty=last_freq, last=index == 0, context=context, **kwt) + self.time_decoder.insert(0, tdec) + self.freq_decoder.insert(0, dec) + + chin = chout + chin_z = chout_z + chout = int(growth * chout) + chout_z = int(growth * chout_z) + if freq: + if freqs <= kernel_size: + freqs = 1 + else: + freqs //= stride + if index == 0 and freq_emb: + self.freq_emb = _ScaledEmbedding(freqs, chin_z, smooth=emb_smooth, scale=emb_scale) + self.freq_emb_scale = freq_emb + + _rescale_module(self) + + def _spec(self, x): + hl = self.hop_length + nfft = self.nfft + x0 = x # noqa + + # We re-pad the signal in order to keep the property + # that the size of the output is exactly the size of the input + # divided by the stride (here hop_length), when divisible. + # This is achieved by padding by 1/4th of the kernel size (here nfft). + # which is not supported by torch.stft. + # Having all convolution operations follow this convention allow to easily + # align the time and frequency branches later on. + if hl != nfft // 4: + raise ValueError("Hop length must be nfft // 4") + le = int(math.ceil(x.shape[-1] / hl)) + pad = hl // 2 * 3 + x = self._pad1d(x, pad, pad + le * hl - x.shape[-1], mode="reflect") + + z = _spectro(x, nfft, hl)[..., :-1, :] + if z.shape[-1] != le + 4: + raise ValueError("Spectrogram's last dimension must be 4 + input size divided by stride") + z = z[..., 2 : 2 + le] + return z + + def _ispec(self, z, length=None): + hl = self.hop_length + z = F.pad(z, [0, 0, 0, 1]) + z = F.pad(z, [2, 2]) + pad = hl // 2 * 3 + le = hl * int(math.ceil(length / hl)) + 2 * pad + x = _ispectro(z, hl, length=le) + x = x[..., pad : pad + length] + return x + + def _pad1d(self, x: torch.Tensor, padding_left: int, padding_right: int, mode: str = "zero", value: float = 0.0): + """Wrapper around F.pad, in order for reflect padding when num_frames is shorter than max_pad. + Add extra zero padding around in order for padding to not break.""" + length = x.shape[-1] + if mode == "reflect": + max_pad = max(padding_left, padding_right) + if length <= max_pad: + x = F.pad(x, (0, max_pad - length + 1)) + return F.pad(x, (padding_left, padding_right), mode, value) + + def _magnitude(self, z): + # move the complex dimension to the channel one. + B, C, Fr, T = z.shape + m = torch.view_as_real(z).permute(0, 1, 4, 2, 3) + m = m.reshape(B, C * 2, Fr, T) + return m + + def _mask(self, m): + # `m` is a full spectrogram and `z` is ignored. + B, S, C, Fr, T = m.shape + out = m.view(B, S, -1, 2, Fr, T).permute(0, 1, 2, 4, 5, 3) + out = torch.view_as_complex(out.contiguous()) + return out + + def forward(self, input: torch.Tensor): + + r"""HDemucs forward call + + Args: + input (torch.Tensor): input mixed tensor of shape `(batch_size, channel, num_frames)` + + Returns: + Tensor + output tensor split into sources of shape `(batch_size, num_sources, channel, num_frames)` + """ + + if input.ndim != 3: + raise ValueError(f"Expected 3D tensor with dimensions (batch, channel, frames). Found: {input.shape}") + + if input.shape[1] != self.audio_channels: + raise ValueError( + f"The channel dimension of input Tensor must match `audio_channels` of HDemucs model. " + f"Found:{input.shape[1]}." + ) + + x = input + length = x.shape[-1] + + z = self._spec(input) + mag = self._magnitude(z) + x = mag + + B, C, Fq, T = x.shape + + # unlike previous Demucs, we always normalize because it is easier. + mean = x.mean(dim=(1, 2, 3), keepdim=True) + std = x.std(dim=(1, 2, 3), keepdim=True) + x = (x - mean) / (1e-5 + std) + # x will be the freq. branch input. + + # Prepare the time branch input. + xt = input + meant = xt.mean(dim=(1, 2), keepdim=True) + stdt = xt.std(dim=(1, 2), keepdim=True) + xt = (xt - meant) / (1e-5 + stdt) + + saved = [] # skip connections, freq. + saved_t = [] # skip connections, time. + lengths: List[int] = [] # saved lengths to properly remove padding, freq branch. + lengths_t: List[int] = [] # saved lengths for time branch. + + for idx, encode in enumerate(self.freq_encoder): + lengths.append(x.shape[-1]) + inject = None + if idx < len(self.time_encoder): + # we have not yet merged branches. + lengths_t.append(xt.shape[-1]) + tenc = self.time_encoder[idx] + xt = tenc(xt) + if not tenc.empty: + # save for skip connection + saved_t.append(xt) + else: + # tenc contains just the first conv., so that now time and freq. + # branches have the same shape and can be merged. + inject = xt + x = encode(x, inject) + if idx == 0 and self.freq_emb is not None: + # add frequency embedding to allow for non equivariant convolutions + # over the frequency axis. + frs = torch.arange(x.shape[-2], device=x.device) + emb = self.freq_emb(frs).t()[None, :, :, None].expand_as(x) + x = x + self.freq_emb_scale * emb + + saved.append(x) + + x = torch.zeros_like(x) + xt = torch.zeros_like(x) + # initialize everything to zero (signal will go through u-net skips). + + for idx, decode in enumerate(self.freq_decoder): + skip = saved.pop(-1) + x, pre = decode(x, skip, lengths.pop(-1)) + # `pre` contains the output just before final transposed convolution, + # which is used when the freq. and time branch separate. + offset = self.depth - len(self.time_decoder) + if idx >= offset: + tdec = self.time_decoder[idx - offset] + length_t = lengths_t.pop(-1) + if tdec.empty: + if pre.shape[2] != 1: + raise ValueError(f"If tdec empty is True, pre shape does not match {pre.shape}") + pre = pre[:, :, 0] + xt, _ = tdec(pre, None, length_t) + else: + skip = saved_t.pop(-1) + xt, _ = tdec(xt, skip, length_t) + + if len(saved) != 0: + raise AssertionError("saved is not empty") + if len(lengths_t) != 0: + raise AssertionError("lengths_t is not empty") + if len(saved_t) != 0: + raise AssertionError("saved_t is not empty") + + S = len(self.sources) + x = x.view(B, S, -1, Fq, T) + x = x * std[:, None] + mean[:, None] + + zout = self._mask(x) + x = self._ispec(zout, length) + + xt = xt.view(B, S, -1, length) + xt = xt * stdt[:, None] + meant[:, None] + x = xt + x + return x + + +class _DConv(torch.nn.Module): + r""" + New residual branches in each encoder layer. + This alternates dilated convolutions, potentially with LSTMs and attention. + Also before entering each residual branch, dimension is projected on a smaller subspace, + e.g. of dim `channels // compress`. + + Args: + channels (int): input/output channels for residual branch. + compress (float, optional): amount of channel compression inside the branch. (default: 4) + depth (int, optional): number of layers in the residual branch. Each layer has its own + projection, and potentially LSTM and attention.(default: 2) + init (float, optional): initial scale for LayerNorm. (default: 1e-4) + norm_type (bool, optional): Norm type, either ``group_norm `` or ``none`` (Default: ``group_norm``) + attn (bool, optional): use LocalAttention. (Default: ``False``) + heads (int, optional): number of heads for the LocalAttention. (default: 4) + ndecay (int, optional): number of decay controls in the LocalAttention. (default: 4) + lstm (bool, optional): use LSTM. (Default: ``False``) + kernel_size (int, optional): kernel size for the (dilated) convolutions. (default: 3) + """ + + def __init__( + self, + channels: int, + compress: float = 4, + depth: int = 2, + init: float = 1e-4, + norm_type: str = "group_norm", + attn: bool = False, + heads: int = 4, + ndecay: int = 4, + lstm: bool = False, + kernel_size: int = 3, + ): + + super().__init__() + if kernel_size % 2 == 0: + raise ValueError("Kernel size should not be divisible by 2") + self.channels = channels + self.compress = compress + self.depth = abs(depth) + dilate = depth > 0 + + norm_fn: tp.Callable[[int], nn.Module] + norm_fn = lambda d: nn.Identity() # noqa + if norm_type == "group_norm": + norm_fn = lambda d: nn.GroupNorm(1, d) # noqa + + hidden = int(channels / compress) + + act = nn.GELU + + self.layers = nn.ModuleList([]) + for d in range(self.depth): + dilation = pow(2, d) if dilate else 1 + padding = dilation * (kernel_size // 2) + mods = [ + nn.Conv1d(channels, hidden, kernel_size, dilation=dilation, padding=padding), + norm_fn(hidden), + act(), + nn.Conv1d(hidden, 2 * channels, 1), + norm_fn(2 * channels), + nn.GLU(1), + _LayerScale(channels, init), + ] + if attn: + mods.insert(3, _LocalState(hidden, heads=heads, ndecay=ndecay)) + if lstm: + mods.insert(3, _BLSTM(hidden, layers=2, skip=True)) + layer = nn.Sequential(*mods) + self.layers.append(layer) + + def forward(self, x): + r"""DConv forward call + + Args: + x (torch.Tensor): input tensor for convolution + + Returns: + Tensor + Output after being run through layers. + """ + for layer in self.layers: + x = x + layer(x) + return x + + +class _BLSTM(torch.nn.Module): + r""" + BiLSTM with same hidden units as input dim. + If `max_steps` is not None, input will be splitting in overlapping + chunks and the LSTM applied separately on each chunk. + Args: + dim (int): dimensions at LSTM layer. + layers (int, optional): number of LSTM layers. (default: 1) + skip (bool, optional): (default: ``False``) + """ + + def __init__(self, dim, layers: int = 1, skip: bool = False): + super().__init__() + self.max_steps = 200 + self.lstm = nn.LSTM(bidirectional=True, num_layers=layers, hidden_size=dim, input_size=dim) + self.linear = nn.Linear(2 * dim, dim) + self.skip = skip + + def forward(self, x: torch.Tensor) -> torch.Tensor: + r"""BLSTM forward call + + Args: + x (torch.Tensor): input tensor for BLSTM shape is `(batch_size, dim, time_steps)` + + Returns: + Tensor + Output after being run through bidirectional LSTM. Shape is `(batch_size, dim, time_steps)` + """ + B, C, T = x.shape + y = x + framed = False + width = 0 + stride = 0 + nframes = 0 + if self.max_steps is not None and T > self.max_steps: + width = self.max_steps + stride = width // 2 + frames = _unfold(x, width, stride) + nframes = frames.shape[2] + framed = True + x = frames.permute(0, 2, 1, 3).reshape(-1, C, width) + + x = x.permute(2, 0, 1) + + x = self.lstm(x)[0] + x = self.linear(x) + x = x.permute(1, 2, 0) + if framed: + out = [] + frames = x.reshape(B, -1, C, width) + limit = stride // 2 + for k in range(nframes): + if k == 0: + out.append(frames[:, k, :, :-limit]) + elif k == nframes - 1: + out.append(frames[:, k, :, limit:]) + else: + out.append(frames[:, k, :, limit:-limit]) + out = torch.cat(out, -1) + out = out[..., :T] + x = out + if self.skip: + x = x + y + + return x + + +class _LocalState(nn.Module): + """Local state allows to have attention based only on data (no positional embedding), + but while setting a constraint on the time window (e.g. decaying penalty term). + Also a failed experiments with trying to provide some frequency based attention. + """ + + def __init__(self, channels: int, heads: int = 4, ndecay: int = 4): + r""" + Args: + channels (int): Size of Conv1d layers. + heads (int, optional): (default: 4) + ndecay (int, optional): (default: 4) + """ + super(_LocalState, self).__init__() + if channels % heads != 0: + raise ValueError("Channels must be divisible by heads.") + self.heads = heads + self.ndecay = ndecay + self.content = nn.Conv1d(channels, channels, 1) + self.query = nn.Conv1d(channels, channels, 1) + self.key = nn.Conv1d(channels, channels, 1) + + self.query_decay = nn.Conv1d(channels, heads * ndecay, 1) + if ndecay: + # Initialize decay close to zero (there is a sigmoid), for maximum initial window. + self.query_decay.weight.data *= 0.01 + if self.query_decay.bias is None: + raise ValueError("bias must not be None.") + self.query_decay.bias.data[:] = -2 + self.proj = nn.Conv1d(channels + heads * 0, channels, 1) + + def forward(self, x: torch.Tensor) -> torch.Tensor: + r"""LocalState forward call + + Args: + x (torch.Tensor): input tensor for LocalState + + Returns: + Tensor + Output after being run through LocalState layer. + """ + B, C, T = x.shape + heads = self.heads + indexes = torch.arange(T, device=x.device, dtype=x.dtype) + # left index are keys, right index are queries + delta = indexes[:, None] - indexes[None, :] + + queries = self.query(x).view(B, heads, -1, T) + keys = self.key(x).view(B, heads, -1, T) + # t are keys, s are queries + dots = torch.einsum("bhct,bhcs->bhts", keys, queries) + dots /= math.sqrt(keys.shape[2]) + if self.ndecay: + decays = torch.arange(1, self.ndecay + 1, device=x.device, dtype=x.dtype) + decay_q = self.query_decay(x).view(B, heads, -1, T) + decay_q = torch.sigmoid(decay_q) / 2 + decay_kernel = -decays.view(-1, 1, 1) * delta.abs() / math.sqrt(self.ndecay) + dots += torch.einsum("fts,bhfs->bhts", decay_kernel, decay_q) + + # Kill self reference. + dots.masked_fill_(torch.eye(T, device=dots.device, dtype=torch.bool), -100) + weights = torch.softmax(dots, dim=2) + + content = self.content(x).view(B, heads, -1, T) + result = torch.einsum("bhts,bhct->bhcs", weights, content) + result = result.reshape(B, -1, T) + return x + self.proj(result) + + +class _LayerScale(nn.Module): + """Layer scale from [Touvron et al 2021] (https://arxiv.org/pdf/2103.17239.pdf). + This rescales diagonally residual outputs close to 0 initially, then learnt. + """ + + def __init__(self, channels: int, init: float = 0): + r""" + Args: + channels (int): Size of rescaling + init (float, optional): Scale to default to (default: 0) + """ + super().__init__() + self.scale = nn.Parameter(torch.zeros(channels, requires_grad=True)) + self.scale.data[:] = init + + def forward(self, x: torch.Tensor) -> torch.Tensor: + r"""LayerScale forward call + + Args: + x (torch.Tensor): input tensor for LayerScale + + Returns: + Tensor + Output after rescaling tensor. + """ + return self.scale[:, None] * x + + +def _unfold(a: torch.Tensor, kernel_size: int, stride: int) -> torch.Tensor: + """Given input of size [*OT, T], output Tensor of size [*OT, F, K] + with K the kernel size, by extracting frames with the given stride. + This will pad the input so that `F = ceil(T / K)`. + see https://github.com/pytorch/pytorch/issues/60466 + """ + shape = list(a.shape[:-1]) + length = int(a.shape[-1]) + n_frames = math.ceil(length / stride) + tgt_length = (n_frames - 1) * stride + kernel_size + a = F.pad(input=a, pad=[0, tgt_length - length]) + strides = [a.stride(dim) for dim in range(a.dim())] + if strides[-1] != 1: + raise ValueError("Data should be contiguous.") + strides = strides[:-1] + [stride, 1] + shape.append(n_frames) + shape.append(kernel_size) + return a.as_strided(shape, strides) + + +def _rescale_module(module): + r""" + Rescales initial weight scale for all models within the module. + """ + for sub in module.modules(): + if isinstance(sub, (nn.Conv1d, nn.ConvTranspose1d, nn.Conv2d, nn.ConvTranspose2d)): + std = sub.weight.std().detach() + scale = (std / 0.1) ** 0.5 + sub.weight.data /= scale + if sub.bias is not None: + sub.bias.data /= scale + + +def _spectro(x: torch.Tensor, n_fft: int = 512, hop_length: int = 0, pad: int = 0) -> torch.Tensor: + other = list(x.shape[:-1]) + length = int(x.shape[-1]) + x = x.reshape(-1, length) + z = torch.stft( + x, + n_fft * (1 + pad), + hop_length, + window=torch.hann_window(n_fft).to(x), + win_length=n_fft, + normalized=True, + center=True, + return_complex=True, + pad_mode="reflect", + ) + _, freqs, frame = z.shape + other.extend([freqs, frame]) + return z.view(other) + + +def _ispectro(z: torch.Tensor, hop_length: int = 0, length: int = 0, pad: int = 0) -> torch.Tensor: + other = list(z.shape[:-2]) + freqs = int(z.shape[-2]) + frames = int(z.shape[-1]) + + n_fft = 2 * freqs - 2 + z = z.view(-1, freqs, frames) + win_length = n_fft // (1 + pad) + x = torch.istft( + z, + n_fft, + hop_length, + window=torch.hann_window(win_length).to(z.real), + win_length=win_length, + normalized=True, + length=length, + center=True, + ) + _, length = x.shape + other.append(length) + return x.view(other) + + +def hdemucs_low(sources: List[str]) -> HDemucs: + """Builds low nfft (1024) version of :class:`HDemucs`, suitable for sample rates around 8 kHz. + + Args: + sources (List[str]): See :py:func:`HDemucs`. + + Returns: + HDemucs: + HDemucs model. + """ + + return HDemucs(sources=sources, nfft=1024, depth=5) + + +def hdemucs_medium(sources: List[str]) -> HDemucs: + r"""Builds medium nfft (2048) version of :class:`HDemucs`, suitable for sample rates of 16-32 kHz. + + .. note:: + + Medium HDemucs has not been tested against the original Hybrid Demucs as this nfft and depth configuration is + not compatible with the original implementation in https://github.com/facebookresearch/demucs + + Args: + sources (List[str]): See :py:func:`HDemucs`. + + Returns: + HDemucs: + HDemucs model. + """ + + return HDemucs(sources=sources, nfft=2048, depth=6) + + +def hdemucs_high(sources: List[str]) -> HDemucs: + r"""Builds medium nfft (4096) version of :class:`HDemucs`, suitable for sample rates of 44.1-48 kHz. + + Args: + sources (List[str]): See :py:func:`HDemucs`. + + Returns: + HDemucs: + HDemucs model. + """ + + return HDemucs(sources=sources, nfft=4096, depth=6) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/conformer.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/conformer.py new file mode 100644 index 0000000000000000000000000000000000000000..3da0d24fac977a65cc97f4b0afae0ab64932d4b2 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/conformer.py @@ -0,0 +1,293 @@ +from typing import Optional, Tuple + +import torch + + +__all__ = ["Conformer"] + + +def _lengths_to_padding_mask(lengths: torch.Tensor) -> torch.Tensor: + batch_size = lengths.shape[0] + max_length = int(torch.max(lengths).item()) + padding_mask = torch.arange(max_length, device=lengths.device, dtype=lengths.dtype).expand( + batch_size, max_length + ) >= lengths.unsqueeze(1) + return padding_mask + + +class _ConvolutionModule(torch.nn.Module): + r"""Conformer convolution module. + + Args: + input_dim (int): input dimension. + num_channels (int): number of depthwise convolution layer input channels. + depthwise_kernel_size (int): kernel size of depthwise convolution layer. + dropout (float, optional): dropout probability. (Default: 0.0) + bias (bool, optional): indicates whether to add bias term to each convolution layer. (Default: ``False``) + use_group_norm (bool, optional): use GroupNorm rather than BatchNorm. (Default: ``False``) + """ + + def __init__( + self, + input_dim: int, + num_channels: int, + depthwise_kernel_size: int, + dropout: float = 0.0, + bias: bool = False, + use_group_norm: bool = False, + ) -> None: + super().__init__() + if (depthwise_kernel_size - 1) % 2 != 0: + raise ValueError("depthwise_kernel_size must be odd to achieve 'SAME' padding.") + self.layer_norm = torch.nn.LayerNorm(input_dim) + self.sequential = torch.nn.Sequential( + torch.nn.Conv1d( + input_dim, + 2 * num_channels, + 1, + stride=1, + padding=0, + bias=bias, + ), + torch.nn.GLU(dim=1), + torch.nn.Conv1d( + num_channels, + num_channels, + depthwise_kernel_size, + stride=1, + padding=(depthwise_kernel_size - 1) // 2, + groups=num_channels, + bias=bias, + ), + torch.nn.GroupNorm(num_groups=1, num_channels=num_channels) + if use_group_norm + else torch.nn.BatchNorm1d(num_channels), + torch.nn.SiLU(), + torch.nn.Conv1d( + num_channels, + input_dim, + kernel_size=1, + stride=1, + padding=0, + bias=bias, + ), + torch.nn.Dropout(dropout), + ) + + def forward(self, input: torch.Tensor) -> torch.Tensor: + r""" + Args: + input (torch.Tensor): with shape `(B, T, D)`. + + Returns: + torch.Tensor: output, with shape `(B, T, D)`. + """ + x = self.layer_norm(input) + x = x.transpose(1, 2) + x = self.sequential(x) + return x.transpose(1, 2) + + +class _FeedForwardModule(torch.nn.Module): + r"""Positionwise feed forward layer. + + Args: + input_dim (int): input dimension. + hidden_dim (int): hidden dimension. + dropout (float, optional): dropout probability. (Default: 0.0) + """ + + def __init__(self, input_dim: int, hidden_dim: int, dropout: float = 0.0) -> None: + super().__init__() + self.sequential = torch.nn.Sequential( + torch.nn.LayerNorm(input_dim), + torch.nn.Linear(input_dim, hidden_dim, bias=True), + torch.nn.SiLU(), + torch.nn.Dropout(dropout), + torch.nn.Linear(hidden_dim, input_dim, bias=True), + torch.nn.Dropout(dropout), + ) + + def forward(self, input: torch.Tensor) -> torch.Tensor: + r""" + Args: + input (torch.Tensor): with shape `(*, D)`. + + Returns: + torch.Tensor: output, with shape `(*, D)`. + """ + return self.sequential(input) + + +class ConformerLayer(torch.nn.Module): + r"""Conformer layer that constitutes Conformer. + + Args: + input_dim (int): input dimension. + ffn_dim (int): hidden layer dimension of feedforward network. + num_attention_heads (int): number of attention heads. + depthwise_conv_kernel_size (int): kernel size of depthwise convolution layer. + dropout (float, optional): dropout probability. (Default: 0.0) + use_group_norm (bool, optional): use ``GroupNorm`` rather than ``BatchNorm1d`` + in the convolution module. (Default: ``False``) + convolution_first (bool, optional): apply the convolution module ahead of + the attention module. (Default: ``False``) + """ + + def __init__( + self, + input_dim: int, + ffn_dim: int, + num_attention_heads: int, + depthwise_conv_kernel_size: int, + dropout: float = 0.0, + use_group_norm: bool = False, + convolution_first: bool = False, + ) -> None: + super().__init__() + + self.ffn1 = _FeedForwardModule(input_dim, ffn_dim, dropout=dropout) + + self.self_attn_layer_norm = torch.nn.LayerNorm(input_dim) + self.self_attn = torch.nn.MultiheadAttention(input_dim, num_attention_heads, dropout=dropout) + self.self_attn_dropout = torch.nn.Dropout(dropout) + + self.conv_module = _ConvolutionModule( + input_dim=input_dim, + num_channels=input_dim, + depthwise_kernel_size=depthwise_conv_kernel_size, + dropout=dropout, + bias=True, + use_group_norm=use_group_norm, + ) + + self.ffn2 = _FeedForwardModule(input_dim, ffn_dim, dropout=dropout) + self.final_layer_norm = torch.nn.LayerNorm(input_dim) + self.convolution_first = convolution_first + + def _apply_convolution(self, input: torch.Tensor) -> torch.Tensor: + residual = input + input = input.transpose(0, 1) + input = self.conv_module(input) + input = input.transpose(0, 1) + input = residual + input + return input + + def forward(self, input: torch.Tensor, key_padding_mask: Optional[torch.Tensor]) -> torch.Tensor: + r""" + Args: + input (torch.Tensor): input, with shape `(T, B, D)`. + key_padding_mask (torch.Tensor or None): key padding mask to use in self attention layer. + + Returns: + torch.Tensor: output, with shape `(T, B, D)`. + """ + residual = input + x = self.ffn1(input) + x = x * 0.5 + residual + + if self.convolution_first: + x = self._apply_convolution(x) + + residual = x + x = self.self_attn_layer_norm(x) + x, _ = self.self_attn( + query=x, + key=x, + value=x, + key_padding_mask=key_padding_mask, + need_weights=False, + ) + x = self.self_attn_dropout(x) + x = x + residual + + if not self.convolution_first: + x = self._apply_convolution(x) + + residual = x + x = self.ffn2(x) + x = x * 0.5 + residual + + x = self.final_layer_norm(x) + return x + + +class Conformer(torch.nn.Module): + r"""Conformer architecture introduced in + *Conformer: Convolution-augmented Transformer for Speech Recognition* + :cite:`gulati2020conformer`. + + Args: + input_dim (int): input dimension. + num_heads (int): number of attention heads in each Conformer layer. + ffn_dim (int): hidden layer dimension of feedforward networks. + num_layers (int): number of Conformer layers to instantiate. + depthwise_conv_kernel_size (int): kernel size of each Conformer layer's depthwise convolution layer. + dropout (float, optional): dropout probability. (Default: 0.0) + use_group_norm (bool, optional): use ``GroupNorm`` rather than ``BatchNorm1d`` + in the convolution module. (Default: ``False``) + convolution_first (bool, optional): apply the convolution module ahead of + the attention module. (Default: ``False``) + + Examples: + >>> conformer = Conformer( + >>> input_dim=80, + >>> num_heads=4, + >>> ffn_dim=128, + >>> num_layers=4, + >>> depthwise_conv_kernel_size=31, + >>> ) + >>> lengths = torch.randint(1, 400, (10,)) # (batch,) + >>> input = torch.rand(10, int(lengths.max()), input_dim) # (batch, num_frames, input_dim) + >>> output = conformer(input, lengths) + """ + + def __init__( + self, + input_dim: int, + num_heads: int, + ffn_dim: int, + num_layers: int, + depthwise_conv_kernel_size: int, + dropout: float = 0.0, + use_group_norm: bool = False, + convolution_first: bool = False, + ): + super().__init__() + + self.conformer_layers = torch.nn.ModuleList( + [ + ConformerLayer( + input_dim, + ffn_dim, + num_heads, + depthwise_conv_kernel_size, + dropout=dropout, + use_group_norm=use_group_norm, + convolution_first=convolution_first, + ) + for _ in range(num_layers) + ] + ) + + def forward(self, input: torch.Tensor, lengths: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]: + r""" + Args: + input (torch.Tensor): with shape `(B, T, input_dim)`. + lengths (torch.Tensor): with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in ``input``. + + Returns: + (torch.Tensor, torch.Tensor) + torch.Tensor + output frames, with shape `(B, T, input_dim)` + torch.Tensor + output lengths, with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in output frames. + """ + encoder_padding_mask = _lengths_to_padding_mask(lengths) + + x = input.transpose(0, 1) + for layer in self.conformer_layers: + x = layer(x, encoder_padding_mask) + return x.transpose(0, 1), lengths diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/conv_tasnet.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/conv_tasnet.py new file mode 100644 index 0000000000000000000000000000000000000000..770746dd46b34c47736e4607d4344672d0335ef2 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/conv_tasnet.py @@ -0,0 +1,330 @@ +"""Implements Conv-TasNet with building blocks of it. + +Based on https://github.com/naplab/Conv-TasNet/tree/e66d82a8f956a69749ec8a4ae382217faa097c5c +""" + +from typing import Optional, Tuple + +import torch + + +class ConvBlock(torch.nn.Module): + """1D Convolutional block. + + Args: + io_channels (int): The number of input/output channels, + hidden_channels (int): The number of channels in the internal layers, . + kernel_size (int): The convolution kernel size of the middle layer,

. + padding (int): Padding value of the convolution in the middle layer. + dilation (int, optional): Dilation value of the convolution in the middle layer. + no_redisual (bool, optional): Disable residual block/output. + + Note: + This implementation corresponds to the "non-causal" setting in the paper. + """ + + def __init__( + self, + io_channels: int, + hidden_channels: int, + kernel_size: int, + padding: int, + dilation: int = 1, + no_residual: bool = False, + ): + super().__init__() + + self.conv_layers = torch.nn.Sequential( + torch.nn.Conv1d(in_channels=io_channels, out_channels=hidden_channels, kernel_size=1), + torch.nn.PReLU(), + torch.nn.GroupNorm(num_groups=1, num_channels=hidden_channels, eps=1e-08), + torch.nn.Conv1d( + in_channels=hidden_channels, + out_channels=hidden_channels, + kernel_size=kernel_size, + padding=padding, + dilation=dilation, + groups=hidden_channels, + ), + torch.nn.PReLU(), + torch.nn.GroupNorm(num_groups=1, num_channels=hidden_channels, eps=1e-08), + ) + + self.res_out = ( + None + if no_residual + else torch.nn.Conv1d(in_channels=hidden_channels, out_channels=io_channels, kernel_size=1) + ) + self.skip_out = torch.nn.Conv1d(in_channels=hidden_channels, out_channels=io_channels, kernel_size=1) + + def forward(self, input: torch.Tensor) -> Tuple[Optional[torch.Tensor], torch.Tensor]: + feature = self.conv_layers(input) + if self.res_out is None: + residual = None + else: + residual = self.res_out(feature) + skip_out = self.skip_out(feature) + return residual, skip_out + + +class MaskGenerator(torch.nn.Module): + """TCN (Temporal Convolution Network) Separation Module + + Generates masks for separation. + + Args: + input_dim (int): Input feature dimension, . + num_sources (int): The number of sources to separate. + kernel_size (int): The convolution kernel size of conv blocks,

. + num_featrs (int): Input/output feature dimenstion of conv blocks, . + num_hidden (int): Intermediate feature dimention of conv blocks, + num_layers (int): The number of conv blocks in one stack, . + num_stacks (int): The number of conv block stacks, . + msk_activate (str): The activation function of the mask output. + + Note: + This implementation corresponds to the "non-causal" setting in the paper. + """ + + def __init__( + self, + input_dim: int, + num_sources: int, + kernel_size: int, + num_feats: int, + num_hidden: int, + num_layers: int, + num_stacks: int, + msk_activate: str, + ): + super().__init__() + + self.input_dim = input_dim + self.num_sources = num_sources + + self.input_norm = torch.nn.GroupNorm(num_groups=1, num_channels=input_dim, eps=1e-8) + self.input_conv = torch.nn.Conv1d(in_channels=input_dim, out_channels=num_feats, kernel_size=1) + + self.receptive_field = 0 + self.conv_layers = torch.nn.ModuleList([]) + for s in range(num_stacks): + for l in range(num_layers): + multi = 2**l + self.conv_layers.append( + ConvBlock( + io_channels=num_feats, + hidden_channels=num_hidden, + kernel_size=kernel_size, + dilation=multi, + padding=multi, + # The last ConvBlock does not need residual + no_residual=(l == (num_layers - 1) and s == (num_stacks - 1)), + ) + ) + self.receptive_field += kernel_size if s == 0 and l == 0 else (kernel_size - 1) * multi + self.output_prelu = torch.nn.PReLU() + self.output_conv = torch.nn.Conv1d( + in_channels=num_feats, + out_channels=input_dim * num_sources, + kernel_size=1, + ) + if msk_activate == "sigmoid": + self.mask_activate = torch.nn.Sigmoid() + elif msk_activate == "relu": + self.mask_activate = torch.nn.ReLU() + else: + raise ValueError(f"Unsupported activation {msk_activate}") + + def forward(self, input: torch.Tensor) -> torch.Tensor: + """Generate separation mask. + + Args: + input (torch.Tensor): 3D Tensor with shape [batch, features, frames] + + Returns: + Tensor: shape [batch, num_sources, features, frames] + """ + batch_size = input.shape[0] + feats = self.input_norm(input) + feats = self.input_conv(feats) + output = 0.0 + for layer in self.conv_layers: + residual, skip = layer(feats) + if residual is not None: # the last conv layer does not produce residual + feats = feats + residual + output = output + skip + output = self.output_prelu(output) + output = self.output_conv(output) + output = self.mask_activate(output) + return output.view(batch_size, self.num_sources, self.input_dim, -1) + + +class ConvTasNet(torch.nn.Module): + """Conv-TasNet architecture introduced in + *Conv-TasNet: Surpassing Ideal Time–Frequency Magnitude Masking for Speech Separation* + :cite:`Luo_2019`. + + Note: + This implementation corresponds to the "non-causal" setting in the paper. + + See Also: + * :class:`torchaudio.pipelines.SourceSeparationBundle`: Source separation pipeline with pre-trained models. + + Args: + num_sources (int, optional): The number of sources to split. + enc_kernel_size (int, optional): The convolution kernel size of the encoder/decoder, . + enc_num_feats (int, optional): The feature dimensions passed to mask generator, . + msk_kernel_size (int, optional): The convolution kernel size of the mask generator,

. + msk_num_feats (int, optional): The input/output feature dimension of conv block in the mask generator, . + msk_num_hidden_feats (int, optional): The internal feature dimension of conv block of the mask generator, . + msk_num_layers (int, optional): The number of layers in one conv block of the mask generator, . + msk_num_stacks (int, optional): The numbr of conv blocks of the mask generator, . + msk_activate (str, optional): The activation function of the mask output (Default: ``sigmoid``). + """ + + def __init__( + self, + num_sources: int = 2, + # encoder/decoder parameters + enc_kernel_size: int = 16, + enc_num_feats: int = 512, + # mask generator parameters + msk_kernel_size: int = 3, + msk_num_feats: int = 128, + msk_num_hidden_feats: int = 512, + msk_num_layers: int = 8, + msk_num_stacks: int = 3, + msk_activate: str = "sigmoid", + ): + super().__init__() + + self.num_sources = num_sources + self.enc_num_feats = enc_num_feats + self.enc_kernel_size = enc_kernel_size + self.enc_stride = enc_kernel_size // 2 + + self.encoder = torch.nn.Conv1d( + in_channels=1, + out_channels=enc_num_feats, + kernel_size=enc_kernel_size, + stride=self.enc_stride, + padding=self.enc_stride, + bias=False, + ) + self.mask_generator = MaskGenerator( + input_dim=enc_num_feats, + num_sources=num_sources, + kernel_size=msk_kernel_size, + num_feats=msk_num_feats, + num_hidden=msk_num_hidden_feats, + num_layers=msk_num_layers, + num_stacks=msk_num_stacks, + msk_activate=msk_activate, + ) + self.decoder = torch.nn.ConvTranspose1d( + in_channels=enc_num_feats, + out_channels=1, + kernel_size=enc_kernel_size, + stride=self.enc_stride, + padding=self.enc_stride, + bias=False, + ) + + def _align_num_frames_with_strides(self, input: torch.Tensor) -> Tuple[torch.Tensor, int]: + """Pad input Tensor so that the end of the input tensor corresponds with + + 1. (if kernel size is odd) the center of the last convolution kernel + or 2. (if kernel size is even) the end of the first half of the last convolution kernel + + Assumption: + The resulting Tensor will be padded with the size of stride (== kernel_width // 2) + on the both ends in Conv1D + + |<--- k_1 --->| + | | |<-- k_n-1 -->| + | | | |<--- k_n --->| + | | | | | + | | | | | + | v v v | + |<---->|<--- input signal --->|<--->|<---->| + stride PAD stride + + Args: + input (torch.Tensor): 3D Tensor with shape (batch_size, channels==1, frames) + + Returns: + Tensor: Padded Tensor + int: Number of paddings performed + """ + batch_size, num_channels, num_frames = input.shape + is_odd = self.enc_kernel_size % 2 + num_strides = (num_frames - is_odd) // self.enc_stride + num_remainings = num_frames - (is_odd + num_strides * self.enc_stride) + if num_remainings == 0: + return input, 0 + + num_paddings = self.enc_stride - num_remainings + pad = torch.zeros( + batch_size, + num_channels, + num_paddings, + dtype=input.dtype, + device=input.device, + ) + return torch.cat([input, pad], 2), num_paddings + + def forward(self, input: torch.Tensor) -> torch.Tensor: + """Perform source separation. Generate audio source waveforms. + + Args: + input (torch.Tensor): 3D Tensor with shape [batch, channel==1, frames] + + Returns: + Tensor: 3D Tensor with shape [batch, channel==num_sources, frames] + """ + if input.ndim != 3 or input.shape[1] != 1: + raise ValueError(f"Expected 3D tensor (batch, channel==1, frames). Found: {input.shape}") + + # B: batch size + # L: input frame length + # L': padded input frame length + # F: feature dimension + # M: feature frame length + # S: number of sources + + padded, num_pads = self._align_num_frames_with_strides(input) # B, 1, L' + batch_size, num_padded_frames = padded.shape[0], padded.shape[2] + feats = self.encoder(padded) # B, F, M + masked = self.mask_generator(feats) * feats.unsqueeze(1) # B, S, F, M + masked = masked.view(batch_size * self.num_sources, self.enc_num_feats, -1) # B*S, F, M + decoded = self.decoder(masked) # B*S, 1, L' + output = decoded.view(batch_size, self.num_sources, num_padded_frames) # B, S, L' + if num_pads > 0: + output = output[..., :-num_pads] # B, S, L + return output + + +def conv_tasnet_base(num_sources: int = 2) -> ConvTasNet: + r"""Builds non-causal version of :class:`~torchaudio.models.ConvTasNet`. + + The parameter settings follow the ones with the highest Si-SNR metirc score in the paper, + except the mask activation function is changed from "sigmoid" to "relu" for performance improvement. + + Args: + num_sources (int, optional): Number of sources in the output. + (Default: 2) + Returns: + ConvTasNet: + ConvTasNet model. + """ + return ConvTasNet( + num_sources=num_sources, + enc_kernel_size=16, + enc_num_feats=512, + msk_kernel_size=3, + msk_num_feats=128, + msk_num_hidden_feats=512, + msk_num_layers=8, + msk_num_stacks=3, + msk_activate="relu", + ) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/decoder/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/decoder/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d2e9b06d52ef7af302a000bb0f572b4c563e12bd --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/decoder/__init__.py @@ -0,0 +1,46 @@ +_CTC_DECODERS = [ + "CTCHypothesis", + "CTCDecoder", + "CTCDecoderLM", + "CTCDecoderLMState", + "ctc_decoder", + "download_pretrained_files", +] +_CUDA_CTC_DECODERS = [ + "CUCTCDecoder", + "CUCTCHypothesis", + "cuda_ctc_decoder", +] + + +def __getattr__(name: str): + if name in _CTC_DECODERS: + try: + from . import _ctc_decoder + except Exception as err: + raise RuntimeError( + "CTC Decoder suit requires flashlight-text package and optionally KenLM. Please install them." + ) from err + + item = getattr(_ctc_decoder, name) + globals()[name] = item + return item + elif name in _CUDA_CTC_DECODERS: + try: + from . import _cuda_ctc_decoder + except AttributeError as err: + raise RuntimeError( + "To use CUCTC decoder, please set BUILD_CUDA_CTC_DECODER=1 when building from source." + ) from err + + item = getattr(_cuda_ctc_decoder, name) + globals()[name] = item + return item + raise AttributeError(f"module {__name__} has no attribute {name}") + + +def __dir__(): + return sorted(__all__) + + +__all__ = _CTC_DECODERS + _CUDA_CTC_DECODERS diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/decoder/_ctc_decoder.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/decoder/_ctc_decoder.py new file mode 100644 index 0000000000000000000000000000000000000000..e7dbaa7244d271d459ec6fc583a1dbbf046d7738 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/decoder/_ctc_decoder.py @@ -0,0 +1,568 @@ +from __future__ import annotations + +import itertools as it + +from abc import abstractmethod +from collections import namedtuple +from typing import Dict, List, NamedTuple, Optional, Tuple, Union + +import torch + +from flashlight.lib.text.decoder import ( + CriterionType as _CriterionType, + LexiconDecoder as _LexiconDecoder, + LexiconDecoderOptions as _LexiconDecoderOptions, + LexiconFreeDecoder as _LexiconFreeDecoder, + LexiconFreeDecoderOptions as _LexiconFreeDecoderOptions, + LM as _LM, + LMState as _LMState, + SmearingMode as _SmearingMode, + Trie as _Trie, + ZeroLM as _ZeroLM, +) +from flashlight.lib.text.dictionary import ( + create_word_dict as _create_word_dict, + Dictionary as _Dictionary, + load_words as _load_words, +) +from torchaudio.utils import _download_asset + +try: + from flashlight.lib.text.decoder.kenlm import KenLM as _KenLM +except Exception: + try: + from flashlight.lib.text.decoder import KenLM as _KenLM + except Exception: + _KenLM = None + +__all__ = [ + "CTCHypothesis", + "CTCDecoder", + "CTCDecoderLM", + "CTCDecoderLMState", + "ctc_decoder", + "download_pretrained_files", +] + +_PretrainedFiles = namedtuple("PretrainedFiles", ["lexicon", "tokens", "lm"]) + + +def _construct_trie(tokens_dict, word_dict, lexicon, lm, silence): + vocab_size = tokens_dict.index_size() + trie = _Trie(vocab_size, silence) + start_state = lm.start(False) + + for word, spellings in lexicon.items(): + word_idx = word_dict.get_index(word) + _, score = lm.score(start_state, word_idx) + for spelling in spellings: + spelling_idx = [tokens_dict.get_index(token) for token in spelling] + trie.insert(spelling_idx, word_idx, score) + trie.smear(_SmearingMode.MAX) + return trie + + +def _get_word_dict(lexicon, lm, lm_dict, tokens_dict, unk_word): + word_dict = None + if lm_dict is not None: + word_dict = _Dictionary(lm_dict) + + if lexicon and word_dict is None: + word_dict = _create_word_dict(lexicon) + elif not lexicon and word_dict is None and type(lm) is str: + d = {tokens_dict.get_entry(i): [[tokens_dict.get_entry(i)]] for i in range(tokens_dict.index_size())} + d[unk_word] = [[unk_word]] + word_dict = _create_word_dict(d) + + return word_dict + + +class CTCHypothesis(NamedTuple): + r"""Represents hypothesis generated by CTC beam search decoder :class:`CTCDecoder`.""" + tokens: torch.LongTensor + """Predicted sequence of token IDs. Shape `(L, )`, where `L` is the length of the output sequence""" + + words: List[str] + """List of predicted words. + + Note: + This attribute is only applicable if a lexicon is provided to the decoder. If + decoding without a lexicon, it will be blank. Please refer to :attr:`tokens` and + :func:`~torchaudio.models.decoder.CTCDecoder.idxs_to_tokens` instead. + """ + + score: float + """Score corresponding to hypothesis""" + + timesteps: torch.IntTensor + """Timesteps corresponding to the tokens. Shape `(L, )`, where `L` is the length of the output sequence""" + + +class CTCDecoderLMState(_LMState): + """Language model state.""" + + @property + def children(self) -> Dict[int, CTCDecoderLMState]: + """Map of indices to LM states""" + return super().children + + def child(self, usr_index: int) -> CTCDecoderLMState: + """Returns child corresponding to usr_index, or creates and returns a new state if input index + is not found. + + Args: + usr_index (int): index corresponding to child state + + Returns: + CTCDecoderLMState: child state corresponding to usr_index + """ + return super().child(usr_index) + + def compare(self, state: CTCDecoderLMState) -> CTCDecoderLMState: + """Compare two language model states. + + Args: + state (CTCDecoderLMState): LM state to compare against + + Returns: + int: 0 if the states are the same, -1 if self is less, +1 if self is greater. + """ + pass + + +class CTCDecoderLM(_LM): + """Language model base class for creating custom language models to use with the decoder.""" + + @abstractmethod + def start(self, start_with_nothing: bool) -> CTCDecoderLMState: + """Initialize or reset the language model. + + Args: + start_with_nothing (bool): whether or not to start sentence with sil token. + + Returns: + CTCDecoderLMState: starting state + """ + raise NotImplementedError + + @abstractmethod + def score(self, state: CTCDecoderLMState, usr_token_idx: int) -> Tuple[CTCDecoderLMState, float]: + """Evaluate the language model based on the current LM state and new word. + + Args: + state (CTCDecoderLMState): current LM state + usr_token_idx (int): index of the word + + Returns: + (CTCDecoderLMState, float) + CTCDecoderLMState: + new LM state + float: + score + """ + raise NotImplementedError + + @abstractmethod + def finish(self, state: CTCDecoderLMState) -> Tuple[CTCDecoderLMState, float]: + """Evaluate end for language model based on current LM state. + + Args: + state (CTCDecoderLMState): current LM state + + Returns: + (CTCDecoderLMState, float) + CTCDecoderLMState: + new LM state + float: + score + """ + raise NotImplementedError + + +class CTCDecoder: + """CTC beam search decoder from *Flashlight* :cite:`kahn2022flashlight`. + + .. devices:: CPU + + Note: + To build the decoder, please use the factory function :func:`ctc_decoder`. + """ + + def __init__( + self, + nbest: int, + lexicon: Optional[Dict], + word_dict: _Dictionary, + tokens_dict: _Dictionary, + lm: CTCDecoderLM, + decoder_options: Union[_LexiconDecoderOptions, _LexiconFreeDecoderOptions], + blank_token: str, + sil_token: str, + unk_word: str, + ) -> None: + """ + Args: + nbest (int): number of best decodings to return + lexicon (Dict or None): lexicon mapping of words to spellings, or None for lexicon-free decoder + word_dict (_Dictionary): dictionary of words + tokens_dict (_Dictionary): dictionary of tokens + lm (CTCDecoderLM): language model. If using a lexicon, only word level LMs are currently supported + decoder_options (_LexiconDecoderOptions or _LexiconFreeDecoderOptions): + parameters used for beam search decoding + blank_token (str): token corresopnding to blank + sil_token (str): token corresponding to silence + unk_word (str): word corresponding to unknown + """ + + self.nbest = nbest + self.word_dict = word_dict + self.tokens_dict = tokens_dict + self.blank = self.tokens_dict.get_index(blank_token) + silence = self.tokens_dict.get_index(sil_token) + transitions = [] + + if lexicon: + trie = _construct_trie(tokens_dict, word_dict, lexicon, lm, silence) + unk_word = word_dict.get_index(unk_word) + token_lm = False # use word level LM + + self.decoder = _LexiconDecoder( + decoder_options, + trie, + lm, + silence, + self.blank, + unk_word, + transitions, + token_lm, + ) + else: + self.decoder = _LexiconFreeDecoder(decoder_options, lm, silence, self.blank, transitions) + # https://github.com/pytorch/audio/issues/3218 + # If lm is passed like rvalue reference, the lm object gets garbage collected, + # and later call to the lm fails. + # This ensures that lm object is not deleted as long as the decoder is alive. + # https://github.com/pybind/pybind11/discussions/4013 + self.lm = lm + + def _get_tokens(self, idxs: torch.IntTensor) -> torch.LongTensor: + idxs = (g[0] for g in it.groupby(idxs)) + idxs = filter(lambda x: x != self.blank, idxs) + return torch.LongTensor(list(idxs)) + + def _get_timesteps(self, idxs: torch.IntTensor) -> torch.IntTensor: + """Returns frame numbers corresponding to non-blank tokens.""" + + timesteps = [] + for i, idx in enumerate(idxs): + if idx == self.blank: + continue + if i == 0 or idx != idxs[i - 1]: + timesteps.append(i) + return torch.IntTensor(timesteps) + + def decode_begin(self): + """Initialize the internal state of the decoder. + + See :py:meth:`decode_step` for the usage. + + .. note:: + + This method is required only when performing online decoding. + It is not necessary when performing batch decoding with :py:meth:`__call__`. + """ + self.decoder.decode_begin() + + def decode_end(self): + """Finalize the internal state of the decoder. + + See :py:meth:`decode_step` for the usage. + + .. note:: + + This method is required only when performing online decoding. + It is not necessary when performing batch decoding with :py:meth:`__call__`. + """ + self.decoder.decode_end() + + def decode_step(self, emissions: torch.FloatTensor): + """Perform incremental decoding on top of the curent internal state. + + .. note:: + + This method is required only when performing online decoding. + It is not necessary when performing batch decoding with :py:meth:`__call__`. + + Args: + emissions (torch.FloatTensor): CPU tensor of shape `(frame, num_tokens)` storing sequences of + probability distribution over labels; output of acoustic model. + + Example: + >>> decoder = torchaudio.models.decoder.ctc_decoder(...) + >>> decoder.decode_begin() + >>> decoder.decode_step(emission1) + >>> decoder.decode_step(emission2) + >>> decoder.decode_end() + >>> result = decoder.get_final_hypothesis() + """ + if emissions.dtype != torch.float32: + raise ValueError("emissions must be float32.") + + if not emissions.is_cpu: + raise RuntimeError("emissions must be a CPU tensor.") + + if not emissions.is_contiguous(): + raise RuntimeError("emissions must be contiguous.") + + if emissions.ndim != 2: + raise RuntimeError(f"emissions must be 2D. Found {emissions.shape}") + + T, N = emissions.size() + self.decoder.decode_step(emissions.data_ptr(), T, N) + + def _to_hypo(self, results) -> List[CTCHypothesis]: + return [ + CTCHypothesis( + tokens=self._get_tokens(result.tokens), + words=[self.word_dict.get_entry(x) for x in result.words if x >= 0], + score=result.score, + timesteps=self._get_timesteps(result.tokens), + ) + for result in results + ] + + def get_final_hypothesis(self) -> List[CTCHypothesis]: + """Get the final hypothesis + + Returns: + List[CTCHypothesis]: + List of sorted best hypotheses. + + .. note:: + + This method is required only when performing online decoding. + It is not necessary when performing batch decoding with :py:meth:`__call__`. + """ + results = self.decoder.get_all_final_hypothesis() + return self._to_hypo(results[: self.nbest]) + + def __call__( + self, emissions: torch.FloatTensor, lengths: Optional[torch.Tensor] = None + ) -> List[List[CTCHypothesis]]: + """ + Performs batched offline decoding. + + .. note:: + + This method performs offline decoding in one go. To perform incremental decoding, + please refer to :py:meth:`decode_step`. + + Args: + emissions (torch.FloatTensor): CPU tensor of shape `(batch, frame, num_tokens)` storing sequences of + probability distribution over labels; output of acoustic model. + lengths (Tensor or None, optional): CPU tensor of shape `(batch, )` storing the valid length of + in time axis of the output Tensor in each batch. + + Returns: + List[List[CTCHypothesis]]: + List of sorted best hypotheses for each audio sequence in the batch. + """ + + if emissions.dtype != torch.float32: + raise ValueError("emissions must be float32.") + + if not emissions.is_cpu: + raise RuntimeError("emissions must be a CPU tensor.") + + if not emissions.is_contiguous(): + raise RuntimeError("emissions must be contiguous.") + + if emissions.ndim != 3: + raise RuntimeError(f"emissions must be 3D. Found {emissions.shape}") + + if lengths is not None and not lengths.is_cpu: + raise RuntimeError("lengths must be a CPU tensor.") + + B, T, N = emissions.size() + if lengths is None: + lengths = torch.full((B,), T) + + float_bytes = 4 + hypos = [] + + for b in range(B): + emissions_ptr = emissions.data_ptr() + float_bytes * b * emissions.stride(0) + results = self.decoder.decode(emissions_ptr, lengths[b], N) + hypos.append(self._to_hypo(results[: self.nbest])) + return hypos + + def idxs_to_tokens(self, idxs: torch.LongTensor) -> List: + """ + Map raw token IDs into corresponding tokens + + Args: + idxs (LongTensor): raw token IDs generated from decoder + + Returns: + List: tokens corresponding to the input IDs + """ + return [self.tokens_dict.get_entry(idx.item()) for idx in idxs] + + +def ctc_decoder( + lexicon: Optional[str], + tokens: Union[str, List[str]], + lm: Union[str, CTCDecoderLM] = None, + lm_dict: Optional[str] = None, + nbest: int = 1, + beam_size: int = 50, + beam_size_token: Optional[int] = None, + beam_threshold: float = 50, + lm_weight: float = 2, + word_score: float = 0, + unk_score: float = float("-inf"), + sil_score: float = 0, + log_add: bool = False, + blank_token: str = "-", + sil_token: str = "|", + unk_word: str = "", +) -> CTCDecoder: + """Builds an instance of :class:`CTCDecoder`. + + Args: + lexicon (str or None): lexicon file containing the possible words and corresponding spellings. + Each line consists of a word and its space separated spelling. If `None`, uses lexicon-free + decoding. + tokens (str or List[str]): file or list containing valid tokens. If using a file, the expected + format is for tokens mapping to the same index to be on the same line + lm (str, CTCDecoderLM, or None, optional): either a path containing KenLM language model, + custom language model of type `CTCDecoderLM`, or `None` if not using a language model + lm_dict (str or None, optional): file consisting of the dictionary used for the LM, with a word + per line sorted by LM index. If decoding with a lexicon, entries in lm_dict must also occur + in the lexicon file. If `None`, dictionary for LM is constructed using the lexicon file. + (Default: None) + nbest (int, optional): number of best decodings to return (Default: 1) + beam_size (int, optional): max number of hypos to hold after each decode step (Default: 50) + beam_size_token (int, optional): max number of tokens to consider at each decode step. + If `None`, it is set to the total number of tokens (Default: None) + beam_threshold (float, optional): threshold for pruning hypothesis (Default: 50) + lm_weight (float, optional): weight of language model (Default: 2) + word_score (float, optional): word insertion score (Default: 0) + unk_score (float, optional): unknown word insertion score (Default: -inf) + sil_score (float, optional): silence insertion score (Default: 0) + log_add (bool, optional): whether or not to use logadd when merging hypotheses (Default: False) + blank_token (str, optional): token corresponding to blank (Default: "-") + sil_token (str, optional): token corresponding to silence (Default: "|") + unk_word (str, optional): word corresponding to unknown (Default: "") + + Returns: + CTCDecoder: decoder + + Example + >>> decoder = ctc_decoder( + >>> lexicon="lexicon.txt", + >>> tokens="tokens.txt", + >>> lm="kenlm.bin", + >>> ) + >>> results = decoder(emissions) # List of shape (B, nbest) of Hypotheses + """ + if lm_dict is not None and type(lm_dict) is not str: + raise ValueError("lm_dict must be None or str type.") + + tokens_dict = _Dictionary(tokens) + + # decoder options + if lexicon: + lexicon = _load_words(lexicon) + decoder_options = _LexiconDecoderOptions( + beam_size=beam_size, + beam_size_token=beam_size_token or tokens_dict.index_size(), + beam_threshold=beam_threshold, + lm_weight=lm_weight, + word_score=word_score, + unk_score=unk_score, + sil_score=sil_score, + log_add=log_add, + criterion_type=_CriterionType.CTC, + ) + else: + decoder_options = _LexiconFreeDecoderOptions( + beam_size=beam_size, + beam_size_token=beam_size_token or tokens_dict.index_size(), + beam_threshold=beam_threshold, + lm_weight=lm_weight, + sil_score=sil_score, + log_add=log_add, + criterion_type=_CriterionType.CTC, + ) + + # construct word dict and language model + word_dict = _get_word_dict(lexicon, lm, lm_dict, tokens_dict, unk_word) + + if type(lm) is str: + if _KenLM is None: + raise RuntimeError( + "flashlight-text is installed, but KenLM is not installed. " + "Please refer to https://github.com/kpu/kenlm#python-module for how to install it." + ) + lm = _KenLM(lm, word_dict) + elif lm is None: + lm = _ZeroLM() + + return CTCDecoder( + nbest=nbest, + lexicon=lexicon, + word_dict=word_dict, + tokens_dict=tokens_dict, + lm=lm, + decoder_options=decoder_options, + blank_token=blank_token, + sil_token=sil_token, + unk_word=unk_word, + ) + + +def _get_filenames(model: str) -> _PretrainedFiles: + if model not in ["librispeech", "librispeech-3-gram", "librispeech-4-gram"]: + raise ValueError( + f"{model} not supported. Must be one of ['librispeech-3-gram', 'librispeech-4-gram', 'librispeech']" + ) + + prefix = f"decoder-assets/{model}" + return _PretrainedFiles( + lexicon=f"{prefix}/lexicon.txt", + tokens=f"{prefix}/tokens.txt", + lm=f"{prefix}/lm.bin" if model != "librispeech" else None, + ) + + +def download_pretrained_files(model: str) -> _PretrainedFiles: + """ + Retrieves pretrained data files used for :func:`ctc_decoder`. + + Args: + model (str): pretrained language model to download. + Valid values are: ``"librispeech-3-gram"``, ``"librispeech-4-gram"`` and ``"librispeech"``. + + Returns: + Object with the following attributes + + * ``lm``: path corresponding to downloaded language model, + or ``None`` if the model is not associated with an lm + * ``lexicon``: path corresponding to downloaded lexicon file + * ``tokens``: path corresponding to downloaded tokens file + """ + + files = _get_filenames(model) + lexicon_file = _download_asset(files.lexicon) + tokens_file = _download_asset(files.tokens) + if files.lm is not None: + lm_file = _download_asset(files.lm) + else: + lm_file = None + + return _PretrainedFiles( + lexicon=lexicon_file, + tokens=tokens_file, + lm=lm_file, + ) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/decoder/_cuda_ctc_decoder.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/decoder/_cuda_ctc_decoder.py new file mode 100644 index 0000000000000000000000000000000000000000..f1aae838c4d2388e2556bb44c054f4f26f0ac335 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/decoder/_cuda_ctc_decoder.py @@ -0,0 +1,187 @@ +from __future__ import annotations + +import math + +from typing import List, NamedTuple, Union + +import torch +import torchaudio + +torchaudio._extension._load_lib("libctc_prefix_decoder") +import torchaudio.lib.pybind11_prefixctc as cuctc + + +__all__ = ["CUCTCHypothesis", "CUCTCDecoder", "cuda_ctc_decoder"] + + +def _get_vocab_list(vocab_file): + vocab = [] + with open(vocab_file, "r", encoding="utf-8") as f: + for line in f: + line = line.strip().split() + vocab.append(line[0]) + return vocab + + +class CUCTCHypothesis(NamedTuple): + r"""Represents hypothesis generated by CUCTC beam search decoder :class:`CUCTCDecoder`.""" + tokens: List[int] + """Predicted sequence of token IDs. Shape `(L, )`, where `L` is the length of the output sequence""" + + words: List[str] + """List of predicted tokens. Algin with modeling unit. + """ + + score: float + """Score corresponding to hypothesis""" + + +_DEFAULT_BLANK_SKIP_THREASHOLD = 0.95 + + +class CUCTCDecoder: + """CUDA CTC beam search decoder. + + .. devices:: CUDA + + Note: + To build the decoder, please use the factory function :func:`cuda_ctc_decoder`. + """ + + def __init__( + self, + vocab_list: List[str], + blank_id: int = 0, + beam_size: int = 10, + nbest: int = 1, + blank_skip_threshold: float = _DEFAULT_BLANK_SKIP_THREASHOLD, + cuda_stream: torch.cuda.streams.Stream = None, + ): + """ + Args: + blank_id (int): token id corresopnding to blank, only support 0 for now. (Default: 0) + vocab_list (List[str]): list of vocabulary tokens + beam_size (int, optional): max number of hypos to hold after each decode step (Default: 10) + nbest (int): number of best decodings to return + blank_skip_threshold (float): + skip frames if log_prob(blank) > log(blank_skip_threshold), to speed up decoding. + (Default: 0.95). + cuda_stream (torch.cuda.streams.Stream): using assigned cuda stream (Default: using default stream) + + """ + if cuda_stream: + if not isinstance(cuda_stream, torch.cuda.streams.Stream): + raise AssertionError("cuda_stream must be torch.cuda.streams.Stream") + cuda_stream_ = cuda_stream.cuda_stream if cuda_stream else torch.cuda.current_stream().cuda_stream + self.internal_data = cuctc.prefixCTC_alloc(cuda_stream_) + self.memory = torch.empty(0, dtype=torch.int8, device=torch.device("cuda")) + if blank_id != 0: + raise AssertionError("blank_id must be 0") + self.blank_id = blank_id + self.vocab_list = vocab_list + self.space_id = 0 + self.nbest = nbest + if not (blank_skip_threshold >= 0 and blank_skip_threshold <= 1): + raise AssertionError("blank_skip_threshold must be between 0 and 1") + self.blank_skip_threshold = math.log(blank_skip_threshold) + self.beam_size = min(beam_size, len(vocab_list)) # beam size must be smaller than vocab size + + def __del__(self): + if cuctc is not None: + cuctc.prefixCTC_free(self.internal_data) + + def __call__(self, log_prob: torch.Tensor, encoder_out_lens: torch.Tensor): + """ + Args: + log_prob (torch.FloatTensor): GPU tensor of shape `(batch, frame, num_tokens)` storing sequences of + probability distribution over labels; log_softmax(output of acoustic model). + lengths (dtype torch.int32): GPU tensor of shape `(batch, )` storing the valid length of + in time axis of the output Tensor in each batch. + + Returns: + List[List[CUCTCHypothesis]]: + List of sorted best hypotheses for each audio sequence in the batch. + """ + if not encoder_out_lens.dtype == torch.int32: + raise AssertionError("encoder_out_lens must be torch.int32") + if not log_prob.dtype == torch.float32: + raise AssertionError("log_prob must be torch.float32") + if not (log_prob.is_cuda and encoder_out_lens.is_cuda): + raise AssertionError("inputs must be cuda tensors") + if not (log_prob.is_contiguous() and encoder_out_lens.is_contiguous()): + raise AssertionError("input tensors must be contiguous") + required_size, score_hyps = cuctc.ctc_beam_search_decoder_batch_gpu_v2( + self.internal_data, + self.memory.data_ptr(), + self.memory.size(0), + log_prob.data_ptr(), + encoder_out_lens.data_ptr(), + log_prob.size(), + log_prob.stride(), + self.beam_size, + self.blank_id, + self.space_id, + self.blank_skip_threshold, + ) + if required_size > 0: + self.memory = torch.empty(required_size, dtype=torch.int8, device=log_prob.device).contiguous() + _, score_hyps = cuctc.ctc_beam_search_decoder_batch_gpu_v2( + self.internal_data, + self.memory.data_ptr(), + self.memory.size(0), + log_prob.data_ptr(), + encoder_out_lens.data_ptr(), + log_prob.size(), + log_prob.stride(), + self.beam_size, + self.blank_id, + self.space_id, + self.blank_skip_threshold, + ) + batch_size = len(score_hyps) + hypos = [] + for i in range(batch_size): + hypos.append( + [ + CUCTCHypothesis( + tokens=score_hyps[i][j][1], + words=[self.vocab_list[word_id] for word_id in score_hyps[i][j][1]], + score=score_hyps[i][j][0], + ) + for j in range(self.nbest) + ] + ) + return hypos + + +def cuda_ctc_decoder( + tokens: Union[str, List[str]], + nbest: int = 1, + beam_size: int = 10, + blank_skip_threshold: float = _DEFAULT_BLANK_SKIP_THREASHOLD, +) -> CUCTCDecoder: + """Builds an instance of :class:`CUCTCDecoder`. + + Args: + tokens (str or List[str]): File or list containing valid tokens. + If using a file, the expected format is for tokens mapping to the same index to be on the same line + beam_size (int, optional): The maximum number of hypos to hold after each decode step (Default: 10) + nbest (int): The number of best decodings to return + blank_id (int): The token ID corresopnding to the blank symbol. + blank_skip_threshold (float): skip frames if log_prob(blank) > log(blank_skip_threshold), to speed up decoding + (Default: 0.95). + + Returns: + CUCTCDecoder: decoder + + Example + >>> decoder = cuda_ctc_decoder( + >>> vocab_file="tokens.txt", + >>> blank_skip_threshold=0.95, + >>> ) + >>> results = decoder(log_probs, encoder_out_lens) # List of shape (B, nbest) of Hypotheses + """ + if type(tokens) is str: + tokens = _get_vocab_list(tokens) + + return CUCTCDecoder(vocab_list=tokens, beam_size=beam_size, nbest=nbest, blank_skip_threshold=blank_skip_threshold) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/deepspeech.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/deepspeech.py new file mode 100644 index 0000000000000000000000000000000000000000..ef23d1d351bde615cb2b1b38ffdd7782fbb5b627 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/deepspeech.py @@ -0,0 +1,84 @@ +import torch + +__all__ = ["DeepSpeech"] + + +class FullyConnected(torch.nn.Module): + """ + Args: + n_feature: Number of input features + n_hidden: Internal hidden unit size. + """ + + def __init__(self, n_feature: int, n_hidden: int, dropout: float, relu_max_clip: int = 20) -> None: + super(FullyConnected, self).__init__() + self.fc = torch.nn.Linear(n_feature, n_hidden, bias=True) + self.relu_max_clip = relu_max_clip + self.dropout = dropout + + def forward(self, x: torch.Tensor) -> torch.Tensor: + x = self.fc(x) + x = torch.nn.functional.relu(x) + x = torch.nn.functional.hardtanh(x, 0, self.relu_max_clip) + if self.dropout: + x = torch.nn.functional.dropout(x, self.dropout, self.training) + return x + + +class DeepSpeech(torch.nn.Module): + """DeepSpeech architecture introduced in + *Deep Speech: Scaling up end-to-end speech recognition* :cite:`hannun2014deep`. + + Args: + n_feature: Number of input features + n_hidden: Internal hidden unit size. + n_class: Number of output classes + """ + + def __init__( + self, + n_feature: int, + n_hidden: int = 2048, + n_class: int = 40, + dropout: float = 0.0, + ) -> None: + super(DeepSpeech, self).__init__() + self.n_hidden = n_hidden + self.fc1 = FullyConnected(n_feature, n_hidden, dropout) + self.fc2 = FullyConnected(n_hidden, n_hidden, dropout) + self.fc3 = FullyConnected(n_hidden, n_hidden, dropout) + self.bi_rnn = torch.nn.RNN(n_hidden, n_hidden, num_layers=1, nonlinearity="relu", bidirectional=True) + self.fc4 = FullyConnected(n_hidden, n_hidden, dropout) + self.out = torch.nn.Linear(n_hidden, n_class) + + def forward(self, x: torch.Tensor) -> torch.Tensor: + """ + Args: + x (torch.Tensor): Tensor of dimension (batch, channel, time, feature). + Returns: + Tensor: Predictor tensor of dimension (batch, time, class). + """ + # N x C x T x F + x = self.fc1(x) + # N x C x T x H + x = self.fc2(x) + # N x C x T x H + x = self.fc3(x) + # N x C x T x H + x = x.squeeze(1) + # N x T x H + x = x.transpose(0, 1) + # T x N x H + x, _ = self.bi_rnn(x) + # The fifth (non-recurrent) layer takes both the forward and backward units as inputs + x = x[:, :, : self.n_hidden] + x[:, :, self.n_hidden :] + # T x N x H + x = self.fc4(x) + # T x N x H + x = self.out(x) + # T x N x n_class + x = x.permute(1, 0, 2) + # N x T x n_class + x = torch.nn.functional.log_softmax(x, dim=2) + # N x T x n_class + return x diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/emformer.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/emformer.py new file mode 100644 index 0000000000000000000000000000000000000000..9ddd257552ecda94cb55bbc1eed1dae8a5382380 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/emformer.py @@ -0,0 +1,884 @@ +import math +from typing import List, Optional, Tuple + +import torch + + +__all__ = ["Emformer"] + + +def _lengths_to_padding_mask(lengths: torch.Tensor) -> torch.Tensor: + batch_size = lengths.shape[0] + max_length = int(torch.max(lengths).item()) + padding_mask = torch.arange(max_length, device=lengths.device, dtype=lengths.dtype).expand( + batch_size, max_length + ) >= lengths.unsqueeze(1) + return padding_mask + + +def _gen_padding_mask( + utterance: torch.Tensor, + right_context: torch.Tensor, + summary: torch.Tensor, + lengths: torch.Tensor, + mems: torch.Tensor, + left_context_key: Optional[torch.Tensor] = None, +) -> Optional[torch.Tensor]: + T = right_context.size(0) + utterance.size(0) + summary.size(0) + B = right_context.size(1) + if B == 1: + padding_mask = None + else: + right_context_blocks_length = T - torch.max(lengths).int() - summary.size(0) + left_context_blocks_length = left_context_key.size(0) if left_context_key is not None else 0 + klengths = lengths + mems.size(0) + right_context_blocks_length + left_context_blocks_length + padding_mask = _lengths_to_padding_mask(lengths=klengths) + return padding_mask + + +def _get_activation_module(activation: str) -> torch.nn.Module: + if activation == "relu": + return torch.nn.ReLU() + elif activation == "gelu": + return torch.nn.GELU() + elif activation == "silu": + return torch.nn.SiLU() + else: + raise ValueError(f"Unsupported activation {activation}") + + +def _get_weight_init_gains(weight_init_scale_strategy: Optional[str], num_layers: int) -> List[Optional[float]]: + if weight_init_scale_strategy is None: + return [None for _ in range(num_layers)] + elif weight_init_scale_strategy == "depthwise": + return [1.0 / math.sqrt(layer_idx + 1) for layer_idx in range(num_layers)] + elif weight_init_scale_strategy == "constant": + return [1.0 / math.sqrt(2) for layer_idx in range(num_layers)] + else: + raise ValueError(f"Unsupported weight_init_scale_strategy value {weight_init_scale_strategy}") + + +def _gen_attention_mask_block( + col_widths: List[int], col_mask: List[bool], num_rows: int, device: torch.device +) -> torch.Tensor: + if len(col_widths) != len(col_mask): + raise ValueError("Length of col_widths must match that of col_mask") + + mask_block = [ + torch.ones(num_rows, col_width, device=device) + if is_ones_col + else torch.zeros(num_rows, col_width, device=device) + for col_width, is_ones_col in zip(col_widths, col_mask) + ] + return torch.cat(mask_block, dim=1) + + +class _EmformerAttention(torch.nn.Module): + r"""Emformer layer attention module. + + Args: + input_dim (int): input dimension. + num_heads (int): number of attention heads in each Emformer layer. + dropout (float, optional): dropout probability. (Default: 0.0) + weight_init_gain (float or None, optional): scale factor to apply when initializing + attention module parameters. (Default: ``None``) + tanh_on_mem (bool, optional): if ``True``, applies tanh to memory elements. (Default: ``False``) + negative_inf (float, optional): value to use for negative infinity in attention weights. (Default: -1e8) + """ + + def __init__( + self, + input_dim: int, + num_heads: int, + dropout: float = 0.0, + weight_init_gain: Optional[float] = None, + tanh_on_mem: bool = False, + negative_inf: float = -1e8, + ): + super().__init__() + + if input_dim % num_heads != 0: + raise ValueError(f"input_dim ({input_dim}) is not a multiple of num_heads ({num_heads}).") + + self.input_dim = input_dim + self.num_heads = num_heads + self.dropout = dropout + self.tanh_on_mem = tanh_on_mem + self.negative_inf = negative_inf + + self.scaling = (self.input_dim // self.num_heads) ** -0.5 + + self.emb_to_key_value = torch.nn.Linear(input_dim, 2 * input_dim, bias=True) + self.emb_to_query = torch.nn.Linear(input_dim, input_dim, bias=True) + self.out_proj = torch.nn.Linear(input_dim, input_dim, bias=True) + + if weight_init_gain: + torch.nn.init.xavier_uniform_(self.emb_to_key_value.weight, gain=weight_init_gain) + torch.nn.init.xavier_uniform_(self.emb_to_query.weight, gain=weight_init_gain) + + def _gen_key_value(self, input: torch.Tensor, mems: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]: + T, _, _ = input.shape + summary_length = mems.size(0) + 1 + right_ctx_utterance_block = input[: T - summary_length] + mems_right_ctx_utterance_block = torch.cat([mems, right_ctx_utterance_block]) + key, value = self.emb_to_key_value(mems_right_ctx_utterance_block).chunk(chunks=2, dim=2) + return key, value + + def _gen_attention_probs( + self, + attention_weights: torch.Tensor, + attention_mask: torch.Tensor, + padding_mask: Optional[torch.Tensor], + ) -> torch.Tensor: + attention_weights_float = attention_weights.float() + attention_weights_float = attention_weights_float.masked_fill(attention_mask.unsqueeze(0), self.negative_inf) + T = attention_weights.size(1) + B = attention_weights.size(0) // self.num_heads + if padding_mask is not None: + attention_weights_float = attention_weights_float.view(B, self.num_heads, T, -1) + attention_weights_float = attention_weights_float.masked_fill( + padding_mask.unsqueeze(1).unsqueeze(2).to(torch.bool), self.negative_inf + ) + attention_weights_float = attention_weights_float.view(B * self.num_heads, T, -1) + attention_probs = torch.nn.functional.softmax(attention_weights_float, dim=-1).type_as(attention_weights) + return torch.nn.functional.dropout(attention_probs, p=float(self.dropout), training=self.training) + + def _forward_impl( + self, + utterance: torch.Tensor, + lengths: torch.Tensor, + right_context: torch.Tensor, + summary: torch.Tensor, + mems: torch.Tensor, + attention_mask: torch.Tensor, + left_context_key: Optional[torch.Tensor] = None, + left_context_val: Optional[torch.Tensor] = None, + ) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor]: + B = utterance.size(1) + T = right_context.size(0) + utterance.size(0) + summary.size(0) + + # Compute query with [right context, utterance, summary]. + query = self.emb_to_query(torch.cat([right_context, utterance, summary])) + + # Compute key and value with [mems, right context, utterance]. + key, value = self.emb_to_key_value(torch.cat([mems, right_context, utterance])).chunk(chunks=2, dim=2) + + if left_context_key is not None and left_context_val is not None: + right_context_blocks_length = T - torch.max(lengths).int() - summary.size(0) + key = torch.cat( + [ + key[: mems.size(0) + right_context_blocks_length], + left_context_key, + key[mems.size(0) + right_context_blocks_length :], + ], + ) + value = torch.cat( + [ + value[: mems.size(0) + right_context_blocks_length], + left_context_val, + value[mems.size(0) + right_context_blocks_length :], + ], + ) + + # Compute attention weights from query, key, and value. + reshaped_query, reshaped_key, reshaped_value = [ + tensor.contiguous().view(-1, B * self.num_heads, self.input_dim // self.num_heads).transpose(0, 1) + for tensor in [query, key, value] + ] + attention_weights = torch.bmm(reshaped_query * self.scaling, reshaped_key.transpose(1, 2)) + + # Compute padding mask. + padding_mask = _gen_padding_mask(utterance, right_context, summary, lengths, mems, left_context_key) + + # Compute attention probabilities. + attention_probs = self._gen_attention_probs(attention_weights, attention_mask, padding_mask) + + # Compute attention. + attention = torch.bmm(attention_probs, reshaped_value) + if attention.shape != ( + B * self.num_heads, + T, + self.input_dim // self.num_heads, + ): + raise AssertionError("Computed attention has incorrect dimensions") + attention = attention.transpose(0, 1).contiguous().view(T, B, self.input_dim) + + # Apply output projection. + output_right_context_mems = self.out_proj(attention) + + summary_length = summary.size(0) + output_right_context = output_right_context_mems[: T - summary_length] + output_mems = output_right_context_mems[T - summary_length :] + if self.tanh_on_mem: + output_mems = torch.tanh(output_mems) + else: + output_mems = torch.clamp(output_mems, min=-10, max=10) + + return output_right_context, output_mems, key, value + + def forward( + self, + utterance: torch.Tensor, + lengths: torch.Tensor, + right_context: torch.Tensor, + summary: torch.Tensor, + mems: torch.Tensor, + attention_mask: torch.Tensor, + ) -> Tuple[torch.Tensor, torch.Tensor]: + r"""Forward pass for training. + + B: batch size; + D: feature dimension of each frame; + T: number of utterance frames; + R: number of right context frames; + S: number of summary elements; + M: number of memory elements. + + Args: + utterance (torch.Tensor): utterance frames, with shape `(T, B, D)`. + lengths (torch.Tensor): with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in ``utterance``. + right_context (torch.Tensor): right context frames, with shape `(R, B, D)`. + summary (torch.Tensor): summary elements, with shape `(S, B, D)`. + mems (torch.Tensor): memory elements, with shape `(M, B, D)`. + attention_mask (torch.Tensor): attention mask for underlying attention module. + + Returns: + (Tensor, Tensor): + Tensor + output frames corresponding to utterance and right_context, with shape `(T + R, B, D)`. + Tensor + updated memory elements, with shape `(M, B, D)`. + """ + output, output_mems, _, _ = self._forward_impl(utterance, lengths, right_context, summary, mems, attention_mask) + return output, output_mems[:-1] + + @torch.jit.export + def infer( + self, + utterance: torch.Tensor, + lengths: torch.Tensor, + right_context: torch.Tensor, + summary: torch.Tensor, + mems: torch.Tensor, + left_context_key: torch.Tensor, + left_context_val: torch.Tensor, + ) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor]: + r"""Forward pass for inference. + + B: batch size; + D: feature dimension of each frame; + T: number of utterance frames; + R: number of right context frames; + S: number of summary elements; + M: number of memory elements. + + Args: + utterance (torch.Tensor): utterance frames, with shape `(T, B, D)`. + lengths (torch.Tensor): with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in ``utterance``. + right_context (torch.Tensor): right context frames, with shape `(R, B, D)`. + summary (torch.Tensor): summary elements, with shape `(S, B, D)`. + mems (torch.Tensor): memory elements, with shape `(M, B, D)`. + left_context_key (torch.Tensor): left context attention key computed from preceding invocation. + left_context_val (torch.Tensor): left context attention value computed from preceding invocation. + + Returns: + (Tensor, Tensor, Tensor, and Tensor): + Tensor + output frames corresponding to utterance and right_context, with shape `(T + R, B, D)`. + Tensor + updated memory elements, with shape `(M, B, D)`. + Tensor + attention key computed for left context and utterance. + Tensor + attention value computed for left context and utterance. + """ + query_dim = right_context.size(0) + utterance.size(0) + summary.size(0) + key_dim = right_context.size(0) + utterance.size(0) + mems.size(0) + left_context_key.size(0) + attention_mask = torch.zeros(query_dim, key_dim).to(dtype=torch.bool, device=utterance.device) + attention_mask[-1, : mems.size(0)] = True + output, output_mems, key, value = self._forward_impl( + utterance, + lengths, + right_context, + summary, + mems, + attention_mask, + left_context_key=left_context_key, + left_context_val=left_context_val, + ) + return ( + output, + output_mems, + key[mems.size(0) + right_context.size(0) :], + value[mems.size(0) + right_context.size(0) :], + ) + + +class _EmformerLayer(torch.nn.Module): + r"""Emformer layer that constitutes Emformer. + + Args: + input_dim (int): input dimension. + num_heads (int): number of attention heads. + ffn_dim: (int): hidden layer dimension of feedforward network. + segment_length (int): length of each input segment. + dropout (float, optional): dropout probability. (Default: 0.0) + activation (str, optional): activation function to use in feedforward network. + Must be one of ("relu", "gelu", "silu"). (Default: "relu") + left_context_length (int, optional): length of left context. (Default: 0) + max_memory_size (int, optional): maximum number of memory elements to use. (Default: 0) + weight_init_gain (float or None, optional): scale factor to apply when initializing + attention module parameters. (Default: ``None``) + tanh_on_mem (bool, optional): if ``True``, applies tanh to memory elements. (Default: ``False``) + negative_inf (float, optional): value to use for negative infinity in attention weights. (Default: -1e8) + """ + + def __init__( + self, + input_dim: int, + num_heads: int, + ffn_dim: int, + segment_length: int, + dropout: float = 0.0, + activation: str = "relu", + left_context_length: int = 0, + max_memory_size: int = 0, + weight_init_gain: Optional[float] = None, + tanh_on_mem: bool = False, + negative_inf: float = -1e8, + ): + super().__init__() + + self.attention = _EmformerAttention( + input_dim=input_dim, + num_heads=num_heads, + dropout=dropout, + weight_init_gain=weight_init_gain, + tanh_on_mem=tanh_on_mem, + negative_inf=negative_inf, + ) + self.dropout = torch.nn.Dropout(dropout) + self.memory_op = torch.nn.AvgPool1d(kernel_size=segment_length, stride=segment_length, ceil_mode=True) + + activation_module = _get_activation_module(activation) + self.pos_ff = torch.nn.Sequential( + torch.nn.LayerNorm(input_dim), + torch.nn.Linear(input_dim, ffn_dim), + activation_module, + torch.nn.Dropout(dropout), + torch.nn.Linear(ffn_dim, input_dim), + torch.nn.Dropout(dropout), + ) + self.layer_norm_input = torch.nn.LayerNorm(input_dim) + self.layer_norm_output = torch.nn.LayerNorm(input_dim) + + self.left_context_length = left_context_length + self.segment_length = segment_length + self.max_memory_size = max_memory_size + self.input_dim = input_dim + + self.use_mem = max_memory_size > 0 + + def _init_state(self, batch_size: int, device: Optional[torch.device]) -> List[torch.Tensor]: + empty_memory = torch.zeros(self.max_memory_size, batch_size, self.input_dim, device=device) + left_context_key = torch.zeros(self.left_context_length, batch_size, self.input_dim, device=device) + left_context_val = torch.zeros(self.left_context_length, batch_size, self.input_dim, device=device) + past_length = torch.zeros(1, batch_size, dtype=torch.int32, device=device) + return [empty_memory, left_context_key, left_context_val, past_length] + + def _unpack_state(self, state: List[torch.Tensor]) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor]: + past_length = state[3][0][0].item() + past_left_context_length = min(self.left_context_length, past_length) + past_mem_length = min(self.max_memory_size, math.ceil(past_length / self.segment_length)) + pre_mems = state[0][self.max_memory_size - past_mem_length :] + lc_key = state[1][self.left_context_length - past_left_context_length :] + lc_val = state[2][self.left_context_length - past_left_context_length :] + return pre_mems, lc_key, lc_val + + def _pack_state( + self, + next_k: torch.Tensor, + next_v: torch.Tensor, + update_length: int, + mems: torch.Tensor, + state: List[torch.Tensor], + ) -> List[torch.Tensor]: + new_k = torch.cat([state[1], next_k]) + new_v = torch.cat([state[2], next_v]) + state[0] = torch.cat([state[0], mems])[-self.max_memory_size :] + state[1] = new_k[new_k.shape[0] - self.left_context_length :] + state[2] = new_v[new_v.shape[0] - self.left_context_length :] + state[3] = state[3] + update_length + return state + + def _process_attention_output( + self, + rc_output: torch.Tensor, + utterance: torch.Tensor, + right_context: torch.Tensor, + ) -> torch.Tensor: + result = self.dropout(rc_output) + torch.cat([right_context, utterance]) + result = self.pos_ff(result) + result + result = self.layer_norm_output(result) + return result + + def _apply_pre_attention_layer_norm( + self, utterance: torch.Tensor, right_context: torch.Tensor + ) -> Tuple[torch.Tensor, torch.Tensor]: + layer_norm_input = self.layer_norm_input(torch.cat([right_context, utterance])) + return ( + layer_norm_input[right_context.size(0) :], + layer_norm_input[: right_context.size(0)], + ) + + def _apply_post_attention_ffn( + self, rc_output: torch.Tensor, utterance: torch.Tensor, right_context: torch.Tensor + ) -> Tuple[torch.Tensor, torch.Tensor]: + rc_output = self._process_attention_output(rc_output, utterance, right_context) + return rc_output[right_context.size(0) :], rc_output[: right_context.size(0)] + + def _apply_attention_forward( + self, + utterance: torch.Tensor, + lengths: torch.Tensor, + right_context: torch.Tensor, + mems: torch.Tensor, + attention_mask: Optional[torch.Tensor], + ) -> Tuple[torch.Tensor, torch.Tensor]: + if attention_mask is None: + raise ValueError("attention_mask must be not None when for_inference is False") + + if self.use_mem: + summary = self.memory_op(utterance.permute(1, 2, 0)).permute(2, 0, 1) + else: + summary = torch.empty(0).to(dtype=utterance.dtype, device=utterance.device) + rc_output, next_m = self.attention( + utterance=utterance, + lengths=lengths, + right_context=right_context, + summary=summary, + mems=mems, + attention_mask=attention_mask, + ) + return rc_output, next_m + + def _apply_attention_infer( + self, + utterance: torch.Tensor, + lengths: torch.Tensor, + right_context: torch.Tensor, + mems: torch.Tensor, + state: Optional[List[torch.Tensor]], + ) -> Tuple[torch.Tensor, torch.Tensor, List[torch.Tensor]]: + if state is None: + state = self._init_state(utterance.size(1), device=utterance.device) + pre_mems, lc_key, lc_val = self._unpack_state(state) + if self.use_mem: + summary = self.memory_op(utterance.permute(1, 2, 0)).permute(2, 0, 1) + summary = summary[:1] + else: + summary = torch.empty(0).to(dtype=utterance.dtype, device=utterance.device) + rc_output, next_m, next_k, next_v = self.attention.infer( + utterance=utterance, + lengths=lengths, + right_context=right_context, + summary=summary, + mems=pre_mems, + left_context_key=lc_key, + left_context_val=lc_val, + ) + state = self._pack_state(next_k, next_v, utterance.size(0), mems, state) + return rc_output, next_m, state + + def forward( + self, + utterance: torch.Tensor, + lengths: torch.Tensor, + right_context: torch.Tensor, + mems: torch.Tensor, + attention_mask: torch.Tensor, + ) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor]: + r"""Forward pass for training. + + B: batch size; + D: feature dimension of each frame; + T: number of utterance frames; + R: number of right context frames; + M: number of memory elements. + + Args: + utterance (torch.Tensor): utterance frames, with shape `(T, B, D)`. + lengths (torch.Tensor): with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in ``utterance``. + right_context (torch.Tensor): right context frames, with shape `(R, B, D)`. + mems (torch.Tensor): memory elements, with shape `(M, B, D)`. + attention_mask (torch.Tensor): attention mask for underlying attention module. + + Returns: + (Tensor, Tensor, Tensor): + Tensor + encoded utterance frames, with shape `(T, B, D)`. + Tensor + updated right context frames, with shape `(R, B, D)`. + Tensor + updated memory elements, with shape `(M, B, D)`. + """ + ( + layer_norm_utterance, + layer_norm_right_context, + ) = self._apply_pre_attention_layer_norm(utterance, right_context) + rc_output, output_mems = self._apply_attention_forward( + layer_norm_utterance, + lengths, + layer_norm_right_context, + mems, + attention_mask, + ) + output_utterance, output_right_context = self._apply_post_attention_ffn(rc_output, utterance, right_context) + return output_utterance, output_right_context, output_mems + + @torch.jit.export + def infer( + self, + utterance: torch.Tensor, + lengths: torch.Tensor, + right_context: torch.Tensor, + state: Optional[List[torch.Tensor]], + mems: torch.Tensor, + ) -> Tuple[torch.Tensor, torch.Tensor, List[torch.Tensor], torch.Tensor]: + r"""Forward pass for inference. + + B: batch size; + D: feature dimension of each frame; + T: number of utterance frames; + R: number of right context frames; + M: number of memory elements. + + Args: + utterance (torch.Tensor): utterance frames, with shape `(T, B, D)`. + lengths (torch.Tensor): with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in ``utterance``. + right_context (torch.Tensor): right context frames, with shape `(R, B, D)`. + state (List[torch.Tensor] or None): list of tensors representing layer internal state + generated in preceding invocation of ``infer``. + mems (torch.Tensor): memory elements, with shape `(M, B, D)`. + + Returns: + (Tensor, Tensor, List[torch.Tensor], Tensor): + Tensor + encoded utterance frames, with shape `(T, B, D)`. + Tensor + updated right context frames, with shape `(R, B, D)`. + List[Tensor] + list of tensors representing layer internal state + generated in current invocation of ``infer``. + Tensor + updated memory elements, with shape `(M, B, D)`. + """ + ( + layer_norm_utterance, + layer_norm_right_context, + ) = self._apply_pre_attention_layer_norm(utterance, right_context) + rc_output, output_mems, output_state = self._apply_attention_infer( + layer_norm_utterance, lengths, layer_norm_right_context, mems, state + ) + output_utterance, output_right_context = self._apply_post_attention_ffn(rc_output, utterance, right_context) + return output_utterance, output_right_context, output_state, output_mems + + +class _EmformerImpl(torch.nn.Module): + def __init__( + self, + emformer_layers: torch.nn.ModuleList, + segment_length: int, + left_context_length: int = 0, + right_context_length: int = 0, + max_memory_size: int = 0, + ): + super().__init__() + + self.use_mem = max_memory_size > 0 + self.memory_op = torch.nn.AvgPool1d( + kernel_size=segment_length, + stride=segment_length, + ceil_mode=True, + ) + self.emformer_layers = emformer_layers + self.left_context_length = left_context_length + self.right_context_length = right_context_length + self.segment_length = segment_length + self.max_memory_size = max_memory_size + + def _gen_right_context(self, input: torch.Tensor) -> torch.Tensor: + T = input.shape[0] + num_segs = math.ceil((T - self.right_context_length) / self.segment_length) + right_context_blocks = [] + for seg_idx in range(num_segs - 1): + start = (seg_idx + 1) * self.segment_length + end = start + self.right_context_length + right_context_blocks.append(input[start:end]) + right_context_blocks.append(input[T - self.right_context_length :]) + return torch.cat(right_context_blocks) + + def _gen_attention_mask_col_widths(self, seg_idx: int, utterance_length: int) -> List[int]: + num_segs = math.ceil(utterance_length / self.segment_length) + rc = self.right_context_length + lc = self.left_context_length + rc_start = seg_idx * rc + rc_end = rc_start + rc + seg_start = max(seg_idx * self.segment_length - lc, 0) + seg_end = min((seg_idx + 1) * self.segment_length, utterance_length) + rc_length = self.right_context_length * num_segs + + if self.use_mem: + m_start = max(seg_idx - self.max_memory_size, 0) + mem_length = num_segs - 1 + col_widths = [ + m_start, # before memory + seg_idx - m_start, # memory + mem_length - seg_idx, # after memory + rc_start, # before right context + rc, # right context + rc_length - rc_end, # after right context + seg_start, # before query segment + seg_end - seg_start, # query segment + utterance_length - seg_end, # after query segment + ] + else: + col_widths = [ + rc_start, # before right context + rc, # right context + rc_length - rc_end, # after right context + seg_start, # before query segment + seg_end - seg_start, # query segment + utterance_length - seg_end, # after query segment + ] + + return col_widths + + def _gen_attention_mask(self, input: torch.Tensor) -> torch.Tensor: + utterance_length = input.size(0) + num_segs = math.ceil(utterance_length / self.segment_length) + + rc_mask = [] + query_mask = [] + summary_mask = [] + + if self.use_mem: + num_cols = 9 + # memory, right context, query segment + rc_q_cols_mask = [idx in [1, 4, 7] for idx in range(num_cols)] + # right context, query segment + s_cols_mask = [idx in [4, 7] for idx in range(num_cols)] + masks_to_concat = [rc_mask, query_mask, summary_mask] + else: + num_cols = 6 + # right context, query segment + rc_q_cols_mask = [idx in [1, 4] for idx in range(num_cols)] + s_cols_mask = None + masks_to_concat = [rc_mask, query_mask] + + for seg_idx in range(num_segs): + col_widths = self._gen_attention_mask_col_widths(seg_idx, utterance_length) + + rc_mask_block = _gen_attention_mask_block( + col_widths, rc_q_cols_mask, self.right_context_length, input.device + ) + rc_mask.append(rc_mask_block) + + query_mask_block = _gen_attention_mask_block( + col_widths, + rc_q_cols_mask, + min( + self.segment_length, + utterance_length - seg_idx * self.segment_length, + ), + input.device, + ) + query_mask.append(query_mask_block) + + if s_cols_mask is not None: + summary_mask_block = _gen_attention_mask_block(col_widths, s_cols_mask, 1, input.device) + summary_mask.append(summary_mask_block) + + attention_mask = (1 - torch.cat([torch.cat(mask) for mask in masks_to_concat])).to(torch.bool) + return attention_mask + + def forward(self, input: torch.Tensor, lengths: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]: + r"""Forward pass for training and non-streaming inference. + + B: batch size; + T: max number of input frames in batch; + D: feature dimension of each frame. + + Args: + input (torch.Tensor): utterance frames right-padded with right context frames, with + shape `(B, T + right_context_length, D)`. + lengths (torch.Tensor): with shape `(B,)` and i-th element representing + number of valid utterance frames for i-th batch element in ``input``. + + Returns: + (Tensor, Tensor): + Tensor + output frames, with shape `(B, T, D)`. + Tensor + output lengths, with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in output frames. + """ + input = input.permute(1, 0, 2) + right_context = self._gen_right_context(input) + utterance = input[: input.size(0) - self.right_context_length] + attention_mask = self._gen_attention_mask(utterance) + mems = ( + self.memory_op(utterance.permute(1, 2, 0)).permute(2, 0, 1)[:-1] + if self.use_mem + else torch.empty(0).to(dtype=input.dtype, device=input.device) + ) + output = utterance + for layer in self.emformer_layers: + output, right_context, mems = layer(output, lengths, right_context, mems, attention_mask) + return output.permute(1, 0, 2), lengths + + @torch.jit.export + def infer( + self, + input: torch.Tensor, + lengths: torch.Tensor, + states: Optional[List[List[torch.Tensor]]] = None, + ) -> Tuple[torch.Tensor, torch.Tensor, List[List[torch.Tensor]]]: + r"""Forward pass for streaming inference. + + B: batch size; + D: feature dimension of each frame. + + Args: + input (torch.Tensor): utterance frames right-padded with right context frames, with + shape `(B, segment_length + right_context_length, D)`. + lengths (torch.Tensor): with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in ``input``. + states (List[List[torch.Tensor]] or None, optional): list of lists of tensors + representing internal state generated in preceding invocation of ``infer``. (Default: ``None``) + + Returns: + (Tensor, Tensor, List[List[Tensor]]): + Tensor + output frames, with shape `(B, segment_length, D)`. + Tensor + output lengths, with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in output frames. + List[List[Tensor]] + output states; list of lists of tensors representing internal state + generated in current invocation of ``infer``. + """ + if input.size(1) != self.segment_length + self.right_context_length: + raise ValueError( + "Per configured segment_length and right_context_length" + f", expected size of {self.segment_length + self.right_context_length} for dimension 1 of input" + f", but got {input.size(1)}." + ) + input = input.permute(1, 0, 2) + right_context_start_idx = input.size(0) - self.right_context_length + right_context = input[right_context_start_idx:] + utterance = input[:right_context_start_idx] + output_lengths = torch.clamp(lengths - self.right_context_length, min=0) + mems = ( + self.memory_op(utterance.permute(1, 2, 0)).permute(2, 0, 1) + if self.use_mem + else torch.empty(0).to(dtype=input.dtype, device=input.device) + ) + output = utterance + output_states: List[List[torch.Tensor]] = [] + for layer_idx, layer in enumerate(self.emformer_layers): + output, right_context, output_state, mems = layer.infer( + output, + output_lengths, + right_context, + None if states is None else states[layer_idx], + mems, + ) + output_states.append(output_state) + + return output.permute(1, 0, 2), output_lengths, output_states + + +class Emformer(_EmformerImpl): + r"""Emformer architecture introduced in + *Emformer: Efficient Memory Transformer Based Acoustic Model for Low Latency Streaming Speech Recognition* + :cite:`shi2021emformer`. + + See Also: + * :func:`~torchaudio.models.emformer_rnnt_model`, + :func:`~torchaudio.models.emformer_rnnt_base`: factory functions. + * :class:`torchaudio.pipelines.RNNTBundle`: ASR pipelines with pretrained model. + + Args: + input_dim (int): input dimension. + num_heads (int): number of attention heads in each Emformer layer. + ffn_dim (int): hidden layer dimension of each Emformer layer's feedforward network. + num_layers (int): number of Emformer layers to instantiate. + segment_length (int): length of each input segment. + dropout (float, optional): dropout probability. (Default: 0.0) + activation (str, optional): activation function to use in each Emformer layer's + feedforward network. Must be one of ("relu", "gelu", "silu"). (Default: "relu") + left_context_length (int, optional): length of left context. (Default: 0) + right_context_length (int, optional): length of right context. (Default: 0) + max_memory_size (int, optional): maximum number of memory elements to use. (Default: 0) + weight_init_scale_strategy (str or None, optional): per-layer weight initialization scaling + strategy. Must be one of ("depthwise", "constant", ``None``). (Default: "depthwise") + tanh_on_mem (bool, optional): if ``True``, applies tanh to memory elements. (Default: ``False``) + negative_inf (float, optional): value to use for negative infinity in attention weights. (Default: -1e8) + + Examples: + >>> emformer = Emformer(512, 8, 2048, 20, 4, right_context_length=1) + >>> input = torch.rand(128, 400, 512) # batch, num_frames, feature_dim + >>> lengths = torch.randint(1, 200, (128,)) # batch + >>> output, lengths = emformer(input, lengths) + >>> input = torch.rand(128, 5, 512) + >>> lengths = torch.ones(128) * 5 + >>> output, lengths, states = emformer.infer(input, lengths, None) + """ + + def __init__( + self, + input_dim: int, + num_heads: int, + ffn_dim: int, + num_layers: int, + segment_length: int, + dropout: float = 0.0, + activation: str = "relu", + left_context_length: int = 0, + right_context_length: int = 0, + max_memory_size: int = 0, + weight_init_scale_strategy: Optional[str] = "depthwise", + tanh_on_mem: bool = False, + negative_inf: float = -1e8, + ): + weight_init_gains = _get_weight_init_gains(weight_init_scale_strategy, num_layers) + emformer_layers = torch.nn.ModuleList( + [ + _EmformerLayer( + input_dim, + num_heads, + ffn_dim, + segment_length, + dropout=dropout, + activation=activation, + left_context_length=left_context_length, + max_memory_size=max_memory_size, + weight_init_gain=weight_init_gains[layer_idx], + tanh_on_mem=tanh_on_mem, + negative_inf=negative_inf, + ) + for layer_idx in range(num_layers) + ] + ) + super().__init__( + emformer_layers, + segment_length, + left_context_length=left_context_length, + right_context_length=right_context_length, + max_memory_size=max_memory_size, + ) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/rnnt.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/rnnt.py new file mode 100644 index 0000000000000000000000000000000000000000..f9dbe22c9fb4a97cf7f8779a953b5bd7b5bbffd9 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/rnnt.py @@ -0,0 +1,816 @@ +from abc import ABC, abstractmethod +from typing import List, Optional, Tuple + +import torch +from torchaudio.models import Emformer + + +__all__ = ["RNNT", "emformer_rnnt_base", "emformer_rnnt_model"] + + +class _TimeReduction(torch.nn.Module): + r"""Coalesces frames along time dimension into a + fewer number of frames with higher feature dimensionality. + + Args: + stride (int): number of frames to merge for each output frame. + """ + + def __init__(self, stride: int) -> None: + super().__init__() + self.stride = stride + + def forward(self, input: torch.Tensor, lengths: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]: + r"""Forward pass. + + B: batch size; + T: maximum input sequence length in batch; + D: feature dimension of each input sequence frame. + + Args: + input (torch.Tensor): input sequences, with shape `(B, T, D)`. + lengths (torch.Tensor): with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in ``input``. + + Returns: + (torch.Tensor, torch.Tensor): + torch.Tensor + output sequences, with shape + `(B, T // stride, D * stride)` + torch.Tensor + output lengths, with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in output sequences. + """ + B, T, D = input.shape + num_frames = T - (T % self.stride) + input = input[:, :num_frames, :] + lengths = lengths.div(self.stride, rounding_mode="trunc") + T_max = num_frames // self.stride + + output = input.reshape(B, T_max, D * self.stride) + output = output.contiguous() + return output, lengths + + +class _CustomLSTM(torch.nn.Module): + r"""Custom long-short-term memory (LSTM) block that applies layer normalization + to internal nodes. + + Args: + input_dim (int): input dimension. + hidden_dim (int): hidden dimension. + layer_norm (bool, optional): if ``True``, enables layer normalization. (Default: ``False``) + layer_norm_epsilon (float, optional): value of epsilon to use in + layer normalization layers (Default: 1e-5) + """ + + def __init__( + self, + input_dim: int, + hidden_dim: int, + layer_norm: bool = False, + layer_norm_epsilon: float = 1e-5, + ) -> None: + super().__init__() + self.x2g = torch.nn.Linear(input_dim, 4 * hidden_dim, bias=(not layer_norm)) + self.p2g = torch.nn.Linear(hidden_dim, 4 * hidden_dim, bias=False) + if layer_norm: + self.c_norm = torch.nn.LayerNorm(hidden_dim, eps=layer_norm_epsilon) + self.g_norm = torch.nn.LayerNorm(4 * hidden_dim, eps=layer_norm_epsilon) + else: + self.c_norm = torch.nn.Identity() + self.g_norm = torch.nn.Identity() + + self.hidden_dim = hidden_dim + + def forward( + self, input: torch.Tensor, state: Optional[List[torch.Tensor]] + ) -> Tuple[torch.Tensor, List[torch.Tensor]]: + r"""Forward pass. + + B: batch size; + T: maximum sequence length in batch; + D: feature dimension of each input sequence element. + + Args: + input (torch.Tensor): with shape `(T, B, D)`. + state (List[torch.Tensor] or None): list of tensors + representing internal state generated in preceding invocation + of ``forward``. + + Returns: + (torch.Tensor, List[torch.Tensor]): + torch.Tensor + output, with shape `(T, B, hidden_dim)`. + List[torch.Tensor] + list of tensors representing internal state generated + in current invocation of ``forward``. + """ + if state is None: + B = input.size(1) + h = torch.zeros(B, self.hidden_dim, device=input.device, dtype=input.dtype) + c = torch.zeros(B, self.hidden_dim, device=input.device, dtype=input.dtype) + else: + h, c = state + + gated_input = self.x2g(input) + outputs = [] + for gates in gated_input.unbind(0): + gates = gates + self.p2g(h) + gates = self.g_norm(gates) + input_gate, forget_gate, cell_gate, output_gate = gates.chunk(4, 1) + input_gate = input_gate.sigmoid() + forget_gate = forget_gate.sigmoid() + cell_gate = cell_gate.tanh() + output_gate = output_gate.sigmoid() + c = forget_gate * c + input_gate * cell_gate + c = self.c_norm(c) + h = output_gate * c.tanh() + outputs.append(h) + + output = torch.stack(outputs, dim=0) + state = [h, c] + + return output, state + + +class _Transcriber(ABC): + @abstractmethod + def forward(self, input: torch.Tensor, lengths: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]: + pass + + @abstractmethod + def infer( + self, + input: torch.Tensor, + lengths: torch.Tensor, + states: Optional[List[List[torch.Tensor]]], + ) -> Tuple[torch.Tensor, torch.Tensor, List[List[torch.Tensor]]]: + pass + + +class _EmformerEncoder(torch.nn.Module, _Transcriber): + r"""Emformer-based recurrent neural network transducer (RNN-T) encoder (transcription network). + + Args: + input_dim (int): feature dimension of each input sequence element. + output_dim (int): feature dimension of each output sequence element. + segment_length (int): length of input segment expressed as number of frames. + right_context_length (int): length of right context expressed as number of frames. + time_reduction_input_dim (int): dimension to scale each element in input sequences to + prior to applying time reduction block. + time_reduction_stride (int): factor by which to reduce length of input sequence. + transformer_num_heads (int): number of attention heads in each Emformer layer. + transformer_ffn_dim (int): hidden layer dimension of each Emformer layer's feedforward network. + transformer_num_layers (int): number of Emformer layers to instantiate. + transformer_left_context_length (int): length of left context. + transformer_dropout (float, optional): transformer dropout probability. (Default: 0.0) + transformer_activation (str, optional): activation function to use in each Emformer layer's + feedforward network. Must be one of ("relu", "gelu", "silu"). (Default: "relu") + transformer_max_memory_size (int, optional): maximum number of memory elements to use. (Default: 0) + transformer_weight_init_scale_strategy (str, optional): per-layer weight initialization scaling + strategy. Must be one of ("depthwise", "constant", ``None``). (Default: "depthwise") + transformer_tanh_on_mem (bool, optional): if ``True``, applies tanh to memory elements. (Default: ``False``) + """ + + def __init__( + self, + *, + input_dim: int, + output_dim: int, + segment_length: int, + right_context_length: int, + time_reduction_input_dim: int, + time_reduction_stride: int, + transformer_num_heads: int, + transformer_ffn_dim: int, + transformer_num_layers: int, + transformer_left_context_length: int, + transformer_dropout: float = 0.0, + transformer_activation: str = "relu", + transformer_max_memory_size: int = 0, + transformer_weight_init_scale_strategy: str = "depthwise", + transformer_tanh_on_mem: bool = False, + ) -> None: + super().__init__() + self.input_linear = torch.nn.Linear( + input_dim, + time_reduction_input_dim, + bias=False, + ) + self.time_reduction = _TimeReduction(time_reduction_stride) + transformer_input_dim = time_reduction_input_dim * time_reduction_stride + self.transformer = Emformer( + transformer_input_dim, + transformer_num_heads, + transformer_ffn_dim, + transformer_num_layers, + segment_length // time_reduction_stride, + dropout=transformer_dropout, + activation=transformer_activation, + left_context_length=transformer_left_context_length, + right_context_length=right_context_length // time_reduction_stride, + max_memory_size=transformer_max_memory_size, + weight_init_scale_strategy=transformer_weight_init_scale_strategy, + tanh_on_mem=transformer_tanh_on_mem, + ) + self.output_linear = torch.nn.Linear(transformer_input_dim, output_dim) + self.layer_norm = torch.nn.LayerNorm(output_dim) + + def forward(self, input: torch.Tensor, lengths: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]: + r"""Forward pass for training. + + B: batch size; + T: maximum input sequence length in batch; + D: feature dimension of each input sequence frame (input_dim). + + Args: + input (torch.Tensor): input frame sequences right-padded with right context, with + shape `(B, T + right context length, D)`. + lengths (torch.Tensor): with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in ``input``. + + Returns: + (torch.Tensor, torch.Tensor): + torch.Tensor + output frame sequences, with + shape `(B, T // time_reduction_stride, output_dim)`. + torch.Tensor + output input lengths, with shape `(B,)` and i-th element representing + number of valid elements for i-th batch element in output frame sequences. + """ + input_linear_out = self.input_linear(input) + time_reduction_out, time_reduction_lengths = self.time_reduction(input_linear_out, lengths) + transformer_out, transformer_lengths = self.transformer(time_reduction_out, time_reduction_lengths) + output_linear_out = self.output_linear(transformer_out) + layer_norm_out = self.layer_norm(output_linear_out) + return layer_norm_out, transformer_lengths + + @torch.jit.export + def infer( + self, + input: torch.Tensor, + lengths: torch.Tensor, + states: Optional[List[List[torch.Tensor]]], + ) -> Tuple[torch.Tensor, torch.Tensor, List[List[torch.Tensor]]]: + r"""Forward pass for inference. + + B: batch size; + T: maximum input sequence segment length in batch; + D: feature dimension of each input sequence frame (input_dim). + + Args: + input (torch.Tensor): input frame sequence segments right-padded with right context, with + shape `(B, T + right context length, D)`. + lengths (torch.Tensor): with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in ``input``. + state (List[List[torch.Tensor]] or None): list of lists of tensors + representing internal state generated in preceding invocation + of ``infer``. + + Returns: + (torch.Tensor, torch.Tensor, List[List[torch.Tensor]]): + torch.Tensor + output frame sequences, with + shape `(B, T // time_reduction_stride, output_dim)`. + torch.Tensor + output input lengths, with shape `(B,)` and i-th element representing + number of valid elements for i-th batch element in output. + List[List[torch.Tensor]] + output states; list of lists of tensors + representing internal state generated in current invocation + of ``infer``. + """ + input_linear_out = self.input_linear(input) + time_reduction_out, time_reduction_lengths = self.time_reduction(input_linear_out, lengths) + ( + transformer_out, + transformer_lengths, + transformer_states, + ) = self.transformer.infer(time_reduction_out, time_reduction_lengths, states) + output_linear_out = self.output_linear(transformer_out) + layer_norm_out = self.layer_norm(output_linear_out) + return layer_norm_out, transformer_lengths, transformer_states + + +class _Predictor(torch.nn.Module): + r"""Recurrent neural network transducer (RNN-T) prediction network. + + Args: + num_symbols (int): size of target token lexicon. + output_dim (int): feature dimension of each output sequence element. + symbol_embedding_dim (int): dimension of each target token embedding. + num_lstm_layers (int): number of LSTM layers to instantiate. + lstm_hidden_dim (int): output dimension of each LSTM layer. + lstm_layer_norm (bool, optional): if ``True``, enables layer normalization + for LSTM layers. (Default: ``False``) + lstm_layer_norm_epsilon (float, optional): value of epsilon to use in + LSTM layer normalization layers. (Default: 1e-5) + lstm_dropout (float, optional): LSTM dropout probability. (Default: 0.0) + + """ + + def __init__( + self, + num_symbols: int, + output_dim: int, + symbol_embedding_dim: int, + num_lstm_layers: int, + lstm_hidden_dim: int, + lstm_layer_norm: bool = False, + lstm_layer_norm_epsilon: float = 1e-5, + lstm_dropout: float = 0.0, + ) -> None: + super().__init__() + self.embedding = torch.nn.Embedding(num_symbols, symbol_embedding_dim) + self.input_layer_norm = torch.nn.LayerNorm(symbol_embedding_dim) + self.lstm_layers = torch.nn.ModuleList( + [ + _CustomLSTM( + symbol_embedding_dim if idx == 0 else lstm_hidden_dim, + lstm_hidden_dim, + layer_norm=lstm_layer_norm, + layer_norm_epsilon=lstm_layer_norm_epsilon, + ) + for idx in range(num_lstm_layers) + ] + ) + self.dropout = torch.nn.Dropout(p=lstm_dropout) + self.linear = torch.nn.Linear(lstm_hidden_dim, output_dim) + self.output_layer_norm = torch.nn.LayerNorm(output_dim) + + self.lstm_dropout = lstm_dropout + + def forward( + self, + input: torch.Tensor, + lengths: torch.Tensor, + state: Optional[List[List[torch.Tensor]]] = None, + ) -> Tuple[torch.Tensor, torch.Tensor, List[List[torch.Tensor]]]: + r"""Forward pass. + + B: batch size; + U: maximum sequence length in batch; + D: feature dimension of each input sequence element. + + Args: + input (torch.Tensor): target sequences, with shape `(B, U)` and each element + mapping to a target symbol, i.e. in range `[0, num_symbols)`. + lengths (torch.Tensor): with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in ``input``. + state (List[List[torch.Tensor]] or None, optional): list of lists of tensors + representing internal state generated in preceding invocation + of ``forward``. (Default: ``None``) + + Returns: + (torch.Tensor, torch.Tensor, List[List[torch.Tensor]]): + torch.Tensor + output encoding sequences, with shape `(B, U, output_dim)` + torch.Tensor + output lengths, with shape `(B,)` and i-th element representing + number of valid elements for i-th batch element in output encoding sequences. + List[List[torch.Tensor]] + output states; list of lists of tensors + representing internal state generated in current invocation of ``forward``. + """ + input_tb = input.permute(1, 0) + embedding_out = self.embedding(input_tb) + input_layer_norm_out = self.input_layer_norm(embedding_out) + + lstm_out = input_layer_norm_out + state_out: List[List[torch.Tensor]] = [] + for layer_idx, lstm in enumerate(self.lstm_layers): + lstm_out, lstm_state_out = lstm(lstm_out, None if state is None else state[layer_idx]) + lstm_out = self.dropout(lstm_out) + state_out.append(lstm_state_out) + + linear_out = self.linear(lstm_out) + output_layer_norm_out = self.output_layer_norm(linear_out) + return output_layer_norm_out.permute(1, 0, 2), lengths, state_out + + +class _Joiner(torch.nn.Module): + r"""Recurrent neural network transducer (RNN-T) joint network. + + Args: + input_dim (int): source and target input dimension. + output_dim (int): output dimension. + activation (str, optional): activation function to use in the joiner. + Must be one of ("relu", "tanh"). (Default: "relu") + + """ + + def __init__(self, input_dim: int, output_dim: int, activation: str = "relu") -> None: + super().__init__() + self.linear = torch.nn.Linear(input_dim, output_dim, bias=True) + if activation == "relu": + self.activation = torch.nn.ReLU() + elif activation == "tanh": + self.activation = torch.nn.Tanh() + else: + raise ValueError(f"Unsupported activation {activation}") + + def forward( + self, + source_encodings: torch.Tensor, + source_lengths: torch.Tensor, + target_encodings: torch.Tensor, + target_lengths: torch.Tensor, + ) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor]: + r"""Forward pass for training. + + B: batch size; + T: maximum source sequence length in batch; + U: maximum target sequence length in batch; + D: dimension of each source and target sequence encoding. + + Args: + source_encodings (torch.Tensor): source encoding sequences, with + shape `(B, T, D)`. + source_lengths (torch.Tensor): with shape `(B,)` and i-th element representing + valid sequence length of i-th batch element in ``source_encodings``. + target_encodings (torch.Tensor): target encoding sequences, with shape `(B, U, D)`. + target_lengths (torch.Tensor): with shape `(B,)` and i-th element representing + valid sequence length of i-th batch element in ``target_encodings``. + + Returns: + (torch.Tensor, torch.Tensor, torch.Tensor): + torch.Tensor + joint network output, with shape `(B, T, U, output_dim)`. + torch.Tensor + output source lengths, with shape `(B,)` and i-th element representing + number of valid elements along dim 1 for i-th batch element in joint network output. + torch.Tensor + output target lengths, with shape `(B,)` and i-th element representing + number of valid elements along dim 2 for i-th batch element in joint network output. + """ + joint_encodings = source_encodings.unsqueeze(2).contiguous() + target_encodings.unsqueeze(1).contiguous() + activation_out = self.activation(joint_encodings) + output = self.linear(activation_out) + return output, source_lengths, target_lengths + + +class RNNT(torch.nn.Module): + r"""torchaudio.models.RNNT() + + Recurrent neural network transducer (RNN-T) model. + + Note: + To build the model, please use one of the factory functions. + + See Also: + :class:`torchaudio.pipelines.RNNTBundle`: ASR pipeline with pre-trained models. + + Args: + transcriber (torch.nn.Module): transcription network. + predictor (torch.nn.Module): prediction network. + joiner (torch.nn.Module): joint network. + """ + + def __init__(self, transcriber: _Transcriber, predictor: _Predictor, joiner: _Joiner) -> None: + super().__init__() + self.transcriber = transcriber + self.predictor = predictor + self.joiner = joiner + + def forward( + self, + sources: torch.Tensor, + source_lengths: torch.Tensor, + targets: torch.Tensor, + target_lengths: torch.Tensor, + predictor_state: Optional[List[List[torch.Tensor]]] = None, + ) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor, List[List[torch.Tensor]]]: + r"""Forward pass for training. + + B: batch size; + T: maximum source sequence length in batch; + U: maximum target sequence length in batch; + D: feature dimension of each source sequence element. + + Args: + sources (torch.Tensor): source frame sequences right-padded with right context, with + shape `(B, T, D)`. + source_lengths (torch.Tensor): with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in ``sources``. + targets (torch.Tensor): target sequences, with shape `(B, U)` and each element + mapping to a target symbol. + target_lengths (torch.Tensor): with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in ``targets``. + predictor_state (List[List[torch.Tensor]] or None, optional): list of lists of tensors + representing prediction network internal state generated in preceding invocation + of ``forward``. (Default: ``None``) + + Returns: + (torch.Tensor, torch.Tensor, torch.Tensor, List[List[torch.Tensor]]): + torch.Tensor + joint network output, with shape + `(B, max output source length, max output target length, output_dim (number of target symbols))`. + torch.Tensor + output source lengths, with shape `(B,)` and i-th element representing + number of valid elements along dim 1 for i-th batch element in joint network output. + torch.Tensor + output target lengths, with shape `(B,)` and i-th element representing + number of valid elements along dim 2 for i-th batch element in joint network output. + List[List[torch.Tensor]] + output states; list of lists of tensors + representing prediction network internal state generated in current invocation + of ``forward``. + """ + source_encodings, source_lengths = self.transcriber( + input=sources, + lengths=source_lengths, + ) + target_encodings, target_lengths, predictor_state = self.predictor( + input=targets, + lengths=target_lengths, + state=predictor_state, + ) + output, source_lengths, target_lengths = self.joiner( + source_encodings=source_encodings, + source_lengths=source_lengths, + target_encodings=target_encodings, + target_lengths=target_lengths, + ) + + return ( + output, + source_lengths, + target_lengths, + predictor_state, + ) + + @torch.jit.export + def transcribe_streaming( + self, + sources: torch.Tensor, + source_lengths: torch.Tensor, + state: Optional[List[List[torch.Tensor]]], + ) -> Tuple[torch.Tensor, torch.Tensor, List[List[torch.Tensor]]]: + r"""Applies transcription network to sources in streaming mode. + + B: batch size; + T: maximum source sequence segment length in batch; + D: feature dimension of each source sequence frame. + + Args: + sources (torch.Tensor): source frame sequence segments right-padded with right context, with + shape `(B, T + right context length, D)`. + source_lengths (torch.Tensor): with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in ``sources``. + state (List[List[torch.Tensor]] or None): list of lists of tensors + representing transcription network internal state generated in preceding invocation + of ``transcribe_streaming``. + + Returns: + (torch.Tensor, torch.Tensor, List[List[torch.Tensor]]): + torch.Tensor + output frame sequences, with + shape `(B, T // time_reduction_stride, output_dim)`. + torch.Tensor + output lengths, with shape `(B,)` and i-th element representing + number of valid elements for i-th batch element in output. + List[List[torch.Tensor]] + output states; list of lists of tensors + representing transcription network internal state generated in current invocation + of ``transcribe_streaming``. + """ + return self.transcriber.infer(sources, source_lengths, state) + + @torch.jit.export + def transcribe( + self, + sources: torch.Tensor, + source_lengths: torch.Tensor, + ) -> Tuple[torch.Tensor, torch.Tensor]: + r"""Applies transcription network to sources in non-streaming mode. + + B: batch size; + T: maximum source sequence length in batch; + D: feature dimension of each source sequence frame. + + Args: + sources (torch.Tensor): source frame sequences right-padded with right context, with + shape `(B, T + right context length, D)`. + source_lengths (torch.Tensor): with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in ``sources``. + + Returns: + (torch.Tensor, torch.Tensor): + torch.Tensor + output frame sequences, with + shape `(B, T // time_reduction_stride, output_dim)`. + torch.Tensor + output lengths, with shape `(B,)` and i-th element representing + number of valid elements for i-th batch element in output frame sequences. + """ + return self.transcriber(sources, source_lengths) + + @torch.jit.export + def predict( + self, + targets: torch.Tensor, + target_lengths: torch.Tensor, + state: Optional[List[List[torch.Tensor]]], + ) -> Tuple[torch.Tensor, torch.Tensor, List[List[torch.Tensor]]]: + r"""Applies prediction network to targets. + + B: batch size; + U: maximum target sequence length in batch; + D: feature dimension of each target sequence frame. + + Args: + targets (torch.Tensor): target sequences, with shape `(B, U)` and each element + mapping to a target symbol, i.e. in range `[0, num_symbols)`. + target_lengths (torch.Tensor): with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in ``targets``. + state (List[List[torch.Tensor]] or None): list of lists of tensors + representing internal state generated in preceding invocation + of ``predict``. + + Returns: + (torch.Tensor, torch.Tensor, List[List[torch.Tensor]]): + torch.Tensor + output frame sequences, with shape `(B, U, output_dim)`. + torch.Tensor + output lengths, with shape `(B,)` and i-th element representing + number of valid elements for i-th batch element in output. + List[List[torch.Tensor]] + output states; list of lists of tensors + representing internal state generated in current invocation of ``predict``. + """ + return self.predictor(input=targets, lengths=target_lengths, state=state) + + @torch.jit.export + def join( + self, + source_encodings: torch.Tensor, + source_lengths: torch.Tensor, + target_encodings: torch.Tensor, + target_lengths: torch.Tensor, + ) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor]: + r"""Applies joint network to source and target encodings. + + B: batch size; + T: maximum source sequence length in batch; + U: maximum target sequence length in batch; + D: dimension of each source and target sequence encoding. + + Args: + source_encodings (torch.Tensor): source encoding sequences, with + shape `(B, T, D)`. + source_lengths (torch.Tensor): with shape `(B,)` and i-th element representing + valid sequence length of i-th batch element in ``source_encodings``. + target_encodings (torch.Tensor): target encoding sequences, with shape `(B, U, D)`. + target_lengths (torch.Tensor): with shape `(B,)` and i-th element representing + valid sequence length of i-th batch element in ``target_encodings``. + + Returns: + (torch.Tensor, torch.Tensor, torch.Tensor): + torch.Tensor + joint network output, with shape `(B, T, U, output_dim)`. + torch.Tensor + output source lengths, with shape `(B,)` and i-th element representing + number of valid elements along dim 1 for i-th batch element in joint network output. + torch.Tensor + output target lengths, with shape `(B,)` and i-th element representing + number of valid elements along dim 2 for i-th batch element in joint network output. + """ + output, source_lengths, target_lengths = self.joiner( + source_encodings=source_encodings, + source_lengths=source_lengths, + target_encodings=target_encodings, + target_lengths=target_lengths, + ) + return output, source_lengths, target_lengths + + +def emformer_rnnt_model( + *, + input_dim: int, + encoding_dim: int, + num_symbols: int, + segment_length: int, + right_context_length: int, + time_reduction_input_dim: int, + time_reduction_stride: int, + transformer_num_heads: int, + transformer_ffn_dim: int, + transformer_num_layers: int, + transformer_dropout: float, + transformer_activation: str, + transformer_left_context_length: int, + transformer_max_memory_size: int, + transformer_weight_init_scale_strategy: str, + transformer_tanh_on_mem: bool, + symbol_embedding_dim: int, + num_lstm_layers: int, + lstm_layer_norm: bool, + lstm_layer_norm_epsilon: float, + lstm_dropout: float, +) -> RNNT: + r"""Builds Emformer-based :class:`~torchaudio.models.RNNT`. + + Note: + For non-streaming inference, the expectation is for `transcribe` to be called on input + sequences right-concatenated with `right_context_length` frames. + + For streaming inference, the expectation is for `transcribe_streaming` to be called + on input chunks comprising `segment_length` frames right-concatenated with `right_context_length` + frames. + + Args: + input_dim (int): dimension of input sequence frames passed to transcription network. + encoding_dim (int): dimension of transcription- and prediction-network-generated encodings + passed to joint network. + num_symbols (int): cardinality of set of target tokens. + segment_length (int): length of input segment expressed as number of frames. + right_context_length (int): length of right context expressed as number of frames. + time_reduction_input_dim (int): dimension to scale each element in input sequences to + prior to applying time reduction block. + time_reduction_stride (int): factor by which to reduce length of input sequence. + transformer_num_heads (int): number of attention heads in each Emformer layer. + transformer_ffn_dim (int): hidden layer dimension of each Emformer layer's feedforward network. + transformer_num_layers (int): number of Emformer layers to instantiate. + transformer_left_context_length (int): length of left context considered by Emformer. + transformer_dropout (float): Emformer dropout probability. + transformer_activation (str): activation function to use in each Emformer layer's + feedforward network. Must be one of ("relu", "gelu", "silu"). + transformer_max_memory_size (int): maximum number of memory elements to use. + transformer_weight_init_scale_strategy (str): per-layer weight initialization scaling + strategy. Must be one of ("depthwise", "constant", ``None``). + transformer_tanh_on_mem (bool): if ``True``, applies tanh to memory elements. + symbol_embedding_dim (int): dimension of each target token embedding. + num_lstm_layers (int): number of LSTM layers to instantiate. + lstm_layer_norm (bool): if ``True``, enables layer normalization for LSTM layers. + lstm_layer_norm_epsilon (float): value of epsilon to use in LSTM layer normalization layers. + lstm_dropout (float): LSTM dropout probability. + + Returns: + RNNT: + Emformer RNN-T model. + """ + encoder = _EmformerEncoder( + input_dim=input_dim, + output_dim=encoding_dim, + segment_length=segment_length, + right_context_length=right_context_length, + time_reduction_input_dim=time_reduction_input_dim, + time_reduction_stride=time_reduction_stride, + transformer_num_heads=transformer_num_heads, + transformer_ffn_dim=transformer_ffn_dim, + transformer_num_layers=transformer_num_layers, + transformer_dropout=transformer_dropout, + transformer_activation=transformer_activation, + transformer_left_context_length=transformer_left_context_length, + transformer_max_memory_size=transformer_max_memory_size, + transformer_weight_init_scale_strategy=transformer_weight_init_scale_strategy, + transformer_tanh_on_mem=transformer_tanh_on_mem, + ) + predictor = _Predictor( + num_symbols, + encoding_dim, + symbol_embedding_dim=symbol_embedding_dim, + num_lstm_layers=num_lstm_layers, + lstm_hidden_dim=symbol_embedding_dim, + lstm_layer_norm=lstm_layer_norm, + lstm_layer_norm_epsilon=lstm_layer_norm_epsilon, + lstm_dropout=lstm_dropout, + ) + joiner = _Joiner(encoding_dim, num_symbols) + return RNNT(encoder, predictor, joiner) + + +def emformer_rnnt_base(num_symbols: int) -> RNNT: + r"""Builds basic version of Emformer-based :class:`~torchaudio.models.RNNT`. + + Args: + num_symbols (int): The size of target token lexicon. + + Returns: + RNNT: + Emformer RNN-T model. + """ + return emformer_rnnt_model( + input_dim=80, + encoding_dim=1024, + num_symbols=num_symbols, + segment_length=16, + right_context_length=4, + time_reduction_input_dim=128, + time_reduction_stride=4, + transformer_num_heads=8, + transformer_ffn_dim=2048, + transformer_num_layers=20, + transformer_dropout=0.1, + transformer_activation="gelu", + transformer_left_context_length=30, + transformer_max_memory_size=0, + transformer_weight_init_scale_strategy="depthwise", + transformer_tanh_on_mem=True, + symbol_embedding_dim=512, + num_lstm_layers=3, + lstm_layer_norm=True, + lstm_layer_norm_epsilon=1e-3, + lstm_dropout=0.3, + ) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/rnnt_decoder.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/rnnt_decoder.py new file mode 100644 index 0000000000000000000000000000000000000000..5a02b2ca907733a8e1ab404d1107bb702e977748 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/rnnt_decoder.py @@ -0,0 +1,339 @@ +from typing import Callable, Dict, List, Optional, Tuple + +import torch +from torchaudio.models import RNNT + + +__all__ = ["Hypothesis", "RNNTBeamSearch"] + + +Hypothesis = Tuple[List[int], torch.Tensor, List[List[torch.Tensor]], float] +Hypothesis.__doc__ = """Hypothesis generated by RNN-T beam search decoder, + represented as tuple of (tokens, prediction network output, prediction network state, score). + """ + + +def _get_hypo_tokens(hypo: Hypothesis) -> List[int]: + return hypo[0] + + +def _get_hypo_predictor_out(hypo: Hypothesis) -> torch.Tensor: + return hypo[1] + + +def _get_hypo_state(hypo: Hypothesis) -> List[List[torch.Tensor]]: + return hypo[2] + + +def _get_hypo_score(hypo: Hypothesis) -> float: + return hypo[3] + + +def _get_hypo_key(hypo: Hypothesis) -> str: + return str(hypo[0]) + + +def _batch_state(hypos: List[Hypothesis]) -> List[List[torch.Tensor]]: + states: List[List[torch.Tensor]] = [] + for i in range(len(_get_hypo_state(hypos[0]))): + batched_state_components: List[torch.Tensor] = [] + for j in range(len(_get_hypo_state(hypos[0])[i])): + batched_state_components.append(torch.cat([_get_hypo_state(hypo)[i][j] for hypo in hypos])) + states.append(batched_state_components) + return states + + +def _slice_state(states: List[List[torch.Tensor]], idx: int, device: torch.device) -> List[List[torch.Tensor]]: + idx_tensor = torch.tensor([idx], device=device) + return [[state.index_select(0, idx_tensor) for state in state_tuple] for state_tuple in states] + + +def _default_hypo_sort_key(hypo: Hypothesis) -> float: + return _get_hypo_score(hypo) / (len(_get_hypo_tokens(hypo)) + 1) + + +def _compute_updated_scores( + hypos: List[Hypothesis], + next_token_probs: torch.Tensor, + beam_width: int, +) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor]: + hypo_scores = torch.tensor([_get_hypo_score(h) for h in hypos]).unsqueeze(1) + nonblank_scores = hypo_scores + next_token_probs[:, :-1] # [beam_width, num_tokens - 1] + nonblank_nbest_scores, nonblank_nbest_idx = nonblank_scores.reshape(-1).topk(beam_width) + nonblank_nbest_hypo_idx = nonblank_nbest_idx.div(nonblank_scores.shape[1], rounding_mode="trunc") + nonblank_nbest_token = nonblank_nbest_idx % nonblank_scores.shape[1] + return nonblank_nbest_scores, nonblank_nbest_hypo_idx, nonblank_nbest_token + + +def _remove_hypo(hypo: Hypothesis, hypo_list: List[Hypothesis]) -> None: + for i, elem in enumerate(hypo_list): + if _get_hypo_key(hypo) == _get_hypo_key(elem): + del hypo_list[i] + break + + +class RNNTBeamSearch(torch.nn.Module): + r"""Beam search decoder for RNN-T model. + + See Also: + * :class:`torchaudio.pipelines.RNNTBundle`: ASR pipeline with pretrained model. + + Args: + model (RNNT): RNN-T model to use. + blank (int): index of blank token in vocabulary. + temperature (float, optional): temperature to apply to joint network output. + Larger values yield more uniform samples. (Default: 1.0) + hypo_sort_key (Callable[[Hypothesis], float] or None, optional): callable that computes a score + for a given hypothesis to rank hypotheses by. If ``None``, defaults to callable that returns + hypothesis score normalized by token sequence length. (Default: None) + step_max_tokens (int, optional): maximum number of tokens to emit per input time step. (Default: 100) + """ + + def __init__( + self, + model: RNNT, + blank: int, + temperature: float = 1.0, + hypo_sort_key: Optional[Callable[[Hypothesis], float]] = None, + step_max_tokens: int = 100, + ) -> None: + super().__init__() + self.model = model + self.blank = blank + self.temperature = temperature + + if hypo_sort_key is None: + self.hypo_sort_key = _default_hypo_sort_key + else: + self.hypo_sort_key = hypo_sort_key + + self.step_max_tokens = step_max_tokens + + def _init_b_hypos(self, device: torch.device) -> List[Hypothesis]: + token = self.blank + state = None + + one_tensor = torch.tensor([1], device=device) + pred_out, _, pred_state = self.model.predict(torch.tensor([[token]], device=device), one_tensor, state) + init_hypo = ( + [token], + pred_out[0].detach(), + pred_state, + 0.0, + ) + return [init_hypo] + + def _gen_next_token_probs( + self, enc_out: torch.Tensor, hypos: List[Hypothesis], device: torch.device + ) -> torch.Tensor: + one_tensor = torch.tensor([1], device=device) + predictor_out = torch.stack([_get_hypo_predictor_out(h) for h in hypos], dim=0) + joined_out, _, _ = self.model.join( + enc_out, + one_tensor, + predictor_out, + torch.tensor([1] * len(hypos), device=device), + ) # [beam_width, 1, 1, num_tokens] + joined_out = torch.nn.functional.log_softmax(joined_out / self.temperature, dim=3) + return joined_out[:, 0, 0] + + def _gen_b_hypos( + self, + b_hypos: List[Hypothesis], + a_hypos: List[Hypothesis], + next_token_probs: torch.Tensor, + key_to_b_hypo: Dict[str, Hypothesis], + ) -> List[Hypothesis]: + for i in range(len(a_hypos)): + h_a = a_hypos[i] + append_blank_score = _get_hypo_score(h_a) + next_token_probs[i, -1] + if _get_hypo_key(h_a) in key_to_b_hypo: + h_b = key_to_b_hypo[_get_hypo_key(h_a)] + _remove_hypo(h_b, b_hypos) + score = float(torch.tensor(_get_hypo_score(h_b)).logaddexp(append_blank_score)) + else: + score = float(append_blank_score) + h_b = ( + _get_hypo_tokens(h_a), + _get_hypo_predictor_out(h_a), + _get_hypo_state(h_a), + score, + ) + b_hypos.append(h_b) + key_to_b_hypo[_get_hypo_key(h_b)] = h_b + _, sorted_idx = torch.tensor([_get_hypo_score(hypo) for hypo in b_hypos]).sort() + return [b_hypos[idx] for idx in sorted_idx] + + def _gen_a_hypos( + self, + a_hypos: List[Hypothesis], + b_hypos: List[Hypothesis], + next_token_probs: torch.Tensor, + t: int, + beam_width: int, + device: torch.device, + ) -> List[Hypothesis]: + ( + nonblank_nbest_scores, + nonblank_nbest_hypo_idx, + nonblank_nbest_token, + ) = _compute_updated_scores(a_hypos, next_token_probs, beam_width) + + if len(b_hypos) < beam_width: + b_nbest_score = -float("inf") + else: + b_nbest_score = _get_hypo_score(b_hypos[-beam_width]) + + base_hypos: List[Hypothesis] = [] + new_tokens: List[int] = [] + new_scores: List[float] = [] + for i in range(beam_width): + score = float(nonblank_nbest_scores[i]) + if score > b_nbest_score: + a_hypo_idx = int(nonblank_nbest_hypo_idx[i]) + base_hypos.append(a_hypos[a_hypo_idx]) + new_tokens.append(int(nonblank_nbest_token[i])) + new_scores.append(score) + + if base_hypos: + new_hypos = self._gen_new_hypos(base_hypos, new_tokens, new_scores, t, device) + else: + new_hypos: List[Hypothesis] = [] + + return new_hypos + + def _gen_new_hypos( + self, + base_hypos: List[Hypothesis], + tokens: List[int], + scores: List[float], + t: int, + device: torch.device, + ) -> List[Hypothesis]: + tgt_tokens = torch.tensor([[token] for token in tokens], device=device) + states = _batch_state(base_hypos) + pred_out, _, pred_states = self.model.predict( + tgt_tokens, + torch.tensor([1] * len(base_hypos), device=device), + states, + ) + new_hypos: List[Hypothesis] = [] + for i, h_a in enumerate(base_hypos): + new_tokens = _get_hypo_tokens(h_a) + [tokens[i]] + new_hypos.append((new_tokens, pred_out[i].detach(), _slice_state(pred_states, i, device), scores[i])) + return new_hypos + + def _search( + self, + enc_out: torch.Tensor, + hypo: Optional[List[Hypothesis]], + beam_width: int, + ) -> List[Hypothesis]: + n_time_steps = enc_out.shape[1] + device = enc_out.device + + a_hypos: List[Hypothesis] = [] + b_hypos = self._init_b_hypos(device) if hypo is None else hypo + for t in range(n_time_steps): + a_hypos = b_hypos + b_hypos = torch.jit.annotate(List[Hypothesis], []) + key_to_b_hypo: Dict[str, Hypothesis] = {} + symbols_current_t = 0 + + while a_hypos: + next_token_probs = self._gen_next_token_probs(enc_out[:, t : t + 1], a_hypos, device) + next_token_probs = next_token_probs.cpu() + b_hypos = self._gen_b_hypos(b_hypos, a_hypos, next_token_probs, key_to_b_hypo) + + if symbols_current_t == self.step_max_tokens: + break + + a_hypos = self._gen_a_hypos( + a_hypos, + b_hypos, + next_token_probs, + t, + beam_width, + device, + ) + if a_hypos: + symbols_current_t += 1 + + _, sorted_idx = torch.tensor([self.hypo_sort_key(hyp) for hyp in b_hypos]).topk(beam_width) + b_hypos = [b_hypos[idx] for idx in sorted_idx] + + return b_hypos + + def forward(self, input: torch.Tensor, length: torch.Tensor, beam_width: int) -> List[Hypothesis]: + r"""Performs beam search for the given input sequence. + + T: number of frames; + D: feature dimension of each frame. + + Args: + input (torch.Tensor): sequence of input frames, with shape (T, D) or (1, T, D). + length (torch.Tensor): number of valid frames in input + sequence, with shape () or (1,). + beam_width (int): beam size to use during search. + + Returns: + List[Hypothesis]: top-``beam_width`` hypotheses found by beam search. + """ + if input.dim() != 2 and not (input.dim() == 3 and input.shape[0] == 1): + raise ValueError("input must be of shape (T, D) or (1, T, D)") + if input.dim() == 2: + input = input.unsqueeze(0) + + if length.shape != () and length.shape != (1,): + raise ValueError("length must be of shape () or (1,)") + if length.dim() == 0: + length = length.unsqueeze(0) + + enc_out, _ = self.model.transcribe(input, length) + return self._search(enc_out, None, beam_width) + + @torch.jit.export + def infer( + self, + input: torch.Tensor, + length: torch.Tensor, + beam_width: int, + state: Optional[List[List[torch.Tensor]]] = None, + hypothesis: Optional[List[Hypothesis]] = None, + ) -> Tuple[List[Hypothesis], List[List[torch.Tensor]]]: + r"""Performs beam search for the given input sequence in streaming mode. + + T: number of frames; + D: feature dimension of each frame. + + Args: + input (torch.Tensor): sequence of input frames, with shape (T, D) or (1, T, D). + length (torch.Tensor): number of valid frames in input + sequence, with shape () or (1,). + beam_width (int): beam size to use during search. + state (List[List[torch.Tensor]] or None, optional): list of lists of tensors + representing transcription network internal state generated in preceding + invocation. (Default: ``None``) + hypothesis (List[Hypothesis] or None): hypotheses from preceding invocation to seed + search with. (Default: ``None``) + + Returns: + (List[Hypothesis], List[List[torch.Tensor]]): + List[Hypothesis] + top-``beam_width`` hypotheses found by beam search. + List[List[torch.Tensor]] + list of lists of tensors representing transcription network + internal state generated in current invocation. + """ + if input.dim() != 2 and not (input.dim() == 3 and input.shape[0] == 1): + raise ValueError("input must be of shape (T, D) or (1, T, D)") + if input.dim() == 2: + input = input.unsqueeze(0) + + if length.shape != () and length.shape != (1,): + raise ValueError("length must be of shape () or (1,)") + if length.dim() == 0: + length = length.unsqueeze(0) + + enc_out, _, state = self.model.transcribe_streaming(input, length, state) + return self._search(enc_out, hypothesis, beam_width), state diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/squim/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/squim/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..092d6eb8e36e2329c78d21bf609a8458818995e6 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/squim/__init__.py @@ -0,0 +1,11 @@ +from .objective import squim_objective_base, squim_objective_model, SquimObjective +from .subjective import squim_subjective_base, squim_subjective_model, SquimSubjective + +__all__ = [ + "squim_objective_base", + "squim_objective_model", + "squim_subjective_base", + "squim_subjective_model", + "SquimObjective", + "SquimSubjective", +] diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/squim/objective.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/squim/objective.py new file mode 100644 index 0000000000000000000000000000000000000000..f49fd1f8aa4cde52e55aafb57d7739a5db372c67 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/squim/objective.py @@ -0,0 +1,326 @@ +import math +from typing import List, Optional, Tuple + +import torch +import torch.nn as nn +import torch.nn.functional as F + + +def transform_wb_pesq_range(x: float) -> float: + """The metric defined by ITU-T P.862 is often called 'PESQ score', which is defined + for narrow-band signals and has a value range of [-0.5, 4.5] exactly. Here, we use the metric + defined by ITU-T P.862.2, commonly known as 'wide-band PESQ' and will be referred to as "PESQ score". + + Args: + x (float): Narrow-band PESQ score. + + Returns: + (float): Wide-band PESQ score. + """ + return 0.999 + (4.999 - 0.999) / (1 + math.exp(-1.3669 * x + 3.8224)) + + +PESQRange: Tuple[float, float] = ( + 1.0, # P.862.2 uses a different input filter than P.862, and the lower bound of + # the raw score is not -0.5 anymore. It's hard to figure out the true lower bound. + # We are using 1.0 as a reasonable approximation. + transform_wb_pesq_range(4.5), +) + + +class RangeSigmoid(nn.Module): + def __init__(self, val_range: Tuple[float, float] = (0.0, 1.0)) -> None: + super(RangeSigmoid, self).__init__() + assert isinstance(val_range, tuple) and len(val_range) == 2 + self.val_range: Tuple[float, float] = val_range + self.sigmoid: nn.modules.Module = nn.Sigmoid() + + def forward(self, x: torch.Tensor) -> torch.Tensor: + out = self.sigmoid(x) * (self.val_range[1] - self.val_range[0]) + self.val_range[0] + return out + + +class Encoder(nn.Module): + """Encoder module that transform 1D waveform to 2D representations. + + Args: + feat_dim (int, optional): The feature dimension after Encoder module. (Default: 512) + win_len (int, optional): kernel size in the Conv1D layer. (Default: 32) + """ + + def __init__(self, feat_dim: int = 512, win_len: int = 32) -> None: + super(Encoder, self).__init__() + + self.conv1d = nn.Conv1d(1, feat_dim, win_len, stride=win_len // 2, bias=False) + + def forward(self, x: torch.Tensor) -> torch.Tensor: + """Apply waveforms to convolutional layer and ReLU layer. + + Args: + x (torch.Tensor): Input waveforms. Tensor with dimensions `(batch, time)`. + + Returns: + (torch,Tensor): Feature Tensor with dimensions `(batch, channel, frame)`. + """ + out = x.unsqueeze(dim=1) + out = F.relu(self.conv1d(out)) + return out + + +class SingleRNN(nn.Module): + def __init__(self, rnn_type: str, input_size: int, hidden_size: int, dropout: float = 0.0) -> None: + super(SingleRNN, self).__init__() + + self.rnn_type = rnn_type + self.input_size = input_size + self.hidden_size = hidden_size + + self.rnn: nn.modules.Module = getattr(nn, rnn_type)( + input_size, + hidden_size, + 1, + dropout=dropout, + batch_first=True, + bidirectional=True, + ) + + self.proj = nn.Linear(hidden_size * 2, input_size) + + def forward(self, x: torch.Tensor) -> torch.Tensor: + # input shape: batch, seq, dim + out, _ = self.rnn(x) + out = self.proj(out) + return out + + +class DPRNN(nn.Module): + """*Dual-path recurrent neural networks (DPRNN)* :cite:`luo2020dual`. + + Args: + feat_dim (int, optional): The feature dimension after Encoder module. (Default: 64) + hidden_dim (int, optional): Hidden dimension in the RNN layer of DPRNN. (Default: 128) + num_blocks (int, optional): Number of DPRNN layers. (Default: 6) + rnn_type (str, optional): Type of RNN in DPRNN. Valid options are ["RNN", "LSTM", "GRU"]. (Default: "LSTM") + d_model (int, optional): The number of expected features in the input. (Default: 256) + chunk_size (int, optional): Chunk size of input for DPRNN. (Default: 100) + chunk_stride (int, optional): Stride of chunk input for DPRNN. (Default: 50) + """ + + def __init__( + self, + feat_dim: int = 64, + hidden_dim: int = 128, + num_blocks: int = 6, + rnn_type: str = "LSTM", + d_model: int = 256, + chunk_size: int = 100, + chunk_stride: int = 50, + ) -> None: + super(DPRNN, self).__init__() + + self.num_blocks = num_blocks + + self.row_rnn = nn.ModuleList([]) + self.col_rnn = nn.ModuleList([]) + self.row_norm = nn.ModuleList([]) + self.col_norm = nn.ModuleList([]) + for _ in range(num_blocks): + self.row_rnn.append(SingleRNN(rnn_type, feat_dim, hidden_dim)) + self.col_rnn.append(SingleRNN(rnn_type, feat_dim, hidden_dim)) + self.row_norm.append(nn.GroupNorm(1, feat_dim, eps=1e-8)) + self.col_norm.append(nn.GroupNorm(1, feat_dim, eps=1e-8)) + self.conv = nn.Sequential( + nn.Conv2d(feat_dim, d_model, 1), + nn.PReLU(), + ) + self.chunk_size = chunk_size + self.chunk_stride = chunk_stride + + def pad_chunk(self, x: torch.Tensor) -> Tuple[torch.Tensor, int]: + # input shape: (B, N, T) + seq_len = x.shape[-1] + + rest = self.chunk_size - (self.chunk_stride + seq_len % self.chunk_size) % self.chunk_size + out = F.pad(x, [self.chunk_stride, rest + self.chunk_stride]) + + return out, rest + + def chunking(self, x: torch.Tensor) -> Tuple[torch.Tensor, int]: + out, rest = self.pad_chunk(x) + batch_size, feat_dim, seq_len = out.shape + + segments1 = out[:, :, : -self.chunk_stride].contiguous().view(batch_size, feat_dim, -1, self.chunk_size) + segments2 = out[:, :, self.chunk_stride :].contiguous().view(batch_size, feat_dim, -1, self.chunk_size) + out = torch.cat([segments1, segments2], dim=3) + out = out.view(batch_size, feat_dim, -1, self.chunk_size).transpose(2, 3).contiguous() + + return out, rest + + def merging(self, x: torch.Tensor, rest: int) -> torch.Tensor: + batch_size, dim, _, _ = x.shape + out = x.transpose(2, 3).contiguous().view(batch_size, dim, -1, self.chunk_size * 2) + out1 = out[:, :, :, : self.chunk_size].contiguous().view(batch_size, dim, -1)[:, :, self.chunk_stride :] + out2 = out[:, :, :, self.chunk_size :].contiguous().view(batch_size, dim, -1)[:, :, : -self.chunk_stride] + out = out1 + out2 + if rest > 0: + out = out[:, :, :-rest] + out = out.contiguous() + return out + + def forward(self, x: torch.Tensor) -> torch.Tensor: + x, rest = self.chunking(x) + batch_size, _, dim1, dim2 = x.shape + out = x + for row_rnn, row_norm, col_rnn, col_norm in zip(self.row_rnn, self.row_norm, self.col_rnn, self.col_norm): + row_in = out.permute(0, 3, 2, 1).contiguous().view(batch_size * dim2, dim1, -1).contiguous() + row_out = row_rnn(row_in) + row_out = row_out.view(batch_size, dim2, dim1, -1).permute(0, 3, 2, 1).contiguous() + row_out = row_norm(row_out) + out = out + row_out + + col_in = out.permute(0, 2, 3, 1).contiguous().view(batch_size * dim1, dim2, -1).contiguous() + col_out = col_rnn(col_in) + col_out = col_out.view(batch_size, dim1, dim2, -1).permute(0, 3, 1, 2).contiguous() + col_out = col_norm(col_out) + out = out + col_out + out = self.conv(out) + out = self.merging(out, rest) + out = out.transpose(1, 2).contiguous() + return out + + +class AutoPool(nn.Module): + def __init__(self, pool_dim: int = 1) -> None: + super(AutoPool, self).__init__() + self.pool_dim: int = pool_dim + self.softmax: nn.modules.Module = nn.Softmax(dim=pool_dim) + self.register_parameter("alpha", nn.Parameter(torch.ones(1))) + + def forward(self, x: torch.Tensor) -> torch.Tensor: + weight = self.softmax(torch.mul(x, self.alpha)) + out = torch.sum(torch.mul(x, weight), dim=self.pool_dim) + return out + + +class SquimObjective(nn.Module): + """Speech Quality and Intelligibility Measures (SQUIM) model that predicts **objective** metric scores + for speech enhancement (e.g., STOI, PESQ, and SI-SDR). + + Args: + encoder (torch.nn.Module): Encoder module to transform 1D waveform to 2D feature representation. + dprnn (torch.nn.Module): DPRNN module to model sequential feature. + branches (torch.nn.ModuleList): Transformer branches in which each branch estimate one objective metirc score. + """ + + def __init__( + self, + encoder: nn.Module, + dprnn: nn.Module, + branches: nn.ModuleList, + ): + super(SquimObjective, self).__init__() + self.encoder = encoder + self.dprnn = dprnn + self.branches = branches + + def forward(self, x: torch.Tensor) -> List[torch.Tensor]: + """ + Args: + x (torch.Tensor): Input waveforms. Tensor with dimensions `(batch, time)`. + + Returns: + List(torch.Tensor): List of score Tenosrs. Each Tensor is with dimension `(batch,)`. + """ + if x.ndim != 2: + raise ValueError(f"The input must be a 2D Tensor. Found dimension {x.ndim}.") + x = x / (torch.mean(x**2, dim=1, keepdim=True) ** 0.5 * 20) + out = self.encoder(x) + out = self.dprnn(out) + scores = [] + for branch in self.branches: + scores.append(branch(out).squeeze(dim=1)) + return scores + + +def _create_branch(d_model: int, nhead: int, metric: str) -> nn.modules.Module: + """Create branch module after DPRNN model for predicting metric score. + + Args: + d_model (int): The number of expected features in the input. + nhead (int): Number of heads in the multi-head attention model. + metric (str): The metric name to predict. + + Returns: + (nn.Module): Returned module to predict corresponding metric score. + """ + layer1 = nn.TransformerEncoderLayer(d_model, nhead, d_model * 4, dropout=0.0, batch_first=True) + layer2 = AutoPool() + if metric == "stoi": + layer3 = nn.Sequential( + nn.Linear(d_model, d_model), + nn.PReLU(), + nn.Linear(d_model, 1), + RangeSigmoid(), + ) + elif metric == "pesq": + layer3 = nn.Sequential( + nn.Linear(d_model, d_model), + nn.PReLU(), + nn.Linear(d_model, 1), + RangeSigmoid(val_range=PESQRange), + ) + else: + layer3: nn.modules.Module = nn.Sequential(nn.Linear(d_model, d_model), nn.PReLU(), nn.Linear(d_model, 1)) + return nn.Sequential(layer1, layer2, layer3) + + +def squim_objective_model( + feat_dim: int, + win_len: int, + d_model: int, + nhead: int, + hidden_dim: int, + num_blocks: int, + rnn_type: str, + chunk_size: int, + chunk_stride: Optional[int] = None, +) -> SquimObjective: + """Build a custome :class:`torchaudio.models.squim.SquimObjective` model. + + Args: + feat_dim (int, optional): The feature dimension after Encoder module. + win_len (int): Kernel size in the Encoder module. + d_model (int): The number of expected features in the input. + nhead (int): Number of heads in the multi-head attention model. + hidden_dim (int): Hidden dimension in the RNN layer of DPRNN. + num_blocks (int): Number of DPRNN layers. + rnn_type (str): Type of RNN in DPRNN. Valid options are ["RNN", "LSTM", "GRU"]. + chunk_size (int): Chunk size of input for DPRNN. + chunk_stride (int or None, optional): Stride of chunk input for DPRNN. + """ + if chunk_stride is None: + chunk_stride = chunk_size // 2 + encoder = Encoder(feat_dim, win_len) + dprnn = DPRNN(feat_dim, hidden_dim, num_blocks, rnn_type, d_model, chunk_size, chunk_stride) + branches = nn.ModuleList( + [ + _create_branch(d_model, nhead, "stoi"), + _create_branch(d_model, nhead, "pesq"), + _create_branch(d_model, nhead, "sisdr"), + ] + ) + return SquimObjective(encoder, dprnn, branches) + + +def squim_objective_base() -> SquimObjective: + """Build :class:`torchaudio.models.squim.SquimObjective` model with default arguments.""" + return squim_objective_model( + feat_dim=256, + win_len=64, + d_model=256, + nhead=4, + hidden_dim=256, + num_blocks=2, + rnn_type="LSTM", + chunk_size=71, + ) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/squim/subjective.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/squim/subjective.py new file mode 100644 index 0000000000000000000000000000000000000000..4be681c91c5f67a2b888b49ec8269b74762360ab --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/squim/subjective.py @@ -0,0 +1,150 @@ +from typing import Tuple + +import torch +import torch.nn as nn +import torchaudio + + +class AttPool(nn.Module): + """Attention-Pooling module that estimates the attention score. + + Args: + input_dim (int): Input feature dimension. + att_dim (int): Attention Tensor dimension. + """ + + def __init__(self, input_dim: int, att_dim: int): + super(AttPool, self).__init__() + + self.linear1 = nn.Linear(input_dim, 1) + self.linear2 = nn.Linear(input_dim, att_dim) + + def forward(self, x: torch.Tensor) -> torch.Tensor: + """Apply attention and pooling. + + Args: + x (torch.Tensor): Input Tensor with dimensions `(batch, time, feature_dim)`. + + Returns: + (torch.Tensor): Attention score with dimensions `(batch, att_dim)`. + """ + + att = self.linear1(x) # (batch, time, 1) + att = att.transpose(2, 1) # (batch, 1, time) + att = nn.functional.softmax(att, dim=2) + x = torch.matmul(att, x).squeeze(1) # (batch, input_dim) + x = self.linear2(x) # (batch, att_dim) + return x + + +class Predictor(nn.Module): + """Prediction module that apply pooling and attention, then predict subjective metric scores. + + Args: + input_dim (int): Input feature dimension. + att_dim (int): Attention Tensor dimension. + """ + + def __init__(self, input_dim: int, att_dim: int): + super(Predictor, self).__init__() + self.att_pool_layer = AttPool(input_dim, att_dim) + self.att_dim = att_dim + + def forward(self, x: torch.Tensor) -> torch.Tensor: + """Predict subjective evaluation metric score. + + Args: + x (torch.Tensor): Input Tensor with dimensions `(batch, time, feature_dim)`. + + Returns: + (torch.Tensor): Subjective metric score. Tensor with dimensions `(batch,)`. + """ + x = self.att_pool_layer(x) + x = nn.functional.softmax(x, dim=1) + B = torch.linspace(0, 4, steps=self.att_dim, device=x.device) + x = (x * B).sum(dim=1) + return x + + +class SquimSubjective(nn.Module): + """Speech Quality and Intelligibility Measures (SQUIM) model that predicts **subjective** metric scores + for speech enhancement (e.g., Mean Opinion Score (MOS)). The model is adopted from *NORESQA-MOS* + :cite:`manocha2022speech` which predicts MOS scores given the input speech and a non-matching reference. + + Args: + ssl_model (torch.nn.Module): The self-supervised learning model for feature extraction. + projector (torch.nn.Module): Projection layer that projects SSL feature to a lower dimension. + predictor (torch.nn.Module): Predict the subjective scores. + """ + + def __init__(self, ssl_model: nn.Module, projector: nn.Module, predictor: nn.Module): + super(SquimSubjective, self).__init__() + self.ssl_model = ssl_model + self.projector = projector + self.predictor = predictor + + def _align_shapes(self, waveform: torch.Tensor, reference: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]: + """Cut or pad the reference Tensor to make it aligned with waveform Tensor. + + Args: + waveform (torch.Tensor): Input waveform for evaluation. Tensor with dimensions `(batch, time)`. + reference (torch.Tensor): Non-matching clean reference. Tensor with dimensions `(batch, time_ref)`. + + Returns: + (torch.Tensor, torch.Tensor): The aligned waveform and reference Tensors + with same dimensions `(batch, time)`. + """ + T_waveform = waveform.shape[-1] + T_reference = reference.shape[-1] + if T_reference < T_waveform: + num_padding = T_waveform // T_reference + 1 + reference = torch.cat([reference for _ in range(num_padding)], dim=1) + return waveform, reference[:, :T_waveform] + + def forward(self, waveform: torch.Tensor, reference: torch.Tensor): + """Predict subjective evaluation metric score. + + Args: + waveform (torch.Tensor): Input waveform for evaluation. Tensor with dimensions `(batch, time)`. + reference (torch.Tensor): Non-matching clean reference. Tensor with dimensions `(batch, time_ref)`. + + Returns: + (torch.Tensor): Subjective metric score. Tensor with dimensions `(batch,)`. + """ + waveform, reference = self._align_shapes(waveform, reference) + waveform = self.projector(self.ssl_model.extract_features(waveform)[0][-1]) + reference = self.projector(self.ssl_model.extract_features(reference)[0][-1]) + concat = torch.cat((reference, waveform), dim=2) + score_diff = self.predictor(concat) # Score difference compared to the reference + return 5 - score_diff + + +def squim_subjective_model( + ssl_type: str, + feat_dim: int, + proj_dim: int, + att_dim: int, +) -> SquimSubjective: + """Build a custome :class:`torchaudio.prototype.models.SquimSubjective` model. + + Args: + ssl_type (str): Type of self-supervised learning (SSL) models. + Must be one of ["wav2vec2_base", "wav2vec2_large"]. + feat_dim (int): Feature dimension of the SSL feature representation. + proj_dim (int): Output dimension of projection layer. + att_dim (int): Dimension of attention scores. + """ + ssl_model = getattr(torchaudio.models, ssl_type)() + projector = nn.Linear(feat_dim, proj_dim) + predictor = Predictor(proj_dim * 2, att_dim) + return SquimSubjective(ssl_model, projector, predictor) + + +def squim_subjective_base() -> SquimSubjective: + """Build :class:`torchaudio.prototype.models.SquimSubjective` model with default arguments.""" + return squim_subjective_model( + ssl_type="wav2vec2_base", + feat_dim=768, + proj_dim=32, + att_dim=5, + ) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/tacotron2.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/tacotron2.py new file mode 100644 index 0000000000000000000000000000000000000000..978fb97c88db9c64a9b216a340e63075e53e2295 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/tacotron2.py @@ -0,0 +1,1046 @@ +# ***************************************************************************** +# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of the NVIDIA CORPORATION nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# ***************************************************************************** + +import warnings +from typing import List, Optional, Tuple, Union + +import torch +from torch import nn, Tensor +from torch.nn import functional as F + + +__all__ = [ + "Tacotron2", +] + + +def _get_linear_layer(in_dim: int, out_dim: int, bias: bool = True, w_init_gain: str = "linear") -> torch.nn.Linear: + r"""Linear layer with xavier uniform initialization. + + Args: + in_dim (int): Size of each input sample. + out_dim (int): Size of each output sample. + bias (bool, optional): If set to ``False``, the layer will not learn an additive bias. (Default: ``True``) + w_init_gain (str, optional): Parameter passed to ``torch.nn.init.calculate_gain`` + for setting the gain parameter of ``xavier_uniform_``. (Default: ``linear``) + + Returns: + (torch.nn.Linear): The corresponding linear layer. + """ + linear = torch.nn.Linear(in_dim, out_dim, bias=bias) + torch.nn.init.xavier_uniform_(linear.weight, gain=torch.nn.init.calculate_gain(w_init_gain)) + return linear + + +def _get_conv1d_layer( + in_channels: int, + out_channels: int, + kernel_size: int = 1, + stride: int = 1, + padding: Optional[Union[str, int, Tuple[int]]] = None, + dilation: int = 1, + bias: bool = True, + w_init_gain: str = "linear", +) -> torch.nn.Conv1d: + r"""1D convolution with xavier uniform initialization. + + Args: + in_channels (int): Number of channels in the input image. + out_channels (int): Number of channels produced by the convolution. + kernel_size (int, optional): Number of channels in the input image. (Default: ``1``) + stride (int, optional): Number of channels in the input image. (Default: ``1``) + padding (str, int or tuple, optional): Padding added to both sides of the input. + (Default: dilation * (kernel_size - 1) / 2) + dilation (int, optional): Number of channels in the input image. (Default: ``1``) + w_init_gain (str, optional): Parameter passed to ``torch.nn.init.calculate_gain`` + for setting the gain parameter of ``xavier_uniform_``. (Default: ``linear``) + + Returns: + (torch.nn.Conv1d): The corresponding Conv1D layer. + """ + if padding is None: + if kernel_size % 2 != 1: + raise ValueError("kernel_size must be odd") + padding = int(dilation * (kernel_size - 1) / 2) + + conv1d = torch.nn.Conv1d( + in_channels, + out_channels, + kernel_size=kernel_size, + stride=stride, + padding=padding, + dilation=dilation, + bias=bias, + ) + + torch.nn.init.xavier_uniform_(conv1d.weight, gain=torch.nn.init.calculate_gain(w_init_gain)) + + return conv1d + + +def _get_mask_from_lengths(lengths: Tensor) -> Tensor: + r"""Returns a binary mask based on ``lengths``. The ``i``-th row and ``j``-th column of the mask + is ``1`` if ``j`` is smaller than ``i``-th element of ``lengths. + + Args: + lengths (Tensor): The length of each element in the batch, with shape (n_batch, ). + + Returns: + mask (Tensor): The binary mask, with shape (n_batch, max of ``lengths``). + """ + max_len = torch.max(lengths).item() + ids = torch.arange(0, max_len, device=lengths.device, dtype=lengths.dtype) + mask = (ids < lengths.unsqueeze(1)).byte() + mask = torch.le(mask, 0) + return mask + + +class _LocationLayer(nn.Module): + r"""Location layer used in the Attention model. + + Args: + attention_n_filter (int): Number of filters for attention model. + attention_kernel_size (int): Kernel size for attention model. + attention_hidden_dim (int): Dimension of attention hidden representation. + """ + + def __init__( + self, + attention_n_filter: int, + attention_kernel_size: int, + attention_hidden_dim: int, + ): + super().__init__() + padding = int((attention_kernel_size - 1) / 2) + self.location_conv = _get_conv1d_layer( + 2, + attention_n_filter, + kernel_size=attention_kernel_size, + padding=padding, + bias=False, + stride=1, + dilation=1, + ) + self.location_dense = _get_linear_layer( + attention_n_filter, attention_hidden_dim, bias=False, w_init_gain="tanh" + ) + + def forward(self, attention_weights_cat: Tensor) -> Tensor: + r"""Location layer used in the Attention model. + + Args: + attention_weights_cat (Tensor): Cumulative and previous attention weights + with shape (n_batch, 2, max of ``text_lengths``). + + Returns: + processed_attention (Tensor): Cumulative and previous attention weights + with shape (n_batch, ``attention_hidden_dim``). + """ + # (n_batch, attention_n_filter, text_lengths.max()) + processed_attention = self.location_conv(attention_weights_cat) + processed_attention = processed_attention.transpose(1, 2) + # (n_batch, text_lengths.max(), attention_hidden_dim) + processed_attention = self.location_dense(processed_attention) + return processed_attention + + +class _Attention(nn.Module): + r"""Locally sensitive attention model. + + Args: + attention_rnn_dim (int): Number of hidden units for RNN. + encoder_embedding_dim (int): Number of embedding dimensions in the Encoder. + attention_hidden_dim (int): Dimension of attention hidden representation. + attention_location_n_filter (int): Number of filters for Attention model. + attention_location_kernel_size (int): Kernel size for Attention model. + """ + + def __init__( + self, + attention_rnn_dim: int, + encoder_embedding_dim: int, + attention_hidden_dim: int, + attention_location_n_filter: int, + attention_location_kernel_size: int, + ) -> None: + super().__init__() + self.query_layer = _get_linear_layer(attention_rnn_dim, attention_hidden_dim, bias=False, w_init_gain="tanh") + self.memory_layer = _get_linear_layer( + encoder_embedding_dim, attention_hidden_dim, bias=False, w_init_gain="tanh" + ) + self.v = _get_linear_layer(attention_hidden_dim, 1, bias=False) + self.location_layer = _LocationLayer( + attention_location_n_filter, + attention_location_kernel_size, + attention_hidden_dim, + ) + self.score_mask_value = -float("inf") + + def _get_alignment_energies(self, query: Tensor, processed_memory: Tensor, attention_weights_cat: Tensor) -> Tensor: + r"""Get the alignment vector. + + Args: + query (Tensor): Decoder output with shape (n_batch, n_mels * n_frames_per_step). + processed_memory (Tensor): Processed Encoder outputs + with shape (n_batch, max of ``text_lengths``, attention_hidden_dim). + attention_weights_cat (Tensor): Cumulative and previous attention weights + with shape (n_batch, 2, max of ``text_lengths``). + + Returns: + alignment (Tensor): attention weights, it is a tensor with shape (batch, max of ``text_lengths``). + """ + + processed_query = self.query_layer(query.unsqueeze(1)) + processed_attention_weights = self.location_layer(attention_weights_cat) + energies = self.v(torch.tanh(processed_query + processed_attention_weights + processed_memory)) + + alignment = energies.squeeze(2) + return alignment + + def forward( + self, + attention_hidden_state: Tensor, + memory: Tensor, + processed_memory: Tensor, + attention_weights_cat: Tensor, + mask: Tensor, + ) -> Tuple[Tensor, Tensor]: + r"""Pass the input through the Attention model. + + Args: + attention_hidden_state (Tensor): Attention rnn last output with shape (n_batch, ``attention_rnn_dim``). + memory (Tensor): Encoder outputs with shape (n_batch, max of ``text_lengths``, ``encoder_embedding_dim``). + processed_memory (Tensor): Processed Encoder outputs + with shape (n_batch, max of ``text_lengths``, ``attention_hidden_dim``). + attention_weights_cat (Tensor): Previous and cumulative attention weights + with shape (n_batch, current_num_frames * 2, max of ``text_lengths``). + mask (Tensor): Binary mask for padded data with shape (n_batch, current_num_frames). + + Returns: + attention_context (Tensor): Context vector with shape (n_batch, ``encoder_embedding_dim``). + attention_weights (Tensor): Attention weights with shape (n_batch, max of ``text_lengths``). + """ + alignment = self._get_alignment_energies(attention_hidden_state, processed_memory, attention_weights_cat) + + alignment = alignment.masked_fill(mask, self.score_mask_value) + + attention_weights = F.softmax(alignment, dim=1) + attention_context = torch.bmm(attention_weights.unsqueeze(1), memory) + attention_context = attention_context.squeeze(1) + + return attention_context, attention_weights + + +class _Prenet(nn.Module): + r"""Prenet Module. It is consists of ``len(output_size)`` linear layers. + + Args: + in_dim (int): The size of each input sample. + output_sizes (list): The output dimension of each linear layers. + """ + + def __init__(self, in_dim: int, out_sizes: List[int]) -> None: + super().__init__() + in_sizes = [in_dim] + out_sizes[:-1] + self.layers = nn.ModuleList( + [_get_linear_layer(in_size, out_size, bias=False) for (in_size, out_size) in zip(in_sizes, out_sizes)] + ) + + def forward(self, x: Tensor) -> Tensor: + r"""Pass the input through Prenet. + + Args: + x (Tensor): The input sequence to Prenet with shape (n_batch, in_dim). + + Return: + x (Tensor): Tensor with shape (n_batch, sizes[-1]) + """ + + for linear in self.layers: + x = F.dropout(F.relu(linear(x)), p=0.5, training=True) + return x + + +class _Postnet(nn.Module): + r"""Postnet Module. + + Args: + n_mels (int): Number of mel bins. + postnet_embedding_dim (int): Postnet embedding dimension. + postnet_kernel_size (int): Postnet kernel size. + postnet_n_convolution (int): Number of postnet convolutions. + """ + + def __init__( + self, + n_mels: int, + postnet_embedding_dim: int, + postnet_kernel_size: int, + postnet_n_convolution: int, + ): + super().__init__() + self.convolutions = nn.ModuleList() + + for i in range(postnet_n_convolution): + in_channels = n_mels if i == 0 else postnet_embedding_dim + out_channels = n_mels if i == (postnet_n_convolution - 1) else postnet_embedding_dim + init_gain = "linear" if i == (postnet_n_convolution - 1) else "tanh" + num_features = n_mels if i == (postnet_n_convolution - 1) else postnet_embedding_dim + self.convolutions.append( + nn.Sequential( + _get_conv1d_layer( + in_channels, + out_channels, + kernel_size=postnet_kernel_size, + stride=1, + padding=int((postnet_kernel_size - 1) / 2), + dilation=1, + w_init_gain=init_gain, + ), + nn.BatchNorm1d(num_features), + ) + ) + + self.n_convs = len(self.convolutions) + + def forward(self, x: Tensor) -> Tensor: + r"""Pass the input through Postnet. + + Args: + x (Tensor): The input sequence with shape (n_batch, ``n_mels``, max of ``mel_specgram_lengths``). + + Return: + x (Tensor): Tensor with shape (n_batch, ``n_mels``, max of ``mel_specgram_lengths``). + """ + + for i, conv in enumerate(self.convolutions): + if i < self.n_convs - 1: + x = F.dropout(torch.tanh(conv(x)), 0.5, training=self.training) + else: + x = F.dropout(conv(x), 0.5, training=self.training) + + return x + + +class _Encoder(nn.Module): + r"""Encoder Module. + + Args: + encoder_embedding_dim (int): Number of embedding dimensions in the encoder. + encoder_n_convolution (int): Number of convolution layers in the encoder. + encoder_kernel_size (int): The kernel size in the encoder. + + Examples + >>> encoder = _Encoder(3, 512, 5) + >>> input = torch.rand(10, 20, 30) + >>> output = encoder(input) # shape: (10, 30, 512) + """ + + def __init__( + self, + encoder_embedding_dim: int, + encoder_n_convolution: int, + encoder_kernel_size: int, + ) -> None: + super().__init__() + + self.convolutions = nn.ModuleList() + for _ in range(encoder_n_convolution): + conv_layer = nn.Sequential( + _get_conv1d_layer( + encoder_embedding_dim, + encoder_embedding_dim, + kernel_size=encoder_kernel_size, + stride=1, + padding=int((encoder_kernel_size - 1) / 2), + dilation=1, + w_init_gain="relu", + ), + nn.BatchNorm1d(encoder_embedding_dim), + ) + self.convolutions.append(conv_layer) + + self.lstm = nn.LSTM( + encoder_embedding_dim, + int(encoder_embedding_dim / 2), + 1, + batch_first=True, + bidirectional=True, + ) + self.lstm.flatten_parameters() + + def forward(self, x: Tensor, input_lengths: Tensor) -> Tensor: + r"""Pass the input through the Encoder. + + Args: + x (Tensor): The input sequences with shape (n_batch, encoder_embedding_dim, n_seq). + input_lengths (Tensor): The length of each input sequence with shape (n_batch, ). + + Return: + x (Tensor): A tensor with shape (n_batch, n_seq, encoder_embedding_dim). + """ + + for conv in self.convolutions: + x = F.dropout(F.relu(conv(x)), 0.5, self.training) + + x = x.transpose(1, 2) + + input_lengths = input_lengths.cpu() + x = nn.utils.rnn.pack_padded_sequence(x, input_lengths, batch_first=True) + + outputs, _ = self.lstm(x) + outputs, _ = nn.utils.rnn.pad_packed_sequence(outputs, batch_first=True) + + return outputs + + +class _Decoder(nn.Module): + r"""Decoder with Attention model. + + Args: + n_mels (int): number of mel bins + n_frames_per_step (int): number of frames processed per step, only 1 is supported + encoder_embedding_dim (int): the number of embedding dimensions in the encoder. + decoder_rnn_dim (int): number of units in decoder LSTM + decoder_max_step (int): maximum number of output mel spectrograms + decoder_dropout (float): dropout probability for decoder LSTM + decoder_early_stopping (bool): stop decoding when all samples are finished + attention_rnn_dim (int): number of units in attention LSTM + attention_hidden_dim (int): dimension of attention hidden representation + attention_location_n_filter (int): number of filters for attention model + attention_location_kernel_size (int): kernel size for attention model + attention_dropout (float): dropout probability for attention LSTM + prenet_dim (int): number of ReLU units in prenet layers + gate_threshold (float): probability threshold for stop token + """ + + def __init__( + self, + n_mels: int, + n_frames_per_step: int, + encoder_embedding_dim: int, + decoder_rnn_dim: int, + decoder_max_step: int, + decoder_dropout: float, + decoder_early_stopping: bool, + attention_rnn_dim: int, + attention_hidden_dim: int, + attention_location_n_filter: int, + attention_location_kernel_size: int, + attention_dropout: float, + prenet_dim: int, + gate_threshold: float, + ) -> None: + + super().__init__() + self.n_mels = n_mels + self.n_frames_per_step = n_frames_per_step + self.encoder_embedding_dim = encoder_embedding_dim + self.attention_rnn_dim = attention_rnn_dim + self.decoder_rnn_dim = decoder_rnn_dim + self.prenet_dim = prenet_dim + self.decoder_max_step = decoder_max_step + self.gate_threshold = gate_threshold + self.attention_dropout = attention_dropout + self.decoder_dropout = decoder_dropout + self.decoder_early_stopping = decoder_early_stopping + + self.prenet = _Prenet(n_mels * n_frames_per_step, [prenet_dim, prenet_dim]) + + self.attention_rnn = nn.LSTMCell(prenet_dim + encoder_embedding_dim, attention_rnn_dim) + + self.attention_layer = _Attention( + attention_rnn_dim, + encoder_embedding_dim, + attention_hidden_dim, + attention_location_n_filter, + attention_location_kernel_size, + ) + + self.decoder_rnn = nn.LSTMCell(attention_rnn_dim + encoder_embedding_dim, decoder_rnn_dim, True) + + self.linear_projection = _get_linear_layer(decoder_rnn_dim + encoder_embedding_dim, n_mels * n_frames_per_step) + + self.gate_layer = _get_linear_layer( + decoder_rnn_dim + encoder_embedding_dim, 1, bias=True, w_init_gain="sigmoid" + ) + + def _get_initial_frame(self, memory: Tensor) -> Tensor: + r"""Gets all zeros frames to use as the first decoder input. + + Args: + memory (Tensor): Encoder outputs with shape (n_batch, max of ``text_lengths``, ``encoder_embedding_dim``). + + Returns: + decoder_input (Tensor): all zeros frames with shape + (n_batch, max of ``text_lengths``, ``n_mels * n_frames_per_step``). + """ + + n_batch = memory.size(0) + dtype = memory.dtype + device = memory.device + decoder_input = torch.zeros(n_batch, self.n_mels * self.n_frames_per_step, dtype=dtype, device=device) + return decoder_input + + def _initialize_decoder_states( + self, memory: Tensor + ) -> Tuple[Tensor, Tensor, Tensor, Tensor, Tensor, Tensor, Tensor, Tensor]: + r"""Initializes attention rnn states, decoder rnn states, attention + weights, attention cumulative weights, attention context, stores memory + and stores processed memory. + + Args: + memory (Tensor): Encoder outputs with shape (n_batch, max of ``text_lengths``, ``encoder_embedding_dim``). + + Returns: + attention_hidden (Tensor): Hidden state of the attention LSTM with shape (n_batch, ``attention_rnn_dim``). + attention_cell (Tensor): Hidden state of the attention LSTM with shape (n_batch, ``attention_rnn_dim``). + decoder_hidden (Tensor): Hidden state of the decoder LSTM with shape (n_batch, ``decoder_rnn_dim``). + decoder_cell (Tensor): Hidden state of the decoder LSTM with shape (n_batch, ``decoder_rnn_dim``). + attention_weights (Tensor): Attention weights with shape (n_batch, max of ``text_lengths``). + attention_weights_cum (Tensor): Cumulated attention weights with shape (n_batch, max of ``text_lengths``). + attention_context (Tensor): Context vector with shape (n_batch, ``encoder_embedding_dim``). + processed_memory (Tensor): Processed encoder outputs + with shape (n_batch, max of ``text_lengths``, ``attention_hidden_dim``). + """ + n_batch = memory.size(0) + max_time = memory.size(1) + dtype = memory.dtype + device = memory.device + + attention_hidden = torch.zeros(n_batch, self.attention_rnn_dim, dtype=dtype, device=device) + attention_cell = torch.zeros(n_batch, self.attention_rnn_dim, dtype=dtype, device=device) + + decoder_hidden = torch.zeros(n_batch, self.decoder_rnn_dim, dtype=dtype, device=device) + decoder_cell = torch.zeros(n_batch, self.decoder_rnn_dim, dtype=dtype, device=device) + + attention_weights = torch.zeros(n_batch, max_time, dtype=dtype, device=device) + attention_weights_cum = torch.zeros(n_batch, max_time, dtype=dtype, device=device) + attention_context = torch.zeros(n_batch, self.encoder_embedding_dim, dtype=dtype, device=device) + + processed_memory = self.attention_layer.memory_layer(memory) + + return ( + attention_hidden, + attention_cell, + decoder_hidden, + decoder_cell, + attention_weights, + attention_weights_cum, + attention_context, + processed_memory, + ) + + def _parse_decoder_inputs(self, decoder_inputs: Tensor) -> Tensor: + r"""Prepares decoder inputs. + + Args: + decoder_inputs (Tensor): Inputs used for teacher-forced training, i.e. mel-specs, + with shape (n_batch, ``n_mels``, max of ``mel_specgram_lengths``) + + Returns: + inputs (Tensor): Processed decoder inputs with shape (max of ``mel_specgram_lengths``, n_batch, ``n_mels``). + """ + # (n_batch, n_mels, mel_specgram_lengths.max()) -> (n_batch, mel_specgram_lengths.max(), n_mels) + decoder_inputs = decoder_inputs.transpose(1, 2) + decoder_inputs = decoder_inputs.view( + decoder_inputs.size(0), + int(decoder_inputs.size(1) / self.n_frames_per_step), + -1, + ) + # (n_batch, mel_specgram_lengths.max(), n_mels) -> (mel_specgram_lengths.max(), n_batch, n_mels) + decoder_inputs = decoder_inputs.transpose(0, 1) + return decoder_inputs + + def _parse_decoder_outputs( + self, mel_specgram: Tensor, gate_outputs: Tensor, alignments: Tensor + ) -> Tuple[Tensor, Tensor, Tensor]: + r"""Prepares decoder outputs for output + + Args: + mel_specgram (Tensor): mel spectrogram with shape (max of ``mel_specgram_lengths``, n_batch, ``n_mels``) + gate_outputs (Tensor): predicted stop token with shape (max of ``mel_specgram_lengths``, n_batch) + alignments (Tensor): sequence of attention weights from the decoder + with shape (max of ``mel_specgram_lengths``, n_batch, max of ``text_lengths``) + + Returns: + mel_specgram (Tensor): mel spectrogram with shape (n_batch, ``n_mels``, max of ``mel_specgram_lengths``) + gate_outputs (Tensor): predicted stop token with shape (n_batch, max of ``mel_specgram_lengths``) + alignments (Tensor): sequence of attention weights from the decoder + with shape (n_batch, max of ``mel_specgram_lengths``, max of ``text_lengths``) + """ + # (mel_specgram_lengths.max(), n_batch, text_lengths.max()) + # -> (n_batch, mel_specgram_lengths.max(), text_lengths.max()) + alignments = alignments.transpose(0, 1).contiguous() + # (mel_specgram_lengths.max(), n_batch) -> (n_batch, mel_specgram_lengths.max()) + gate_outputs = gate_outputs.transpose(0, 1).contiguous() + # (mel_specgram_lengths.max(), n_batch, n_mels) -> (n_batch, mel_specgram_lengths.max(), n_mels) + mel_specgram = mel_specgram.transpose(0, 1).contiguous() + # decouple frames per step + shape = (mel_specgram.shape[0], -1, self.n_mels) + mel_specgram = mel_specgram.view(*shape) + # (n_batch, mel_specgram_lengths.max(), n_mels) -> (n_batch, n_mels, T_out) + mel_specgram = mel_specgram.transpose(1, 2) + + return mel_specgram, gate_outputs, alignments + + def decode( + self, + decoder_input: Tensor, + attention_hidden: Tensor, + attention_cell: Tensor, + decoder_hidden: Tensor, + decoder_cell: Tensor, + attention_weights: Tensor, + attention_weights_cum: Tensor, + attention_context: Tensor, + memory: Tensor, + processed_memory: Tensor, + mask: Tensor, + ) -> Tuple[Tensor, Tensor, Tensor, Tensor, Tensor, Tensor, Tensor, Tensor, Tensor]: + r"""Decoder step using stored states, attention and memory + + Args: + decoder_input (Tensor): Output of the Prenet with shape (n_batch, ``prenet_dim``). + attention_hidden (Tensor): Hidden state of the attention LSTM with shape (n_batch, ``attention_rnn_dim``). + attention_cell (Tensor): Hidden state of the attention LSTM with shape (n_batch, ``attention_rnn_dim``). + decoder_hidden (Tensor): Hidden state of the decoder LSTM with shape (n_batch, ``decoder_rnn_dim``). + decoder_cell (Tensor): Hidden state of the decoder LSTM with shape (n_batch, ``decoder_rnn_dim``). + attention_weights (Tensor): Attention weights with shape (n_batch, max of ``text_lengths``). + attention_weights_cum (Tensor): Cumulated attention weights with shape (n_batch, max of ``text_lengths``). + attention_context (Tensor): Context vector with shape (n_batch, ``encoder_embedding_dim``). + memory (Tensor): Encoder output with shape (n_batch, max of ``text_lengths``, ``encoder_embedding_dim``). + processed_memory (Tensor): Processed Encoder outputs + with shape (n_batch, max of ``text_lengths``, ``attention_hidden_dim``). + mask (Tensor): Binary mask for padded data with shape (n_batch, current_num_frames). + + Returns: + decoder_output: Predicted mel spectrogram for the current frame with shape (n_batch, ``n_mels``). + gate_prediction (Tensor): Prediction of the stop token with shape (n_batch, ``1``). + attention_hidden (Tensor): Hidden state of the attention LSTM with shape (n_batch, ``attention_rnn_dim``). + attention_cell (Tensor): Hidden state of the attention LSTM with shape (n_batch, ``attention_rnn_dim``). + decoder_hidden (Tensor): Hidden state of the decoder LSTM with shape (n_batch, ``decoder_rnn_dim``). + decoder_cell (Tensor): Hidden state of the decoder LSTM with shape (n_batch, ``decoder_rnn_dim``). + attention_weights (Tensor): Attention weights with shape (n_batch, max of ``text_lengths``). + attention_weights_cum (Tensor): Cumulated attention weights with shape (n_batch, max of ``text_lengths``). + attention_context (Tensor): Context vector with shape (n_batch, ``encoder_embedding_dim``). + """ + cell_input = torch.cat((decoder_input, attention_context), -1) + + attention_hidden, attention_cell = self.attention_rnn(cell_input, (attention_hidden, attention_cell)) + attention_hidden = F.dropout(attention_hidden, self.attention_dropout, self.training) + + attention_weights_cat = torch.cat((attention_weights.unsqueeze(1), attention_weights_cum.unsqueeze(1)), dim=1) + attention_context, attention_weights = self.attention_layer( + attention_hidden, memory, processed_memory, attention_weights_cat, mask + ) + + attention_weights_cum += attention_weights + decoder_input = torch.cat((attention_hidden, attention_context), -1) + + decoder_hidden, decoder_cell = self.decoder_rnn(decoder_input, (decoder_hidden, decoder_cell)) + decoder_hidden = F.dropout(decoder_hidden, self.decoder_dropout, self.training) + + decoder_hidden_attention_context = torch.cat((decoder_hidden, attention_context), dim=1) + decoder_output = self.linear_projection(decoder_hidden_attention_context) + + gate_prediction = self.gate_layer(decoder_hidden_attention_context) + + return ( + decoder_output, + gate_prediction, + attention_hidden, + attention_cell, + decoder_hidden, + decoder_cell, + attention_weights, + attention_weights_cum, + attention_context, + ) + + def forward( + self, memory: Tensor, mel_specgram_truth: Tensor, memory_lengths: Tensor + ) -> Tuple[Tensor, Tensor, Tensor]: + r"""Decoder forward pass for training. + + Args: + memory (Tensor): Encoder outputs + with shape (n_batch, max of ``text_lengths``, ``encoder_embedding_dim``). + mel_specgram_truth (Tensor): Decoder ground-truth mel-specs for teacher forcing + with shape (n_batch, ``n_mels``, max of ``mel_specgram_lengths``). + memory_lengths (Tensor): Encoder output lengths for attention masking + (the same as ``text_lengths``) with shape (n_batch, ). + + Returns: + mel_specgram (Tensor): Predicted mel spectrogram + with shape (n_batch, ``n_mels``, max of ``mel_specgram_lengths``). + gate_outputs (Tensor): Predicted stop token for each timestep + with shape (n_batch, max of ``mel_specgram_lengths``). + alignments (Tensor): Sequence of attention weights from the decoder + with shape (n_batch, max of ``mel_specgram_lengths``, max of ``text_lengths``). + """ + + decoder_input = self._get_initial_frame(memory).unsqueeze(0) + decoder_inputs = self._parse_decoder_inputs(mel_specgram_truth) + decoder_inputs = torch.cat((decoder_input, decoder_inputs), dim=0) + decoder_inputs = self.prenet(decoder_inputs) + + mask = _get_mask_from_lengths(memory_lengths) + ( + attention_hidden, + attention_cell, + decoder_hidden, + decoder_cell, + attention_weights, + attention_weights_cum, + attention_context, + processed_memory, + ) = self._initialize_decoder_states(memory) + + mel_outputs, gate_outputs, alignments = [], [], [] + while len(mel_outputs) < decoder_inputs.size(0) - 1: + decoder_input = decoder_inputs[len(mel_outputs)] + ( + mel_output, + gate_output, + attention_hidden, + attention_cell, + decoder_hidden, + decoder_cell, + attention_weights, + attention_weights_cum, + attention_context, + ) = self.decode( + decoder_input, + attention_hidden, + attention_cell, + decoder_hidden, + decoder_cell, + attention_weights, + attention_weights_cum, + attention_context, + memory, + processed_memory, + mask, + ) + + mel_outputs += [mel_output.squeeze(1)] + gate_outputs += [gate_output.squeeze(1)] + alignments += [attention_weights] + + mel_specgram, gate_outputs, alignments = self._parse_decoder_outputs( + torch.stack(mel_outputs), torch.stack(gate_outputs), torch.stack(alignments) + ) + + return mel_specgram, gate_outputs, alignments + + def _get_go_frame(self, memory: Tensor) -> Tensor: + """Gets all zeros frames to use as the first decoder input + + args: + memory (Tensor): Encoder outputs + with shape (n_batch, max of ``text_lengths``, ``encoder_embedding_dim``). + + returns: + decoder_input (Tensor): All zeros frames with shape(n_batch, ``n_mels`` * ``n_frame_per_step``). + """ + + n_batch = memory.size(0) + dtype = memory.dtype + device = memory.device + decoder_input = torch.zeros(n_batch, self.n_mels * self.n_frames_per_step, dtype=dtype, device=device) + return decoder_input + + @torch.jit.export + def infer(self, memory: Tensor, memory_lengths: Tensor) -> Tuple[Tensor, Tensor, Tensor, Tensor]: + """Decoder inference + + Args: + memory (Tensor): Encoder outputs + with shape (n_batch, max of ``text_lengths``, ``encoder_embedding_dim``). + memory_lengths (Tensor): Encoder output lengths for attention masking + (the same as ``text_lengths``) with shape (n_batch, ). + + Returns: + mel_specgram (Tensor): Predicted mel spectrogram + with shape (n_batch, ``n_mels``, max of ``mel_specgram_lengths``). + mel_specgram_lengths (Tensor): the length of the predicted mel spectrogram (n_batch, )) + gate_outputs (Tensor): Predicted stop token for each timestep + with shape (n_batch, max of ``mel_specgram_lengths``). + alignments (Tensor): Sequence of attention weights from the decoder + with shape (n_batch, max of ``mel_specgram_lengths``, max of ``text_lengths``). + """ + batch_size, device = memory.size(0), memory.device + + decoder_input = self._get_go_frame(memory) + + mask = _get_mask_from_lengths(memory_lengths) + ( + attention_hidden, + attention_cell, + decoder_hidden, + decoder_cell, + attention_weights, + attention_weights_cum, + attention_context, + processed_memory, + ) = self._initialize_decoder_states(memory) + + mel_specgram_lengths = torch.zeros([batch_size], dtype=torch.int32, device=device) + finished = torch.zeros([batch_size], dtype=torch.bool, device=device) + mel_specgrams: List[Tensor] = [] + gate_outputs: List[Tensor] = [] + alignments: List[Tensor] = [] + for _ in range(self.decoder_max_step): + decoder_input = self.prenet(decoder_input) + ( + mel_specgram, + gate_output, + attention_hidden, + attention_cell, + decoder_hidden, + decoder_cell, + attention_weights, + attention_weights_cum, + attention_context, + ) = self.decode( + decoder_input, + attention_hidden, + attention_cell, + decoder_hidden, + decoder_cell, + attention_weights, + attention_weights_cum, + attention_context, + memory, + processed_memory, + mask, + ) + + mel_specgrams.append(mel_specgram.unsqueeze(0)) + gate_outputs.append(gate_output.transpose(0, 1)) + alignments.append(attention_weights) + mel_specgram_lengths[~finished] += 1 + + finished |= torch.sigmoid(gate_output.squeeze(1)) > self.gate_threshold + if self.decoder_early_stopping and torch.all(finished): + break + + decoder_input = mel_specgram + + if len(mel_specgrams) == self.decoder_max_step: + warnings.warn( + "Reached max decoder steps. The generated spectrogram might not cover " "the whole transcript." + ) + + mel_specgrams = torch.cat(mel_specgrams, dim=0) + gate_outputs = torch.cat(gate_outputs, dim=0) + alignments = torch.cat(alignments, dim=0) + + mel_specgrams, gate_outputs, alignments = self._parse_decoder_outputs(mel_specgrams, gate_outputs, alignments) + + return mel_specgrams, mel_specgram_lengths, gate_outputs, alignments + + +class Tacotron2(nn.Module): + r"""Tacotron2 model from *Natural TTS Synthesis by Conditioning WaveNet on Mel Spectrogram Predictions* + :cite:`shen2018natural` based on the implementation from + `Nvidia Deep Learning Examples `_. + + See Also: + * :class:`torchaudio.pipelines.Tacotron2TTSBundle`: TTS pipeline with pretrained model. + + Args: + mask_padding (bool, optional): Use mask padding (Default: ``False``). + n_mels (int, optional): Number of mel bins (Default: ``80``). + n_symbol (int, optional): Number of symbols for the input text (Default: ``148``). + n_frames_per_step (int, optional): Number of frames processed per step, only 1 is supported (Default: ``1``). + symbol_embedding_dim (int, optional): Input embedding dimension (Default: ``512``). + encoder_n_convolution (int, optional): Number of encoder convolutions (Default: ``3``). + encoder_kernel_size (int, optional): Encoder kernel size (Default: ``5``). + encoder_embedding_dim (int, optional): Encoder embedding dimension (Default: ``512``). + decoder_rnn_dim (int, optional): Number of units in decoder LSTM (Default: ``1024``). + decoder_max_step (int, optional): Maximum number of output mel spectrograms (Default: ``2000``). + decoder_dropout (float, optional): Dropout probability for decoder LSTM (Default: ``0.1``). + decoder_early_stopping (bool, optional): Continue decoding after all samples are finished (Default: ``True``). + attention_rnn_dim (int, optional): Number of units in attention LSTM (Default: ``1024``). + attention_hidden_dim (int, optional): Dimension of attention hidden representation (Default: ``128``). + attention_location_n_filter (int, optional): Number of filters for attention model (Default: ``32``). + attention_location_kernel_size (int, optional): Kernel size for attention model (Default: ``31``). + attention_dropout (float, optional): Dropout probability for attention LSTM (Default: ``0.1``). + prenet_dim (int, optional): Number of ReLU units in prenet layers (Default: ``256``). + postnet_n_convolution (int, optional): Number of postnet convolutions (Default: ``5``). + postnet_kernel_size (int, optional): Postnet kernel size (Default: ``5``). + postnet_embedding_dim (int, optional): Postnet embedding dimension (Default: ``512``). + gate_threshold (float, optional): Probability threshold for stop token (Default: ``0.5``). + """ + + def __init__( + self, + mask_padding: bool = False, + n_mels: int = 80, + n_symbol: int = 148, + n_frames_per_step: int = 1, + symbol_embedding_dim: int = 512, + encoder_embedding_dim: int = 512, + encoder_n_convolution: int = 3, + encoder_kernel_size: int = 5, + decoder_rnn_dim: int = 1024, + decoder_max_step: int = 2000, + decoder_dropout: float = 0.1, + decoder_early_stopping: bool = True, + attention_rnn_dim: int = 1024, + attention_hidden_dim: int = 128, + attention_location_n_filter: int = 32, + attention_location_kernel_size: int = 31, + attention_dropout: float = 0.1, + prenet_dim: int = 256, + postnet_n_convolution: int = 5, + postnet_kernel_size: int = 5, + postnet_embedding_dim: int = 512, + gate_threshold: float = 0.5, + ) -> None: + super().__init__() + + self.mask_padding = mask_padding + self.n_mels = n_mels + self.n_frames_per_step = n_frames_per_step + self.embedding = nn.Embedding(n_symbol, symbol_embedding_dim) + torch.nn.init.xavier_uniform_(self.embedding.weight) + self.encoder = _Encoder(encoder_embedding_dim, encoder_n_convolution, encoder_kernel_size) + self.decoder = _Decoder( + n_mels, + n_frames_per_step, + encoder_embedding_dim, + decoder_rnn_dim, + decoder_max_step, + decoder_dropout, + decoder_early_stopping, + attention_rnn_dim, + attention_hidden_dim, + attention_location_n_filter, + attention_location_kernel_size, + attention_dropout, + prenet_dim, + gate_threshold, + ) + self.postnet = _Postnet(n_mels, postnet_embedding_dim, postnet_kernel_size, postnet_n_convolution) + + def forward( + self, + tokens: Tensor, + token_lengths: Tensor, + mel_specgram: Tensor, + mel_specgram_lengths: Tensor, + ) -> Tuple[Tensor, Tensor, Tensor, Tensor]: + r"""Pass the input through the Tacotron2 model. This is in teacher + forcing mode, which is generally used for training. + + The input ``tokens`` should be padded with zeros to length max of ``token_lengths``. + The input ``mel_specgram`` should be padded with zeros to length max of ``mel_specgram_lengths``. + + Args: + tokens (Tensor): The input tokens to Tacotron2 with shape `(n_batch, max of token_lengths)`. + token_lengths (Tensor): The valid length of each sample in ``tokens`` with shape `(n_batch, )`. + mel_specgram (Tensor): The target mel spectrogram + with shape `(n_batch, n_mels, max of mel_specgram_lengths)`. + mel_specgram_lengths (Tensor): The length of each mel spectrogram with shape `(n_batch, )`. + + Returns: + [Tensor, Tensor, Tensor, Tensor]: + Tensor + Mel spectrogram before Postnet with shape `(n_batch, n_mels, max of mel_specgram_lengths)`. + Tensor + Mel spectrogram after Postnet with shape `(n_batch, n_mels, max of mel_specgram_lengths)`. + Tensor + The output for stop token at each time step with shape `(n_batch, max of mel_specgram_lengths)`. + Tensor + Sequence of attention weights from the decoder with + shape `(n_batch, max of mel_specgram_lengths, max of token_lengths)`. + """ + + embedded_inputs = self.embedding(tokens).transpose(1, 2) + + encoder_outputs = self.encoder(embedded_inputs, token_lengths) + mel_specgram, gate_outputs, alignments = self.decoder( + encoder_outputs, mel_specgram, memory_lengths=token_lengths + ) + + mel_specgram_postnet = self.postnet(mel_specgram) + mel_specgram_postnet = mel_specgram + mel_specgram_postnet + + if self.mask_padding: + mask = _get_mask_from_lengths(mel_specgram_lengths) + mask = mask.expand(self.n_mels, mask.size(0), mask.size(1)) + mask = mask.permute(1, 0, 2) + + mel_specgram.masked_fill_(mask, 0.0) + mel_specgram_postnet.masked_fill_(mask, 0.0) + gate_outputs.masked_fill_(mask[:, 0, :], 1e3) + + return mel_specgram, mel_specgram_postnet, gate_outputs, alignments + + @torch.jit.export + def infer(self, tokens: Tensor, lengths: Optional[Tensor] = None) -> Tuple[Tensor, Tensor, Tensor]: + r"""Using Tacotron2 for inference. The input is a batch of encoded + sentences (``tokens``) and its corresponding lengths (``lengths``). The + output is the generated mel spectrograms, its corresponding lengths, and + the attention weights from the decoder. + + The input `tokens` should be padded with zeros to length max of ``lengths``. + + Args: + tokens (Tensor): The input tokens to Tacotron2 with shape `(n_batch, max of lengths)`. + lengths (Tensor or None, optional): + The valid length of each sample in ``tokens`` with shape `(n_batch, )`. + If ``None``, it is assumed that the all the tokens are valid. Default: ``None`` + + Returns: + (Tensor, Tensor, Tensor): + Tensor + The predicted mel spectrogram with shape `(n_batch, n_mels, max of mel_specgram_lengths)`. + Tensor + The length of the predicted mel spectrogram with shape `(n_batch, )`. + Tensor + Sequence of attention weights from the decoder with shape + `(n_batch, max of mel_specgram_lengths, max of lengths)`. + """ + n_batch, max_length = tokens.shape + if lengths is None: + lengths = torch.tensor([max_length]).expand(n_batch).to(tokens.device, tokens.dtype) + + assert lengths is not None # For TorchScript compiler + embedded_inputs = self.embedding(tokens).transpose(1, 2) + encoder_outputs = self.encoder(embedded_inputs, lengths) + mel_specgram, mel_specgram_lengths, _, alignments = self.decoder.infer(encoder_outputs, lengths) + + mel_outputs_postnet = self.postnet(mel_specgram) + mel_outputs_postnet = mel_specgram + mel_outputs_postnet + + alignments = alignments.unfold(1, n_batch, n_batch).transpose(0, 2) + + return mel_outputs_postnet, mel_specgram_lengths, alignments diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/wav2letter.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/wav2letter.py new file mode 100644 index 0000000000000000000000000000000000000000..d776131686d1f65982a565088e72e45e7b7c107f --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/wav2letter.py @@ -0,0 +1,72 @@ +from torch import nn, Tensor + +__all__ = [ + "Wav2Letter", +] + + +class Wav2Letter(nn.Module): + r"""Wav2Letter model architecture from *Wav2Letter: an End-to-End ConvNet-based Speech + Recognition System* :cite:`collobert2016wav2letter`. + + See Also: + * `Training example `__ + + Args: + num_classes (int, optional): Number of classes to be classified. (Default: ``40``) + input_type (str, optional): Wav2Letter can use as input: ``waveform``, ``power_spectrum`` + or ``mfcc`` (Default: ``waveform``). + num_features (int, optional): Number of input features that the network will receive (Default: ``1``). + """ + + def __init__(self, num_classes: int = 40, input_type: str = "waveform", num_features: int = 1) -> None: + super().__init__() + + acoustic_num_features = 250 if input_type == "waveform" else num_features + acoustic_model = nn.Sequential( + nn.Conv1d(in_channels=acoustic_num_features, out_channels=250, kernel_size=48, stride=2, padding=23), + nn.ReLU(inplace=True), + nn.Conv1d(in_channels=250, out_channels=250, kernel_size=7, stride=1, padding=3), + nn.ReLU(inplace=True), + nn.Conv1d(in_channels=250, out_channels=250, kernel_size=7, stride=1, padding=3), + nn.ReLU(inplace=True), + nn.Conv1d(in_channels=250, out_channels=250, kernel_size=7, stride=1, padding=3), + nn.ReLU(inplace=True), + nn.Conv1d(in_channels=250, out_channels=250, kernel_size=7, stride=1, padding=3), + nn.ReLU(inplace=True), + nn.Conv1d(in_channels=250, out_channels=250, kernel_size=7, stride=1, padding=3), + nn.ReLU(inplace=True), + nn.Conv1d(in_channels=250, out_channels=250, kernel_size=7, stride=1, padding=3), + nn.ReLU(inplace=True), + nn.Conv1d(in_channels=250, out_channels=250, kernel_size=7, stride=1, padding=3), + nn.ReLU(inplace=True), + nn.Conv1d(in_channels=250, out_channels=2000, kernel_size=32, stride=1, padding=16), + nn.ReLU(inplace=True), + nn.Conv1d(in_channels=2000, out_channels=2000, kernel_size=1, stride=1, padding=0), + nn.ReLU(inplace=True), + nn.Conv1d(in_channels=2000, out_channels=num_classes, kernel_size=1, stride=1, padding=0), + nn.ReLU(inplace=True), + ) + + if input_type == "waveform": + waveform_model = nn.Sequential( + nn.Conv1d(in_channels=num_features, out_channels=250, kernel_size=250, stride=160, padding=45), + nn.ReLU(inplace=True), + ) + self.acoustic_model = nn.Sequential(waveform_model, acoustic_model) + + if input_type in ["power_spectrum", "mfcc"]: + self.acoustic_model = acoustic_model + + def forward(self, x: Tensor) -> Tensor: + r""" + Args: + x (torch.Tensor): Tensor of dimension (batch_size, num_features, input_length). + + Returns: + Tensor: Predictor tensor of dimension (batch_size, number_of_classes, input_length). + """ + + x = self.acoustic_model(x) + x = nn.functional.log_softmax(x, dim=1) + return x diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/wav2vec2/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/wav2vec2/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bb83403f5719b68c790d2f9f934f8c80acea3557 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/wav2vec2/__init__.py @@ -0,0 +1,45 @@ +from . import utils +from .model import ( + hubert_base, + hubert_large, + hubert_pretrain_base, + hubert_pretrain_large, + hubert_pretrain_model, + hubert_pretrain_xlarge, + hubert_xlarge, + HuBERTPretrainModel, + wav2vec2_base, + wav2vec2_large, + wav2vec2_large_lv60k, + wav2vec2_model, + wav2vec2_xlsr_1b, + wav2vec2_xlsr_2b, + wav2vec2_xlsr_300m, + Wav2Vec2Model, + wavlm_base, + wavlm_large, + wavlm_model, +) + +__all__ = [ + "Wav2Vec2Model", + "HuBERTPretrainModel", + "wavlm_model", + "wavlm_base", + "wavlm_large", + "wav2vec2_model", + "wav2vec2_base", + "wav2vec2_large", + "wav2vec2_large_lv60k", + "hubert_base", + "hubert_large", + "hubert_xlarge", + "hubert_pretrain_model", + "hubert_pretrain_base", + "hubert_pretrain_large", + "hubert_pretrain_xlarge", + "utils", + "wav2vec2_xlsr_300m", + "wav2vec2_xlsr_1b", + "wav2vec2_xlsr_2b", +] diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/wav2vec2/components.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/wav2vec2/components.py new file mode 100644 index 0000000000000000000000000000000000000000..480a6ae50921efebf5930dc21caaa3a1a44945dd --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/wav2vec2/components.py @@ -0,0 +1,1167 @@ +import logging +from typing import List, Optional, Tuple + +import torch +from torch import nn, Tensor +from torch.nn import Module, Parameter + +from .wavlm_attention import WavLMSelfAttention + +_LG = logging.getLogger(__name__) + + +def _init_transformer_params(module): + """ + Initialize the weights of Transformer module in Wav2Vec2/HuBERT. + + If the module is ``nn.Linear``, normalize the weight with mean 0 and standard deviation 0.02. + If ``bias`` is set to ``True`` in the module, set ``bias`` to 0. + + If the module is ``nn.Embedding``, normalize the weight with mean 0 and standard deviation 0.02. + If ``padding_idx`` is not None, set the weight of padding to 0. + + Note: + Ths method corresponds to + `init_bert_params + `__ + in the original ``fairseq`` implementation. + """ + + def normal_(data): + data.copy_(data.cpu().normal_(mean=0.0, std=0.02).to(data.device)) + + if isinstance(module, nn.Linear): + normal_(module.weight.data) + if module.bias is not None: + module.bias.data.zero_() + if isinstance(module, nn.Embedding): + normal_(module.weight.data) + if module.padding_idx is not None: + module.weight.data[module.padding_idx].zero_() + + +class LayerNorm(nn.LayerNorm): + """Layer norm with transpose""" + + def forward(self, input: Tensor) -> Tensor: + x = input.transpose(-2, -1) + x = nn.functional.layer_norm(x, self.normalized_shape, self.weight, self.bias, self.eps) + x = x.transpose(-2, -1) + return x + + +class ConvLayerBlock(Module): + """Convolution unit of FeatureExtractor""" + + def __init__( + self, + in_channels: int, + out_channels: int, + kernel_size: int, + stride: int, + bias: bool, + layer_norm: Optional[Module], + ): + super().__init__() + self.kernel_size = kernel_size + self.stride = stride + self.layer_norm = layer_norm + self.conv = nn.Conv1d( + in_channels=in_channels, + out_channels=out_channels, + kernel_size=kernel_size, + stride=stride, + bias=bias, + ) + + def forward( + self, + x: Tensor, + length: Optional[Tensor], + ) -> Tuple[Tensor, Optional[Tensor]]: + """ + Args: + x (Tensor): Shape: ``[batch, in_channels, in_frame]``. + length (Tensor or None, optional): Shape ``[batch, ]``. + Returns: + Tensor: Shape ``[batch, out_channels, out_frames]``. + Optional[Tensor]: Shape ``[batch, ]``. + """ + x = self.conv(x) + if self.layer_norm is not None: + x = self.layer_norm(x) + x = nn.functional.gelu(x) + + if length is not None: + length = torch.div(length - self.kernel_size, self.stride, rounding_mode="floor") + 1 + # When input length is 0, the resulting length can be negative. So fix it here. + length = torch.max(torch.zeros_like(length), length) + return x, length + + +class FeatureExtractor(Module): + """Extract features from audio + + Args: + conv_layers (nn.ModuleList): + convolution layers + """ + + def __init__( + self, + conv_layers: nn.ModuleList, + ): + super().__init__() + self.conv_layers = conv_layers + + def forward( + self, + x: Tensor, + length: Optional[Tensor], + ) -> Tuple[Tensor, Optional[Tensor]]: + """ + Args: + x (Tensor): + Input Tensor representing a batch of audio, + shape: ``[batch, time]``. + length (Tensor or None, optional): + Valid length of each input sample. shape: ``[batch, ]``. + + Returns: + Tensor: + The resulting feature, shape: ``[batch, frame, feature]`` + Optional[Tensor]: + Valid length of each output sample. shape: ``[batch, ]``. + """ + if x.ndim != 2: + raise ValueError(f"Expected the input Tensor to be 2D (batch, time). Found: {list(x.shape)}") + + x = x.unsqueeze(1) # (batch, channel==1, frame) + for layer in self.conv_layers: + x, length = layer(x, length) # (batch, feature, frame) + x = x.transpose(1, 2) # (batch, frame, feature) + return x, length + + +class FeatureProjection(Module): + """Layer that connects FeatureExtractor and Encoder + + Projects features to encoder dimension. + + Args: + in_features (int): Input feature dim. + out_features (int): Output feature dim. + dropout (float): Dropout probability. + """ + + def __init__( + self, + in_features: int, + out_features: int, + dropout: float, + ): + super().__init__() + self.layer_norm = nn.LayerNorm(in_features) + self.projection = nn.Linear( + in_features, + out_features, + ) + self.dropout = nn.Dropout(dropout) + + def forward(self, x): + """ + Args: + x (Tensor): + Feature Tensor. shape: ``[batch, frame, in_feature]`` + Returns: + Tensor: Projected features. ``[batch, frame, out_feature]``. + """ + x = self.layer_norm(x) + x = self.projection(x) + x = self.dropout(x) + return x + + +class ConvolutionalPositionalEmbedding(Module): + """Positional embedding which is placed at the beginning of Transformer. + + Args: + embed_dim (int): Feature dimension of the input Tensor. + kernel_size (int): The number of frames to be use. + groups (int): The number of groups in feature dimensions. + """ + + def __init__( + self, + embed_dim: int, + kernel_size: int, + groups: int, + ): + super().__init__() + self.embed_dim = embed_dim + self.kernel_size = kernel_size + self.conv = nn.Conv1d( + in_channels=embed_dim, + out_channels=embed_dim, + kernel_size=kernel_size, + padding=kernel_size // 2, + groups=groups, + ) + + self.conv = nn.utils.parametrizations.weight_norm(self.conv, name="weight", dim=2) + self.num_remove: int = 1 if kernel_size % 2 == 0 else 0 + + def __prepare_scriptable__(self): + if self.conv.__class__.__name__ == "ParametrizedConv1d": + _LG.warning("Removing weight_norm from %s", self.__class__.__name__) + torch.nn.utils.parametrize.remove_parametrizations(self.conv, "weight") + return self + + def forward(self, x): + """ + Args: + x (Tensor): shape ``[batch, frame, feature]``. + + Returns: + Tensor: The resulting feature. Shape ``[batch, frame, feature]``. + """ + x = x.transpose(-2, -1) + x = self.conv(x) + if self.num_remove > 0: + x = x[..., : -self.num_remove] + x = torch.nn.functional.gelu(x) + x = x.transpose(-2, -1) + return x + + +class SelfAttention(Module): + """Multihead Self Attention module + + Args: + embed_dim (int): Total dimension of the model. + num_heads (int): The number of heads. + dropout (float, optional): + Dropout probability on attn_output_weights. Default: ``0.0`` + """ + + def __init__( + self, + embed_dim: int, + num_heads: int, + dropout: float = 0.0, + ): + super().__init__() + head_dim = embed_dim // num_heads + if head_dim * num_heads != embed_dim: + raise ValueError(f"`embed_dim ({embed_dim})` is not divisible by `num_heads ({num_heads})`") + + self.embed_dim = embed_dim + self.num_heads = num_heads + self.dropout = dropout + self.head_dim = head_dim + + self.scaling = self.head_dim**-0.5 + + self.k_proj = nn.Linear(embed_dim, embed_dim, bias=True) + self.v_proj = nn.Linear(embed_dim, embed_dim, bias=True) + self.q_proj = nn.Linear(embed_dim, embed_dim, bias=True) + self.out_proj = nn.Linear(embed_dim, embed_dim, bias=True) + + def forward( + self, + x: Tensor, + attention_mask: Optional[Tensor] = None, + position_bias: Optional[Tensor] = None, + key_padding_mask: Optional[Tensor] = None, + ) -> Tuple[Tensor, Optional[Tensor]]: + """ + Args: + x (Tensor): shape: ``[batch_size, sequence_length, embed_dim]``. + attention_mask (Tensor or ``None``, optional): + shape: ``[batch_size, 1, sequence_length, sequence_length]`` + position_bias: Not used. Only for the compatibility with :py:class:`WavLMSelfAttention`. + key_padding_mask (Tensor or ``None``): Not used. Only for the compatibility with + :py:class:`WavLMSelfAttention`. + Returns: + (Tensor, ``None``): The resulting attention output and ``None`` (necessary for compatibility + with :py:class:`WavLMSelAttention`). + Attention output shape: ``[batch, sequence_length, embed_dim]``. + """ + if x.ndim != 3 or x.shape[2] != self.embed_dim: + raise ValueError( + f"The expected input shape is (batch, sequence, embed_dim=={self.embed_dim}). " f"Found {x.shape}." + ) + batch_size, length, embed_dim = x.size() + if attention_mask is not None: + shape_ = (batch_size, 1, length, length) + if attention_mask.size() != shape_: + raise ValueError(f"The expected attention mask shape is {shape_}. " f"Found {attention_mask.size()}.") + + shape = (batch_size, length, self.num_heads, self.head_dim) + q = self.q_proj(x).view(*shape).transpose(2, 1) # B, nH, L, Hd + k = self.k_proj(x).view(*shape).transpose(2, 1) # B, nH, L, Hd + v = self.v_proj(x).view(*shape).transpose(2, 1) # B, nH, L, Hd + dropout = self.dropout if self.training else 0.0 + attn_output = torch.nn.functional.scaled_dot_product_attention( + q, k, v, attn_mask=attention_mask, dropout_p=dropout, is_causal=False + ) + attn_output = attn_output.transpose(1, 2).reshape(batch_size, -1, self.num_heads * self.head_dim) + output = self.out_proj(attn_output) + return output, None # Necessary for compatibility with WavLMSelAttention + + +class FeedForward(Module): + """Layer that follows attention layer in encoder layer.""" + + def __init__( + self, + io_features: int, + intermediate_features: int, + intermediate_dropout: float, + output_dropout: float, + ): + super().__init__() + self.intermediate_dense = nn.Linear(io_features, intermediate_features) + self.intermediate_dropout = nn.Dropout(intermediate_dropout) + self.output_dense = nn.Linear(intermediate_features, io_features) + self.output_dropout = nn.Dropout(output_dropout) + + def forward(self, x): + """ + Args: + x (Tensor): shape: `(batch, sequence_length, io_features)` + Returns: + x (Tensor): shape: `(batch, sequence_length, io_features)` + """ + x = self.intermediate_dense(x) + x = torch.nn.functional.gelu(x) + x = self.intermediate_dropout(x) + + x = self.output_dense(x) + x = self.output_dropout(x) + return x + + +class EncoderLayer(Module): + """A layer unit in encoder. Combines multihead self attention and feed forward.""" + + def __init__( + self, + attention: Module, + dropout: float, + layer_norm_first: bool, + feed_forward: Module, + ): + super().__init__() + self.attention = attention + self.dropout = nn.Dropout(dropout) + self.layer_norm = nn.LayerNorm(attention.embed_dim) + self.layer_norm_first = layer_norm_first + self.feed_forward = feed_forward + self.final_layer_norm = nn.LayerNorm(attention.embed_dim) + + def forward( + self, + x: Tensor, + attention_mask: Optional[Tensor] = None, + position_bias: Optional[Tensor] = None, + key_padding_mask: Optional[Tensor] = None, + ) -> Tuple[Tensor, Optional[Tensor]]: + """ + Args: + x (Tensor): Input of shape ``(batch, sequence_length, embed_dim)``. + attention_mask (Tensor or ``None``, optional): attention mask + of shape ``(batch, 1, sequence_length, sequence_length)``. (Default: ``None``) + position_bias (Tensor or ``None``, optional): position bias of shape + ``(batch_size * num_heads, src_len, src_len)``. + Only necessary for WavLM model, ``None`` otherwise. (Default: ``None``) + key_padding_mask (Tensor or ``None``, optional): key padding mask of shape ``(batch_size, src_len)``. + Only used for WavLM model, ignored otherwise. (Default: ``None``) + Returns: + (x, position_bias): Shapes are the same as in the input. Position bias is only relevant for WaLM model, + ``None`` otherwise. + """ + residual = x + + if self.layer_norm_first: + x = self.layer_norm(x) + + x, position_bias = self.attention( + x, attention_mask=attention_mask, position_bias=position_bias, key_padding_mask=key_padding_mask + ) + + x = self.dropout(x) + x = residual + x + + if self.layer_norm_first: + x = x + self.feed_forward(self.final_layer_norm(x)) + else: + x = self.layer_norm(x) + x = self.final_layer_norm(x + self.feed_forward(x)) + return x, position_bias + + +class Transformer(Module): + def __init__( + self, + pos_conv_embed: Module, + dropout: float, + layers: Module, + layer_norm_first: bool, + layer_drop: float, + ): + super().__init__() + self.pos_conv_embed = pos_conv_embed + self.layer_norm = nn.LayerNorm(pos_conv_embed.embed_dim) + self.layer_norm_first = layer_norm_first + self.layer_drop = layer_drop + self.dropout = nn.Dropout(dropout) + self.layers = layers + + def _preprocess(self, x: Tensor): + x = x + self.pos_conv_embed(x) + + if self.layer_norm_first: + x = self.layer_norm(x) + + x = self.dropout(x) + return x + + def forward( + self, + x: Tensor, + attention_mask: Optional[Tensor] = None, + position_bias: Optional[Tensor] = None, + ) -> Tensor: + x = self._preprocess(x) + for layer in self.layers: + if not (self.training and torch.rand(1).item() <= self.layer_drop): + x, position_bias = layer(x, attention_mask, position_bias=position_bias) + + if not self.layer_norm_first: + x = self.layer_norm(x) + return x + + def get_intermediate_outputs( + self, + x: Tensor, + attention_mask: Optional[Tensor] = None, + num_layers: Optional[int] = None, + ) -> List[Tensor]: + if num_layers is not None: + if not 0 < num_layers <= len(self.layers): + raise ValueError(f"`num_layers` must be between [1, {len(self.layers)}]") + + ret: List[Tensor] = [] + position_bias = None + x = self._preprocess(x) + for layer in self.layers: + x, position_bias = layer(x, attention_mask, position_bias=position_bias) + ret.append(x) + if num_layers is not None and len(ret) >= num_layers: + return ret + return ret + + +class Encoder(Module): + def __init__( + self, + feature_projection: Module, + transformer: Module, + ): + super().__init__() + self.feature_projection = feature_projection + self.transformer = transformer + + def _preprocess( + self, + features: Tensor, + lengths: Optional[Tensor] = None, + ) -> Tuple[Tensor, Optional[Tensor]]: + x = self.feature_projection(features) + + mask: Optional[Tensor] = None + if lengths is not None: + batch_size, max_len, _ = x.shape + # create mask for padded elements and zero-out them + mask = torch.arange(max_len, device=lengths.device).expand(batch_size, max_len) >= lengths[:, None] + x[mask] = 0.0 + # extend the mask to attention shape and set weight + mask = -10000.0 * mask[:, None, None, :].to(dtype=features.dtype) + mask = mask.expand(batch_size, 1, max_len, max_len) + return x, mask + + def forward( + self, + features: Tensor, + lengths: Optional[Tensor] = None, + ) -> Tensor: + x, mask = self._preprocess(features, lengths) + x = self.transformer(x, attention_mask=mask) + return x + + def extract_features( + self, + features: Tensor, + lengths: Optional[Tensor] = None, + num_layers: Optional[int] = None, + ) -> List[Tensor]: + x, masks = self._preprocess(features, lengths) + return self.transformer.get_intermediate_outputs(x, attention_mask=masks, num_layers=num_layers) + + +################################################################################ +def _get_feature_extractor( + norm_mode: str, + shapes: List[Tuple[int, int, int]], + bias: bool, +) -> FeatureExtractor: + """ + Args: + norm_mode (str): + Either "group_norm" or "layer_norm". + If "group_norm", then a single normalization is applied + in the first convolution block. Otherwise, all the convolution + blocks will have layer normalization. + This option corresponds to "extractor_mode" from fairseq. + Expected values are "group_norm" for Base arch, and + "layer_norm" for Large arch. + shapes (list of tuple of int): + Configuration of convolution layers. List of convolution configuration, + i.e. ``[(output_channel, kernel_size, stride), ...]`` + This option corresponds to "conv_feature_layers" from fairseq. + Expected values are + ``[(512, 10, 5)] + [(512, 3, 2)] * 4 + [(512, 2, 2)] * 2`` + for all the architectures. + bias (bool): + Whether to include bias term to each convolution operation. + This option corresponds to "conv_bias" from fairseq. + Expected values are False for Base arch, and True for Large arch. + + See Also: + * Original implementation + https://github.com/pytorch/fairseq/blob/425c36eafff535fe7337f8bdd5ace22ebacc78cb/fairseq/models/wav2vec/wav2vec2.py#L666-L733 + * "extractor_mode" + - Def and base: + https://github.com/pytorch/fairseq/blob/425c36eafff535fe7337f8bdd5ace22ebacc78cb/fairseq/models/wav2vec/wav2vec2.py#L38-L45 + - Large: + https://github.com/pytorch/fairseq/blob/425c36eafff535fe7337f8bdd5ace22ebacc78cb/examples/wav2vec/config/pretraining/wav2vec2_large_librivox.yaml#L52 + * "conv_feature_layers" + - Def, base and large: + https://github.com/pytorch/fairseq/blob/425c36eafff535fe7337f8bdd5ace22ebacc78cb/fairseq/models/wav2vec/wav2vec2.py#L94-L100 + * "conv_bias" + - Def and base: + https://github.com/pytorch/fairseq/blob/425c36eafff535fe7337f8bdd5ace22ebacc78cb/fairseq/models/wav2vec/wav2vec2.py#L101-L103 + - Large: + https://github.com/pytorch/fairseq/blob/425c36eafff535fe7337f8bdd5ace22ebacc78cb/examples/wav2vec/config/pretraining/wav2vec2_large_librivox.yaml#L61 + """ + if norm_mode not in ["group_norm", "layer_norm"]: + raise ValueError("Invalid norm mode") + blocks = [] + in_channels = 1 + for i, (out_channels, kernel_size, stride) in enumerate(shapes): + normalization = None + if norm_mode == "group_norm" and i == 0: + normalization = nn.GroupNorm( + num_groups=out_channels, + num_channels=out_channels, + affine=True, + ) + elif norm_mode == "layer_norm": + normalization = LayerNorm( + normalized_shape=out_channels, + elementwise_affine=True, + ) + blocks.append( + ConvLayerBlock( + in_channels=in_channels, + out_channels=out_channels, + kernel_size=kernel_size, + stride=stride, + bias=bias, + layer_norm=normalization, + ) + ) + in_channels = out_channels + return FeatureExtractor(nn.ModuleList(blocks)) + + +def _get_encoder( + in_features: int, + embed_dim: int, + dropout_input: float, + pos_conv_kernel: int, + pos_conv_groups: int, + num_layers: int, + num_heads: int, + attention_dropout: float, + ff_interm_features: int, + ff_interm_dropout: float, + dropout: float, + layer_norm_first: bool, + layer_drop: float, +) -> Encoder: + """ + Args: + in_features (int): The number of input features. + embed_dim (int): + The dimension of embedding. + This option corresponds to "encoder_embed_dim" from fairseq. + Expected values are 768 for Base arch, and 1024 for Large arch. + dropout_input (float): + The dropout probability applied after the input feature is projected + to ``embed_dim``. + This option corresponds to "dropout_input" from fairseq. + Expected values are 0.1 for both Base and Large arch. + pos_conv_kernel (int): + The kernel size of convolutional positional embeddings. + This option corresponds to "conv_pos" from fairseq. + Expected values are 128 for both Base and Large arch. + pos_conv_groups (int): + The number of groups of convolutional positional embeddings. + This option corresponds to "conv_pos_groups" from fairseq. + Expected values are 16 for both Base and Large arch. + num_layers (int): + The number of self attention layers in transformer block. + This option corresponds to "encoder_layers" from fairseq. + Expected values are 12 for Base and 24 for Large arch. + num_heads (int): + The number of heads in self attention layers. + This option corresponds to "encoder_attention_heads" from fairseq. + Expected values are 12 for Base and 16 for Large arch. + attention_dropout (float): + The dropout probability applied after softmax in self-attention layer. + This option corresponds to "attention_dropout" from fairseq. + Expected values are 0.1 for Base and 0.0 for Large arch. + ff_interm_features (int): + The dimension of hidden features in feed forward layer. + This option corresponds to "encoder_ffn_embed_dim" from fairseq. + Expected values are 3072 for Base and 4096 for Large arch. + ff_interm_dropout (float): + The dropout probability applied in feedforward layer. + This option correspinds to "activation_dropout" from fairseq. + Expected values are 0.1 for both Base and Large arch. + dropout (float): + The dropout probability applied at the end of feed forward layer. + This option corresponds to "dropout" from fairseq. + Expected values are 0.1 for Base and 0.0 for Large arch. + layer_norm_first (bool): + Control the order of layer norm in transformer layer and each encoder layer. + If True, in transformer layer, layer norm is applied before features are fed + to encoder layers. In encoder layer, two layer norms are applied before and after + self attention. + If False, in transformer layer, layer norm is applied after features are fed + to encoder layers. In encoder layer, two layer norms are applied after self + attention, before and after feed forward. + This option corresponds to "layer_norm_first" from fairseq. + Expected values are False for Base and True for Large arch. + layer_drop (float): + Probability to drop each encoder layer during training. + This option corresponds to "layerdrop" from fairseq. + Expected values are 0.1 for both Base and Large arch. + + See Also: + * "encoder_embed_dim" + - Def and base + https://github.com/pytorch/fairseq/blob/425c36eafff535fe7337f8bdd5ace22ebacc78cb/fairseq/models/wav2vec/wav2vec2.py#L49-L51 + - Large + https://github.com/pytorch/fairseq/blob/425c36eafff535fe7337f8bdd5ace22ebacc78cb/examples/wav2vec/config/pretraining/wav2vec2_large_librivox.yaml#L64 + * "dropout_input" + - Def, base and large + https://github.com/pytorch/fairseq/blob/425c36eafff535fe7337f8bdd5ace22ebacc78cb/fairseq/models/wav2vec/wav2vec2.py#L75-L78 + * "conv_pos" + - Def, base and large + NOTE: The description is wrong. + https://github.com/pytorch/fairseq/blob/425c36eafff535fe7337f8bdd5ace22ebacc78cb/fairseq/models/wav2vec/wav2vec2.py#L204-L207 + - Usage + https://github.com/pytorch/fairseq/blob/425c36eafff535fe7337f8bdd5ace22ebacc78cb/fairseq/models/wav2vec/wav2vec2.py#L756 + * "conv_pos_groups" + - Def, base and large + https://github.com/pytorch/fairseq/blob/425c36eafff535fe7337f8bdd5ace22ebacc78cb/fairseq/models/wav2vec/wav2vec2.py#L208-L211 + * "encoder_layers" + - Def and base + https://github.com/pytorch/fairseq/blob/425c36eafff535fe7337f8bdd5ace22ebacc78cb/fairseq/models/wav2vec/wav2vec2.py#L46-L48 + - Large + https://github.com/pytorch/fairseq/blob/425c36eafff535fe7337f8bdd5ace22ebacc78cb/examples/wav2vec/config/pretraining/wav2vec2_large_librivox.yaml#L63 + * "encoder_attention_heads" + - Def and base + https://github.com/pytorch/fairseq/blob/425c36eafff535fe7337f8bdd5ace22ebacc78cb/fairseq/models/wav2vec/wav2vec2.py#L55-L57 + - Large + https://github.com/pytorch/fairseq/blob/425c36eafff535fe7337f8bdd5ace22ebacc78cb/examples/wav2vec/config/pretraining/wav2vec2_large_librivox.yaml#L66 + * "attention_dropout" + - Def and base + https://github.com/pytorch/fairseq/blob/425c36eafff535fe7337f8bdd5ace22ebacc78cb/fairseq/models/wav2vec/wav2vec2.py#L66-L68 + - Large + https://github.com/pytorch/fairseq/blob/425c36eafff535fe7337f8bdd5ace22ebacc78cb/examples/wav2vec/config/pretraining/wav2vec2_large_librivox.yaml#L60 + * "encoder_ffn_embed_dim" + - Def and base + https://github.com/pytorch/fairseq/blob/425c36eafff535fe7337f8bdd5ace22ebacc78cb/fairseq/models/wav2vec/wav2vec2.py#L52-L54 + - Large + https://github.com/pytorch/fairseq/blob/425c36eafff535fe7337f8bdd5ace22ebacc78cb/examples/wav2vec/config/pretraining/wav2vec2_large_librivox.yaml#L65 + * "activation_dropout" + - Def + https://github.com/pytorch/fairseq/blob/425c36eafff535fe7337f8bdd5ace22ebacc78cb/fairseq/models/wav2vec/wav2vec2.py#L69-L71 + - Base + https://github.com/pytorch/fairseq/blob/425c36eafff535fe7337f8bdd5ace22ebacc78cb/examples/wav2vec/config/finetuning/base_960h.yaml#L55 + - Large + https://github.com/pytorch/fairseq/blob/425c36eafff535fe7337f8bdd5ace22ebacc78cb/examples/wav2vec/config/finetuning/vox_960h.yaml#L55 + * "dropout" + - Def and base + https://github.com/pytorch/fairseq/blob/425c36eafff535fe7337f8bdd5ace22ebacc78cb/fairseq/models/wav2vec/wav2vec2.py#L63-L65 + - Large + https://github.com/pytorch/fairseq/blob/425c36eafff535fe7337f8bdd5ace22ebacc78cb/examples/wav2vec/config/pretraining/wav2vec2_large_librivox.yaml#L59 + * "layer_norm_first" + - Def and base + https://github.com/pytorch/fairseq/blob/425c36eafff535fe7337f8bdd5ace22ebacc78cb/fairseq/models/wav2vec/wav2vec2.py#L91-L93 + - Large + https://github.com/pytorch/fairseq/blob/425c36eafff535fe7337f8bdd5ace22ebacc78cb/examples/wav2vec/config/pretraining/wav2vec2_large_librivox.yaml#L53 + * "layerdrop" + - Def + https://github.com/pytorch/fairseq/blob/425c36eafff535fe7337f8bdd5ace22ebacc78cb/fairseq/models/wav2vec/wav2vec2.py#L72-L74 + - Base + https://github.com/pytorch/fairseq/blob/425c36eafff535fe7337f8bdd5ace22ebacc78cb/examples/wav2vec/config/finetuning/base_960h.yaml#L54 + - Large + https://github.com/pytorch/fairseq/blob/425c36eafff535fe7337f8bdd5ace22ebacc78cb/examples/wav2vec/config/finetuning/vox_960h.yaml#L54 + """ + feature_projection = FeatureProjection(in_features, embed_dim, dropout_input) + pos_conv = ConvolutionalPositionalEmbedding(embed_dim, pos_conv_kernel, pos_conv_groups) + + # Original impl + # https://github.com/pytorch/fairseq/blob/425c36eafff535fe7337f8bdd5ace22ebacc78cb/fairseq/models/wav2vec/wav2vec2.py#L768-L782 + encoder_layers = nn.ModuleList() + for _ in range(num_layers): + attention = SelfAttention( + embed_dim=embed_dim, + num_heads=num_heads, + dropout=attention_dropout, + ) + feed_forward = FeedForward( + io_features=embed_dim, + intermediate_features=ff_interm_features, + intermediate_dropout=ff_interm_dropout, + output_dropout=dropout, + ) + encoder_layers.append( + EncoderLayer( + attention=attention, + dropout=dropout, + layer_norm_first=layer_norm_first, + feed_forward=feed_forward, + ) + ) + transformer = Transformer( + pos_conv_embed=pos_conv, + dropout=dropout, + layers=encoder_layers, + layer_norm_first=not layer_norm_first, + layer_drop=layer_drop, + ) + return Encoder(feature_projection, transformer) + + +def _get_wavlm_encoder( + in_features: int, + embed_dim: int, + dropout_input: float, + pos_conv_kernel: int, + pos_conv_groups: int, + num_layers: int, + num_heads: int, + num_buckets: int, + max_distance: int, + attention_dropout: float, + ff_interm_features: int, + ff_interm_dropout: float, + dropout: float, + layer_norm_first: bool, + layer_drop: float, +) -> Encoder: + """ + Construct encoder for WavLM model :cite:`chen2022wavlm`. The structure of the encoder and most of the argments are + the same as in :py:func:`_get_encoder` so refer there for documentation. The only difference from Wav2Vec2 encoder + is usage of `WavLMSelfAttention` instead of `SelfAttention` and two additional parameters: `num_buckets` and + `max_distance`. + Args: + in_features (int): See :py:func:`_get_encoder`. + embed_dim (int): See :py:func:`_get_encoder`. + dropout_input (float): See :py:func:`_get_encoder`. + pos_conv_kernel (int): See :py:func:`_get_encoder`. + pos_conv_groups (int): See :py:func:`_get_encoder`. + num_layers (int): See :py:func:`_get_encoder`. + num_heads (int): See :py:func:`_get_encoder`. + num_buckets (int): Number of buckets for relative position embedding. + max_distance (int): Maximum distance for relative position embedding. + attention_dropout (float): See :py:func:`_get_encoder`. + ff_interm_features (int): See :py:func:`_get_encoder`. + ff_interm_dropout (float): See :py:func:`_get_encoder`. + dropout (float): See :py:func:`_get_encoder`. + layer_norm_first (bool): See :py:func:`_get_encoder`. + layer_drop (float): See :py:func:`_get_encoder`. + + """ + feature_projection = FeatureProjection(in_features, embed_dim, dropout_input) + pos_conv = ConvolutionalPositionalEmbedding(embed_dim, pos_conv_kernel, pos_conv_groups) + + # Original impl + # https://github.com/pytorch/fairseq/blob/425c36eafff535fe7337f8bdd5ace22ebacc78cb/fairseq/models/wav2vec/wav2vec2.py#L768-L782 + encoder_layers = nn.ModuleList() + for i in range(num_layers): + attention = WavLMSelfAttention( + embed_dim=embed_dim, + num_heads=num_heads, + num_buckets=num_buckets, + max_distance=max_distance, + dropout=attention_dropout, + has_relative_attention_bias=(i == 0), # Position embedding is only necessary in the first layer. + ) + feed_forward = FeedForward( + io_features=embed_dim, + intermediate_features=ff_interm_features, + intermediate_dropout=ff_interm_dropout, + output_dropout=dropout, + ) + encoder_layers.append( + EncoderLayer( + attention=attention, + dropout=dropout, + layer_norm_first=layer_norm_first, + feed_forward=feed_forward, + ) + ) + transformer = Transformer( + pos_conv_embed=pos_conv, + dropout=dropout, + layers=encoder_layers, + layer_norm_first=not layer_norm_first, + layer_drop=layer_drop, + ) + return Encoder(feature_projection, transformer) + + +def _compute_mask_indices( + shape: Tuple[int, int], + padding_mask: Optional[Tensor], + mask_prob: float, + mask_length: int, + mask_type: str = "static", + mask_other: float = 0.0, + min_masks: int = 0, + no_overlap: bool = False, + min_space: int = 0, +) -> Tensor: + """Computes random mask spans for a given shape. + Args: + shape (int, int): The shape for which to compute masks. + The first element is batch size and second is the number of frames. + padding_mask (Tensor or None): The padding mask of the same dimension as shape, + which will prevent masking padded elements. + mask_prob (float): Probability for each token to be chosen as start of the span to be masked. + This will be multiplied by number of timesteps divided by length of mask span to mask + approximately this percentage of all elements. However due to overlaps, the actual number + will be smaller (unless no_overlap is True). + mask_type (str): How to compute mask lengths. Options: [``static``, ``uniform``, ``normal``, ``poisson``]. + ``static``: Fixed size + ``uniform``: Sample from uniform distribution [mask_other, mask_length*2] + ``normal``: Sample from normal distribution with mean ``mask_length`` and stdev ``mask_other``. + ``poisson``: Sample from possion distribution with lambda = ``mask_length``. + min_masks (int): Minimum number of masked spans. + no_overlap (bool): If false, will switch to an alternative recursive algorithm + that prevents spans from overlapping. + min_space (int): How many frames to keep unmasked between spans (Only used if no_overlap is True). + + Returns: + (Tensor): The mask indices of dimension `[batch, frame]`. + """ + + batch_size, frame = shape + mask = torch.full((batch_size, frame), False) + # add a random number for probabilistic rounding + all_num_mask = int(mask_prob * frame / float(mask_length) + torch.rand(1)) + + all_num_mask = max(min_masks, all_num_mask) + + mask_idcs = [] + for i in range(batch_size): + if padding_mask is not None: + sz = frame - padding_mask[i].long().sum().item() + # add a random number for probabilistic rounding + num_mask = int(mask_prob * sz / float(mask_length) + torch.rand(1)) + num_mask = max(min_masks, num_mask) + else: + sz = frame + num_mask = all_num_mask + + if mask_type == "static": + lengths = torch.full((num_mask,), mask_length) + elif mask_type == "uniform": + lengths = torch.randint(int(mask_other), mask_length * 2 + 1, size=(num_mask,)) + elif mask_type == "normal": + lengths = torch.normal(mask_length, mask_other, size=(num_mask,)) + lengths = torch.maximum(torch.ones(1), torch.round(lengths)).int() + elif mask_type == "poisson": + lengths = torch.poisson(mask_length, size=(num_mask,)) + lengths = torch.round(lengths).int() + else: + raise Exception(f"unknown mask selection: {mask_type}") + + if sum(lengths) == 0: + lengths[0] = min(mask_length, sz - 1) + + if no_overlap: + mask_idc = [] + + def arrange(s, e, length, keep_length): + span_start = torch.randint(s, e - length, size=(1,)) + mask_idc.extend(span_start + i for i in range(length)) + + new_parts = [] + if span_start - s - min_space >= keep_length: + new_parts.append((s, span_start - min_space + 1)) + if e - span_start - keep_length - min_space > keep_length: + new_parts.append((span_start + length + min_space, e)) + return new_parts + + parts = [(0, sz)] + min_length = min(lengths) + for length in sorted(lengths, reverse=True): + lens = torch.tensor([e - s for s, e in parts], dtype=torch.int) + lens[lens < length + min_space] = 0 + l_sum = lens.sum() + if l_sum == 0: + break + probs = lens / l_sum + c = torch.distributions.categorical.Categorical(probs).sample() + s, e = parts.pop(c) + parts.extend(arrange(s, e, length, min_length)) + mask_idc = torch.tensor(mask_idc) + else: + min_len = min(lengths) + if sz - min_len <= num_mask: + min_len = sz - num_mask - 1 + + mask_idc = torch.randperm(sz - min_len)[:num_mask] + mask_idc = torch.tensor( + [mask_idc[j] + offset for j in range(len(mask_idc)) for offset in range(lengths[j])] + ) + + mask_idcs.append(torch.unique(mask_idc[mask_idc < sz])) + + min_len = min([len(m) for m in mask_idcs]) + for i, mask_idc in enumerate(mask_idcs): + if len(mask_idc) > min_len: + mask_idc = mask_idc[torch.randperm(len(mask_idc))[:min_len].long()] + mask[i, mask_idc] = True + + return mask + + +def _get_padding_mask(input: Tensor, lengths: Tensor) -> Tensor: + """Generate the padding mask given the padded input and the lengths Tensors. + Args: + input (Tensor): The padded Tensor of dimension `[batch, max_len, frequency]`. + lengths (Tensor): The lengths Tensor of dimension `[batch,]`. + + Returns: + (Tensor): The padding mask. + """ + batch_size, max_len, _ = input.shape + mask = torch.arange(max_len, device=lengths.device).expand(batch_size, max_len) >= lengths[:, None] + return mask + + +class MaskGenerator(Module): + """Generate the masks for masked prediction. + Args: + encoder_embed_dim (int): The dimension of the transformer embedding output. + mask_prob (float): Probability for each token to be chosen as start of the span to be masked. + This will be multiplied by number of timesteps divided by length of mask span to mask + approximately this percentage of all elements. However due to overlaps, the actual number + will be smaller (unless no_overlap is True). + mask_selection (str): How to choose the mask length. + Options: [``static``, ``uniform``, ``normal``, ``poisson``]. + mask_other (float): Secondary mask argument (used for more complex distributions). + mask_length (int): The lengths of the mask. + no_mask_overlap (bool): Whether to allow masks to overlap. + mask_min_space (int): Minimum space between spans (if no overlap is enabled). + mask_channel_prob (float): The probability of replacing a feature with 0. + mask_channel_selection (str): How to choose the mask length for channel masking. + Options: [``static``, ``uniform``, ``normal``, ``poisson``]. + mask_channel_other (float): Secondary mask argument for channel masking(used for more complex distributions). + mask_channel_length (int): Minimum space between spans (if no overlap is enabled) for channel masking. + no_mask_channel_overlap (bool): Whether to allow channel masks to overlap. + mask_channel_min_space (int): Minimum space between spans for channel masking(if no overlap is enabled). + """ + + def __init__( + self, + encoder_embed_dim: int, + mask_prob: float, + mask_selection: str, + mask_other: float, + mask_length: int, + no_mask_overlap: bool, + mask_min_space: int, + mask_channel_prob: float, + mask_channel_selection: str, + mask_channel_other: float, + mask_channel_length: int, + no_mask_channel_overlap: bool, + mask_channel_min_space: int, + ): + super().__init__() + self.mask_prob = mask_prob + self.mask_selection = mask_selection + self.mask_other = mask_other + self.mask_length = mask_length + self.no_mask_overlap = no_mask_overlap + self.mask_min_space = mask_min_space + self.mask_channel_prob = mask_channel_prob + self.mask_channel_selection = mask_channel_selection + self.mask_channel_other = mask_channel_other + self.mask_channel_length = mask_channel_length + self.no_mask_channel_overlap = no_mask_channel_overlap + self.mask_channel_min_space = mask_channel_min_space + self.mask_embedding = Parameter(torch.FloatTensor(encoder_embed_dim)) + torch.nn.init.uniform_(self.mask_embedding) + + def forward(self, x: Tensor, padding_mask: Optional[Tensor]) -> Tensor: + """ + Args: + x (Tensor): The encoded representations after feature extraction module. + padding_mask (Tensor or None): The padding mask of the same dimension as shape, + which will prevent masking padded elements. + + Returns: + Tensor: The feature representations after masking. + Tensor: The generated mask indices. + """ + B, T, C = x.shape + if self.mask_prob > 0: + mask_indices = _compute_mask_indices( + (B, T), + padding_mask, + self.mask_prob, + self.mask_length, + self.mask_selection, + self.mask_other, + min_masks=2, + no_overlap=self.no_mask_overlap, + min_space=self.mask_min_space, + ) + mask_indices = mask_indices.to(x.device) + # change dtype of mask_embedding to x for mixed-precision training. + # see https://github.com/pytorch/audio/issues/2847 for details. + x[mask_indices] = self.mask_embedding.to(x.dtype) + else: + mask_indices = None + + if self.mask_channel_prob > 0: + mask_channel_indices = _compute_mask_indices( + (B, C), + None, + self.mask_channel_prob, + self.mask_channel_length, + self.mask_channel_selection, + self.mask_channel_other, + no_overlap=self.no_mask_channel_overlap, + min_space=self.mask_channel_min_space, + ) + mask_channel_indices = mask_channel_indices.to(x.device).unsqueeze(1).expand(-1, T, -1) + x[mask_channel_indices] = 0 + + return x, mask_indices + + +def _compute_logits( + proj_x: Tensor, + target: Tensor, + label_embeddings: Parameter, +) -> Tensor: + """Compute the logits of the embeddings. + Args: + proj_x (Tensor): The projected masked representations of dimension `[batch, frame, final_dim]`. + target (Tensor): The target Tensor of dimension `[batch, frame, final_dim]`. + label_embeddings (Parameter): The trainable embeddings of target of dimension `[num_class, final_dim]`. + + Returns: + (Tensor): The logits of the inputs. + """ + logit_temp = 0.1 + pos = torch.index_select(label_embeddings, 0, target.long()) + negs = label_embeddings.unsqueeze(1).expand(-1, proj_x.size(0), -1) + neg_is_pos = (pos == negs).all(-1) + pos = pos.unsqueeze(0) + targets = torch.cat([pos, negs], dim=0) + + logits = torch.cosine_similarity(proj_x.float(), targets.float(), dim=-1).type_as(proj_x) + logits /= logit_temp + if neg_is_pos.any(): + logits[1:][neg_is_pos] = float("-inf") + logits = logits.transpose(0, 1) # (num_x, num_cls+1) + return logits + + +class LogitGenerator(Module): + """Generate the logits of masked and unmasked inputs. + Args: + encoder_embed_dim (int): The dimension of the transformer embedding output. + num_classes (int): The number of classes in the labels. + final_dim (int): Project final representations and targets to `final_dim`. + skip_masked (bool): If True, skip computing losses over masked frames. + skip_nomask (bool): If True, skip computing losses over unmasked frames. + """ + + def __init__( + self, + encoder_embed_dim: int, + num_classes: int, + final_dim: int, + skip_masked: bool, + skip_nomask: bool, + ): + super().__init__() + self.label_embeddings = Parameter(torch.FloatTensor(num_classes, final_dim)) + torch.nn.init.uniform_(self.label_embeddings) + self.final_proj = torch.nn.Linear(encoder_embed_dim, final_dim) + self.skip_masked = skip_masked + self.skip_nomask = skip_nomask + + def forward(self, x: Tensor, label: Tensor, mask_m: Tensor, mask_u: Tensor) -> Tuple[Tensor, Tensor]: + """ + Args: + x (Tensor): The feature representation of the last transformer layer. + label (Tensor): The label Tensor of dimension `[batch, frame]`. + mask_m (Tensor): The masked indices of dimension `[batch, frame]`. + mask_u (Tensor): The unmasked indices of dimension `[batch, frame]`. + + Returns: + Tensor: The logits of masked frames. Tensor of dimension `[masked_frame, final_dim]`. + Tensor: The logits of unmasked frames. Tensor of dimension `[unmasked_frame, final_dim]`. + """ + proj_x = self.final_proj(x) + if self.skip_masked: + logit_m = None + else: + proj_x_m = proj_x[mask_m] + label_m = label[mask_m] + logit_m = _compute_logits(proj_x_m, label_m, self.label_embeddings) + + if self.skip_nomask: + logit_u = None + else: + proj_x_u = proj_x[mask_u] + label_u = label[mask_u] + logit_u = _compute_logits(proj_x_u, label_u, self.label_embeddings) + return logit_m, logit_u + + +class GradMultiply(torch.autograd.Function): + @staticmethod + def forward(ctx, x, scale): + ctx.scale = scale + res = x.new(x) + return res + + @staticmethod + def backward(ctx, grad): + return grad * ctx.scale, None diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/wav2vec2/model.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/wav2vec2/model.py new file mode 100644 index 0000000000000000000000000000000000000000..254122f0eee21906ec50f3d4238a5b3024e74a0a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/wav2vec2/model.py @@ -0,0 +1,1579 @@ +import math +from typing import List, Optional, Tuple + +import torch +from torch import Tensor +from torch.nn import Module + +from . import components + + +class Wav2Vec2Model(Module): + """Acoustic model used in *wav2vec 2.0* :cite:`baevski2020wav2vec`. + + Note: + To build the model, please use one of the factory functions. + + See Also: + * :class:`torchaudio.pipelines.Wav2Vec2Bundle`: Pretrained models (without fine-tuning) + * :class:`torchaudio.pipelines.Wav2Vec2ASRBundle`: ASR pipelines with pretrained models. + + Args: + feature_extractor (torch.nn.Module): + Feature extractor that extracts feature vectors from raw audio Tensor. + + encoder (torch.nn.Module): + Encoder that converts the audio features into the sequence of probability + distribution (in negative log-likelihood) over labels. + + aux (torch.nn.Module or None, optional): + Auxiliary module. If provided, the output from encoder is passed to this module. + """ # noqa: E501 + + def __init__( + self, + feature_extractor: Module, + encoder: Module, + aux: Optional[Module] = None, + ): + super().__init__() + self.feature_extractor = feature_extractor + self.encoder = encoder + self.aux = aux + + @torch.jit.export + def extract_features( + self, + waveforms: Tensor, + lengths: Optional[Tensor] = None, + num_layers: Optional[int] = None, + ) -> Tuple[List[Tensor], Optional[Tensor]]: + """Extract feature vectors from raw waveforms + + This returns the list of outputs from the intermediate layers of + transformer block in encoder. + + Args: + waveforms (Tensor): Audio tensor of shape `(batch, frames)`. + lengths (Tensor or None, optional): + Indicates the valid length of each audio in the batch. + Shape: `(batch, )`. + When the ``waveforms`` contains audios with different durations, + by providing ``lengths`` argument, the model will compute + the corresponding valid output lengths and apply proper mask in + transformer attention layer. + If ``None``, it is assumed that the entire audio waveform + length is valid. + num_layers (int or None, optional): + If given, limit the number of intermediate layers to go through. + Providing `1` will stop the computation after going through one + intermediate layers. If not given, the outputs from all the + intermediate layers are returned. + + Returns: + (List[Tensor], Optional[Tensor]): + List of Tensors + Features from requested layers. + Each Tensor is of shape: `(batch, time frame, feature dimension)` + Tensor or None + If ``lengths`` argument was provided, a Tensor of shape `(batch, )` + is returned. + It indicates the valid length in time axis of each feature Tensor. + """ + x, lengths = self.feature_extractor(waveforms, lengths) + x = self.encoder.extract_features(x, lengths, num_layers) + return x, lengths + + def forward( + self, + waveforms: Tensor, + lengths: Optional[Tensor] = None, + ) -> Tuple[Tensor, Optional[Tensor]]: + """Compute the sequence of probability distribution over labels. + + Args: + waveforms (Tensor): Audio tensor of shape `(batch, frames)`. + lengths (Tensor or None, optional): + Indicates the valid length of each audio in the batch. + Shape: `(batch, )`. + When the ``waveforms`` contains audios with different durations, + by providing ``lengths`` argument, the model will compute + the corresponding valid output lengths and apply proper mask in + transformer attention layer. + If ``None``, it is assumed that all the audio in ``waveforms`` + have valid length. Default: ``None``. + + Returns: + (Tensor, Optional[Tensor]): + Tensor + The sequences of probability distribution (in logit) over labels. + Shape: `(batch, frames, num labels)`. + Tensor or None + If ``lengths`` argument was provided, a Tensor of shape `(batch, )` + is returned. + It indicates the valid length in time axis of the output Tensor. + """ + x, lengths = self.feature_extractor(waveforms, lengths) + x = self.encoder(x, lengths) + if self.aux is not None: + x = self.aux(x) + return x, lengths + + +class HuBERTPretrainModel(Module): + """HuBERTPretrainModel() + + HuBERT model used for pretraining in *HuBERT* :cite:`hsu2021hubert`. + + Note: + To build the model, please use one of the factory functions. + + See Also: + `HuBERT Pre-training and Fine-tuning Recipes + `__ + + Args: + wav2vec2 (Wav2Vec2Model): + Wav2Vec2 encoder that generates the transformer outputs. + + mask_generator (torch.nn.Module): + Mask generator that generates the mask for masked prediction during the training. + + logit_generator (torch.nn.Module): + Logit generator that predicts the logits of the masked and unmasked inputs. + + feature_grad_mult (float or None): + The factor to scale the convolutional feature extraction layer gradients by. + If ``None``, the gradients of feature extraction layers are not affected. + The scale factor will not affect the forward pass. + """ + + def __init__( + self, + wav2vec2: Wav2Vec2Model, + mask_generator: Module, + logit_generator: Module, + feature_grad_mult: Optional[float], + ): + super().__init__() + self.wav2vec2 = wav2vec2 + self.mask_generator = mask_generator + self.logit_generator = logit_generator + if feature_grad_mult is not None and not 0.0 < feature_grad_mult < 1.0: + raise ValueError( + f"The value of `feature_grad_mult` must be ``None``or between (0, 1). Found {feature_grad_mult}" + ) + self.feature_grad_mult = feature_grad_mult + + def forward( + self, + waveforms: Tensor, + labels: Tensor, + audio_lengths: Optional[Tensor] = None, + ) -> Tuple[Tensor, Optional[Tensor]]: + """Compute the sequence of probability distribution over labels. + + Args: + waveforms (Tensor): Audio tensor of dimension `[batch, frames]`. + labels (Tensor): Label for pre-training. A Tensor of dimension `[batch, frames]`. + audio_lengths (Tensor or None, optional): + Indicates the valid length of each audio in the batch. + Shape: `[batch, ]`. + When the ``waveforms`` contains audios with different durations, + by providing ``lengths`` argument, the model will compute + the corresponding valid output lengths and apply proper mask in + transformer attention layer. + If ``None``, it is assumed that all the audio in ``waveforms`` + have valid length. Default: ``None``. + + Returns: + (Tensor, Tensor, Tensor): + Tensor + The masked sequences of probability distribution (in logit). + Shape: `(masked_frames, num labels)`. + Tensor + The unmasked sequence of probability distribution (in logit). + Shape: `(unmasked_frames, num labels)`. + Tensor + The feature mean value for additional penalty loss. + Shape: `(1,)`. + """ + x, lengths = self.wav2vec2.feature_extractor(waveforms, audio_lengths) + if self.feature_grad_mult is not None and self.feature_grad_mult < 1.0: + x = components.GradMultiply.apply(x, self.feature_grad_mult) + features_pen = x.float().pow(2).mean() + if lengths is not None: + padding_mask = components._get_padding_mask(x, lengths) + else: + padding_mask = None + x, attention_mask = self.wav2vec2.encoder._preprocess(x, lengths) + x, mask = self.mask_generator(x, padding_mask) + x = self.wav2vec2.encoder.transformer(x, attention_mask=attention_mask) + if x.shape[1] != labels.shape[1]: + raise ValueError("The length of label must match that of HuBERT model output") + if padding_mask is not None: + mask_m = torch.logical_and(~padding_mask, mask) + mask_u = torch.logical_and(~padding_mask, ~mask_m) + else: + mask_m = mask + mask_u = ~mask_m + + logit_m, logit_u = self.logit_generator(x, labels, mask_m, mask_u) + + return logit_m, logit_u, features_pen + + +def wav2vec2_model( + extractor_mode: str, + extractor_conv_layer_config: Optional[List[Tuple[int, int, int]]], + extractor_conv_bias: bool, + encoder_embed_dim: int, + encoder_projection_dropout: float, + encoder_pos_conv_kernel: int, + encoder_pos_conv_groups: int, + encoder_num_layers: int, + encoder_num_heads: int, + encoder_attention_dropout: float, + encoder_ff_interm_features: int, + encoder_ff_interm_dropout: float, + encoder_dropout: float, + encoder_layer_norm_first: bool, + encoder_layer_drop: float, + aux_num_out: Optional[int], +) -> Wav2Vec2Model: + """Builds custom :class:`~torchaudio.models.Wav2Vec2Model`. + + Note: + The "feature extractor" below corresponds to + `ConvFeatureExtractionModel `__ + in the original ``fairseq`` implementation. + This is referred as "(convolutional) feature encoder" in the *wav2vec 2.0* + :cite:`baevski2020wav2vec` paper. + + The "encoder" below corresponds to `TransformerEncoder `__, + and this is referred as "Transformer" in the paper. + + Args: + extractor_mode (str): Operation mode of feature extractor. + Valid values are ``"group_norm"`` or ``"layer_norm"``. + If ``"group_norm"``, then a single normalization is applied + in the first convolution block. Otherwise, all the convolution + blocks will have layer normalization. + + This option corresponds to ``extractor_mode`` from ``fairseq``. + extractor_conv_layer_config (list of integer tuples or None): + Configuration of convolution layers in feature extractor. + List of convolution configuration, + i.e. ``[(output_channel, kernel_size, stride), ...]`` + + If ``None`` is provided, then the following default value is used. + + .. code-block:: python + + [ + (512, 10, 5), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 2, 2), + (512, 2, 2), + ] + + This option corresponds to ``conv_feature_layers`` from ``fairseq``. + + extractor_conv_bias (bool): + Whether to include bias term to each convolution operation. + + This option corresponds to ``conv_bias`` from ``fairseq``. + + encoder_embed_dim (int): + The dimension of embedding in encoder. + + This option corresponds to ``encoder_embed_dim`` from ``fairseq``. + + encoder_projection_dropout (float): + The dropout probability applied after the input feature is projected + to ``encoder_embed_dim``. + + This option corresponds to ``dropout_input`` from ``fairseq``. + + encoder_pos_conv_kernel (int): + The kernel size of convolutional positional embeddings. + + This option corresponds to ``conv_pos`` from ``fairseq``. + + encoder_pos_conv_groups (int): + The number of groups of convolutional positional embeddings. + + This option corresponds to ``conv_pos_groups`` from ``fairseq``. + + encoder_num_layers (int): + The number of self attention layers in transformer block. + + This option corresponds to ``encoder_layers`` from ``fairseq``. + + encoder_num_heads (int): + The number of heads in self attention layers. + + This option corresponds to ``encoder_attention_heads`` from ``fairseq``. + + encoder_attention_dropout (float): + The dropout probability applied after softmax in self-attention layer. + + This option corresponds to ``attention_dropout`` from ``fairseq``. + + encoder_ff_interm_features (int): + The dimension of hidden features in feed forward layer. + + This option corresponds to ``encoder_ffn_embed_dim`` from ``fairseq``. + + encoder_ff_interm_dropout (float): + The dropout probability applied in feedforward layer. + + This option correspinds to ``activation_dropout`` from ``fairseq``. + + encoder_dropout (float): + The dropout probability applied at the end of feed forward layer. + + This option corresponds to ``dropout`` from ``fairseq``. + + encoder_layer_norm_first (bool): + Control the order of layer norm in transformer layer and each encoder layer. + If True, in transformer layer, layer norm is applied before features are fed + to encoder layers. In encoder layer, two layer norms are applied before and after + self attention. + If False, in transformer layer, layer norm is applied after features are fed + to encoder layers. In encoder layer, two layer norms are applied after self + attention, before and after feed forward. + + This option corresponds to ``layer_norm_first`` from ``fairseq``. + + encoder_layer_drop (float): + Probability to drop each encoder layer during training. + + This option corresponds to ``layerdrop`` from ``fairseq``. + + aux_num_out (int or None): + When provided, attach an extra linear layer on top of encoder, which can be + used for fine-tuning. + + Returns: + Wav2Vec2Model: + The resulting model. + """ # noqa: E501 + if extractor_conv_layer_config is None: + extractor_conv_layer_config = [(512, 10, 5)] + [(512, 3, 2)] * 4 + [(512, 2, 2)] * 2 + + feature_extractor = components._get_feature_extractor( + extractor_mode, extractor_conv_layer_config, extractor_conv_bias + ) + encoder = components._get_encoder( + in_features=extractor_conv_layer_config[-1][0], + embed_dim=encoder_embed_dim, + dropout_input=encoder_projection_dropout, + pos_conv_kernel=encoder_pos_conv_kernel, + pos_conv_groups=encoder_pos_conv_groups, + num_layers=encoder_num_layers, + num_heads=encoder_num_heads, + attention_dropout=encoder_attention_dropout, + ff_interm_features=encoder_ff_interm_features, + ff_interm_dropout=encoder_ff_interm_dropout, + dropout=encoder_dropout, + layer_norm_first=encoder_layer_norm_first, + layer_drop=encoder_layer_drop, + ) + aux = None + if aux_num_out is not None: + aux = torch.nn.Linear(in_features=encoder_embed_dim, out_features=aux_num_out) + return Wav2Vec2Model(feature_extractor, encoder, aux) + + +def wav2vec2_base( + encoder_projection_dropout: float = 0.1, + encoder_attention_dropout: float = 0.1, + encoder_ff_interm_dropout: float = 0.1, + encoder_dropout: float = 0.1, + encoder_layer_drop: float = 0.1, + aux_num_out: Optional[int] = None, +) -> Wav2Vec2Model: + """Builds "base" :class:`~torchaudio.models.Wav2Vec2Model` from *wav2vec 2.0* :cite:`baevski2020wav2vec` + + Args: + encoder_projection_dropout (float): + See :py:func:`wav2vec2_model`. + encoder_attention_dropout (float): + See :py:func:`wav2vec2_model`. + encoder_ff_interm_dropout (float): + See :py:func:`wav2vec2_model`. + encoder_dropout (float): + See :py:func:`wav2vec2_model`. + encoder_layer_drop (float): + See :py:func:`wav2vec2_model`. + aux_num_out (int or None, optional): + See :py:func:`wav2vec2_model`. + + Returns: + Wav2Vec2Model: + The resulting model. + """ # noqa: E501 + return wav2vec2_model( + extractor_mode="group_norm", + extractor_conv_layer_config=None, + extractor_conv_bias=False, + encoder_embed_dim=768, + encoder_projection_dropout=encoder_projection_dropout, + encoder_pos_conv_kernel=128, + encoder_pos_conv_groups=16, + encoder_num_layers=12, + encoder_num_heads=12, + encoder_attention_dropout=encoder_attention_dropout, + encoder_ff_interm_features=3072, + encoder_ff_interm_dropout=encoder_ff_interm_dropout, + encoder_dropout=encoder_dropout, + encoder_layer_norm_first=False, + encoder_layer_drop=encoder_layer_drop, + aux_num_out=aux_num_out, + ) + + +def wav2vec2_large( + encoder_projection_dropout: float = 0.1, + encoder_attention_dropout: float = 0.1, + encoder_ff_interm_dropout: float = 0.1, + encoder_dropout: float = 0.1, + encoder_layer_drop: float = 0.1, + aux_num_out: Optional[int] = None, +) -> Wav2Vec2Model: + """Builds "large" :class:`~torchaudio.models.Wav2Vec2Model` from *wav2vec 2.0* :cite:`baevski2020wav2vec` + + Args: + encoder_projection_dropout (float): + See :py:func:`wav2vec2_model`. + encoder_attention_dropout (float): + See :py:func:`wav2vec2_model`. + encoder_ff_interm_dropout (float): + See :py:func:`wav2vec2_model`. + encoder_dropout (float): + See :py:func:`wav2vec2_model`. + encoder_layer_drop (float): + See :py:func:`wav2vec2_model`. + aux_num_out (int or None, optional): + See :py:func:`wav2vec2_model`. + + Returns: + Wav2Vec2Model: + The resulting model. + """ # noqa: E501 + return wav2vec2_model( + extractor_mode="group_norm", + extractor_conv_layer_config=None, + extractor_conv_bias=False, + encoder_embed_dim=1024, + encoder_projection_dropout=encoder_projection_dropout, + encoder_pos_conv_kernel=128, + encoder_pos_conv_groups=16, + encoder_num_layers=24, + encoder_num_heads=16, + encoder_attention_dropout=encoder_attention_dropout, + encoder_ff_interm_features=4096, + encoder_ff_interm_dropout=encoder_ff_interm_dropout, + encoder_dropout=encoder_dropout, + encoder_layer_norm_first=False, + encoder_layer_drop=encoder_layer_drop, + aux_num_out=aux_num_out, + ) + + +def wav2vec2_large_lv60k( + encoder_projection_dropout: float = 0.1, + encoder_attention_dropout: float = 0.0, + encoder_ff_interm_dropout: float = 0.1, + encoder_dropout: float = 0.0, + encoder_layer_drop: float = 0.1, + aux_num_out: Optional[int] = None, +) -> Wav2Vec2Model: + """Builds "large lv-60k" :class:`~torchaudio.models.Wav2Vec2Model` from *wav2vec 2.0* :cite:`baevski2020wav2vec` + + Args: + encoder_projection_dropout (float): + See :py:func:`wav2vec2_model`. + encoder_attention_dropout (float): + See :py:func:`wav2vec2_model`. + encoder_ff_interm_dropout (float): + See :py:func:`wav2vec2_model`. + encoder_dropout (float): + See :py:func:`wav2vec2_model`. + encoder_layer_drop (float): + See :py:func:`wav2vec2_model`. + aux_num_out (int or None, optional): + See :py:func:`wav2vec2_model`. + + Returns: + Wav2Vec2Model: + The resulting model. + """ # noqa: E501 + return wav2vec2_model( + extractor_mode="layer_norm", + extractor_conv_layer_config=None, + extractor_conv_bias=True, + encoder_embed_dim=1024, + encoder_projection_dropout=encoder_projection_dropout, + encoder_pos_conv_kernel=128, + encoder_pos_conv_groups=16, + encoder_num_layers=24, + encoder_num_heads=16, + encoder_attention_dropout=encoder_attention_dropout, + encoder_ff_interm_features=4096, + encoder_ff_interm_dropout=encoder_ff_interm_dropout, + encoder_dropout=encoder_dropout, + encoder_layer_norm_first=True, + encoder_layer_drop=encoder_layer_drop, + aux_num_out=aux_num_out, + ) + + +def hubert_base( + encoder_projection_dropout: float = 0.1, + encoder_attention_dropout: float = 0.1, + encoder_ff_interm_dropout: float = 0.0, + encoder_dropout: float = 0.1, + encoder_layer_drop: float = 0.05, + aux_num_out: Optional[int] = None, +) -> Wav2Vec2Model: + """Builds "base" :class:`HuBERT ` from *HuBERT* :cite:`hsu2021hubert` + + Args: + encoder_projection_dropout (float): + See :py:func:`wav2vec2_model`. + encoder_attention_dropout (float): + See :py:func:`wav2vec2_model`. + encoder_ff_interm_dropout (float): + See :py:func:`wav2vec2_model`. + encoder_dropout (float): + See :py:func:`wav2vec2_model`. + encoder_layer_drop (float): + See :py:func:`wav2vec2_model`. + aux_num_out (int or None, optional): + See :py:func:`wav2vec2_model`. + + Returns: + Wav2Vec2Model: + The resulting model. + """ # noqa: E501 + return wav2vec2_model( + extractor_mode="group_norm", + extractor_conv_layer_config=None, + extractor_conv_bias=False, + encoder_embed_dim=768, + encoder_projection_dropout=encoder_projection_dropout, + encoder_pos_conv_kernel=128, + encoder_pos_conv_groups=16, + encoder_num_layers=12, + encoder_num_heads=12, + encoder_attention_dropout=encoder_attention_dropout, + encoder_ff_interm_features=3072, + encoder_ff_interm_dropout=encoder_ff_interm_dropout, + encoder_dropout=encoder_dropout, + encoder_layer_norm_first=False, + encoder_layer_drop=encoder_layer_drop, + aux_num_out=aux_num_out, + ) + + +def hubert_large( + encoder_projection_dropout: float = 0.0, + encoder_attention_dropout: float = 0.0, + encoder_ff_interm_dropout: float = 0.0, + encoder_dropout: float = 0.0, + encoder_layer_drop: float = 0.0, + aux_num_out: Optional[int] = None, +) -> Wav2Vec2Model: + """Builds "large" :class:`HuBERT ` from *HuBERT* :cite:`hsu2021hubert` + + Args: + encoder_projection_dropout (float): + See :py:func:`wav2vec2_model`. + encoder_attention_dropout (float): + See :py:func:`wav2vec2_model`. + encoder_ff_interm_dropout (float): + See :py:func:`wav2vec2_model`. + encoder_dropout (float): + See :py:func:`wav2vec2_model`. + encoder_layer_drop (float): + See :py:func:`wav2vec2_model`. + aux_num_out (int or None, optional): + See :py:func:`wav2vec2_model`. + + Returns: + Wav2Vec2Model: + The resulting model. + """ # noqa: E501 + return wav2vec2_model( + extractor_mode="layer_norm", + extractor_conv_layer_config=None, + extractor_conv_bias=False, + encoder_embed_dim=1024, + encoder_projection_dropout=encoder_projection_dropout, + encoder_pos_conv_kernel=128, + encoder_pos_conv_groups=16, + encoder_num_layers=24, + encoder_num_heads=16, + encoder_attention_dropout=encoder_attention_dropout, + encoder_ff_interm_features=4096, + encoder_ff_interm_dropout=encoder_ff_interm_dropout, + encoder_dropout=encoder_dropout, + encoder_layer_norm_first=True, + encoder_layer_drop=encoder_layer_drop, + aux_num_out=aux_num_out, + ) + + +def hubert_xlarge( + encoder_projection_dropout: float = 0.0, + encoder_attention_dropout: float = 0.0, + encoder_ff_interm_dropout: float = 0.0, + encoder_dropout: float = 0.0, + encoder_layer_drop: float = 0.0, + aux_num_out: Optional[int] = None, +) -> Wav2Vec2Model: + """Builds "extra large" :class:`HuBERT ` from *HuBERT* :cite:`hsu2021hubert` + + Args: + encoder_projection_dropout (float): + See :py:func:`wav2vec2_model`. + encoder_attention_dropout (float): + See :py:func:`wav2vec2_model`. + encoder_ff_interm_dropout (float): + See :py:func:`wav2vec2_model`. + encoder_dropout (float): + See :py:func:`wav2vec2_model`. + encoder_layer_drop (float): + See :py:func:`wav2vec2_model`. + aux_num_out (int or None, optional): + See :py:func:`wav2vec2_model`. + + Returns: + Wav2Vec2Model: + The resulting model. + """ # noqa: E501 + return wav2vec2_model( + extractor_mode="layer_norm", + extractor_conv_layer_config=None, + extractor_conv_bias=False, + encoder_embed_dim=1280, + encoder_projection_dropout=encoder_projection_dropout, + encoder_pos_conv_kernel=128, + encoder_pos_conv_groups=16, + encoder_num_layers=48, + encoder_num_heads=16, + encoder_attention_dropout=encoder_attention_dropout, + encoder_ff_interm_features=5120, + encoder_ff_interm_dropout=encoder_ff_interm_dropout, + encoder_dropout=encoder_dropout, + encoder_layer_norm_first=True, + encoder_layer_drop=encoder_layer_drop, + aux_num_out=aux_num_out, + ) + + +def _init_hubert_pretrain_model(module): + if isinstance(module, components.ConvLayerBlock): + torch.nn.init.kaiming_normal_(module.conv.weight) + elif isinstance(module, components.ConvolutionalPositionalEmbedding): + # normalize the weight to normal distribution. + std = math.sqrt(4.0 / (module.embed_dim * module.kernel_size)) + torch.nn.init.normal_(module.conv.weight, mean=0.0, std=std) + torch.nn.init.constant_(module.conv.bias, 0.0) + elif isinstance(module, components.SelfAttention): + # normalize the query, key, value, and out_proj parameters in self attention module. + torch.nn.init.xavier_uniform_(module.k_proj.weight, gain=1 / math.sqrt(2)) + torch.nn.init.xavier_uniform_(module.v_proj.weight, gain=1 / math.sqrt(2)) + torch.nn.init.xavier_uniform_(module.q_proj.weight, gain=1 / math.sqrt(2)) + torch.nn.init.xavier_uniform_(module.out_proj.weight) + torch.nn.init.constant_(module.out_proj.bias, 0.0) + elif isinstance(module, components.Transformer): + module.apply(components._init_transformer_params) + else: + pass + + +def hubert_pretrain_model( + extractor_mode: str, + extractor_conv_layer_config: Optional[List[Tuple[int, int, int]]], + extractor_conv_bias: bool, + encoder_embed_dim: int, + encoder_projection_dropout: float, + encoder_pos_conv_kernel: int, + encoder_pos_conv_groups: int, + encoder_num_layers: int, + encoder_num_heads: int, + encoder_attention_dropout: float, + encoder_ff_interm_features: int, + encoder_ff_interm_dropout: float, + encoder_dropout: float, + encoder_layer_norm_first: bool, + encoder_layer_drop: float, + mask_prob: float, + mask_selection: str, + mask_other: float, + mask_length: int, + no_mask_overlap: bool, + mask_min_space: int, + mask_channel_prob: float, + mask_channel_selection: str, + mask_channel_other: float, + mask_channel_length: int, + no_mask_channel_overlap: bool, + mask_channel_min_space: int, + skip_masked: bool, + skip_nomask: bool, + num_classes: int, + final_dim: int, + feature_grad_mult: Optional[float], +) -> HuBERTPretrainModel: + """Builds custom :class:`HuBERTPretrainModel` for training from scratch + + Note: + The "feature extractor" below corresponds to + `ConvFeatureExtractionModel `__ + in the original ``fairseq`` implementation. + This is referred as "(convolutional) feature encoder" in the *wav2vec 2.0* + :cite:`baevski2020wav2vec` paper. + + The "encoder" below corresponds to `TransformerEncoder `__, + and this is referred as "Transformer" in the paper. + + Args: + extractor_mode (str): Operation mode of feature extractor. + Valid values are ``"group_norm"`` or ``"layer_norm"``. + If ``"group_norm"``, then a single normalization is applied + in the first convolution block. Otherwise, all the convolution + blocks will have layer normalization. + + This option corresponds to ``extractor_mode`` from ``fairseq``. + + extractor_conv_layer_config (list of integer tuples or None): + Configuration of convolution layers in feature extractor. + List of convolution configuration, + i.e. ``[(output_channel, kernel_size, stride), ...]`` + + If ``None`` is provided, then the following default value is used. + + .. code-block:: python + + [ + (512, 10, 5), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 2, 2), + (512, 2, 2), + ] + + This option corresponds to ``conv_feature_layers`` from ``fairseq``. + + extractor_conv_bias (bool): + Whether to include bias term to each convolution operation. + + This option corresponds to ``conv_bias`` from ``fairseq``. + + encoder_embed_dim (int): + The dimension of embedding in encoder. + + This option corresponds to ``encoder_embed_dim`` from ``fairseq``. + + encoder_projection_dropout (float): + The dropout probability applied after the input feature is projected + to ``encoder_embed_dim``. + + This option corresponds to ``dropout_input`` from ``fairseq``. + + encoder_pos_conv_kernel (int): + The kernel size of convolutional positional embeddings. + + This option corresponds to ``conv_pos`` from ``fairseq``. + + encoder_pos_conv_groups (int): + The number of groups of convolutional positional embeddings. + + This option corresponds to ``conv_pos_groups`` from ``fairseq``. + + encoder_num_layers (int): + The number of self attention layers in transformer block. + + This option corresponds to ``encoder_layers`` from ``fairseq``. + + encoder_num_heads (int): + The number of heads in self attention layers. + + This option corresponds to ``encoder_attention_heads`` from ``fairseq``. + + encoder_attention_dropout (float): + The dropout probability applied after softmax in self-attention layer. + + This option corresponds to ``attention_dropout`` from ``fairseq``. + + encoder_ff_interm_features (int): + The dimension of hidden features in feed forward layer. + + This option corresponds to ``encoder_ffn_embed_dim`` from ``fairseq``. + + encoder_ff_interm_dropout (float): + The dropout probability applied in feedforward layer. + + This option correspinds to ``activation_dropout`` from ``fairseq``. + + encoder_dropout (float): + The dropout probability applied at the end of feed forward layer. + + This option corresponds to ``dropout`` from ``fairseq``. + + encoder_layer_norm_first (bool): + Control the order of layer norm in transformer layer and each encoder layer. + If True, in transformer layer, layer norm is applied before features are fed + to encoder layers. In encoder layer, two layer norms are applied before and after + self attention. + If False, in transformer layer, layer norm is applied after features are fed + to encoder layers. In encoder layer, two layer norms are applied after self + attention, before and after feed forward. + + This option corresponds to ``layer_norm_first`` from ``fairseq``. + + encoder_layer_drop (float): + Probability to drop each encoder layer during training. + + This option corresponds to ``layerdrop`` from ``fairseq``. + + mask_prob (float): + Probability for each token to be chosen as start of the span to be masked. this will be multiplied by + number of timesteps divided by length of mask span to mask approximately this percentage of all elements. + However due to overlaps, the actual number will be smaller (unless no_overlap is True). + + This option corresponds to ``mask_prob`` from ``fairseq``. + + mask_selection (str): + How to choose the mask length. Options: [``static``, ``uniform``, ``normal``, ``poisson``]. + + This option corresponds to ``mask_selection`` from ``fairseq``. + + mask_other (float): + Secondary mask argument (used for more complex distributions). + + This option corresponds to ``mask_other`` from ``fairseq``. + + mask_length (int): + The lengths of the mask. + + This option corresponds to ``mask_length`` from ``fairseq``. + + no_mask_overlap (bool): + Whether to allow masks to overlap. + + This option corresponds to ``no_mask_overlap`` from ``fairseq``. + + mask_min_space (int): + Minimum space between spans (if no overlap is enabled). + + This option corresponds to ``mask_min_space`` from ``fairseq``. + + mask_channel_prob: (float): + The probability of replacing a feature with 0. + + This option corresponds to ``mask_channel_prob`` from ``fairseq``. + + mask_channel_selection (str): + How to choose the mask length for channel masking. Options: [``static``, ``uniform``, ``normal``, ``poisson``]. + + This option corresponds to ``mask_channel_selection`` from ``fairseq``. + + mask_channel_other (float): + Secondary mask argument for channel masking(used for more complex distributions). + + This option corresponds to ``mask_channel_other`` from ``fairseq``. + + mask_channel_length (int): + Minimum space between spans (if no overlap is enabled) for channel masking. + + This option corresponds to ``mask_channel_length`` from ``fairseq``. + + no_mask_channel_overlap (bool): + Whether to allow channel masks to overlap. + + This option corresponds to ``no_mask_channel_overlap`` from ``fairseq``. + + mask_channel_min_space (int): + Minimum space between spans for channel masking(if no overlap is enabled). + + This option corresponds to ``mask_channel_min_space`` from ``fairseq``. + + skip_masked (bool): + If True, skip computing losses over masked frames. + + This option corresponds to ``skip_masked`` from ``fairseq``. + + skip_nomask (bool): + If True, skip computing losses over unmasked frames. + + This option corresponds to ``skip_nomask`` from ``fairseq``. + + num_classes (int): + The number of classes in the labels. + + final_dim (int): + Project final representations and targets to `final_dim`. + + This option corresponds to ``final_dim`` from ``fairseq``. + + feature_grad_mult (float or None): + The factor to scale the convolutional feature extraction layer gradients by. + The scale factor will not affect the forward pass. + + This option corresponds to ``feature_grad_mult`` from ``fairseq``. + + Returns: + HuBERTPretrainModel: + The resulting model. + """ # noqa: E501 + if extractor_conv_layer_config is None: + extractor_conv_layer_config = [(512, 10, 5)] + [(512, 3, 2)] * 4 + [(512, 2, 2)] * 2 + + feature_extractor = components._get_feature_extractor( + extractor_mode, extractor_conv_layer_config, extractor_conv_bias + ) + encoder = components._get_encoder( + in_features=extractor_conv_layer_config[-1][0], + embed_dim=encoder_embed_dim, + dropout_input=encoder_projection_dropout, + pos_conv_kernel=encoder_pos_conv_kernel, + pos_conv_groups=encoder_pos_conv_groups, + num_layers=encoder_num_layers, + num_heads=encoder_num_heads, + attention_dropout=encoder_attention_dropout, + ff_interm_features=encoder_ff_interm_features, + ff_interm_dropout=encoder_ff_interm_dropout, + dropout=encoder_dropout, + layer_norm_first=encoder_layer_norm_first, + layer_drop=encoder_layer_drop, + ) + wav2vec2 = Wav2Vec2Model(feature_extractor, encoder) + mask_generator = components.MaskGenerator( + encoder_embed_dim, + mask_prob, + mask_selection, + mask_other, + mask_length, + no_mask_overlap, + mask_min_space, + mask_channel_prob, + mask_channel_selection, + mask_channel_other, + mask_channel_length, + no_mask_channel_overlap, + mask_channel_min_space, + ) + logit_generator = components.LogitGenerator( + encoder_embed_dim, + num_classes, + final_dim, + skip_masked, + skip_nomask, + ) + model = HuBERTPretrainModel( + wav2vec2=wav2vec2, + mask_generator=mask_generator, + logit_generator=logit_generator, + feature_grad_mult=feature_grad_mult, + ) + # initialize the model for pre-training + model.apply(_init_hubert_pretrain_model) + return model + + +def hubert_pretrain_base( + encoder_projection_dropout: float = 0.1, + encoder_attention_dropout: float = 0.1, + encoder_ff_interm_dropout: float = 0.0, + encoder_dropout: float = 0.1, + encoder_layer_drop: float = 0.05, + mask_prob: float = 0.8, + mask_channel_prob: float = 0.0, + mask_channel_length: int = 10, + feature_grad_mult: Optional[float] = 0.1, + num_classes: int = 100, +) -> HuBERTPretrainModel: + """Builds "base" :class:`HuBERTPretrainModel` from *HuBERT* :cite:`hsu2021hubert` for pretraining. + + Args: + encoder_projection_dropout (float): + See :py:func:`hubert_pretrain_model`. + encoder_attention_dropout (float): + See :py:func:`hubert_pretrain_model`. + encoder_ff_interm_dropout (float): + See :py:func:`hubert_pretrain_model`. + encoder_dropout (float): + See :py:func:`hubert_pretrain_model`. + encoder_layer_drop (float): + See :py:func:`hubert_pretrain_model`. + mask_prob (float): + See :py:func:`hubert_pretrain_model`. + mask_channel_prob (float): + See :py:func:`hubert_pretrain_model`. + mask_channel_length (int): + See :py:func:`hubert_pretrain_model`. + feature_grad_mult (float or None): + See :py:func:`hubert_pretrain_model`. + num_classes (int, optional): + See :py:func:`hubert_pretrain_model`. + + Returns: + HuBERTPretrainModel: + The resulting model. + """ # noqa: E501 + return hubert_pretrain_model( + extractor_mode="group_norm", + extractor_conv_layer_config=None, + extractor_conv_bias=False, + encoder_embed_dim=768, + encoder_projection_dropout=encoder_projection_dropout, + encoder_pos_conv_kernel=128, + encoder_pos_conv_groups=16, + encoder_num_layers=12, + encoder_num_heads=12, + encoder_attention_dropout=encoder_attention_dropout, + encoder_ff_interm_features=3072, + encoder_ff_interm_dropout=encoder_ff_interm_dropout, + encoder_dropout=encoder_dropout, + encoder_layer_norm_first=False, + encoder_layer_drop=encoder_layer_drop, + mask_prob=mask_prob, + mask_selection="static", + mask_other=0.0, + mask_length=10, + no_mask_overlap=False, + mask_min_space=1, + mask_channel_prob=mask_channel_prob, + mask_channel_selection="static", + mask_channel_other=0.0, + mask_channel_length=mask_channel_length, + no_mask_channel_overlap=False, + mask_channel_min_space=1, + skip_masked=False, + skip_nomask=False, + num_classes=num_classes, + final_dim=256, + feature_grad_mult=feature_grad_mult, + ) + + +def hubert_pretrain_large( + encoder_projection_dropout: float = 0.0, + encoder_attention_dropout: float = 0.0, + encoder_ff_interm_dropout: float = 0.0, + encoder_dropout: float = 0.0, + encoder_layer_drop: float = 0.0, + mask_prob: float = 0.8, + mask_channel_prob: float = 0.0, + mask_channel_length: int = 10, + feature_grad_mult: Optional[float] = None, +) -> HuBERTPretrainModel: + """Builds "large" :class:`HuBERTPretrainModel` from *HuBERT* :cite:`hsu2021hubert` for pretraining. + + Args: + encoder_projection_dropout (float): + See :py:func:`hubert_pretrain_model`. + encoder_attention_dropout (float): + See :py:func:`hubert_pretrain_model`. + encoder_ff_interm_dropout (float): + See :py:func:`hubert_pretrain_model`. + encoder_dropout (float): + See :py:func:`hubert_pretrain_model`. + encoder_layer_drop (float): + See :py:func:`hubert_pretrain_model`. + mask_prob (float): + See :py:func:`hubert_pretrain_model`. + mask_channel_prob (float): + See :py:func:`hubert_pretrain_model`. + mask_channel_length (int): + See :py:func:`hubert_pretrain_model`. + feature_grad_mult (float or None): + See :py:func:`hubert_pretrain_model`. + + Returns: + HuBERTPretrainModel: + The resulting model. + """ # noqa: E501 + return hubert_pretrain_model( + extractor_mode="layer_norm", + extractor_conv_layer_config=None, + extractor_conv_bias=False, + encoder_embed_dim=1024, + encoder_projection_dropout=encoder_projection_dropout, + encoder_pos_conv_kernel=128, + encoder_pos_conv_groups=16, + encoder_num_layers=24, + encoder_num_heads=16, + encoder_attention_dropout=encoder_attention_dropout, + encoder_ff_interm_features=4096, + encoder_ff_interm_dropout=encoder_ff_interm_dropout, + encoder_dropout=encoder_dropout, + encoder_layer_norm_first=True, + encoder_layer_drop=encoder_layer_drop, + mask_prob=mask_prob, + mask_selection="static", + mask_other=0.0, + mask_length=10, + no_mask_overlap=False, + mask_min_space=1, + mask_channel_prob=mask_channel_prob, + mask_channel_selection="static", + mask_channel_other=0.0, + mask_channel_length=mask_channel_length, + no_mask_channel_overlap=False, + mask_channel_min_space=1, + skip_masked=False, + skip_nomask=False, + num_classes=500, + final_dim=768, + feature_grad_mult=feature_grad_mult, + ) + + +def hubert_pretrain_xlarge( + encoder_projection_dropout: float = 0.0, + encoder_attention_dropout: float = 0.0, + encoder_ff_interm_dropout: float = 0.0, + encoder_dropout: float = 0.0, + encoder_layer_drop: float = 0.0, + mask_prob: float = 0.8, + mask_channel_prob: float = 0.0, + mask_channel_length: int = 10, + feature_grad_mult: Optional[float] = None, +) -> HuBERTPretrainModel: + """Builds "extra large" :class:`HuBERTPretrainModel` from *HuBERT* :cite:`hsu2021hubert` for pretraining. + + Args: + encoder_projection_dropout (float): + See :py:func:`hubert_pretrain_model`. + encoder_attention_dropout (float): + See :py:func:`hubert_pretrain_model`. + encoder_ff_interm_dropout (float): + See :py:func:`hubert_pretrain_model`. + encoder_dropout (float): + See :py:func:`hubert_pretrain_model`. + encoder_layer_drop (float): + See :py:func:`hubert_pretrain_model`. + mask_prob (float): + See :py:func:`hubert_pretrain_model`. + mask_channel_prob (float): + See :py:func:`hubert_pretrain_model`. + mask_channel_length (int): + See :py:func:`hubert_pretrain_model`. + feature_grad_mult (float or None): + See :py:func:`hubert_pretrain_model`. + + Returns: + HuBERTPretrainModel: + The resulting model. + """ # noqa: E501 + return hubert_pretrain_model( + extractor_mode="layer_norm", + extractor_conv_layer_config=None, + extractor_conv_bias=False, + encoder_embed_dim=1280, + encoder_projection_dropout=encoder_projection_dropout, + encoder_pos_conv_kernel=128, + encoder_pos_conv_groups=16, + encoder_num_layers=48, + encoder_num_heads=16, + encoder_attention_dropout=encoder_attention_dropout, + encoder_ff_interm_features=5120, + encoder_ff_interm_dropout=encoder_ff_interm_dropout, + encoder_dropout=encoder_dropout, + encoder_layer_norm_first=True, + encoder_layer_drop=encoder_layer_drop, + mask_prob=mask_prob, + mask_selection="static", + mask_other=0.0, + mask_length=10, + no_mask_overlap=False, + mask_min_space=1, + mask_channel_prob=mask_channel_prob, + mask_channel_selection="static", + mask_channel_other=0.0, + mask_channel_length=mask_channel_length, + no_mask_channel_overlap=False, + mask_channel_min_space=1, + skip_masked=False, + skip_nomask=False, + num_classes=500, + final_dim=1024, + feature_grad_mult=feature_grad_mult, + ) + + +def wavlm_model( + extractor_mode: str, + extractor_conv_layer_config: Optional[List[Tuple[int, int, int]]], + extractor_conv_bias: bool, + encoder_embed_dim: int, + encoder_projection_dropout: float, + encoder_pos_conv_kernel: int, + encoder_pos_conv_groups: int, + encoder_num_layers: int, + encoder_num_heads: int, + encoder_num_buckets: int, + encoder_max_distance: int, + encoder_attention_dropout: float, + encoder_ff_interm_features: int, + encoder_ff_interm_dropout: float, + encoder_dropout: float, + encoder_layer_norm_first: bool, + encoder_layer_drop: float, + aux_num_out: Optional[int], +) -> Wav2Vec2Model: + """Builds custom WaveLM model :cite:`chen2022wavlm`. The architecture is compatible + with Wav2Vec2 model :cite:`baevski2020wav2vec`, and so the output object is + :class:`~torchaudio.models.Wav2Vec2Model`. Most of the arguments have the same meaning + as in :py:func:`~torchaudio.models.wav2vec2_model` so please refer there for documentation. + + Args: + extractor_mode (str): Operation mode of feature extractor. + See :py:func:`~torchaudio.models.wav2vec2_model`. + + extractor_conv_layer_config (list of integer tuples or None): + See :py:func:`~torchaudio.models.wav2vec2_model`. + + extractor_conv_bias (bool): + See :py:func:`~torchaudio.models.wav2vec2_model`. + + encoder_embed_dim (int): + See :py:func:`~torchaudio.models.wav2vec2_model`. + + encoder_projection_dropout (float): + See :py:func:`~torchaudio.models.wav2vec2_model`. + + encoder_pos_conv_kernel (int): + See :py:func:`~torchaudio.models.wav2vec2_model`. + + encoder_pos_conv_groups (int): + See :py:func:`~torchaudio.models.wav2vec2_model`. + + encoder_num_layers (int): + See :py:func:`~torchaudio.models.wav2vec2_model`. + + encoder_num_heads (int): + See :py:func:`~torchaudio.models.wav2vec2_model`. + + encoder_num_buckets (int): + Number of buckets for relative position embedding. + encoder_max_distance (int): + Maximum distance for relative position embedding. + + encoder_attention_dropout (float): + See :py:func:`~torchaudio.models.wav2vec2_model`. + + encoder_ff_interm_features (int): + See :py:func:`~torchaudio.models.wav2vec2_model`. + + encoder_ff_interm_dropout (float): + See :py:func:`~torchaudio.models.wav2vec2_model`. + + encoder_dropout (float): + See :py:func:`~torchaudio.models.wav2vec2_model`. + + encoder_layer_norm_first (bool): + See :py:func:`~torchaudio.models.wav2vec2_model`. + + encoder_layer_drop (float): + See :py:func:`~torchaudio.models.wav2vec2_model`. + + aux_num_out (int or None): + See :py:func:`~torchaudio.models.wav2vec2_model`. + + Returns: + Wav2Vec2Model: + The resulting model. + """ + if extractor_conv_layer_config is None: + extractor_conv_layer_config = [(512, 10, 5)] + [(512, 3, 2)] * 4 + [(512, 2, 2)] * 2 + + feature_extractor = components._get_feature_extractor( + extractor_mode, extractor_conv_layer_config, extractor_conv_bias + ) + encoder = components._get_wavlm_encoder( + in_features=extractor_conv_layer_config[-1][0], + embed_dim=encoder_embed_dim, + dropout_input=encoder_projection_dropout, + pos_conv_kernel=encoder_pos_conv_kernel, + pos_conv_groups=encoder_pos_conv_groups, + num_layers=encoder_num_layers, + num_heads=encoder_num_heads, + num_buckets=encoder_num_buckets, + max_distance=encoder_max_distance, + attention_dropout=encoder_attention_dropout, + ff_interm_features=encoder_ff_interm_features, + ff_interm_dropout=encoder_ff_interm_dropout, + dropout=encoder_dropout, + layer_norm_first=encoder_layer_norm_first, + layer_drop=encoder_layer_drop, + ) + aux = None + if aux_num_out is not None: + aux = torch.nn.Linear(in_features=encoder_embed_dim, out_features=aux_num_out) + return Wav2Vec2Model(feature_extractor, encoder, aux) + + +def wavlm_base( + encoder_projection_dropout: float = 0.1, + encoder_attention_dropout: float = 0.1, + encoder_ff_interm_dropout: float = 0.1, + encoder_dropout: float = 0.1, + encoder_layer_drop: float = 0.1, + aux_num_out: Optional[int] = None, +) -> Wav2Vec2Model: + """Builds "base" WaveLM model :cite:`chen2022wavlm`. The architecture is compatible + with Wav2Vec2 model :cite:`baevski2020wav2vec`, and so the output class is + :class:`~torchaudio.models.Wav2Vec2Model`. + + Args: + encoder_projection_dropout (float): + See :py:func:`~torchaudio.models.wav2vec2_model`. + encoder_attention_dropout (float): + See :py:func:`~torchaudio.models.wav2vec2_model`. + encoder_ff_interm_dropout (float): + See :py:func:`~torchaudio.models.wav2vec2_model`. + encoder_dropout (float): + See :py:func:`~torchaudio.models.wav2vec2_model`. + encoder_layer_drop (float): + See :py:func:`~torchaudio.models.wav2vec2_model`. + aux_num_out (int, optional): + See :py:func:`~torchaudio.models.wav2vec2_model`. + + Returns: + Wav2Vec2Model: + The resulting model. + """ + return wavlm_model( + extractor_mode="group_norm", + extractor_conv_layer_config=None, + extractor_conv_bias=False, + encoder_embed_dim=768, + encoder_projection_dropout=encoder_projection_dropout, + encoder_pos_conv_kernel=128, + encoder_pos_conv_groups=16, + encoder_num_layers=12, + encoder_num_heads=12, + encoder_num_buckets=320, + encoder_max_distance=800, + encoder_attention_dropout=encoder_attention_dropout, + encoder_ff_interm_features=3072, + encoder_ff_interm_dropout=encoder_ff_interm_dropout, + encoder_dropout=encoder_dropout, + encoder_layer_norm_first=False, + encoder_layer_drop=encoder_layer_drop, + aux_num_out=aux_num_out, + ) + + +def wavlm_large( + encoder_projection_dropout: float = 0.1, + encoder_attention_dropout: float = 0.1, + encoder_ff_interm_dropout: float = 0.0, + encoder_dropout: float = 0.1, + encoder_layer_drop: float = 0.1, + aux_num_out: Optional[int] = None, +) -> Wav2Vec2Model: + """Builds "large" WaveLM model :cite:`chen2022wavlm`. The architecture is compatible + with Wav2Vec2 model :cite:`baevski2020wav2vec`, and so the output class is + :class:`~torchaudio.models.Wav2Vec2Model`. + + Args: + encoder_projection_dropout (float): + See :py:func:`~torchaudio.models.wav2vec2_model`. + encoder_attention_dropout (float): + See :py:func:`~torchaudio.models.wav2vec2_model`. + encoder_ff_interm_dropout (float): + See :py:func:`~torchaudio.models.wav2vec2_model`. + encoder_dropout (float): + See :py:func:`~torchaudio.models.wav2vec2_model`. + encoder_layer_drop (float): + See :py:func:`~torchaudio.models.wav2vec2_model`. + aux_num_out (int, optional): + See :py:func:`~torchaudio.models.wav2vec2_model`. + + Returns: + Wav2Vec2Model: + The resulting model. + """ + return wavlm_model( + extractor_mode="layer_norm", + extractor_conv_layer_config=None, + extractor_conv_bias=False, + encoder_embed_dim=1024, + encoder_projection_dropout=encoder_projection_dropout, + encoder_pos_conv_kernel=128, + encoder_pos_conv_groups=16, + encoder_num_layers=24, + encoder_num_heads=16, + encoder_num_buckets=320, + encoder_max_distance=800, + encoder_attention_dropout=encoder_attention_dropout, + encoder_ff_interm_features=4096, + encoder_ff_interm_dropout=encoder_ff_interm_dropout, + encoder_dropout=encoder_dropout, + encoder_layer_norm_first=True, + encoder_layer_drop=encoder_layer_drop, + aux_num_out=aux_num_out, + ) + + +def wav2vec2_xlsr_300m( + encoder_projection_dropout: float = 0.0, + encoder_attention_dropout: float = 0.0, + encoder_ff_interm_dropout: float = 0.0, + encoder_dropout: float = 0.0, + encoder_layer_drop: float = 0.0, + aux_num_out: Optional[int] = None, +) -> Wav2Vec2Model: + """Builds XLS-R model :cite:`babu2021xls` with 300 millions of parameters. The architecture is compatible + with Wav2Vec2 model :cite:`baevski2020wav2vec`, and so the output class is + :class:`~torchaudio.models.Wav2Vec2Model`. + + Args: + encoder_projection_dropout (float): + See :py:func:`~torchaudio.models.wav2vec2_model`. + encoder_attention_dropout (float): + See :py:func:`~torchaudio.models.wav2vec2_model`. + encoder_ff_interm_dropout (float): + See :py:func:`~torchaudio.models.wav2vec2_model`. + encoder_dropout (float): + See :py:func:`~torchaudio.models.wav2vec2_model`. + encoder_layer_drop (float): + See :py:func:`~torchaudio.models.wav2vec2_model`. + aux_num_out (int, optional): + See :py:func:`~torchaudio.models.wav2vec2_model`. + + Returns: + Wav2Vec2Model: + The resulting model. + """ + return wav2vec2_model( + extractor_mode="layer_norm", + extractor_conv_layer_config=None, + extractor_conv_bias=True, + encoder_embed_dim=1024, + encoder_projection_dropout=encoder_projection_dropout, + encoder_pos_conv_kernel=128, + encoder_pos_conv_groups=16, + encoder_num_layers=24, + encoder_num_heads=16, + encoder_attention_dropout=encoder_attention_dropout, + encoder_ff_interm_features=4096, + encoder_ff_interm_dropout=encoder_ff_interm_dropout, + encoder_dropout=encoder_dropout, + encoder_layer_norm_first=True, + encoder_layer_drop=encoder_layer_drop, + aux_num_out=aux_num_out, + ) + + +def wav2vec2_xlsr_1b( + encoder_projection_dropout: float = 0.1, + encoder_attention_dropout: float = 0.0, + encoder_ff_interm_dropout: float = 0.0, + encoder_dropout: float = 0.0, + encoder_layer_drop: float = 0.0, + aux_num_out: Optional[int] = None, +) -> Wav2Vec2Model: + """Builds XLS-R model :cite:`babu2021xls` with 1 billion of parameters. The architecture is compatible + with Wav2Vec2 model :cite:`baevski2020wav2vec`, and so the output class is + :class:`~torchaudio.models.Wav2Vec2Model`. + + Args: + encoder_projection_dropout (float): + See :py:func:`~torchaudio.models.wav2vec2_model`. + encoder_attention_dropout (float): + See :py:func:`~torchaudio.models.wav2vec2_model`. + encoder_ff_interm_dropout (float): + See :py:func:`~torchaudio.models.wav2vec2_model`. + encoder_dropout (float): + See :py:func:`~torchaudio.models.wav2vec2_model`. + encoder_layer_drop (float): + See :py:func:`~torchaudio.models.wav2vec2_model`. + aux_num_out (int, optional): + See :py:func:`~torchaudio.models.wav2vec2_model`. + + Returns: + Wav2Vec2Model: + The resulting model. + """ + return wav2vec2_model( + extractor_mode="layer_norm", + extractor_conv_layer_config=None, + extractor_conv_bias=True, + encoder_embed_dim=1280, + encoder_projection_dropout=encoder_projection_dropout, + encoder_pos_conv_kernel=128, + encoder_pos_conv_groups=16, + encoder_num_layers=48, + encoder_num_heads=16, + encoder_attention_dropout=encoder_attention_dropout, + encoder_ff_interm_features=5120, + encoder_ff_interm_dropout=encoder_ff_interm_dropout, + encoder_dropout=encoder_dropout, + encoder_layer_norm_first=True, + encoder_layer_drop=encoder_layer_drop, + aux_num_out=aux_num_out, + ) + + +def wav2vec2_xlsr_2b( + encoder_projection_dropout: float = 0.1, + encoder_attention_dropout: float = 0.0, + encoder_ff_interm_dropout: float = 0.0, + encoder_dropout: float = 0.0, + encoder_layer_drop: float = 0.0, + aux_num_out: Optional[int] = None, +) -> Wav2Vec2Model: + """Builds XLS-R model :cite:`babu2021xls` with 2 billions of parameters. The architecture is compatible + with Wav2Vec2 model :cite:`baevski2020wav2vec`, and so the output class is + :class:`~torchaudio.models.Wav2Vec2Model`. + + Args: + encoder_projection_dropout (float): + See :py:func:`~torchaudio.models.wav2vec2_model`. + encoder_attention_dropout (float): + See :py:func:`~torchaudio.models.wav2vec2_model`. + encoder_ff_interm_dropout (float): + See :py:func:`~torchaudio.models.wav2vec2_model`. + encoder_dropout (float): + See :py:func:`~torchaudio.models.wav2vec2_model`. + encoder_layer_drop (float): + See :py:func:`~torchaudio.models.wav2vec2_model`. + aux_num_out (int, optional): + See :py:func:`~torchaudio.models.wav2vec2_model`. + + Returns: + Wav2Vec2Model: + The resulting model. + """ + return wav2vec2_model( + extractor_mode="layer_norm", + extractor_conv_layer_config=None, + extractor_conv_bias=True, + encoder_embed_dim=1920, + encoder_projection_dropout=encoder_projection_dropout, + encoder_pos_conv_kernel=128, + encoder_pos_conv_groups=16, + encoder_num_layers=48, + encoder_num_heads=16, + encoder_attention_dropout=encoder_attention_dropout, + encoder_ff_interm_features=7680, + encoder_ff_interm_dropout=encoder_ff_interm_dropout, + encoder_dropout=encoder_dropout, + encoder_layer_norm_first=True, + encoder_layer_drop=encoder_layer_drop, + aux_num_out=aux_num_out, + ) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/wav2vec2/utils/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/wav2vec2/utils/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0457b5dd707f7216adc3ea919ba8e257d86f4f71 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/wav2vec2/utils/__init__.py @@ -0,0 +1,7 @@ +from .import_fairseq import import_fairseq_model +from .import_huggingface import import_huggingface_model + +__all__ = [ + "import_huggingface_model", + "import_fairseq_model", +] diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/wav2vec2/utils/import_fairseq.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/wav2vec2/utils/import_fairseq.py new file mode 100644 index 0000000000000000000000000000000000000000..39791e9b7d75ac3c2eb1fcf4f9c3517e7483048c --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/wav2vec2/utils/import_fairseq.py @@ -0,0 +1,213 @@ +"""Import fariseq's wav2vec2.0 pretrained weights to torchaudios's format. + +For this module to work, you need `fairseq`. +""" +import re + +from torch.nn import Module + +from ..model import wav2vec2_model, Wav2Vec2Model + + +def _parse_config(w2v_model): + encoder = w2v_model.encoder + conv_layers = w2v_model.feature_extractor.conv_layers + + extractor_mode = "layer_norm" + if "GroupNorm" in conv_layers[0][2].__class__.__name__: + extractor_mode = "group_norm" + else: + extractor_mode = "layer_norm" + + conv_layer_config = [(l[0].out_channels, l[0].kernel_size[0], l[0].stride[0]) for l in conv_layers] + + if all(l[0].bias is None for l in conv_layers): + conv_bias = False + elif all(l[0].bias is not None for l in conv_layers): + conv_bias = True + else: + raise ValueError("Either all the convolutions layers have bias term or none of them should.") + + config = { + "extractor_mode": extractor_mode, + "extractor_conv_layer_config": conv_layer_config, + "extractor_conv_bias": conv_bias, + "encoder_embed_dim": w2v_model.post_extract_proj.out_features, + "encoder_projection_dropout": w2v_model.dropout_input.p, + "encoder_pos_conv_kernel": encoder.pos_conv[0].kernel_size[0], + "encoder_pos_conv_groups": encoder.pos_conv[0].groups, + "encoder_num_layers": len(encoder.layers), + "encoder_num_heads": encoder.layers[0].self_attn.num_heads, + "encoder_attention_dropout": encoder.layers[0].self_attn.dropout_module.p, + "encoder_ff_interm_features": encoder.layers[0].fc1.out_features, + "encoder_ff_interm_dropout": encoder.layers[0].dropout2.p, + "encoder_dropout": encoder.layers[0].dropout3.p, + "encoder_layer_norm_first": encoder.layer_norm_first, + "encoder_layer_drop": encoder.layerdrop, + } + return config + + +def _map_key(key): + key_ = key + if key.startswith("w2v_model."): + key = key.replace("w2v_model.", "") + if re.match(r"(mask_emb|quantizer|project_q|final_proj|mask_emb)", key): + return None + # Feature Extractor + # Group norm when "extractor_mode" is "default". + # (Only the first layer) + # "conv_layers.0.2.weight" -> "conv_layers.0.layer_norm.weight" + # "conv_layers.0.2.bias" -> "conv_layers.0.layer_norm.bias" + match = re.match(r"feature_extractor\.conv_layers\.0\.2\.(weight|bias)", key) + if match: + return f"feature_extractor.conv_layers.0.layer_norm.{match.group(1)}" + # Convolutions + # "conv_layers.X.0.weight" -> "conv_layers.X.conv.weight" + # "conv_layers.X.0.bias" -> "conv_layers.X.conv.bias" + match = re.match(r"feature_extractor\.conv_layers\.(\d+)\.0\.(weight|bias)", key) + if match: + return f"feature_extractor.conv_layers.{match.group(1)}.conv.{match.group(2)}" + # Layer norm when "extractor_mode" is "layer_norm". + # "conv_layers.X.2.1.weight" -> "conv_layers.X.layer_norm.weight" + # "conv_layers.X.2.1.bias" -> "conv_layers.X.layer_norm.bias" + match = re.match(r"feature_extractor\.conv_layers\.(\d+)\.2\.1\.(weight|bias)", key) + if match: + return f"feature_extractor.conv_layers.{match.group(1)}.layer_norm.{match.group(2)}" + match = re.match(r"post_extract_proj\.(weight|bias)", key) + # Encoder - Feature projection + if match: + return f"encoder.feature_projection.projection.{match.group(1)}" + match = re.match(r"layer_norm\.(weight|bias)", key) + if match: + return f"encoder.feature_projection.layer_norm.{match.group(1)}" + # Encoder - Transformer - Convolutional positional embedding + match = re.match(r"encoder\.pos_conv\.0\.(bias|weight_g|weight_v)", key) + if match: + return f"encoder.transformer.pos_conv_embed.conv.{match.group(1)}" + match = re.match(r"encoder\.layer_norm\.(weight|bias)", key) + if match: + return f"encoder.transformer.layer_norm.{match.group(1)}" + # Encoder - Transformer - Self attention layers + match = re.match(r"encoder\.layers\.(\d+)\.self_attn\.((k_|v_|q_|out_)proj\.(weight|bias))", key) + if match: + return f"encoder.transformer.layers.{match.group(1)}.attention.{match.group(2)}" + match = re.match(r"encoder\.layers\.(\d+)\.self_attn_layer_norm\.(weight|bias)", key) + if match: + return f"encoder.transformer.layers.{match.group(1)}.layer_norm.{match.group(2)}" + match = re.match(r"encoder\.layers\.(\d+)\.fc1\.(weight|bias)", key) + if match: + return f"encoder.transformer.layers.{match.group(1)}.feed_forward.intermediate_dense.{match.group(2)}" + match = re.match(r"encoder\.layers\.(\d+)\.fc2\.(weight|bias)", key) + if match: + return f"encoder.transformer.layers.{match.group(1)}.feed_forward.output_dense.{match.group(2)}" + match = re.match(r"encoder\.layers\.(\d+)\.final_layer_norm\.(weight|bias)", key) + if match: + return f"encoder.transformer.layers.{match.group(1)}.final_layer_norm.{match.group(2)}" + match = re.match(r"proj\.(weight|bias)", key) + # Auxiliary Module + # Only relevant when loading fine-tuned models + if match: + return f"aux.{match.group(1)}" + # HuBERT Extension + if key in ["label_embs_concat"]: + return key + raise ValueError(f"Unexpected key: {key_}") + + +def _convert_state_dict(state_dict): + converted = {} + for k, v in state_dict.items(): + k = _map_key(k) + if k is not None: + converted[k] = v + return converted + + +def import_fairseq_model(original: Module) -> Wav2Vec2Model: + """Builds :class:`Wav2Vec2Model` from the corresponding model object of + `fairseq `_. + + Args: + original (torch.nn.Module): + An instance of fairseq's Wav2Vec2.0 or HuBERT model. + One of ``fairseq.models.wav2vec.wav2vec2_asr.Wav2VecEncoder``, + ``fairseq.models.wav2vec.wav2vec2.Wav2Vec2Model`` or + ``fairseq.models.hubert.hubert_asr.HubertEncoder``. + + Returns: + Wav2Vec2Model: Imported model. + + Example - Loading pretrain-only model + >>> from torchaudio.models.wav2vec2.utils import import_fairseq_model + >>> + >>> # Load model using fairseq + >>> model_file = 'wav2vec_small.pt' + >>> model, _, _ = fairseq.checkpoint_utils.load_model_ensemble_and_task([model_file]) + >>> original = model[0] + >>> imported = import_fairseq_model(original) + >>> + >>> # Perform feature extraction + >>> waveform, _ = torchaudio.load('audio.wav') + >>> features, _ = imported.extract_features(waveform) + >>> + >>> # Compare result with the original model from fairseq + >>> reference = original.feature_extractor(waveform).transpose(1, 2) + >>> torch.testing.assert_allclose(features, reference) + + Example - Fine-tuned model + >>> from torchaudio.models.wav2vec2.utils import import_fairseq_model + >>> + >>> # Load model using fairseq + >>> model_file = 'wav2vec_small_960h.pt' + >>> model, _, _ = fairseq.checkpoint_utils.load_model_ensemble_and_task([model_file]) + >>> original = model[0] + >>> imported = import_fairseq_model(original.w2v_encoder) + >>> + >>> # Perform encoding + >>> waveform, _ = torchaudio.load('audio.wav') + >>> emission, _ = imported(waveform) + >>> + >>> # Compare result with the original model from fairseq + >>> mask = torch.zeros_like(waveform) + >>> reference = original(waveform, mask)['encoder_out'].transpose(0, 1) + >>> torch.testing.assert_allclose(emission, reference) + """ + class_ = original.__class__.__name__ + if class_ == "Wav2Vec2Model": + return _import_wav2vec2_pretraining(original) + if class_ == "Wav2VecEncoder": + return _import_wav2vec2_finetuning(original) + if class_ == "HubertModel": + return _import_hubert_pretraining(original) + if class_ == "HubertEncoder": + return _import_hubert_finetuning(original) + raise ValueError(f"Expected an instance of `Wav2Vec2Model` or `Wav2VecEncoder`. Found: {class_}") + + +def _import_wav2vec2_finetuning(original: Module) -> Wav2Vec2Model: + config = _parse_config(original.w2v_model) + model = wav2vec2_model(**config, aux_num_out=original.proj.out_features) + model.load_state_dict(_convert_state_dict(original.state_dict())) + return model + + +def _import_wav2vec2_pretraining(original: Module) -> Wav2Vec2Model: + config = _parse_config(original) + model = wav2vec2_model(**config, aux_num_out=None) + model.load_state_dict(_convert_state_dict(original.state_dict()), strict=False) + return model + + +def _import_hubert_finetuning(original: Module) -> Wav2Vec2Model: + config = _parse_config(original.w2v_model) + model = wav2vec2_model(**config, aux_num_out=original.proj.out_features) + model.load_state_dict(_convert_state_dict(original.state_dict()), strict=False) + return model + + +def _import_hubert_pretraining(original: Module) -> Wav2Vec2Model: + config = _parse_config(original) + model = wav2vec2_model(**config, aux_num_out=None) + model.load_state_dict(_convert_state_dict(original.state_dict()), strict=False) + return model diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/wav2vec2/utils/import_huggingface.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/wav2vec2/utils/import_huggingface.py new file mode 100644 index 0000000000000000000000000000000000000000..519d8c919f02be62b2f2e2aa0dd8db97222430d5 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/wav2vec2/utils/import_huggingface.py @@ -0,0 +1,134 @@ +"""Import Hugging Face transformers's wav2vec2.0 pretrained weights to torchaudios's format. +""" +import logging +from typing import Any, Dict + +import torch +from torch.nn import Module + +from ..model import wav2vec2_model, Wav2Vec2Model, wavlm_model + +_LG = logging.getLogger(__name__) + + +def _get_config(cfg): + config = { + "extractor_mode": f"{cfg.feat_extract_norm}_norm", + "extractor_conv_layer_config": list(zip(cfg.conv_dim, cfg.conv_kernel, cfg.conv_stride)), + "extractor_conv_bias": cfg.conv_bias, + "encoder_embed_dim": cfg.hidden_size, + "encoder_projection_dropout": cfg.feat_proj_dropout, + "encoder_pos_conv_kernel": cfg.num_conv_pos_embeddings, + "encoder_pos_conv_groups": cfg.num_conv_pos_embedding_groups, + "encoder_num_layers": cfg.num_hidden_layers, + "encoder_num_heads": cfg.num_attention_heads, + "encoder_attention_dropout": cfg.attention_dropout, + "encoder_ff_interm_features": cfg.intermediate_size, + "encoder_ff_interm_dropout": cfg.activation_dropout, + "encoder_dropout": cfg.hidden_dropout, + "encoder_layer_norm_first": cfg.do_stable_layer_norm, + "encoder_layer_drop": cfg.layerdrop, + } + return config + + +def _get_config_wavlm(cfg): + config = { + "extractor_mode": f"{cfg.feat_extract_norm}_norm", + "extractor_conv_layer_config": list(zip(cfg.conv_dim, cfg.conv_kernel, cfg.conv_stride)), + "extractor_conv_bias": cfg.conv_bias, + "encoder_embed_dim": cfg.hidden_size, + "encoder_projection_dropout": cfg.feat_proj_dropout, + "encoder_pos_conv_kernel": cfg.num_conv_pos_embeddings, + "encoder_pos_conv_groups": cfg.num_conv_pos_embedding_groups, + "encoder_num_layers": cfg.num_hidden_layers, + "encoder_num_heads": cfg.num_attention_heads, + "encoder_num_buckets": cfg.num_buckets, + "encoder_max_distance": cfg.max_bucket_distance, + "encoder_attention_dropout": cfg.attention_dropout, + "encoder_ff_interm_features": cfg.intermediate_size, + "encoder_ff_interm_dropout": cfg.activation_dropout, + "encoder_dropout": cfg.hidden_dropout, + "encoder_layer_norm_first": cfg.do_stable_layer_norm, + "encoder_layer_drop": cfg.layerdrop, + } + return config + + +def _build(config, original): + is_for_ctc = original.__class__.__name__ in ["Wav2Vec2ForCTC", "WavLMForCTC"] + if is_for_ctc: + aux_num_out = original.config.vocab_size + wav2vec2 = original.wav2vec2 + else: + _LG.warning( + "The model is not an instance of Wav2Vec2ForCTC or WavLMForCTC. " '"lm_head" module is not imported.' + ) + aux_num_out = None + wav2vec2 = original + is_wavlm = original.__class__.__name__ in ["WavLMModel", "WavLMForCTC"] + if is_wavlm: + imported = wavlm_model(**config, aux_num_out=aux_num_out) + else: + imported = wav2vec2_model(**config, aux_num_out=aux_num_out) + imported.feature_extractor.load_state_dict(wav2vec2.feature_extractor.state_dict()) + imported.encoder.feature_projection.load_state_dict(wav2vec2.feature_projection.state_dict()) + encoder_state_dict = wav2vec2.encoder.state_dict() + if is_wavlm: # Rename paramaters of linear transformations for compatibility with the HF model + transform_wavlm_encoder_state(encoder_state_dict, config["encoder_num_layers"]) + imported.encoder.transformer.load_state_dict(encoder_state_dict) + if is_for_ctc: + imported.aux.load_state_dict(original.lm_head.state_dict()) + return imported + + +def transform_wavlm_encoder_state(state: Dict[str, Any], encoder_num_layers: int): + """Converts WavLM encoder state from HuggingFace format. In particular, concatenates linear projection weights and + biases to align with the structure of ``torch.nn.MultiheadAttention``. + """ + for i in range(encoder_num_layers): + q_proj_bias = state.pop(f"layers.{i}.attention.q_proj.bias") + k_proj_bias = state.pop(f"layers.{i}.attention.k_proj.bias") + v_proj_bias = state.pop(f"layers.{i}.attention.v_proj.bias") + q_proj_weight = state.pop(f"layers.{i}.attention.q_proj.weight") + k_proj_weight = state.pop(f"layers.{i}.attention.k_proj.weight") + v_proj_weight = state.pop(f"layers.{i}.attention.v_proj.weight") + state[f"layers.{i}.attention.attention.in_proj_bias"] = torch.cat((q_proj_bias, k_proj_bias, v_proj_bias)) + state[f"layers.{i}.attention.attention.in_proj_weight"] = torch.cat( + (q_proj_weight, k_proj_weight, v_proj_weight) + ) + + state[f"layers.{i}.attention.attention.out_proj.weight"] = state.pop(f"layers.{i}.attention.out_proj.weight") + state[f"layers.{i}.attention.attention.out_proj.bias"] = state.pop(f"layers.{i}.attention.out_proj.bias") + + +def import_huggingface_model(original: Module) -> Wav2Vec2Model: + """Builds :class:`Wav2Vec2Model` from the corresponding model object of + `Transformers `_. + + Args: + original (torch.nn.Module): An instance of ``Wav2Vec2ForCTC`` from ``transformers``. + + Returns: + Wav2Vec2Model: Imported model. + + Example + >>> from torchaudio.models.wav2vec2.utils import import_huggingface_model + >>> + >>> original = Wav2Vec2ForCTC.from_pretrained("facebook/wav2vec2-base-960h") + >>> model = import_huggingface_model(original) + >>> + >>> waveforms, _ = torchaudio.load("audio.wav") + >>> logits, _ = model(waveforms) + """ + _LG.info("Importing model.") + _LG.info("Loading model configuration.") + is_wavlm = original.__class__.__name__ in ["WavLMModel", "WavLMForCTC"] + if is_wavlm: + config = _get_config_wavlm(original.config) + else: + config = _get_config(original.config) + _LG.debug(" - config: %s", config) + _LG.info("Building model.") + imported = _build(config, original) + return imported diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/wav2vec2/wavlm_attention.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/wav2vec2/wavlm_attention.py new file mode 100644 index 0000000000000000000000000000000000000000..fafddfeb958cbcdfdc0a7781b49bc124fff78290 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/wav2vec2/wavlm_attention.py @@ -0,0 +1,214 @@ +""" +The MIT License (MIT) + +Copyright (c) Microsoft Corporation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +""" + +import math +from typing import Optional, Tuple + +import torch +from torch import nn, Tensor + + +class WavLMSelfAttention(nn.Module): + """Multi-headed self-attention for WavLM model :cite:`chen2022wavlm`. + Wraps around ``torch.nn.MultiheadAttention``, creating relaive position embeddings and passing them to multi-headed + attention as a mask. + Source: https://github.com/microsoft/unilm/blob/2d8302f09c99bca2b82e6e868d81d4281cceebc8/wavlm/modules.py#L303-L763 + + Args: + embed_dim (int): Total dimension of the model. + num_heads (int): The number of heads. + dropout (float, optional): Dropout probability on attn_output_weights. (Default: to ``0.0``) + bias (bool, optional): If ``True``, add bias to input / output projection layers. (Default: ``True``) + has_relative_attention_bias (bool, optional): If ``True``, apply relative position embedding. + Necessary in the first encoder layer, but not in the subsequent ones. (Default: ``False``) + num_buckets (int, optional): Number of buckets for relative position embedding. (Default: ``32``) + max_distance (int, optional): Naximum distance for relative position embedding. (Default: ``128``) + gru_rel_pos (bool, optional): If ``True``, apply gated relative position embedding. (Default: ``False``) + """ + + def __init__( + self, + embed_dim: int, + num_heads: int, + dropout: float = 0.0, + bias: bool = True, + has_relative_attention_bias: bool = False, + num_buckets: int = 32, + max_distance: int = 128, + gru_rel_pos: bool = True, + ): + super().__init__() + self.embed_dim = embed_dim + self.num_heads = num_heads + self.has_relative_attention_bias = has_relative_attention_bias + self.num_buckets = num_buckets + self.max_distance = max_distance + + if has_relative_attention_bias: + self.rel_attn_embed = nn.Embedding(num_buckets, num_heads) + else: + self.rel_attn_embed = None + + self.head_dim = embed_dim // num_heads + assert self.head_dim * num_heads == self.embed_dim, "embed_dim must be divisible by num_heads" + + self.dropout = dropout + self.attention = nn.MultiheadAttention(embed_dim, num_heads, dropout=dropout, bias=bias, batch_first=True) + + self.gru_rel_pos = gru_rel_pos + if self.gru_rel_pos: + self.gru_rel_pos_linear = nn.Linear(self.head_dim, 8) + self.gru_rel_pos_const = nn.Parameter(torch.ones(1, num_heads, 1, 1)) + self.has_position_bias = True + + def compute_bias(self, query_length: int, key_length: int) -> Tensor: + """Compute relative position embeddings for WavLM model. + Args: + query_length (int): Query position can take values between 0 and ``query_length - 1``. + key_length (int): Key position can take values between 0 and ``key_length - 1``. + Returns: + Tensor of shape `(num_heads, query_length, key_length)`, relative positions embeddings + """ + context_position = torch.arange(query_length, dtype=torch.long)[:, None] + memory_position = torch.arange(key_length, dtype=torch.long)[None, :] + relative_position = memory_position - context_position # Shape (query_length, key_length) + relative_position_bucket = self._relative_positions_bucket(relative_position, bidirectional=True) + relative_position_bucket = relative_position_bucket.to(self.rel_attn_embed.weight.device) + values = self.rel_attn_embed(relative_position_bucket) # Shape (query_length, key_length, num_heads) + values = values.permute([2, 0, 1]) + return values + + def _relative_positions_bucket(self, relative_positions: Tensor, bidirectional: bool = True): + """Compute relative position buckets for WavLM model. Computation similar to formula (5) in WavLM + paper :cite:`chen2022wavlm`. + Args: + relative_positions (Tensor): Relative offsets between query and key positions, + of shape ``(query_length, key_length)``. + bidirectional (bool): If ``True``, values will be filled both above and below the diagonal in the resulting + matrix. If ``False``, the elements above the diagonal (i.e. with negative relative offsets) will be set + to zero. (Default ``True``) + Returns: + Tensor of shape ``(query_length, key_length)`` filled bucketed values of with relative positions. + """ + num_buckets = self.num_buckets + max_distance = self.max_distance + # Shape (query_length, key_length) + relative_buckets = torch.zeros_like(relative_positions, dtype=torch.long) + + if bidirectional: + num_buckets = num_buckets // 2 + relative_buckets += (relative_positions > 0).to(torch.long) * num_buckets + relative_positions = torch.abs(relative_positions) + else: + relative_positions = -torch.min(relative_positions, torch.zeros_like(relative_positions)) + + max_exact = num_buckets // 2 + is_small = relative_positions < max_exact + + relative_postion_if_large = max_exact + ( + torch.log(relative_positions.float() / max_exact) + / math.log(max_distance / max_exact) + * (num_buckets - max_exact) + ).to(torch.long) + relative_postion_if_large = torch.min( + relative_postion_if_large, torch.full_like(relative_postion_if_large, num_buckets - 1) + ) + + relative_buckets += torch.where(is_small, relative_positions, relative_postion_if_large) + return relative_buckets + + def forward( + self, + query: Tensor, + key_padding_mask: Optional[Tensor] = None, + attention_mask: Optional[Tensor] = None, + position_bias: Optional[Tensor] = None, + ) -> Tuple[Tensor, Optional[Tensor]]: + """ + Args: + query (Tensor): Input of shape ``(batch_size, src_len, embed_dim)``. + key_padding_mask (Tensor or None, optional): Mask to exclude keys that are pads, of shape + `(batch, src_len)`, where padding elements are indicated by 1s. (Default: ``None``) + attn_mask: Needs to be ``None``. The argument exists for compatibility with + ``EncoderLayer``. (Default: ``None``) + position_bias (Tensor or None, optional): Position bias of shape + ``(batch_size * num_heads, src_len, src_len)``. When used inside WavLM model encoder, will be + generated in the first layer and then passed from each encoder layer to the next one. + (Default: ``None``) + Returns: + attn_output (Tensor): Attention output of shape ``(batch_size, src_len, embed_dim)``. + position_bias (Tensor or None): Position bias of shape ``(batch_size * num_heads, src_len, src_len)``. + """ + bsz, seq_len, embed_dim = query.size() + assert embed_dim == self.embed_dim + assert attention_mask is None + + if self.rel_attn_embed is not None and position_bias is None: + position_bias = self.compute_bias(seq_len, seq_len) + position_bias = position_bias.unsqueeze(0).repeat(bsz, 1, 1, 1) + + attn_mask_rel_pos: Optional[Tensor] = None + if position_bias is not None: + attn_mask_rel_pos = position_bias + if self.gru_rel_pos: # Apply gating on relative position bias + query_layer = query.view(bsz, seq_len, self.num_heads, -1) + query_layer = query_layer.permute(0, 2, 1, 3) + + gate_a, gate_b = torch.sigmoid( + self.gru_rel_pos_linear(query_layer).view(bsz, self.num_heads, seq_len, 2, 4).sum(-1, keepdim=False) + ).chunk(2, dim=-1) + gate_a_1 = gate_a * (gate_b * self.gru_rel_pos_const - 1.0) + 2.0 + attn_mask_rel_pos = gate_a_1.view(bsz, self.num_heads, -1, 1) * position_bias + + attn_mask_rel_pos = attn_mask_rel_pos.view((bsz, self.num_heads, seq_len, seq_len)) + + if attn_mask_rel_pos is not None and key_padding_mask is not None: + key_padding_mask = key_padding_mask.view(bsz, 1, 1, seq_len).expand(-1, self.num_heads, -1, -1) + key_padding_mask = torch.nn.functional._canonical_mask( + mask=key_padding_mask, + mask_name="key_padding_mask", + other_type=torch.nn.functional._none_or_dtype(attn_mask_rel_pos), + other_name="", + target_type=query.dtype, + ) + if attn_mask_rel_pos is not None and key_padding_mask is not None: + attn_mask_rel_pos = attn_mask_rel_pos + key_padding_mask + query_projected = torch.nn.functional.linear(query, self.attention.in_proj_weight, self.attention.in_proj_bias) + query, key, value = query_projected.chunk(3, -1) + shape = (bsz, seq_len, self.num_heads, self.head_dim) + query = query.view(shape).transpose(2, 1) # (batch, num_heads, seq_len, head_dim) + key = key.view(shape).transpose(2, 1) # (batch, num_heads, seq_len, head_dim) + value = value.view(shape).transpose(2, 1) # (batch, num_heads, seq_len, head_dim) + dropout = self.dropout if self.training else 0.0 + attn_output = torch.nn.functional.scaled_dot_product_attention( + query, + key, + value, + attn_mask=attn_mask_rel_pos, + dropout_p=dropout, + is_causal=False, + ) + attn_output = attn_output.transpose(1, 2).reshape(bsz, -1, self.num_heads * self.head_dim) + attn_output = self.attention.out_proj(attn_output) + return attn_output, position_bias diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/wavernn.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/wavernn.py new file mode 100644 index 0000000000000000000000000000000000000000..8ae5a3e91675cd9ef7d4614f0daaec50f80dcdee --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/models/wavernn.py @@ -0,0 +1,409 @@ +import math +from typing import List, Optional, Tuple + +import torch +import torch.nn.functional as F +from torch import nn, Tensor + +__all__ = [ + "ResBlock", + "MelResNet", + "Stretch2d", + "UpsampleNetwork", + "WaveRNN", +] + + +class ResBlock(nn.Module): + r"""ResNet block based on *Efficient Neural Audio Synthesis* :cite:`kalchbrenner2018efficient`. + + Args: + n_freq: the number of bins in a spectrogram. (Default: ``128``) + + Examples + >>> resblock = ResBlock() + >>> input = torch.rand(10, 128, 512) # a random spectrogram + >>> output = resblock(input) # shape: (10, 128, 512) + """ + + def __init__(self, n_freq: int = 128) -> None: + super().__init__() + + self.resblock_model = nn.Sequential( + nn.Conv1d(in_channels=n_freq, out_channels=n_freq, kernel_size=1, bias=False), + nn.BatchNorm1d(n_freq), + nn.ReLU(inplace=True), + nn.Conv1d(in_channels=n_freq, out_channels=n_freq, kernel_size=1, bias=False), + nn.BatchNorm1d(n_freq), + ) + + def forward(self, specgram: Tensor) -> Tensor: + r"""Pass the input through the ResBlock layer. + Args: + specgram (Tensor): the input sequence to the ResBlock layer (n_batch, n_freq, n_time). + + Return: + Tensor shape: (n_batch, n_freq, n_time) + """ + + return self.resblock_model(specgram) + specgram + + +class MelResNet(nn.Module): + r"""MelResNet layer uses a stack of ResBlocks on spectrogram. + + Args: + n_res_block: the number of ResBlock in stack. (Default: ``10``) + n_freq: the number of bins in a spectrogram. (Default: ``128``) + n_hidden: the number of hidden dimensions of resblock. (Default: ``128``) + n_output: the number of output dimensions of melresnet. (Default: ``128``) + kernel_size: the number of kernel size in the first Conv1d layer. (Default: ``5``) + + Examples + >>> melresnet = MelResNet() + >>> input = torch.rand(10, 128, 512) # a random spectrogram + >>> output = melresnet(input) # shape: (10, 128, 508) + """ + + def __init__( + self, n_res_block: int = 10, n_freq: int = 128, n_hidden: int = 128, n_output: int = 128, kernel_size: int = 5 + ) -> None: + super().__init__() + + ResBlocks = [ResBlock(n_hidden) for _ in range(n_res_block)] + + self.melresnet_model = nn.Sequential( + nn.Conv1d(in_channels=n_freq, out_channels=n_hidden, kernel_size=kernel_size, bias=False), + nn.BatchNorm1d(n_hidden), + nn.ReLU(inplace=True), + *ResBlocks, + nn.Conv1d(in_channels=n_hidden, out_channels=n_output, kernel_size=1), + ) + + def forward(self, specgram: Tensor) -> Tensor: + r"""Pass the input through the MelResNet layer. + Args: + specgram (Tensor): the input sequence to the MelResNet layer (n_batch, n_freq, n_time). + + Return: + Tensor shape: (n_batch, n_output, n_time - kernel_size + 1) + """ + + return self.melresnet_model(specgram) + + +class Stretch2d(nn.Module): + r"""Upscale the frequency and time dimensions of a spectrogram. + + Args: + time_scale: the scale factor in time dimension + freq_scale: the scale factor in frequency dimension + + Examples + >>> stretch2d = Stretch2d(time_scale=10, freq_scale=5) + + >>> input = torch.rand(10, 100, 512) # a random spectrogram + >>> output = stretch2d(input) # shape: (10, 500, 5120) + """ + + def __init__(self, time_scale: int, freq_scale: int) -> None: + super().__init__() + + self.freq_scale = freq_scale + self.time_scale = time_scale + + def forward(self, specgram: Tensor) -> Tensor: + r"""Pass the input through the Stretch2d layer. + + Args: + specgram (Tensor): the input sequence to the Stretch2d layer (..., n_freq, n_time). + + Return: + Tensor shape: (..., n_freq * freq_scale, n_time * time_scale) + """ + + return specgram.repeat_interleave(self.freq_scale, -2).repeat_interleave(self.time_scale, -1) + + +class UpsampleNetwork(nn.Module): + r"""Upscale the dimensions of a spectrogram. + + Args: + upsample_scales: the list of upsample scales. + n_res_block: the number of ResBlock in stack. (Default: ``10``) + n_freq: the number of bins in a spectrogram. (Default: ``128``) + n_hidden: the number of hidden dimensions of resblock. (Default: ``128``) + n_output: the number of output dimensions of melresnet. (Default: ``128``) + kernel_size: the number of kernel size in the first Conv1d layer. (Default: ``5``) + + Examples + >>> upsamplenetwork = UpsampleNetwork(upsample_scales=[4, 4, 16]) + >>> input = torch.rand(10, 128, 10) # a random spectrogram + >>> output = upsamplenetwork(input) # shape: (10, 128, 1536), (10, 128, 1536) + """ + + def __init__( + self, + upsample_scales: List[int], + n_res_block: int = 10, + n_freq: int = 128, + n_hidden: int = 128, + n_output: int = 128, + kernel_size: int = 5, + ) -> None: + super().__init__() + + total_scale = 1 + for upsample_scale in upsample_scales: + total_scale *= upsample_scale + self.total_scale: int = total_scale + + self.indent = (kernel_size - 1) // 2 * total_scale + self.resnet = MelResNet(n_res_block, n_freq, n_hidden, n_output, kernel_size) + self.resnet_stretch = Stretch2d(total_scale, 1) + + up_layers = [] + for scale in upsample_scales: + stretch = Stretch2d(scale, 1) + conv = nn.Conv2d( + in_channels=1, out_channels=1, kernel_size=(1, scale * 2 + 1), padding=(0, scale), bias=False + ) + torch.nn.init.constant_(conv.weight, 1.0 / (scale * 2 + 1)) + up_layers.append(stretch) + up_layers.append(conv) + self.upsample_layers = nn.Sequential(*up_layers) + + def forward(self, specgram: Tensor) -> Tuple[Tensor, Tensor]: + r"""Pass the input through the UpsampleNetwork layer. + + Args: + specgram (Tensor): the input sequence to the UpsampleNetwork layer (n_batch, n_freq, n_time) + + Return: + Tensor shape: (n_batch, n_freq, (n_time - kernel_size + 1) * total_scale), + (n_batch, n_output, (n_time - kernel_size + 1) * total_scale) + where total_scale is the product of all elements in upsample_scales. + """ + + resnet_output = self.resnet(specgram).unsqueeze(1) + resnet_output = self.resnet_stretch(resnet_output) + resnet_output = resnet_output.squeeze(1) + + specgram = specgram.unsqueeze(1) + upsampling_output = self.upsample_layers(specgram) + upsampling_output = upsampling_output.squeeze(1)[:, :, self.indent : -self.indent] + + return upsampling_output, resnet_output + + +class WaveRNN(nn.Module): + r"""WaveRNN model from *Efficient Neural Audio Synthesis* :cite:`wavernn` + based on the implementation from `fatchord/WaveRNN `_. + + The original implementation was introduced in *Efficient Neural Audio Synthesis* + :cite:`kalchbrenner2018efficient`. The input channels of waveform and spectrogram have to be 1. + The product of `upsample_scales` must equal `hop_length`. + + See Also: + * `Training example `__ + * :class:`torchaudio.pipelines.Tacotron2TTSBundle`: TTS pipeline with pretrained model. + + Args: + upsample_scales: the list of upsample scales. + n_classes: the number of output classes. + hop_length: the number of samples between the starts of consecutive frames. + n_res_block: the number of ResBlock in stack. (Default: ``10``) + n_rnn: the dimension of RNN layer. (Default: ``512``) + n_fc: the dimension of fully connected layer. (Default: ``512``) + kernel_size: the number of kernel size in the first Conv1d layer. (Default: ``5``) + n_freq: the number of bins in a spectrogram. (Default: ``128``) + n_hidden: the number of hidden dimensions of resblock. (Default: ``128``) + n_output: the number of output dimensions of melresnet. (Default: ``128``) + + Example + >>> wavernn = WaveRNN(upsample_scales=[5,5,8], n_classes=512, hop_length=200) + >>> waveform, sample_rate = torchaudio.load(file) + >>> # waveform shape: (n_batch, n_channel, (n_time - kernel_size + 1) * hop_length) + >>> specgram = MelSpectrogram(sample_rate)(waveform) # shape: (n_batch, n_channel, n_freq, n_time) + >>> output = wavernn(waveform, specgram) + >>> # output shape: (n_batch, n_channel, (n_time - kernel_size + 1) * hop_length, n_classes) + """ + + def __init__( + self, + upsample_scales: List[int], + n_classes: int, + hop_length: int, + n_res_block: int = 10, + n_rnn: int = 512, + n_fc: int = 512, + kernel_size: int = 5, + n_freq: int = 128, + n_hidden: int = 128, + n_output: int = 128, + ) -> None: + super().__init__() + + self.kernel_size = kernel_size + self._pad = (kernel_size - 1 if kernel_size % 2 else kernel_size) // 2 + self.n_rnn = n_rnn + self.n_aux = n_output // 4 + self.hop_length = hop_length + self.n_classes = n_classes + self.n_bits: int = int(math.log2(self.n_classes)) + + total_scale = 1 + for upsample_scale in upsample_scales: + total_scale *= upsample_scale + if total_scale != self.hop_length: + raise ValueError(f"Expected: total_scale == hop_length, but found {total_scale} != {hop_length}") + + self.upsample = UpsampleNetwork(upsample_scales, n_res_block, n_freq, n_hidden, n_output, kernel_size) + self.fc = nn.Linear(n_freq + self.n_aux + 1, n_rnn) + + self.rnn1 = nn.GRU(n_rnn, n_rnn, batch_first=True) + self.rnn2 = nn.GRU(n_rnn + self.n_aux, n_rnn, batch_first=True) + + self.relu1 = nn.ReLU(inplace=True) + self.relu2 = nn.ReLU(inplace=True) + + self.fc1 = nn.Linear(n_rnn + self.n_aux, n_fc) + self.fc2 = nn.Linear(n_fc + self.n_aux, n_fc) + self.fc3 = nn.Linear(n_fc, self.n_classes) + + def forward(self, waveform: Tensor, specgram: Tensor) -> Tensor: + r"""Pass the input through the WaveRNN model. + + Args: + waveform: the input waveform to the WaveRNN layer (n_batch, 1, (n_time - kernel_size + 1) * hop_length) + specgram: the input spectrogram to the WaveRNN layer (n_batch, 1, n_freq, n_time) + + Return: + Tensor: shape (n_batch, 1, (n_time - kernel_size + 1) * hop_length, n_classes) + """ + + if waveform.size(1) != 1: + raise ValueError("Require the input channel of waveform is 1") + if specgram.size(1) != 1: + raise ValueError("Require the input channel of specgram is 1") + # remove channel dimension until the end + waveform, specgram = waveform.squeeze(1), specgram.squeeze(1) + + batch_size = waveform.size(0) + h1 = torch.zeros(1, batch_size, self.n_rnn, dtype=waveform.dtype, device=waveform.device) + h2 = torch.zeros(1, batch_size, self.n_rnn, dtype=waveform.dtype, device=waveform.device) + # output of upsample: + # specgram: (n_batch, n_freq, (n_time - kernel_size + 1) * total_scale) + # aux: (n_batch, n_output, (n_time - kernel_size + 1) * total_scale) + specgram, aux = self.upsample(specgram) + specgram = specgram.transpose(1, 2) + aux = aux.transpose(1, 2) + + aux_idx = [self.n_aux * i for i in range(5)] + a1 = aux[:, :, aux_idx[0] : aux_idx[1]] + a2 = aux[:, :, aux_idx[1] : aux_idx[2]] + a3 = aux[:, :, aux_idx[2] : aux_idx[3]] + a4 = aux[:, :, aux_idx[3] : aux_idx[4]] + + x = torch.cat([waveform.unsqueeze(-1), specgram, a1], dim=-1) + x = self.fc(x) + res = x + x, _ = self.rnn1(x, h1) + + x = x + res + res = x + x = torch.cat([x, a2], dim=-1) + x, _ = self.rnn2(x, h2) + + x = x + res + x = torch.cat([x, a3], dim=-1) + x = self.fc1(x) + x = self.relu1(x) + + x = torch.cat([x, a4], dim=-1) + x = self.fc2(x) + x = self.relu2(x) + x = self.fc3(x) + + # bring back channel dimension + return x.unsqueeze(1) + + @torch.jit.export + def infer(self, specgram: Tensor, lengths: Optional[Tensor] = None) -> Tuple[Tensor, Optional[Tensor]]: + r"""Inference method of WaveRNN. + + This function currently only supports multinomial sampling, which assumes the + network is trained on cross entropy loss. + + Args: + specgram (Tensor): + Batch of spectrograms. Shape: `(n_batch, n_freq, n_time)`. + lengths (Tensor or None, optional): + Indicates the valid length of each audio in the batch. + Shape: `(batch, )`. + When the ``specgram`` contains spectrograms with different durations, + by providing ``lengths`` argument, the model will compute + the corresponding valid output lengths. + If ``None``, it is assumed that all the audio in ``waveforms`` + have valid length. Default: ``None``. + + Returns: + (Tensor, Optional[Tensor]): + Tensor + The inferred waveform of size `(n_batch, 1, n_time)`. + 1 stands for a single channel. + Tensor or None + If ``lengths`` argument was provided, a Tensor of shape `(batch, )` + is returned. + It indicates the valid length in time axis of the output Tensor. + """ + + device = specgram.device + dtype = specgram.dtype + + specgram = torch.nn.functional.pad(specgram, (self._pad, self._pad)) + specgram, aux = self.upsample(specgram) + if lengths is not None: + lengths = lengths * self.upsample.total_scale + + output: List[Tensor] = [] + b_size, _, seq_len = specgram.size() + + h1 = torch.zeros((1, b_size, self.n_rnn), device=device, dtype=dtype) + h2 = torch.zeros((1, b_size, self.n_rnn), device=device, dtype=dtype) + x = torch.zeros((b_size, 1), device=device, dtype=dtype) + + aux_split = [aux[:, self.n_aux * i : self.n_aux * (i + 1), :] for i in range(4)] + + for i in range(seq_len): + + m_t = specgram[:, :, i] + + a1_t, a2_t, a3_t, a4_t = [a[:, :, i] for a in aux_split] + + x = torch.cat([x, m_t, a1_t], dim=1) + x = self.fc(x) + _, h1 = self.rnn1(x.unsqueeze(1), h1) + + x = x + h1[0] + inp = torch.cat([x, a2_t], dim=1) + _, h2 = self.rnn2(inp.unsqueeze(1), h2) + + x = x + h2[0] + x = torch.cat([x, a3_t], dim=1) + x = F.relu(self.fc1(x)) + + x = torch.cat([x, a4_t], dim=1) + x = F.relu(self.fc2(x)) + + logits = self.fc3(x) + + posterior = F.softmax(logits, dim=1) + + x = torch.multinomial(posterior, 1).float() + # Transform label [0, 2 ** n_bits - 1] to waveform [-1, 1] + x = 2 * x / (2**self.n_bits - 1.0) - 1.0 + + output.append(x) + + return torch.stack(output).permute(1, 2, 0), lengths diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/pipelines/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/pipelines/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..efec1f3521e760803e095efb71f164ed268896f1 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/pipelines/__init__.py @@ -0,0 +1,102 @@ +from ._source_separation_pipeline import ( + CONVTASNET_BASE_LIBRI2MIX, + HDEMUCS_HIGH_MUSDB, + HDEMUCS_HIGH_MUSDB_PLUS, + SourceSeparationBundle, +) +from ._squim_pipeline import SQUIM_OBJECTIVE, SQUIM_SUBJECTIVE, SquimObjectiveBundle, SquimSubjectiveBundle +from ._tts import ( + TACOTRON2_GRIFFINLIM_CHAR_LJSPEECH, + TACOTRON2_GRIFFINLIM_PHONE_LJSPEECH, + TACOTRON2_WAVERNN_CHAR_LJSPEECH, + TACOTRON2_WAVERNN_PHONE_LJSPEECH, + Tacotron2TTSBundle, +) +from ._wav2vec2.impl import ( + HUBERT_ASR_LARGE, + HUBERT_ASR_XLARGE, + HUBERT_BASE, + HUBERT_LARGE, + HUBERT_XLARGE, + MMS_FA, + VOXPOPULI_ASR_BASE_10K_DE, + VOXPOPULI_ASR_BASE_10K_EN, + VOXPOPULI_ASR_BASE_10K_ES, + VOXPOPULI_ASR_BASE_10K_FR, + VOXPOPULI_ASR_BASE_10K_IT, + WAV2VEC2_ASR_BASE_100H, + WAV2VEC2_ASR_BASE_10M, + WAV2VEC2_ASR_BASE_960H, + WAV2VEC2_ASR_LARGE_100H, + WAV2VEC2_ASR_LARGE_10M, + WAV2VEC2_ASR_LARGE_960H, + WAV2VEC2_ASR_LARGE_LV60K_100H, + WAV2VEC2_ASR_LARGE_LV60K_10M, + WAV2VEC2_ASR_LARGE_LV60K_960H, + WAV2VEC2_BASE, + WAV2VEC2_LARGE, + WAV2VEC2_LARGE_LV60K, + WAV2VEC2_XLSR53, + WAV2VEC2_XLSR_1B, + WAV2VEC2_XLSR_2B, + WAV2VEC2_XLSR_300M, + Wav2Vec2ASRBundle, + Wav2Vec2Bundle, + Wav2Vec2FABundle, + WAVLM_BASE, + WAVLM_BASE_PLUS, + WAVLM_LARGE, +) +from .rnnt_pipeline import EMFORMER_RNNT_BASE_LIBRISPEECH, RNNTBundle + + +__all__ = [ + "Wav2Vec2Bundle", + "Wav2Vec2ASRBundle", + "Wav2Vec2FABundle", + "WAV2VEC2_BASE", + "WAV2VEC2_LARGE", + "WAV2VEC2_LARGE_LV60K", + "WAV2VEC2_ASR_BASE_10M", + "WAV2VEC2_ASR_BASE_100H", + "WAV2VEC2_ASR_BASE_960H", + "WAV2VEC2_ASR_LARGE_10M", + "WAV2VEC2_ASR_LARGE_100H", + "WAV2VEC2_ASR_LARGE_960H", + "WAV2VEC2_ASR_LARGE_LV60K_10M", + "WAV2VEC2_ASR_LARGE_LV60K_100H", + "WAV2VEC2_ASR_LARGE_LV60K_960H", + "WAV2VEC2_XLSR53", + "WAV2VEC2_XLSR_300M", + "WAV2VEC2_XLSR_1B", + "WAV2VEC2_XLSR_2B", + "VOXPOPULI_ASR_BASE_10K_EN", + "VOXPOPULI_ASR_BASE_10K_ES", + "VOXPOPULI_ASR_BASE_10K_DE", + "VOXPOPULI_ASR_BASE_10K_FR", + "VOXPOPULI_ASR_BASE_10K_IT", + "HUBERT_BASE", + "HUBERT_LARGE", + "HUBERT_XLARGE", + "HUBERT_ASR_LARGE", + "HUBERT_ASR_XLARGE", + "MMS_FA", + "WAVLM_BASE", + "WAVLM_BASE_PLUS", + "WAVLM_LARGE", + "Tacotron2TTSBundle", + "TACOTRON2_GRIFFINLIM_CHAR_LJSPEECH", + "TACOTRON2_GRIFFINLIM_PHONE_LJSPEECH", + "TACOTRON2_WAVERNN_CHAR_LJSPEECH", + "TACOTRON2_WAVERNN_PHONE_LJSPEECH", + "RNNTBundle", + "EMFORMER_RNNT_BASE_LIBRISPEECH", + "SourceSeparationBundle", + "CONVTASNET_BASE_LIBRI2MIX", + "HDEMUCS_HIGH_MUSDB_PLUS", + "HDEMUCS_HIGH_MUSDB", + "SQUIM_OBJECTIVE", + "SQUIM_SUBJECTIVE", + "SquimObjectiveBundle", + "SquimSubjectiveBundle", +] diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/pipelines/_source_separation_pipeline.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/pipelines/_source_separation_pipeline.py new file mode 100644 index 0000000000000000000000000000000000000000..368b72d45e9b84446487f59ff0f35e0c86aa236d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/pipelines/_source_separation_pipeline.py @@ -0,0 +1,109 @@ +from dataclasses import dataclass +from functools import partial +from typing import Callable + +import torch +import torchaudio + +from torchaudio.models import conv_tasnet_base, hdemucs_high + + +@dataclass +class SourceSeparationBundle: + """Dataclass that bundles components for performing source separation. + + Example + >>> import torchaudio + >>> from torchaudio.pipelines import CONVTASNET_BASE_LIBRI2MIX + >>> import torch + >>> + >>> # Build the separation model. + >>> model = CONVTASNET_BASE_LIBRI2MIX.get_model() + >>> 100%|███████████████████████████████|19.1M/19.1M [00:04<00:00, 4.93MB/s] + >>> + >>> # Instantiate the test set of Libri2Mix dataset. + >>> dataset = torchaudio.datasets.LibriMix("/home/datasets/", subset="test") + >>> + >>> # Apply source separation on mixture audio. + >>> for i, data in enumerate(dataset): + >>> sample_rate, mixture, clean_sources = data + >>> # Make sure the shape of input suits the model requirement. + >>> mixture = mixture.reshape(1, 1, -1) + >>> estimated_sources = model(mixture) + >>> score = si_snr_pit(estimated_sources, clean_sources) # for demonstration + >>> print(f"Si-SNR score is : {score}.) + >>> break + >>> Si-SNR score is : 16.24. + >>> + """ + + _model_path: str + _model_factory_func: Callable[[], torch.nn.Module] + _sample_rate: int + + @property + def sample_rate(self) -> int: + """Sample rate of the audio that the model is trained on. + + :type: int + """ + return self._sample_rate + + def get_model(self) -> torch.nn.Module: + """Construct the model and load the pretrained weight.""" + model = self._model_factory_func() + path = torchaudio.utils._download_asset(self._model_path) + state_dict = torch.load(path) + model.load_state_dict(state_dict) + model.eval() + return model + + +CONVTASNET_BASE_LIBRI2MIX = SourceSeparationBundle( + _model_path="models/conv_tasnet_base_libri2mix.pt", + _model_factory_func=partial(conv_tasnet_base, num_sources=2), + _sample_rate=8000, +) +CONVTASNET_BASE_LIBRI2MIX.__doc__ = """Pre-trained Source Separation pipeline with *ConvTasNet* +:cite:`Luo_2019` trained on *Libri2Mix dataset* :cite:`cosentino2020librimix`. + +The source separation model is constructed by :func:`~torchaudio.models.conv_tasnet_base` +and is trained using the training script ``lightning_train.py`` +`here `__ +with default arguments. + +Please refer to :class:`SourceSeparationBundle` for usage instructions. +""" + + +HDEMUCS_HIGH_MUSDB_PLUS = SourceSeparationBundle( + _model_path="models/hdemucs_high_trained.pt", + _model_factory_func=partial(hdemucs_high, sources=["drums", "bass", "other", "vocals"]), + _sample_rate=44100, +) +HDEMUCS_HIGH_MUSDB_PLUS.__doc__ = """Pre-trained music source separation pipeline with +*Hybrid Demucs* :cite:`defossez2021hybrid` trained on both training and test sets of +MUSDB-HQ :cite:`MUSDB18HQ` and an additional 150 extra songs from an internal database +that was specifically produced for Meta. + +The model is constructed by :func:`~torchaudio.models.hdemucs_high`. + +Training was performed in the original HDemucs repository `here `__. + +Please refer to :class:`SourceSeparationBundle` for usage instructions. +""" + + +HDEMUCS_HIGH_MUSDB = SourceSeparationBundle( + _model_path="models/hdemucs_high_musdbhq_only.pt", + _model_factory_func=partial(hdemucs_high, sources=["drums", "bass", "other", "vocals"]), + _sample_rate=44100, +) +HDEMUCS_HIGH_MUSDB.__doc__ = """Pre-trained music source separation pipeline with +*Hybrid Demucs* :cite:`defossez2021hybrid` trained on the training set of MUSDB-HQ :cite:`MUSDB18HQ`. + +The model is constructed by :func:`~torchaudio.models.hdemucs_high`. +Training was performed in the original HDemucs repository `here `__. + +Please refer to :class:`SourceSeparationBundle` for usage instructions. +""" diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/pipelines/_squim_pipeline.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/pipelines/_squim_pipeline.py new file mode 100644 index 0000000000000000000000000000000000000000..f7e7c1d9088ff819810a9924e4bd761893061ff3 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/pipelines/_squim_pipeline.py @@ -0,0 +1,156 @@ +from dataclasses import dataclass + +import torch +import torchaudio + +from torchaudio.models import squim_objective_base, squim_subjective_base, SquimObjective, SquimSubjective + + +@dataclass +class SquimObjectiveBundle: + """Data class that bundles associated information to use pretrained + :py:class:`~torchaudio.models.SquimObjective` model. + + This class provides interfaces for instantiating the pretrained model along with + the information necessary to retrieve pretrained weights and additional data + to be used with the model. + + Torchaudio library instantiates objects of this class, each of which represents + a different pretrained model. Client code should access pretrained models via these + instances. + + This bundle can estimate objective metric scores for speech enhancement, such as STOI, PESQ, Si-SDR. + A typical use case would be a flow like `waveform -> list of scores`. Please see below for the code example. + + Example: Estimate the objective metric scores for the input waveform. + >>> import torch + >>> import torchaudio + >>> from torchaudio.pipelines import SQUIM_OBJECTIVE as bundle + >>> + >>> # Load the SquimObjective bundle + >>> model = bundle.get_model() + Downloading: "https://download.pytorch.org/torchaudio/models/squim_objective_dns2020.pth" + 100%|████████████| 28.2M/28.2M [00:03<00:00, 9.24MB/s] + >>> + >>> # Resample audio to the expected sampling rate + >>> waveform = torchaudio.functional.resample(waveform, sample_rate, bundle.sample_rate) + >>> + >>> # Estimate objective metric scores + >>> scores = model(waveform) + >>> print(f"STOI: {scores[0].item()}, PESQ: {scores[1].item()}, SI-SDR: {scores[2].item()}.") + """ # noqa: E501 + + _path: str + _sample_rate: float + + def get_model(self) -> SquimObjective: + """Construct the SquimObjective model, and load the pretrained weight. + + Returns: + Variation of :py:class:`~torchaudio.models.SquimObjective`. + """ + model = squim_objective_base() + path = torchaudio.utils._download_asset(f"models/{self._path}") + state_dict = torch.load(path, weights_only=True) + model.load_state_dict(state_dict) + model.eval() + return model + + @property + def sample_rate(self): + """Sample rate of the audio that the model is trained on. + + :type: float + """ + return self._sample_rate + + +SQUIM_OBJECTIVE = SquimObjectiveBundle( + "squim_objective_dns2020.pth", + _sample_rate=16000, +) +SQUIM_OBJECTIVE.__doc__ = """SquimObjective pipeline trained using approach described in + :cite:`kumar2023torchaudio` on the *DNS 2020 Dataset* :cite:`reddy2020interspeech`. + + The underlying model is constructed by :py:func:`torchaudio.models.squim_objective_base`. + The weights are under `Creative Commons Attribution 4.0 International License + `__. + + Please refer to :py:class:`SquimObjectiveBundle` for usage instructions. + """ + + +@dataclass +class SquimSubjectiveBundle: + """Data class that bundles associated information to use pretrained + :py:class:`~torchaudio.models.SquimSubjective` model. + + This class provides interfaces for instantiating the pretrained model along with + the information necessary to retrieve pretrained weights and additional data + to be used with the model. + + Torchaudio library instantiates objects of this class, each of which represents + a different pretrained model. Client code should access pretrained models via these + instances. + + This bundle can estimate subjective metric scores for speech enhancement, such as MOS. + A typical use case would be a flow like `waveform -> score`. Please see below for the code example. + + Example: Estimate the subjective metric scores for the input waveform. + >>> import torch + >>> import torchaudio + >>> from torchaudio.pipelines import SQUIM_SUBJECTIVE as bundle + >>> + >>> # Load the SquimSubjective bundle + >>> model = bundle.get_model() + Downloading: "https://download.pytorch.org/torchaudio/models/squim_subjective_bvcc_daps.pth" + 100%|████████████| 360M/360M [00:09<00:00, 41.1MB/s] + >>> + >>> # Resample audio to the expected sampling rate + >>> waveform = torchaudio.functional.resample(waveform, sample_rate, bundle.sample_rate) + >>> # Use a clean reference (doesn't need to be the reference for the waveform) as the second input + >>> reference = torchaudio.functional.resample(reference, sample_rate, bundle.sample_rate) + >>> + >>> # Estimate subjective metric scores + >>> score = model(waveform, reference) + >>> print(f"MOS: {score}.") + """ # noqa: E501 + + _path: str + _sample_rate: float + + def get_model(self) -> SquimSubjective: + """Construct the SquimSubjective model, and load the pretrained weight. + Returns: + Variation of :py:class:`~torchaudio.models.SquimObjective`. + """ + model = squim_subjective_base() + path = torchaudio.utils._download_asset(f"models/{self._path}") + state_dict = torch.load(path, weights_only=True) + model.load_state_dict(state_dict) + model.eval() + return model + + @property + def sample_rate(self): + """Sample rate of the audio that the model is trained on. + + :type: float + """ + return self._sample_rate + + +SQUIM_SUBJECTIVE = SquimSubjectiveBundle( + "squim_subjective_bvcc_daps.pth", + _sample_rate=16000, +) +SQUIM_SUBJECTIVE.__doc__ = """SquimSubjective pipeline trained + as described in :cite:`manocha2022speech` and :cite:`kumar2023torchaudio` + on the *BVCC* :cite:`cooper2021voices` and *DAPS* :cite:`mysore2014can` datasets. + + The underlying model is constructed by :py:func:`torchaudio.models.squim_subjective_base`. + The weights are under `Creative Commons Attribution Non Commercial 4.0 International + `__. + + Please refer to :py:class:`SquimSubjectiveBundle` for usage instructions. + """ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/pipelines/_tts/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/pipelines/_tts/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..02851f596ceb281acc75c4d6a1aaf17eeee4a809 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/pipelines/_tts/__init__.py @@ -0,0 +1,16 @@ +from .impl import ( + TACOTRON2_GRIFFINLIM_CHAR_LJSPEECH, + TACOTRON2_GRIFFINLIM_PHONE_LJSPEECH, + TACOTRON2_WAVERNN_CHAR_LJSPEECH, + TACOTRON2_WAVERNN_PHONE_LJSPEECH, +) +from .interface import Tacotron2TTSBundle + + +__all__ = [ + "Tacotron2TTSBundle", + "TACOTRON2_GRIFFINLIM_CHAR_LJSPEECH", + "TACOTRON2_GRIFFINLIM_PHONE_LJSPEECH", + "TACOTRON2_WAVERNN_CHAR_LJSPEECH", + "TACOTRON2_WAVERNN_PHONE_LJSPEECH", +] diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/pipelines/_tts/impl.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/pipelines/_tts/impl.py new file mode 100644 index 0000000000000000000000000000000000000000..b8542286242dcbb2036fff49c1d0e11fbbf9258b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/pipelines/_tts/impl.py @@ -0,0 +1,385 @@ +import re +from dataclasses import dataclass +from typing import Any, Dict, List, Optional, Tuple, Union + +import torch +from torch import Tensor +from torchaudio._internal import load_state_dict_from_url +from torchaudio.functional import mu_law_decoding +from torchaudio.models import Tacotron2, WaveRNN +from torchaudio.transforms import GriffinLim, InverseMelScale + +from . import utils +from .interface import Tacotron2TTSBundle + +__all__ = [] + +_BASE_URL = "https://download.pytorch.org/torchaudio/models" + + +################################################################################ +# Pipeline implementation - Text Processor +################################################################################ + + +class _EnglishCharProcessor(Tacotron2TTSBundle.TextProcessor): + def __init__(self): + super().__init__() + self._tokens = utils._get_chars() + self._mapping = {s: i for i, s in enumerate(self._tokens)} + + @property + def tokens(self): + return self._tokens + + def __call__(self, texts: Union[str, List[str]]) -> Tuple[Tensor, Tensor]: + if isinstance(texts, str): + texts = [texts] + indices = [[self._mapping[c] for c in t.lower() if c in self._mapping] for t in texts] + return utils._to_tensor(indices) + + +class _EnglishPhoneProcessor(Tacotron2TTSBundle.TextProcessor): + def __init__(self, *, dl_kwargs=None): + super().__init__() + self._tokens = utils._get_phones() + self._mapping = {p: i for i, p in enumerate(self._tokens)} + self._phonemizer = utils._load_phonemizer("en_us_cmudict_forward.pt", dl_kwargs=dl_kwargs) + self._pattern = r"(\[[A-Z]+?\]|[_!'(),.:;? -])" + + @property + def tokens(self): + return self._tokens + + def __call__(self, texts: Union[str, List[str]]) -> Tuple[Tensor, Tensor]: + if isinstance(texts, str): + texts = [texts] + + indices = [] + for phones in self._phonemizer(texts, lang="en_us"): + # '[F][UW][B][AA][R]!' -> ['F', 'UW', 'B', 'AA', 'R', '!'] + ret = [re.sub(r"[\[\]]", "", r) for r in re.findall(self._pattern, phones)] + indices.append([self._mapping[p] for p in ret]) + return utils._to_tensor(indices) + + +################################################################################ +# Pipeline implementation - Vocoder +################################################################################ + + +class _WaveRNNVocoder(torch.nn.Module, Tacotron2TTSBundle.Vocoder): + def __init__(self, model: WaveRNN, min_level_db: Optional[float] = -100): + super().__init__() + self._sample_rate = 22050 + self._model = model + self._min_level_db = min_level_db + + @property + def sample_rate(self): + return self._sample_rate + + def forward(self, mel_spec, lengths=None): + mel_spec = torch.exp(mel_spec) + mel_spec = 20 * torch.log10(torch.clamp(mel_spec, min=1e-5)) + if self._min_level_db is not None: + mel_spec = (self._min_level_db - mel_spec) / self._min_level_db + mel_spec = torch.clamp(mel_spec, min=0, max=1) + waveform, lengths = self._model.infer(mel_spec, lengths) + waveform = utils._unnormalize_waveform(waveform, self._model.n_bits) + waveform = mu_law_decoding(waveform, self._model.n_classes) + waveform = waveform.squeeze(1) + return waveform, lengths + + +class _GriffinLimVocoder(torch.nn.Module, Tacotron2TTSBundle.Vocoder): + def __init__(self): + super().__init__() + self._sample_rate = 22050 + self._inv_mel = InverseMelScale( + n_stft=(1024 // 2 + 1), + n_mels=80, + sample_rate=self.sample_rate, + f_min=0.0, + f_max=8000.0, + mel_scale="slaney", + norm="slaney", + ) + self._griffin_lim = GriffinLim( + n_fft=1024, + power=1, + hop_length=256, + win_length=1024, + ) + + @property + def sample_rate(self): + return self._sample_rate + + def forward(self, mel_spec, lengths=None): + mel_spec = torch.exp(mel_spec) + mel_spec = mel_spec.clone().detach().requires_grad_(True) + spec = self._inv_mel(mel_spec) + spec = spec.detach().requires_grad_(False) + waveforms = self._griffin_lim(spec) + return waveforms, lengths + + +################################################################################ +# Bundle classes mixins +################################################################################ + + +class _CharMixin: + def get_text_processor(self) -> Tacotron2TTSBundle.TextProcessor: + return _EnglishCharProcessor() + + +class _PhoneMixin: + def get_text_processor(self, *, dl_kwargs=None) -> Tacotron2TTSBundle.TextProcessor: + return _EnglishPhoneProcessor(dl_kwargs=dl_kwargs) + + +@dataclass +class _Tacotron2Mixin: + _tacotron2_path: str + _tacotron2_params: Dict[str, Any] + + def get_tacotron2(self, *, dl_kwargs=None) -> Tacotron2: + model = Tacotron2(**self._tacotron2_params) + url = f"{_BASE_URL}/{self._tacotron2_path}" + dl_kwargs = {} if dl_kwargs is None else dl_kwargs + state_dict = load_state_dict_from_url(url, **dl_kwargs) + model.load_state_dict(state_dict) + model.eval() + return model + + +@dataclass +class _WaveRNNMixin: + _wavernn_path: Optional[str] + _wavernn_params: Optional[Dict[str, Any]] + + def get_vocoder(self, *, dl_kwargs=None): + wavernn = self._get_wavernn(dl_kwargs=dl_kwargs) + return _WaveRNNVocoder(wavernn) + + def _get_wavernn(self, *, dl_kwargs=None): + model = WaveRNN(**self._wavernn_params) + url = f"{_BASE_URL}/{self._wavernn_path}" + dl_kwargs = {} if dl_kwargs is None else dl_kwargs + state_dict = load_state_dict_from_url(url, **dl_kwargs) + model.load_state_dict(state_dict) + model.eval() + return model + + +class _GriffinLimMixin: + def get_vocoder(self, **_): + return _GriffinLimVocoder() + + +################################################################################ +# Bundle classes +################################################################################ + + +@dataclass +class _Tacotron2WaveRNNCharBundle(_WaveRNNMixin, _Tacotron2Mixin, _CharMixin, Tacotron2TTSBundle): + pass + + +@dataclass +class _Tacotron2WaveRNNPhoneBundle(_WaveRNNMixin, _Tacotron2Mixin, _PhoneMixin, Tacotron2TTSBundle): + pass + + +@dataclass +class _Tacotron2GriffinLimCharBundle(_GriffinLimMixin, _Tacotron2Mixin, _CharMixin, Tacotron2TTSBundle): + pass + + +@dataclass +class _Tacotron2GriffinLimPhoneBundle(_GriffinLimMixin, _Tacotron2Mixin, _PhoneMixin, Tacotron2TTSBundle): + pass + + +################################################################################ +# Instantiate bundle objects +################################################################################ + + +TACOTRON2_GRIFFINLIM_CHAR_LJSPEECH = _Tacotron2GriffinLimCharBundle( + _tacotron2_path="tacotron2_english_characters_1500_epochs_ljspeech.pth", + _tacotron2_params=utils._get_taco_params(n_symbols=38), +) +TACOTRON2_GRIFFINLIM_CHAR_LJSPEECH.__doc__ = """Character-based TTS pipeline with :py:class:`~torchaudio.models.Tacotron2` trained on *LJSpeech* :cite:`ljspeech17` for 1,500 epochs, and +:py:class:`~torchaudio.transforms.GriffinLim` as vocoder. + +The text processor encodes the input texts character-by-character. + +You can find the training script `here `__. +The default parameters were used. + +Please refer to :func:`torchaudio.pipelines.Tacotron2TTSBundle` for the usage. + +Example - "Hello world! T T S stands for Text to Speech!" + + .. image:: https://download.pytorch.org/torchaudio/doc-assets/TACOTRON2_GRIFFINLIM_CHAR_LJSPEECH.png + :alt: Spectrogram generated by Tacotron2 + + .. raw:: html + + + +Example - "The examination and testimony of the experts enabled the Commission to conclude that five shots may have been fired," + + .. image:: https://download.pytorch.org/torchaudio/doc-assets/TACOTRON2_GRIFFINLIM_CHAR_LJSPEECH_v2.png + :alt: Spectrogram generated by Tacotron2 + + .. raw:: html + + +""" # noqa: E501 + +TACOTRON2_GRIFFINLIM_PHONE_LJSPEECH = _Tacotron2GriffinLimPhoneBundle( + _tacotron2_path="tacotron2_english_phonemes_1500_epochs_ljspeech.pth", + _tacotron2_params=utils._get_taco_params(n_symbols=96), +) +TACOTRON2_GRIFFINLIM_PHONE_LJSPEECH.__doc__ = """Phoneme-based TTS pipeline with :py:class:`~torchaudio.models.Tacotron2` trained on *LJSpeech* :cite:`ljspeech17` for 1,500 epochs and +:py:class:`~torchaudio.transforms.GriffinLim` as vocoder. + +The text processor encodes the input texts based on phoneme. +It uses `DeepPhonemizer `__ to convert +graphemes to phonemes. +The model (*en_us_cmudict_forward*) was trained on +`CMUDict `__. + +You can find the training script `here `__. +The text processor is set to the *"english_phonemes"*. + +Please refer to :func:`torchaudio.pipelines.Tacotron2TTSBundle` for the usage. + +Example - "Hello world! T T S stands for Text to Speech!" + + .. image:: https://download.pytorch.org/torchaudio/doc-assets/TACOTRON2_GRIFFINLIM_PHONE_LJSPEECH.png + :alt: Spectrogram generated by Tacotron2 + + .. raw:: html + + + +Example - "The examination and testimony of the experts enabled the Commission to conclude that five shots may have been fired," + + .. image:: https://download.pytorch.org/torchaudio/doc-assets/TACOTRON2_GRIFFINLIM_PHONE_LJSPEECH_v2.png + :alt: Spectrogram generated by Tacotron2 + + .. raw:: html + + + +""" # noqa: E501 + +TACOTRON2_WAVERNN_CHAR_LJSPEECH = _Tacotron2WaveRNNCharBundle( + _tacotron2_path="tacotron2_english_characters_1500_epochs_wavernn_ljspeech.pth", + _tacotron2_params=utils._get_taco_params(n_symbols=38), + _wavernn_path="wavernn_10k_epochs_8bits_ljspeech.pth", + _wavernn_params=utils._get_wrnn_params(), +) +TACOTRON2_WAVERNN_CHAR_LJSPEECH.__doc__ = """Character-based TTS pipeline with :py:class:`~torchaudio.models.Tacotron2` trained on *LJSpeech* :cite:`ljspeech17` for 1,500 epochs and :py:class:`~torchaudio.models.WaveRNN` vocoder trained on 8 bits depth waveform of *LJSpeech* :cite:`ljspeech17` for 10,000 epochs. + +The text processor encodes the input texts character-by-character. + +You can find the training script `here `__. +The following parameters were used; ``win_length=1100``, ``hop_length=275``, ``n_fft=2048``, +``mel_fmin=40``, and ``mel_fmax=11025``. + +You can find the training script `here `__. + +Please refer to :func:`torchaudio.pipelines.Tacotron2TTSBundle` for the usage. + +Example - "Hello world! T T S stands for Text to Speech!" + + .. image:: https://download.pytorch.org/torchaudio/doc-assets/TACOTRON2_WAVERNN_CHAR_LJSPEECH.png + :alt: Spectrogram generated by Tacotron2 + + .. raw:: html + + + +Example - "The examination and testimony of the experts enabled the Commission to conclude that five shots may have been fired," + + .. image:: https://download.pytorch.org/torchaudio/doc-assets/TACOTRON2_WAVERNN_CHAR_LJSPEECH_v2.png + :alt: Spectrogram generated by Tacotron2 + + .. raw:: html + + +""" # noqa: E501 + +TACOTRON2_WAVERNN_PHONE_LJSPEECH = _Tacotron2WaveRNNPhoneBundle( + _tacotron2_path="tacotron2_english_phonemes_1500_epochs_wavernn_ljspeech.pth", + _tacotron2_params=utils._get_taco_params(n_symbols=96), + _wavernn_path="wavernn_10k_epochs_8bits_ljspeech.pth", + _wavernn_params=utils._get_wrnn_params(), +) +TACOTRON2_WAVERNN_PHONE_LJSPEECH.__doc__ = """Phoneme-based TTS pipeline with :py:class:`~torchaudio.models.Tacotron2` trained on *LJSpeech* :cite:`ljspeech17` for 1,500 epochs, and +:py:class:`~torchaudio.models.WaveRNN` vocoder trained on 8 bits depth waveform of *LJSpeech* :cite:`ljspeech17` for 10,000 epochs. + +The text processor encodes the input texts based on phoneme. +It uses `DeepPhonemizer `__ to convert +graphemes to phonemes. +The model (*en_us_cmudict_forward*) was trained on +`CMUDict `__. + +You can find the training script for Tacotron2 `here `__. +The following parameters were used; ``win_length=1100``, ``hop_length=275``, ``n_fft=2048``, +``mel_fmin=40``, and ``mel_fmax=11025``. + +You can find the training script for WaveRNN `here `__. + +Please refer to :func:`torchaudio.pipelines.Tacotron2TTSBundle` for the usage. + +Example - "Hello world! T T S stands for Text to Speech!" + + .. image:: https://download.pytorch.org/torchaudio/doc-assets/TACOTRON2_WAVERNN_PHONE_LJSPEECH.png + :alt: Spectrogram generated by Tacotron2 + + .. raw:: html + + + + +Example - "The examination and testimony of the experts enabled the Commission to conclude that five shots may have been fired," + + .. image:: https://download.pytorch.org/torchaudio/doc-assets/TACOTRON2_WAVERNN_PHONE_LJSPEECH_v2.png + :alt: Spectrogram generated by Tacotron2 + + .. raw:: html + + +""" # noqa: E501 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/pipelines/_tts/interface.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/pipelines/_tts/interface.py new file mode 100644 index 0000000000000000000000000000000000000000..564f236bc7c239d17dc82db04c350a9ccc618841 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/pipelines/_tts/interface.py @@ -0,0 +1,255 @@ +from abc import ABC, abstractmethod +from typing import List, Optional, Tuple, Union + +from torch import Tensor +from torchaudio.models import Tacotron2 + + +class _TextProcessor(ABC): + @property + @abstractmethod + def tokens(self): + """The tokens that the each value in the processed tensor represent. + + :type: List[str] + """ + + @abstractmethod + def __call__(self, texts: Union[str, List[str]]) -> Tuple[Tensor, Tensor]: + """Encode the given (batch of) texts into numerical tensors + + Args: + text (str or list of str): The input texts. + + Returns: + (Tensor, Tensor): + Tensor: + The encoded texts. Shape: `(batch, max length)` + Tensor: + The valid length of each sample in the batch. Shape: `(batch, )`. + """ + + +class _Vocoder(ABC): + @property + @abstractmethod + def sample_rate(self): + """The sample rate of the resulting waveform + + :type: float + """ + + @abstractmethod + def __call__(self, specgrams: Tensor, lengths: Optional[Tensor] = None) -> Tuple[Tensor, Optional[Tensor]]: + """Generate waveform from the given input, such as spectrogram + + Args: + specgrams (Tensor): + The input spectrogram. Shape: `(batch, frequency bins, time)`. + The expected shape depends on the implementation. + lengths (Tensor, or None, optional): + The valid length of each sample in the batch. Shape: `(batch, )`. + (Default: `None`) + + Returns: + (Tensor, Optional[Tensor]): + Tensor: + The generated waveform. Shape: `(batch, max length)` + Tensor or None: + The valid length of each sample in the batch. Shape: `(batch, )`. + """ + + +class Tacotron2TTSBundle(ABC): + """Data class that bundles associated information to use pretrained Tacotron2 and vocoder. + + This class provides interfaces for instantiating the pretrained model along with + the information necessary to retrieve pretrained weights and additional data + to be used with the model. + + Torchaudio library instantiates objects of this class, each of which represents + a different pretrained model. Client code should access pretrained models via these + instances. + + Please see below for the usage and the available values. + + Example - Character-based TTS pipeline with Tacotron2 and WaveRNN + >>> import torchaudio + >>> + >>> text = "Hello, T T S !" + >>> bundle = torchaudio.pipelines.TACOTRON2_WAVERNN_CHAR_LJSPEECH + >>> + >>> # Build processor, Tacotron2 and WaveRNN model + >>> processor = bundle.get_text_processor() + >>> tacotron2 = bundle.get_tacotron2() + Downloading: + 100%|███████████████████████████████| 107M/107M [00:01<00:00, 87.9MB/s] + >>> vocoder = bundle.get_vocoder() + Downloading: + 100%|███████████████████████████████| 16.7M/16.7M [00:00<00:00, 78.1MB/s] + >>> + >>> # Encode text + >>> input, lengths = processor(text) + >>> + >>> # Generate (mel-scale) spectrogram + >>> specgram, lengths, _ = tacotron2.infer(input, lengths) + >>> + >>> # Convert spectrogram to waveform + >>> waveforms, lengths = vocoder(specgram, lengths) + >>> + >>> torchaudio.save('hello-tts.wav', waveforms, vocoder.sample_rate) + + Example - Phoneme-based TTS pipeline with Tacotron2 and WaveRNN + >>> + >>> # Note: + >>> # This bundle uses pre-trained DeepPhonemizer as + >>> # the text pre-processor. + >>> # Please install deep-phonemizer. + >>> # See https://github.com/as-ideas/DeepPhonemizer + >>> # The pretrained weight is automatically downloaded. + >>> + >>> import torchaudio + >>> + >>> text = "Hello, TTS!" + >>> bundle = torchaudio.pipelines.TACOTRON2_WAVERNN_PHONE_LJSPEECH + >>> + >>> # Build processor, Tacotron2 and WaveRNN model + >>> processor = bundle.get_text_processor() + Downloading: + 100%|███████████████████████████████| 63.6M/63.6M [00:04<00:00, 15.3MB/s] + >>> tacotron2 = bundle.get_tacotron2() + Downloading: + 100%|███████████████████████████████| 107M/107M [00:01<00:00, 87.9MB/s] + >>> vocoder = bundle.get_vocoder() + Downloading: + 100%|███████████████████████████████| 16.7M/16.7M [00:00<00:00, 78.1MB/s] + >>> + >>> # Encode text + >>> input, lengths = processor(text) + >>> + >>> # Generate (mel-scale) spectrogram + >>> specgram, lengths, _ = tacotron2.infer(input, lengths) + >>> + >>> # Convert spectrogram to waveform + >>> waveforms, lengths = vocoder(specgram, lengths) + >>> + >>> torchaudio.save('hello-tts.wav', waveforms, vocoder.sample_rate) + """ + + # Using the inner class so that these interfaces are not directly exposed on + # `torchaudio.pipelines`, but still listed in documentation. + # The thing is, text processing and vocoder are generic and we do not know what kind of + # new text processing and vocoder will be added in the future, so we want to make these + # interfaces specific to this Tacotron2TTS pipeline. + + class TextProcessor(_TextProcessor): + """Interface of the text processing part of Tacotron2TTS pipeline + + See :func:`torchaudio.pipelines.Tacotron2TTSBundle.get_text_processor` for the usage. + """ + + class Vocoder(_Vocoder): + """Interface of the vocoder part of Tacotron2TTS pipeline + + See :func:`torchaudio.pipelines.Tacotron2TTSBundle.get_vocoder` for the usage. + """ + + @abstractmethod + def get_text_processor(self, *, dl_kwargs=None) -> TextProcessor: + """Create a text processor + + For character-based pipeline, this processor splits the input text by character. + For phoneme-based pipeline, this processor converts the input text (grapheme) to + phonemes. + + If a pre-trained weight file is necessary, + :func:`torch.hub.download_url_to_file` is used to downloaded it. + + Args: + dl_kwargs (dictionary of keyword arguments,): + Passed to :func:`torch.hub.download_url_to_file`. + + Returns: + TextProcessor: + A callable which takes a string or a list of strings as input and + returns Tensor of encoded texts and Tensor of valid lengths. + The object also has ``tokens`` property, which allows to recover the + tokenized form. + + Example - Character-based + >>> text = [ + >>> "Hello World!", + >>> "Text-to-speech!", + >>> ] + >>> bundle = torchaudio.pipelines.TACOTRON2_WAVERNN_CHAR_LJSPEECH + >>> processor = bundle.get_text_processor() + >>> input, lengths = processor(text) + >>> + >>> print(input) + tensor([[19, 16, 23, 23, 26, 11, 34, 26, 29, 23, 15, 2, 0, 0, 0], + [31, 16, 35, 31, 1, 31, 26, 1, 30, 27, 16, 16, 14, 19, 2]], + dtype=torch.int32) + >>> + >>> print(lengths) + tensor([12, 15], dtype=torch.int32) + >>> + >>> print([processor.tokens[i] for i in input[0, :lengths[0]]]) + ['h', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd', '!'] + >>> print([processor.tokens[i] for i in input[1, :lengths[1]]]) + ['t', 'e', 'x', 't', '-', 't', 'o', '-', 's', 'p', 'e', 'e', 'c', 'h', '!'] + + Example - Phoneme-based + >>> text = [ + >>> "Hello, T T S !", + >>> "Text-to-speech!", + >>> ] + >>> bundle = torchaudio.pipelines.TACOTRON2_WAVERNN_PHONE_LJSPEECH + >>> processor = bundle.get_text_processor() + Downloading: + 100%|███████████████████████████████| 63.6M/63.6M [00:04<00:00, 15.3MB/s] + >>> input, lengths = processor(text) + >>> + >>> print(input) + tensor([[54, 20, 65, 69, 11, 92, 44, 65, 38, 2, 0, 0, 0, 0], + [81, 40, 64, 79, 81, 1, 81, 20, 1, 79, 77, 59, 37, 2]], + dtype=torch.int32) + >>> + >>> print(lengths) + tensor([10, 14], dtype=torch.int32) + >>> + >>> print([processor.tokens[i] for i in input[0]]) + ['HH', 'AH', 'L', 'OW', ' ', 'W', 'ER', 'L', 'D', '!', '_', '_', '_', '_'] + >>> print([processor.tokens[i] for i in input[1]]) + ['T', 'EH', 'K', 'S', 'T', '-', 'T', 'AH', '-', 'S', 'P', 'IY', 'CH', '!'] + """ + + @abstractmethod + def get_vocoder(self, *, dl_kwargs=None) -> Vocoder: + """Create a vocoder module, based off of either WaveRNN or GriffinLim. + + If a pre-trained weight file is necessary, + :func:`torch.hub.load_state_dict_from_url` is used to downloaded it. + + Args: + dl_kwargs (dictionary of keyword arguments): + Passed to :func:`torch.hub.load_state_dict_from_url`. + + Returns: + Vocoder: + A vocoder module, which takes spectrogram Tensor and an optional + length Tensor, then returns resulting waveform Tensor and an optional + length Tensor. + """ + + @abstractmethod + def get_tacotron2(self, *, dl_kwargs=None) -> Tacotron2: + """Create a Tacotron2 model with pre-trained weight. + + Args: + dl_kwargs (dictionary of keyword arguments): + Passed to :func:`torch.hub.load_state_dict_from_url`. + + Returns: + Tacotron2: + The resulting model. + """ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/pipelines/_tts/utils.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/pipelines/_tts/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..da466aebedd28ca78628b404344af5ff34ff057d --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/pipelines/_tts/utils.py @@ -0,0 +1,230 @@ +import logging +import os + +import torch +from torchaudio._internal import download_url_to_file, module_utils as _mod_utils + + +def _get_chars(): + return ( + "_", + "-", + "!", + "'", + "(", + ")", + ",", + ".", + ":", + ";", + "?", + " ", + "a", + "b", + "c", + "d", + "e", + "f", + "g", + "h", + "i", + "j", + "k", + "l", + "m", + "n", + "o", + "p", + "q", + "r", + "s", + "t", + "u", + "v", + "w", + "x", + "y", + "z", + ) + + +def _get_phones(): + return ( + "_", + "-", + "!", + "'", + "(", + ")", + ",", + ".", + ":", + ";", + "?", + " ", + "AA", + "AA0", + "AA1", + "AA2", + "AE", + "AE0", + "AE1", + "AE2", + "AH", + "AH0", + "AH1", + "AH2", + "AO", + "AO0", + "AO1", + "AO2", + "AW", + "AW0", + "AW1", + "AW2", + "AY", + "AY0", + "AY1", + "AY2", + "B", + "CH", + "D", + "DH", + "EH", + "EH0", + "EH1", + "EH2", + "ER", + "ER0", + "ER1", + "ER2", + "EY", + "EY0", + "EY1", + "EY2", + "F", + "G", + "HH", + "IH", + "IH0", + "IH1", + "IH2", + "IY", + "IY0", + "IY1", + "IY2", + "JH", + "K", + "L", + "M", + "N", + "NG", + "OW", + "OW0", + "OW1", + "OW2", + "OY", + "OY0", + "OY1", + "OY2", + "P", + "R", + "S", + "SH", + "T", + "TH", + "UH", + "UH0", + "UH1", + "UH2", + "UW", + "UW0", + "UW1", + "UW2", + "V", + "W", + "Y", + "Z", + "ZH", + ) + + +def _to_tensor(indices): + lengths = torch.tensor([len(i) for i in indices], dtype=torch.int32) + values = [torch.tensor(i) for i in indices] + values = torch.nn.utils.rnn.pad_sequence(values, batch_first=True) + return values, lengths + + +def _load_phonemizer(file, dl_kwargs): + if not _mod_utils.is_module_available("dp"): + raise RuntimeError("DeepPhonemizer is not installed. Please install it.") + + from dp.phonemizer import Phonemizer + from dp.preprocessing.text import LanguageTokenizer, Preprocessor, SequenceTokenizer + + # By default, dp issues DEBUG level log. + logger = logging.getLogger("dp") + orig_level = logger.level + logger.setLevel(logging.INFO) + try: + url = f"https://public-asai-dl-models.s3.eu-central-1.amazonaws.com/DeepPhonemizer/{file}" + directory = os.path.join(torch.hub.get_dir(), "checkpoints") + os.makedirs(directory, exist_ok=True) + path = os.path.join(directory, file) + if not os.path.exists(path): + dl_kwargs = {} if dl_kwargs is None else dl_kwargs + download_url_to_file(url, path, **dl_kwargs) + with torch.serialization.safe_globals([Preprocessor, LanguageTokenizer, SequenceTokenizer]): + return Phonemizer.from_checkpoint(path) + finally: + logger.setLevel(orig_level) + + +def _unnormalize_waveform(waveform: torch.Tensor, bits: int) -> torch.Tensor: + r"""Transform waveform [-1, 1] to label [0, 2 ** bits - 1]""" + waveform = torch.clamp(waveform, -1, 1) + waveform = (waveform + 1.0) * (2**bits - 1) / 2 + return torch.clamp(waveform, 0, 2**bits - 1).int() + + +def _get_taco_params(n_symbols): + return { + "mask_padding": False, + "n_mels": 80, + "n_frames_per_step": 1, + "symbol_embedding_dim": 512, + "encoder_embedding_dim": 512, + "encoder_n_convolution": 3, + "encoder_kernel_size": 5, + "decoder_rnn_dim": 1024, + "decoder_max_step": 2000, + "decoder_dropout": 0.1, + "decoder_early_stopping": True, + "attention_rnn_dim": 1024, + "attention_hidden_dim": 128, + "attention_location_n_filter": 32, + "attention_location_kernel_size": 31, + "attention_dropout": 0.1, + "prenet_dim": 256, + "postnet_n_convolution": 5, + "postnet_kernel_size": 5, + "postnet_embedding_dim": 512, + "gate_threshold": 0.5, + "n_symbol": n_symbols, + } + + +def _get_wrnn_params(): + return { + "upsample_scales": [5, 5, 11], + "n_classes": 2**8, # n_bits = 8 + "hop_length": 275, + "n_res_block": 10, + "n_rnn": 512, + "n_fc": 512, + "kernel_size": 5, + "n_freq": 80, + "n_hidden": 128, + "n_output": 128, + } diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/pipelines/_wav2vec2/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/pipelines/_wav2vec2/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/pipelines/_wav2vec2/aligner.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/pipelines/_wav2vec2/aligner.py new file mode 100644 index 0000000000000000000000000000000000000000..3655d5bae88181796d6d889013b4438d0ea014b3 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/pipelines/_wav2vec2/aligner.py @@ -0,0 +1,87 @@ +from abc import ABC, abstractmethod +from typing import Dict, List + +import torch +import torchaudio.functional as F +from torch import Tensor +from torchaudio.functional import TokenSpan + + +class ITokenizer(ABC): + @abstractmethod + def __call__(self, transcript: List[str]) -> List[List[str]]: + """Tokenize the given transcript (list of word) + + .. note:: + + The toranscript must be normalized. + + Args: + transcript (list of str): Transcript (list of word). + + Returns: + (list of int): List of token sequences + """ + + +class Tokenizer(ITokenizer): + def __init__(self, dictionary: Dict[str, int]): + self.dictionary = dictionary + + def __call__(self, transcript: List[str]) -> List[List[int]]: + return [[self.dictionary[c] for c in word] for word in transcript] + + +def _align_emission_and_tokens(emission: Tensor, tokens: List[int], blank: int = 0): + device = emission.device + emission = emission.unsqueeze(0) + targets = torch.tensor([tokens], dtype=torch.int32, device=device) + + aligned_tokens, scores = F.forced_align(emission, targets, blank=blank) + + scores = scores.exp() # convert back to probability + aligned_tokens, scores = aligned_tokens[0], scores[0] # remove batch dimension + return aligned_tokens, scores + + +class IAligner(ABC): + @abstractmethod + def __call__(self, emission: Tensor, tokens: List[List[int]]) -> List[List[TokenSpan]]: + """Generate list of time-stamped token sequences + + Args: + emission (Tensor): Sequence of token probability distributions in log-domain. + Shape: `(time, tokens)`. + tokens (list of integer sequence): Tokenized transcript. + Output from :py:class:`torchaudio.pipelines.Wav2Vec2FABundle.Tokenizer`. + + Returns: + (list of TokenSpan sequence): Tokens with time stamps and scores. + """ + + +def _unflatten(list_, lengths): + assert len(list_) == sum(lengths) + i = 0 + ret = [] + for l in lengths: + ret.append(list_[i : i + l]) + i += l + return ret + + +def _flatten(nested_list): + return [item for list_ in nested_list for item in list_] + + +class Aligner(IAligner): + def __init__(self, blank): + self.blank = blank + + def __call__(self, emission: Tensor, tokens: List[List[int]]) -> List[List[TokenSpan]]: + if emission.ndim != 2: + raise ValueError(f"The input emission must be 2D. Found: {emission.shape}") + + aligned_tokens, scores = _align_emission_and_tokens(emission, _flatten(tokens), self.blank) + spans = F.merge_tokens(aligned_tokens, scores) + return _unflatten(spans, [len(ts) for ts in tokens]) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/pipelines/_wav2vec2/impl.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/pipelines/_wav2vec2/impl.py new file mode 100644 index 0000000000000000000000000000000000000000..d60fa8adb94e92e1a479fe94e09f521d0fe50056 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/pipelines/_wav2vec2/impl.py @@ -0,0 +1,1699 @@ +from dataclasses import dataclass +from typing import Any, Dict, Optional, Tuple + +from torch.nn import Module + +from . import aligner, utils + + +__all__ = [] # type: ignore + + +@dataclass +class Wav2Vec2Bundle: + """Data class that bundles associated information to use pretrained :py:class:`~torchaudio.models.Wav2Vec2Model`. + + This class provides interfaces for instantiating the pretrained model along with + the information necessary to retrieve pretrained weights and additional data + to be used with the model. + + Torchaudio library instantiates objects of this class, each of which represents + a different pretrained model. Client code should access pretrained models via these + instances. + + Please see below for the usage and the available values. + + Example - Feature Extraction + >>> import torchaudio + >>> + >>> bundle = torchaudio.pipelines.HUBERT_BASE + >>> + >>> # Build the model and load pretrained weight. + >>> model = bundle.get_model() + Downloading: + 100%|███████████████████████████████| 360M/360M [00:06<00:00, 60.6MB/s] + >>> + >>> # Resample audio to the expected sampling rate + >>> waveform = torchaudio.functional.resample(waveform, sample_rate, bundle.sample_rate) + >>> + >>> # Extract acoustic features + >>> features, _ = model.extract_features(waveform) + """ # noqa: E501 + + _path: str + _params: Dict[str, Any] + _sample_rate: float + _normalize_waveform: bool + _model_type: str + + @property + def sample_rate(self) -> float: + """Sample rate of the audio that the model is trained on. + + :type: float + """ + return self._sample_rate + + def _get_state_dict(self, dl_kwargs): + # Note: This method is overridden in ASR bundle + return utils._get_state_dict(self._path, dl_kwargs) + + def get_model(self, *, dl_kwargs=None) -> Module: + """Construct the model and load the pretrained weight. + + The weight file is downloaded from the internet and cached with + :func:`torch.hub.load_state_dict_from_url` + + Args: + dl_kwargs (dictionary of keyword arguments): Passed to :func:`torch.hub.load_state_dict_from_url`. + + Returns: + Variation of :py:class:`~torchaudio.models.Wav2Vec2Model`. + + For the models listed below, an additional layer normalization is performed on the input. + + For all other models, a :py:class:`~torchaudio.models.Wav2Vec2Model` instance is returned. + + - WAV2VEC2_LARGE_LV60K + - WAV2VEC2_ASR_LARGE_LV60K_10M + - WAV2VEC2_ASR_LARGE_LV60K_100H + - WAV2VEC2_ASR_LARGE_LV60K_960H + - WAV2VEC2_XLSR53 + - WAV2VEC2_XLSR_300M + - WAV2VEC2_XLSR_1B + - WAV2VEC2_XLSR_2B + - HUBERT_LARGE + - HUBERT_XLARGE + - HUBERT_ASR_LARGE + - HUBERT_ASR_XLARGE + - WAVLM_LARGE + """ + model = utils._get_model(self._model_type, self._params) + state_dict = self._get_state_dict(dl_kwargs) + model.load_state_dict(state_dict) + if self._normalize_waveform: + model = utils._extend_model(model, normalize_waveform=True) + model.eval() + return model + + +@dataclass +class Wav2Vec2ASRBundle(Wav2Vec2Bundle): + """Data class that bundles associated information to use pretrained + :py:class:`~torchaudio.models.Wav2Vec2Model`. + + This class provides interfaces for instantiating the pretrained model along with + the information necessary to retrieve pretrained weights and additional data + to be used with the model. + + Torchaudio library instantiates objects of this class, each of which represents + a different pretrained model. Client code should access pretrained models via these + instances. + + Please see below for the usage and the available values. + + Example - ASR + >>> import torchaudio + >>> + >>> bundle = torchaudio.pipelines.HUBERT_ASR_LARGE + >>> + >>> # Build the model and load pretrained weight. + >>> model = bundle.get_model() + Downloading: + 100%|███████████████████████████████| 1.18G/1.18G [00:17<00:00, 73.8MB/s] + >>> + >>> # Check the corresponding labels of the output. + >>> labels = bundle.get_labels() + >>> print(labels) + ('-', '|', 'E', 'T', 'A', 'O', 'N', 'I', 'H', 'S', 'R', 'D', 'L', 'U', 'M', 'W', 'C', 'F', 'G', 'Y', 'P', 'B', 'V', 'K', "'", 'X', 'J', 'Q', 'Z') + >>> + >>> # Resample audio to the expected sampling rate + >>> waveform = torchaudio.functional.resample(waveform, sample_rate, bundle.sample_rate) + >>> + >>> # Infer the label probability distribution + >>> emissions, _ = model(waveform) + >>> + >>> # Pass emission to decoder + >>> # `ctc_decode` is for illustration purpose only + >>> transcripts = ctc_decode(emissions, labels) + """ # noqa: E501 + + _labels: Tuple[str, ...] + _remove_aux_axis: Tuple[int, ...] = (1, 2, 3) + + def get_labels( + self, + *, + blank: str = "-", + ) -> Tuple[str, ...]: + """The output class labels. + + The first is blank token, and it is customizable. + + Args: + blank (str, optional): Blank token. (default: ``'-'``) + + Returns: + Tuple[str, ...]: + For models fine-tuned on ASR, returns the tuple of strings representing + the output class labels. + + Example + >>> from torchaudio.pipelines import HUBERT_ASR_LARGE as bundle + >>> bundle.get_labels() + ('-', '|', 'E', 'T', 'A', 'O', 'N', 'I', 'H', 'S', 'R', 'D', 'L', 'U', 'M', 'W', 'C', 'F', 'G', 'Y', 'P', 'B', 'V', 'K', "'", 'X', 'J', 'Q', 'Z') + """ # noqa: E501 + return (blank, *self._labels) + + def _get_state_dict(self, dl_kwargs): + return utils._get_state_dict(self._path, dl_kwargs, self._remove_aux_axis) + + +WAV2VEC2_BASE = Wav2Vec2Bundle( + _path="wav2vec2_fairseq_base_ls960.pth", + _params={ + "extractor_mode": "group_norm", + "extractor_conv_layer_config": [ + (512, 10, 5), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 2, 2), + (512, 2, 2), + ], + "extractor_conv_bias": False, + "encoder_embed_dim": 768, + "encoder_projection_dropout": 0.1, + "encoder_pos_conv_kernel": 128, + "encoder_pos_conv_groups": 16, + "encoder_num_layers": 12, + "encoder_num_heads": 12, + "encoder_attention_dropout": 0.1, + "encoder_ff_interm_features": 3072, + "encoder_ff_interm_dropout": 0.0, + "encoder_dropout": 0.1, + "encoder_layer_norm_first": False, + "encoder_layer_drop": 0.05, + "aux_num_out": None, + }, + _sample_rate=16000, + _normalize_waveform=False, + _model_type="Wav2Vec2", +) +WAV2VEC2_BASE.__doc__ = """Wav2vec 2.0 model ("base" architecture), +pre-trained on 960 hours of unlabeled audio from *LibriSpeech* dataset :cite:`7178964` +(the combination of "train-clean-100", "train-clean-360", and "train-other-500"), not fine-tuned. + +Originally published by the authors of *wav2vec 2.0* :cite:`baevski2020wav2vec` under MIT License and +redistributed with the same license. +[`License `__, +`Source `__] + +Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2Bundle` for the usage. +""" # noqa: E501 + +WAV2VEC2_ASR_BASE_10M = Wav2Vec2ASRBundle( + _path="wav2vec2_fairseq_base_ls960_asr_ll10m.pth", + _params={ + "extractor_mode": "group_norm", + "extractor_conv_layer_config": [ + (512, 10, 5), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 2, 2), + (512, 2, 2), + ], + "extractor_conv_bias": False, + "encoder_embed_dim": 768, + "encoder_projection_dropout": 0.1, + "encoder_pos_conv_kernel": 128, + "encoder_pos_conv_groups": 16, + "encoder_num_layers": 12, + "encoder_num_heads": 12, + "encoder_attention_dropout": 0.1, + "encoder_ff_interm_features": 3072, + "encoder_ff_interm_dropout": 0.0, + "encoder_dropout": 0.1, + "encoder_layer_norm_first": False, + "encoder_layer_drop": 0.05, + "aux_num_out": 29, + }, + _labels=utils._get_en_labels(), + _sample_rate=16000, + _normalize_waveform=False, + _model_type="Wav2Vec2", +) +WAV2VEC2_ASR_BASE_10M.__doc__ = """Wav2vec 2.0 model ("base" architecture with an extra linear module), +pre-trained on 960 hours of unlabeled audio from *LibriSpeech* dataset :cite:`7178964` +(the combination of "train-clean-100", "train-clean-360", and "train-other-500"), and +fine-tuned for ASR on 10 minutes of transcribed audio from *Libri-Light* dataset +:cite:`librilight` ("train-10min" subset). + +Originally published by the authors of *wav2vec 2.0* :cite:`baevski2020wav2vec` under MIT License and +redistributed with the same license. +[`License `__, +`Source `__] + +Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2ASRBundle` for the usage. +""" # noqa: E501 + +WAV2VEC2_ASR_BASE_100H = Wav2Vec2ASRBundle( + "wav2vec2_fairseq_base_ls960_asr_ls100.pth", + { + "extractor_mode": "group_norm", + "extractor_conv_layer_config": [ + (512, 10, 5), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 2, 2), + (512, 2, 2), + ], + "extractor_conv_bias": False, + "encoder_embed_dim": 768, + "encoder_projection_dropout": 0.1, + "encoder_pos_conv_kernel": 128, + "encoder_pos_conv_groups": 16, + "encoder_num_layers": 12, + "encoder_num_heads": 12, + "encoder_attention_dropout": 0.1, + "encoder_ff_interm_features": 3072, + "encoder_ff_interm_dropout": 0.0, + "encoder_dropout": 0.1, + "encoder_layer_norm_first": False, + "encoder_layer_drop": 0.05, + "aux_num_out": 29, + }, + _labels=utils._get_en_labels(), + _sample_rate=16000, + _normalize_waveform=False, + _model_type="Wav2Vec2", +) + +WAV2VEC2_ASR_BASE_100H.__doc__ = """Wav2vec 2.0 model ("base" architecture with an extra linear module), +pre-trained on 960 hours of unlabeled audio from *LibriSpeech* dataset :cite:`7178964` +(the combination of "train-clean-100", "train-clean-360", and "train-other-500"), and +fine-tuned for ASR on 100 hours of transcribed audio from "train-clean-100" subset. + +Originally published by the authors of *wav2vec 2.0* :cite:`baevski2020wav2vec` under MIT License and +redistributed with the same license. +[`License `__, +`Source `__] + +Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2ASRBundle` for the usage. +""" # noqa: E501 + +WAV2VEC2_ASR_BASE_960H = Wav2Vec2ASRBundle( + "wav2vec2_fairseq_base_ls960_asr_ls960.pth", + { + "extractor_mode": "group_norm", + "extractor_conv_layer_config": [ + (512, 10, 5), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 2, 2), + (512, 2, 2), + ], + "extractor_conv_bias": False, + "encoder_embed_dim": 768, + "encoder_projection_dropout": 0.1, + "encoder_pos_conv_kernel": 128, + "encoder_pos_conv_groups": 16, + "encoder_num_layers": 12, + "encoder_num_heads": 12, + "encoder_attention_dropout": 0.1, + "encoder_ff_interm_features": 3072, + "encoder_ff_interm_dropout": 0.0, + "encoder_dropout": 0.1, + "encoder_layer_norm_first": False, + "encoder_layer_drop": 0.05, + "aux_num_out": 29, + }, + _labels=utils._get_en_labels(), + _sample_rate=16000, + _normalize_waveform=False, + _model_type="Wav2Vec2", +) +WAV2VEC2_ASR_BASE_960H.__doc__ = """Wav2vec 2.0 model ("base" architecture with an extra linear module), +pre-trained on 960 hours of unlabeled audio from *LibriSpeech* dataset :cite:`7178964` +(the combination of "train-clean-100", "train-clean-360", and "train-other-500"), and +fine-tuned for ASR on the same audio with the corresponding transcripts. + +Originally published by the authors of *wav2vec 2.0* :cite:`baevski2020wav2vec` under MIT License and +redistributed with the same license. +[`License `__, +`Source `__] + +Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2ASRBundle` for the usage. +""" # noqa: E501 + +WAV2VEC2_LARGE = Wav2Vec2Bundle( + "wav2vec2_fairseq_large_ls960.pth", + { + "extractor_mode": "group_norm", + "extractor_conv_layer_config": [ + (512, 10, 5), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 2, 2), + (512, 2, 2), + ], + "extractor_conv_bias": False, + "encoder_embed_dim": 1024, + "encoder_projection_dropout": 0.1, + "encoder_pos_conv_kernel": 128, + "encoder_pos_conv_groups": 16, + "encoder_num_layers": 24, + "encoder_num_heads": 16, + "encoder_attention_dropout": 0.1, + "encoder_ff_interm_features": 4096, + "encoder_ff_interm_dropout": 0.0, + "encoder_dropout": 0.0, + "encoder_layer_norm_first": False, + "encoder_layer_drop": 0.2, + "aux_num_out": None, + }, + _sample_rate=16000, + _normalize_waveform=False, + _model_type="Wav2Vec2", +) +WAV2VEC2_LARGE.__doc__ = """Wav2vec 2.0 model ("large" architecture), +pre-trained on 960 hours of unlabeled audio from *LibriSpeech* dataset :cite:`7178964` +(the combination of "train-clean-100", "train-clean-360", and "train-other-500"), not fine-tuned. + +Originally published by the authors of *wav2vec 2.0* :cite:`baevski2020wav2vec` under MIT License and +redistributed with the same license. +[`License `__, +`Source `__] + +Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2Bundle` for the usage. +""" # noqa: E501 + +WAV2VEC2_ASR_LARGE_10M = Wav2Vec2ASRBundle( + "wav2vec2_fairseq_large_ls960_asr_ll10m.pth", + { + "extractor_mode": "group_norm", + "extractor_conv_layer_config": [ + (512, 10, 5), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 2, 2), + (512, 2, 2), + ], + "extractor_conv_bias": False, + "encoder_embed_dim": 1024, + "encoder_projection_dropout": 0.1, + "encoder_pos_conv_kernel": 128, + "encoder_pos_conv_groups": 16, + "encoder_num_layers": 24, + "encoder_num_heads": 16, + "encoder_attention_dropout": 0.1, + "encoder_ff_interm_features": 4096, + "encoder_ff_interm_dropout": 0.0, + "encoder_dropout": 0.0, + "encoder_layer_norm_first": False, + "encoder_layer_drop": 0.2, + "aux_num_out": 29, + }, + _labels=utils._get_en_labels(), + _sample_rate=16000, + _normalize_waveform=False, + _model_type="Wav2Vec2", +) +WAV2VEC2_ASR_LARGE_10M.__doc__ = """Wav2vec 2.0 model ("large" architecture with an extra linear module), +pre-trained on 960 hours of unlabeled audio from *LibriSpeech* dataset :cite:`7178964` +(the combination of "train-clean-100", "train-clean-360", and "train-other-500"), and +fine-tuned for ASR on 10 minutes of transcribed audio from *Libri-Light* dataset +:cite:`librilight` ("train-10min" subset). + +Originally published by the authors of *wav2vec 2.0* :cite:`baevski2020wav2vec` under MIT License and +redistributed with the same license. +[`License `__, +`Source `__] + +Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2ASRBundle` for the usage. +""" # noqa: E501 + +WAV2VEC2_ASR_LARGE_100H = Wav2Vec2ASRBundle( + "wav2vec2_fairseq_large_ls960_asr_ls100.pth", + { + "extractor_mode": "group_norm", + "extractor_conv_layer_config": [ + (512, 10, 5), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 2, 2), + (512, 2, 2), + ], + "extractor_conv_bias": False, + "encoder_embed_dim": 1024, + "encoder_projection_dropout": 0.1, + "encoder_pos_conv_kernel": 128, + "encoder_pos_conv_groups": 16, + "encoder_num_layers": 24, + "encoder_num_heads": 16, + "encoder_attention_dropout": 0.1, + "encoder_ff_interm_features": 4096, + "encoder_ff_interm_dropout": 0.0, + "encoder_dropout": 0.0, + "encoder_layer_norm_first": False, + "encoder_layer_drop": 0.2, + "aux_num_out": 29, + }, + _labels=utils._get_en_labels(), + _sample_rate=16000, + _normalize_waveform=False, + _model_type="Wav2Vec2", +) +WAV2VEC2_ASR_LARGE_100H.__doc__ = """Wav2vec 2.0 model ("large" architecture with an extra linear module), +pre-trained on 960 hours of unlabeled audio from *LibriSpeech* dataset :cite:`7178964` +(the combination of "train-clean-100", "train-clean-360", and "train-other-500"), and +fine-tuned for ASR on 100 hours of transcribed audio from +the same dataset ("train-clean-100" subset). + +Originally published by the authors of *wav2vec 2.0* :cite:`baevski2020wav2vec` under MIT License and +redistributed with the same license. +[`License `__, +`Source `__] + +Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2ASRBundle` for the usage. +""" # noqa: E501 + +WAV2VEC2_ASR_LARGE_960H = Wav2Vec2ASRBundle( + "wav2vec2_fairseq_large_ls960_asr_ls960.pth", + { + "extractor_mode": "group_norm", + "extractor_conv_layer_config": [ + (512, 10, 5), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 2, 2), + (512, 2, 2), + ], + "extractor_conv_bias": False, + "encoder_embed_dim": 1024, + "encoder_projection_dropout": 0.1, + "encoder_pos_conv_kernel": 128, + "encoder_pos_conv_groups": 16, + "encoder_num_layers": 24, + "encoder_num_heads": 16, + "encoder_attention_dropout": 0.1, + "encoder_ff_interm_features": 4096, + "encoder_ff_interm_dropout": 0.0, + "encoder_dropout": 0.0, + "encoder_layer_norm_first": False, + "encoder_layer_drop": 0.2, + "aux_num_out": 29, + }, + _labels=utils._get_en_labels(), + _sample_rate=16000, + _normalize_waveform=False, + _model_type="Wav2Vec2", +) +WAV2VEC2_ASR_LARGE_960H.__doc__ = """Wav2vec 2.0 model ("large" architecture with an extra linear module), +pre-trained on 960 hours of unlabeled audio from *LibriSpeech* dataset :cite:`7178964` +(the combination of "train-clean-100", "train-clean-360", and "train-other-500"), and +fine-tuned for ASR on the same audio with the corresponding transcripts. + +Originally published by the authors of *wav2vec 2.0* :cite:`baevski2020wav2vec` under MIT License and +redistributed with the same license. +[`License `__, +`Source `__] + +Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2ASRBundle` for the usage. +""" # noqa: E501 + +WAV2VEC2_LARGE_LV60K = Wav2Vec2Bundle( + "wav2vec2_fairseq_large_lv60k.pth", + { + "extractor_mode": "layer_norm", + "extractor_conv_layer_config": [ + (512, 10, 5), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 2, 2), + (512, 2, 2), + ], + "extractor_conv_bias": True, + "encoder_embed_dim": 1024, + "encoder_projection_dropout": 0.1, + "encoder_pos_conv_kernel": 128, + "encoder_pos_conv_groups": 16, + "encoder_num_layers": 24, + "encoder_num_heads": 16, + "encoder_attention_dropout": 0.1, + "encoder_ff_interm_features": 4096, + "encoder_ff_interm_dropout": 0.0, + "encoder_dropout": 0.0, + "encoder_layer_norm_first": True, + "encoder_layer_drop": 0.0, + "aux_num_out": None, + }, + _sample_rate=16000, + _normalize_waveform=True, + _model_type="Wav2Vec2", +) +WAV2VEC2_LARGE_LV60K.__doc__ = """Wav2vec 2.0 model ("large-lv60k" architecture), +pre-trained on 60,000 hours of unlabeled audio from *Libri-Light* dataset :cite:`librilight`, +not fine-tuned. + +Originally published by the authors of *wav2vec 2.0* :cite:`baevski2020wav2vec` under MIT License and +redistributed with the same license. +[`License `__, +`Source `__] + +Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2Bundle` for the usage. +""" # noqa: E501 + +WAV2VEC2_ASR_LARGE_LV60K_10M = Wav2Vec2ASRBundle( + "wav2vec2_fairseq_large_lv60k_asr_ll10m.pth", + { + "extractor_mode": "layer_norm", + "extractor_conv_layer_config": [ + (512, 10, 5), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 2, 2), + (512, 2, 2), + ], + "extractor_conv_bias": True, + "encoder_embed_dim": 1024, + "encoder_projection_dropout": 0.1, + "encoder_pos_conv_kernel": 128, + "encoder_pos_conv_groups": 16, + "encoder_num_layers": 24, + "encoder_num_heads": 16, + "encoder_attention_dropout": 0.1, + "encoder_ff_interm_features": 4096, + "encoder_ff_interm_dropout": 0.0, + "encoder_dropout": 0.0, + "encoder_layer_norm_first": True, + "encoder_layer_drop": 0.0, + "aux_num_out": 29, + }, + _labels=utils._get_en_labels(), + _sample_rate=16000, + _normalize_waveform=True, + _model_type="Wav2Vec2", +) +WAV2VEC2_ASR_LARGE_LV60K_10M.__doc__ = """Wav2vec 2.0 model ("large-lv60k" architecture with an extra linear module), +pre-trained on 60,000 hours of unlabeled audio from *Libri-Light* dataset :cite:`librilight`, and +fine-tuned for ASR on 10 minutes of transcribed audio from the same dataset ("train-10min" subset). + +Originally published by the authors of *wav2vec 2.0* :cite:`baevski2020wav2vec` under MIT License and +redistributed with the same license. +[`License `__, +`Source `__] + +Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2ASRBundle` for the usage. +""" # noqa: E501 + +WAV2VEC2_ASR_LARGE_LV60K_100H = Wav2Vec2ASRBundle( + "wav2vec2_fairseq_large_lv60k_asr_ls100.pth", + { + "extractor_mode": "layer_norm", + "extractor_conv_layer_config": [ + (512, 10, 5), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 2, 2), + (512, 2, 2), + ], + "extractor_conv_bias": True, + "encoder_embed_dim": 1024, + "encoder_projection_dropout": 0.1, + "encoder_pos_conv_kernel": 128, + "encoder_pos_conv_groups": 16, + "encoder_num_layers": 24, + "encoder_num_heads": 16, + "encoder_attention_dropout": 0.1, + "encoder_ff_interm_features": 4096, + "encoder_ff_interm_dropout": 0.0, + "encoder_dropout": 0.0, + "encoder_layer_norm_first": True, + "encoder_layer_drop": 0.0, + "aux_num_out": 29, + }, + _labels=utils._get_en_labels(), + _sample_rate=16000, + _normalize_waveform=True, + _model_type="Wav2Vec2", +) +WAV2VEC2_ASR_LARGE_LV60K_100H.__doc__ = """Wav2vec 2.0 model ("large-lv60k" architecture with an extra linear module), +pre-trained on 60,000 hours of unlabeled audio from *Libri-Light* dataset :cite:`librilight`, and +fine-tuned for ASR on 100 hours of transcribed audio from +*LibriSpeech* dataset :cite:`7178964` ("train-clean-100" subset). + +Originally published by the authors of *wav2vec 2.0* :cite:`baevski2020wav2vec` under MIT License and +redistributed with the same license. +[`License `__, +`Source `__] + +Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2ASRBundle` for the usage. +""" # noqa: E501 + +WAV2VEC2_ASR_LARGE_LV60K_960H = Wav2Vec2ASRBundle( + "wav2vec2_fairseq_large_lv60k_asr_ls960.pth", + { + "extractor_mode": "layer_norm", + "extractor_conv_layer_config": [ + (512, 10, 5), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 2, 2), + (512, 2, 2), + ], + "extractor_conv_bias": True, + "encoder_embed_dim": 1024, + "encoder_projection_dropout": 0.1, + "encoder_pos_conv_kernel": 128, + "encoder_pos_conv_groups": 16, + "encoder_num_layers": 24, + "encoder_num_heads": 16, + "encoder_attention_dropout": 0.1, + "encoder_ff_interm_features": 4096, + "encoder_ff_interm_dropout": 0.0, + "encoder_dropout": 0.0, + "encoder_layer_norm_first": True, + "encoder_layer_drop": 0.0, + "aux_num_out": 29, + }, + _labels=utils._get_en_labels(), + _sample_rate=16000, + _normalize_waveform=True, + _model_type="Wav2Vec2", +) +WAV2VEC2_ASR_LARGE_LV60K_960H.__doc__ = """Wav2vec 2.0 model ("large-lv60k" architecture with an extra linear module), +pre-trained on 60,000 hours of unlabeled audio from *Libri-Light* :cite:`librilight` dataset, and +fine-tuned for ASR on 960 hours of transcribed audio from *LibriSpeech* dataset :cite:`7178964` +(the combination of "train-clean-100", "train-clean-360", and "train-other-500"). + +Originally published by the authors of *wav2vec 2.0* :cite:`baevski2020wav2vec` under MIT License and +redistributed with the same license. +[`License `__, +`Source `__] + +Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2ASRBundle` for the usage. +""" # noqa: E501 + +WAV2VEC2_XLSR53 = Wav2Vec2Bundle( + "wav2vec2_fairseq_large_xlsr53.pth", + { + "extractor_mode": "layer_norm", + "extractor_conv_layer_config": [ + (512, 10, 5), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 2, 2), + (512, 2, 2), + ], + "extractor_conv_bias": True, + "encoder_embed_dim": 1024, + "encoder_projection_dropout": 0.0, + "encoder_pos_conv_kernel": 128, + "encoder_pos_conv_groups": 16, + "encoder_num_layers": 24, + "encoder_num_heads": 16, + "encoder_attention_dropout": 0.0, + "encoder_ff_interm_features": 4096, + "encoder_ff_interm_dropout": 0.0, + "encoder_dropout": 0.0, + "encoder_layer_norm_first": True, + "encoder_layer_drop": 0.0, + "aux_num_out": None, + }, + _sample_rate=16000, + _normalize_waveform=True, + _model_type="Wav2Vec2", +) +WAV2VEC2_XLSR53.__doc__ = """Wav2vec 2.0 model ("base" architecture), +pre-trained on 56,000 hours of unlabeled audio from multiple datasets ( +*Multilingual LibriSpeech* :cite:`Pratap_2020`, +*CommonVoice* :cite:`ardila2020common` and +*BABEL* :cite:`Gales2014SpeechRA`), +not fine-tuned. + +Originally published by the authors of +*Unsupervised Cross-lingual Representation Learning for Speech Recognition* +:cite:`conneau2020unsupervised` under MIT License and redistributed with the same license. +[`License `__, +`Source `__] + +Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2Bundle` for the usage. +""" # noqa: E501 + +HUBERT_BASE = Wav2Vec2Bundle( + "hubert_fairseq_base_ls960.pth", + { + "extractor_mode": "group_norm", + "extractor_conv_layer_config": [ + (512, 10, 5), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 2, 2), + (512, 2, 2), + ], + "extractor_conv_bias": False, + "encoder_embed_dim": 768, + "encoder_projection_dropout": 0.1, + "encoder_pos_conv_kernel": 128, + "encoder_pos_conv_groups": 16, + "encoder_num_layers": 12, + "encoder_num_heads": 12, + "encoder_attention_dropout": 0.1, + "encoder_ff_interm_features": 3072, + "encoder_ff_interm_dropout": 0.0, + "encoder_dropout": 0.1, + "encoder_layer_norm_first": False, + "encoder_layer_drop": 0.05, + "aux_num_out": None, + }, + _sample_rate=16000, + _normalize_waveform=False, + _model_type="Wav2Vec2", +) +HUBERT_BASE.__doc__ = """HuBERT model ("base" architecture), +pre-trained on 960 hours of unlabeled audio from *LibriSpeech* dataset :cite:`7178964` +(the combination of "train-clean-100", "train-clean-360", and "train-other-500"), not fine-tuned. + +Originally published by the authors of *HuBERT* :cite:`hsu2021hubert` under MIT License and +redistributed with the same license. +[`License `__, +`Source `__] + +Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2Bundle` for the usage. +""" # noqa: E501 + +HUBERT_LARGE = Wav2Vec2Bundle( + "hubert_fairseq_large_ll60k.pth", + { + "extractor_mode": "layer_norm", + "extractor_conv_layer_config": [ + (512, 10, 5), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 2, 2), + (512, 2, 2), + ], + "extractor_conv_bias": False, + "encoder_embed_dim": 1024, + "encoder_projection_dropout": 0.0, + "encoder_pos_conv_kernel": 128, + "encoder_pos_conv_groups": 16, + "encoder_num_layers": 24, + "encoder_num_heads": 16, + "encoder_attention_dropout": 0.0, + "encoder_ff_interm_features": 4096, + "encoder_ff_interm_dropout": 0.0, + "encoder_dropout": 0.0, + "encoder_layer_norm_first": True, + "encoder_layer_drop": 0.0, + "aux_num_out": None, + }, + _sample_rate=16000, + _normalize_waveform=True, + _model_type="Wav2Vec2", +) +HUBERT_LARGE.__doc__ = """HuBERT model ("large" architecture), +pre-trained on 60,000 hours of unlabeled audio from *Libri-Light* dataset :cite:`librilight`, +not fine-tuned. + +Originally published by the authors of *HuBERT* :cite:`hsu2021hubert` under MIT License and +redistributed with the same license. +[`License `__, +`Source `__] + +Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2Bundle` for the usage. +""" # noqa: E501 + +HUBERT_XLARGE = Wav2Vec2Bundle( + "hubert_fairseq_xlarge_ll60k.pth", + { + "extractor_mode": "layer_norm", + "extractor_conv_layer_config": [ + (512, 10, 5), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 2, 2), + (512, 2, 2), + ], + "extractor_conv_bias": False, + "encoder_embed_dim": 1280, + "encoder_projection_dropout": 0.0, + "encoder_pos_conv_kernel": 128, + "encoder_pos_conv_groups": 16, + "encoder_num_layers": 48, + "encoder_num_heads": 16, + "encoder_attention_dropout": 0.0, + "encoder_ff_interm_features": 5120, + "encoder_ff_interm_dropout": 0.0, + "encoder_dropout": 0.0, + "encoder_layer_norm_first": True, + "encoder_layer_drop": 0.0, + "aux_num_out": None, + }, + _sample_rate=16000, + _normalize_waveform=True, + _model_type="Wav2Vec2", +) +HUBERT_XLARGE.__doc__ = """HuBERT model ("extra large" architecture), +pre-trained on 60,000 hours of unlabeled audio from *Libri-Light* dataset :cite:`librilight`, +not fine-tuned. + +Originally published by the authors of *HuBERT* :cite:`hsu2021hubert` under MIT License and +redistributed with the same license. +[`License `__, +`Source `__] + +Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2Bundle` for the usage. +""" # noqa: E501 + +HUBERT_ASR_LARGE = Wav2Vec2ASRBundle( + "hubert_fairseq_large_ll60k_asr_ls960.pth", + { + "extractor_mode": "layer_norm", + "extractor_conv_layer_config": [ + (512, 10, 5), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 2, 2), + (512, 2, 2), + ], + "extractor_conv_bias": False, + "encoder_embed_dim": 1024, + "encoder_projection_dropout": 0.0, + "encoder_pos_conv_kernel": 128, + "encoder_pos_conv_groups": 16, + "encoder_num_layers": 24, + "encoder_num_heads": 16, + "encoder_attention_dropout": 0.0, + "encoder_ff_interm_features": 4096, + "encoder_ff_interm_dropout": 0.1, + "encoder_dropout": 0.0, + "encoder_layer_norm_first": True, + "encoder_layer_drop": 0.1, + "aux_num_out": 29, + }, + _labels=utils._get_en_labels(), + _sample_rate=16000, + _normalize_waveform=True, + _model_type="Wav2Vec2", +) +HUBERT_ASR_LARGE.__doc__ = """HuBERT model ("large" architecture), +pre-trained on 60,000 hours of unlabeled audio from *Libri-Light* dataset :cite:`librilight`, and +fine-tuned for ASR on 960 hours of transcribed audio from *LibriSpeech* dataset :cite:`7178964` +(the combination of "train-clean-100", "train-clean-360", and "train-other-500"). + +Originally published by the authors of *HuBERT* :cite:`hsu2021hubert` under MIT License and +redistributed with the same license. +[`License `__, +`Source `__] + +Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2ASRBundle` for the usage. +""" # noqa: E501 + +HUBERT_ASR_XLARGE = Wav2Vec2ASRBundle( + "hubert_fairseq_xlarge_ll60k_asr_ls960.pth", + { + "extractor_mode": "layer_norm", + "extractor_conv_layer_config": [ + (512, 10, 5), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 2, 2), + (512, 2, 2), + ], + "extractor_conv_bias": False, + "encoder_embed_dim": 1280, + "encoder_projection_dropout": 0.0, + "encoder_pos_conv_kernel": 128, + "encoder_pos_conv_groups": 16, + "encoder_num_layers": 48, + "encoder_num_heads": 16, + "encoder_attention_dropout": 0.0, + "encoder_ff_interm_features": 5120, + "encoder_ff_interm_dropout": 0.1, + "encoder_dropout": 0.0, + "encoder_layer_norm_first": True, + "encoder_layer_drop": 0.1, + "aux_num_out": 29, + }, + _labels=utils._get_en_labels(), + _sample_rate=16000, + _normalize_waveform=True, + _model_type="Wav2Vec2", +) +HUBERT_ASR_XLARGE.__doc__ = """HuBERT model ("extra large" architecture), +pre-trained on 60,000 hours of unlabeled audio from +*Libri-Light* dataset :cite:`librilight`, and +fine-tuned for ASR on 960 hours of transcribed audio from +*LibriSpeech* dataset :cite:`7178964` +(the combination of "train-clean-100", "train-clean-360", and "train-other-500"). + +Originally published by the authors of *HuBERT* :cite:`hsu2021hubert` under MIT License and +redistributed with the same license. +[`License `__, +`Source `__] + +Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2ASRBundle` for the usage. +""" # noqa: E501 + + +VOXPOPULI_ASR_BASE_10K_DE = Wav2Vec2ASRBundle( + "wav2vec2_voxpopuli_base_10k_asr_de.pt", + { + "extractor_mode": "group_norm", + "extractor_conv_layer_config": [ + (512, 10, 5), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 2, 2), + (512, 2, 2), + ], + "extractor_conv_bias": False, + "encoder_embed_dim": 768, + "encoder_projection_dropout": 0.0, + "encoder_pos_conv_kernel": 128, + "encoder_pos_conv_groups": 16, + "encoder_num_layers": 12, + "encoder_num_heads": 12, + "encoder_attention_dropout": 0.0, + "encoder_ff_interm_features": 3072, + "encoder_ff_interm_dropout": 0.1, + "encoder_dropout": 0.0, + "encoder_layer_norm_first": False, + "encoder_layer_drop": 0.1, + "aux_num_out": 32, + }, + _labels=utils._get_de_labels(), + _sample_rate=16000, + _normalize_waveform=False, + _remove_aux_axis=(1, 2, 3, 35), + _model_type="Wav2Vec2", +) +VOXPOPULI_ASR_BASE_10K_DE.__doc__ = """wav2vec 2.0 model ("base" architecture), +pre-trained on 10k hours of unlabeled audio from *VoxPopuli* dataset :cite:`voxpopuli` +("10k" subset, consisting of 23 languages), and +fine-tuned for ASR on 282 hours of transcribed audio from "de" subset. + +Originally published by the authors of *VoxPopuli* :cite:`voxpopuli` under CC BY-NC 4.0 and +redistributed with the same license. +[`License `__, +`Source `__] + +Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2ASRBundle` for the usage. +""" # noqa: E501 + + +VOXPOPULI_ASR_BASE_10K_EN = Wav2Vec2ASRBundle( + "wav2vec2_voxpopuli_base_10k_asr_en.pt", + { + "extractor_mode": "group_norm", + "extractor_conv_layer_config": [ + (512, 10, 5), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 2, 2), + (512, 2, 2), + ], + "extractor_conv_bias": False, + "encoder_embed_dim": 768, + "encoder_projection_dropout": 0.0, + "encoder_pos_conv_kernel": 128, + "encoder_pos_conv_groups": 16, + "encoder_num_layers": 12, + "encoder_num_heads": 12, + "encoder_attention_dropout": 0.0, + "encoder_ff_interm_features": 3072, + "encoder_ff_interm_dropout": 0.1, + "encoder_dropout": 0.0, + "encoder_layer_norm_first": False, + "encoder_layer_drop": 0.1, + "aux_num_out": 28, + }, + _labels=utils._get_vp_en_labels(), + _sample_rate=16000, + _normalize_waveform=False, + _remove_aux_axis=(1, 2, 3, 31), + _model_type="Wav2Vec2", +) +VOXPOPULI_ASR_BASE_10K_EN.__doc__ = """wav2vec 2.0 model ("base" architecture), +pre-trained on 10k hours of unlabeled audio from *VoxPopuli* dataset :cite:`voxpopuli` +("10k" subset, consisting of 23 languages), and +fine-tuned for ASR on 543 hours of transcribed audio from "en" subset. + +Originally published by the authors of *VoxPopuli* :cite:`voxpopuli` under CC BY-NC 4.0 and +redistributed with the same license. +[`License `__, +`Source `__] + +Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2ASRBundle` for the usage. +""" # noqa: E501 + + +VOXPOPULI_ASR_BASE_10K_ES = Wav2Vec2ASRBundle( + "wav2vec2_voxpopuli_base_10k_asr_es.pt", + { + "extractor_mode": "group_norm", + "extractor_conv_layer_config": [ + (512, 10, 5), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 2, 2), + (512, 2, 2), + ], + "extractor_conv_bias": False, + "encoder_embed_dim": 768, + "encoder_projection_dropout": 0.0, + "encoder_pos_conv_kernel": 128, + "encoder_pos_conv_groups": 16, + "encoder_num_layers": 12, + "encoder_num_heads": 12, + "encoder_attention_dropout": 0.0, + "encoder_ff_interm_features": 3072, + "encoder_ff_interm_dropout": 0.1, + "encoder_dropout": 0.0, + "encoder_layer_norm_first": False, + "encoder_layer_drop": 0.1, + "aux_num_out": 35, + }, + _labels=utils._get_es_labels(), + _sample_rate=16000, + _normalize_waveform=False, + _remove_aux_axis=(1, 2, 3, 35), + _model_type="Wav2Vec2", +) +VOXPOPULI_ASR_BASE_10K_ES.__doc__ = """wav2vec 2.0 model ("base" architecture), +pre-trained on 10k hours of unlabeled audio from *VoxPopuli* dataset :cite:`voxpopuli` +("10k" subset, consisting of 23 languages), and +fine-tuned for ASR on 166 hours of transcribed audio from "es" subset. + +Originally published by the authors of *VoxPopuli* :cite:`voxpopuli` under CC BY-NC 4.0 and +redistributed with the same license. +[`License `__, +`Source `__] + +Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2ASRBundle` for the usage. +""" # noqa: E501 + +VOXPOPULI_ASR_BASE_10K_FR = Wav2Vec2ASRBundle( + "wav2vec2_voxpopuli_base_10k_asr_fr.pt", + { + "extractor_mode": "group_norm", + "extractor_conv_layer_config": [ + (512, 10, 5), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 2, 2), + (512, 2, 2), + ], + "extractor_conv_bias": False, + "encoder_embed_dim": 768, + "encoder_projection_dropout": 0.0, + "encoder_pos_conv_kernel": 128, + "encoder_pos_conv_groups": 16, + "encoder_num_layers": 12, + "encoder_num_heads": 12, + "encoder_attention_dropout": 0.0, + "encoder_ff_interm_features": 3072, + "encoder_ff_interm_dropout": 0.1, + "encoder_dropout": 0.0, + "encoder_layer_norm_first": False, + "encoder_layer_drop": 0.1, + "aux_num_out": 43, + }, + _labels=utils._get_fr_labels(), + _sample_rate=16000, + _normalize_waveform=False, + _model_type="Wav2Vec2", +) +VOXPOPULI_ASR_BASE_10K_FR.__doc__ = """wav2vec 2.0 model ("base" architecture), +pre-trained on 10k hours of unlabeled audio from *VoxPopuli* dataset :cite:`voxpopuli` +("10k" subset, consisting of 23 languages), and +fine-tuned for ASR on 211 hours of transcribed audio from "fr" subset. + +Originally published by the authors of *VoxPopuli* :cite:`voxpopuli` under CC BY-NC 4.0 and +redistributed with the same license. +[`License `__, +`Source `__] + +Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2ASRBundle` for the usage. +""" # noqa: E501 + + +VOXPOPULI_ASR_BASE_10K_IT = Wav2Vec2ASRBundle( + "wav2vec2_voxpopuli_base_10k_asr_it.pt", + { + "extractor_mode": "group_norm", + "extractor_conv_layer_config": [ + (512, 10, 5), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 2, 2), + (512, 2, 2), + ], + "extractor_conv_bias": False, + "encoder_embed_dim": 768, + "encoder_projection_dropout": 0.0, + "encoder_pos_conv_kernel": 128, + "encoder_pos_conv_groups": 16, + "encoder_num_layers": 12, + "encoder_num_heads": 12, + "encoder_attention_dropout": 0.0, + "encoder_ff_interm_features": 3072, + "encoder_ff_interm_dropout": 0.1, + "encoder_dropout": 0.0, + "encoder_layer_norm_first": False, + "encoder_layer_drop": 0.1, + "aux_num_out": 37, + }, + _labels=utils._get_it_labels(), + _sample_rate=16000, + _normalize_waveform=False, + _remove_aux_axis=(1, 2, 3), + _model_type="Wav2Vec2", +) +VOXPOPULI_ASR_BASE_10K_IT.__doc__ = """wav2vec 2.0 model ("base" architecture), +pre-trained on 10k hours of unlabeled audio from *VoxPopuli* dataset :cite:`voxpopuli` +("10k" subset, consisting of 23 languages), and +fine-tuned for ASR on 91 hours of transcribed audio from "it" subset. + +Originally published by the authors of *VoxPopuli* :cite:`voxpopuli` under CC BY-NC 4.0 and +redistributed with the same license. +[`License `__, +`Source `__] + +Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2ASRBundle` for the usage. +""" # noqa: E501 + + +WAVLM_BASE = Wav2Vec2Bundle( + "wavlm_base.pth", + { + "extractor_mode": "group_norm", + "extractor_conv_layer_config": [ + (512, 10, 5), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 2, 2), + (512, 2, 2), + ], + "extractor_conv_bias": False, + "encoder_embed_dim": 768, + "encoder_projection_dropout": 0.1, + "encoder_pos_conv_kernel": 128, + "encoder_pos_conv_groups": 16, + "encoder_num_layers": 12, + "encoder_num_heads": 12, + "encoder_max_distance": 800, + "encoder_num_buckets": 320, + "encoder_attention_dropout": 0.1, + "encoder_ff_interm_features": 3072, + "encoder_ff_interm_dropout": 0.0, + "encoder_dropout": 0.1, + "encoder_layer_norm_first": False, + "encoder_layer_drop": 0.05, + "aux_num_out": None, + }, + _model_type="WavLM", + _sample_rate=16000, + _normalize_waveform=False, +) +WAVLM_BASE.__doc__ = """WavLM Base model ("base" architecture), +pre-trained on 960 hours of unlabeled audio from *LibriSpeech* dataset :cite:`7178964`, not fine-tuned. + +Originally published by the authors of *WavLM* :cite:`chen2022wavlm` under MIT License and +redistributed with the same license. +[`License `__, +`Source `__] + +Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2Bundle` for the usage. +""" # noqa: E501 + + +WAVLM_BASE_PLUS = Wav2Vec2Bundle( + "wavlm_base_plus.pth", + { + "extractor_mode": "group_norm", + "extractor_conv_layer_config": [ + (512, 10, 5), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 2, 2), + (512, 2, 2), + ], + "extractor_conv_bias": False, + "encoder_embed_dim": 768, + "encoder_projection_dropout": 0.1, + "encoder_pos_conv_kernel": 128, + "encoder_pos_conv_groups": 16, + "encoder_num_layers": 12, + "encoder_num_heads": 12, + "encoder_max_distance": 800, + "encoder_num_buckets": 320, + "encoder_attention_dropout": 0.1, + "encoder_ff_interm_features": 3072, + "encoder_ff_interm_dropout": 0.0, + "encoder_dropout": 0.1, + "encoder_layer_norm_first": False, + "encoder_layer_drop": 0.05, + "aux_num_out": None, + }, + _model_type="WavLM", + _sample_rate=16000, + _normalize_waveform=False, +) +WAVLM_BASE_PLUS.__doc__ = """WavLM Base+ model ("base" architecture), +pre-trained on 60,000 hours of Libri-Light dataset :cite:`librilight`, 10,000 hours of GigaSpeech :cite:`GigaSpeech2021`, +and 24,000 hours of *VoxPopuli* :cite:`voxpopuli`, not fine-tuned. + +Originally published by the authors of *WavLM* :cite:`chen2022wavlm` under MIT License and +redistributed with the same license. +[`License `__, +`Source `__] + +Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2Bundle` for the usage. +""" # noqa: E501 + + +WAVLM_LARGE = Wav2Vec2Bundle( + "wavlm_large.pth", + { + "extractor_mode": "layer_norm", + "extractor_conv_layer_config": [ + (512, 10, 5), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 2, 2), + (512, 2, 2), + ], + "extractor_conv_bias": False, + "encoder_embed_dim": 1024, + "encoder_projection_dropout": 0.1, + "encoder_pos_conv_kernel": 128, + "encoder_pos_conv_groups": 16, + "encoder_num_layers": 24, + "encoder_num_heads": 16, + "encoder_max_distance": 800, + "encoder_num_buckets": 320, + "encoder_attention_dropout": 0.1, + "encoder_ff_interm_features": 4096, + "encoder_ff_interm_dropout": 0.0, + "encoder_dropout": 0.1, + "encoder_layer_norm_first": True, + "encoder_layer_drop": 0.05, + "aux_num_out": None, + }, + _model_type="WavLM", + _sample_rate=16000, + _normalize_waveform=True, +) +WAVLM_LARGE.__doc__ = """WavLM Large model ("large" architecture), +pre-trained on 60,000 hours of Libri-Light dataset :cite:`librilight`, 10,000 hours of GigaSpeech :cite:`GigaSpeech2021`, +and 24,000 hours of *VoxPopuli* :cite:`voxpopuli`, not fine-tuned. + +Originally published by the authors of *WavLM* :cite:`chen2022wavlm` under MIT License and +redistributed with the same license. +[`License `__, +`Source `__] + +Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2Bundle` for the usage. +""" # noqa: E501 + + +WAV2VEC2_XLSR_300M = Wav2Vec2Bundle( + "wav2vec2_xlsr_300m.pth", + { + "extractor_mode": "layer_norm", + "extractor_conv_layer_config": [ + (512, 10, 5), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 2, 2), + (512, 2, 2), + ], + "extractor_conv_bias": True, + "encoder_embed_dim": 1024, + "encoder_projection_dropout": 0.0, + "encoder_pos_conv_kernel": 128, + "encoder_pos_conv_groups": 16, + "encoder_num_layers": 24, + "encoder_num_heads": 16, + "encoder_attention_dropout": 0.0, + "encoder_ff_interm_features": 4096, + "encoder_ff_interm_dropout": 0.0, + "encoder_dropout": 0.0, + "encoder_layer_norm_first": True, + "encoder_layer_drop": 0.0, + "aux_num_out": None, + }, + _model_type="Wav2Vec2", + _sample_rate=16000, + _normalize_waveform=True, +) +WAV2VEC2_XLSR_300M.__doc__ = """XLS-R model with 300 million parameters, +pre-trained on 436,000 hours of unlabeled audio from multiple datasets ( +*Multilingual LibriSpeech* :cite:`Pratap_2020`, +*CommonVoice* :cite:`ardila2020common`, +*VoxLingua107* :cite:`valk2021voxlingua107`, +*BABEL* :cite:`Gales2014SpeechRA`, and +*VoxPopuli* :cite:`voxpopuli`) in 128 languages, +not fine-tuned. + +Originally published by the authors of *XLS-R* :cite:`babu2021xls` under MIT License and +redistributed with the same license. +[`License `__, +`Source `__] + +Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2Bundle` for usage details. +""" # noqa: E501 + + +WAV2VEC2_XLSR_1B = Wav2Vec2Bundle( + "wav2vec2_xlsr_1b.pth", + { + "extractor_mode": "layer_norm", + "extractor_conv_layer_config": [ + (512, 10, 5), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 2, 2), + (512, 2, 2), + ], + "extractor_conv_bias": True, + "encoder_embed_dim": 1280, + "encoder_projection_dropout": 0.1, + "encoder_pos_conv_kernel": 128, + "encoder_pos_conv_groups": 16, + "encoder_num_layers": 48, + "encoder_num_heads": 16, + "encoder_attention_dropout": 0.0, + "encoder_ff_interm_features": 5120, + "encoder_ff_interm_dropout": 0.0, + "encoder_dropout": 0.0, + "encoder_layer_norm_first": True, + "encoder_layer_drop": 0.0, + "aux_num_out": None, + }, + _model_type="Wav2Vec2", + _sample_rate=16000, + _normalize_waveform=True, +) +WAV2VEC2_XLSR_1B.__doc__ = """XLS-R model with 1 billion parameters, +pre-trained on 436,000 hours of unlabeled audio from multiple datasets ( +*Multilingual LibriSpeech* :cite:`Pratap_2020`, +*CommonVoice* :cite:`ardila2020common`, +*VoxLingua107* :cite:`valk2021voxlingua107`, +*BABEL* :cite:`Gales2014SpeechRA`, and +*VoxPopuli* :cite:`voxpopuli`) in 128 languages, +not fine-tuned. + +Originally published by the authors of *XLS-R* :cite:`babu2021xls` under MIT License and +redistributed with the same license. +[`License `__, +`Source `__] + +Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2Bundle` for usage details. +""" # noqa: E501 + +WAV2VEC2_XLSR_2B = Wav2Vec2Bundle( + "wav2vec2_xlsr_2b.pth", + { + "extractor_mode": "layer_norm", + "extractor_conv_layer_config": [ + (512, 10, 5), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 2, 2), + (512, 2, 2), + ], + "extractor_conv_bias": True, + "encoder_embed_dim": 1920, + "encoder_projection_dropout": 0.1, + "encoder_pos_conv_kernel": 128, + "encoder_pos_conv_groups": 16, + "encoder_num_layers": 48, + "encoder_num_heads": 16, + "encoder_attention_dropout": 0.0, + "encoder_ff_interm_features": 7680, + "encoder_ff_interm_dropout": 0.0, + "encoder_dropout": 0.0, + "encoder_layer_norm_first": True, + "encoder_layer_drop": 0.0, + "aux_num_out": None, + }, + _model_type="Wav2Vec2", + _sample_rate=16000, + _normalize_waveform=True, +) +WAV2VEC2_XLSR_2B.__doc__ = """XLS-R model with 2 billion parameters, +pre-trained on 436,000 hours of unlabeled audio from multiple datasets ( +*Multilingual LibriSpeech* :cite:`Pratap_2020`, +*CommonVoice* :cite:`ardila2020common`, +*VoxLingua107* :cite:`valk2021voxlingua107`, +*BABEL* :cite:`Gales2014SpeechRA`, and +*VoxPopuli* :cite:`voxpopuli`) in 128 languages, +not fine-tuned. + +Originally published by the authors of *XLS-R* :cite:`babu2021xls` under MIT License and +redistributed with the same license. +[`License `__, +`Source `__] + +Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2Bundle` for usage details. +""" # noqa: E501 + + +@dataclass +class Wav2Vec2FABundle(Wav2Vec2ASRBundle): + """Data class that bundles associated information to use pretrained :py:class:`~torchaudio.models.Wav2Vec2Model` for forced alignment. + + This class provides interfaces for instantiating the pretrained model along with + the information necessary to retrieve pretrained weights and additional data + to be used with the model. + + Torchaudio library instantiates objects of this class, each of which represents + a different pretrained model. Client code should access pretrained models via these + instances. + + Please see below for the usage and the available values. + + Example - Feature Extraction + >>> import torchaudio + >>> + >>> bundle = torchaudio.pipelines.MMS_FA + >>> + >>> # Build the model and load pretrained weight. + >>> model = bundle.get_model() + Downloading: + 100%|███████████████████████████████| 1.18G/1.18G [00:05<00:00, 216MB/s] + >>> + >>> # Resample audio to the expected sampling rate + >>> waveform = torchaudio.functional.resample(waveform, sample_rate, bundle.sample_rate) + >>> + >>> # Estimate the probability of token distribution + >>> emission, _ = model(waveform) + >>> + >>> # Generate frame-wise alignment + >>> alignment, scores = torchaudio.functional.forced_align( + >>> emission, targets, input_lengths, target_lengths, blank=0) + >>> + """ # noqa: E501 + + class Tokenizer(aligner.ITokenizer): + """Interface of the tokenizer""" + + class Aligner(aligner.IAligner): + """Interface of the aligner""" + + def get_labels(self, star: Optional[str] = "*", blank: str = "-") -> Tuple[str, ...]: + """Get the labels corresponding to the feature dimension of emission. + + The first is blank token, and it is customizable. + + Args: + star (str or None, optional): Change or disable star token. (default: ``"*"``) + blank (str, optional): Change the blank token. (default: ``'-'``) + + Returns: + Tuple[str, ...]: + For models fine-tuned on ASR, returns the tuple of strings representing + the output class labels. + + Example + >>> from torchaudio.pipelines import MMS_FA as bundle + >>> bundle.get_labels() + ('-', 'a', 'i', 'e', 'n', 'o', 'u', 't', 's', 'r', 'm', 'k', 'l', 'd', 'g', 'h', 'y', 'b', 'p', 'w', 'c', 'v', 'j', 'z', 'f', "'", 'q', 'x', '*') + >>> bundle.get_labels(star=None) + ('-', 'a', 'i', 'e', 'n', 'o', 'u', 't', 's', 'r', 'm', 'k', 'l', 'd', 'g', 'h', 'y', 'b', 'p', 'w', 'c', 'v', 'j', 'z', 'f', "'", 'q', 'x') + """ # noqa: E501 + labels = super().get_labels(blank=blank) + return labels if star is None else (*labels, star) + + def get_model(self, with_star: bool = True, *, dl_kwargs=None) -> Module: + """Construct the model and load the pretrained weight. + + The weight file is downloaded from the internet and cached with + :func:`torch.hub.load_state_dict_from_url` + + Args: + with_star (bool, optional): If enabled, the last dimension of output layer is + extended by one, which corresponds to `star` token. + dl_kwargs (dictionary of keyword arguments): Passed to :func:`torch.hub.load_state_dict_from_url`. + + Returns: + Variation of :py:class:`~torchaudio.models.Wav2Vec2Model`. + + .. note:: + + The model created with this method returns probability in log-domain, + (i.e. :py:func:`torch.nn.functional.log_softmax` is applied), whereas + the other Wav2Vec2 models returns logit. + """ + model = utils._get_model(self._model_type, self._params) + state_dict = utils._get_state_dict(self._path, dl_kwargs, self._remove_aux_axis) + model.load_state_dict(state_dict) + model = utils._extend_model( + model, normalize_waveform=self._normalize_waveform, apply_log_softmax=True, append_star=with_star + ) + model.eval() + return model + + def get_dict(self, star: Optional[str] = "*", blank: str = "-") -> Dict[str, int]: + """Get the mapping from token to index (in emission feature dim) + + Args: + star (str or None, optional): Change or disable star token. (default: ``"*"``) + blank (str, optional): Change the blank token. (default: ``'-'``) + + Returns: + Tuple[str, ...]: + For models fine-tuned on ASR, returns the tuple of strings representing + the output class labels. + + Example + >>> from torchaudio.pipelines import MMS_FA as bundle + >>> bundle.get_dict() + {'-': 0, 'a': 1, 'i': 2, 'e': 3, 'n': 4, 'o': 5, 'u': 6, 't': 7, 's': 8, 'r': 9, 'm': 10, 'k': 11, 'l': 12, 'd': 13, 'g': 14, 'h': 15, 'y': 16, 'b': 17, 'p': 18, 'w': 19, 'c': 20, 'v': 21, 'j': 22, 'z': 23, 'f': 24, "'": 25, 'q': 26, 'x': 27, '*': 28} + >>> bundle.get_dict(star=None) + {'-': 0, 'a': 1, 'i': 2, 'e': 3, 'n': 4, 'o': 5, 'u': 6, 't': 7, 's': 8, 'r': 9, 'm': 10, 'k': 11, 'l': 12, 'd': 13, 'g': 14, 'h': 15, 'y': 16, 'b': 17, 'p': 18, 'w': 19, 'c': 20, 'v': 21, 'j': 22, 'z': 23, 'f': 24, "'": 25, 'q': 26, 'x': 27} + """ # noqa: E501 + return {k: i for i, k in enumerate(self.get_labels(star=star, blank=blank))} + + def get_tokenizer(self) -> Tokenizer: + """Instantiate a Tokenizer. + + Returns: + Tokenizer + """ + return aligner.Tokenizer(self.get_dict()) + + def get_aligner(self) -> Aligner: + """Instantiate an Aligner. + + Returns: + Aligner + """ + return aligner.Aligner(blank=0) + + +MMS_FA = Wav2Vec2FABundle( + "https://dl.fbaipublicfiles.com/mms/torchaudio/ctc_alignment_mling_uroman/model.pt", + { + "extractor_mode": "layer_norm", + "extractor_conv_layer_config": [ + (512, 10, 5), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 3, 2), + (512, 2, 2), + (512, 2, 2), + ], + "extractor_conv_bias": True, + "encoder_embed_dim": 1024, + "encoder_projection_dropout": 0.0, + "encoder_pos_conv_kernel": 128, + "encoder_pos_conv_groups": 16, + "encoder_num_layers": 24, + "encoder_num_heads": 16, + "encoder_attention_dropout": 0.0, + "encoder_ff_interm_features": 4096, + "encoder_ff_interm_dropout": 0.1, + "encoder_dropout": 0.0, + "encoder_layer_norm_first": True, + "encoder_layer_drop": 0.1, + "aux_num_out": 28, + }, + _labels=utils._get_mms_labels(), + _sample_rate=16000, + _normalize_waveform=True, + _model_type="Wav2Vec2", +) +MMS_FA.__doc__ = """ +Trained on 31K hours of data in 1,130 languages from *Scaling Speech Technology to 1,000+ Languages* :cite:`pratap2023scaling`. + +Published by the authors of *Scaling Speech Technology to 1,000+ Languages* :cite:`pratap2023scaling` under [`CC-BY-NC 4.0 License `__]. + +Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2FABundle` for usage details. + +.. note:: + + Unlike other Wav2Vec2 bundles, this model does not have a token for word boundary (like `|`). This makes the post-processing of alignments slightly different. +""" # noqa: E501 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/pipelines/_wav2vec2/utils.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/pipelines/_wav2vec2/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..e690e8103c7a47a01d719e746e6c98a9c7f6c8db --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/pipelines/_wav2vec2/utils.py @@ -0,0 +1,346 @@ +from typing import List, Optional, Tuple + +import torch +from torch import nn, Tensor + +from torchaudio._internal import load_state_dict_from_url +from torchaudio.models import wav2vec2_model, Wav2Vec2Model, wavlm_model + + +def _get_model(type_, params): + factories = { + "Wav2Vec2": wav2vec2_model, + "WavLM": wavlm_model, + } + if type_ not in factories: + raise ValueError(f"Supported model types are {tuple(factories.keys())}. Found: {type_}") + factory = factories[type_] + return factory(**params) + + +class _Wav2Vec2Model(nn.Module): + """Wrapper class for :py:class:`~torchaudio.models.Wav2Vec2Model`. + + This is used for layer normalization at the input + """ + + def __init__(self, model: Wav2Vec2Model, normalize_waveform: bool, apply_log_softmax: bool, append_star: bool): + super().__init__() + self.model = model + self.normalize_waveform = normalize_waveform + self.apply_log_softmax = apply_log_softmax + self.append_star = append_star + + def forward(self, waveforms: Tensor, lengths: Optional[Tensor] = None) -> Tuple[Tensor, Optional[Tensor]]: + if self.normalize_waveform: + waveforms = nn.functional.layer_norm(waveforms, waveforms.shape) + output, output_lengths = self.model(waveforms, lengths) + if self.apply_log_softmax: + output = torch.nn.functional.log_softmax(output, dim=-1) + if self.append_star: + star_dim = torch.zeros((1, output.size(1), 1), dtype=output.dtype, device=output.device) + output = torch.cat((output, star_dim), dim=-1) + return output, output_lengths + + @torch.jit.export + def extract_features( + self, + waveforms: Tensor, + lengths: Optional[Tensor] = None, + num_layers: Optional[int] = None, + ) -> Tuple[List[Tensor], Optional[Tensor]]: + if self.normalize_waveform: + waveforms = nn.functional.layer_norm(waveforms, waveforms.shape) + return self.model.extract_features(waveforms, lengths, num_layers) + + +def _extend_model(module, normalize_waveform, apply_log_softmax=False, append_star=False): + """Add extra transformations to the model""" + return _Wav2Vec2Model(module, normalize_waveform, apply_log_softmax, append_star) + + +def _remove_aux_axes(state_dict, axes): + # Remove the seemingly unnecessary axis + # For ASR task, the pretrained weights originated from fairseq has unrelated dimensions at index 1, 2, 3 + # It's originated from the Dictionary implementation of fairseq, which was intended for NLP tasks, + # but not used during the ASR training. + # https://github.com/pytorch/fairseq/blob/c5ff181125c7e6126b49a85e5ebdd5f5b6a07914/fairseq/data/dictionary.py#L21-L37 + # https://github.com/pytorch/fairseq/blob/c5ff181125c7e6126b49a85e5ebdd5f5b6a07914/fairseq/criterions/ctc.py#L126-L129 + # + # Also, some pretrained weights originated from voxpopuli has an extra dimensions that almost never used and + # that resembles mistake. + # The label `1` shows up in the training dataset of German (1 out of 16M), + # English (1 / 28M), Spanish (1 / 9.4M), Romanian (1 / 4.7M) and Polish (6 / 5.8M) + for key in ["aux.weight", "aux.bias"]: + mat = state_dict[key] + state_dict[key] = torch.stack([mat[i] for i in range(mat.size(0)) if i not in axes]) + + +def _get_state_dict(url, dl_kwargs, remove_axes=None): + if not url.startswith("https"): + url = f"https://download.pytorch.org/torchaudio/models/{url}" + dl_kwargs = {} if dl_kwargs is None else dl_kwargs + state_dict = load_state_dict_from_url(url, **dl_kwargs) + if remove_axes: + _remove_aux_axes(state_dict, remove_axes) + return state_dict + + +def _get_en_labels(): + return ( + "|", + "E", + "T", + "A", + "O", + "N", + "I", + "H", + "S", + "R", + "D", + "L", + "U", + "M", + "W", + "C", + "F", + "G", + "Y", + "P", + "B", + "V", + "K", + "'", + "X", + "J", + "Q", + "Z", + ) + + +def _get_de_labels(): + return ( + "|", + "e", + "n", + "i", + "r", + "s", + "t", + "a", + "d", + "h", + "u", + "l", + "g", + "c", + "m", + "o", + "b", + "w", + "f", + "k", + "z", + "p", + "v", + "ü", + "ä", + "ö", + "j", + "ß", + "y", + "x", + "q", + ) + + +def _get_vp_en_labels(): + return ( + "|", + "e", + "t", + "o", + "i", + "a", + "n", + "s", + "r", + "h", + "l", + "d", + "c", + "u", + "m", + "p", + "f", + "g", + "w", + "y", + "b", + "v", + "k", + "x", + "j", + "q", + "z", + ) + + +def _get_es_labels(): + return ( + "|", + "e", + "a", + "o", + "s", + "n", + "r", + "i", + "l", + "d", + "c", + "t", + "u", + "p", + "m", + "b", + "q", + "y", + "g", + "v", + "h", + "ó", + "f", + "í", + "á", + "j", + "z", + "ñ", + "é", + "x", + "ú", + "k", + "w", + "ü", + ) + + +def _get_fr_labels(): + return ( + "|", + "e", + "s", + "n", + "i", + "t", + "r", + "a", + "o", + "u", + "l", + "d", + "c", + "p", + "m", + "é", + "v", + "q", + "f", + "g", + "b", + "h", + "x", + "à", + "j", + "è", + "y", + "ê", + "z", + "ô", + "k", + "ç", + "œ", + "û", + "ù", + "î", + "â", + "w", + "ï", + "ë", + "ü", + "æ", + ) + + +def _get_it_labels(): + return ( + "|", + "e", + "i", + "a", + "o", + "n", + "t", + "r", + "l", + "s", + "c", + "d", + "u", + "p", + "m", + "g", + "v", + "h", + "z", + "f", + "b", + "q", + "à", + "è", + "ù", + "é", + "ò", + "ì", + "k", + "y", + "x", + "w", + "j", + "ó", + "í", + "ï", + ) + + +def _get_mms_labels(): + return ( + "a", + "i", + "e", + "n", + "o", + "u", + "t", + "s", + "r", + "m", + "k", + "l", + "d", + "g", + "h", + "y", + "b", + "p", + "w", + "c", + "v", + "j", + "z", + "f", + "'", + "q", + "x", + ) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/pipelines/rnnt_pipeline.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/pipelines/rnnt_pipeline.py new file mode 100644 index 0000000000000000000000000000000000000000..c7d5385b37e295e3ff8499ca140254887361e679 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/pipelines/rnnt_pipeline.py @@ -0,0 +1,380 @@ +import json +import math +from abc import ABC, abstractmethod +from dataclasses import dataclass +from functools import partial +from typing import Callable, List, Tuple + +import torch +import torchaudio +from torchaudio._internal import module_utils +from torchaudio.models import emformer_rnnt_base, RNNT, RNNTBeamSearch + + +__all__ = [] + +_decibel = 2 * 20 * math.log10(torch.iinfo(torch.int16).max) +_gain = pow(10, 0.05 * _decibel) + + +def _piecewise_linear_log(x): + x[x > math.e] = torch.log(x[x > math.e]) + x[x <= math.e] = x[x <= math.e] / math.e + return x + + +class _FunctionalModule(torch.nn.Module): + def __init__(self, functional): + super().__init__() + self.functional = functional + + def forward(self, input): + return self.functional(input) + + +class _GlobalStatsNormalization(torch.nn.Module): + def __init__(self, global_stats_path): + super().__init__() + + with open(global_stats_path) as f: + blob = json.loads(f.read()) + + self.register_buffer("mean", torch.tensor(blob["mean"])) + self.register_buffer("invstddev", torch.tensor(blob["invstddev"])) + + def forward(self, input): + return (input - self.mean) * self.invstddev + + +class _FeatureExtractor(ABC): + @abstractmethod + def __call__(self, input: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]: + """Generates features and length output from the given input tensor. + + Args: + input (torch.Tensor): input tensor. + + Returns: + (torch.Tensor, torch.Tensor): + torch.Tensor: + Features, with shape `(length, *)`. + torch.Tensor: + Length, with shape `(1,)`. + """ + + +class _TokenProcessor(ABC): + @abstractmethod + def __call__(self, tokens: List[int], **kwargs) -> str: + """Decodes given list of tokens to text sequence. + + Args: + tokens (List[int]): list of tokens to decode. + + Returns: + str: + Decoded text sequence. + """ + + +class _ModuleFeatureExtractor(torch.nn.Module, _FeatureExtractor): + """``torch.nn.Module``-based feature extraction pipeline. + + Args: + pipeline (torch.nn.Module): module that implements feature extraction logic. + """ + + def __init__(self, pipeline: torch.nn.Module) -> None: + super().__init__() + self.pipeline = pipeline + + def forward(self, input: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]: + """Generates features and length output from the given input tensor. + + Args: + input (torch.Tensor): input tensor. + + Returns: + (torch.Tensor, torch.Tensor): + torch.Tensor: + Features, with shape `(length, *)`. + torch.Tensor: + Length, with shape `(1,)`. + """ + features = self.pipeline(input) + length = torch.tensor([features.shape[0]]) + return features, length + + +class _SentencePieceTokenProcessor(_TokenProcessor): + """SentencePiece-model-based token processor. + + Args: + sp_model_path (str): path to SentencePiece model. + """ + + def __init__(self, sp_model_path: str) -> None: + if not module_utils.is_module_available("sentencepiece"): + raise RuntimeError("SentencePiece is not available. Please install it.") + + import sentencepiece as spm + + self.sp_model = spm.SentencePieceProcessor(model_file=sp_model_path) + self.post_process_remove_list = { + self.sp_model.unk_id(), + self.sp_model.eos_id(), + self.sp_model.pad_id(), + } + + def __call__(self, tokens: List[int], lstrip: bool = True) -> str: + """Decodes given list of tokens to text sequence. + + Args: + tokens (List[int]): list of tokens to decode. + lstrip (bool, optional): if ``True``, returns text sequence with leading whitespace + removed. (Default: ``True``). + + Returns: + str: + Decoded text sequence. + """ + filtered_hypo_tokens = [ + token_index for token_index in tokens[1:] if token_index not in self.post_process_remove_list + ] + output_string = "".join(self.sp_model.id_to_piece(filtered_hypo_tokens)).replace("\u2581", " ") + + if lstrip: + return output_string.lstrip() + else: + return output_string + + +@dataclass +class RNNTBundle: + """Dataclass that bundles components for performing automatic speech recognition (ASR, speech-to-text) + inference with an RNN-T model. + + More specifically, the class provides methods that produce the featurization pipeline, + decoder wrapping the specified RNN-T model, and output token post-processor that together + constitute a complete end-to-end ASR inference pipeline that produces a text sequence + given a raw waveform. + + It can support non-streaming (full-context) inference as well as streaming inference. + + Users should not directly instantiate objects of this class; rather, users should use the + instances (representing pre-trained models) that exist within the module, + e.g. :data:`torchaudio.pipelines.EMFORMER_RNNT_BASE_LIBRISPEECH`. + + Example + >>> import torchaudio + >>> from torchaudio.pipelines import EMFORMER_RNNT_BASE_LIBRISPEECH + >>> import torch + >>> + >>> # Non-streaming inference. + >>> # Build feature extractor, decoder with RNN-T model, and token processor. + >>> feature_extractor = EMFORMER_RNNT_BASE_LIBRISPEECH.get_feature_extractor() + 100%|███████████████████████████████| 3.81k/3.81k [00:00<00:00, 4.22MB/s] + >>> decoder = EMFORMER_RNNT_BASE_LIBRISPEECH.get_decoder() + Downloading: "https://download.pytorch.org/torchaudio/models/emformer_rnnt_base_librispeech.pt" + 100%|███████████████████████████████| 293M/293M [00:07<00:00, 42.1MB/s] + >>> token_processor = EMFORMER_RNNT_BASE_LIBRISPEECH.get_token_processor() + 100%|███████████████████████████████| 295k/295k [00:00<00:00, 25.4MB/s] + >>> + >>> # Instantiate LibriSpeech dataset; retrieve waveform for first sample. + >>> dataset = torchaudio.datasets.LIBRISPEECH("/home/librispeech", url="test-clean") + >>> waveform = next(iter(dataset))[0].squeeze() + >>> + >>> with torch.no_grad(): + >>> # Produce mel-scale spectrogram features. + >>> features, length = feature_extractor(waveform) + >>> + >>> # Generate top-10 hypotheses. + >>> hypotheses = decoder(features, length, 10) + >>> + >>> # For top hypothesis, convert predicted tokens to text. + >>> text = token_processor(hypotheses[0][0]) + >>> print(text) + he hoped there would be stew for dinner turnips and carrots and bruised potatoes and fat mutton pieces to [...] + >>> + >>> + >>> # Streaming inference. + >>> hop_length = EMFORMER_RNNT_BASE_LIBRISPEECH.hop_length + >>> num_samples_segment = EMFORMER_RNNT_BASE_LIBRISPEECH.segment_length * hop_length + >>> num_samples_segment_right_context = ( + >>> num_samples_segment + EMFORMER_RNNT_BASE_LIBRISPEECH.right_context_length * hop_length + >>> ) + >>> + >>> # Build streaming inference feature extractor. + >>> streaming_feature_extractor = EMFORMER_RNNT_BASE_LIBRISPEECH.get_streaming_feature_extractor() + >>> + >>> # Process same waveform as before, this time sequentially across overlapping segments + >>> # to simulate streaming inference. Note the usage of ``streaming_feature_extractor`` and ``decoder.infer``. + >>> state, hypothesis = None, None + >>> for idx in range(0, len(waveform), num_samples_segment): + >>> segment = waveform[idx: idx + num_samples_segment_right_context] + >>> segment = torch.nn.functional.pad(segment, (0, num_samples_segment_right_context - len(segment))) + >>> with torch.no_grad(): + >>> features, length = streaming_feature_extractor(segment) + >>> hypotheses, state = decoder.infer(features, length, 10, state=state, hypothesis=hypothesis) + >>> hypothesis = hypotheses[0] + >>> transcript = token_processor(hypothesis[0]) + >>> if transcript: + >>> print(transcript, end=" ", flush=True) + he hoped there would be stew for dinner turn ips and car rots and bru 'd oes and fat mut ton pieces to [...] + """ + + class FeatureExtractor(_FeatureExtractor): + """Interface of the feature extraction part of RNN-T pipeline""" + + class TokenProcessor(_TokenProcessor): + """Interface of the token processor part of RNN-T pipeline""" + + _rnnt_path: str + _rnnt_factory_func: Callable[[], RNNT] + _global_stats_path: str + _sp_model_path: str + _right_padding: int + _blank: int + _sample_rate: int + _n_fft: int + _n_mels: int + _hop_length: int + _segment_length: int + _right_context_length: int + + def _get_model(self) -> RNNT: + model = self._rnnt_factory_func() + path = torchaudio.utils._download_asset(self._rnnt_path) + state_dict = torch.load(path) + model.load_state_dict(state_dict) + model.eval() + return model + + @property + def sample_rate(self) -> int: + """Sample rate (in cycles per second) of input waveforms. + + :type: int + """ + return self._sample_rate + + @property + def n_fft(self) -> int: + """Size of FFT window to use. + + :type: int + """ + return self._n_fft + + @property + def n_mels(self) -> int: + """Number of mel spectrogram features to extract from input waveforms. + + :type: int + """ + return self._n_mels + + @property + def hop_length(self) -> int: + """Number of samples between successive frames in input expected by model. + + :type: int + """ + return self._hop_length + + @property + def segment_length(self) -> int: + """Number of frames in segment in input expected by model. + + :type: int + """ + return self._segment_length + + @property + def right_context_length(self) -> int: + """Number of frames in right contextual block in input expected by model. + + :type: int + """ + return self._right_context_length + + def get_decoder(self) -> RNNTBeamSearch: + """Constructs RNN-T decoder. + + Returns: + RNNTBeamSearch + """ + model = self._get_model() + return RNNTBeamSearch(model, self._blank) + + def get_feature_extractor(self) -> FeatureExtractor: + """Constructs feature extractor for non-streaming (full-context) ASR. + + Returns: + FeatureExtractor + """ + local_path = torchaudio.utils._download_asset(self._global_stats_path) + return _ModuleFeatureExtractor( + torch.nn.Sequential( + torchaudio.transforms.MelSpectrogram( + sample_rate=self.sample_rate, n_fft=self.n_fft, n_mels=self.n_mels, hop_length=self.hop_length + ), + _FunctionalModule(lambda x: x.transpose(1, 0)), + _FunctionalModule(lambda x: _piecewise_linear_log(x * _gain)), + _GlobalStatsNormalization(local_path), + _FunctionalModule(lambda x: torch.nn.functional.pad(x, (0, 0, 0, self._right_padding))), + ) + ) + + def get_streaming_feature_extractor(self) -> FeatureExtractor: + """Constructs feature extractor for streaming (simultaneous) ASR. + + Returns: + FeatureExtractor + """ + local_path = torchaudio.utils._download_asset(self._global_stats_path) + return _ModuleFeatureExtractor( + torch.nn.Sequential( + torchaudio.transforms.MelSpectrogram( + sample_rate=self.sample_rate, n_fft=self.n_fft, n_mels=self.n_mels, hop_length=self.hop_length + ), + _FunctionalModule(lambda x: x.transpose(1, 0)), + _FunctionalModule(lambda x: _piecewise_linear_log(x * _gain)), + _GlobalStatsNormalization(local_path), + ) + ) + + def get_token_processor(self) -> TokenProcessor: + """Constructs token processor. + + Returns: + TokenProcessor + """ + local_path = torchaudio.utils._download_asset(self._sp_model_path) + return _SentencePieceTokenProcessor(local_path) + + +EMFORMER_RNNT_BASE_LIBRISPEECH = RNNTBundle( + _rnnt_path="models/emformer_rnnt_base_librispeech.pt", + _rnnt_factory_func=partial(emformer_rnnt_base, num_symbols=4097), + _global_stats_path="pipeline-assets/global_stats_rnnt_librispeech.json", + _sp_model_path="pipeline-assets/spm_bpe_4096_librispeech.model", + _right_padding=4, + _blank=4096, + _sample_rate=16000, + _n_fft=400, + _n_mels=80, + _hop_length=160, + _segment_length=16, + _right_context_length=4, +) +EMFORMER_RNNT_BASE_LIBRISPEECH.__doc__ = """ASR pipeline based on Emformer-RNNT, +pretrained on *LibriSpeech* dataset :cite:`7178964`, +capable of performing both streaming and non-streaming inference. + +The underlying model is constructed by :py:func:`torchaudio.models.emformer_rnnt_base` +and utilizes weights trained on LibriSpeech using training script ``train.py`` +`here `__ with default arguments. + +Please refer to :py:class:`RNNTBundle` for usage instructions. +""" diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/transforms/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/transforms/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..19827e184d63efbd6daa46a7a33662cb3c23ac43 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/transforms/__init__.py @@ -0,0 +1,74 @@ +from ._multi_channel import MVDR, PSD, RTFMVDR, SoudenMVDR +from ._transforms import ( + AddNoise, + AmplitudeToDB, + ComputeDeltas, + Convolve, + Deemphasis, + Fade, + FFTConvolve, + FrequencyMasking, + GriffinLim, + InverseMelScale, + InverseSpectrogram, + LFCC, + Loudness, + MelScale, + MelSpectrogram, + MFCC, + MuLawDecoding, + MuLawEncoding, + PitchShift, + Preemphasis, + Resample, + RNNTLoss, + SlidingWindowCmn, + SpecAugment, + SpectralCentroid, + Spectrogram, + Speed, + SpeedPerturbation, + TimeMasking, + TimeStretch, + Vad, + Vol, +) + +__all__ = [ + "AddNoise", + "AmplitudeToDB", + "ComputeDeltas", + "Convolve", + "Deemphasis", + "Fade", + "FFTConvolve", + "FrequencyMasking", + "GriffinLim", + "InverseMelScale", + "InverseSpectrogram", + "LFCC", + "Loudness", + "MFCC", + "MVDR", + "MelScale", + "MelSpectrogram", + "MuLawDecoding", + "MuLawEncoding", + "PSD", + "PitchShift", + "Preemphasis", + "RNNTLoss", + "RTFMVDR", + "Resample", + "SlidingWindowCmn", + "SoudenMVDR", + "SpecAugment", + "SpectralCentroid", + "Spectrogram", + "Speed", + "SpeedPerturbation", + "TimeMasking", + "TimeStretch", + "Vad", + "Vol", +] diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/transforms/_multi_channel.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/transforms/_multi_channel.py new file mode 100644 index 0000000000000000000000000000000000000000..4ba3db7f454058de7c0fda1d57781ed346d7a65c --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/transforms/_multi_channel.py @@ -0,0 +1,467 @@ +# -*- coding: utf-8 -*- + +import warnings +from typing import Optional, Union + +import torch +from torch import Tensor +from torchaudio import functional as F + + +__all__ = [] + + +def _get_mvdr_vector( + psd_s: torch.Tensor, + psd_n: torch.Tensor, + reference_vector: torch.Tensor, + solution: str = "ref_channel", + diagonal_loading: bool = True, + diag_eps: float = 1e-7, + eps: float = 1e-8, +) -> torch.Tensor: + r"""Compute the MVDR beamforming weights with ``solution`` argument. + + Args: + psd_s (torch.Tensor): The complex-valued power spectral density (PSD) matrix of target speech. + Tensor with dimensions `(..., freq, channel, channel)`. + psd_n (torch.Tensor): The complex-valued power spectral density (PSD) matrix of noise. + Tensor with dimensions `(..., freq, channel, channel)`. + reference_vector (torch.Tensor): one-hot reference channel matrix. + solution (str, optional): Solution to compute the MVDR beamforming weights. + Options: [``ref_channel``, ``stv_evd``, ``stv_power``]. (Default: ``ref_channel``) + diagonal_loading (bool, optional): If ``True``, enables applying diagonal loading to ``psd_n``. + (Default: ``True``) + diag_eps (float, optional): The coefficient multiplied to the identity matrix for diagonal loading. + It is only effective when ``diagonal_loading`` is set to ``True``. (Default: ``1e-7``) + eps (float, optional): Value to add to the denominator in the beamforming weight formula. + (Default: ``1e-8``) + + Returns: + torch.Tensor: the mvdr beamforming weight matrix + """ + if solution == "ref_channel": + beamform_vector = F.mvdr_weights_souden(psd_s, psd_n, reference_vector, diagonal_loading, diag_eps, eps) + else: + if solution == "stv_evd": + stv = F.rtf_evd(psd_s) + else: + stv = F.rtf_power(psd_s, psd_n, reference_vector, diagonal_loading=diagonal_loading, diag_eps=diag_eps) + beamform_vector = F.mvdr_weights_rtf(stv, psd_n, reference_vector, diagonal_loading, diag_eps, eps) + + return beamform_vector + + +class PSD(torch.nn.Module): + r"""Compute cross-channel power spectral density (PSD) matrix. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + multi_mask (bool, optional): If ``True``, only accepts multi-channel Time-Frequency masks. (Default: ``False``) + normalize (bool, optional): If ``True``, normalize the mask along the time dimension. (Default: ``True``) + eps (float, optional): Value to add to the denominator in mask normalization. (Default: ``1e-15``) + """ + + def __init__(self, multi_mask: bool = False, normalize: bool = True, eps: float = 1e-15): + super().__init__() + self.multi_mask = multi_mask + self.normalize = normalize + self.eps = eps + + def forward(self, specgram: torch.Tensor, mask: Optional[torch.Tensor] = None): + """ + Args: + specgram (torch.Tensor): Multi-channel complex-valued spectrum. + Tensor with dimensions `(..., channel, freq, time)`. + mask (torch.Tensor or None, optional): Time-Frequency mask for normalization. + Tensor with dimensions `(..., freq, time)` if multi_mask is ``False`` or + with dimensions `(..., channel, freq, time)` if multi_mask is ``True``. + (Default: ``None``) + + Returns: + torch.Tensor: The complex-valued PSD matrix of the input spectrum. + Tensor with dimensions `(..., freq, channel, channel)` + """ + if mask is not None: + if self.multi_mask: + # Averaging mask along channel dimension + mask = mask.mean(dim=-3) # (..., freq, time) + psd = F.psd(specgram, mask, self.normalize, self.eps) + + return psd + + +class MVDR(torch.nn.Module): + """Minimum Variance Distortionless Response (MVDR) module that performs MVDR beamforming with Time-Frequency masks. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Based on https://github.com/espnet/espnet/blob/master/espnet2/enh/layers/beamformer.py + + We provide three solutions of MVDR beamforming. One is based on *reference channel selection* + :cite:`souden2009optimal` (``solution=ref_channel``). + + .. math:: + \\textbf{w}_{\\text{MVDR}}(f) =\ + \\frac{{{\\bf{\\Phi}_{\\textbf{NN}}^{-1}}(f){\\bf{\\Phi}_{\\textbf{SS}}}}(f)}\ + {\\text{Trace}({{{\\bf{\\Phi}_{\\textbf{NN}}^{-1}}(f) \\bf{\\Phi}_{\\textbf{SS}}}(f))}}\\bm{u} + + where :math:`\\bf{\\Phi}_{\\textbf{SS}}` and :math:`\\bf{\\Phi}_{\\textbf{NN}}` are the covariance\ + matrices of speech and noise, respectively. :math:`\\bf{u}` is an one-hot vector to determine the\ + reference channel. + + The other two solutions are based on the steering vector (``solution=stv_evd`` or ``solution=stv_power``). + + .. math:: + \\textbf{w}_{\\text{MVDR}}(f) =\ + \\frac{{{\\bf{\\Phi}_{\\textbf{NN}}^{-1}}(f){\\bm{v}}(f)}}\ + {{\\bm{v}^{\\mathsf{H}}}(f){\\bf{\\Phi}_{\\textbf{NN}}^{-1}}(f){\\bm{v}}(f)} + + where :math:`\\bm{v}` is the acoustic transfer function or the steering vector.\ + :math:`.^{\\mathsf{H}}` denotes the Hermitian Conjugate operation. + + We apply either *eigenvalue decomposition* + :cite:`higuchi2016robust` or the *power method* :cite:`mises1929praktische` to get the + steering vector from the PSD matrix of speech. + + After estimating the beamforming weight, the enhanced Short-time Fourier Transform (STFT) is obtained by + + .. math:: + \\hat{\\bf{S}} = {\\bf{w}^\\mathsf{H}}{\\bf{Y}}, {\\bf{w}} \\in \\mathbb{C}^{M \\times F} + + where :math:`\\bf{Y}` and :math:`\\hat{\\bf{S}}` are the STFT of the multi-channel noisy speech and\ + the single-channel enhanced speech, respectively. + + For online streaming audio, we provide a *recursive method* :cite:`higuchi2017online` to update the + PSD matrices of speech and noise, respectively. + + Args: + ref_channel (int, optional): Reference channel for beamforming. (Default: ``0``) + solution (str, optional): Solution to compute the MVDR beamforming weights. + Options: [``ref_channel``, ``stv_evd``, ``stv_power``]. (Default: ``ref_channel``) + multi_mask (bool, optional): If ``True``, only accepts multi-channel Time-Frequency masks. (Default: ``False``) + diagonal_loading (bool, optional): If ``True``, enables applying diagonal loading to the covariance matrix + of the noise. (Default: ``True``) + diag_eps (float, optional): The coefficient multiplied to the identity matrix for diagonal loading. + It is only effective when ``diagonal_loading`` is set to ``True``. (Default: ``1e-7``) + online (bool, optional): If ``True``, updates the MVDR beamforming weights based on + the previous covarience matrices. (Default: ``False``) + + Note: + To improve the numerical stability, the input spectrogram will be converted to double precision + (``torch.complex128`` or ``torch.cdouble``) dtype for internal computation. The output spectrogram + is converted to the dtype of the input spectrogram to be compatible with other modules. + + Note: + If you use ``stv_evd`` solution, the gradient of the same input may not be identical if the + eigenvalues of the PSD matrix are not distinct (i.e. some eigenvalues are close or identical). + """ + + def __init__( + self, + ref_channel: int = 0, + solution: str = "ref_channel", + multi_mask: bool = False, + diag_loading: bool = True, + diag_eps: float = 1e-7, + online: bool = False, + ): + super().__init__() + if solution not in [ + "ref_channel", + "stv_evd", + "stv_power", + ]: + raise ValueError( + '`solution` must be one of ["ref_channel", "stv_evd", "stv_power"]. Given {}'.format(solution) + ) + self.ref_channel = ref_channel + self.solution = solution + self.multi_mask = multi_mask + self.diag_loading = diag_loading + self.diag_eps = diag_eps + self.online = online + self.psd = PSD(multi_mask) + + psd_s: torch.Tensor = torch.zeros(1) + psd_n: torch.Tensor = torch.zeros(1) + mask_sum_s: torch.Tensor = torch.zeros(1) + mask_sum_n: torch.Tensor = torch.zeros(1) + self.register_buffer("psd_s", psd_s) + self.register_buffer("psd_n", psd_n) + self.register_buffer("mask_sum_s", mask_sum_s) + self.register_buffer("mask_sum_n", mask_sum_n) + + def _get_updated_mvdr_vector( + self, + psd_s: torch.Tensor, + psd_n: torch.Tensor, + mask_s: torch.Tensor, + mask_n: torch.Tensor, + reference_vector: torch.Tensor, + solution: str = "ref_channel", + diagonal_loading: bool = True, + diag_eps: float = 1e-7, + eps: float = 1e-8, + ) -> torch.Tensor: + r"""Recursively update the MVDR beamforming vector. + + Args: + psd_s (torch.Tensor): The complex-valued power spectral density (PSD) matrix of target speech. + Tensor with dimensions `(..., freq, channel, channel)`. + psd_n (torch.Tensor): The complex-valued power spectral density (PSD) matrix of noise. + Tensor with dimensions `(..., freq, channel, channel)`. + mask_s (torch.Tensor): Time-Frequency mask of the target speech. + Tensor with dimensions `(..., freq, time)` if multi_mask is ``False`` + or with dimensions `(..., channel, freq, time)` if multi_mask is ``True``. + mask_n (torch.Tensor or None, optional): Time-Frequency mask of the noise. + Tensor with dimensions `(..., freq, time)` if multi_mask is ``False`` + or with dimensions `(..., channel, freq, time)` if multi_mask is ``True``. + reference_vector (torch.Tensor): One-hot reference channel matrix. + solution (str, optional): Solution to compute the MVDR beamforming weights. + Options: [``ref_channel``, ``stv_evd``, ``stv_power``]. (Default: ``ref_channel``) + diagonal_loading (bool, optional): If ``True``, enables applying diagonal loading to ``psd_n``. + (Default: ``True``) + diag_eps (float, optional): The coefficient multiplied to the identity matrix for diagonal loading. + It is only effective when ``diagonal_loading`` is set to ``True``. (Default: ``1e-7``) + eps (float, optional): Value to add to the denominator in the beamforming weight formula. + (Default: ``1e-8``) + + Returns: + torch.Tensor: The MVDR beamforming weight matrix. + """ + if self.multi_mask: + # Averaging mask along channel dimension + mask_s = mask_s.mean(dim=-3) # (..., freq, time) + mask_n = mask_n.mean(dim=-3) # (..., freq, time) + if self.psd_s.ndim == 1: + self.psd_s = psd_s + self.psd_n = psd_n + self.mask_sum_s = mask_s.sum(dim=-1) + self.mask_sum_n = mask_n.sum(dim=-1) + return _get_mvdr_vector(psd_s, psd_n, reference_vector, solution, diagonal_loading, diag_eps, eps) + else: + psd_s = self._get_updated_psd_speech(psd_s, mask_s) + psd_n = self._get_updated_psd_noise(psd_n, mask_n) + self.psd_s = psd_s + self.psd_n = psd_n + self.mask_sum_s = self.mask_sum_s + mask_s.sum(dim=-1) + self.mask_sum_n = self.mask_sum_n + mask_n.sum(dim=-1) + return _get_mvdr_vector(psd_s, psd_n, reference_vector, solution, diagonal_loading, diag_eps, eps) + + def _get_updated_psd_speech(self, psd_s: torch.Tensor, mask_s: torch.Tensor) -> torch.Tensor: + r"""Update psd of speech recursively. + + Args: + psd_s (torch.Tensor): The complex-valued power spectral density (PSD) matrix of target speech. + Tensor with dimensions `(..., freq, channel, channel)`. + mask_s (torch.Tensor): Time-Frequency mask of the target speech. + Tensor with dimensions `(..., freq, time)`. + + Returns: + torch.Tensor: The updated PSD matrix of target speech. + """ + numerator = self.mask_sum_s / (self.mask_sum_s + mask_s.sum(dim=-1)) + denominator = 1 / (self.mask_sum_s + mask_s.sum(dim=-1)) + psd_s = self.psd_s * numerator[..., None, None] + psd_s * denominator[..., None, None] + return psd_s + + def _get_updated_psd_noise(self, psd_n: torch.Tensor, mask_n: torch.Tensor) -> torch.Tensor: + r"""Update psd of noise recursively. + + Args: + psd_n (torch.Tensor): The complex-valued power spectral density (PSD) matrix of noise. + Tensor with dimensions `(..., freq, channel, channel)`. + mask_n (torch.Tensor or None, optional): Time-Frequency mask of the noise. + Tensor with dimensions `(..., freq, time)`. + + Returns: + torch.Tensor: The updated PSD matrix of noise. + """ + numerator = self.mask_sum_n / (self.mask_sum_n + mask_n.sum(dim=-1)) + denominator = 1 / (self.mask_sum_n + mask_n.sum(dim=-1)) + psd_n = self.psd_n * numerator[..., None, None] + psd_n * denominator[..., None, None] + return psd_n + + def forward( + self, specgram: torch.Tensor, mask_s: torch.Tensor, mask_n: Optional[torch.Tensor] = None + ) -> torch.Tensor: + """Perform MVDR beamforming. + + Args: + specgram (torch.Tensor): Multi-channel complex-valued spectrum. + Tensor with dimensions `(..., channel, freq, time)` + mask_s (torch.Tensor): Time-Frequency mask of target speech. + Tensor with dimensions `(..., freq, time)` if multi_mask is ``False`` + or with dimensions `(..., channel, freq, time)` if multi_mask is ``True``. + mask_n (torch.Tensor or None, optional): Time-Frequency mask of noise. + Tensor with dimensions `(..., freq, time)` if multi_mask is ``False`` + or with dimensions `(..., channel, freq, time)` if multi_mask is ``True``. + (Default: None) + + Returns: + torch.Tensor: Single-channel complex-valued enhanced spectrum with dimensions `(..., freq, time)`. + """ + dtype = specgram.dtype + if specgram.ndim < 3: + raise ValueError(f"Expected at least 3D tensor (..., channel, freq, time). Found: {specgram.shape}") + if not specgram.is_complex(): + raise ValueError( + f"The type of ``specgram`` tensor must be ``torch.cfloat`` or ``torch.cdouble``.\ + Found: {specgram.dtype}" + ) + if specgram.dtype == torch.cfloat: + specgram = specgram.cdouble() # Convert specgram to ``torch.cdouble``. + + if mask_n is None: + warnings.warn("``mask_n`` is not provided, use ``1 - mask_s`` as ``mask_n``.") + mask_n = 1 - mask_s + + psd_s = self.psd(specgram, mask_s) # (..., freq, time, channel, channel) + psd_n = self.psd(specgram, mask_n) # (..., freq, time, channel, channel) + + u = torch.zeros(specgram.size()[:-2], device=specgram.device, dtype=torch.cdouble) # (..., channel) + u[..., self.ref_channel].fill_(1) + + if self.online: + w_mvdr = self._get_updated_mvdr_vector( + psd_s, psd_n, mask_s, mask_n, u, self.solution, self.diag_loading, self.diag_eps + ) + else: + w_mvdr = _get_mvdr_vector(psd_s, psd_n, u, self.solution, self.diag_loading, self.diag_eps) + + specgram_enhanced = F.apply_beamforming(w_mvdr, specgram) + + return specgram_enhanced.to(dtype) + + +class RTFMVDR(torch.nn.Module): + r"""Minimum Variance Distortionless Response (*MVDR* :cite:`capon1969high`) module + based on the relative transfer function (RTF) and power spectral density (PSD) matrix of noise. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Given the multi-channel complex-valued spectrum :math:`\textbf{Y}`, the relative transfer function (RTF) matrix + or the steering vector of target speech :math:`\bm{v}`, the PSD matrix of noise :math:`\bf{\Phi}_{\textbf{NN}}`, and + a one-hot vector that represents the reference channel :math:`\bf{u}`, the module computes the single-channel + complex-valued spectrum of the enhanced speech :math:`\hat{\textbf{S}}`. The formula is defined as: + + .. math:: + \hat{\textbf{S}}(f) = \textbf{w}_{\text{bf}}(f)^{\mathsf{H}} \textbf{Y}(f) + + where :math:`\textbf{w}_{\text{bf}}(f)` is the MVDR beamforming weight for the :math:`f`-th frequency bin, + :math:`(.)^{\mathsf{H}}` denotes the Hermitian Conjugate operation. + + The beamforming weight is computed by: + + .. math:: + \textbf{w}_{\text{MVDR}}(f) = + \frac{{{\bf{\Phi}_{\textbf{NN}}^{-1}}(f){\bm{v}}(f)}} + {{\bm{v}^{\mathsf{H}}}(f){\bf{\Phi}_{\textbf{NN}}^{-1}}(f){\bm{v}}(f)} + """ + + def forward( + self, + specgram: Tensor, + rtf: Tensor, + psd_n: Tensor, + reference_channel: Union[int, Tensor], + diagonal_loading: bool = True, + diag_eps: float = 1e-7, + eps: float = 1e-8, + ) -> Tensor: + """ + Args: + specgram (torch.Tensor): Multi-channel complex-valued spectrum. + Tensor with dimensions `(..., channel, freq, time)` + rtf (torch.Tensor): The complex-valued RTF vector of target speech. + Tensor with dimensions `(..., freq, channel)`. + psd_n (torch.Tensor): The complex-valued power spectral density (PSD) matrix of noise. + Tensor with dimensions `(..., freq, channel, channel)`. + reference_channel (int or torch.Tensor): Specifies the reference channel. + If the dtype is ``int``, it represents the reference channel index. + If the dtype is ``torch.Tensor``, its shape is `(..., channel)`, where the ``channel`` dimension + is one-hot. + diagonal_loading (bool, optional): If ``True``, enables applying diagonal loading to ``psd_n``. + (Default: ``True``) + diag_eps (float, optional): The coefficient multiplied to the identity matrix for diagonal loading. + It is only effective when ``diagonal_loading`` is set to ``True``. (Default: ``1e-7``) + eps (float, optional): Value to add to the denominator in the beamforming weight formula. + (Default: ``1e-8``) + + Returns: + torch.Tensor: Single-channel complex-valued enhanced spectrum with dimensions `(..., freq, time)`. + """ + w_mvdr = F.mvdr_weights_rtf(rtf, psd_n, reference_channel, diagonal_loading, diag_eps, eps) + spectrum_enhanced = F.apply_beamforming(w_mvdr, specgram) + return spectrum_enhanced + + +class SoudenMVDR(torch.nn.Module): + r"""Minimum Variance Distortionless Response (*MVDR* :cite:`capon1969high`) module + based on the method proposed by *Souden et, al.* :cite:`souden2009optimal`. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Given the multi-channel complex-valued spectrum :math:`\textbf{Y}`, the power spectral density (PSD) matrix + of target speech :math:`\bf{\Phi}_{\textbf{SS}}`, the PSD matrix of noise :math:`\bf{\Phi}_{\textbf{NN}}`, and + a one-hot vector that represents the reference channel :math:`\bf{u}`, the module computes the single-channel + complex-valued spectrum of the enhanced speech :math:`\hat{\textbf{S}}`. The formula is defined as: + + .. math:: + \hat{\textbf{S}}(f) = \textbf{w}_{\text{bf}}(f)^{\mathsf{H}} \textbf{Y}(f) + + where :math:`\textbf{w}_{\text{bf}}(f)` is the MVDR beamforming weight for the :math:`f`-th frequency bin. + + The beamforming weight is computed by: + + .. math:: + \textbf{w}_{\text{MVDR}}(f) = + \frac{{{\bf{\Phi}_{\textbf{NN}}^{-1}}(f){\bf{\Phi}_{\textbf{SS}}}}(f)} + {\text{Trace}({{{\bf{\Phi}_{\textbf{NN}}^{-1}}(f) \bf{\Phi}_{\textbf{SS}}}(f))}}\bm{u} + """ + + def forward( + self, + specgram: Tensor, + psd_s: Tensor, + psd_n: Tensor, + reference_channel: Union[int, Tensor], + diagonal_loading: bool = True, + diag_eps: float = 1e-7, + eps: float = 1e-8, + ) -> torch.Tensor: + """ + Args: + specgram (torch.Tensor): Multi-channel complex-valued spectrum. + Tensor with dimensions `(..., channel, freq, time)`. + psd_s (torch.Tensor): The complex-valued power spectral density (PSD) matrix of target speech. + Tensor with dimensions `(..., freq, channel, channel)`. + psd_n (torch.Tensor): The complex-valued power spectral density (PSD) matrix of noise. + Tensor with dimensions `(..., freq, channel, channel)`. + reference_channel (int or torch.Tensor): Specifies the reference channel. + If the dtype is ``int``, it represents the reference channel index. + If the dtype is ``torch.Tensor``, its shape is `(..., channel)`, where the ``channel`` dimension + is one-hot. + diagonal_loading (bool, optional): If ``True``, enables applying diagonal loading to ``psd_n``. + (Default: ``True``) + diag_eps (float, optional): The coefficient multiplied to the identity matrix for diagonal loading. + It is only effective when ``diagonal_loading`` is set to ``True``. (Default: ``1e-7``) + eps (float, optional): Value to add to the denominator in the beamforming weight formula. + (Default: ``1e-8``) + + Returns: + torch.Tensor: Single-channel complex-valued enhanced spectrum with dimensions `(..., freq, time)`. + """ + w_mvdr = F.mvdr_weights_souden(psd_s, psd_n, reference_channel, diagonal_loading, diag_eps, eps) + spectrum_enhanced = F.apply_beamforming(w_mvdr, specgram) + return spectrum_enhanced diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/transforms/_transforms.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/transforms/_transforms.py new file mode 100644 index 0000000000000000000000000000000000000000..43b0ab649525eab93562c38d04b4a8515771413b --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/transforms/_transforms.py @@ -0,0 +1,2138 @@ +# -*- coding: utf-8 -*- + +import math +import warnings +from typing import Callable, Optional, Sequence, Tuple, Union + +import torch +from torch import Tensor +from torch.nn.modules.lazy import LazyModuleMixin +from torch.nn.parameter import UninitializedParameter + +from torchaudio import functional as F +from torchaudio.functional.functional import ( + _apply_sinc_resample_kernel, + _check_convolve_mode, + _fix_waveform_shape, + _get_sinc_resample_kernel, + _stretch_waveform, + rnnt_loss, +) + +__all__ = [] + + +class Spectrogram(torch.nn.Module): + r"""Create a spectrogram from a audio signal. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + n_fft (int, optional): Size of FFT, creates ``n_fft // 2 + 1`` bins. (Default: ``400``) + win_length (int or None, optional): Window size. (Default: ``n_fft``) + hop_length (int or None, optional): Length of hop between STFT windows. (Default: ``win_length // 2``) + pad (int, optional): Two sided padding of signal. (Default: ``0``) + window_fn (Callable[..., Tensor], optional): A function to create a window tensor + that is applied/multiplied to each frame/window. (Default: ``torch.hann_window``) + power (float or None, optional): Exponent for the magnitude spectrogram, + (must be > 0) e.g., 1 for magnitude, 2 for power, etc. + If None, then the complex spectrum is returned instead. (Default: ``2``) + normalized (bool or str, optional): Whether to normalize by magnitude after stft. If input is str, choices are + ``"window"`` and ``"frame_length"``, if specific normalization type is desirable. ``True`` maps to + ``"window"``. (Default: ``False``) + wkwargs (dict or None, optional): Arguments for window function. (Default: ``None``) + center (bool, optional): whether to pad :attr:`waveform` on both sides so + that the :math:`t`-th frame is centered at time :math:`t \times \text{hop\_length}`. + (Default: ``True``) + pad_mode (string, optional): controls the padding method used when + :attr:`center` is ``True``. (Default: ``"reflect"``) + onesided (bool, optional): controls whether to return half of results to + avoid redundancy (Default: ``True``) + return_complex (bool, optional): + Deprecated and not used. + + Example + >>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True) + >>> transform = torchaudio.transforms.Spectrogram(n_fft=800) + >>> spectrogram = transform(waveform) + + """ + __constants__ = ["n_fft", "win_length", "hop_length", "pad", "power", "normalized"] + + def __init__( + self, + n_fft: int = 400, + win_length: Optional[int] = None, + hop_length: Optional[int] = None, + pad: int = 0, + window_fn: Callable[..., Tensor] = torch.hann_window, + power: Optional[float] = 2.0, + normalized: Union[bool, str] = False, + wkwargs: Optional[dict] = None, + center: bool = True, + pad_mode: str = "reflect", + onesided: bool = True, + return_complex: Optional[bool] = None, + ) -> None: + super(Spectrogram, self).__init__() + torch._C._log_api_usage_once("torchaudio.transforms.Spectrogram") + self.n_fft = n_fft + # number of FFT bins. the returned STFT result will have n_fft // 2 + 1 + # number of frequencies due to onesided=True in torch.stft + self.win_length = win_length if win_length is not None else n_fft + self.hop_length = hop_length if hop_length is not None else self.win_length // 2 + window = window_fn(self.win_length) if wkwargs is None else window_fn(self.win_length, **wkwargs) + self.register_buffer("window", window) + self.pad = pad + self.power = power + self.normalized = normalized + self.center = center + self.pad_mode = pad_mode + self.onesided = onesided + if return_complex is not None: + warnings.warn( + "`return_complex` argument is now deprecated and is not effective." + "`torchaudio.transforms.Spectrogram(power=None)` always returns a tensor with " + "complex dtype. Please remove the argument in the function call." + ) + + def forward(self, waveform: Tensor) -> Tensor: + r""" + Args: + waveform (Tensor): Tensor of audio of dimension (..., time). + + Returns: + Tensor: Dimension (..., freq, time), where freq is + ``n_fft // 2 + 1`` where ``n_fft`` is the number of + Fourier bins, and time is the number of window hops (n_frame). + """ + return F.spectrogram( + waveform, + self.pad, + self.window, + self.n_fft, + self.hop_length, + self.win_length, + self.power, + self.normalized, + self.center, + self.pad_mode, + self.onesided, + ) + + +class InverseSpectrogram(torch.nn.Module): + r"""Create an inverse spectrogram to recover an audio signal from a spectrogram. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + n_fft (int, optional): Size of FFT, creates ``n_fft // 2 + 1`` bins. (Default: ``400``) + win_length (int or None, optional): Window size. (Default: ``n_fft``) + hop_length (int or None, optional): Length of hop between STFT windows. (Default: ``win_length // 2``) + pad (int, optional): Two sided padding of signal. (Default: ``0``) + window_fn (Callable[..., Tensor], optional): A function to create a window tensor + that is applied/multiplied to each frame/window. (Default: ``torch.hann_window``) + normalized (bool or str, optional): Whether the stft output was normalized by magnitude. If input is str, + choices are ``"window"`` and ``"frame_length"``, dependent on normalization mode. ``True`` maps to + ``"window"``. (Default: ``False``) + wkwargs (dict or None, optional): Arguments for window function. (Default: ``None``) + center (bool, optional): whether the signal in spectrogram was padded on both sides so + that the :math:`t`-th frame is centered at time :math:`t \times \text{hop\_length}`. + (Default: ``True``) + pad_mode (string, optional): controls the padding method used when + :attr:`center` is ``True``. (Default: ``"reflect"``) + onesided (bool, optional): controls whether spectrogram was used to return half of results to + avoid redundancy (Default: ``True``) + + Example + >>> batch, freq, time = 2, 257, 100 + >>> length = 25344 + >>> spectrogram = torch.randn(batch, freq, time, dtype=torch.cdouble) + >>> transform = transforms.InverseSpectrogram(n_fft=512) + >>> waveform = transform(spectrogram, length) + """ + __constants__ = ["n_fft", "win_length", "hop_length", "pad", "power", "normalized"] + + def __init__( + self, + n_fft: int = 400, + win_length: Optional[int] = None, + hop_length: Optional[int] = None, + pad: int = 0, + window_fn: Callable[..., Tensor] = torch.hann_window, + normalized: Union[bool, str] = False, + wkwargs: Optional[dict] = None, + center: bool = True, + pad_mode: str = "reflect", + onesided: bool = True, + ) -> None: + super(InverseSpectrogram, self).__init__() + self.n_fft = n_fft + # number of FFT bins. the returned STFT result will have n_fft // 2 + 1 + # number of frequencies due to onesided=True in torch.stft + self.win_length = win_length if win_length is not None else n_fft + self.hop_length = hop_length if hop_length is not None else self.win_length // 2 + window = window_fn(self.win_length) if wkwargs is None else window_fn(self.win_length, **wkwargs) + self.register_buffer("window", window) + self.pad = pad + self.normalized = normalized + self.center = center + self.pad_mode = pad_mode + self.onesided = onesided + + def forward(self, spectrogram: Tensor, length: Optional[int] = None) -> Tensor: + r""" + Args: + spectrogram (Tensor): Complex tensor of audio of dimension (..., freq, time). + length (int or None, optional): The output length of the waveform. + + Returns: + Tensor: Dimension (..., time), Least squares estimation of the original signal. + """ + return F.inverse_spectrogram( + spectrogram, + length, + self.pad, + self.window, + self.n_fft, + self.hop_length, + self.win_length, + self.normalized, + self.center, + self.pad_mode, + self.onesided, + ) + + +class GriffinLim(torch.nn.Module): + r"""Compute waveform from a linear scale magnitude spectrogram using the Griffin-Lim transformation. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Implementation ported from + *librosa* :cite:`brian_mcfee-proc-scipy-2015`, *A fast Griffin-Lim algorithm* :cite:`6701851` + and *Signal estimation from modified short-time Fourier transform* :cite:`1172092`. + + Args: + n_fft (int, optional): Size of FFT, creates ``n_fft // 2 + 1`` bins. (Default: ``400``) + n_iter (int, optional): Number of iteration for phase recovery process. (Default: ``32``) + win_length (int or None, optional): Window size. (Default: ``n_fft``) + hop_length (int or None, optional): Length of hop between STFT windows. (Default: ``win_length // 2``) + window_fn (Callable[..., Tensor], optional): A function to create a window tensor + that is applied/multiplied to each frame/window. (Default: ``torch.hann_window``) + power (float, optional): Exponent for the magnitude spectrogram, + (must be > 0) e.g., 1 for magnitude, 2 for power, etc. (Default: ``2``) + wkwargs (dict or None, optional): Arguments for window function. (Default: ``None``) + momentum (float, optional): The momentum parameter for fast Griffin-Lim. + Setting this to 0 recovers the original Griffin-Lim method. + Values near 1 can lead to faster convergence, but above 1 may not converge. (Default: ``0.99``) + length (int, optional): Array length of the expected output. (Default: ``None``) + rand_init (bool, optional): Initializes phase randomly if True and to zero otherwise. (Default: ``True``) + + Example + >>> batch, freq, time = 2, 257, 100 + >>> spectrogram = torch.randn(batch, freq, time) + >>> transform = transforms.GriffinLim(n_fft=512) + >>> waveform = transform(spectrogram) + """ + __constants__ = ["n_fft", "n_iter", "win_length", "hop_length", "power", "length", "momentum", "rand_init"] + + def __init__( + self, + n_fft: int = 400, + n_iter: int = 32, + win_length: Optional[int] = None, + hop_length: Optional[int] = None, + window_fn: Callable[..., Tensor] = torch.hann_window, + power: float = 2.0, + wkwargs: Optional[dict] = None, + momentum: float = 0.99, + length: Optional[int] = None, + rand_init: bool = True, + ) -> None: + super(GriffinLim, self).__init__() + + if not (0 <= momentum < 1): + raise ValueError("momentum must be in the range [0, 1). Found: {}".format(momentum)) + + self.n_fft = n_fft + self.n_iter = n_iter + self.win_length = win_length if win_length is not None else n_fft + self.hop_length = hop_length if hop_length is not None else self.win_length // 2 + window = window_fn(self.win_length) if wkwargs is None else window_fn(self.win_length, **wkwargs) + self.register_buffer("window", window) + self.length = length + self.power = power + self.momentum = momentum + self.rand_init = rand_init + + def forward(self, specgram: Tensor) -> Tensor: + r""" + Args: + specgram (Tensor): + A magnitude-only STFT spectrogram of dimension (..., freq, frames) + where freq is ``n_fft // 2 + 1``. + + Returns: + Tensor: waveform of (..., time), where time equals the ``length`` parameter if given. + """ + return F.griffinlim( + specgram, + self.window, + self.n_fft, + self.hop_length, + self.win_length, + self.power, + self.n_iter, + self.momentum, + self.length, + self.rand_init, + ) + + +class AmplitudeToDB(torch.nn.Module): + r"""Turn a tensor from the power/amplitude scale to the decibel scale. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + This output depends on the maximum value in the input tensor, and so + may return different values for an audio clip split into snippets vs. a + a full clip. + + Args: + stype (str, optional): scale of input tensor (``"power"`` or ``"magnitude"``). The + power being the elementwise square of the magnitude. (Default: ``"power"``) + top_db (float or None, optional): minimum negative cut-off in decibels. A reasonable + number is 80. (Default: ``None``) + + Example + >>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True) + >>> transform = transforms.AmplitudeToDB(stype="amplitude", top_db=80) + >>> waveform_db = transform(waveform) + """ + __constants__ = ["multiplier", "amin", "ref_value", "db_multiplier"] + + def __init__(self, stype: str = "power", top_db: Optional[float] = None) -> None: + super(AmplitudeToDB, self).__init__() + self.stype = stype + if top_db is not None and top_db < 0: + raise ValueError("top_db must be positive value") + self.top_db = top_db + self.multiplier = 10.0 if stype == "power" else 20.0 + self.amin = 1e-10 + self.ref_value = 1.0 + self.db_multiplier = math.log10(max(self.amin, self.ref_value)) + + def forward(self, x: Tensor) -> Tensor: + r"""Numerically stable implementation from Librosa. + + https://librosa.org/doc/latest/generated/librosa.amplitude_to_db.html + + Args: + x (Tensor): Input tensor before being converted to decibel scale. + + Returns: + Tensor: Output tensor in decibel scale. + """ + return F.amplitude_to_DB(x, self.multiplier, self.amin, self.db_multiplier, self.top_db) + + +class MelScale(torch.nn.Module): + r"""Turn a normal STFT into a mel frequency STFT with triangular filter banks. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + n_mels (int, optional): Number of mel filterbanks. (Default: ``128``) + sample_rate (int, optional): Sample rate of audio signal. (Default: ``16000``) + f_min (float, optional): Minimum frequency. (Default: ``0.``) + f_max (float or None, optional): Maximum frequency. (Default: ``sample_rate // 2``) + n_stft (int, optional): Number of bins in STFT. See ``n_fft`` in :class:`Spectrogram`. (Default: ``201``) + norm (str or None, optional): If ``"slaney"``, divide the triangular mel weights by the width of the mel band + (area normalization). (Default: ``None``) + mel_scale (str, optional): Scale to use: ``htk`` or ``slaney``. (Default: ``htk``) + + Example + >>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True) + >>> spectrogram_transform = transforms.Spectrogram(n_fft=1024) + >>> spectrogram = spectrogram_transform(waveform) + >>> melscale_transform = transforms.MelScale(sample_rate=sample_rate, n_stft=1024 // 2 + 1) + >>> melscale_spectrogram = melscale_transform(spectrogram) + + See also: + :py:func:`torchaudio.functional.melscale_fbanks` - The function used to + generate the filter banks. + """ + __constants__ = ["n_mels", "sample_rate", "f_min", "f_max"] + + def __init__( + self, + n_mels: int = 128, + sample_rate: int = 16000, + f_min: float = 0.0, + f_max: Optional[float] = None, + n_stft: int = 201, + norm: Optional[str] = None, + mel_scale: str = "htk", + ) -> None: + super(MelScale, self).__init__() + self.n_mels = n_mels + self.sample_rate = sample_rate + self.f_max = f_max if f_max is not None else float(sample_rate // 2) + self.f_min = f_min + self.norm = norm + self.mel_scale = mel_scale + + if f_min > self.f_max: + raise ValueError("Require f_min: {} <= f_max: {}".format(f_min, self.f_max)) + + fb = F.melscale_fbanks(n_stft, self.f_min, self.f_max, self.n_mels, self.sample_rate, self.norm, self.mel_scale) + self.register_buffer("fb", fb) + + def forward(self, specgram: Tensor) -> Tensor: + r""" + Args: + specgram (Tensor): A spectrogram STFT of dimension (..., freq, time). + + Returns: + Tensor: Mel frequency spectrogram of size (..., ``n_mels``, time). + """ + + # (..., time, freq) dot (freq, n_mels) -> (..., n_mels, time) + mel_specgram = torch.matmul(specgram.transpose(-1, -2), self.fb).transpose(-1, -2) + + return mel_specgram + + +class InverseMelScale(torch.nn.Module): + r"""Estimate a STFT in normal frequency domain from mel frequency domain. + + .. devices:: CPU CUDA + + It minimizes the euclidian norm between the input mel-spectrogram and the product between + the estimated spectrogram and the filter banks using `torch.linalg.lstsq`. + + Args: + n_stft (int): Number of bins in STFT. See ``n_fft`` in :class:`Spectrogram`. + n_mels (int, optional): Number of mel filterbanks. (Default: ``128``) + sample_rate (int, optional): Sample rate of audio signal. (Default: ``16000``) + f_min (float, optional): Minimum frequency. (Default: ``0.``) + f_max (float or None, optional): Maximum frequency. (Default: ``sample_rate // 2``) + norm (str or None, optional): If "slaney", divide the triangular mel weights by the width of the mel band + (area normalization). (Default: ``None``) + mel_scale (str, optional): Scale to use: ``htk`` or ``slaney``. (Default: ``htk``) + driver (str, optional): Name of the LAPACK/MAGMA method to be used for `torch.lstsq`. + For CPU inputs the valid values are ``"gels"``, ``"gelsy"``, ``"gelsd"``, ``"gelss"``. + For CUDA input, the only valid driver is ``"gels"``, which assumes that A is full-rank. + (Default: ``"gels``) + + Example + >>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True) + >>> mel_spectrogram_transform = transforms.MelSpectrogram(sample_rate, n_fft=1024) + >>> mel_spectrogram = mel_spectrogram_transform(waveform) + >>> inverse_melscale_transform = transforms.InverseMelScale(n_stft=1024 // 2 + 1) + >>> spectrogram = inverse_melscale_transform(mel_spectrogram) + """ + __constants__ = [ + "n_stft", + "n_mels", + "sample_rate", + "f_min", + "f_max", + ] + + def __init__( + self, + n_stft: int, + n_mels: int = 128, + sample_rate: int = 16000, + f_min: float = 0.0, + f_max: Optional[float] = None, + norm: Optional[str] = None, + mel_scale: str = "htk", + driver: str = "gels", + ) -> None: + super(InverseMelScale, self).__init__() + self.n_mels = n_mels + self.sample_rate = sample_rate + self.f_max = f_max or float(sample_rate // 2) + self.f_min = f_min + self.driver = driver + + if f_min > self.f_max: + raise ValueError("Require f_min: {} <= f_max: {}".format(f_min, self.f_max)) + + if driver not in ["gels", "gelsy", "gelsd", "gelss"]: + raise ValueError(f'driver must be one of ["gels", "gelsy", "gelsd", "gelss"]. Found {driver}.') + + fb = F.melscale_fbanks(n_stft, self.f_min, self.f_max, self.n_mels, self.sample_rate, norm, mel_scale) + self.register_buffer("fb", fb) + + def forward(self, melspec: Tensor) -> Tensor: + r""" + Args: + melspec (Tensor): A Mel frequency spectrogram of dimension (..., ``n_mels``, time) + + Returns: + Tensor: Linear scale spectrogram of size (..., freq, time) + """ + # pack batch + shape = melspec.size() + melspec = melspec.view(-1, shape[-2], shape[-1]) + + n_mels, time = shape[-2], shape[-1] + freq, _ = self.fb.size() # (freq, n_mels) + if self.n_mels != n_mels: + raise ValueError("Expected an input with {} mel bins. Found: {}".format(self.n_mels, n_mels)) + + specgram = torch.relu(torch.linalg.lstsq(self.fb.transpose(-1, -2)[None], melspec, driver=self.driver).solution) + + # unpack batch + specgram = specgram.view(shape[:-2] + (freq, time)) + return specgram + + +class MelSpectrogram(torch.nn.Module): + r"""Create MelSpectrogram for a raw audio signal. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + This is a composition of :py:func:`torchaudio.transforms.Spectrogram` + and :py:func:`torchaudio.transforms.MelScale`. + + Sources + * https://gist.github.com/kastnerkyle/179d6e9a88202ab0a2fe + * https://timsainb.github.io/spectrograms-mfccs-and-inversion-in-python.html + * http://haythamfayek.com/2016/04/21/speech-processing-for-machine-learning.html + + Args: + sample_rate (int, optional): Sample rate of audio signal. (Default: ``16000``) + n_fft (int, optional): Size of FFT, creates ``n_fft // 2 + 1`` bins. (Default: ``400``) + win_length (int or None, optional): Window size. (Default: ``n_fft``) + hop_length (int or None, optional): Length of hop between STFT windows. (Default: ``win_length // 2``) + f_min (float, optional): Minimum frequency. (Default: ``0.``) + f_max (float or None, optional): Maximum frequency. (Default: ``None``) + pad (int, optional): Two sided padding of signal. (Default: ``0``) + n_mels (int, optional): Number of mel filterbanks. (Default: ``128``) + window_fn (Callable[..., Tensor], optional): A function to create a window tensor + that is applied/multiplied to each frame/window. (Default: ``torch.hann_window``) + power (float, optional): Exponent for the magnitude spectrogram, + (must be > 0) e.g., 1 for magnitude, 2 for power, etc. (Default: ``2``) + normalized (bool, optional): Whether to normalize by magnitude after stft. (Default: ``False``) + wkwargs (Dict[..., ...] or None, optional): Arguments for window function. (Default: ``None``) + center (bool, optional): whether to pad :attr:`waveform` on both sides so + that the :math:`t`-th frame is centered at time :math:`t \times \text{hop\_length}`. + (Default: ``True``) + pad_mode (string, optional): controls the padding method used when + :attr:`center` is ``True``. (Default: ``"reflect"``) + onesided: Deprecated and unused. + norm (str or None, optional): If "slaney", divide the triangular mel weights by the width of the mel band + (area normalization). (Default: ``None``) + mel_scale (str, optional): Scale to use: ``htk`` or ``slaney``. (Default: ``htk``) + + Example + >>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True) + >>> transform = transforms.MelSpectrogram(sample_rate) + >>> mel_specgram = transform(waveform) # (channel, n_mels, time) + + See also: + :py:func:`torchaudio.functional.melscale_fbanks` - The function used to + generate the filter banks. + """ + __constants__ = ["sample_rate", "n_fft", "win_length", "hop_length", "pad", "n_mels", "f_min"] + + def __init__( + self, + sample_rate: int = 16000, + n_fft: int = 400, + win_length: Optional[int] = None, + hop_length: Optional[int] = None, + f_min: float = 0.0, + f_max: Optional[float] = None, + pad: int = 0, + n_mels: int = 128, + window_fn: Callable[..., Tensor] = torch.hann_window, + power: float = 2.0, + normalized: bool = False, + wkwargs: Optional[dict] = None, + center: bool = True, + pad_mode: str = "reflect", + onesided: Optional[bool] = None, + norm: Optional[str] = None, + mel_scale: str = "htk", + ) -> None: + super(MelSpectrogram, self).__init__() + torch._C._log_api_usage_once("torchaudio.transforms.MelSpectrogram") + + if onesided is not None: + warnings.warn( + "Argument 'onesided' has been deprecated and has no influence on the behavior of this module." + ) + + self.sample_rate = sample_rate + self.n_fft = n_fft + self.win_length = win_length if win_length is not None else n_fft + self.hop_length = hop_length if hop_length is not None else self.win_length // 2 + self.pad = pad + self.power = power + self.normalized = normalized + self.n_mels = n_mels # number of mel frequency bins + self.f_max = f_max + self.f_min = f_min + self.spectrogram = Spectrogram( + n_fft=self.n_fft, + win_length=self.win_length, + hop_length=self.hop_length, + pad=self.pad, + window_fn=window_fn, + power=self.power, + normalized=self.normalized, + wkwargs=wkwargs, + center=center, + pad_mode=pad_mode, + onesided=True, + ) + self.mel_scale = MelScale( + self.n_mels, self.sample_rate, self.f_min, self.f_max, self.n_fft // 2 + 1, norm, mel_scale + ) + + def forward(self, waveform: Tensor) -> Tensor: + r""" + Args: + waveform (Tensor): Tensor of audio of dimension (..., time). + + Returns: + Tensor: Mel frequency spectrogram of size (..., ``n_mels``, time). + """ + specgram = self.spectrogram(waveform) + mel_specgram = self.mel_scale(specgram) + return mel_specgram + + +class MFCC(torch.nn.Module): + r"""Create the Mel-frequency cepstrum coefficients from an audio signal. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + By default, this calculates the MFCC on the DB-scaled Mel spectrogram. + This is not the textbook implementation, but is implemented here to + give consistency with librosa. + + This output depends on the maximum value in the input spectrogram, and so + may return different values for an audio clip split into snippets vs. a + a full clip. + + Args: + sample_rate (int, optional): Sample rate of audio signal. (Default: ``16000``) + n_mfcc (int, optional): Number of mfc coefficients to retain. (Default: ``40``) + dct_type (int, optional): type of DCT (discrete cosine transform) to use. (Default: ``2``) + norm (str, optional): norm to use. (Default: ``"ortho"``) + log_mels (bool, optional): whether to use log-mel spectrograms instead of db-scaled. (Default: ``False``) + melkwargs (dict or None, optional): arguments for MelSpectrogram. (Default: ``None``) + + Example + >>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True) + >>> transform = transforms.MFCC( + >>> sample_rate=sample_rate, + >>> n_mfcc=13, + >>> melkwargs={"n_fft": 400, "hop_length": 160, "n_mels": 23, "center": False}, + >>> ) + >>> mfcc = transform(waveform) + + See also: + :py:func:`torchaudio.functional.melscale_fbanks` - The function used to + generate the filter banks. + """ + __constants__ = ["sample_rate", "n_mfcc", "dct_type", "top_db", "log_mels"] + + def __init__( + self, + sample_rate: int = 16000, + n_mfcc: int = 40, + dct_type: int = 2, + norm: str = "ortho", + log_mels: bool = False, + melkwargs: Optional[dict] = None, + ) -> None: + super(MFCC, self).__init__() + supported_dct_types = [2] + if dct_type not in supported_dct_types: + raise ValueError("DCT type not supported: {}".format(dct_type)) + self.sample_rate = sample_rate + self.n_mfcc = n_mfcc + self.dct_type = dct_type + self.norm = norm + self.top_db = 80.0 + self.amplitude_to_DB = AmplitudeToDB("power", self.top_db) + + melkwargs = melkwargs or {} + self.MelSpectrogram = MelSpectrogram(sample_rate=self.sample_rate, **melkwargs) + + if self.n_mfcc > self.MelSpectrogram.n_mels: + raise ValueError("Cannot select more MFCC coefficients than # mel bins") + dct_mat = F.create_dct(self.n_mfcc, self.MelSpectrogram.n_mels, self.norm) + self.register_buffer("dct_mat", dct_mat) + self.log_mels = log_mels + + def forward(self, waveform: Tensor) -> Tensor: + r""" + Args: + waveform (Tensor): Tensor of audio of dimension (..., time). + + Returns: + Tensor: specgram_mel_db of size (..., ``n_mfcc``, time). + """ + mel_specgram = self.MelSpectrogram(waveform) + if self.log_mels: + log_offset = 1e-6 + mel_specgram = torch.log(mel_specgram + log_offset) + else: + mel_specgram = self.amplitude_to_DB(mel_specgram) + + # (..., time, n_mels) dot (n_mels, n_mfcc) -> (..., n_nfcc, time) + mfcc = torch.matmul(mel_specgram.transpose(-1, -2), self.dct_mat).transpose(-1, -2) + return mfcc + + +class LFCC(torch.nn.Module): + r"""Create the linear-frequency cepstrum coefficients from an audio signal. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + By default, this calculates the LFCC on the DB-scaled linear filtered spectrogram. + This is not the textbook implementation, but is implemented here to + give consistency with librosa. + + This output depends on the maximum value in the input spectrogram, and so + may return different values for an audio clip split into snippets vs. a + a full clip. + + Args: + sample_rate (int, optional): Sample rate of audio signal. (Default: ``16000``) + n_filter (int, optional): Number of linear filters to apply. (Default: ``128``) + n_lfcc (int, optional): Number of lfc coefficients to retain. (Default: ``40``) + f_min (float, optional): Minimum frequency. (Default: ``0.``) + f_max (float or None, optional): Maximum frequency. (Default: ``None``) + dct_type (int, optional): type of DCT (discrete cosine transform) to use. (Default: ``2``) + norm (str, optional): norm to use. (Default: ``"ortho"``) + log_lf (bool, optional): whether to use log-lf spectrograms instead of db-scaled. (Default: ``False``) + speckwargs (dict or None, optional): arguments for Spectrogram. (Default: ``None``) + + Example + >>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True) + >>> transform = transforms.LFCC( + >>> sample_rate=sample_rate, + >>> n_lfcc=13, + >>> speckwargs={"n_fft": 400, "hop_length": 160, "center": False}, + >>> ) + >>> lfcc = transform(waveform) + + See also: + :py:func:`torchaudio.functional.linear_fbanks` - The function used to + generate the filter banks. + """ + __constants__ = ["sample_rate", "n_filter", "n_lfcc", "dct_type", "top_db", "log_lf"] + + def __init__( + self, + sample_rate: int = 16000, + n_filter: int = 128, + f_min: float = 0.0, + f_max: Optional[float] = None, + n_lfcc: int = 40, + dct_type: int = 2, + norm: str = "ortho", + log_lf: bool = False, + speckwargs: Optional[dict] = None, + ) -> None: + super(LFCC, self).__init__() + supported_dct_types = [2] + if dct_type not in supported_dct_types: + raise ValueError("DCT type not supported: {}".format(dct_type)) + self.sample_rate = sample_rate + self.f_min = f_min + self.f_max = f_max if f_max is not None else float(sample_rate // 2) + self.n_filter = n_filter + self.n_lfcc = n_lfcc + self.dct_type = dct_type + self.norm = norm + self.top_db = 80.0 + self.amplitude_to_DB = AmplitudeToDB("power", self.top_db) + + speckwargs = speckwargs or {} + self.Spectrogram = Spectrogram(**speckwargs) + + if self.n_lfcc > self.Spectrogram.n_fft: + raise ValueError("Cannot select more LFCC coefficients than # fft bins") + + filter_mat = F.linear_fbanks( + n_freqs=self.Spectrogram.n_fft // 2 + 1, + f_min=self.f_min, + f_max=self.f_max, + n_filter=self.n_filter, + sample_rate=self.sample_rate, + ) + self.register_buffer("filter_mat", filter_mat) + + dct_mat = F.create_dct(self.n_lfcc, self.n_filter, self.norm) + self.register_buffer("dct_mat", dct_mat) + self.log_lf = log_lf + + def forward(self, waveform: Tensor) -> Tensor: + r""" + Args: + waveform (Tensor): Tensor of audio of dimension (..., time). + + Returns: + Tensor: Linear Frequency Cepstral Coefficients of size (..., ``n_lfcc``, time). + """ + specgram = self.Spectrogram(waveform) + + # (..., time, freq) dot (freq, n_filter) -> (..., n_filter, time) + specgram = torch.matmul(specgram.transpose(-1, -2), self.filter_mat).transpose(-1, -2) + + if self.log_lf: + log_offset = 1e-6 + specgram = torch.log(specgram + log_offset) + else: + specgram = self.amplitude_to_DB(specgram) + + # (..., time, n_filter) dot (n_filter, n_lfcc) -> (..., n_lfcc, time) + lfcc = torch.matmul(specgram.transpose(-1, -2), self.dct_mat).transpose(-1, -2) + return lfcc + + +class MuLawEncoding(torch.nn.Module): + r"""Encode signal based on mu-law companding. + + .. devices:: CPU CUDA + + .. properties:: TorchScript + + For more info see the + `Wikipedia Entry `_ + + This algorithm assumes the signal has been scaled to between -1 and 1 and + returns a signal encoded with values from 0 to quantization_channels - 1 + + Args: + quantization_channels (int, optional): Number of channels. (Default: ``256``) + + Example + >>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True) + >>> transform = torchaudio.transforms.MuLawEncoding(quantization_channels=512) + >>> mulawtrans = transform(waveform) + + """ + __constants__ = ["quantization_channels"] + + def __init__(self, quantization_channels: int = 256) -> None: + super(MuLawEncoding, self).__init__() + self.quantization_channels = quantization_channels + + def forward(self, x: Tensor) -> Tensor: + r""" + Args: + x (Tensor): A signal to be encoded. + + Returns: + Tensor: An encoded signal. + """ + return F.mu_law_encoding(x, self.quantization_channels) + + +class MuLawDecoding(torch.nn.Module): + r"""Decode mu-law encoded signal. + + .. devices:: CPU CUDA + + .. properties:: TorchScript + + For more info see the + `Wikipedia Entry `_ + + This expects an input with values between 0 and ``quantization_channels - 1`` + and returns a signal scaled between -1 and 1. + + Args: + quantization_channels (int, optional): Number of channels. (Default: ``256``) + + Example + >>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True) + >>> transform = torchaudio.transforms.MuLawDecoding(quantization_channels=512) + >>> mulawtrans = transform(waveform) + """ + __constants__ = ["quantization_channels"] + + def __init__(self, quantization_channels: int = 256) -> None: + super(MuLawDecoding, self).__init__() + self.quantization_channels = quantization_channels + + def forward(self, x_mu: Tensor) -> Tensor: + r""" + Args: + x_mu (Tensor): A mu-law encoded signal which needs to be decoded. + + Returns: + Tensor: The signal decoded. + """ + return F.mu_law_decoding(x_mu, self.quantization_channels) + + +class Resample(torch.nn.Module): + r"""Resample a signal from one frequency to another. A resampling method can be given. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Note: + If resampling on waveforms of higher precision than float32, there may be a small loss of precision + because the kernel is cached once as float32. If high precision resampling is important for your application, + the functional form will retain higher precision, but run slower because it does not cache the kernel. + Alternatively, you could rewrite a transform that caches a higher precision kernel. + + Args: + orig_freq (int, optional): The original frequency of the signal. (Default: ``16000``) + new_freq (int, optional): The desired frequency. (Default: ``16000``) + resampling_method (str, optional): The resampling method to use. + Options: [``sinc_interp_hann``, ``sinc_interp_kaiser``] (Default: ``"sinc_interp_hann"``) + lowpass_filter_width (int, optional): Controls the sharpness of the filter, more == sharper + but less efficient. (Default: ``6``) + rolloff (float, optional): The roll-off frequency of the filter, as a fraction of the Nyquist. + Lower values reduce anti-aliasing, but also reduce some of the highest frequencies. (Default: ``0.99``) + beta (float or None, optional): The shape parameter used for kaiser window. + dtype (torch.device, optional): + Determnines the precision that resampling kernel is pre-computed and cached. If not provided, + kernel is computed with ``torch.float64`` then cached as ``torch.float32``. + If you need higher precision, provide ``torch.float64``, and the pre-computed kernel is computed and + cached as ``torch.float64``. If you use resample with lower precision, then instead of providing this + providing this argument, please use ``Resample.to(dtype)``, so that the kernel generation is still + carried out on ``torch.float64``. + + Example + >>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True) + >>> transform = transforms.Resample(sample_rate, sample_rate/10) + >>> waveform = transform(waveform) + """ + + def __init__( + self, + orig_freq: int = 16000, + new_freq: int = 16000, + resampling_method: str = "sinc_interp_hann", + lowpass_filter_width: int = 6, + rolloff: float = 0.99, + beta: Optional[float] = None, + *, + dtype: Optional[torch.dtype] = None, + ) -> None: + super().__init__() + + self.orig_freq = orig_freq + self.new_freq = new_freq + self.gcd = math.gcd(int(self.orig_freq), int(self.new_freq)) + self.resampling_method = resampling_method + self.lowpass_filter_width = lowpass_filter_width + self.rolloff = rolloff + self.beta = beta + + if self.orig_freq != self.new_freq: + kernel, self.width = _get_sinc_resample_kernel( + self.orig_freq, + self.new_freq, + self.gcd, + self.lowpass_filter_width, + self.rolloff, + self.resampling_method, + beta, + dtype=dtype, + ) + self.register_buffer("kernel", kernel) + + def forward(self, waveform: Tensor) -> Tensor: + r""" + Args: + waveform (Tensor): Tensor of audio of dimension (..., time). + + Returns: + Tensor: Output signal of dimension (..., time). + """ + if self.orig_freq == self.new_freq: + return waveform + return _apply_sinc_resample_kernel(waveform, self.orig_freq, self.new_freq, self.gcd, self.kernel, self.width) + + +class ComputeDeltas(torch.nn.Module): + r"""Compute delta coefficients of a tensor, usually a spectrogram. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + See `torchaudio.functional.compute_deltas` for more details. + + Args: + win_length (int, optional): The window length used for computing delta. (Default: ``5``) + mode (str, optional): Mode parameter passed to padding. (Default: ``"replicate"``) + """ + __constants__ = ["win_length"] + + def __init__(self, win_length: int = 5, mode: str = "replicate") -> None: + super(ComputeDeltas, self).__init__() + self.win_length = win_length + self.mode = mode + + def forward(self, specgram: Tensor) -> Tensor: + r""" + Args: + specgram (Tensor): Tensor of audio of dimension (..., freq, time). + + Returns: + Tensor: Tensor of deltas of dimension (..., freq, time). + """ + return F.compute_deltas(specgram, win_length=self.win_length, mode=self.mode) + + +class TimeStretch(torch.nn.Module): + r"""Stretch stft in time without modifying pitch for a given rate. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Proposed in *SpecAugment* :cite:`specaugment`. + + Args: + hop_length (int or None, optional): Length of hop between STFT windows. + (Default: ``n_fft // 2``, where ``n_fft == (n_freq - 1) * 2``) + n_freq (int, optional): number of filter banks from stft. (Default: ``201``) + fixed_rate (float or None, optional): rate to speed up or slow down by. + If None is provided, rate must be passed to the forward method. (Default: ``None``) + + .. note:: + + The expected input is raw, complex-valued spectrogram. + + Example + >>> spectrogram = torchaudio.transforms.Spectrogram(power=None) + >>> stretch = torchaudio.transforms.TimeStretch() + >>> + >>> original = spectrogram(waveform) + >>> stretched_1_2 = stretch(original, 1.2) + >>> stretched_0_9 = stretch(original, 0.9) + + .. image:: https://download.pytorch.org/torchaudio/doc-assets/specaugment_time_stretch.png + :width: 600 + :alt: The visualization of stretched spectrograms. + """ + __constants__ = ["fixed_rate"] + + def __init__(self, hop_length: Optional[int] = None, n_freq: int = 201, fixed_rate: Optional[float] = None) -> None: + super(TimeStretch, self).__init__() + + self.fixed_rate = fixed_rate + + n_fft = (n_freq - 1) * 2 + hop_length = hop_length if hop_length is not None else n_fft // 2 + self.register_buffer("phase_advance", torch.linspace(0, math.pi * hop_length, n_freq)[..., None]) + + def forward(self, complex_specgrams: Tensor, overriding_rate: Optional[float] = None) -> Tensor: + r""" + Args: + complex_specgrams (Tensor): + A tensor of dimension `(..., freq, num_frame)` with complex dtype. + overriding_rate (float or None, optional): speed up to apply to this batch. + If no rate is passed, use ``self.fixed_rate``. (Default: ``None``) + + Returns: + Tensor: + Stretched spectrogram. The resulting tensor is of the corresponding complex dtype + as the input spectrogram, and the number of frames is changed to ``ceil(num_frame / rate)``. + """ + if not torch.is_complex(complex_specgrams): + warnings.warn( + "The input to TimeStretch must be complex type. " + "Providing non-complex tensor produces invalid results.", + stacklevel=4, + ) + + if overriding_rate is None: + if self.fixed_rate is None: + raise ValueError("If no fixed_rate is specified, must pass a valid rate to the forward method.") + rate = self.fixed_rate + else: + rate = overriding_rate + return F.phase_vocoder(complex_specgrams, rate, self.phase_advance) + + +class Fade(torch.nn.Module): + r"""Add a fade in and/or fade out to an waveform. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + fade_in_len (int, optional): Length of fade-in (time frames). (Default: ``0``) + fade_out_len (int, optional): Length of fade-out (time frames). (Default: ``0``) + fade_shape (str, optional): Shape of fade. Must be one of: "quarter_sine", + ``"half_sine"``, ``"linear"``, ``"logarithmic"``, ``"exponential"``. + (Default: ``"linear"``) + + Example + >>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True) + >>> transform = transforms.Fade(fade_in_len=sample_rate, fade_out_len=2 * sample_rate, fade_shape="linear") + >>> faded_waveform = transform(waveform) + """ + + def __init__(self, fade_in_len: int = 0, fade_out_len: int = 0, fade_shape: str = "linear") -> None: + super(Fade, self).__init__() + self.fade_in_len = fade_in_len + self.fade_out_len = fade_out_len + self.fade_shape = fade_shape + + def forward(self, waveform: Tensor) -> Tensor: + r""" + Args: + waveform (Tensor): Tensor of audio of dimension `(..., time)`. + + Returns: + Tensor: Tensor of audio of dimension `(..., time)`. + """ + waveform_length = waveform.size()[-1] + device = waveform.device + return self._fade_in(waveform_length, device) * self._fade_out(waveform_length, device) * waveform + + def _fade_in(self, waveform_length: int, device: torch.device) -> Tensor: + fade = torch.linspace(0, 1, self.fade_in_len, device=device) + ones = torch.ones(waveform_length - self.fade_in_len, device=device) + + if self.fade_shape == "linear": + fade = fade + + if self.fade_shape == "exponential": + fade = torch.pow(2, (fade - 1)) * fade + + if self.fade_shape == "logarithmic": + fade = torch.log10(0.1 + fade) + 1 + + if self.fade_shape == "quarter_sine": + fade = torch.sin(fade * math.pi / 2) + + if self.fade_shape == "half_sine": + fade = torch.sin(fade * math.pi - math.pi / 2) / 2 + 0.5 + + return torch.cat((fade, ones)).clamp_(0, 1) + + def _fade_out(self, waveform_length: int, device: torch.device) -> Tensor: + fade = torch.linspace(0, 1, self.fade_out_len, device=device) + ones = torch.ones(waveform_length - self.fade_out_len, device=device) + + if self.fade_shape == "linear": + fade = -fade + 1 + + if self.fade_shape == "exponential": + fade = torch.pow(2, -fade) * (1 - fade) + + if self.fade_shape == "logarithmic": + fade = torch.log10(1.1 - fade) + 1 + + if self.fade_shape == "quarter_sine": + fade = torch.sin(fade * math.pi / 2 + math.pi / 2) + + if self.fade_shape == "half_sine": + fade = torch.sin(fade * math.pi + math.pi / 2) / 2 + 0.5 + + return torch.cat((ones, fade)).clamp_(0, 1) + + +class _AxisMasking(torch.nn.Module): + r"""Apply masking to a spectrogram. + + Args: + mask_param (int): Maximum possible length of the mask. + axis (int): What dimension the mask is applied on (assuming the tensor is 3D). + For frequency masking, axis = 1. + For time masking, axis = 2. + iid_masks (bool): Applies iid masks to each of the examples in the batch dimension. + This option is applicable only when the dimension of the input tensor is >= 3. + p (float, optional): maximum proportion of columns that can be masked. (Default: 1.0) + """ + __constants__ = ["mask_param", "axis", "iid_masks", "p"] + + def __init__(self, mask_param: int, axis: int, iid_masks: bool, p: float = 1.0) -> None: + super(_AxisMasking, self).__init__() + self.mask_param = mask_param + self.axis = axis + self.iid_masks = iid_masks + self.p = p + + def forward(self, specgram: Tensor, mask_value: Union[float, torch.Tensor] = 0.0) -> Tensor: + r""" + Args: + specgram (Tensor): Tensor of dimension `(..., freq, time)`. + mask_value (float): Value to assign to the masked columns. + + Returns: + Tensor: Masked spectrogram of dimensions `(..., freq, time)`. + """ + # if iid_masks flag marked and specgram has a batch dimension + # self.axis + specgram.dim() - 3 gives the time/frequency dimension (last two dimensions) + # for input tensor for which the dimension is not 3. + if self.iid_masks: + return F.mask_along_axis_iid( + specgram, self.mask_param, mask_value, self.axis + specgram.dim() - 3, p=self.p + ) + else: + return F.mask_along_axis(specgram, self.mask_param, mask_value, self.axis + specgram.dim() - 3, p=self.p) + + +class FrequencyMasking(_AxisMasking): + r"""Apply masking to a spectrogram in the frequency domain. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Proposed in *SpecAugment* :cite:`specaugment`. + + Args: + freq_mask_param (int): maximum possible length of the mask. + Indices uniformly sampled from [0, freq_mask_param). + iid_masks (bool, optional): whether to apply different masks to each + example/channel in the batch. (Default: ``False``) + This option is applicable only when the input tensor >= 3D. + + Example + >>> spectrogram = torchaudio.transforms.Spectrogram() + >>> masking = torchaudio.transforms.FrequencyMasking(freq_mask_param=80) + >>> + >>> original = spectrogram(waveform) + >>> masked = masking(original) + + .. image:: https://download.pytorch.org/torchaudio/doc-assets/specaugment_freq_masking1.png + :alt: The original spectrogram + + .. image:: https://download.pytorch.org/torchaudio/doc-assets/specaugment_freq_masking2.png + :alt: The spectrogram masked along frequency axis + """ + + def __init__(self, freq_mask_param: int, iid_masks: bool = False) -> None: + super(FrequencyMasking, self).__init__(freq_mask_param, 1, iid_masks) + + +class TimeMasking(_AxisMasking): + r"""Apply masking to a spectrogram in the time domain. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Proposed in *SpecAugment* :cite:`specaugment`. + + Args: + time_mask_param (int): maximum possible length of the mask. + Indices uniformly sampled from [0, time_mask_param). + iid_masks (bool, optional): whether to apply different masks to each + example/channel in the batch. (Default: ``False``) + This option is applicable only when the input tensor >= 3D. + p (float, optional): maximum proportion of time steps that can be masked. + Must be within range [0.0, 1.0]. (Default: 1.0) + + Example + >>> spectrogram = torchaudio.transforms.Spectrogram() + >>> masking = torchaudio.transforms.TimeMasking(time_mask_param=80) + >>> + >>> original = spectrogram(waveform) + >>> masked = masking(original) + + .. image:: https://download.pytorch.org/torchaudio/doc-assets/specaugment_time_masking1.png + :alt: The original spectrogram + + .. image:: https://download.pytorch.org/torchaudio/doc-assets/specaugment_time_masking2.png + :alt: The spectrogram masked along time axis + """ + + def __init__(self, time_mask_param: int, iid_masks: bool = False, p: float = 1.0) -> None: + if not 0.0 <= p <= 1.0: + raise ValueError(f"The value of p must be between 0.0 and 1.0 ({p} given).") + super(TimeMasking, self).__init__(time_mask_param, 2, iid_masks, p=p) + + +class SpecAugment(torch.nn.Module): + r"""Apply time and frequency masking to a spectrogram. + Args: + n_time_masks (int): Number of time masks. If its value is zero, no time masking will be applied. + time_mask_param (int): Maximum possible length of the time mask. + n_freq_masks (int): Number of frequency masks. If its value is zero, no frequency masking will be applied. + freq_mask_param (int): Maximum possible length of the frequency mask. + iid_masks (bool, optional): Applies iid masks to each of the examples in the batch dimension. + This option is applicable only when the input tensor is 4D. (Default: ``True``) + p (float, optional): maximum proportion of time steps that can be masked. + Must be within range [0.0, 1.0]. (Default: 1.0) + zero_masking (bool, optional): If ``True``, use 0 as the mask value, + else use mean of the input tensor. (Default: ``False``) + """ + __constants__ = [ + "n_time_masks", + "time_mask_param", + "n_freq_masks", + "freq_mask_param", + "iid_masks", + "p", + "zero_masking", + ] + + def __init__( + self, + n_time_masks: int, + time_mask_param: int, + n_freq_masks: int, + freq_mask_param: int, + iid_masks: bool = True, + p: float = 1.0, + zero_masking: bool = False, + ) -> None: + super(SpecAugment, self).__init__() + self.n_time_masks = n_time_masks + self.time_mask_param = time_mask_param + self.n_freq_masks = n_freq_masks + self.freq_mask_param = freq_mask_param + self.iid_masks = iid_masks + self.p = p + self.zero_masking = zero_masking + + def forward(self, specgram: Tensor) -> Tensor: + r""" + Args: + specgram (Tensor): Tensor of shape `(..., freq, time)`. + Returns: + Tensor: Masked spectrogram of shape `(..., freq, time)`. + """ + if self.zero_masking: + mask_value = 0.0 + else: + mask_value = specgram.mean() + time_dim = specgram.dim() - 1 + freq_dim = time_dim - 1 + + if specgram.dim() > 2 and self.iid_masks is True: + for _ in range(self.n_time_masks): + specgram = F.mask_along_axis_iid(specgram, self.time_mask_param, mask_value, time_dim, p=self.p) + for _ in range(self.n_freq_masks): + specgram = F.mask_along_axis_iid(specgram, self.freq_mask_param, mask_value, freq_dim, p=self.p) + else: + for _ in range(self.n_time_masks): + specgram = F.mask_along_axis(specgram, self.time_mask_param, mask_value, time_dim, p=self.p) + for _ in range(self.n_freq_masks): + specgram = F.mask_along_axis(specgram, self.freq_mask_param, mask_value, freq_dim, p=self.p) + + return specgram + + +class Loudness(torch.nn.Module): + r"""Measure audio loudness according to the ITU-R BS.1770-4 recommendation. + + .. devices:: CPU CUDA + + .. properties:: TorchScript + + Args: + sample_rate (int): Sample rate of audio signal. + + Example + >>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True) + >>> transform = transforms.Loudness(sample_rate) + >>> loudness = transform(waveform) + + Reference: + - https://www.itu.int/rec/R-REC-BS.1770-4-201510-I/en + """ + __constants__ = ["sample_rate"] + + def __init__(self, sample_rate: int): + super(Loudness, self).__init__() + self.sample_rate = sample_rate + + def forward(self, wavefrom: Tensor): + r""" + Args: + waveform(torch.Tensor): audio waveform of dimension `(..., channels, time)` + + Returns: + Tensor: loudness estimates (LKFS) + """ + return F.loudness(wavefrom, self.sample_rate) + + +class Vol(torch.nn.Module): + r"""Adjust volume of waveform. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + gain (float): Interpreted according to the given gain_type: + If ``gain_type`` = ``amplitude``, ``gain`` is a positive amplitude ratio. + If ``gain_type`` = ``power``, ``gain`` is a power (voltage squared). + If ``gain_type`` = ``db``, ``gain`` is in decibels. + gain_type (str, optional): Type of gain. One of: ``amplitude``, ``power``, ``db`` (Default: ``amplitude``) + + Example + >>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True) + >>> transform = transforms.Vol(gain=0.5, gain_type="amplitude") + >>> quieter_waveform = transform(waveform) + """ + + def __init__(self, gain: float, gain_type: str = "amplitude"): + super(Vol, self).__init__() + self.gain = gain + self.gain_type = gain_type + + if gain_type in ["amplitude", "power"] and gain < 0: + raise ValueError("If gain_type = amplitude or power, gain must be positive.") + + def forward(self, waveform: Tensor) -> Tensor: + r""" + Args: + waveform (Tensor): Tensor of audio of dimension `(..., time)`. + + Returns: + Tensor: Tensor of audio of dimension `(..., time)`. + """ + if self.gain_type == "amplitude": + waveform = waveform * self.gain + + if self.gain_type == "db": + waveform = F.gain(waveform, self.gain) + + if self.gain_type == "power": + waveform = F.gain(waveform, 10 * math.log10(self.gain)) + + return torch.clamp(waveform, -1, 1) + + +class SlidingWindowCmn(torch.nn.Module): + r""" + Apply sliding-window cepstral mean (and optionally variance) normalization per utterance. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + cmn_window (int, optional): Window in frames for running average CMN computation (int, default = 600) + min_cmn_window (int, optional): Minimum CMN window used at start of decoding (adds latency only at start). + Only applicable if center == false, ignored if center==true (int, default = 100) + center (bool, optional): If true, use a window centered on the current frame + (to the extent possible, modulo end effects). If false, window is to the left. (bool, default = false) + norm_vars (bool, optional): If true, normalize variance to one. (bool, default = false) + + Example + >>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True) + >>> transform = transforms.SlidingWindowCmn(cmn_window=1000) + >>> cmn_waveform = transform(waveform) + """ + + def __init__( + self, cmn_window: int = 600, min_cmn_window: int = 100, center: bool = False, norm_vars: bool = False + ) -> None: + super().__init__() + self.cmn_window = cmn_window + self.min_cmn_window = min_cmn_window + self.center = center + self.norm_vars = norm_vars + + def forward(self, specgram: Tensor) -> Tensor: + r""" + Args: + specgram (Tensor): Tensor of spectrogram of dimension `(..., time, freq)`. + + Returns: + Tensor: Tensor of spectrogram of dimension `(..., time, freq)`. + """ + cmn_specgram = F.sliding_window_cmn(specgram, self.cmn_window, self.min_cmn_window, self.center, self.norm_vars) + return cmn_specgram + + +class Vad(torch.nn.Module): + r"""Voice Activity Detector. Similar to SoX implementation. + + .. devices:: CPU CUDA + + .. properties:: TorchScript + + Attempts to trim silence and quiet background sounds from the ends of recordings of speech. + The algorithm currently uses a simple cepstral power measurement to detect voice, + so may be fooled by other things, especially music. + + The effect can trim only from the front of the audio, + so in order to trim from the back, the reverse effect must also be used. + + Args: + sample_rate (int): Sample rate of audio signal. + trigger_level (float, optional): The measurement level used to trigger activity detection. + This may need to be changed depending on the noise level, signal level, + and other characteristics of the input audio. (Default: 7.0) + trigger_time (float, optional): The time constant (in seconds) + used to help ignore short bursts of sound. (Default: 0.25) + search_time (float, optional): The amount of audio (in seconds) + to search for quieter/shorter bursts of audio to include prior + to the detected trigger point. (Default: 1.0) + allowed_gap (float, optional): The allowed gap (in seconds) between + quiteter/shorter bursts of audio to include prior + to the detected trigger point. (Default: 0.25) + pre_trigger_time (float, optional): The amount of audio (in seconds) to preserve + before the trigger point and any found quieter/shorter bursts. (Default: 0.0) + boot_time (float, optional) The algorithm (internally) uses adaptive noise + estimation/reduction in order to detect the start of the wanted audio. + This option sets the time for the initial noise estimate. (Default: 0.35) + noise_up_time (float, optional) Time constant used by the adaptive noise estimator + for when the noise level is increasing. (Default: 0.1) + noise_down_time (float, optional) Time constant used by the adaptive noise estimator + for when the noise level is decreasing. (Default: 0.01) + noise_reduction_amount (float, optional) Amount of noise reduction to use in + the detection algorithm (e.g. 0, 0.5, ...). (Default: 1.35) + measure_freq (float, optional) Frequency of the algorithm’s + processing/measurements. (Default: 20.0) + measure_duration: (float or None, optional) Measurement duration. + (Default: Twice the measurement period; i.e. with overlap.) + measure_smooth_time (float, optional) Time constant used to smooth + spectral measurements. (Default: 0.4) + hp_filter_freq (float, optional) "Brick-wall" frequency of high-pass filter applied + at the input to the detector algorithm. (Default: 50.0) + lp_filter_freq (float, optional) "Brick-wall" frequency of low-pass filter applied + at the input to the detector algorithm. (Default: 6000.0) + hp_lifter_freq (float, optional) "Brick-wall" frequency of high-pass lifter used + in the detector algorithm. (Default: 150.0) + lp_lifter_freq (float, optional) "Brick-wall" frequency of low-pass lifter used + in the detector algorithm. (Default: 2000.0) + + Example + >>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True) + >>> waveform_reversed, sample_rate = apply_effects_tensor(waveform, sample_rate, [["reverse"]]) + >>> transform = transforms.Vad(sample_rate=sample_rate, trigger_level=7.5) + >>> waveform_reversed_front_trim = transform(waveform_reversed) + >>> waveform_end_trim, sample_rate = apply_effects_tensor( + >>> waveform_reversed_front_trim, sample_rate, [["reverse"]] + >>> ) + + Reference: + - http://sox.sourceforge.net/sox.html + """ + + def __init__( + self, + sample_rate: int, + trigger_level: float = 7.0, + trigger_time: float = 0.25, + search_time: float = 1.0, + allowed_gap: float = 0.25, + pre_trigger_time: float = 0.0, + boot_time: float = 0.35, + noise_up_time: float = 0.1, + noise_down_time: float = 0.01, + noise_reduction_amount: float = 1.35, + measure_freq: float = 20.0, + measure_duration: Optional[float] = None, + measure_smooth_time: float = 0.4, + hp_filter_freq: float = 50.0, + lp_filter_freq: float = 6000.0, + hp_lifter_freq: float = 150.0, + lp_lifter_freq: float = 2000.0, + ) -> None: + super().__init__() + + self.sample_rate = sample_rate + self.trigger_level = trigger_level + self.trigger_time = trigger_time + self.search_time = search_time + self.allowed_gap = allowed_gap + self.pre_trigger_time = pre_trigger_time + self.boot_time = boot_time + self.noise_up_time = noise_up_time + self.noise_down_time = noise_down_time + self.noise_reduction_amount = noise_reduction_amount + self.measure_freq = measure_freq + self.measure_duration = measure_duration + self.measure_smooth_time = measure_smooth_time + self.hp_filter_freq = hp_filter_freq + self.lp_filter_freq = lp_filter_freq + self.hp_lifter_freq = hp_lifter_freq + self.lp_lifter_freq = lp_lifter_freq + + def forward(self, waveform: Tensor) -> Tensor: + r""" + Args: + waveform (Tensor): Tensor of audio of dimension `(channels, time)` or `(time)` + Tensor of shape `(channels, time)` is treated as a multi-channel recording + of the same event and the resulting output will be trimmed to the earliest + voice activity in any channel. + """ + return F.vad( + waveform=waveform, + sample_rate=self.sample_rate, + trigger_level=self.trigger_level, + trigger_time=self.trigger_time, + search_time=self.search_time, + allowed_gap=self.allowed_gap, + pre_trigger_time=self.pre_trigger_time, + boot_time=self.boot_time, + noise_up_time=self.noise_up_time, + noise_down_time=self.noise_down_time, + noise_reduction_amount=self.noise_reduction_amount, + measure_freq=self.measure_freq, + measure_duration=self.measure_duration, + measure_smooth_time=self.measure_smooth_time, + hp_filter_freq=self.hp_filter_freq, + lp_filter_freq=self.lp_filter_freq, + hp_lifter_freq=self.hp_lifter_freq, + lp_lifter_freq=self.lp_lifter_freq, + ) + + +class SpectralCentroid(torch.nn.Module): + r"""Compute the spectral centroid for each channel along the time axis. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + The spectral centroid is defined as the weighted average of the + frequency values, weighted by their magnitude. + + Args: + sample_rate (int): Sample rate of audio signal. + n_fft (int, optional): Size of FFT, creates ``n_fft // 2 + 1`` bins. (Default: ``400``) + win_length (int or None, optional): Window size. (Default: ``n_fft``) + hop_length (int or None, optional): Length of hop between STFT windows. (Default: ``win_length // 2``) + pad (int, optional): Two sided padding of signal. (Default: ``0``) + window_fn (Callable[..., Tensor], optional): A function to create a window tensor + that is applied/multiplied to each frame/window. (Default: ``torch.hann_window``) + wkwargs (dict or None, optional): Arguments for window function. (Default: ``None``) + + Example + >>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True) + >>> transform = transforms.SpectralCentroid(sample_rate) + >>> spectral_centroid = transform(waveform) # (channel, time) + """ + __constants__ = ["sample_rate", "n_fft", "win_length", "hop_length", "pad"] + + def __init__( + self, + sample_rate: int, + n_fft: int = 400, + win_length: Optional[int] = None, + hop_length: Optional[int] = None, + pad: int = 0, + window_fn: Callable[..., Tensor] = torch.hann_window, + wkwargs: Optional[dict] = None, + ) -> None: + super(SpectralCentroid, self).__init__() + self.sample_rate = sample_rate + self.n_fft = n_fft + self.win_length = win_length if win_length is not None else n_fft + self.hop_length = hop_length if hop_length is not None else self.win_length // 2 + window = window_fn(self.win_length) if wkwargs is None else window_fn(self.win_length, **wkwargs) + self.register_buffer("window", window) + self.pad = pad + + def forward(self, waveform: Tensor) -> Tensor: + r""" + Args: + waveform (Tensor): Tensor of audio of dimension `(..., time)`. + + Returns: + Tensor: Spectral Centroid of size `(..., time)`. + """ + + return F.spectral_centroid( + waveform, self.sample_rate, self.pad, self.window, self.n_fft, self.hop_length, self.win_length + ) + + +class PitchShift(LazyModuleMixin, torch.nn.Module): + r"""Shift the pitch of a waveform by ``n_steps`` steps. + + .. devices:: CPU CUDA + + .. properties:: TorchScript + + Args: + waveform (Tensor): The input waveform of shape `(..., time)`. + sample_rate (int): Sample rate of `waveform`. + n_steps (int): The (fractional) steps to shift `waveform`. + bins_per_octave (int, optional): The number of steps per octave (Default : ``12``). + n_fft (int, optional): Size of FFT, creates ``n_fft // 2 + 1`` bins (Default: ``512``). + win_length (int or None, optional): Window size. If None, then ``n_fft`` is used. (Default: ``None``). + hop_length (int or None, optional): Length of hop between STFT windows. If None, then ``win_length // 4`` + is used (Default: ``None``). + window (Tensor or None, optional): Window tensor that is applied/multiplied to each frame/window. + If None, then ``torch.hann_window(win_length)`` is used (Default: ``None``). + + Example + >>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True) + >>> transform = transforms.PitchShift(sample_rate, 4) + >>> waveform_shift = transform(waveform) # (channel, time) + """ + __constants__ = ["sample_rate", "n_steps", "bins_per_octave", "n_fft", "win_length", "hop_length"] + + kernel: UninitializedParameter + width: int + + def __init__( + self, + sample_rate: int, + n_steps: int, + bins_per_octave: int = 12, + n_fft: int = 512, + win_length: Optional[int] = None, + hop_length: Optional[int] = None, + window_fn: Callable[..., Tensor] = torch.hann_window, + wkwargs: Optional[dict] = None, + ) -> None: + super().__init__() + self.n_steps = n_steps + self.bins_per_octave = bins_per_octave + self.sample_rate = sample_rate + self.n_fft = n_fft + self.win_length = win_length if win_length is not None else n_fft + self.hop_length = hop_length if hop_length is not None else self.win_length // 4 + window = window_fn(self.win_length) if wkwargs is None else window_fn(self.win_length, **wkwargs) + self.register_buffer("window", window) + rate = 2.0 ** (-float(n_steps) / bins_per_octave) + self.orig_freq = int(sample_rate / rate) + self.gcd = math.gcd(int(self.orig_freq), int(sample_rate)) + + if self.orig_freq != sample_rate: + self.width = -1 + self.kernel = UninitializedParameter(device=None, dtype=None) + + def initialize_parameters(self, input): + if self.has_uninitialized_params(): + if self.orig_freq != self.sample_rate: + with torch.no_grad(): + kernel, self.width = _get_sinc_resample_kernel( + self.orig_freq, + self.sample_rate, + self.gcd, + dtype=input.dtype, + device=input.device, + ) + self.kernel.materialize(kernel.shape) + self.kernel.copy_(kernel) + + def forward(self, waveform: Tensor) -> Tensor: + r""" + Args: + waveform (Tensor): Tensor of audio of dimension `(..., time)`. + + Returns: + Tensor: The pitch-shifted audio of shape `(..., time)`. + """ + shape = waveform.size() + + waveform_stretch = _stretch_waveform( + waveform, + self.n_steps, + self.bins_per_octave, + self.n_fft, + self.win_length, + self.hop_length, + self.window, + ) + + if self.orig_freq != self.sample_rate: + waveform_shift = _apply_sinc_resample_kernel( + waveform_stretch, + self.orig_freq, + self.sample_rate, + self.gcd, + self.kernel, + self.width, + ) + else: + waveform_shift = waveform_stretch + + return _fix_waveform_shape( + waveform_shift, + shape, + ) + + +class RNNTLoss(torch.nn.Module): + """Compute the RNN Transducer loss from *Sequence Transduction with Recurrent Neural Networks* + :cite:`graves2012sequence`. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + The RNN Transducer loss extends the CTC loss by defining a distribution over output + sequences of all lengths, and by jointly modelling both input-output and output-output + dependencies. + + Args: + blank (int, optional): blank label (Default: ``-1``) + clamp (float, optional): clamp for gradients (Default: ``-1``) + reduction (string, optional): Specifies the reduction to apply to the output: + ``"none"`` | ``"mean"`` | ``"sum"``. (Default: ``"mean"``) + fused_log_softmax (bool): set to False if calling log_softmax outside of loss (Default: ``True``) + + Example + >>> # Hypothetical values + >>> logits = torch.tensor([[[[0.1, 0.6, 0.1, 0.1, 0.1], + >>> [0.1, 0.1, 0.6, 0.1, 0.1], + >>> [0.1, 0.1, 0.2, 0.8, 0.1]], + >>> [[0.1, 0.6, 0.1, 0.1, 0.1], + >>> [0.1, 0.1, 0.2, 0.1, 0.1], + >>> [0.7, 0.1, 0.2, 0.1, 0.1]]]], + >>> dtype=torch.float32, + >>> requires_grad=True) + >>> targets = torch.tensor([[1, 2]], dtype=torch.int) + >>> logit_lengths = torch.tensor([2], dtype=torch.int) + >>> target_lengths = torch.tensor([2], dtype=torch.int) + >>> transform = transforms.RNNTLoss(blank=0) + >>> loss = transform(logits, targets, logit_lengths, target_lengths) + >>> loss.backward() + """ + + def __init__( + self, + blank: int = -1, + clamp: float = -1.0, + reduction: str = "mean", + fused_log_softmax: bool = True, + ): + super().__init__() + self.blank = blank + self.clamp = clamp + self.reduction = reduction + self.fused_log_softmax = fused_log_softmax + + def forward( + self, + logits: Tensor, + targets: Tensor, + logit_lengths: Tensor, + target_lengths: Tensor, + ): + """ + Args: + logits (Tensor): Tensor of dimension `(batch, max seq length, max target length + 1, class)` + containing output from joiner + targets (Tensor): Tensor of dimension `(batch, max target length)` containing targets with zero padded + logit_lengths (Tensor): Tensor of dimension `(batch)` containing lengths of each sequence from encoder + target_lengths (Tensor): Tensor of dimension `(batch)` containing lengths of targets for each sequence + Returns: + Tensor: Loss with the reduction option applied. If ``reduction`` is ``"none"``, then size (batch), + otherwise scalar. + """ + return rnnt_loss( + logits, + targets, + logit_lengths, + target_lengths, + self.blank, + self.clamp, + self.reduction, + self.fused_log_softmax, + ) + + +class Convolve(torch.nn.Module): + r""" + Convolves inputs along their last dimension using the direct method. + Note that, in contrast to :class:`torch.nn.Conv1d`, which actually applies the valid cross-correlation + operator, this module applies the true `convolution`_ operator. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + mode (str, optional): Must be one of ("full", "valid", "same"). + + * "full": Returns the full convolution result, with shape `(..., N + M - 1)`, where + `N` and `M` are the trailing dimensions of the two inputs. (Default) + * "valid": Returns the segment of the full convolution result corresponding to where + the two inputs overlap completely, with shape `(..., max(N, M) - min(N, M) + 1)`. + * "same": Returns the center segment of the full convolution result, with shape `(..., N)`. + + .. _convolution: + https://en.wikipedia.org/wiki/Convolution + """ + + def __init__(self, mode: str = "full") -> None: + _check_convolve_mode(mode) + + super().__init__() + self.mode = mode + + def forward(self, x: torch.Tensor, y: torch.Tensor) -> torch.Tensor: + r""" + Args: + x (torch.Tensor): First convolution operand, with shape `(..., N)`. + y (torch.Tensor): Second convolution operand, with shape `(..., M)` + (leading dimensions must be broadcast-able with those of ``x``). + + Returns: + torch.Tensor: Result of convolving ``x`` and ``y``, with shape `(..., L)`, where + the leading dimensions match those of ``x`` and `L` is dictated by ``mode``. + """ + return F.convolve(x, y, mode=self.mode) + + +class FFTConvolve(torch.nn.Module): + r""" + Convolves inputs along their last dimension using FFT. For inputs with large last dimensions, this module + is generally much faster than :class:`Convolve`. + Note that, in contrast to :class:`torch.nn.Conv1d`, which actually applies the valid cross-correlation + operator, this module applies the true `convolution`_ operator. + Also note that this module can only output float tensors (int tensor inputs will be cast to float). + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + mode (str, optional): Must be one of ("full", "valid", "same"). + + * "full": Returns the full convolution result, with shape `(..., N + M - 1)`, where + `N` and `M` are the trailing dimensions of the two inputs. (Default) + * "valid": Returns the segment of the full convolution result corresponding to where + the two inputs overlap completely, with shape `(..., max(N, M) - min(N, M) + 1)`. + * "same": Returns the center segment of the full convolution result, with shape `(..., N)`. + + .. _convolution: + https://en.wikipedia.org/wiki/Convolution + """ + + def __init__(self, mode: str = "full") -> None: + _check_convolve_mode(mode) + + super().__init__() + self.mode = mode + + def forward(self, x: torch.Tensor, y: torch.Tensor) -> torch.Tensor: + r""" + Args: + x (torch.Tensor): First convolution operand, with shape `(..., N)`. + y (torch.Tensor): Second convolution operand, with shape `(..., M)` + (leading dimensions must be broadcast-able with those of ``x``). + + Returns: + torch.Tensor: Result of convolving ``x`` and ``y``, with shape `(..., L)`, where + the leading dimensions match those of ``x`` and `L` is dictated by ``mode``. + """ + return F.fftconvolve(x, y, mode=self.mode) + + +def _source_target_sample_rate(orig_freq: int, speed: float) -> Tuple[int, int]: + source_sample_rate = int(speed * orig_freq) + target_sample_rate = int(orig_freq) + gcd = math.gcd(source_sample_rate, target_sample_rate) + return source_sample_rate // gcd, target_sample_rate // gcd + + +class Speed(torch.nn.Module): + r"""Adjusts waveform speed. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + orig_freq (int): Original frequency of the signals in ``waveform``. + factor (float): Factor by which to adjust speed of input. Values greater than 1.0 + compress ``waveform`` in time, whereas values less than 1.0 stretch ``waveform`` in time. + """ + + def __init__(self, orig_freq, factor) -> None: + super().__init__() + + self.orig_freq = orig_freq + self.factor = factor + + self.source_sample_rate, self.target_sample_rate = _source_target_sample_rate(orig_freq, factor) + self.resampler = Resample(orig_freq=self.source_sample_rate, new_freq=self.target_sample_rate) + + def forward(self, waveform, lengths: Optional[torch.Tensor] = None) -> Tuple[torch.Tensor, Optional[torch.Tensor]]: + r""" + Args: + waveform (torch.Tensor): Input signals, with shape `(..., time)`. + lengths (torch.Tensor or None, optional): Valid lengths of signals in ``waveform``, with shape `(...)`. + If ``None``, all elements in ``waveform`` are treated as valid. (Default: ``None``) + + Returns: + (torch.Tensor, torch.Tensor or None): + torch.Tensor + Speed-adjusted waveform, with shape `(..., new_time).` + torch.Tensor or None + If ``lengths`` is not ``None``, valid lengths of signals in speed-adjusted waveform, + with shape `(...)`; otherwise, ``None``. + """ + + if lengths is None: + out_lengths = None + else: + out_lengths = torch.ceil(lengths * self.target_sample_rate / self.source_sample_rate).to(lengths.dtype) + + return self.resampler(waveform), out_lengths + + +class SpeedPerturbation(torch.nn.Module): + r"""Applies the speed perturbation augmentation introduced in + *Audio augmentation for speech recognition* :cite:`ko15_interspeech`. For a given input, + the module samples a speed-up factor from ``factors`` uniformly at random and adjusts + the speed of the input by that factor. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + orig_freq (int): Original frequency of the signals in ``waveform``. + factors (Sequence[float]): Factors by which to adjust speed of input. Values greater than 1.0 + compress ``waveform`` in time, whereas values less than 1.0 stretch ``waveform`` in time. + + Example + >>> speed_perturb = SpeedPerturbation(16000, [0.9, 1.1, 1.0, 1.0, 1.0]) + >>> # waveform speed will be adjusted by factor 0.9 with 20% probability, + >>> # 1.1 with 20% probability, and 1.0 (i.e. kept the same) with 60% probability. + >>> speed_perturbed_waveform = speed_perturb(waveform, lengths) + """ + + def __init__(self, orig_freq: int, factors: Sequence[float]) -> None: + super().__init__() + + self.speeders = torch.nn.ModuleList([Speed(orig_freq=orig_freq, factor=factor) for factor in factors]) + + def forward( + self, waveform: torch.Tensor, lengths: Optional[torch.Tensor] = None + ) -> Tuple[torch.Tensor, Optional[torch.Tensor]]: + r""" + Args: + waveform (torch.Tensor): Input signals, with shape `(..., time)`. + lengths (torch.Tensor or None, optional): Valid lengths of signals in ``waveform``, with shape `(...)`. + If ``None``, all elements in ``waveform`` are treated as valid. (Default: ``None``) + + Returns: + (torch.Tensor, torch.Tensor or None): + torch.Tensor + Speed-adjusted waveform, with shape `(..., new_time).` + torch.Tensor or None + If ``lengths`` is not ``None``, valid lengths of signals in speed-adjusted waveform, + with shape `(...)`; otherwise, ``None``. + """ + + idx = int(torch.randint(len(self.speeders), ())) + # NOTE: we do this because TorchScript doesn't allow for + # indexing ModuleList instances with non-literals. + for speeder_idx, speeder in enumerate(self.speeders): + if idx == speeder_idx: + return speeder(waveform, lengths) + raise RuntimeError("Speeder not found; execution should have never reached here.") + + +class AddNoise(torch.nn.Module): + r"""Scales and adds noise to waveform per signal-to-noise ratio. + See :meth:`torchaudio.functional.add_noise` for more details. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + """ + + def forward( + self, waveform: torch.Tensor, noise: torch.Tensor, snr: torch.Tensor, lengths: Optional[torch.Tensor] = None + ) -> torch.Tensor: + r""" + Args: + waveform (torch.Tensor): Input waveform, with shape `(..., L)`. + noise (torch.Tensor): Noise, with shape `(..., L)` (same shape as ``waveform``). + snr (torch.Tensor): Signal-to-noise ratios in dB, with shape `(...,)`. + lengths (torch.Tensor or None, optional): Valid lengths of signals in ``waveform`` and ``noise``, + with shape `(...,)` (leading dimensions must match those of ``waveform``). If ``None``, all + elements in ``waveform`` and ``noise`` are treated as valid. (Default: ``None``) + + Returns: + torch.Tensor: Result of scaling and adding ``noise`` to ``waveform``, with shape `(..., L)` + (same shape as ``waveform``). + """ + return F.add_noise(waveform, noise, snr, lengths) + + +class Preemphasis(torch.nn.Module): + r"""Pre-emphasizes a waveform along its last dimension. + See :meth:`torchaudio.functional.preemphasis` for more details. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + coeff (float, optional): Pre-emphasis coefficient. Typically between 0.0 and 1.0. + (Default: 0.97) + """ + + def __init__(self, coeff: float = 0.97) -> None: + super().__init__() + self.coeff = coeff + + def forward(self, waveform: torch.Tensor) -> torch.Tensor: + r""" + Args: + waveform (torch.Tensor): Waveform, with shape `(..., N)`. + + Returns: + torch.Tensor: Pre-emphasized waveform, with shape `(..., N)`. + """ + return F.preemphasis(waveform, coeff=self.coeff) + + +class Deemphasis(torch.nn.Module): + r"""De-emphasizes a waveform along its last dimension. + See :meth:`torchaudio.functional.deemphasis` for more details. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + coeff (float, optional): De-emphasis coefficient. Typically between 0.0 and 1.0. + (Default: 0.97) + """ + + def __init__(self, coeff: float = 0.97) -> None: + super().__init__() + self.coeff = coeff + + def forward(self, waveform: torch.Tensor) -> torch.Tensor: + r""" + Args: + waveform (torch.Tensor): Waveform, with shape `(..., N)`. + + Returns: + torch.Tensor: De-emphasized waveform, with shape `(..., N)`. + """ + return F.functional.deemphasis(waveform, coeff=self.coeff) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/utils/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/utils/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f30b5ed929e8396d82575b8331f1862b80c08717 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/utils/__init__.py @@ -0,0 +1,4 @@ +from .download import _download_asset + + +__all__ = ["_download_asset"] diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/utils/download.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/utils/download.py new file mode 100644 index 0000000000000000000000000000000000000000..5519b7f4be07342c3e7c069011240bc240682295 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/utils/download.py @@ -0,0 +1,89 @@ +import hashlib +import logging +from os import PathLike +from pathlib import Path +from typing import Union + +import torch +from torchaudio._internal import download_url_to_file + +_LG = logging.getLogger(__name__) + + +def _get_local_path(key): + path = Path(torch.hub.get_dir()) / "torchaudio" / Path(key) + path.parent.mkdir(parents=True, exist_ok=True) + return path + + +def _download(key, path, progress): + url = f"https://download.pytorch.org/torchaudio/{key}" + download_url_to_file(url, path, progress=progress) + + +def _get_hash(path, hash, chunk_size=1028): + m = hashlib.sha256() + with open(path, "rb") as file: + data = file.read(chunk_size) + while data: + m.update(data) + data = file.read(chunk_size) + return m.hexdigest() + + +def _download_asset( + key: str, + hash: str = "", + path: Union[str, PathLike] = "", + *, + progress: bool = True, +) -> str: + """Download and store torchaudio assets to local file system. + + If a file exists at the download path, then that path is returned with or without + hash validation. + + Args: + key (str): The asset identifier. + hash (str, optional): + The value of SHA256 hash of the asset. If provided, it is used to verify + the downloaded / cached object. If not provided, then no hash validation + is performed. This means if a file exists at the download path, then the path + is returned as-is without verifying the identity of the file. + path (path-like object, optional): + By default, the downloaded asset is saved in a directory under + :py:func:`torch.hub.get_dir` and intermediate directories based on the given `key` + are created. + This argument can be used to overwrite the target location. + When this argument is provided, all the intermediate directories have to be + created beforehand. + progress (bool): Whether to show progress bar for downloading. Default: ``True``. + + Note: + Currently the valid key values are the route on ``download.pytorch.org/torchaudio``, + but this is an implementation detail. + + Returns: + str: The path to the asset on the local file system. + """ + path = path or _get_local_path(key) + + if path.exists(): + _LG.info("The local file (%s) exists. Skipping the download.", path) + else: + _LG.info("Downloading %s to %s", key, path) + _download(key, path, progress=progress) + + if hash: + _LG.info("Verifying the hash value.") + digest = _get_hash(path, hash) + + if digest != hash: + raise ValueError( + f"The hash value of the downloaded file ({path}), '{digest}' does not match " + f"the provided hash value, '{hash}'." + ) + + _LG.info("Hash validated.") + + return str(path) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/version.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/version.py new file mode 100644 index 0000000000000000000000000000000000000000..8416d1392fced90a9d90364d8040bd62e3541b3a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchaudio/version.py @@ -0,0 +1,2 @@ +__version__ = '2.10.0+cu128' +git_version = '27b7ebdebd2d2e4d34a2f5c05b0fb26efbd1da63' diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata-0.11.0.dist-info/INSTALLER b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata-0.11.0.dist-info/INSTALLER new file mode 100644 index 0000000000000000000000000000000000000000..a1b589e38a32041e49332e5e81c2d363dc418d68 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata-0.11.0.dist-info/INSTALLER @@ -0,0 +1 @@ +pip diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata-0.11.0.dist-info/LICENSE b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata-0.11.0.dist-info/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..42642630479834b5940585ccd2687b3bfcf7b07c --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata-0.11.0.dist-info/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2021-present, Facebook, Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata-0.11.0.dist-info/METADATA b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata-0.11.0.dist-info/METADATA new file mode 100644 index 0000000000000000000000000000000000000000..a7da7f48a2db050b8f80b2e07aa8cd00d2830499 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata-0.11.0.dist-info/METADATA @@ -0,0 +1,168 @@ +Metadata-Version: 2.2 +Name: torchdata +Version: 0.11.0 +Summary: Composable data loading modules for PyTorch +Home-page: https://github.com/pytorch/data +Author: PyTorch Team +Author-email: packages@pytorch.org +License: BSD +Classifier: Intended Audience :: Developers +Classifier: Intended Audience :: Science/Research +Classifier: License :: OSI Approved :: BSD License +Classifier: Operating System :: MacOS :: MacOS X +Classifier: Operating System :: Microsoft :: Windows +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 +Classifier: Programming Language :: Python :: 3.13 +Classifier: Programming Language :: Python :: Implementation :: CPython +Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence +Requires-Python: >=3.9 +Description-Content-Type: text/markdown +License-File: LICENSE +Requires-Dist: urllib3>=1.25 +Requires-Dist: requests +Requires-Dist: torch>=2 +Dynamic: author +Dynamic: author-email +Dynamic: classifier +Dynamic: description +Dynamic: description-content-type +Dynamic: home-page +Dynamic: license +Dynamic: requires-dist +Dynamic: requires-python +Dynamic: summary + +# TorchData (see note below on current status) + +[**What is TorchData?**](#what-is-torchdata) | [**Stateful DataLoader**](#stateful-dataloader) | +[**Install guide**](#installation) | [**Contributing**](#contributing) | [**License**](#license) + +**:warning: June 2024 Status Update: Removing DataPipes and DataLoader V2** + +**We are re-focusing the torchdata repo to be an iterative enhancement of torch.utils.data.DataLoader. We do not plan on +continuing development or maintaining the [`DataPipes`] and [`DataLoaderV2`] solutions, and they will be removed from +the torchdata repo. We'll also be revisiting the `DataPipes` references in pytorch/pytorch. In release +`torchdata==0.8.0` (July 2024) they will be marked as deprecated, and sometime after 0.9.0 (Oct 2024) they will be +deleted. Existing users are advised to pin to `torchdata==0.9.0` or an older version until they are able to migrate +away. Subsequent releases will not include DataPipes or DataLoaderV2. The old version of this README is +[available here](https://github.com/pytorch/data/blob/v0.7.1/README.md). Please reach out if you suggestions or comments +(please use [#1196](https://github.com/pytorch/data/issues/1196) for feedback).** + +## + +## What is TorchData? + +The TorchData project is an iterative enhancement to the PyTorch torch.utils.data.DataLoader and +torch.utils.data.Dataset/IterableDataset to make them scalable, performant dataloading solutions. We will be iterating +on the enhancements under [the torchdata repo](torchdata). + +Our first change begins with adding checkpointing to torch.utils.data.DataLoader, which can be found in +[stateful_dataloader, a drop-in replacement for torch.utils.data.DataLoader](torchdata/stateful_dataloader), by defining +`load_state_dict` and `state_dict` methods that enable mid-epoch checkpointing, and an API for users to track custom +iteration progress, and other custom states from the dataloader workers such as token buffers and/or RNG states. + +## Stateful DataLoader + +`torchdata.stateful_dataloader.StatefulDataLoader` is a drop-in replacement for torch.utils.data.DataLoader which +provides state_dict and load_state_dict functionality. See +[the Stateful DataLoader main page](torchdata/stateful_dataloader) for more information and examples. Also check out the +examples +[in this Colab notebook](https://colab.research.google.com/drive/1tonoovEd7Tsi8EW8ZHXf0v3yHJGwZP8M?usp=sharing). + +## torchdata.nodes + +torchdata.nodes is a library of composable iterators (not iterables!) that let you chain together common dataloading and +pre-proc operations. It follows a streaming programming model, although "sampler + Map-style" can still be configured if +you desire. See [torchdata.nodes main page](torchdata/nodes) for more details. Stay tuned for tutorial on +torchdata.nodes coming soon! + +## Installation + +### Version Compatibility + +The following is the corresponding `torchdata` versions and supported Python versions. + +| `torch` | `torchdata` | `python` | +| -------------------- | ------------------ | ----------------- | +| `master` / `nightly` | `main` / `nightly` | `>=3.9`, `<=3.13` | +| `2.6.0` | `0.11.0` | `>=3.9`, `<=3.13` | +| `2.5.0` | `0.10.0` | `>=3.9`, `<=3.12` | +| `2.5.0` | `0.9.0` | `>=3.9`, `<=3.12` | +| `2.4.0` | `0.8.0` | `>=3.8`, `<=3.12` | +| `2.0.0` | `0.6.0` | `>=3.8`, `<=3.11` | +| `1.13.1` | `0.5.1` | `>=3.7`, `<=3.10` | +| `1.12.1` | `0.4.1` | `>=3.7`, `<=3.10` | +| `1.12.0` | `0.4.0` | `>=3.7`, `<=3.10` | +| `1.11.0` | `0.3.0` | `>=3.7`, `<=3.10` | + +### Local pip or conda + +First, set up an environment. We will be installing a PyTorch binary as well as torchdata. If you're using conda, create +a conda environment: + +```bash +conda create --name torchdata +conda activate torchdata +``` + +If you wish to use `venv` instead: + +```bash +python -m venv torchdata-env +source torchdata-env/bin/activate +``` + +Install torchdata: + +Using pip: + +```bash +pip install torchdata +``` + +Using conda: + +```bash +conda install -c pytorch torchdata +``` + +### From source + +```bash +pip install . +``` + +In case building TorchData from source fails, install the nightly version of PyTorch following the linked guide on the +[contributing page](CONTRIBUTING.md#install-pytorch-nightly). + +### From nightly + +The nightly version of TorchData is also provided and updated daily from main branch. + +Using pip: + +```bash +pip install --pre torchdata --index-url https://download.pytorch.org/whl/nightly/cpu +``` + +Using conda: + +```bash +conda install torchdata -c pytorch-nightly +``` + +## Contributing + +We welcome PRs! See the [CONTRIBUTING](CONTRIBUTING.md) file. + +## Beta Usage and Feedback + +We'd love to hear from and work with early adopters to shape our designs. Please reach out by raising an issue if you're +interested in using this tooling for your project. + +## License + +TorchData is BSD licensed, as found in the [LICENSE](LICENSE) file. diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata-0.11.0.dist-info/RECORD b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata-0.11.0.dist-info/RECORD new file mode 100644 index 0000000000000000000000000000000000000000..3331079a82f61eecd6168f206988b734eb224456 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata-0.11.0.dist-info/RECORD @@ -0,0 +1,58 @@ +torchdata-0.11.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +torchdata-0.11.0.dist-info/LICENSE,sha256=GWMlp20qSJs8ELe3PL9XYVGeD68SdQ5jzaM7SrtiQxk,1522 +torchdata-0.11.0.dist-info/METADATA,sha256=fNXGnFlRGx306QjeESfBTrXQIYiqp3HDU8Xng4SSwyw,6312 +torchdata-0.11.0.dist-info/RECORD,, +torchdata-0.11.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91 +torchdata-0.11.0.dist-info/top_level.txt,sha256=j_xqSgCmt-2gczesUxkZkOZcpKRKHlGBpVX3VUSOv3o,10 +torchdata/__init__.py,sha256=IaEvDHOB1frquBC1An0fHe1OyRKt5IqUJyxQc3unu0U,294 +torchdata/__pycache__/__init__.cpython-310.pyc,, +torchdata/__pycache__/version.cpython-310.pyc,, +torchdata/nodes/__init__.py,sha256=1UkEDyUjGWy8fTuK-c4nYz9xWbdjWTzjZ2ETowhd31k,968 +torchdata/nodes/__pycache__/__init__.cpython-310.pyc,, +torchdata/nodes/__pycache__/_apply_udf.cpython-310.pyc,, +torchdata/nodes/__pycache__/_populate_queue.cpython-310.pyc,, +torchdata/nodes/__pycache__/adapters.cpython-310.pyc,, +torchdata/nodes/__pycache__/base_node.cpython-310.pyc,, +torchdata/nodes/__pycache__/batch.cpython-310.pyc,, +torchdata/nodes/__pycache__/constants.cpython-310.pyc,, +torchdata/nodes/__pycache__/exception_wrapper.cpython-310.pyc,, +torchdata/nodes/__pycache__/loader.cpython-310.pyc,, +torchdata/nodes/__pycache__/map.cpython-310.pyc,, +torchdata/nodes/__pycache__/pin_memory.cpython-310.pyc,, +torchdata/nodes/__pycache__/prefetch.cpython-310.pyc,, +torchdata/nodes/__pycache__/snapshot_store.cpython-310.pyc,, +torchdata/nodes/__pycache__/types.cpython-310.pyc,, +torchdata/nodes/_apply_udf.py,sha256=JIwob842xWW3L-RttMzUzJ4_STYML65ZXX-5fQQZrHQ,1659 +torchdata/nodes/_populate_queue.py,sha256=asE-E0bL5yKz5-rThsHCzcHlAIrjvPz2mDxEaRbS8jM,3281 +torchdata/nodes/adapters.py,sha256=CBmczlO8rLKVSCSYHC7GknWKVrK3VJzKEMDF7T-j47Y,6405 +torchdata/nodes/base_node.py,sha256=XCBHN4n7EGDTZw6L7A6ZKycjgDhi-EgO5nlRtfCOgJ4,3780 +torchdata/nodes/batch.py,sha256=VN5fHMGqJaejk4qKN4EB_NPzJBAlqbTk_U9DCZgnp6A,3885 +torchdata/nodes/constants.py,sha256=AyxuSleignXpB4msGoaclSwCjNDqorrEdJN2SazaVik,229 +torchdata/nodes/exception_wrapper.py,sha256=GK-NSaXpV6kcvWWt--_FBH2vTHhHe4AF63_WKurrC0Q,311 +torchdata/nodes/loader.py,sha256=RqWQVL02HQWa0L2OhMafJ_jN22Vbtpm0_spEnG04ilA,5178 +torchdata/nodes/map.py,sha256=kGQj_AVg9S_oCuPmceXJ8TnzniBFGi--23vIws0aowI,21641 +torchdata/nodes/pin_memory.py,sha256=lB1H2oFJoO3_i6uKxnNe8Irmcv_8Mh6jZEdkic15aHo,5562 +torchdata/nodes/prefetch.py,sha256=9ogmTejvhXCiAX4GwO7b5q-k-ePB-DTS3WNyLXhLMR4,1968 +torchdata/nodes/samplers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +torchdata/nodes/samplers/__pycache__/__init__.cpython-310.pyc,, +torchdata/nodes/samplers/__pycache__/multi_node_weighted_sampler.cpython-310.pyc,, +torchdata/nodes/samplers/__pycache__/stop_criteria.cpython-310.pyc,, +torchdata/nodes/samplers/__pycache__/utils.cpython-310.pyc,, +torchdata/nodes/samplers/multi_node_weighted_sampler.py,sha256=Bjq3PyHEQNuRSsUHR3y34pdJtF6Bu5GGI2mdQlO3hQM,12248 +torchdata/nodes/samplers/stop_criteria.py,sha256=xrv5ZEnFRHgAsJlR382GJMW7cY9BUhYkw6-7XFZhDUM,1199 +torchdata/nodes/samplers/utils.py,sha256=xjFIpHakwERDv6izA_bLLjsnPG-EROEP9zcRa_BNtts,1537 +torchdata/nodes/snapshot_store.py,sha256=iyrtHbqW163TKUSTEpgNd4WRBt0KQIYewOsd5aOuPCk,2867 +torchdata/nodes/types.py,sha256=7Vv8f0jXlzAgBNPgZzIjDW0Yga6JzVzkIzOYbhZRlvU,570 +torchdata/stateful_dataloader/__init__.py,sha256=YwND5Rc-b62Rb-d_8BpxcT4mOSFZ4TkLPLlyjGrFNws,338 +torchdata/stateful_dataloader/__pycache__/__init__.cpython-310.pyc,, +torchdata/stateful_dataloader/__pycache__/incremental_state.cpython-310.pyc,, +torchdata/stateful_dataloader/__pycache__/sampler.cpython-310.pyc,, +torchdata/stateful_dataloader/__pycache__/stateful.cpython-310.pyc,, +torchdata/stateful_dataloader/__pycache__/stateful_dataloader.cpython-310.pyc,, +torchdata/stateful_dataloader/__pycache__/worker.cpython-310.pyc,, +torchdata/stateful_dataloader/incremental_state.py,sha256=2RjQJ1eVYuB8oKyQsKxjtA_Ihx6HSSmpOlNdne8RQbI,6761 +torchdata/stateful_dataloader/sampler.py,sha256=bdmiV09oe6gLS0pWLMoqF9lmdvWpLAlsH_B3BjlTYCk,7843 +torchdata/stateful_dataloader/stateful.py,sha256=qw2b2Y0_dCHjpuGoatsSD7mgymrjAOt9wRiWc_ceyRg,450 +torchdata/stateful_dataloader/stateful_dataloader.py,sha256=Qmw-9HVIEWX5p9RCOAQPgd4hOk6O5YrY_nNOUqJxeDA,84336 +torchdata/stateful_dataloader/worker.py,sha256=z24TKN6_q2Am8rgBuiTAf92wY0kZAhmeLCIAOei7cxQ,11415 +torchdata/version.py,sha256=bMqmoZVojpFn44hYwk_hobCx1xY804RNrbaeyLATVcQ,84 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata-0.11.0.dist-info/WHEEL b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata-0.11.0.dist-info/WHEEL new file mode 100644 index 0000000000000000000000000000000000000000..505164bc02d63fe6b0b3299f849a77c5f1beeb41 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata-0.11.0.dist-info/WHEEL @@ -0,0 +1,5 @@ +Wheel-Version: 1.0 +Generator: setuptools (75.8.0) +Root-Is-Purelib: true +Tag: py3-none-any + diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata-0.11.0.dist-info/top_level.txt b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata-0.11.0.dist-info/top_level.txt new file mode 100644 index 0000000000000000000000000000000000000000..c726e5b2cb417603e9b88deaa380c96b78589772 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata-0.11.0.dist-info/top_level.txt @@ -0,0 +1 @@ +torchdata diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c5b746688396c247b1beb84f25589dec1cfc1433 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/__init__.py @@ -0,0 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +try: + from .version import __version__ # noqa: F401 +except ImportError: + pass diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..62eaae51786dbdf669c7f88099b02a1a9b25940a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/__init__.py @@ -0,0 +1,37 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +from .adapters import IterableWrapper, MapStyleWrapper, SamplerWrapper +from .base_node import BaseNode, T +from .batch import Batcher, Unbatcher +from .loader import Loader +from .map import Mapper, ParallelMapper +from .pin_memory import PinMemory +from .prefetch import Prefetcher +from .samplers.multi_node_weighted_sampler import MultiNodeWeightedSampler +from .samplers.stop_criteria import StopCriteria +from .types import Stateful + + +__all__ = [ + "BaseNode", + "Batcher", + "IterableWrapper", + "Loader", + "MapStyleWrapper", + "Mapper", + "MultiNodeWeightedSampler", + "ParallelMapper", + "PinMemory", + "Prefetcher", + "SamplerWrapper", + "Stateful", + "StopCriteria", + "T", + "Unbatcher", +] + +assert sorted(__all__) == __all__ diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/_apply_udf.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/_apply_udf.py new file mode 100644 index 0000000000000000000000000000000000000000..ae272b4dbcfd4aca90c113779ce537fd4372df4e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/_apply_udf.py @@ -0,0 +1,53 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +import multiprocessing.synchronize as python_mp_synchronize +import queue +import threading +from typing import Callable, Union + +import torch +import torch.multiprocessing as mp + +from torch._utils import ExceptionWrapper + +from .constants import QUEUE_TIMEOUT + + +def _apply_udf( + worker_id: int, + in_q: Union[queue.Queue, mp.Queue], + out_q: Union[queue.Queue, mp.Queue], + udf: Callable, + stop_event: Union[threading.Event, python_mp_synchronize.Event], +): + """_apply_udf assumes in_q emits tuples of (x, idx) where x is the + payload, idx is the index of the result, potentially used for maintaining + ordered outputs. For every input it pulls, a tuple (y, idx) is put on the out_q + where the output of udf(x), an ExceptionWrapper, or StopIteration (if it pulled + StopIteration from in_q). + """ + torch.set_num_threads(1) + while True: + if stop_event.is_set() and in_q.empty(): + break + + try: + item, idx = in_q.get(block=True, timeout=QUEUE_TIMEOUT) + except queue.Empty: + continue + + if isinstance(item, ExceptionWrapper): + out_q.put((item, idx), block=False) + elif isinstance(item, StopIteration): + out_q.put((item, idx), block=False) + else: + try: + y = udf(item) + except Exception: + y = ExceptionWrapper(where="in _apply_udf") + + out_q.put((y, idx), block=False) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/_populate_queue.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/_populate_queue.py new file mode 100644 index 0000000000000000000000000000000000000000..cf22a4edcd4fdc36048cff37200826e29e01abc7 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/_populate_queue.py @@ -0,0 +1,86 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +import queue +import threading +from typing import Any, Dict, Optional, Union + +import torch.multiprocessing as mp + +from torchdata.nodes.base_node import BaseNode + +from torchdata.nodes.exception_wrapper import ExceptionWrapper, StartupExceptionWrapper +from torchdata.nodes.snapshot_store import MonotonicIndex, SnapshotStore + +from .constants import QUEUE_TIMEOUT + + +def _populate_queue( + source: BaseNode, + q: Union[queue.Queue, mp.Queue], + snapshot_store: SnapshotStore, + snapshot_frequency: int, + semaphore: threading.BoundedSemaphore, + stop_event: threading.Event, +): + """_populate_queue calls `iter(source)` to get an iterator `it`, waits for semaphore.acquire, + and puts its outputs onto q. It never releases the sempahore. It continues to put items on the + q as long as it can acquire the sempahore, stop_event is not set, and StopIteration has not + been thrown by the `it`. + + This function will always put tuples of (x, idx) on the q where idx + starts from 0 and is monotonically increasing. x may be the output of next(it), StopIteration, + or an ExceptionWrapper. + + If there is an exception raised during the call to `iter(source)`, this function does not + wait to acquire sempahore before putting StartupExceptionWrapper on q. + + Note: this is only intended to be used by a single thread at once. Each instance + creates its own iter for source so if this is called with multiple threads, you may get + duplicates if source is not sharded properly. + """ + + # Include a monotonic index starting from 0 to each item in the queue + idx = MonotonicIndex() + + def _put( + item, + block: bool = True, + snapshot: Optional[Union[Dict[str, Any], StartupExceptionWrapper]] = None, + ): + _idx = idx.get() + if snapshot: + snapshot_store.append(snapshot=snapshot, version=_idx) + q.put((item, _idx), block=block, timeout=1.0 if block else None) + + try: + assert ( + isinstance(snapshot_frequency, int) and snapshot_frequency >= 0 + ), f"snapshot_frequency must be non-negative integer! Got {snapshot_frequency}" + snapshot_store.append_initial_snapshot(snapshot=source.state_dict()) + except Exception: + e = StartupExceptionWrapper(where="in _populate_queue startup for device") + snapshot_store.append_initial_snapshot(snapshot=e) + return + + yielded = 0 + while not stop_event.is_set(): + if not semaphore.acquire(blocking=True, timeout=QUEUE_TIMEOUT): + continue + try: + item = next(source) # FIXME: This may hang! + yielded += 1 + snapshot = None + if snapshot_frequency > 0 and yielded % snapshot_frequency == 0: + snapshot = source.state_dict() + _put(item, block=False, snapshot=snapshot) + except StopIteration as e: + _put(e, block=False) + break + except Exception: + item = ExceptionWrapper(where="in _populate_queue") + _put(item, block=False) + break diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/adapters.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/adapters.py new file mode 100644 index 0000000000000000000000000000000000000000..99402daa27e79cda4e105d3c7c7813860b3f8aa4 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/adapters.py @@ -0,0 +1,168 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + + +from typing import Any, Callable, Dict, Iterable, Iterator, Mapping, Optional, TypeVar + +from torch.utils.data import Sampler + +from torchdata.nodes.base_node import BaseNode, T + +from .map import Mapper + +from .types import Stateful + +K = TypeVar("K", covariant=True) + + +class IterableWrapper(BaseNode[T]): + """Thin Wrapper that converts any Iterable (including + torch.utils.data.IterableDataset) in to a BaseNode. + + If iterable implements the Stateful Protocol, it will be saved and restored with its + state_dict/load_state_dict methods. + + Args: + iterable (Iterable[T]): Iterable to convert to BaseNode. IterableWrapper calls iter() on it. + + :warning: Note the distinction between state_dict/load_state_dict defined on Iterable, vs Iterator. + Only the Iterable's state_dict/load_state_dict are used. + """ + + NUM_YIELDED_KEY = "_num_yielded" + ITERABLE_KEY = "iterable" + + def __init__(self, iterable: Iterable[T]): + super().__init__() + self.iterable = iterable + self._it: Optional[Iterator[T]] = None + + def reset(self, initial_state: Optional[Dict[str, Any]] = None): + self._num_yielded = 0 + self._it = None + super().reset(initial_state) + if initial_state is not None: + self._num_yielded = initial_state[self.NUM_YIELDED_KEY] + if isinstance(self.iterable, Stateful): + self.iterable.load_state_dict(initial_state[self.ITERABLE_KEY]) + self._it = iter(self.iterable) + else: + self._it = iter(self.iterable) + # Naively fast-forwarding + for i in range(self._num_yielded): + try: + next(self._it) + except StopIteration: + raise ValueError( + f"Tried to fast-forward {self._num_yielded} items during init but " + f"hit StopIteration after {i} items, this is likely a bug or malformed state_dict" + ) + else: + self._it = iter(self.iterable) + + def next(self) -> T: + item = next(self._it) # type: ignore [arg-type, union-attr] + self._num_yielded += 1 + return item + + def get_state(self) -> Dict[str, Any]: + state_dict: Dict[str, Any] = {self.NUM_YIELDED_KEY: self._num_yielded} + if isinstance(self.iterable, Stateful): + state_dict[self.ITERABLE_KEY] = self.iterable.state_dict() + return state_dict + + +def MapStyleWrapper(map_dataset: Mapping[K, T], sampler: Sampler[K]) -> BaseNode[T]: + """Thin Wrapper that converts any MapDataset in to a torchdata.node + If you want parallelism, copy this and replace Mapper with ParallelMapper. + + Args: + map_dataset (Mapping[K, T]): - Apply map_dataset.__getitem__ to the outputs of sampler. + sampler (Sampler[K]): + """ + sampler_node: SamplerWrapper[K] = SamplerWrapper(sampler) + mapper_node = Mapper(sampler_node, map_dataset.__getitem__) + return mapper_node + + +class SamplerWrapper(BaseNode[T]): + """ + Convert a sampler into a BaseNode. This is nearly identical to + IterableWrapper except it includes a hook to call set_epoch on the sampler, + if it supports it. + + Args: + sampler (Sampler): Sampler to wrap. + initial_epoch (int): initial epoch to set on the sampler + epoch_updater (Optional[Callable[[int], int]] = None): callback to update epoch at start of new iteration. It's called at the beginning of each iterator request, except the first one. + """ + + NUM_YIELDED_KEY = "_num_yielded" + EPOCH_KEY = "_epoch" + SAMPLER_KEY = "_sampler" + + def __init__( + self, + sampler: Sampler[T], + initial_epoch: int = 0, + epoch_updater: Optional[Callable[[int], int]] = None, + ): + super().__init__() + self.sampler = sampler + self.epoch = initial_epoch + self._num_yielded = 0 + self._started = False + self.epoch_updater = epoch_updater or self._default_epoch_updater + self._it: Optional[Iterator[T]] = None + + def reset(self, initial_state: Optional[Dict[str, Any]] = None): + super().reset(initial_state) + if initial_state is not None: + self._num_yielded = initial_state[self.NUM_YIELDED_KEY] + self.epoch = initial_state[self.EPOCH_KEY] + if isinstance(self.sampler, Stateful): + self.sampler.load_state_dict(initial_state[self.SAMPLER_KEY]) + self._it = iter(self.sampler) # type: ignore [assignment] + else: + if hasattr(self.sampler, "set_epoch"): + self.sampler.set_epoch(self.epoch) + self._it = iter(self.sampler) + for i in range(self._num_yielded): + try: + next(self._it) # type: ignore [arg-type] + except StopIteration: + raise ValueError( + f"Tried to fast-forward {self._num_yielded} items during init but " + f"hit StopIteration after {i} items, this is likely a bug or malformed state_dict" + ) + else: + self._num_yielded = 0 + if self._started: + # Don't update epoch unless iterator has started + self.epoch = self.epoch_updater(self.epoch) + if hasattr(self.sampler, "set_epoch"): + self.sampler.set_epoch(self.epoch) + self._it = iter(self.sampler) + self._started = False + + def next(self) -> T: + self._started = True + item = next(self._it) # type: ignore [arg-type, union-attr] + self._num_yielded += 1 + return item + + def get_state(self) -> Dict[str, Any]: + state_dict: Dict[str, Any] = { + self.NUM_YIELDED_KEY: self._num_yielded, + self.EPOCH_KEY: self.epoch, + } + if isinstance(self.sampler, Stateful): + state_dict[self.SAMPLER_KEY] = self.sampler.state_dict() + return state_dict + + @classmethod + def _default_epoch_updater(cls, epoch: int) -> int: + return epoch + 1 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/base_node.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/base_node.py new file mode 100644 index 0000000000000000000000000000000000000000..e8ca8afb81802ff5cf84dc26870cdae42d1cfd89 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/base_node.py @@ -0,0 +1,105 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +import logging +from typing import Any, Dict, Iterator, Optional, TypeVar + +logger = logging.getLogger(__name__) + + +T = TypeVar("T", covariant=True) + + +class BaseNode(Iterator[T]): + """BaseNodes are the base class for creating composable dataloading DAGs in ``torchdata.nodes``. + + Most end-users will not iterate over a BaseNode instance directly, but instead + wrap it in a :class:`torchdata.nodes.Loader` which converts the DAG into a more familiar Iterable. + + .. code-block:: python + + node = MyBaseNodeImpl() + loader = Loader(node) + # loader supports state_dict() and load_state_dict() + + for epoch in range(5): + for idx, batch in enumerate(loader): + ... + + # or if using node directly: + node = MyBaseNodeImpl() + for epoch in range(5): + node.reset() + for idx, batch in enumerate(loader): + ... + """ + + def __init__(self, *args, **kwargs): + """Subclasses must implement this method and call super().__init__(*args, **kwargs)""" + self.__initialized = False + + def __iter__(self): + return self + + def reset(self, initial_state: Optional[dict] = None): + """Resets the iterator to the beginning, or to the state passed in by initial_state. + + Reset is a good place to put expensive initialization, as it will be lazily called when ``next()`` or ``state_dict()`` is called. + Subclasses must call ``super().reset(initial_state)``. + + Args: + initial_state: Optional[dict] - a state dict to pass to the node. If None, reset to the beginning. + """ + + self.__initialized = True + + def get_state(self) -> Dict[str, Any]: + """Subclasses must implement this method, instead of ``state_dict()``. Should only be called by BaseNode. + + Returns: + Dict[str, Any] - a state dict that may be passed to ``reset()`` at some point in the future + """ + raise NotImplementedError(type(self)) + + def next(self) -> T: + """Subclasses must implement this method, instead of ``__next__``. Should only be called by BaseNode. + + Returns: + T - the next value in the sequence, or throw StopIteration + """ + raise NotImplementedError(type(self)) + + def __next__(self): + try: + self.__initialized + except AttributeError: + raise NotImplementedError(f"self.__initialized not found, did you call super().__init__()? {type(self)=}") + if not self.__initialized: + self.reset(None) + if not self.__initialized: + raise NotImplementedError( + f"Failed to initialize after .reset(), did you call super().reset() in your .reset() method? {type(self)=}" + ) + return self.next() + + def state_dict(self) -> Dict[str, Any]: + """Get a state_dict for this BaseNode. + + Returns: + Dict[str, Any] - a state dict that may be passed to ``reset()`` at some point in the future. + """ + try: + self.__initialized + except AttributeError: + raise NotImplementedError(f"self.__initialized not found, did you call super().__init__()? {type(self)=}") + + if not self.__initialized: + self.reset(None) + if not self.__initialized: + raise NotImplementedError( + f"Failed to initialize after .reset(), did you call super().reset() in your .reset() method? {type(self)=}" + ) + return self.get_state() diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/batch.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/batch.py new file mode 100644 index 0000000000000000000000000000000000000000..7e7ca47de781570bc2be1b14e3c8df6bd44e9835 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/batch.py @@ -0,0 +1,111 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +from typing import Any, Dict, List, Optional, Sequence + +from torchdata.nodes.base_node import BaseNode, T + + +class Batcher(BaseNode[List[T]]): + """Batcher node batches the data from the source node into batches of size batch_size. + If the source node is exhausted, it will return the batch or raise StopIteration. + If drop_last is True, the last batch will be dropped if it is smaller than batch_size. + If drop_last is False, the last batch will be returned even if it is smaller than batch_size. + + Args: + source (BaseNode[T]): The source node to batch the data from. + batch_size (int): The size of the batch. + drop_last (bool): Whether to drop the last batch if it is smaller than batch_size. Default is True. + """ + + SOURCE_KEY = "source" + + def __init__(self, source: BaseNode[T], batch_size: int, drop_last: bool = True): + super().__init__() + self.source = source + self.batch_size = batch_size + self.drop_last = drop_last + + def reset(self, initial_state: Optional[Dict[str, Any]] = None): + super().reset(initial_state) + if initial_state is not None: + self.source.reset(initial_state[self.SOURCE_KEY]) + else: + self.source.reset() + + def next(self) -> List[T]: + batch: List[T] = [] + while len(batch) < self.batch_size: + try: + item = next(self.source) + except StopIteration: + break + batch.append(item) + if len(batch) == self.batch_size: + return batch + + if len(batch) == self.batch_size: + return batch + elif len(batch) and not self.drop_last: + return batch + else: + raise StopIteration() + + def get_state(self) -> Dict[str, Any]: + return {self.SOURCE_KEY: self.source.state_dict()} + + +class Unbatcher(BaseNode[T]): + """Unbatcher will flatten batches pulled from source, and + yields elements in sequential order when next() is called on it. + + Args: + source (BaseNode[T]): The source node to pull batches from. + """ + + SOURCE_KEY = "source" + BATCH_IDX_KEY = "batch_idx" + + def __init__(self, source: BaseNode[Sequence[T]]): + super().__init__(self) + self.source = source + + def reset(self, initial_state: Optional[Dict[str, Any]] = None): + super().reset(initial_state) + if initial_state is not None: + self.source.reset(initial_state[self.SOURCE_KEY]) + self._cached_state_dict = initial_state[self.SOURCE_KEY] + try: + self._batch = next(self.source) + self._batch_idx = initial_state[self.BATCH_IDX_KEY] + except StopIteration: + # next(self.source) will be called upon subsequent self.next() call + # and raise StopIteration in the correct place. + self._batch = [] + self._batch_idx = 0 + else: + self.source.reset() + self._batch = [] + self._cached_state_dict = None + self._batch_idx = 0 + + def next(self) -> T: + while self._batch_idx >= len(self._batch): + self._cached_state_dict = self.source.state_dict() + self._batch = next(self.source) + self._batch_idx = 0 + + self._batch_idx += 1 + return self._batch[self._batch_idx - 1] + + def get_state(self) -> Dict[str, Any]: + if self._cached_state_dict is None: + self._cached_state_dict = self.source.state_dict() + + return { + self.SOURCE_KEY: self._cached_state_dict, + self.BATCH_IDX_KEY: self._batch_idx, + } diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/constants.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/constants.py new file mode 100644 index 0000000000000000000000000000000000000000..f1fce5d6249f69ef7b3812d7f11ce65ae03d1708 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/constants.py @@ -0,0 +1,7 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +QUEUE_TIMEOUT = 0.1 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/exception_wrapper.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/exception_wrapper.py new file mode 100644 index 0000000000000000000000000000000000000000..95d97a73abe7fd794cef454120168faeeaf806f6 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/exception_wrapper.py @@ -0,0 +1,11 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +from torch._utils import ExceptionWrapper + + +class StartupExceptionWrapper(ExceptionWrapper): + pass diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/loader.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/loader.py new file mode 100644 index 0000000000000000000000000000000000000000..7543cb4f8f710f3faf96eda9422f2f021ac56a89 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/loader.py @@ -0,0 +1,135 @@ +from typing import Any, Dict, Generic, Optional + +from torchdata.nodes.base_node import BaseNode, T + + +class Loader(Generic[T]): + """Wraps the root BaseNode (an iterator) and provides a stateful iterable interface. + + The state of the last-returned iterator is returned by the state_dict() method, and can be + loaded using the load_state_dict() method. + + Args: + root (BaseNode[T]): The root node of the data pipeline. + restart_on_stop_iteration (bool): Whether to restart the iterator when it reaches the end. Default is True + """ + + def __init__(self, root: BaseNode[T], restart_on_stop_iteration: bool = True): + super().__init__() + self.root = root + self.restart_on_stop_iteration = restart_on_stop_iteration + self._next_iter_state_dict: Optional[Dict[str, Any]] = None + self._it: Optional[LoaderIterator[T]] = None + # Tracks whether an iterator was created solely for getting a state_dict, in which case + # we don't want to reset the iterator. Consider these two cases, which should behave the same + # it = iter(loader) + # sd = loader.state_dict() # No extra __iter__ call as _it already exists + # for _ in it: ... + # -------- + # sd = loader.state_dict() # Calls __iter__ since _it is None + # it = iter(loader) # We don't want to reset the iterator here again + # for _ in it: ... + self._iter_for_state_dict: bool = False + + def __iter__(self): + if self._it is None: + self._it = LoaderIterator(self) + elif self._iter_for_state_dict: + self._iter_for_state_dict = False + return self._it # This was already pre-called to get a state dict + + if self._next_iter_state_dict is not None: + self._it.reset(initial_state=self._next_iter_state_dict) + self._next_iter_state_dict = None + if self.restart_on_stop_iteration and not self._it.has_next(): + self._it.reset(None) + else: + self._it.reset(None) + + return self._it + + def load_state_dict(self, state_dict: Dict[str, Any]): + """Loads a state_dict which will be used to initialize the next iter() requested + from this loader. + + Args: + state_dict (Dict[str, Any]): The state_dict to load. Should be generated from a call to state_dict(). + """ + self._next_iter_state_dict = state_dict + + def state_dict(self) -> Dict[str, Any]: + """Returns a state_dict which can be passed to load_state_dict() in the future to + resume iteration. + + The state_dict will come from the iterator returned by the most recent call to iter(). + If no iterator has been created, a new iterator will be created and the state_dict returned from it. + """ + if self._it is None: + iter(self) + self._iter_for_state_dict = True + return self._it.state_dict() # type:ignore[union-attr] + + +class LoaderIterator(BaseNode[T]): + """An iterator class that wraps a root node and works with the Loader class. + + The LoaderIterator object saves state of the underlying root node, and calls reset on the root node when + the iterator is exhausted or on a reset call. We look one step ahead to determine if the iterator is exhausted. + The state of the iterator is saved in the state_dict() method, and can be loaded on reset calls. + + Args: + loader (Loader[T]): The loader object that contains the root node. + """ + + NUM_YIELDED_KEY = "num_yielded" + ROOT_KEY = "root" + + def __init__( + self, + loader: Loader[T], + ): + super().__init__() + self.loader = loader + self.root = loader.root + self._cached_item = None + self._cached_state_dict: Optional[Dict[str, Any]] = None + self._num_yielded = 0 + + def reset(self, initial_state: Optional[Dict[str, Any]] = None): + super().reset(initial_state) + if initial_state is not None: + self.root.reset(initial_state[self.ROOT_KEY]) + self._num_yielded = initial_state[self.NUM_YIELDED_KEY] + else: + self.root.reset(None) + self._num_yielded = 0 + self._cached_item = None + + def has_next(self) -> bool: + if self._cached_item is None: + try: + # Cache the current state dict + self._cached_state_dict = self.state_dict() + # Load and save the next item + self._cached_item = next(self) + except StopIteration: + pass + return self._cached_item is not None + + def next(self): + if self._cached_item is not None: + item = self._cached_item + self._cached_item = None + self._cached_state_dict = None + else: + item = next(self.root) + self._num_yielded += 1 + return item + + def get_state(self) -> Dict[str, Any]: + if self._cached_state_dict is not None: + return self._cached_state_dict + return { + self.ROOT_KEY: self.root.state_dict(), + self.NUM_YIELDED_KEY: self._num_yielded, + } diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/map.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/map.py new file mode 100644 index 0000000000000000000000000000000000000000..fab6a0f6c3bd956c6fa4144ba69467718beabcf2 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/map.py @@ -0,0 +1,590 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +import queue +import threading +import time +from typing import Any, Callable, Dict, Generic, Iterator, List, Literal, Optional, Protocol, Sequence, TypeVar, Union + +import torch.multiprocessing as mp +from torchdata.nodes.base_node import BaseNode, T +from torchdata.nodes.batch import Batcher, Unbatcher +from torchdata.nodes.exception_wrapper import ExceptionWrapper, StartupExceptionWrapper +from torchdata.nodes.snapshot_store import QueueSnapshotStore, SnapshotStore + +from ._apply_udf import _apply_udf + +from ._populate_queue import _populate_queue + +from .constants import QUEUE_TIMEOUT + +ACK_TIMEOUT = 300 # Timeout after 5 minutes + + +# We define this protocol for type checking +class _MultiprocessContext(Protocol): + def Process(self, *args, **kwargs): + ... + + def Event(self, *args, **kwargs): + ... + + def Queue(self, *args, **kwargs): + ... + + +X = TypeVar("X") + + +def Mapper(source: BaseNode[X], map_fn: Callable[[X], T]) -> "ParallelMapper[T]": + """Returns a :class:`ParallelMapper` node with num_workers=0, which will execute map_fn in the current process/thread. + + Args: + source (BaseNode[X]): The source node to map over. + map_fn (Callable[[X], T]): The function to apply to each item from the source node. + """ + return ParallelMapper( + source=source, + map_fn=map_fn, + num_workers=0, + ) + + +Xseq = Sequence[X] +Tseq = Sequence[T] + + +class MapOverBatch(Generic[X, T]): + def __init__(self, map_fn: Callable[[X], T]): + self.map_fn = map_fn + + def __call__(self, xlist: Sequence[X]) -> Sequence[T]: + return [self.map_fn(x) for x in xlist] + + +def _sort_worker(in_q: Union[queue.Queue, mp.Queue], out_q: queue.Queue, stop_event: threading.Event): + buffer: Dict[int, Any] = {} + cur_idx = 0 + while not stop_event.is_set(): + try: + item, idx = in_q.get(block=True, timeout=QUEUE_TIMEOUT) + except queue.Empty: + continue + if idx == cur_idx: + out_q.put((item, cur_idx), block=False) + cur_idx += 1 + else: + if idx in buffer: + # This is the easiest way to create an exception wrapper + try: + raise ValueError(f"Duplicate index {idx=}, {buffer.keys()=}, {item=}") + except Exception: + item = ExceptionWrapper(where="in _sort_worker") + out_q.put((item, idx), block=False) + break + buffer[idx] = item + while cur_idx in buffer: + out_q.put((buffer.pop(cur_idx), cur_idx), block=False) + cur_idx += 1 + + +class _InlineMapperIter(Iterator[T]): + """Non-Parallel implementation of Mapper""" + + SOURCE_KEY = "source" + + def __init__( + self, + source: BaseNode[X], + map_fn: Callable[[X], T], + initial_state: Optional[Dict[str, Any]] = None, + ): + self.source = source + self.map_fn = map_fn + if initial_state is not None: + self.source.reset(initial_state[self.SOURCE_KEY]) + else: + self.source.reset() + + def __next__(self): + return self.map_fn(next(self.source)) + + def get_state(self) -> Dict[str, Any]: + return {self.SOURCE_KEY: self.source.state_dict()} + + def _shutdown(self): + pass + + +class _ParallelMapperIter(Iterator[T]): + """_ParallelMapperIter will start at least two threads, one running + _populate_queue, and one for _apply_udf. If in_order == True, a + third thread will be started to read from _apply_udf's result q + and block the output_q until the appropriate in_order element is available, + buffering outputs as needed. + + A BoundedSemaphore with initial value max_concurrent will limit the number + of items in flight, and in all of the queues. + """ + + def __init__( + self, + source: BaseNode[X], + map_fn: Callable[[X], T], + num_workers: int, + in_order: bool, + method: Literal["thread", "process"], + mp_context: _MultiprocessContext, + max_concurrent: Optional[int], + snapshot_frequency: int, + initial_state: Optional[Dict[str, Any]], + ): + self.source = source + self.map_fn = map_fn + self.num_workers = num_workers + self.in_order = in_order + self.method = method + self.mp_context = mp_context + self.snapshot_frequency = snapshot_frequency + + self._in_q: Union[queue.Queue, mp.Queue] = queue.Queue() if method == "thread" else mp_context.Queue() + self._intermed_q: Union[queue.Queue, mp.Queue] = queue.Queue() if method == "thread" else mp_context.Queue() + self._max_tasks = 2 * self.num_workers if max_concurrent is None else max_concurrent + self._sem = threading.BoundedSemaphore(value=self._max_tasks) + + self._done = False + + self._stop = threading.Event() + self._mp_stop = mp_context.Event() + + self._steps_since_snapshot = 0 + fast_forward = 0 + if initial_state is not None: + self._snapshot = initial_state["snapshot"] + fast_forward = initial_state["steps_since_snapshot"] + self.source.reset(self._snapshot) + else: + self._snapshot = None + self.source.reset() + self._snapshot_store = QueueSnapshotStore() + + self._read_thread = threading.Thread( + target=_populate_queue, + args=( + self.source, + self._in_q, + self._snapshot_store, + self.snapshot_frequency, + self._sem, + self._stop, + ), + daemon=True, + ) + self._workers: List[Union[threading.Thread, mp.Process]] = [] + for worker_id in range(self.num_workers): + args = ( + worker_id, + self._in_q, + self._intermed_q, + self.map_fn, + self._stop if self.method == "thread" else self._mp_stop, + ) + self._workers.append( + threading.Thread(target=_apply_udf, args=args, daemon=True) + if self.method == "thread" + else mp_context.Process(target=_apply_udf, args=args, daemon=True) + ) + self._sort_q: queue.Queue = queue.Queue() + self._sort_thread = threading.Thread( + target=_sort_worker, + args=(self._intermed_q, self._sort_q, self._stop), + daemon=True, + ) + + self._out_q = self._intermed_q + if self.in_order: + self._out_q = self._sort_q + + self._read_thread.start() + for t in self._workers: + t.start() + if self.in_order: + self._sort_thread.start() + + time.sleep(0.01) + self._snapshot = self._snapshot_store.get_initial_snapshot(thread=self._read_thread, timeout=ACK_TIMEOUT) + + for i in range(fast_forward): + try: + next(self) + except StopIteration: + raise ValueError( + f"Tried to fast-forward {fast_forward} items during init but " + f"hit StopIteration after {i} items, this is likely a bug or malformed state_dict" + ) + + def __iter__(self) -> Iterator[T]: + return self + + def __next__(self) -> T: + while True: + if self._stop.is_set(): + raise StopIteration() + elif self._done and self._sem._value == self._max_tasks: + # Don't stop if we still have items in the queue + self._stop.set() + self._mp_stop.set() + raise StopIteration() + try: + item, idx = self._out_q.get(block=True, timeout=QUEUE_TIMEOUT) + except queue.Empty: + continue + + if isinstance(item, StopIteration): + self._done = True + self._sem.release() + # Make sure queues are flushed before returning early + continue + elif isinstance(item, ExceptionWrapper): + if not isinstance(item, StartupExceptionWrapper): + self._sem.release() + item.reraise() + + self._steps_since_snapshot += 1 + self._sem.release() + self._maybe_update_snapshot(idx) + return item + + def get_state(self) -> Dict[str, Any]: + return { + "snapshot": self._snapshot, + "steps_since_snapshot": self._steps_since_snapshot, + } + + def _maybe_update_snapshot(self, idx: int): + if (snapshot := self._snapshot_store.pop_version(idx)) is not None: + self._snapshot = snapshot + self._steps_since_snapshot = 0 + + def __del__(self): + self._shutdown() + + def _shutdown(self): + self._stop.set() + self._mp_stop.set() + if hasattr(self, "_read_thread") and self._read_thread.is_alive(): + self._read_thread.join(timeout=QUEUE_TIMEOUT * 5) + if hasattr(self, "_sort_thread") and self._sort_thread.is_alive(): + self._sort_thread.join(timeout=QUEUE_TIMEOUT * 5) + if hasattr(self, "_workers"): + for t in self._workers: + if t.is_alive(): + t.join(timeout=QUEUE_TIMEOUT * 5) + + +class _ParallelMapperImpl(BaseNode[T]): + """This class implements _ParallelMapperIter and _InlineMapperIter as a BaseNode, + allowing them to be composed with other BaseNodes. + + TODO: In the future, this class may go away once we implement reset() on + _ParallelMapperIter and _InlineMapperIter themselves so we don't need this + additional level of abstraction. + """ + + def __init__( + self, + source: BaseNode[X], + map_fn: Callable[[X], T], + num_workers: int, + in_order: bool = True, + method: Literal["thread", "process"] = "thread", + multiprocessing_context: Optional[str] = None, + max_concurrent: Optional[int] = None, + snapshot_frequency: int = 1, + ): + super().__init__() + assert method in ["thread", "process"] + self.source = source + self.map_fn = map_fn + self.num_workers = num_workers + self.in_order = in_order + self.method = method + self.multiprocessing_context = multiprocessing_context + self._mp_context: Any = mp + if self.method == "process" and self.multiprocessing_context is not None: + self._mp_context = mp.get_context(self.multiprocessing_context) + + if max_concurrent is not None and num_workers > 0: + if isinstance(max_concurrent, int) and max_concurrent > num_workers: + raise ValueError(f"{max_concurrent=} should be <= {num_workers=}!") + self.max_concurrent = max_concurrent + self.snapshot_frequency = snapshot_frequency + self._it: Optional[Union[_InlineMapperIter[T], _ParallelMapperIter[T]]] = None + + def reset(self, initial_state: Optional[Dict[str, Any]] = None): + super().reset(initial_state) + if self._it is not None: + del self._it + + if self.num_workers > 0: + self._it = self._parallel_reset(initial_state) + else: + self._it = self._inline_reset(initial_state) + + def _inline_reset(self, initial_state: Optional[Dict[str, Any]]): + return _InlineMapperIter(source=self.source, map_fn=self.map_fn, initial_state=initial_state) + + def _parallel_reset(self, initial_state: Optional[Dict[str, Any]]): + return _ParallelMapperIter( + source=self.source, + map_fn=self.map_fn, + num_workers=self.num_workers, + in_order=self.in_order, + method=self.method, + mp_context=self._mp_context, + max_concurrent=self.max_concurrent, + snapshot_frequency=self.snapshot_frequency, + initial_state=initial_state, + ) + + def next(self) -> T: + return next(self._it) # type: ignore[arg-type, union-attr] + + def get_state(self) -> Dict[str, Any]: + return self._it.get_state() # type: ignore[union-attr] + + +class ParallelMapper(BaseNode[T]): + """ParallelMapper executes map_fn in parallel either in num_workers threads or + processes. For processes, multiprocessing_context can be spawn, forkserver, fork, + or None (chooses OS default). At most max_concurrent items will be either processed + or in the iterator's output queue, to limit CPU and Memory utilization. If None + (default) the value will be 2 * num_workers. + + At most one iter() is created from source, and at most one thread will call + next() on it at once. + + If in_order is true, the iterator will return items in the order from which they arrive + from source's iterator, potentially blocking even if other items are available. + + Args: + source (BaseNode[X]): The source node to map over. + map_fn (Callable[[X], T]): The function to apply to each item from the source node. + num_workers (int): The number of workers to use for parallel processing. + in_order (bool): Whether to return items in the order from which they arrive from. Default is True. + method (Literal["thread", "process"]): The method to use for parallel processing. Default is "thread". + multiprocessing_context (Optional[str]): The multiprocessing context to use for parallel processing. Default is None. + max_concurrent (Optional[int]): The maximum number of items to process at once. Default is None. + snapshot_frequency (int): The frequency at which to snapshot the state of the source node. Default is 1. + prebatch (Optional[int]): Optionally perform pre-batching of items from source before mapping. + For small items, this may improve throughput at the expense of peak memory. + """ + + IT_STATE_KEY = "it_state" + + def __init__( + self, + source: BaseNode[X], + map_fn: Callable[[X], T], + num_workers: int, + in_order: bool = True, + method: Literal["thread", "process"] = "thread", + multiprocessing_context: Optional[str] = None, + max_concurrent: Optional[int] = None, + snapshot_frequency: int = 1, + prebatch: Optional[int] = None, + ): + super().__init__() + assert method in ["thread", "process"] + self.num_workers = num_workers + self.in_order = in_order + self.method = method + self.multiprocessing_context = multiprocessing_context + if max_concurrent is not None and num_workers > 0: + if isinstance(max_concurrent, int) and max_concurrent > num_workers: + raise ValueError(f"{max_concurrent=} should be <= {num_workers=}!") + self.max_concurrent = max_concurrent + self.snapshot_frequency = snapshot_frequency + self.prebatch = prebatch + if prebatch is None: + self.map_fn = map_fn + self.source = source + else: + if prebatch <= 0: + raise ValueError(f"{prebatch=} must be a positive integer!") + self.map_fn = MapOverBatch(map_fn=map_fn) # type: ignore[assignment] + self.source = Batcher(source, batch_size=prebatch, drop_last=False) # type: ignore[assignment] + + _it = _ParallelMapperImpl( + source=self.source, + map_fn=self.map_fn, + num_workers=self.num_workers, + in_order=self.in_order, + method=self.method, + multiprocessing_context=self.multiprocessing_context, + max_concurrent=self.max_concurrent, + snapshot_frequency=self.snapshot_frequency, + ) + + if self.prebatch is None: + self._it = _it + else: + self._it = Unbatcher(_it) # type: ignore[arg-type, assignment] + + def reset(self, initial_state: Optional[Dict[str, Any]] = None): + super().reset(initial_state) + if initial_state is not None: + self._it.reset(initial_state[self.IT_STATE_KEY]) + else: + self._it.reset() + + def next(self) -> T: + return next(self._it) # type: ignore[arg-type, union-attr] + + def get_state(self) -> Dict[str, Any]: + return {self.IT_STATE_KEY: self._it.state_dict()} # type: ignore[union-attr] + + +_WorkerType = Callable[ + [ + BaseNode, + queue.Queue, + SnapshotStore, + int, + threading.BoundedSemaphore, + threading.Event, + ], + None, +] + + +class _SingleThreadedMapper(Iterator[T]): + """Utility Iterator for performing mapping with a single thread. + Because only a single thread is used, we don't need an input queue to guard + against multiple threads reading from the same iterator. This is used for + Prefetcher and PinMemory. + + A thread is started on __init__ and stopped on __del__/_shutdown. + The thread runs _populate_queue, which acquires a BoundedSemaphore with initial value + of `prefetch_factor`. + + When next() is called on this iterator, it will block until an item is available on _q. + Next will perform the following depending on what is pulled from the q: + - StopIteration: raise StopIteration. Any subsequent next() calls will also raise StopIteration + - ExceptionWrapper: call reraise() on the exception wraper + - any other item: return the item + + A Bounded semaphore is used to limit concurrency and memory utilization. + If N items have been pulled from the source, and M items have been yielded by this iterator, + we maintain the invariant that semaphore.value + (N - M) == prefetch_factor (modulo + non-atomicness of operations). + + _populate_queue calls semaphore.acquire. When we pull an item from the queue, we + call semaphore.release (unless it's a StartupExceptionWrapper, because _populate_queue + does not acquire sempahores in this case). All outstanding items are either being + processed in _populate_queue, in the _q, or about to be returned by an in-flight next() call. + """ + + def __init__( + self, + source: BaseNode[T], + prefetch_factor: int, + worker: _WorkerType, + snapshot_frequency: int, + initial_state: Optional[Dict[str, Any]], + ): + self.source = source + self.prefetch_factor = prefetch_factor + self.worker = worker + self.snapshot_frequency = snapshot_frequency + + self._q: queue.Queue = queue.Queue() + self._sem = threading.BoundedSemaphore(value=prefetch_factor) + self._stop_event = threading.Event() + + self._steps_since_snapshot = 0 + self._fast_forward = 0 + if initial_state is not None: + self._snapshot = initial_state["snapshot"] + self._fast_forward = initial_state["steps_since_snapshot"] + self.source.reset(self._snapshot) + else: + self._snapshot = None + self.source.reset() + self._snapshot_store = QueueSnapshotStore() + self._thread = threading.Thread( + target=self.worker, + args=( + self.source, + self._q, + self._snapshot_store, + self.snapshot_frequency, + self._sem, + self._stop_event, + ), + daemon=True, + ) + self._thread.start() + + # Try and get initial snapshot + self._snapshot = self._snapshot_store.get_initial_snapshot(thread=self._thread, timeout=ACK_TIMEOUT) + + for i in range(self._fast_forward): + try: + next(self) + except StopIteration: + raise ValueError( + f"Tried to fast-forward {self._fast_forward} items during init but " + f"hit StopIteration after {i} items, this is likely a bug or malformed state_dict" + ) + self._fast_forward = 0 + + def __iter__(self) -> Iterator[T]: + return self + + def __next__(self) -> T: + while True: + if self._stop_event.is_set(): + raise StopIteration() + try: + item, idx = self._q.get(block=True, timeout=QUEUE_TIMEOUT) + except queue.Empty: + continue + + if isinstance(item, StopIteration): + self._sem.release() + self._stop_event.set() + raise item + elif isinstance(item, ExceptionWrapper): + if not isinstance(item, StartupExceptionWrapper): + # We don't need to release for startup exceptions + self._sem.release() + self._stop_event.set() + item.reraise() + else: + self._sem.release() + self._steps_since_snapshot += 1 + self._maybe_update_snapshot(idx) + return item + + def get_state(self) -> Dict[str, Any]: + return { + "snapshot": self._snapshot, + "steps_since_snapshot": self._steps_since_snapshot, + } + + def _maybe_update_snapshot(self, idx: int): + if (snapshot := self._snapshot_store.pop_version(idx)) is not None: + self._snapshot = snapshot + self._steps_since_snapshot = 0 + + def __del__(self): + self._shutdown() + + def _shutdown(self): + self._stop_event.set() + if hasattr(self, "_thread") and self._thread.is_alive(): + self._thread.join(timeout=QUEUE_TIMEOUT * 5) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/pin_memory.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/pin_memory.py new file mode 100644 index 0000000000000000000000000000000000000000..5236edab47eada963168d023087d1d3aee5b76d0 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/pin_memory.py @@ -0,0 +1,154 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +import functools +import queue +import threading + +from typing import Any, Dict, Optional, Union + +import torch +import torch.multiprocessing + +from torch.utils.data._utils.pin_memory import pin_memory +from torchdata.nodes.base_node import BaseNode, T + +from torchdata.nodes.exception_wrapper import ExceptionWrapper, StartupExceptionWrapper +from torchdata.nodes.map import _SingleThreadedMapper +from torchdata.nodes.snapshot_store import MonotonicIndex, SnapshotStore + + +def _pin_memory_loop( + source: BaseNode, + q: queue.Queue, + snapshot_store: SnapshotStore, + snapshot_frequency: int, + semaphore: threading.BoundedSemaphore, + stop_event: threading.Event, + device_id: Union[int, str], + device: Optional[str], +): + """This is fork of from torch.utils.data._utils.pin_memory import _pin_memory_loop + to remove the index tuples. + + This setting is thread local, and prevents the copy in pin_memory from + consuming all CPU cores. + """ + + idx = MonotonicIndex() + + def _put( + item, + block: bool = True, + snapshot: Optional[Union[Dict[str, Any], StartupExceptionWrapper]] = None, + ): + _idx = idx.get() + if snapshot: + snapshot_store.append(snapshot=snapshot, version=_idx) + q.put((item, _idx), block=block) + + try: + torch.set_num_threads(1) + + torch.multiprocessing._set_thread_name("pt_data_pin") + + if device == "cuda": + torch.cuda.set_device(device_id) + elif device == "xpu": + torch.xpu.set_device(device_id) # type: ignore[attr-defined] + elif device == torch._C._get_privateuse1_backend_name(): + custom_device_mod = getattr(torch, torch._C._get_privateuse1_backend_name()) + custom_device_mod.set_device(device_id) + + assert ( + isinstance(snapshot_frequency, int) and snapshot_frequency >= 0 + ), f"snapshot_frequency must be non-negative integer! Got {snapshot_frequency}" + snapshot_store.append_initial_snapshot(snapshot=source.state_dict()) + except Exception: + e = StartupExceptionWrapper(where=f"in _pin_memory_loop startup for device {device_id}") + snapshot_store.append_initial_snapshot(snapshot=e) + return + + yielded = 0 + while not stop_event.is_set(): + if not semaphore.acquire(blocking=True, timeout=0.1): + continue + try: + item = next(source) + item = pin_memory(item, device) + yielded += 1 + snapshot = None + if snapshot_frequency > 0 and yielded % snapshot_frequency == 0: + snapshot = source.state_dict() + _put(item, block=False, snapshot=snapshot) + except StopIteration as e: + item = e + _put(item, block=False) + break + except Exception: + item = ExceptionWrapper(where=f"in _pin_memory_loop for device {device_id}") + _put(item, block=False) + break + + +class PinMemory(BaseNode[T]): + """Pins the data of the underlying node to a device. This is backed by torch.utils.data._utils.pin_memory._pin_memory_loop. + + Args: + source (BaseNode[T]): The source node to pin the data from. + pin_memory_device (str): The device to pin the data to. Default is "". + snapshot_frequency (int): The frequency at which to snapshot the state of the source node. Default is + 1, which means that the state of the source node will be snapshotted after every item. If set + to a higher value, the state of the source node will be snapshotted after every snapshot_frequency + items. + """ + + def __init__( + self, + source: BaseNode[T], + pin_memory_device: str = "", + snapshot_frequency: int = 1, + ): + super().__init__() + self.source = source + self.snapshot_frequency = snapshot_frequency + if len(pin_memory_device) == 0: + self._pin_memory_device = None + else: + self._pin_memory_device = pin_memory_device + + if self._pin_memory_device == "xpu": + self._current_device = torch.xpu.current_device() # type: ignore[attr-defined] + elif self._pin_memory_device == torch._C._get_privateuse1_backend_name(): + custom_device_mod = getattr(torch, torch._C._get_privateuse1_backend_name()) + self._current_device = custom_device_mod.current_device() + else: + self._current_device = torch.cuda.current_device() + + self._it: Optional[_SingleThreadedMapper[T]] = None + + def reset(self, initial_state: Optional[Dict[str, Any]] = None): + super().reset(initial_state) + if self._it is not None: + self._it._shutdown() + del self._it + self._it = _SingleThreadedMapper( + source=self.source, + prefetch_factor=1, + worker=functools.partial( + _pin_memory_loop, + device_id=self._current_device, + device=self._pin_memory_device, + ), + snapshot_frequency=self.snapshot_frequency, + initial_state=initial_state, + ) + + def next(self): + return next(self._it) # type: ignore[arg-type, union-attr] + + def get_state(self) -> Dict[str, Any]: + return self._it.get_state() # type: ignore[union-attr] diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/prefetch.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/prefetch.py new file mode 100644 index 0000000000000000000000000000000000000000..c35a593d25c18b40232d62e3501bcb8524f9fe36 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/prefetch.py @@ -0,0 +1,52 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +from typing import Any, Dict, Optional + +from torchdata.nodes import BaseNode, T + +from torchdata.nodes.map import _SingleThreadedMapper + +from ._populate_queue import _populate_queue + + +class Prefetcher(BaseNode[T]): + """Prefetches data from the source node and stores it in a queue. + + Args: + source (BaseNode[T]): The source node to prefetch data from. + prefetch_factor (int): The number of items to prefetch ahead of time. + snapshot_frequency (int): The frequency at which to snapshot the state of the source node. Default is + 1, which means that the state of the source node will be snapshotted after every item. If set + to a higher value, the state of the source node will be snapshotted after every snapshot_frequency + items. + """ + + def __init__(self, source: BaseNode[T], prefetch_factor: int, snapshot_frequency: int = 1): + super().__init__() + self.source = source + self.prefetch_factor = prefetch_factor + self.snapshot_frequency = snapshot_frequency + self._it: Optional[_SingleThreadedMapper[T]] = None + + def reset(self, initial_state: Optional[Dict[str, Any]] = None): + super().reset(initial_state) + if self._it is not None: + self._it._shutdown() + del self._it + self._it = _SingleThreadedMapper( + source=self.source, + prefetch_factor=self.prefetch_factor, + worker=_populate_queue, + snapshot_frequency=self.snapshot_frequency, + initial_state=initial_state, + ) + + def next(self): + return next(self._it) # type: ignore[arg-type] + + def get_state(self) -> Dict[str, Any]: + return self._it.get_state() # type: ignore[union-attr] diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/samplers/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/samplers/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/samplers/multi_node_weighted_sampler.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/samplers/multi_node_weighted_sampler.py new file mode 100644 index 0000000000000000000000000000000000000000..572b57b268f4f592bde7e92fafe44befbadb159e --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/samplers/multi_node_weighted_sampler.py @@ -0,0 +1,288 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +import copy +from typing import Any, Dict, Mapping, Optional + +import torch +from torchdata.nodes.base_node import BaseNode, T +from torchdata.nodes.samplers.stop_criteria import StopCriteria + +from .utils import _get_rank_seed, get_rank_and_world_size + + +class MultiNodeWeightedSampler(BaseNode[T]): + """A node that samples from multiple datasets with weights. + + This node expects to take in a dictionary of source nodes, and a dictionary of weights. + The keys of the source nodes and weights must be the same. The weights are used to sample + from the source nodes. We use torch.multinomial to sample from the source nodes, please + refer to https://pytorch.org/docs/stable/generated/torch.multinomial.html on how to use + weights for sampling. `seed` is used to initialize the random number generator. + + The node implements the state using the following keys: + + - DATASET_NODE_STATES_KEY: A dictionary of states for each source node. + - DATASETS_EXHAUSTED_KEY: A dictionary of booleans indicating whether each source node is exhausted. + - EPOCH_KEY: An epoch counter used to initialize the random number generator. + - NUM_YIELDED_KEY: The number of items yielded. + - WEIGHTED_SAMPLER_STATE_KEY: The state of the weighted sampler. + + We support multiple stopping criteria: + + - CYCLE_UNTIL_ALL_DATASETS_EXHAUSTED: Cycle through the source nodes until all datasets are exhausted. This is the default behavior. + - FIRST_DATASET_EXHAUSTED: Stop when the first dataset is exhausted. + - ALL_DATASETS_EXHAUSTED: Stop when all datasets are exhausted. + + On complete exhaustion of the source nodes, the node will raise StopIteration. + + Args: + source_nodes (Mapping[str, BaseNode[T]]): A dictionary of source nodes. + weights (Dict[str, float]): A dictionary of weights for each source node. + stop_criteria (str): The stopping criteria. Default is CYCLE_UNTIL_ALL_DATASETS_EXHAUST + rank (int): The rank of the current process. Default is None, in which case the rank + will be obtained from the distributed environment. + world_size (int): The world size of the distributed environment. Default is None, in + which case the world size will be obtained from the distributed environment. + seed (int): The seed for the random number generator. Default is 0. + """ + + DATASET_NODE_STATES_KEY = "dataset_node_states" + DATASETS_EXHAUSTED_KEY = "datasets_exhausted" + EPOCH_KEY = "epoch" + NUM_YIELDED_KEY = "num_yielded" + WEIGHTED_SAMPLER_STATE_KEY = "weighted_sampler_state" + + def __init__( + self, + source_nodes: Mapping[str, BaseNode[T]], + weights: Dict[str, float], + stop_criteria: str = StopCriteria.CYCLE_UNTIL_ALL_DATASETS_EXHAUSTED, + rank: Optional[int] = None, + world_size: Optional[int] = None, + seed: int = 0, + ) -> None: + super().__init__() + + self.source_nodes = source_nodes + self.weights = weights + self.stop_criteria = stop_criteria + self.dataset_names = list(self.source_nodes.keys()) + self._num_yielded = 0 + self._started = False + self.seed = seed + + # Setup rank and world size + if rank is None or world_size is None: + self.rank, self.world_size = get_rank_and_world_size() + else: + self.rank = rank + self.world_size = world_size + + self._epoch = 0 + + self._validate() + + def _validate(self) -> None: + if self.stop_criteria not in [ + StopCriteria.CYCLE_UNTIL_ALL_DATASETS_EXHAUSTED, + StopCriteria.ALL_DATASETS_EXHAUSTED, + StopCriteria.FIRST_DATASET_EXHAUSTED, + StopCriteria.CYCLE_FOREVER, + ]: + raise ValueError( + f"Invalid {self.stop_criteria=}. stop_criteria must be one of: CYCLE_UNTIL_ALL_DATASETS_EXHAUSTED, FIRST_DATASET_EXHAUSTED, ALL_DATASETS_EXHAUSTED" + ) + + # Validate if keys of source_nodes and weights are the same + if set(self.dataset_names) != set(self.weights.keys()) or len(self.dataset_names) != len(self.weights): + raise ValueError( + f"Invalid {self.weights=}. For multi-dataset weighted sampling, keys of source_nodes and weights must be the same", + ) + + for weight in self.weights.values(): + if not isinstance(weight, float) or weight <= 0: + raise ValueError( + f"""Invalid {self.weights=}. For multi-dataset weighted sampling, weights must be a 1d sequence, non-negative, and non-zero. + Weights are used to sample from source nodes. Zero weight means the source node will never be sampled from, and can cause + unexpected behavior depending on the stop criteris. Weights are used as inputs to torch.multinomial, please refer to + https://pytorch.org/docs/stable/generated/torch.multinomial.html on how to use weights for sampling.""" + ) + + def reset(self, initial_state: Optional[Dict[str, Any]] = None): + super().reset(initial_state) + if initial_state is not None: + self._num_yielded = initial_state[self.NUM_YIELDED_KEY] + self._epoch = initial_state[self.EPOCH_KEY] + self._weighted_sampler = self._get_new_weighted_sampler(initial_state) + self._datasets_exhausted = initial_state[self.DATASETS_EXHAUSTED_KEY] + for k in self.dataset_names: + self.source_nodes[k].reset(initial_state[self.DATASET_NODE_STATES_KEY][k]) + else: + # Force a fresh iterator from all source nodes + self._num_yielded = 0 + + if self._started: + self._epoch += 1 + self._weighted_sampler = self._get_new_weighted_sampler() + + self._datasets_exhausted = {key: False for key in self.weights.keys()} + for k in self.dataset_names: + self.source_nodes[k].reset() + self._started = False + + def _get_new_weighted_sampler(self, initial_state=None): + return _WeightedSampler( + weights=self.weights, + seed=self.seed, + rank=self.rank, + world_size=self.world_size, + epoch=self._epoch, + initial_state=(initial_state[self.WEIGHTED_SAMPLER_STATE_KEY] if initial_state is not None else None), + ) + + def _check_for_stop_iteration(self) -> None: + if self.stop_criteria == StopCriteria.CYCLE_FOREVER: + # If StopCriteria is CYCLE_FOREVER, we should never raise StopIteration + return + + if all(self._datasets_exhausted.values()): + # Raise StopIteration if all datasets are exhausted, + # this covers for both ALL_DATASETS_EXHAUSTED and CYCLE_UNTIL_ALL_DATASETS_EXHAUSTED + raise StopIteration() + + # Raise StopIteration is StopCriteria is FIRST_DATASET_EXHAUSTED and + # the first dataset is exhausted. Doing this to correctly catch StopIteration + # when trying next(it) on already exhausted iterator + if self.stop_criteria == StopCriteria.FIRST_DATASET_EXHAUSTED and any(self._datasets_exhausted.values()): + raise StopIteration() + + return + + def next(self) -> T: + self._started = True + while True: + self._check_for_stop_iteration() + + # Fetch the next item's key from the weighted sampler + key = next(self._weighted_sampler) + try: + if self._datasets_exhausted[key] and self.stop_criteria == StopCriteria.ALL_DATASETS_EXHAUSTED: + # Before fetching a new item check if key corresponds to an already + # exhaused dataset and StopCriteria is ALL_DATASETS_EXHAUSTED, move to next key + continue + item = next(self.source_nodes[key]) + except StopIteration: + # Mark the dataset as exhausted + self._datasets_exhausted[key] = True + + # Based on updated _datasets_exhausted, use _check_for_stop_iteration to check if we should raise StopIteration + self._check_for_stop_iteration() + + # If StopCriteria is ALL_DATASETS_EXHAUSTED, move to next key + if self.stop_criteria == StopCriteria.ALL_DATASETS_EXHAUSTED: + continue + + # If StopCriteria is CYCLE_UNTIL_ALL_DATASETS_EXHAUSTED or CYCLE_FOREVER, + # reset the iterator and try again + self.source_nodes[key].reset() + item = next(self.source_nodes[key]) + break + + # If we did't throw StopIteration, increment the number of items yielded and return the item + self._num_yielded += 1 + return item + + def get_state(self) -> Dict[str, Any]: + return { + self.DATASETS_EXHAUSTED_KEY: copy.deepcopy(self._datasets_exhausted), + self.DATASET_NODE_STATES_KEY: {k: self.source_nodes[k].state_dict() for k in self.dataset_names}, + self.EPOCH_KEY: self._epoch, + self.NUM_YIELDED_KEY: self._num_yielded, + self.WEIGHTED_SAMPLER_STATE_KEY: self._weighted_sampler.state_dict(), + } + + +class _WeightedSampler: + """A weighted sampler that samples from a list of weights. + + The class implements the state using the following keys: + + - g_state: The state of the random number generator. + - g_rank_state: The state of the random number generator for the rank. + - offset: The offset of the batch of indices. + + Args: + weights (Dict[str, float]): A dictionary of weights for each source node. + seed (int): The seed for the random number generator. + rank (int): The rank of the current process. + world_size (int): The world size of the distributed environment. + random_tensor_batch_size (int): Generating random numbers in batches is faster than individually. + This setting controls the batch size, but is invisible to users and shouldn't need to be tuned. Default is 1000. + initial_state (Optional[Dict[str, Any]]): The initial state of the sampler. Default is None. + """ + + def __init__( + self, + weights: Dict[str, float], + seed: int, + rank: int, + world_size: int, + epoch: int, + random_tensor_batch_size: int = 1000, + initial_state: Optional[Dict[str, Any]] = None, + ): + _names, _weights = [], [] + for name, weight in weights.items(): + _names.append(name) + _weights.append(weight) + + self.names = _names + self.weights = torch.tensor(_weights, dtype=torch.float64) + + self.random_tensor_batch_size = random_tensor_batch_size + + self._g = torch.Generator() + self._g_rank = torch.Generator() + + self.epoch = epoch + seed = _get_rank_seed(seed, self._g_rank, rank, world_size, self.epoch) + self._g.manual_seed(seed) + + self._g_snapshot = self._g.get_state() + if initial_state is not None: + self._g.set_state(initial_state["g_state"]) + self._offset = initial_state["offset"] + else: + self._offset = 0 + + self._batch_of_indices = self._get_batch_of_indices() + + def _get_batch_of_indices(self) -> list[int]: + self._g_snapshot = self._g.get_state() + return torch.multinomial( + self.weights, + num_samples=self.random_tensor_batch_size, + replacement=True, + generator=self._g, + ).tolist() + + def __iter__(self): + return self + + def __next__(self): + if self._offset >= len(self._batch_of_indices): + self._batch_of_indices = self._get_batch_of_indices() + self._offset = 0 + item = self._batch_of_indices[self._offset] + self._offset += 1 + return self.names[item] + + def state_dict(self): + return { + "g_state": self._g_snapshot, + "offset": self._offset, + } diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/samplers/stop_criteria.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/samplers/stop_criteria.py new file mode 100644 index 0000000000000000000000000000000000000000..b1e74690534f0ecced57e8039b5e96cee1ca53b9 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/samplers/stop_criteria.py @@ -0,0 +1,28 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + + +class StopCriteria: + """ + Stopping criteria for the dataset samplers. + + 1) CYCLE_UNTIL_ALL_DATASETS_EXHAUSTED: Stop once the last unseen dataset is exhausted. + All datasets are seen at least once. In certain cases, some datasets may be + seen more than once when there are still non-exhausted datasets. + + 2) ALL_DATASETS_EXHAUSTED: Stop once all have the datasets are exhausted. Each + dataset is seen exactly once. No wraparound or restart will be performed. + + 3) FIRST_DATASET_EXHAUSTED: Stop when the first dataset is exhausted. + + 4) CYCLE_FOREVER: Cycle through the datasets by reinitializing each exhausted source nodes. + This is useful when trainer want control over certain number of steps instead of epochs. + """ + + CYCLE_UNTIL_ALL_DATASETS_EXHAUSTED = "CYCLE_UNTIL_ALL_DATASETS_EXHAUSTED" + ALL_DATASETS_EXHAUSTED = "ALL_DATASETS_EXHAUSTED" + FIRST_DATASET_EXHAUSTED = "FIRST_DATASET_EXHAUSTED" + CYCLE_FOREVER = "CYCLE_FOREVER" diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/samplers/utils.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/samplers/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..29da914fd8395702e88d242122715344a008e5e8 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/samplers/utils.py @@ -0,0 +1,40 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +import os + +import torch +import torch.distributed as dist + + +def _get_rank_seed(seed: int, generator_rank: torch.Generator, rank: int, world_size: int, epoch: int) -> int: + generator_rank.manual_seed(seed * world_size + rank) + return int(torch.randint(0, 2 ** 32 - 1, size=(epoch + 1,), generator=generator_rank)[-1].item()) + + +def get_rank_and_world_size() -> tuple[int, int]: + """ + Returns the rank and world size of the current process. + If distributed is initialized, returns the rank and world size from the distributed environment. + If distributed is not initialized, returns the rank and world size from the environment variables. + If neither distributed nor environment variables are set, returns a rank of 0 and a world size of 1. + """ + if dist.is_available() and dist.is_initialized(): + rank, world_size = dist.get_rank(), dist.get_world_size() + else: + _rank = os.environ.get("RANK", "0") + _world_size = os.environ.get("WORLD_SIZE", "1") + try: + rank = int(_rank) + world_size = int(_world_size) + except ValueError: + rank = 0 + world_size = 1 + + if rank >= world_size or rank < 0: + raise ValueError(f"Invalid rank {rank}, rank should be in the interval [0, {world_size - 1}]") + + return rank, world_size diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/snapshot_store.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/snapshot_store.py new file mode 100644 index 0000000000000000000000000000000000000000..52f75108948ca60608b2e31d2c4c68a3a42c3fee --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/snapshot_store.py @@ -0,0 +1,95 @@ +import queue +import threading +import time +from dataclasses import dataclass +from typing import Any, Optional, Protocol + +from torchdata.nodes.constants import QUEUE_TIMEOUT + +from torchdata.nodes.exception_wrapper import ExceptionWrapper + + +@dataclass +class MonotonicIndex: + initial: int = 0 + + def __post_init__(self): + self._idx = self.initial + + def get(self) -> int: + idx = self._idx + self._idx += 1 + return idx + + +class SnapshotStore(Protocol): + """Protocol for passing snapshot state around between threads and processes""" + + def append(self, snapshot: Any, version: int): + ... + + def pop_version(self, version: int) -> Optional[Any]: + ... + + def append_initial_snapshot(self, snapshot: Any): + ... + + def get_initial_snapshot(self, thread: threading.Thread, timeout: float) -> Any: + ... + + +class QueueSnapshotStore(SnapshotStore): + """A snapshot store that uses a queue to store snapshots""" + + SNAPSHOT_INIT_VERSION = -1 + + def __init__(self) -> None: + self._q: queue.Queue = queue.Queue() + self._lock = threading.Lock() + self._max_version: int = -1000 + + def append(self, snapshot: Any, version: int) -> None: + with self._lock: + if version <= self._max_version: + raise ValueError(f"{version=} is not strictly greater than {self._max_version=}") + self._max_version = version + self._q.put((version, snapshot)) + + def pop_version(self, version: int) -> Optional[Any]: + ver, val = None, None + with self._lock: + while self._q.queue and version >= self._q.queue[0][0]: + ver, val = self._q.get_nowait() + + if ver == version: + return val + else: + return None + + def append_initial_snapshot(self, snapshot: Any) -> None: + self.append(snapshot, self.SNAPSHOT_INIT_VERSION) + + def get_initial_snapshot(self, thread: threading.Thread, timeout: float = 60.0) -> Any: + snapshot = None + ver = None + + ack_t0 = time.time() + while snapshot is None and time.time() - ack_t0 < timeout: + try: + ver, snapshot = self._q.get(timeout=QUEUE_TIMEOUT) + except queue.Empty: + pass + if not thread.is_alive(): + # Don't test this until after QUEUE_TIMEOUT has elapsed because + # thread may inadvertently report "is_alive()==False" + break + + if snapshot is not None and isinstance(snapshot, ExceptionWrapper): + snapshot.reraise() + + if snapshot is None or ver != self.SNAPSHOT_INIT_VERSION: + raise RuntimeError( + f"Failed to get initial snapshot after {time.time() - ack_t0} seconds! {thread.is_alive()=}, {snapshot=}, {ver=}" + ) + + return snapshot diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/types.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/types.py new file mode 100644 index 0000000000000000000000000000000000000000..57a505b6f75cd1264292b7d77ba2c535b360a17a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/nodes/types.py @@ -0,0 +1,19 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + + +from typing import Any, Dict, Protocol, runtime_checkable + + +@runtime_checkable +class Stateful(Protocol): + """Protocol for objects implementing both ``state_dict()`` and ``load_state_dict(state_dict: Dict[str, Any])``""" + + def state_dict(self) -> Dict[str, Any]: + ... + + def load_state_dict(self, state_dict: Dict[str, Any]) -> None: + ... diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/stateful_dataloader/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/stateful_dataloader/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..93d042ee798e0bb8ff87a97f01fdf9817b69b271 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/stateful_dataloader/__init__.py @@ -0,0 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +from .stateful import Stateful +from .stateful_dataloader import StatefulDataLoader + +__all__ = ["Stateful", "StatefulDataLoader"] diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/stateful_dataloader/incremental_state.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/stateful_dataloader/incremental_state.py new file mode 100644 index 0000000000000000000000000000000000000000..fbebeddfd237c3f80d3ae438ccf873c229c631b6 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/stateful_dataloader/incremental_state.py @@ -0,0 +1,181 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +from typing import Any, Dict, Optional, Tuple + +import torch + +_WORKER_ID = "worker_id" +_FETCHER_STATE = "fetcher_state" +_FETCHER_ENDED = "fetcher_ended" +_DATASET_STATE = "dataset_state" +_DATASET_ITER_STATE = "dataset_iter_state" + + +def _flatten(data: Any, key_lineage: Tuple = ()) -> Dict[Tuple, Any]: + # Always return a dict as the result + # If data is not a dict or if it is an empty dict, then return a dict with key as key_lineage and data as the value + # If data is a dict with entries, then iterate through it and flatten the keys + flat_data = {} + if isinstance(data, dict) and len(data) > 0: + for key, value in data.items(): + flat = _flatten(value, key_lineage + (key,)) + flat_data.update(flat) + else: + flat_data[key_lineage] = data + return flat_data + + +def _unflatten(flat_data: Dict[Tuple, Any]): + nested_data = {} + for key, value in flat_data.items(): + # Consider case where key is empty tuple, this is the case where original data was not a dict + if len(key) == 0: + return value + + prefix = key[0] + if len(key) == 1: + nested_data[prefix] = value + continue + + suffix = key[1:] + if prefix not in nested_data: + nested_data[prefix] = {} + nested_data[prefix][suffix] = value + + # now go through nested_data and unflatten next level of dicts + for k, v in nested_data.items(): + if isinstance(v, dict): + nested_data[k] = _unflatten(v) + return nested_data + + +class _Tombstone: + pass + + +class _IncrementalState: + def __init__(self, initial_state: Optional[Dict[str, Any]]): + self.flat_state = _flatten(initial_state) + + def generate_delta(self, new_state: Dict[str, Any]): + new_flat_state = _flatten(new_state) + delta_flat_state = {} + all_keys = set() + if self.flat_state: + all_keys = set(self.flat_state.keys()) + all_keys = all_keys.union(new_flat_state.keys()) + + for key in all_keys: + if self.flat_state is None or key not in self.flat_state: + # New key, retain it + delta_flat_state[key] = new_flat_state[key] + continue + + if key not in new_flat_state: + # Key deletion, put in a tombstone + delta_flat_state[key] = _Tombstone() + continue + + prev_value, new_value = self.flat_state[key], new_flat_state[key] + try: + if isinstance(prev_value, torch.Tensor) and isinstance(new_value, torch.Tensor): + if torch.equal(prev_value, new_value): + continue + elif prev_value == new_value: + continue + except Exception: + # Fallback to retaining new key/value + pass + delta_flat_state[key] = new_value + # Update internal state to the new state + self.flat_state = new_flat_state + return delta_flat_state + + def apply_delta(self, flat_delta_state: Dict[Tuple, Any]) -> None: + for key, update in flat_delta_state.items(): + if self.flat_state is None: + self.flat_state = {} + + if isinstance(update, _Tombstone): + # Remove key if present in the state + self.flat_state.pop(key, None) + else: + self.flat_state[key] = update + + def get_state(self) -> Optional[Dict[str, Any]]: + return _unflatten(self.flat_state) + + +class _IncrementalWorkerState: + def __init__(self, initial_worker_state_dict: Optional[Dict[str, Any]]): + self._worker_id = None + self._fetcher_ended = None + + dataset_state = None + fetcher_iter_state = None + if initial_worker_state_dict: + self._worker_id = initial_worker_state_dict[_WORKER_ID] + dataset_state = initial_worker_state_dict.get(_DATASET_STATE, None) + fetcher_state = initial_worker_state_dict.get(_FETCHER_STATE, None) + if fetcher_state is not None: + self._fetcher_ended = fetcher_state[_FETCHER_ENDED] + fetcher_iter_state = fetcher_state.get(_DATASET_ITER_STATE, None) + + self._incr_dataset_state = _IncrementalState(dataset_state) + self._incr_fetcher_iter_state = _IncrementalState(fetcher_iter_state) + + def generate_delta(self, new_state_dict: Dict[str, Any]) -> Dict[str, Any]: + assert _WORKER_ID in new_state_dict + self._worker_id = new_state_dict[_WORKER_ID] + incr_state_dict = {_WORKER_ID: self._worker_id, _FETCHER_STATE: None} + + ds_state = new_state_dict.get(_DATASET_STATE, None) + if ds_state is not None: + incr_state_dict[_DATASET_STATE] = self._incr_dataset_state.generate_delta(ds_state) + + fetcher_state = new_state_dict.get(_FETCHER_STATE, None) + if fetcher_state is not None: + self._fetcher_ended = fetcher_state[_FETCHER_ENDED] + + delta_iter_state = None + iter_state = fetcher_state.get(_DATASET_ITER_STATE, None) + if iter_state is not None: + delta_iter_state = self._incr_fetcher_iter_state.generate_delta(iter_state) + + incr_state_dict[_FETCHER_STATE] = { + _DATASET_ITER_STATE: delta_iter_state, + _FETCHER_ENDED: self._fetcher_ended, + } + return incr_state_dict + + def apply_delta(self, delta_state_dict: Dict[str, Any]) -> None: + self._worker_id = delta_state_dict[_WORKER_ID] + ds_state = delta_state_dict.get(_DATASET_STATE, None) + if ds_state is not None: + self._incr_dataset_state.apply_delta(ds_state) + + fetcher_state = delta_state_dict.get(_FETCHER_STATE, None) + if fetcher_state is not None: + self._fetcher_ended = fetcher_state[_FETCHER_ENDED] + iter_state = fetcher_state.get(_DATASET_ITER_STATE, None) + if iter_state is not None: + self._incr_fetcher_iter_state.apply_delta(iter_state) + + def get_state(self) -> Dict[str, Any]: + fetcher_state = ( + { + _FETCHER_ENDED: self._fetcher_ended, + _DATASET_ITER_STATE: self._incr_fetcher_iter_state.get_state(), + } + if self._fetcher_ended is not None + else None + ) + return { + _WORKER_ID: self._worker_id, + _DATASET_STATE: self._incr_dataset_state.get_state(), + _FETCHER_STATE: fetcher_state, + } diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/stateful_dataloader/sampler.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/stateful_dataloader/sampler.py new file mode 100644 index 0000000000000000000000000000000000000000..cacb1d12cb5bd6af1d44110e476f5e7c87bb4b09 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/stateful_dataloader/sampler.py @@ -0,0 +1,216 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +import itertools +from typing import Any, Dict, Iterator, List, Optional, Sized + +import torch.utils.data.sampler +from torch.utils.data import Dataset +from torch.utils.data.dataloader import _InfiniteConstantSampler +from torch.utils.data.sampler import Sampler + +from .stateful import Stateful + + +class _StatefulRandomSamplerIterator(Iterator[int], Stateful): + _GENERATOR = "generator" + _YIELDED = "yielded" + + def __init__(self, sampler): + self.sampler = sampler + self.generator_state = self.sampler.generator.get_state() + self.yielded = 0 + self.next_yielded = None + self.n = len(sampler.data_source) + self.replacement = sampler.replacement + self.num_samples = sampler.num_samples + self.chunk_size = 32 + self.perm: List[int] = self._get_perm() + self.perm_index = 0 + self.chunk_index = 0 + + def __iter__(self): + return self + + def _get_perm(self) -> List[int]: + if self.replacement: + return torch.randint( + high=self.n, + size=(self.chunk_size,), + dtype=torch.int64, + generator=self.sampler.generator, + ).tolist() + else: + return torch.randperm(self.n, generator=self.sampler.generator).tolist() + + def __next__(self): + if self.yielded == self.num_samples: + raise StopIteration() + if self.perm_index == len(self.perm): + self.perm = self._get_perm() + self.perm_index = 0 + val = self.perm[self.perm_index] + self.perm_index += 1 + self.yielded += 1 + return val + + def state_dict(self) -> dict: + return { + self._YIELDED: self.yielded, + self._GENERATOR: self.generator_state, + } + + def load_state_dict(self, state_dict: dict) -> None: + self.next_yielded = state_dict[self._YIELDED] + self.generator_state = state_dict[self._GENERATOR] + self.sampler.generator.set_state(self.generator_state) + + if self.next_yielded is not None: + self.perm = self._get_perm() # We want permutations from the latest generator state that's loaded + for _ in range(self.next_yielded): + next(self) + self.yielded = self.next_yielded + self.next_yielded = None + + +class RandomSampler(Sampler[int]): + def __init__( + self, + data_source: Sized, + replacement: bool = False, + num_samples: Optional[int] = None, + generator=None, + ) -> None: + self.data_source = data_source + self.replacement = replacement + self._num_samples = num_samples + if generator is None: + # Prevoiusly the random seed was fixed as 1. We then changed it to system generated seed to ensure deterministic randomness. + seed = int(torch.empty((), dtype=torch.int64).random_().item()) + generator = torch.Generator() + generator.manual_seed(seed) + self.generator = generator + if not isinstance(self.replacement, bool): + raise TypeError(f"replacement should be a boolean value, but got replacement={self.replacement}") + if not isinstance(self.num_samples, int) or self.num_samples <= 0: + raise ValueError(f"num_samples should be a positive integer value, but got num_samples={self.num_samples}") + + @property + def num_samples(self) -> int: + # dataset size might change at runtime + if self._num_samples is None: + return len(self.data_source) + return self._num_samples + + def __iter__(self) -> Iterator[int]: + return _StatefulRandomSamplerIterator(self) + + def __len__(self) -> int: + return self.num_samples + + +class _BatchSamplerIterator(Iterator[list[int]], Stateful): + _SAMPLES_YIELDED = "samples_yielded" + _SAMPLER_STATE = "sampler_state" + _SAMPLER_ITER_STATE = "sampler_iter_state" + + def __init__(self, sampler, batch_size: int, drop_last: bool): + self.sampler = sampler + self.sampler_iter = iter(self.sampler) + self.batch_size = batch_size + self.drop_last = drop_last + self.samples_yielded = 0 + + def __next__(self) -> list[int]: + batch = [] + try: + for _ in range(self.batch_size): + batch.append(next(self.sampler_iter)) + self.samples_yielded += 1 + return batch + except StopIteration: + if self.drop_last or len(batch) == 0: + raise StopIteration + else: + return batch + + def state_dict(self) -> Dict[str, Any]: + sd: Dict[str, Any] = {self._SAMPLES_YIELDED: self.samples_yielded} + if isinstance(self.sampler, Stateful): + sd[self._SAMPLER_STATE] = self.sampler.state_dict() + if isinstance(self.sampler_iter, Stateful): + sd[self._SAMPLER_ITER_STATE] = self.sampler_iter.state_dict() + return sd + + def load_state_dict(self, state_dict: Dict[str, Any]) -> None: + self.samples_yielded = state_dict[self._SAMPLES_YIELDED] + if self._SAMPLER_STATE in state_dict: + assert isinstance(self.sampler, Stateful) + self.sampler.load_state_dict(state_dict[self._SAMPLER_STATE]) + self.sampler_iter = iter(self.sampler) + if self._SAMPLER_ITER_STATE in state_dict: + assert isinstance(self.sampler_iter, Stateful) + self.sampler_iter.load_state_dict(state_dict[self._SAMPLER_ITER_STATE]) + + if not (isinstance(self.sampler, Stateful) or isinstance(self.sampler_iter, Stateful)) and not isinstance( + self.sampler, _InfiniteConstantSampler + ): + # We skip x samples if underlying sampler is not stateful + for _ in range(self.samples_yielded): + next(self.sampler_iter) + + def update_state_dict(self) -> None: + if isinstance(self.sampler_iter, Stateful) and hasattr(self.sampler_iter, "update_state_dict"): + self.sampler_iter.update_state_dict() + + +class BatchSampler(torch.utils.data.sampler.BatchSampler): + def __init__(self, sampler, batch_size, drop_last): + super().__init__(sampler, batch_size, drop_last) + + def __iter__(self): + return _BatchSamplerIterator( + sampler=self.sampler, + batch_size=self.batch_size, + drop_last=self.drop_last, + ) + + +class StatefulDistributedSampler(torch.utils.data.distributed.DistributedSampler): + _YIELDED = "yielded" + + def __init__( + self, + dataset: Dataset, + num_replicas: Optional[int] = None, + rank: Optional[int] = None, + shuffle: bool = True, + seed: int = 0, + drop_last: bool = False, + ) -> None: + super().__init__(dataset, num_replicas, rank, shuffle, seed, drop_last) + self.yielded = 0 + self.next_yielded = None + + def __iter__(self): + self.yielded = 0 + if self.next_yielded is not None: + self.yielded = self.next_yielded + self.next_yielded = None + it = super().__iter__() + for idx in itertools.islice(it, self.yielded, None): + self.yielded += 1 + yield idx + + def state_dict(self) -> Dict[str, Any]: + return {self._YIELDED: self.yielded} + + def load_state_dict(self, state_dict: Dict[str, Any]) -> None: + if self._YIELDED not in state_dict: + raise ValueError("Invalid state_dict") + if state_dict[self._YIELDED] < 0: + raise ValueError("Cannot load state_dict with negative yielded value") + self.next_yielded = state_dict[self._YIELDED] diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/stateful_dataloader/stateful.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/stateful_dataloader/stateful.py new file mode 100644 index 0000000000000000000000000000000000000000..931bef182a05326cb23ad06d6767e803af067e91 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/stateful_dataloader/stateful.py @@ -0,0 +1,16 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +from typing import Any, Dict, Protocol, runtime_checkable + + +@runtime_checkable +class Stateful(Protocol): + def state_dict(self) -> Dict[str, Any]: + ... + + def load_state_dict(self, state_dict: Dict[str, Any]) -> None: + ... diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/stateful_dataloader/stateful_dataloader.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/stateful_dataloader/stateful_dataloader.py new file mode 100644 index 0000000000000000000000000000000000000000..1ffeec298093ec75d4475356e0f8bf4e4a8d72a2 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/stateful_dataloader/stateful_dataloader.py @@ -0,0 +1,1691 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +r"""Definition of the StatefulDataLoader and associated iterators. + +This file is a stand-in for torch.utils.data.dataloader, and includes a +StatefulDataLoader, which inherits from DataLoader and adds +state_dict/load_state_dict methods, as well as implementations for +single and multi-process iterators which are also stateful. + +Where possible, we import the original definitions from torch.utils.data.dataloader, +and use inheritance for base classes only (StatefulDataLoader, _StatefulBaseDataLoaderIter). + +For the single and multi-process iterator implementations, we fork the code to avoid a +diamond-shaped multiple-inheritance scheme. +""" + +import collections +import functools +import itertools +import logging +import queue +import threading + +from typing import Any, Dict, Iterable, List, Optional, TypeVar, Union + +import torch +import torch.multiprocessing as multiprocessing +import torch.utils.data._utils.worker +import torch.utils.data.graph_settings + +from torch._utils import ExceptionWrapper + +from torch.utils.data import ( + _utils, + DataLoader, + Dataset, + IterableDataset, + IterDataPipe, + MapDataPipe, + Sampler, + SequentialSampler, +) + +from torch.utils.data.dataloader import _BaseDataLoaderIter, _InfiniteConstantSampler +from torch.utils.data.datapipes.datapipe import _IterDataPipeSerializationWrapper, _MapDataPipeSerializationWrapper + +from .incremental_state import ( + _DATASET_ITER_STATE, + _DATASET_STATE, + _FETCHER_ENDED, + _FETCHER_STATE, + _IncrementalWorkerState, + _WORKER_ID, +) +from .sampler import BatchSampler, RandomSampler +from .stateful import Stateful + +from .worker import _AckStartup, _worker_loop, try_to_deserialize, try_to_serialize + +__all__ = [ + "StatefulDataLoader", + "get_worker_info", + "default_collate", + "default_convert", +] + +from torch.utils.data.dataloader import ( + _collate_fn_t, + _DatasetKind, + _sharding_worker_init_fn, + _worker_init_fn_t, + default_collate, + default_convert, + get_worker_info, +) + +_T_co = TypeVar("_T_co", covariant=True) + +logger = logging.getLogger(__name__) + +_INDEX_SAMPLER_STATE = "_index_sampler_state" +_SAMPLER_ITER_STATE = "_sampler_iter_state" +_SAMPLER_ITER_YIELDED = "_sampler_iter_yielded" +_ITERABLEDATASET_LEN_CALLED = "_IterableDataset_len_called" +_SHARED_SEED = "_shared_seed" +_ITERATOR_FINISHED = "_iterator_finished" + + +class StatefulDataLoader(DataLoader[_T_co]): + r""" + This is a drop in replacement for ``torch.utils.data.DataLoader`` + that implements state_dict and load_state_dict methods, enabling mid-epoch + checkpointing. + + All arguments are identical to ``torch.utils.data.DataLoader``, with + a new kwarg: ``snapshot_every_n_steps``. + + Args: + dataset (Dataset): dataset from which to load the data. + batch_size (int, optional): how many samples per batch to load + (default: ``1``). + shuffle (bool, optional): set to ``True`` to have the data reshuffled + at every epoch (default: ``False``). + sampler (Sampler or Iterable, optional): defines the strategy to draw + samples from the dataset. Can be any ``Iterable`` with ``__len__`` + implemented. If specified, :attr:`shuffle` must not be specified. + batch_sampler (Sampler or Iterable, optional): like :attr:`sampler`, but + returns a batch of indices at a time. Mutually exclusive with + :attr:`batch_size`, :attr:`shuffle`, :attr:`sampler`, + and :attr:`drop_last`. + num_workers (int, optional): how many subprocesses to use for data + loading. ``0`` means that the data will be loaded in the main process. + (default: ``0``) + collate_fn (Callable, optional): merges a list of samples to form a + mini-batch of Tensor(s). Used when using batched loading from a + map-style dataset. + pin_memory (bool, optional): If ``True``, the data loader will copy Tensors + into device/CUDA pinned memory before returning them. If your data elements + are a custom type, or your :attr:`collate_fn` returns a batch that is a custom type, + see the example below. + drop_last (bool, optional): set to ``True`` to drop the last incomplete batch, + if the dataset size is not divisible by the batch size. If ``False`` and + the size of dataset is not divisible by the batch size, then the last batch + will be smaller. (default: ``False``) + timeout (numeric, optional): if positive, the timeout value for collecting a batch + from workers. Should always be non-negative. (default: ``0``) + worker_init_fn (Callable, optional): If not ``None``, this will be called on each + worker subprocess with the worker id (an int in ``[0, num_workers - 1]``) as + input, after seeding and before data loading. (default: ``None``) + multiprocessing_context (str or multiprocessing.context.BaseContext, optional): If + ``None``, the default `multiprocessing context`_ of your operating system will + be used. (default: ``None``) + generator (torch.Generator, optional): If not ``None``, this RNG will be used + by RandomSampler to generate random indexes and multiprocessing to generate + ``base_seed`` for workers. (default: ``None``) + prefetch_factor (int, optional, keyword-only arg): Number of batches loaded + in advance by each worker. ``2`` means there will be a total of + 2 * num_workers batches prefetched across all workers. (default value depends + on the set value for num_workers. If value of num_workers=0 default is ``None``. + Otherwise, if value of ``num_workers > 0`` default is ``2``). + persistent_workers (bool, optional): If ``True``, the data loader will not shut down + the worker processes after a dataset has been consumed once. This allows to + maintain the workers `Dataset` instances alive. (default: ``False``) + pin_memory_device (str, optional): the device to :attr:`pin_memory` to if ``pin_memory`` is + ``True``. + in_order (bool, optional): If ``False``, the data loader will not enforce that batches + are returned in a first-in, first-out order. Only applies when ``num_workers > 0``. (default: ``True``) + snapshot_every_n_steps (int, optional): Defines how often the state is + transferred from the dataloader workers to the dataloader. By default, it is set to ``1``, i.e., state is transferred every step. If the state is large, this value can be increased (and ideally set to the frequency of training checkpointing) to reduce the overhead of transferring state every step. + + + .. warning:: If the ``spawn`` start method is used, :attr:`worker_init_fn` + cannot be an unpicklable object, e.g., a lambda function. See + `multiprocessing-best-practices `_ on more details related + to multiprocessing in PyTorch. + + .. warning:: ``len(dataloader)`` heuristic is based on the length of the sampler used. + When :attr:`dataset` is an :class:`~torch.utils.data.IterableDataset`, + it instead returns an estimate based on ``len(dataset) / batch_size``, with proper + rounding depending on :attr:`drop_last`, regardless of multi-process loading + configurations. This represents the best guess PyTorch can make because PyTorch + trusts user :attr:`dataset` code in correctly handling multi-process + loading to avoid duplicate data. + + However, if sharding results in multiple workers having incomplete last batches, + this estimate can still be inaccurate, because (1) an otherwise complete batch can + be broken into multiple ones and (2) more than one batch worth of samples can be + dropped when :attr:`drop_last` is set. Unfortunately, PyTorch can not detect such + cases in general. + + See `Dataset Types `_ for more details on these two types of datasets and how + :class:`~torch.utils.data.IterableDataset` interacts with + `Multi-process data loading `_. + + .. warning:: See `Reproducibility `_, and `Dataloader-workers-random-seed `_, and + `Data-loading-randomness `_ notes for random seed related questions. + + .. warning:: Setting `in_order` to `False` can harm reproducibility and may lead to a skewed data distribution being fed to the trainer in cases with imbalanced data. + + .. warning:: Setting `in_order` to `False` currently has no guarantees for state management. + + .. _multiprocessing context: + https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods + """ + + _iterator: Optional["_StatefulBaseDataLoaderIter"] + + def __init__( + self, + dataset: Dataset[_T_co], + batch_size: Optional[int] = 1, + shuffle: Optional[bool] = None, + sampler: Union[Sampler, Iterable, None] = None, + batch_sampler: Union[Sampler[List], Iterable[List], None] = None, + num_workers: int = 0, + collate_fn: Optional[_collate_fn_t] = None, + pin_memory: bool = False, + drop_last: bool = False, + timeout: float = 0, + worker_init_fn: Optional[_worker_init_fn_t] = None, + multiprocessing_context=None, + generator=None, + *, + prefetch_factor: Optional[int] = None, + persistent_workers: bool = False, + pin_memory_device: str = "", + in_order: bool = True, + snapshot_every_n_steps: Optional[int] = 1, + ): + torch._C._log_api_usage_once("python.stateful_data_loader") + + if num_workers < 0: + raise ValueError( + "num_workers option should be non-negative; " "use num_workers=0 to disable multiprocessing." + ) + + if timeout < 0: + raise ValueError("timeout option should be non-negative") + + if num_workers == 0 and prefetch_factor is not None: + raise ValueError( + "prefetch_factor option could only be specified in multiprocessing." + "let num_workers > 0 to enable multiprocessing, otherwise set prefetch_factor to None." + ) + elif num_workers > 0 and prefetch_factor is None: + prefetch_factor = 2 + elif prefetch_factor is not None and prefetch_factor < 0: + raise ValueError("prefetch_factor option should be non-negative") + + if persistent_workers and num_workers == 0: + raise ValueError("persistent_workers option needs num_workers > 0") + + if num_workers > 0 and not in_order: + # TODO: remove warning log when state management is supported with in_order=False + logger.warning( + "using in_order=False with multiple workers does not give any guarantees for state management " + "and loading from a checkpoint may not work as expected." + ) + + self.dataset = dataset + self.num_workers = num_workers + self.prefetch_factor = prefetch_factor + self.pin_memory = pin_memory + self.pin_memory_device = pin_memory_device + self.timeout = timeout + self.worker_init_fn = worker_init_fn + self.multiprocessing_context = multiprocessing_context + self.in_order = in_order + + # Adds forward compatibilities so classic DataLoader can work with DataPipes: + # _DataPipeSerializationWrapper container makes it easier to serialize without redefining pickler + if isinstance(self.dataset, IterDataPipe): + self.dataset = _IterDataPipeSerializationWrapper(self.dataset) + elif isinstance(self.dataset, MapDataPipe): + self.dataset = _MapDataPipeSerializationWrapper(self.dataset) + + # Arg-check dataset related before checking samplers because we want to + # tell users that iterable-style datasets are incompatible with custom + # samplers first, so that they don't learn that this combo doesn't work + # after spending time fixing the custom sampler errors. + if isinstance(dataset, IterableDataset): + self._dataset_kind = _DatasetKind.Iterable + # NOTE [ Custom Samplers and IterableDataset ] + # + # `IterableDataset` does not support custom `batch_sampler` or + # `sampler` since the key is irrelevant (unless we support + # generator-style dataset one day...). + # + # For `sampler`, we always create a dummy sampler. This is an + # infinite sampler even when the dataset may have an implemented + # finite `__len__` because in multi-process data loading, naive + # settings will return duplicated data (which may be desired), and + # thus using a sampler with length matching that of dataset will + # cause data lost (you may have duplicates of the first couple + # batches, but never see anything afterwards). Therefore, + # `Iterabledataset` always uses an infinite sampler, an instance of + # `_InfiniteConstantSampler` defined above. + # + # A custom `batch_sampler` essentially only controls the batch size. + # However, it is unclear how useful it would be since an iterable-style + # dataset can handle that within itself. Moreover, it is pointless + # in multi-process data loading as the assignment order of batches + # to workers is an implementation detail so users can not control + # how to batchify each worker's iterable. Thus, we disable this + # option. If this turns out to be useful in future, we can re-enable + # this, and support custom samplers that specify the assignments to + # specific workers. + if isinstance(dataset, IterDataPipe): + if shuffle is not None: + dataset = torch.utils.data.graph_settings.apply_shuffle_settings(dataset, shuffle=shuffle) + # We cannot check `shuffle is not None` here, since previously `shuffle=False` was the default. + elif shuffle not in {False, None}: + raise ValueError( + f"DataLoader with IterableDataset: expected unspecified shuffle option, but got shuffle={shuffle}" + ) + + if sampler is not None: + # See NOTE [ Custom Samplers and IterableDataset ] + raise ValueError( + f"DataLoader with IterableDataset: expected unspecified sampler option, but got sampler={sampler}" + ) + elif batch_sampler is not None: + # See NOTE [ Custom Samplers and IterableDataset ] + raise ValueError( + "DataLoader with IterableDataset: expected unspecified " + f"batch_sampler option, but got batch_sampler={batch_sampler}" + ) + else: + shuffle = bool(shuffle) + self._dataset_kind = _DatasetKind.Map + + if sampler is not None and shuffle: + raise ValueError("sampler option is mutually exclusive with " "shuffle") + + if batch_sampler is not None: + # auto_collation with custom batch_sampler + if batch_size != 1 or shuffle or sampler is not None or drop_last: + raise ValueError( + "batch_sampler option is mutually exclusive " "with batch_size, shuffle, sampler, and " "drop_last" + ) + batch_size = None + drop_last = False + elif batch_size is None: + # no auto_collation + if drop_last: + raise ValueError( + "batch_size=None option disables auto-batching " "and is mutually exclusive with drop_last" + ) + + if sampler is None: # give default samplers + if self._dataset_kind == _DatasetKind.Iterable: + # See NOTE [ Custom Samplers and IterableDataset ] + sampler = _InfiniteConstantSampler() + else: # map-style + if shuffle: + sampler = RandomSampler(dataset, generator=generator) # type: ignore[arg-type] + else: + sampler = SequentialSampler(dataset) # type: ignore[arg-type] + + if batch_size is not None and batch_sampler is None: + # auto_collation without custom batch_sampler + batch_sampler = BatchSampler(sampler, batch_size, drop_last) + + self.batch_size = batch_size + self.drop_last = drop_last + self.sampler = sampler + self.batch_sampler = batch_sampler + self.generator = generator + + if collate_fn is None: + if self._auto_collation: + collate_fn = _utils.collate.default_collate + else: + collate_fn = _utils.collate.default_convert + + self.collate_fn = collate_fn + self.persistent_workers = persistent_workers + + # set DataLoader's __initialized attribute. + self._DataLoader__initialized = True + self._IterableDataset_len_called = None # See NOTE [ IterableDataset and __len__ ] + + self._iterator = None + + self.check_worker_number_rationality() + + self.snapshot_every_n_steps = snapshot_every_n_steps + self.next_iter_state: Optional[Dict[str, Any]] = None + # When a state_dict is requested before __iter__ is called, + # we create the __iter__ so we can get a copy of the initial state from + # its workers. In those cases, we can avoid creating a new multiprocessing + # iterator on the next __iter__ call, and this flag is used for those cases. + self._initial_iter_for_state_dict = False + + torch.set_vital("Dataloader", "enabled", "True") # type: ignore[attr-defined] + + def _get_iterator(self) -> "_StatefulBaseDataLoaderIter": + it: _StatefulBaseDataLoaderIter + if self.num_workers == 0: + it = _StatefulSingleProcessDataLoaderIter(self, self.next_iter_state) + else: + self.check_worker_number_rationality() + it = _StatefulMultiProcessingDataLoaderIter(self, self.next_iter_state) + self.next_iter_state = None + return it + + def __iter__(self) -> "_BaseDataLoaderIter": + # When using a single worker the returned iterator should be + # created everytime to avoid resetting its state + # However, in the case of a multiple workers iterator + # the iterator is only created once in the lifetime of the + # DataLoader object so that workers can be reused + if self._initial_iter_for_state_dict: + self._initial_iter_for_state_dict = False + assert self._iterator is not None + elif self.persistent_workers and self.num_workers > 0: + if self._iterator is None: + self._iterator = self._get_iterator() + else: + self._iterator._reset(self) + else: + self._iterator = self._get_iterator() + if self._iterator._finished: + if self.persistent_workers: + self._iterator._reset(self) + else: + self._iterator = self._get_iterator() + + return self._iterator + + def state_dict(self) -> Dict[str, Any]: + if self._iterator is None: + self._iterator = self._get_iterator() + self._initial_iter_for_state_dict = True + return self._iterator.state_dict() + + def load_state_dict(self, state_dict: Dict[str, Any]) -> None: + self._iterator = None + self._initial_iter_for_state_dict = False + if state_dict == {}: + return + self.next_iter_state = state_dict + + +class _StatefulBaseDataLoaderIter(_BaseDataLoaderIter): + def __init__(self, loader: StatefulDataLoader) -> None: + super().__init__(loader) + self._sampler_iter_yielded = 0 + self._finished = False + + def _reset(self, loader, first_iter=False): + super()._reset(loader, first_iter) + self._sampler_iter_yielded = 0 + self._finished = False + + def _next_index(self): + idx = super()._next_index() # may raise StopIteration + self._sampler_iter_yielded += 1 + return idx + + def state_dict(self): + pass + + def __next__(self): + try: + return super().__next__() + except StopIteration: + self._finished = True + raise + + +class _StatefulSingleProcessDataLoaderIter(_StatefulBaseDataLoaderIter): + """We avoid using inheritance here to share code because we quickly run into + a diamond which becomes difficult to reason about, so instead we fork the + code from torch.utils.data.dataloader for _SingleProcessDataLoaderIter and + _MultiProcessDataLoaderIter. This allows us to satisfy the original + dataloader __iter__'s return type of _BaseDataLoaderIter (since + _StatefulBaseDataLoader inherits from _BaseDataLoaderIter). + """ + + _NUM_YIELDED = "_num_yielded" + + def __init__(self, loader, next_iter_state=None): + super().__init__(loader) + assert self._timeout == 0 + assert self._num_workers == 0 + + # Adds forward compatibilities so classic DataLoader can work with DataPipes: + # Taking care of distributed sharding + if isinstance(self._dataset, (IterDataPipe, MapDataPipe)): + # For BC, use default SHARDING_PRIORITIES + torch.utils.data.graph_settings.apply_sharding(self._dataset, self._world_size, self._rank) + + if next_iter_state is not None: + self.load_state_dict(next_iter_state) + else: + self._dataset_fetcher = _DatasetKind.create_fetcher( + self._dataset_kind, + self._dataset, + self._auto_collation, + self._collate_fn, + self._drop_last, + ) + + def _next_data(self): + index = self._next_index() # may raise StopIteration + data = self._dataset_fetcher.fetch(index) # may raise StopIteration + if self._pin_memory: + data = _utils.pin_memory.pin_memory(data, self._pin_memory_device) + return data + + def state_dict(self): + if self._dataset_kind == _DatasetKind.Iterable: + fetcher_state = { + _DATASET_ITER_STATE: try_to_serialize(self._dataset_fetcher.dataset_iter), + _FETCHER_ENDED: self._dataset_fetcher.ended, + } + dataset_state = None + if self._dataset_fetcher.dataset_iter is not self._dataset_fetcher.dataset: + dataset_state = try_to_serialize(self._dataset_fetcher.dataset) + else: + fetcher_state = None + dataset_state = try_to_serialize(self._dataset_fetcher.dataset) + + state_dict = { + _INDEX_SAMPLER_STATE: try_to_serialize(self._index_sampler), + _SAMPLER_ITER_STATE: try_to_serialize(self._sampler_iter), + _SAMPLER_ITER_YIELDED: self._sampler_iter_yielded, + self._NUM_YIELDED: self._num_yielded, + _ITERABLEDATASET_LEN_CALLED: self._IterableDataset_len_called, + _SHARED_SEED: self._shared_seed, + _FETCHER_STATE: fetcher_state, + _DATASET_STATE: dataset_state, + _ITERATOR_FINISHED: self._finished, + } + return state_dict + + def load_state_dict(self, state_dict): + assert ( + self._NUM_YIELDED in state_dict + ), f"State doesn't contain key '{self._NUM_YIELDED}' expected for single process dataloader" + self._sampler_iter_yielded = state_dict[_SAMPLER_ITER_YIELDED] + + # Try to restore from either _index_sampler state_dict or _sampler_iter state_dict + if isinstance(self._index_sampler, Stateful) or isinstance(self._sampler_iter, Stateful): + self._index_sampler = try_to_deserialize(self._index_sampler, state_dict[_INDEX_SAMPLER_STATE]) + self._sampler_iter = iter(self._index_sampler) + if state_dict[_SAMPLER_ITER_STATE] is not None: + self._sampler_iter = try_to_deserialize(self._sampler_iter, state_dict[_SAMPLER_ITER_STATE]) + else: + if not isinstance( + self._index_sampler, + torch.utils.data.dataloader._InfiniteConstantSampler, + ): + # Fallback to fastforward + self._sampler_iter = itertools.islice(self._index_sampler, self._sampler_iter_yielded, None) + self._num_yielded = state_dict[self._NUM_YIELDED] + self._IterableDataset_len_called = state_dict[_ITERABLEDATASET_LEN_CALLED] + self._shared_seed = state_dict[_SHARED_SEED] + + # Always restore in this order: + # 1. try to restore dataset state + # 2. generate dataset iterator + # 3. try to restore iterator state + if state_dict[_DATASET_STATE] is not None and isinstance(self._dataset, Stateful): + self._dataset = try_to_deserialize(self._dataset, state_dict[_DATASET_STATE]) + self._dataset_fetcher = _DatasetKind.create_fetcher( + self._dataset_kind, + self._dataset, + self._auto_collation, + self._collate_fn, + self._drop_last, + ) + if self._dataset_kind == _DatasetKind.Iterable: + # If either dataset or it's iter is stateful, we don't fast-forward + if isinstance(self._dataset, Stateful) or isinstance(self._dataset_fetcher.dataset_iter, Stateful): + if state_dict[_FETCHER_STATE] is not None: + if state_dict[_FETCHER_STATE][_DATASET_ITER_STATE] is not None: + self._dataset_fetcher.dataset_iter = try_to_deserialize( + self._dataset_fetcher.dataset_iter, + state_dict[_FETCHER_STATE][_DATASET_ITER_STATE], + ) + self._dataset_fetcher.ended = state_dict[_FETCHER_STATE][_FETCHER_ENDED] + else: + # No state, just try to fastforward + if self._num_yielded > 0: + logger.warning( + f"Neither dataset nor iter(dataset) defines state_dict/load_state_dict so we are " + f"naively fast-forwarding your dataset by {self._num_yielded} steps. For more efficient " + f"resumes, please implement `state_dict` and `load_state_dict` in your IterableDataset and/or iterator." + ) + for _ in range(self._num_yielded): + next(self) + self._finished = state_dict[_ITERATOR_FINISHED] + + +class _StatefulMultiProcessingDataLoaderIter(_StatefulBaseDataLoaderIter): + r"""Iterates once over the DataLoader's dataset, as specified by the sampler.""" + + # NOTE [ Data Loader Multiprocessing Shutdown Logic ] + # + # Preliminary: + # + # Our data model looks like this (queues are indicated with curly brackets): + # + # main process || + # | || + # {index_queue} || + # | || + # worker processes || DATA + # | || + # {worker_result_queue} || FLOW + # | || + # pin_memory_thread of main process || DIRECTION + # | || + # {data_queue} || + # | || + # data output \/ + # + # P.S. `worker_result_queue` and `pin_memory_thread` part may be omitted if + # `pin_memory=False`. + # + # + # Terminating multiprocessing logic requires very careful design. In + # particular, we need to make sure that + # + # 1. The iterator gracefully exits the workers when its last reference is + # gone or it is depleted. + # + # In this case, the workers should be gracefully exited because the + # main process may still need to continue to run, and we want cleaning + # up code in the workers to be executed (e.g., releasing GPU memory). + # Naturally, we implement the shutdown logic in `__del__` of + # DataLoaderIterator. + # + # We delay the discussion on the logic in this case until later. + # + # 2. The iterator exits the workers when the loader process and/or worker + # processes exits normally or with error. + # + # We set all workers and `pin_memory_thread` to have `daemon=True`. + # + # You may ask, why can't we make the workers non-daemonic, and + # gracefully exit using the same logic as we have in `__del__` when the + # iterator gets deleted (see 1 above)? + # + # First of all, `__del__` is **not** guaranteed to be called when + # interpreter exits. Even if it is called, by the time it executes, + # many Python core library resources may already be freed, and even + # simple things like acquiring an internal lock of a queue may hang. + # Therefore, in this case, we actually need to prevent `__del__` from + # being executed, and rely on the automatic termination of daemonic + # children. + # + # Thus, we register an `atexit` hook that sets a global flag + # `_utils.python_exit_status`. Since `atexit` hooks are executed in the + # reverse order of registration, we are guaranteed that this flag is + # set before library resources we use are freed (which, at least in + # CPython, is done via an `atexit` handler defined in + # `multiprocessing/util.py` + # https://github.com/python/cpython/blob/c606624af8d4cb3b4a052fb263bb983b3f87585b/Lib/multiprocessing/util.py#L320-L362 + # registered when an object requiring this mechanism is first + # created, e.g., `mp.Queue` + # https://github.com/python/cpython/blob/c606624af8d4cb3b4a052fb263bb983b3f87585b/Lib/multiprocessing/context.py#L100-L103 + # https://github.com/python/cpython/blob/c606624af8d4cb3b4a052fb263bb983b3f87585b/Lib/multiprocessing/queues.py#L29 + # ) + # + # So in `__del__`, we check if `_utils.python_exit_status` is set or + # `None` (freed), and perform no-op if so. + # + # However, simply letting library clean-up codes run can also be bad, + # because such codes (i.e., `multiprocessing.util._exit_function()`) + # include join putting threads for `mp.Queue`, which can be blocking. + # Hence, the main process putting threads are called with + # `cancel_join_thread` at creation. See later section + # [ 3b. A process won't hang when putting into a queue; ] + # for more details. + # + # Here are two example cases where library clean-up codes can run + # before `__del__` is called: + # + # 1. If we hold onto a reference to the iterator, it more often + # than not tries to do `multiprocessing` library cleaning before + # clearing the alive referenced objects (https://github.com/pytorch/pytorch/issues/48666) + # and thus prevents our cleaning-up code to run first. + # + # 2. A similar issue araises when a `DataLoader` is used in a subprocess. + # When a process ends, it shuts the all its daemonic children + # down with a SIGTERM (instead of joining them without a timeout). + # Simiarly for threads, but by a different mechanism. This fact, + # together with a few implementation details of multiprocessing, forces + # us to make workers daemonic. All of our problems arise when a + # DataLoader is used in a subprocess, and are caused by multiprocessing + # code which looks more or less like this: + # + # try: + # your_function_using_a_dataloader() + # finally: + # multiprocessing.util._exit_function() + # + # The joining/termination mentioned above happens inside + # `_exit_function()`. Now, if `your_function_using_a_dataloader()` + # throws, the stack trace stored in the exception will prevent the + # frame which uses `DataLoaderIter` to be freed. If the frame has any + # reference to the `DataLoaderIter` (e.g., in a method of the iter), + # its `__del__`, which starts the shutdown procedure, will not be + # called. That, in turn, means that workers aren't notified. Attempting + # to join in `_exit_function` will then result in a hang. + # + # For context, `_exit_function` is also registered as an `atexit` call. + # So it is unclear to me (@ssnl) why this is needed in a finally block. + # The code dates back to 2008 and there is no comment on the original + # PEP 371 or patch https://bugs.python.org/issue3050 (containing both + # the finally block and the `atexit` registration) that explains this. + # + # + # Finally, another choice is to just shutdown workers with logic in 1 + # above whenever we see an error in `next`. This isn't ideal because + # a. It prevents users from using try-catch to resume data loading. + # b. It doesn't prevent hanging if users have references to the + # iterator. + # + # 3. All processes exit if any of them die unexpectedly by fatal signals. + # + # As shown above, the workers are set as daemonic children of the main + # process. However, automatic cleaning-up of such child processes only + # happens if the parent process exits gracefully (e.g., not via fatal + # signals like SIGKILL). So we must ensure that each process will exit + # even the process that should send/receive data to/from it were + # killed, i.e., + # + # a. A process won't hang when getting from a queue. + # + # Even with carefully designed data dependencies (i.e., a `put()` + # always corresponding to a `get()`), hanging on `get()` can still + # happen when data in queue is corrupted (e.g., due to + # `cancel_join_thread` or unexpected exit). + # + # For child exit, we set a timeout whenever we try to get data + # from `data_queue`, and check the workers' status on each timeout + # and error. + # See `_DataLoaderiter._get_batch()` and + # `_DataLoaderiter._try_get_data()` for details. + # + # Additionally, for child exit on non-Windows platforms, we also + # register a SIGCHLD handler (which is supported on Windows) on + # the main process, which checks if any of the workers fail in the + # (Python) handler. This is more efficient and faster in detecting + # worker failures, compared to only using the above mechanism. + # See `DataLoader.cpp` and `_utils/signal_handling.py` for details. + # + # For `.get()` calls where the sender(s) is not the workers, we + # guard them with timeouts, and check the status of the sender + # when timeout happens: + # + in the workers, the `_utils.worker.ManagerWatchdog` class + # checks the status of the main process. + # + if `pin_memory=True`, when getting from `pin_memory_thread`, + # check `pin_memory_thread` status periodically until `.get()` + # returns or see that `pin_memory_thread` died. + # + # b. A process won't hang when putting into a queue; + # + # We use `mp.Queue` which has a separate background thread to put + # objects from an unbounded buffer array. The background thread is + # daemonic and usually automatically joined when the process + # *exits*. + # + # In case that the receiver has ended abruptly while + # reading from the pipe, the join will hang forever. The usual + # solution for this in Python is calling `q.cancel_join_thread`, + # which prevents automatically joining it when finalizing + # (exiting). + # + # Nonetheless, `cancel_join_thread` must only be called when the + # queue is **not** going to be read from or write into by another + # process, because it may hold onto a lock or leave corrupted data + # in the queue, leading other readers/writers to hang. + # + # Hence, + # + For worker processes, we only do so (for their output + # queues, i.e., `worker_result_queue`) before exiting. + # + For `pin_memory_thread`, its output queue `data_queue` is a + # `queue.Queue` that does blocking `put` if the queue is full. + # So there is no above problem, but as a result, in + # `_pin_memory_loop`, we do need to wrap the `put` in a loop + # that breaks not only upon success, but also when the main + # process stops reading, i.e., is shutting down. + # + For loader process, we `cancel_join_thread()` for all + # `_index_queues` because the whole purpose of workers and + # `pin_memory_thread` is to serve the loader process. If + # loader process is already exiting, we don't really care if + # the queues are corrupted. + # + # + # Now let's get back to 1: + # how we gracefully exit the workers when the last reference to the + # iterator is gone. + # + # To achieve this, we implement the following logic along with the design + # choices mentioned above: + # + # `workers_done_event`: + # A `multiprocessing.Event` shared among the main process and all worker + # processes. This is used to signal the workers that the iterator is + # shutting down. After it is set, they will not send processed data to + # queues anymore, and only wait for the final `None` before exiting. + # `done_event` isn't strictly needed. I.e., we can just check for `None` + # from the input queue, but it allows us to skip wasting resources + # processing data if we are already shutting down. + # + # `pin_memory_thread_done_event`: + # A `threading.Event` for a similar purpose to that of + # `workers_done_event`, but is for the `pin_memory_thread`. The reason + # that separate events are needed is that `pin_memory_thread` reads from + # the output queue of the workers. But the workers, upon seeing that + # `workers_done_event` is set, only wants to see the final `None`, and is + # not required to flush all data in the output queue (e.g., it may call + # `cancel_join_thread` on that queue if its `IterableDataset` iterator + # happens to exhaust coincidentally, which is out of the control of the + # main process). Thus, since we will exit `pin_memory_thread` before the + # workers (see below), two separete events are used. + # + # NOTE: In short, the protocol is that the main process will set these + # `done_event`s and then the corresponding processes/threads a `None`, + # and that they may exit at any time after receiving the `None`. + # + # NOTE: Using `None` as the final signal is valid, since normal data will + # always be a 2-tuple with the 1st element being the index of the data + # transferred (different from dataset index/key), and the 2nd being + # either the dataset key or the data sample (depending on which part + # of the data model the queue is at). + # + # [ worker processes ] + # While loader process is alive: + # Get from `index_queue`. + # If get anything else, + # Check `workers_done_event`. + # If set, continue to next iteration + # i.e., keep getting until see the `None`, then exit. + # Otherwise, process data: + # If is fetching from an `IterableDataset` and the iterator + # is exhausted, send an `_IterableDatasetStopIteration` + # object to signal iteration end. The main process, upon + # receiving such an object, will send `None` to this + # worker and not use the corresponding `index_queue` + # anymore. + # If timed out, + # No matter `workers_done_event` is set (still need to see `None`) + # or not, must continue to next iteration. + # (outside loop) + # If `workers_done_event` is set, (this can be False with `IterableDataset`) + # `data_queue.cancel_join_thread()`. (Everything is ending here: + # main process won't read from it; + # other workers will also call + # `cancel_join_thread`.) + # + # [ pin_memory_thread ] + # # No need to check main thread. If this thread is alive, the main loader + # # thread must be alive, because this thread is set as daemonic. + # While `pin_memory_thread_done_event` is not set: + # Get from `worker_result_queue`. + # If timed out, continue to get in the next iteration. + # Otherwise, process data. + # While `pin_memory_thread_done_event` is not set: + # Put processed data to `data_queue` (a `queue.Queue` with blocking put) + # If timed out, continue to put in the next iteration. + # Otherwise, break, i.e., continuing to the out loop. + # + # NOTE: we don't check the status of the main thread because + # 1. if the process is killed by fatal signal, `pin_memory_thread` + # ends. + # 2. in other cases, either the cleaning-up in __del__ or the + # automatic exit of daemonic thread will take care of it. + # This won't busy-wait either because `.get(timeout)` does not + # busy-wait. + # + # [ main process ] + # In the DataLoader Iter's `__del__` + # b. Exit `pin_memory_thread` + # i. Set `pin_memory_thread_done_event`. + # ii Put `None` in `worker_result_queue`. + # iii. Join the `pin_memory_thread`. + # iv. `worker_result_queue.cancel_join_thread()`. + # + # c. Exit the workers. + # i. Set `workers_done_event`. + # ii. Put `None` in each worker's `index_queue`. + # iii. Join the workers. + # iv. Call `.cancel_join_thread()` on each worker's `index_queue`. + # + # NOTE: (c) is better placed after (b) because it may leave corrupted + # data in `worker_result_queue`, which `pin_memory_thread` + # reads from, in which case the `pin_memory_thread` can only + # happen at timing out, which is slow. Nonetheless, same thing + # happens if a worker is killed by signal at unfortunate times, + # but in other cases, we are better off having a non-corrupted + # `worker_result_queue` for `pin_memory_thread`. + # + # NOTE: If `pin_memory=False`, there is no `pin_memory_thread` and (b) + # can be omitted + # + # NB: `done_event`s isn't strictly needed. E.g., we can just check for + # `None` from `index_queue`, but it allows us to skip wasting resources + # processing indices already in `index_queue` if we are already shutting + # down. + + _last_yielded_worker_id: int + _NUM_WORKERS = "_num_workers" + _SNAPSHOT = "_snapshot" + _MAIN_SNAPSHOT = "_main_snapshot" + _WORKER_SNAPSHOTS = "_worker_snapshots" + _SNAPSHOT_STEP = "_snapshot_step" + _STEPS_SINCE_SNAPSHOT = "_steps_since_snapshot" + _LAST_YIELDED_WORKER_ID = "_last_yielded_worker_id" + _BASE_SEED = "_base_seed" + + def __init__(self, loader, next_iter_state): + super().__init__(loader) + self._snapshot_interval = loader.snapshot_every_n_steps + self._prefetch_factor = loader.prefetch_factor + self._in_order = loader.in_order + + assert self._num_workers > 0 + assert self._prefetch_factor > 0 + + if loader.multiprocessing_context is None: + multiprocessing_context = multiprocessing + else: + multiprocessing_context = loader.multiprocessing_context + + self._worker_init_fn = loader.worker_init_fn + + # Adds forward compatibilities so classic DataLoader can work with DataPipes: + # Additional worker init function will take care of sharding in MP and Distributed + if isinstance(self._dataset, (IterDataPipe, MapDataPipe)): + self._worker_init_fn = functools.partial( + _sharding_worker_init_fn, + self._worker_init_fn, + self._world_size, + self._rank, + ) + + # No certainty which module multiprocessing_context is + self._worker_result_queue = multiprocessing_context.Queue() # type: ignore[var-annotated] + self._worker_pids_set = False + self._shutdown = False + self._workers_done_event = multiprocessing_context.Event() + + self._index_queues = [] + self._workers = [] + + worker_states = {self._worker_key(i): None for i in range(self._num_workers)} + if next_iter_state is not None: + assert ( + self._SNAPSHOT in next_iter_state + ), f"State doesn't contain key '{self._SNAPSHOT}' expected for multiprocess dataloader" + wstates = next_iter_state[self._SNAPSHOT].get(self._WORKER_SNAPSHOTS, {}) + assert set(map(self._worker_key, range(len(wstates)))) == set(wstates.keys()), ( + len(wstates), + wstates.keys(), + ) + for worker_key, sd in wstates.items(): + worker_states[worker_key] = sd + self._base_seed = next_iter_state[self._SNAPSHOT][self._MAIN_SNAPSHOT].get(self._BASE_SEED, self._base_seed) + self._shared_seed = next_iter_state[self._SNAPSHOT][self._MAIN_SNAPSHOT].get( + _SHARED_SEED, self._shared_seed + ) + + for i in range(self._num_workers): + # No certainty which module multiprocessing_context is + index_queue = multiprocessing_context.Queue() # type: ignore[var-annotated] + # Need to `cancel_join_thread` here! + # See sections (2) and (3b) above. + index_queue.cancel_join_thread() + + w = multiprocessing_context.Process( + target=_worker_loop, + args=( + self._dataset_kind, + self._dataset, + index_queue, + self._worker_result_queue, + self._workers_done_event, + self._auto_collation, + self._collate_fn, + self._drop_last, + self._base_seed, + self._worker_init_fn, + i, + self._num_workers, + self._persistent_workers, + self._shared_seed, + worker_states[self._worker_key(i)], + ), + ) + w.daemon = True + # NB: Process.start() actually take some time as it needs to + # start a process and pass the arguments over via a pipe. + # Therefore, we only add a worker to self._workers list after + # it started, so that we do not call .join() if program dies + # before it starts, and __del__ tries to join but will get: + # AssertionError: can only join a started process. + w.start() + self._index_queues.append(index_queue) + self._workers.append(w) + + if self._pin_memory: + self._pin_memory_thread_done_event = threading.Event() + + # Queue is not type-annotated + self._data_queue = queue.Queue() # type: ignore[var-annotated] + if self._pin_memory_device == "xpu": + current_device = torch.xpu.current_device() # type: ignore[attr-defined] + elif self._pin_memory_device == torch._C._get_privateuse1_backend_name(): + custom_device_mod = getattr(torch, torch._C._get_privateuse1_backend_name()) + current_device = custom_device_mod.current_device() + else: + current_device = torch.cuda.current_device() # choose cuda for default + pin_memory_thread = threading.Thread( + target=_utils.pin_memory._pin_memory_loop, + args=( + self._worker_result_queue, + self._data_queue, + current_device, + self._pin_memory_thread_done_event, + self._pin_memory_device, + ), + ) + pin_memory_thread.daemon = True + pin_memory_thread.start() + # Similar to workers (see comment above), we only register + # pin_memory_thread once it is started. + self._pin_memory_thread = pin_memory_thread + else: + self._data_queue = self._worker_result_queue # type: ignore[assignment] + + # In some rare cases, persistent workers (daemonic processes) + # would be terminated before `__del__` of iterator is invoked + # when main process exits + # It would cause failure when pin_memory_thread tries to read + # corrupted data from worker_result_queue + # atexit is used to shutdown thread and child processes in the + # right sequence before main process exits + if self._persistent_workers and self._pin_memory: + import atexit + + for w in self._workers: + atexit.register(_StatefulMultiProcessingDataLoaderIter._clean_up_worker, w) + + # .pid can be None only before process is spawned (not the case, so ignore) + _utils.signal_handling._set_worker_pids(id(self), tuple(w.pid for w in self._workers)) # type: ignore[misc] + _utils.signal_handling._set_SIGCHLD_handler() + self._worker_pids_set = True + self._snapshot, self._main_snapshots = {}, collections.deque() # type: ignore[var-annotated] + # NOTE [ Incremental Worker State ] + # We only send deltas between incremental worker state to the main process. We synchronize + # the initial states on worker startup, when it sends an _AckStartup signal back with the initial + # worker states, and if persistent_workers is True, then the worker sends back an initial + # state after acking the _ResumeIteration signal. + # + # We need to send initial worker state back to the main process to handle state_dict() requests + # before n >= num_workers steps are taken. + # self._worker_snapshots: Dict[str, _IncrementalWorkerState] = {} + self._worker_snapshots = {key: _IncrementalWorkerState(state) for key, state in worker_states.items()} + self._reset(loader, first_iter=True, prime_prefetch=next_iter_state is None) + + # Try to restore main state + if next_iter_state is not None: + self._restore_main_state(next_iter_state[self._SNAPSHOT][self._MAIN_SNAPSHOT]) + self._num_yielded = next_iter_state[self._SNAPSHOT][self._SNAPSHOT_STEP] + + self._update_snapshot( + snapshot_step=next_iter_state[self._SNAPSHOT][self._SNAPSHOT_STEP], + last_yielded_worker_id=next_iter_state[self._SNAPSHOT][self._LAST_YIELDED_WORKER_ID], + num_workers=self._num_workers, + main_snapshot=next_iter_state[self._SNAPSHOT][self._MAIN_SNAPSHOT], + worker_snapshots=self._worker_snapshots, + ) + + fast_forward = False + if self._dataset_kind == _DatasetKind.Iterable: + for state in worker_states.values(): + if state is None: + continue + if state[_DATASET_STATE] is None and state[_FETCHER_STATE][_DATASET_ITER_STATE] is None: + fast_forward = True + break + + if fast_forward: + # If neither dataset / dataset iter are stateful, we will fast-forward + for _ in range(self._prefetch_factor * self._num_workers): + self._try_put_index() + if self._num_yielded > 0: + logger.warning( + f"Neither dataset nor iter(dataset) defines state_dict/load_state_dict so we are " + f"naively fast-forwarding your dataset by {self._num_yielded} steps. For more efficient " + f"resumes, please implement `state_dict` and `load_state_dict` in your IterableDataset and/or iterator." + ) + for _ in range(self._num_yielded): + next(self) + # Check if last_yielded_worker_id matches + if self._last_yielded_worker_id != next_iter_state[self._SNAPSHOT][self._LAST_YIELDED_WORKER_ID]: + raise ValueError("last_yielded_worker_id does not match, the dataset may have changed") + else: + self._last_yielded_worker_id = next_iter_state[self._SNAPSHOT][self._LAST_YIELDED_WORKER_ID] + for _ in range(self._last_yielded_worker_id + 1): + next(self._worker_queue_idx_cycle) + for _ in range(self._prefetch_factor * self._num_workers): + self._try_put_index() + + for _ in range(next_iter_state[self._STEPS_SINCE_SNAPSHOT]): + next(self) + self._finished = next_iter_state[_ITERATOR_FINISHED] + + def _reset(self, loader, first_iter=False, prime_prefetch=True): + super()._reset(loader, first_iter) + self._send_idx = 0 # idx of the next task to be sent to workers + self._rcvd_idx = 0 # idx of the next task to be returned in __next__ + # information about data not yet yielded, i.e., tasks w/ indices in range [rcvd_idx, send_idx). + # map: task idx => - (worker_id,) if data isn't fetched (outstanding) + # \ (worker_id, data) if data is already fetched (out-of-order) + self._task_info = {} + self._tasks_outstanding = 0 # always equal to count(v for v in task_info.values() if len(v) == 1) + # A list of booleans representing whether each worker still has work to + # do, i.e., not having exhausted its iterable dataset object. It always + # contains all `True`s if not using an iterable-style dataset + # (i.e., if kind != Iterable). + # Not that this indicates that a worker still has work to do *for this epoch*. + # It does not mean that a worker is dead. In case of `_persistent_workers`, + # the worker will be reset to available in the next epoch. + self._workers_status = [True for i in range(self._num_workers)] + # A list of integers representing how many tasks are outstanding for each worker + # Incremented when a task is dispatched to the worker + # Decremented when that data has been given to the main thread + # Each worker should have at most self._prefetch_factor tasks outstanding + self._workers_num_tasks = [0 for i in range(self._num_workers)] + # Reset the worker queue cycle so it resumes next epoch at worker 0 + self._worker_queue_idx_cycle = itertools.cycle(range(self._num_workers)) + remaining = self._num_workers + if first_iter: + # Request the initial state_dict + for i in range(self._num_workers): + self._index_queues[i].put(_AckStartup(i, None)) # type: ignore[arg-type] + + while remaining > 0: + _, data = self._get_data() + if not all(self._workers_status): + raise ValueError(f"A worker has failed during startup! {self._workers_status}") + elif isinstance(data, _AckStartup): + if isinstance(data.initial_state, ExceptionWrapper): + data.initial_state.reraise() + + if data.is_delta: + self._worker_snapshots[self._worker_key(data.worker_id)].apply_delta(data.initial_state) # type: ignore[arg-type] + else: + self._worker_snapshots[self._worker_key(data.worker_id)] = _IncrementalWorkerState( + data.initial_state # type: ignore[arg-type] + ) + remaining -= 1 + else: + raise ValueError(f"Invalid response from worker after startup: {data}") + else: + # We resume the prefetching in case it was enabled + for idx in range(self._num_workers): + self._index_queues[idx].put(_utils.worker._ResumeIteration(self._shared_seed)) + resume_iteration_cnt = self._num_workers + while resume_iteration_cnt > 0: + return_idx, data = self._get_data() + if not all(self._workers_status): + raise ValueError(f"A worker has failed during Resume! {self._workers_status}") + if isinstance(return_idx, _utils.worker._ResumeIteration): + assert isinstance(data, _AckStartup), (return_idx, data) + if isinstance(data.initial_state, ExceptionWrapper): + data.initial_state.reraise() + assert data.initial_state is not None, data + self._worker_snapshots[self._worker_key(data.worker_id)] = _IncrementalWorkerState( + data.initial_state # type: ignore[arg-type] + ) + resume_iteration_cnt -= 1 + + # Reset state variables + self._main_snapshots = collections.deque() + self._last_yielded_worker_id = self._num_workers - 1 + self._update_snapshot( + snapshot_step=0, + last_yielded_worker_id=self._num_workers - 1, + num_workers=self._num_workers, + main_snapshot=self._get_main_state(), + worker_snapshots=self._worker_snapshots, + ) + + if prime_prefetch: + # prime the prefetch loop + for _ in range(self._prefetch_factor * self._num_workers): + self._try_put_index() + + def _update_worker_snapshot(self, worker_key, state_dict): + if state_dict is None: + return + self._worker_snapshots[worker_key].apply_delta(state_dict) + + def state_dict(self): + if not self._in_order: + # TODO: remove warning log when state management is supported with in_order=False + logger.warning( + "using in_order=False with multiple workers does not give any guarantees for state management " + "and loading from a checkpoint may not work as expected." + ) + steps_since_snapshot = self._num_yielded - self._snapshot[self._SNAPSHOT_STEP] + state_dict = { + self._SNAPSHOT: self._snapshot, + self._STEPS_SINCE_SNAPSHOT: steps_since_snapshot, + _ITERATOR_FINISHED: self._finished, + } + + return state_dict + + def _try_get_data(self, timeout=_utils.MP_STATUS_CHECK_INTERVAL): + # Tries to fetch data from `self._data_queue` once for a given timeout. + # This can also be used as inner loop of fetching without timeout, with + # the sender status as the loop condition. + # + # This raises a `RuntimeError` if any worker died expectedly. This error + # can come from either the SIGCHLD handler in `_utils/signal_handling.py` + # (only for non-Windows platforms), or the manual check below on errors + # and timeouts. + # + # Returns a 2-tuple: + # (bool: whether successfully get data, any: data if successful else None) + try: + data = self._data_queue.get(timeout=timeout) + return (True, data) + except Exception as e: + # At timeout and error, we manually check whether any worker has + # failed. Note that this is the only mechanism for Windows to detect + # worker failures. + failed_workers = [] + for worker_id, w in enumerate(self._workers): + if self._workers_status[worker_id] and not w.is_alive(): + failed_workers.append(w) + self._mark_worker_as_unavailable(worker_id) + if len(failed_workers) > 0: + pids_str = ", ".join(str(w.pid) for w in failed_workers) + raise RuntimeError(f"DataLoader worker (pid(s) {pids_str}) exited unexpectedly") from e + if isinstance(e, queue.Empty): + return (False, None) + import errno + import tempfile + + try: + # Raise an exception if we are this close to the FDs limit. + # Apparently, trying to open only one file is not a sufficient + # test. + # See NOTE [ DataLoader on Linux and open files limit ] + fds_limit_margin = 10 + fs = [tempfile.NamedTemporaryFile() for i in range(fds_limit_margin)] # noqa(F841) + except OSError as e: + if e.errno == errno.EMFILE: + raise RuntimeError( + "Too many open files. Communication with the" + " workers is no longer possible. Please increase the" + " limit using `ulimit -n` in the shell or change the" + " sharing strategy by calling" + " `torch.multiprocessing.set_sharing_strategy('file_system')`" + " at the beginning of your code" + ) from None + raise + + # NOTE [ DataLoader on Linux and open files limit ] + # + # On Linux when DataLoader is used with multiprocessing we pass the data between + # the root process and the workers through SHM files. We remove those files from + # the filesystem as soon as they are created and keep them alive by + # passing around their file descriptors through AF_UNIX sockets. (See + # docs/source/multiprocessing.rst and 'Multiprocessing Technical Notes` in + # the wiki (https://github.com/pytorch/pytorch/wiki).) + # + # This sometimes leads us to exceeding the open files limit. When that happens, + # and the offending file descriptor is coming over a socket, the `socket` Python + # package silently strips the file descriptor from the message, setting only the + # `MSG_CTRUNC` flag (which might be a bit misleading since the manpage says that + # it _indicates that some control data were discarded due to lack of space in + # the buffer for ancillary data_). This might reflect the C implementation of + # AF_UNIX sockets. + # + # This behaviour can be reproduced with the script and instructions at the + # bottom of this note. + # + # When that happens, the standard Python `multiprocessing` (and not + # `torch.multiprocessing`) raises a `RuntimeError: received 0 items of ancdata` + # + # Sometimes, instead of the FD being stripped, you may get an `OSError: + # Too many open files`, both in the script below and in DataLoader. However, + # this is rare and seems to be nondeterministic. + # + # + # #!/usr/bin/env python3 + # import sys + # import socket + # import os + # import array + # import shutil + # import socket + # + # + # if len(sys.argv) != 4: + # print("Usage: ", sys.argv[0], " tmp_dirname iteration (send|recv)") + # sys.exit(1) + # + # if __name__ == '__main__': + # dirname = sys.argv[1] + # sock_path = dirname + "/sock" + # iterations = int(sys.argv[2]) + # def dummy_path(i): + # return dirname + "/" + str(i) + ".dummy" + # + # + # if sys.argv[3] == 'send': + # while not os.path.exists(sock_path): + # pass + # client = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM) + # client.connect(sock_path) + # for i in range(iterations): + # fd = os.open(dummy_path(i), os.O_WRONLY | os.O_CREAT) + # ancdata = array.array('i', [fd]) + # msg = bytes([i % 256]) + # print("Sending fd ", fd, " (iteration #", i, ")") + # client.sendmsg([msg], [(socket.SOL_SOCKET, socket.SCM_RIGHTS, ancdata)]) + # + # + # else: + # assert sys.argv[3] == 'recv' + # + # if os.path.exists(dirname): + # raise Exception("Directory exists") + # + # os.mkdir(dirname) + # + # print("Opening socket...") + # server = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM) + # server.bind(sock_path) + # + # print("Listening...") + # for i in range(iterations): + # a = array.array('i') + # msg, ancdata, flags, addr = server.recvmsg(1, socket.CMSG_SPACE(a.itemsize)) + # assert(len(ancdata) == 1) + # cmsg_level, cmsg_type, cmsg_data = ancdata[0] + # a.frombytes(cmsg_data) + # print("Received fd ", a[0], " (iteration #", i, ")") + # + # shutil.rmtree(dirname) + # + # Steps to reproduce: + # + # 1. Run two shells and set lower file descriptor limit in the receiving one: + # (shell1) ulimit -n 1020 + # (shell2) ulimit -n 1022 + # + # 2. Run the script above with the `recv` option in the first shell + # (shell1) ./test_socket.py sock_tmp 1017 recv + # + # 3. Run the script with the `send` option in the second shell: + # (shell2) ./test_socket.py sock_tmp 1017 send + + def _get_data(self): + # Fetches data from `self._data_queue`. + # + # We check workers' status every `MP_STATUS_CHECK_INTERVAL` seconds, + # which we achieve by running `self._try_get_data(timeout=MP_STATUS_CHECK_INTERVAL)` + # in a loop. This is the only mechanism to detect worker failures for + # Windows. For other platforms, a SIGCHLD handler is also used for + # worker failure detection. + # + # If `pin_memory=True`, we also need check if `pin_memory_thread` had + # died at timeouts. + if self._timeout > 0: + success, data = self._try_get_data(self._timeout) + if success: + return data + else: + raise RuntimeError(f"DataLoader timed out after {self._timeout} seconds") + elif self._pin_memory: + while self._pin_memory_thread.is_alive(): + success, data = self._try_get_data() + if success: + return data + else: + # while condition is false, i.e., pin_memory_thread died. + raise RuntimeError("Pin memory thread exited unexpectedly") + # In this case, `self._data_queue` is a `queue.Queue`,. But we don't + # need to call `.task_done()` because we don't use `.join()`. + else: + while True: + success, data = self._try_get_data() + if success: + return data + + def _worker_key(self, worker_id: int) -> str: + return f"worker_{worker_id}" + + def _next_data(self): + while True: + # If the worker responsible for `self._rcvd_idx` has already ended + # and was unable to fulfill this task (due to exhausting an `IterableDataset`), + # we try to advance `self._rcvd_idx` to find the next valid index. + # + # This part needs to run in the loop because both the `self._get_data()` + # call and `_IterableDatasetStopIteration` check below can mark + # extra worker(s) as dead. + while self._rcvd_idx < self._send_idx: + info = self._task_info.get(self._rcvd_idx, None) + if info: + worker_id = info[0] + if len(info) == 2 or self._workers_status[worker_id]: # has data or is still active + break + del self._task_info[self._rcvd_idx] + self._rcvd_idx += 1 + else: + # no valid `self._rcvd_idx` is found (i.e., didn't break) + if not self._persistent_workers: + self._shutdown_workers() + raise StopIteration + + # Now `self._rcvd_idx` is the batch index we want to fetch + + # Check if the next sample has already been generated + if len(self._task_info[self._rcvd_idx]) == 2: + data, worker_id, state_dict = self._task_info.pop(self._rcvd_idx)[1] + if isinstance(data, _utils.worker._IterableDatasetStopIteration): + self._update_worker_snapshot(self._worker_key(data.worker_id), state_dict) + self._rcvd_idx += 1 + continue + else: + self._rcvd_idx += 1 + return self._process_data(data, worker_id, state_dict) + + assert not self._shutdown and self._tasks_outstanding > 0 + idx, (data, worker_id, state_dict) = self._get_data() + self._tasks_outstanding -= 1 + if self._dataset_kind == _DatasetKind.Iterable: + # Check for _IterableDatasetStopIteration + if isinstance(data, _utils.worker._IterableDatasetStopIteration): + if self._persistent_workers: + self._workers_status[data.worker_id] = False + else: + self._mark_worker_as_unavailable(data.worker_id) + assert state_dict is not None, "StopIteration should always be accompanied by a state_dict" + self._try_put_index() + # We want to process states until we get to that position + # in the worker cycle, therefore if out-of-order we want + # to store the StopIteration and process it later + + if idx != self._rcvd_idx: + # store out-of-order samples + if not self._in_order: + # don't store it for later, process now + if isinstance(data, _utils.worker._IterableDatasetStopIteration): + self._update_worker_snapshot(self._worker_key(data.worker_id), state_dict) + continue + del self._task_info[idx] + return self._process_data(data, worker_id, state_dict) + self._task_info[idx] += ((data, worker_id, state_dict),) + else: + del self._task_info[idx] + if isinstance(data, _utils.worker._IterableDatasetStopIteration): + self._update_worker_snapshot(self._worker_key(data.worker_id), state_dict) + self._rcvd_idx += 1 + continue + else: + self._rcvd_idx += 1 + return self._process_data(data, worker_id, state_dict) + + def _get_main_state(self): + return { + self._NUM_WORKERS: self._num_workers, + _SAMPLER_ITER_STATE: try_to_serialize(self._sampler_iter), + _INDEX_SAMPLER_STATE: try_to_serialize(self._index_sampler), + _SAMPLER_ITER_YIELDED: self._sampler_iter_yielded, + _ITERABLEDATASET_LEN_CALLED: self._IterableDataset_len_called, + _SHARED_SEED: self._shared_seed, + self._BASE_SEED: self._base_seed, + } + + def _restore_main_state(self, state_dict): + assert self._num_workers == state_dict[self._NUM_WORKERS] + # Try to restore from either _index_sampler state_dict or _sampler_iter state_dict + self._sampler_iter_yielded = state_dict[_SAMPLER_ITER_YIELDED] + if isinstance(self._index_sampler, Stateful) or isinstance(self._sampler_iter, Stateful): + self._index_sampler = try_to_deserialize(self._index_sampler, state_dict[_INDEX_SAMPLER_STATE]) + self._sampler_iter = iter(self._index_sampler) + if state_dict[_SAMPLER_ITER_STATE] is not None: + self._sampler_iter = try_to_deserialize(self._sampler_iter, state_dict[_SAMPLER_ITER_STATE]) + else: + if not isinstance( + self._index_sampler, + torch.utils.data.dataloader._InfiniteConstantSampler, + ): + # Fallback to fastforward + self._sampler_iter = itertools.islice(self._index_sampler, self._sampler_iter_yielded, None) + self._IterableDataset_len_called = state_dict[_ITERABLEDATASET_LEN_CALLED] + self._shared_seed = state_dict[_SHARED_SEED] + self._base_seed = state_dict[self._BASE_SEED] + + def _try_put_index(self): + max_tasks = self._prefetch_factor * self._num_workers + assert self._tasks_outstanding < max_tasks + + try: + index = self._next_index() + snapshot_main = False + snapshot = False + if not self._snapshot_interval: + pass + elif self._dataset_kind == _DatasetKind.Iterable: + x = self._num_yielded % self._snapshot_interval + hi = x + 1 + self._num_workers * self._prefetch_factor + if hi >= self._snapshot_interval: + snapshot_main = True + if hi + self._num_workers >= self._snapshot_interval: + snapshot = True + else: + if self._sampler_iter_yielded % self._snapshot_interval == 0: + # Snapshot sampler + snapshot_main = True + if ( + (self._sampler_iter_yielded - 1) % self._snapshot_interval + ) + self._num_workers >= self._snapshot_interval: + snapshot = True + except StopIteration: + return + for _ in range(self._num_workers): # find the next active worker, if any + worker_queue_idx = next(self._worker_queue_idx_cycle) + if self._workers_status[worker_queue_idx]: + if self._in_order: + break + elif self._workers_num_tasks[worker_queue_idx] < max_tasks // sum(self._workers_status): + # when self._in_order is False, distribute work to a worker if it has capacity + # _workers_status is updated only in this thread, so the sum is guaranteed > 0 + break + else: + # not found (i.e., didn't break) + return + + if snapshot_main: + assert snapshot + self._main_snapshots.append((self._send_idx, self._get_main_state())) + + self._index_queues[worker_queue_idx].put((self._send_idx, (index, snapshot))) # type: ignore[possibly-undefined] + self._task_info[self._send_idx] = (worker_queue_idx,) + self._workers_num_tasks[worker_queue_idx] += 1 + self._tasks_outstanding += 1 + self._send_idx += 1 + + def _process_data(self, data, worker_id, state_dict): + self._workers_num_tasks[worker_id] -= 1 + self._try_put_index() + if isinstance(data, ExceptionWrapper): + data.reraise() + self._last_yielded_worker_id = worker_id + # Update latest worker state + if state_dict is not None: + self._update_worker_snapshot(self._worker_key(state_dict[_WORKER_ID]), state_dict) + if self._snapshot_interval and ((self._num_yielded + 1) % self._snapshot_interval == 0): + self._take_snapshot() + return data + + def _take_snapshot(self): + main_snapshot_idx = None + while len(self._main_snapshots) and (self._main_snapshots[0][0] <= self._rcvd_idx - 1): + main_snapshot_idx, main_snapshot = self._main_snapshots.popleft() + if not self._in_order and main_snapshot_idx is None: + # in_order is False and no main snapshot is available as we're ahead of rcvd_idx + # we can't take a snapshot with the current implementation + return + assert main_snapshot_idx == self._rcvd_idx - 1, ( + main_snapshot_idx, + self._rcvd_idx - 1, + ) + self._update_snapshot( + self._num_yielded + 1, + self._last_yielded_worker_id, + self._num_workers, + main_snapshot, + self._worker_snapshots, + ) + + def _update_snapshot( + self, + snapshot_step: int, + last_yielded_worker_id: int, + num_workers: int, + main_snapshot: Dict[str, Any], + worker_snapshots: Dict[str, _IncrementalWorkerState], + ): + self._snapshot = { + self._SNAPSHOT_STEP: snapshot_step, + self._LAST_YIELDED_WORKER_ID: last_yielded_worker_id, + self._MAIN_SNAPSHOT: main_snapshot, + self._WORKER_SNAPSHOTS: {key: worker_state.get_state() for key, worker_state in worker_snapshots.items()}, + } + + def _mark_worker_as_unavailable(self, worker_id, shutdown=False): + # Mark a worker as having finished its work e.g., due to + # exhausting an `IterableDataset`. This should be used only when this + # `_MultiProcessingDataLoaderIter` is going to continue running. + + assert self._workers_status[worker_id] or self._persistent_workers or shutdown + + # Signal termination to that specific worker. + q = self._index_queues[worker_id] + # Indicate that no more data will be put on this queue by the current + # process. + q.put(None) + + # Note that we don't actually join the worker here, nor do we remove the + # worker's pid from C side struct because (1) joining may be slow, and + # (2) since we don't join, the worker may still raise error, and we + # prefer capturing those, rather than ignoring them, even though they + # are raised after the worker has finished its job. + # Joinning is deferred to `_shutdown_workers`, which it is called when + # all workers finish their jobs (e.g., `IterableDataset` replicas) or + # when this iterator is garbage collected. + + self._workers_status[worker_id] = False + + assert self._workers_done_event.is_set() == shutdown + + def _shutdown_workers(self): + # Called when shutting down this `_MultiProcessingDataLoaderIter`. + # See NOTE [ Data Loader Multiprocessing Shutdown Logic ] for details on + # the logic of this function. + if _utils is None or _utils.python_exit_status is True or _utils.python_exit_status is None: + # See (2) of the note. If Python is shutting down, do no-op. + return + # Normal exit when last reference is gone / iterator is depleted. + # See (1) and the second half of the note. + if not self._shutdown: + self._shutdown = True + try: + # Normal exit when last reference is gone / iterator is depleted. + # See (1) and the second half of the note. + + # Exit `pin_memory_thread` first because exiting workers may leave + # corrupted data in `worker_result_queue` which `pin_memory_thread` + # reads from. + if hasattr(self, "_pin_memory_thread"): + # Use hasattr in case error happens before we set the attribute. + self._pin_memory_thread_done_event.set() + # Send something to pin_memory_thread in case it is waiting + # so that it can wake up and check `pin_memory_thread_done_event` + self._worker_result_queue.put((None, None)) + self._pin_memory_thread.join() + self._worker_result_queue.cancel_join_thread() + self._worker_result_queue.close() + + # Exit workers now. + self._workers_done_event.set() + for worker_id in range(len(self._workers)): + # Get number of workers from `len(self._workers)` instead of + # `self._num_workers` in case we error before starting all + # workers. + # If we are using workers_status with persistent_workers + # we have to shut it down because the worker is paused + if self._persistent_workers or self._workers_status[worker_id]: + self._mark_worker_as_unavailable(worker_id, shutdown=True) + for w in self._workers: + # We should be able to join here, but in case anything went + # wrong, we set a timeout and if the workers fail to join, + # they are killed in the `finally` block. + w.join(timeout=_utils.MP_STATUS_CHECK_INTERVAL) + for q in self._index_queues: + q.cancel_join_thread() + q.close() + finally: + # Even though all this function does is putting into queues that + # we have called `cancel_join_thread` on, weird things can + # happen when a worker is killed by a signal, e.g., hanging in + # `Event.set()`. So we need to guard this with SIGCHLD handler, + # and remove pids from the C side data structure only at the + # end. + # + # FIXME: Unfortunately, for Windows, we are missing a worker + # error detection mechanism here in this function, as it + # doesn't provide a SIGCHLD handler. + if self._worker_pids_set: + _utils.signal_handling._remove_worker_pids(id(self)) + self._worker_pids_set = False + for w in self._workers: + if w.is_alive(): + # Existing mechanisms try to make the workers exit + # peacefully, but in case that we unfortunately reach + # here, which we shouldn't, (e.g., pytorch/pytorch#39570), + # we kill the worker. + w.terminate() + + # staticmethod is used to remove reference to `_MultiProcessingDataLoaderIter` + @staticmethod + def _clean_up_worker(w): + try: + w.join(timeout=_utils.MP_STATUS_CHECK_INTERVAL) + finally: + if w.is_alive(): + w.terminate() + + def __del__(self): + self._shutdown_workers() diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/stateful_dataloader/worker.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/stateful_dataloader/worker.py new file mode 100644 index 0000000000000000000000000000000000000000..ce2123fdbbdeaf3dba08a173d1c36fe409fbe48a --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/stateful_dataloader/worker.py @@ -0,0 +1,292 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +r""""Contains definitions of the methods used by the _BaseDataLoaderIter workers. + +These **needs** to be in global scope since Py2 doesn't support serializing +static methods. +""" + +import queue +import random +from dataclasses import dataclass +from typing import Any, Dict, Optional, TypeVar, Union + +import torch + +from torch._utils import ExceptionWrapper +from torch.utils.data._utils import HAS_NUMPY, MP_STATUS_CHECK_INTERVAL, signal_handling + +from torch.utils.data._utils.worker import ( + _generate_state, + _IterableDatasetStopIteration, + _ResumeIteration, + ManagerWatchdog, + WorkerInfo, +) + +from .incremental_state import ( + _DATASET_ITER_STATE, + _DATASET_STATE, + _FETCHER_ENDED, + _FETCHER_STATE, + _IncrementalWorkerState, + _WORKER_ID, +) + +from .stateful import Stateful + + +T = TypeVar("T") + + +def try_to_serialize(obj: Any) -> Union[dict, None]: + if isinstance(obj, Stateful): + obj_state = obj.state_dict() + else: + obj_state = None + + return obj_state + + +def try_to_deserialize(obj: T, state_dict: dict) -> T: + if isinstance(obj, Stateful): + obj.load_state_dict(state_dict) + return obj # type: ignore[return-value] + return obj + + +@dataclass(frozen=True) +class _AckStartup: + """Dummy class used to ack startup and return state at time 0""" + + worker_id: int + initial_state: Optional[Union[Dict[str, Any], ExceptionWrapper]] + is_delta: bool = False + + +def _worker_loop( + dataset_kind, + dataset, + index_queue, + data_queue, + done_event, + auto_collation, + collate_fn, + drop_last, + base_seed, + init_fn, + worker_id, + num_workers, + persistent_workers, + shared_seed, + worker_state, +): + # See NOTE [ Data Loader Multiprocessing Shutdown Logic ] for details on the + # logic of this function. + + try: + # Initialize C side signal handlers for SIGBUS and SIGSEGV. Python signal + # module's handlers are executed after Python returns from C low-level + # handlers, likely when the same fatal signal had already happened + # again. + # https://docs.python.org/3/library/signal.html#execution-of-python-signal-handlers + signal_handling._set_worker_signal_handlers() + + torch.set_num_threads(1) + seed = base_seed + worker_id + random.seed(seed) + torch.manual_seed(seed) + if HAS_NUMPY: + np_seed = _generate_state(base_seed, worker_id) + import numpy as np + + np.random.seed(np_seed) + + from torch.utils.data import IterDataPipe + from torch.utils.data.graph_settings import apply_random_seed + + shared_rng = torch.Generator() + if isinstance(dataset, IterDataPipe): + assert shared_seed is not None + shared_rng.manual_seed(shared_seed) + dataset = apply_random_seed(dataset, shared_rng) + + torch.utils.data._utils.worker._worker_info = WorkerInfo( + id=worker_id, num_workers=num_workers, seed=seed, dataset=dataset + ) + + from torch.utils.data import _DatasetKind + + # See NOTE [ Incremental worker state ] + incremental_worker_state: _IncrementalWorkerState + init_exception = None + fetcher = None + initial_state = None + is_delta = False + try: + if init_fn is not None: + init_fn(worker_id) + + if worker_state is None: + fetcher = _DatasetKind.create_fetcher(dataset_kind, dataset, auto_collation, collate_fn, drop_last) + initial_state = _make_state_dict(worker_id, dataset_kind, fetcher, dataset) + incremental_worker_state = _IncrementalWorkerState(initial_state) + else: + # Always restore in this order: + # 1. try to restore dataset state + # 2. generate dataset iterator + # 3. try to restore iterator state + incremental_worker_state = _IncrementalWorkerState(worker_state) + if worker_state[_DATASET_STATE] is not None: + dataset = try_to_deserialize(dataset, worker_state[_DATASET_STATE]) + fetcher = _DatasetKind.create_fetcher(dataset_kind, dataset, auto_collation, collate_fn, drop_last) + if worker_state[_FETCHER_STATE] is not None: + if dataset_kind == _DatasetKind.Iterable: + if worker_state[_FETCHER_STATE][_DATASET_ITER_STATE] is not None: + dataset_iter = try_to_deserialize( + fetcher.dataset_iter, + worker_state[_FETCHER_STATE][_DATASET_ITER_STATE], + ) + if dataset_iter is not None: + fetcher.dataset_iter = dataset_iter + # We always force fetcher to request at least one batch even if + # we know it will lead to immediate stop iteration + fetcher.ended = False + iteration_end = False + initial_state = incremental_worker_state.generate_delta( + _make_state_dict(worker_id, dataset_kind, fetcher, dataset) + ) + is_delta = True + + del worker_state + except Exception: + init_exception = ExceptionWrapper(where=f"in DataLoader worker process {worker_id}") + + # When using Iterable mode, some worker can exit earlier than others due + # to the IterableDataset behaving differently for different workers. + # When such things happen, an `_IterableDatasetStopIteration` object is + # sent over to the main process with the ID of this worker, so that the + # main process won't send more tasks to this worker, and will send + # `None` to this worker to properly exit it. + # + # Note that we cannot set `done_event` from a worker as it is shared + # among all processes. Instead, we set the `iteration_end` flag to + # signify that the iterator is exhausted. When either `done_event` or + # `iteration_end` is set, we skip all processing step and just wait for + # `None`. + iteration_end = False + + watchdog = ManagerWatchdog() + + while watchdog.is_alive(): + try: + r = index_queue.get(timeout=MP_STATUS_CHECK_INTERVAL) + except queue.Empty: + continue + if isinstance(r, _AckStartup): + # Send ack and initial state to the main process + data_queue.put( + ( + r, + _AckStartup( + worker_id=worker_id, initial_state=init_exception or initial_state, is_delta=is_delta + ), + ) + ) + del initial_state + del is_delta + continue + elif isinstance(r, _ResumeIteration): + iteration_end = False + + if isinstance(dataset, IterDataPipe): + assert r.seed is not None + shared_rng.manual_seed(r.seed) + dataset = apply_random_seed(dataset, shared_rng) + + try: + # Recreate the fetcher for worker-reuse policy + fetcher = _DatasetKind.create_fetcher(dataset_kind, dataset, auto_collation, collate_fn, drop_last) + # see NOTE [ Incremental Worker State ] + initial_state = _make_state_dict(worker_id, dataset_kind, fetcher, dataset) + incremental_worker_state = _IncrementalWorkerState(initial_state) + except Exception: + init_exception = ExceptionWrapper(where=f"in DataLoader worker process {worker_id}") + + # Acknowledge the main process + data_queue.put((r, _AckStartup(worker_id=worker_id, initial_state=init_exception or initial_state))) + del initial_state + continue + elif r is None: + # Received the final signal + assert done_event.is_set() or iteration_end + break + elif done_event.is_set() or iteration_end: + # `done_event` is set. But I haven't received the final signal + # (None) yet. I will keep continuing until get it, and skip the + # processing steps. + continue + idx, (index, snapshot) = r + data: Union[_IterableDatasetStopIteration, ExceptionWrapper] + delta_state_dict = None + if init_exception is not None: + data = init_exception + init_exception = None + else: + try: + try: + data = fetcher.fetch(index) # type: ignore[union-attr] + except StopIteration: + if not dataset_kind == _DatasetKind.Iterable: + raise + data = _IterableDatasetStopIteration(worker_id) + # Set `iteration_end` + # (1) to save future `next(...)` calls, and + # (2) to avoid sending multiple `_IterableDatasetStopIteration`s. + iteration_end = True + if snapshot or iteration_end: + # Generate incremental diff from prev_state_dict and current_state_dict + state_dict = _make_state_dict(worker_id, dataset_kind, fetcher, dataset) + delta_state_dict = incremental_worker_state.generate_delta(state_dict) + del state_dict + except Exception: + # It is important that we don't store exc_info in a variable. + # `ExceptionWrapper` does the correct thing. + # See NOTE [ Python Traceback Reference Cycle Problem ] + data = ExceptionWrapper(where=f"in DataLoader worker process {worker_id}") + + data_queue.put((idx, (data, worker_id, delta_state_dict))) + del data, idx, index, r, delta_state_dict # save memory + except KeyboardInterrupt: + # Main process will raise KeyboardInterrupt anyways. + pass + if done_event.is_set(): + data_queue.cancel_join_thread() + data_queue.close() + + +def _make_state_dict(worker_id, dataset_kind, fetcher, dataset) -> Dict[str, Any]: + from torch.utils.data import _DatasetKind + + if dataset_kind == _DatasetKind.Iterable: + fetcher_state = { + _DATASET_ITER_STATE: try_to_serialize(fetcher.dataset_iter), + _FETCHER_ENDED: fetcher.ended, + } + dataset_state = None + if fetcher.dataset_iter is not fetcher.dataset: + dataset_state = try_to_serialize(fetcher.dataset) + else: + fetcher_state = None + # Pick up any user-defined dataset state + dataset_state = try_to_serialize(dataset) + + return { + _WORKER_ID: worker_id, + _FETCHER_STATE: fetcher_state, + _DATASET_STATE: dataset_state, + } diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/version.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/version.py new file mode 100644 index 0000000000000000000000000000000000000000..4fff05c44eddc284c9c89cac122d2cfc3a1a87c0 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchdata/version.py @@ -0,0 +1,2 @@ +__version__ = '0.11.0+cpu' +git_version = 'c4177afb46c6fe06be525a43fd95c089869e45dc' diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchgen/__init__.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchgen/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2d5dbf0667a022caa07ec30bb10db5b4f83159dd --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchgen/__init__.py @@ -0,0 +1,10 @@ +"""torchgen + +This module contains codegeneration utilities for PyTorch. It is used to +build PyTorch from source, but may also be used for out-of-tree projects +that extend PyTorch. + +Note well that we provide no BC guarantees for torchgen. If you're interested +in using torchgen and want the PyTorch team to be aware, please reach out +on GitHub. +""" diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchgen/code_template.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchgen/code_template.py new file mode 100644 index 0000000000000000000000000000000000000000..bafe1fa7568ec2b0625e23407cc3d815aaf29838 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchgen/code_template.py @@ -0,0 +1,108 @@ +from __future__ import annotations + +import itertools +import re +import textwrap +from typing import TYPE_CHECKING + + +if TYPE_CHECKING: + from collections.abc import Mapping, Sequence + + +# match $identifier or ${identifier} and replace with value in env +# If this identifier is at the beginning of whitespace on a line +# and its value is a list then it is treated as +# block substitution by indenting to that depth and putting each element +# of the list on its own line +# if the identifier is on a line starting with non-whitespace and a list +# then it is comma separated ${,foo} will insert a comma before the list +# if this list is not empty and ${foo,} will insert one after. + + +class CodeTemplate: + substitution_str = r"(^[^\n\S]*)?\$([^\d\W]\w*|\{,?[^\d\W]\w*\,?})" + substitution = re.compile(substitution_str, re.MULTILINE) + + pattern: str + filename: str + + @staticmethod + def from_file(filename: str) -> CodeTemplate: + with open(filename) as f: + return CodeTemplate(f.read(), filename) + + def __init__(self, pattern: str, filename: str = "") -> None: + self.pattern = pattern + self.filename = filename + + def substitute( + self, env: Mapping[str, object] | None = None, **kwargs: object + ) -> str: + if env is None: + env = {} + + def lookup(v: str) -> object: + assert env is not None + return kwargs[v] if v in kwargs else env[v] + + def indent_lines(indent: str, v: Sequence[object]) -> str: + content = "\n".join( + itertools.chain.from_iterable(str(e).splitlines() for e in v) + ) + content = textwrap.indent(content, prefix=indent) + # Remove trailing whitespace on each line + return "\n".join(map(str.rstrip, content.splitlines())).rstrip() + + def replace(match: re.Match[str]) -> str: + indent = match.group(1) + key = match.group(2) + comma_before = "" + comma_after = "" + if key[0] == "{": + key = key[1:-1] + if key[0] == ",": + comma_before = ", " + key = key[1:] + if key[-1] == ",": + comma_after = ", " + key = key[:-1] + v = lookup(key) + if indent is not None: + if not isinstance(v, list): + v = [v] + return indent_lines(indent, v) + elif isinstance(v, list): + middle = ", ".join([str(x) for x in v]) + if len(v) == 0: + return middle + return comma_before + middle + comma_after + else: + return str(v) + + return self.substitution.sub(replace, self.pattern) + + +if __name__ == "__main__": + c = CodeTemplate( + """\ + int foo($args) { + + $bar + $bar + $a+$b + } + int commatest(int a${,stuff}) + int notest(int a${,empty,}) + """ + ) + print( + c.substitute( + args=["hi", 8], + bar=["what", 7], + a=3, + b=4, + stuff=["things...", "others"], + empty=[], + ) + ) diff --git a/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchgen/context.py b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchgen/context.py new file mode 100644 index 0000000000000000000000000000000000000000..a99d7119c656f27fabe4accdd2096d997416f4b6 --- /dev/null +++ b/miniconda3/envs/active_proaction/lib/python3.10/site-packages/torchgen/context.py @@ -0,0 +1,134 @@ +from __future__ import annotations + +import contextlib +import functools +from typing import Any, TYPE_CHECKING, TypeVar + +import torchgen.local as local +from torchgen.model import ( + BackendIndex, + DispatchKey, + NativeFunction, + NativeFunctionsGroup, + NativeFunctionsViewGroup, +) +from torchgen.utils import context, S, T + + +if TYPE_CHECKING: + from collections.abc import Callable, Iterator + + +# Helper functions for defining generators on things in the model + +F = TypeVar( + "F", + NativeFunction, + NativeFunctionsGroup, + NativeFunctionsViewGroup, + NativeFunction | NativeFunctionsGroup, + NativeFunction | NativeFunctionsViewGroup, +) + +F2 = TypeVar( + "F2", + NativeFunction, + NativeFunctionsGroup, + NativeFunction | None, + bool, + str, +) + +F3 = TypeVar("F3", tuple[NativeFunction, Any], list[NativeFunction]) + + +@contextlib.contextmanager +def native_function_manager( + g: NativeFunctionsGroup | NativeFunctionsViewGroup | NativeFunction, +) -> Iterator[None]: + if isinstance(g, NativeFunctionsGroup): + # By default, we associate all errors with structured native functions + # with the out variant. In some cases, it might be better to have + # a more specific place to hang things; if so, use + # native_function_manager again on the inside + f = g.out + elif isinstance(g, NativeFunctionsViewGroup): + # We associate errors with the view operator + f = g.view + else: + f = g + with context(lambda: f"in native_functions.yaml line {f.loc}:\n {f.func}"): + with local.parametrize( + use_const_ref_for_mutable_tensors=f.use_const_ref_for_mutable_tensors, + use_ilistref_for_tensor_lists=f.part_of_structured_group, + ): + yield + + +# Given a function that operates on NativeFunction, wrap it into a new function +# that sets some appropriate context managers for that native function. +# YOU MUST WRAP FUNCTIONS IN THIS for calls to api modules to be sound +# (you will get an error if we try to access the local variables without having +# set them). +def with_native_function(func: Callable[[F], T]) -> Callable[[F], T]: + @functools.wraps(func) + def wrapper(f: F) -> T: + with native_function_manager(f): + return func(f) + + return wrapper + + +def with_native_function_and(func: Callable[[F, F2], T]) -> Callable[[F, F2], T]: + @functools.wraps(func) + def wrapper(f: F, f2: F2) -> T: + # The first native_function is assumed to be the one with the appropriate context. + with native_function_manager(f): + return func(f, f2) + + return wrapper + + +def method_with_native_function(func: Callable[[S, F], T]) -> Callable[[S, F], T]: + @functools.wraps(func) + def wrapper(slf: S, f: F) -> T: + with native_function_manager(f): + return func(slf, f) + + return wrapper + + +def method_with_nested_native_function( + func: Callable[[S, F3], T], +) -> Callable[[S, F3], T]: + @functools.wraps(func) + def wrapper(slf: S, f: F3) -> T: + with native_function_manager(f[0]): + return func(slf, f) + + return wrapper + + +# Convenience decorator for functions that explicitly take in a BackendIndex, +# instead of indirectly taking one in as a closure +def with_native_function_and_index( + func: Callable[[F, BackendIndex], T], +) -> Callable[[F, BackendIndex], T]: + @functools.wraps(func) + def wrapper(f: F, backend_index: BackendIndex) -> T: + with native_function_manager(f): + return func(f, backend_index) + + return wrapper + + +# Convenience decorator for functions that explicitly take in a Dict of BackendIndices +def with_native_function_and_indices( + func: Callable[[F, dict[DispatchKey, BackendIndex]], T], +) -> Callable[[F, dict[DispatchKey, BackendIndex]], T]: + @functools.wraps(func) + def wrapper(f: F, backend_indices: dict[DispatchKey, BackendIndex]) -> T: + with native_function_manager(f): + return func(f, backend_indices) + + return wrapper