diff --git a/backend-simulators/pim/pim-simulator/Cargo.lock b/backend-simulators/pim/pim-simulator/Cargo.lock index 66a4bdf..339ce39 100644 --- a/backend-simulators/pim/pim-simulator/Cargo.lock +++ b/backend-simulators/pim/pim-simulator/Cargo.lock @@ -2,13 +2,31 @@ # It is not intended for manual editing. version = 4 +[[package]] +name = "aho-corasick" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" +dependencies = [ + "memchr", +] + [[package]] name = "aligned-vec" version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc890384c8602f339876ded803c97ad529f3842aba97f6392b3dba0dd171769b" dependencies = [ - "equator", + "equator 0.4.2", +] + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", ] [[package]] @@ -47,7 +65,7 @@ version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys", + "windows-sys 0.61.2", ] [[package]] @@ -58,7 +76,7 @@ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys", + "windows-sys 0.61.2", ] [[package]] @@ -67,6 +85,167 @@ version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f0e0fee31ef5ed1ba1316088939cea399010ed7731dba877ed44aeb407a75ea" +[[package]] +name = "approx" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" +dependencies = [ + "num-traits", +] + +[[package]] +name = "askama" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b79091df18a97caea757e28cd2d5fda49c6cd4bd01ddffd7ff01ace0c0ad2c28" +dependencies = [ + "askama_derive", + "askama_escape", + "humansize", + "num-traits", + "percent-encoding", + "serde", + "serde_json", +] + +[[package]] +name = "askama_derive" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19fe8d6cb13c4714962c072ea496f3392015f0989b1a2847bb4b2d9effd71d83" +dependencies = [ + "askama_parser", + "basic-toml", + "mime", + "mime_guess", + "proc-macro2", + "quote", + "serde", + "syn 2.0.115", +] + +[[package]] +name = "askama_escape" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "619743e34b5ba4e9703bba34deac3427c72507c7159f5fd030aea8cac0cfe341" + +[[package]] +name = "askama_parser" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acb1161c6b64d1c3d83108213c2a2533a342ac225aabd0bda218278c2ddb00c0" +dependencies = [ + "nom", +] + +[[package]] +name = "atomic-wait" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a55b94919229f2c42292fd71ffa4b75e83193bffdd77b1e858cd55fd2d0b0ea8" +dependencies = [ + "libc", + "windows-sys 0.42.0", +] + +[[package]] +name = "autocfg" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "basic-toml" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba62675e8242a4c4e806d12f11d136e626e6c8361d6b829310732241652a178a" +dependencies = [ + "serde", +] + +[[package]] +name = "bitflags" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bumpalo" +version = "3.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" + +[[package]] +name = "bytemuck" +version = "1.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9abbd1bc6865053c427f7198e6af43bfdedc55ab791faed4fbd361d789575ff" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.115", +] + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "cc" +version = "1.2.62" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1dce859f0832a7d088c4f1119888ab94ef4b5d6795d1ce05afb7fe159d79f98" +dependencies = [ + "find-msvc-tools", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "chrono" +version = "0.4.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" +dependencies = [ + "iana-time-zone", + "num-traits", + "serde", + "windows-link", +] + [[package]] name = "clap" version = "4.5.58" @@ -86,7 +265,7 @@ dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim", + "strsim 0.11.1", ] [[package]] @@ -98,7 +277,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn", + "syn 2.0.115", ] [[package]] @@ -113,13 +292,308 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" +[[package]] +name = "comfy-table" +version = "7.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "958c5d6ecf1f214b4c2bbbbf6ab9523a864bd136dcf71a7e8904799acfe1ad47" +dependencies = [ + "crossterm", + "unicode-segmentation", + "unicode-width", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crossbeam" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1137cd7e7fc0fb5d3c5a8678be38ec56e819125d8d7907411fe24ccb943faca8" +dependencies = [ + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-epoch", + "crossbeam-queue", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-queue" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "crossterm" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b9f2e4c67f833b660cdb0a3523065869fb35570177239812ed4c905aeff87b" +dependencies = [ + "bitflags", + "crossterm_winapi", + "document-features", + "parking_lot", + "rustix", + "winapi", +] + +[[package]] +name = "crossterm_winapi" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" +dependencies = [ + "winapi", +] + +[[package]] +name = "crunchy" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "darling" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +dependencies = [ + "darling_core 0.14.4", + "darling_macro 0.14.4", +] + +[[package]] +name = "darling" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" +dependencies = [ + "darling_core 0.20.11", + "darling_macro 0.20.11", +] + +[[package]] +name = "darling_core" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.10.0", + "syn 1.0.109", +] + +[[package]] +name = "darling_core" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.11.1", + "syn 2.0.115", +] + +[[package]] +name = "darling_macro" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +dependencies = [ + "darling_core 0.14.4", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "darling_macro" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" +dependencies = [ + "darling_core 0.20.11", + "quote", + "syn 2.0.115", +] + +[[package]] +name = "defer" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "930c7171c8df9fb1782bdf9b918ed9ed2d33d1d22300abb754f9085bc48bf8e8" + +[[package]] +name = "deranged" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" +dependencies = [ + "powerfmt", + "serde_core", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "document-features" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61" +dependencies = [ + "litrs", +] + +[[package]] +name = "dyn-clone" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" + +[[package]] +name = "dyn-stack" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c4713e43e2886ba72b8271aa66c93d722116acf7a75555cce11dcde84388fe8" +dependencies = [ + "bytemuck", + "dyn-stack-macros", +] + +[[package]] +name = "dyn-stack-macros" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d926b4d407d372f141f93bb444696142c29d32962ccbd3531117cf3aa0bfa9" + +[[package]] +name = "either" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" + +[[package]] +name = "enum-as-inner" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1e6a265c649f3f5979b601d26f1d05ada116434c87741c9493cb56218f76cbc" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.115", +] + +[[package]] +name = "equator" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c35da53b5a021d2484a7cc49b2ac7f2d840f8236a286f84202369bd338d761ea" +dependencies = [ + "equator-macro 0.2.1", +] + [[package]] name = "equator" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4711b213838dfee0117e3be6ac926007d7f433d7bbe33595975d4190cb07e6fc" dependencies = [ - "equator-macro", + "equator-macro 0.4.2", +] + +[[package]] +name = "equator" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02da895aab06bbebefb6b2595f6d637b18c9ff629b4cd840965bb3164e4194b0" +dependencies = [ + "equator-macro 0.6.0", +] + +[[package]] +name = "equator-macro" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bf679796c0322556351f287a51b49e48f7c4986e727b5dd78c972d30e2e16cc" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.115", ] [[package]] @@ -130,7 +604,284 @@ checksum = "44f23cf4b44bfce11a86ace86f8a73ffdec849c9fd00a386a53d278bd9e81fb3" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.115", +] + +[[package]] +name = "equator-macro" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b14b339eb76d07f052cdbad76ca7c1310e56173a138095d3bf42a23c06ef5d8" + +[[package]] +name = "erased-serde" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c138974f9d5e7fe373eb04df7cae98833802ae4b11c24ac7039a21d5af4b26c" +dependencies = [ + "serde", +] + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "faer" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02d2ecfb80b6f8b0c569e36988a052e64b14d8def9d372390b014e8bf79f299a" +dependencies = [ + "bytemuck", + "dyn-stack", + "equator 0.6.0", + "faer-traits", + "gemm", + "generativity", + "libm", + "nano-gemm", + "npyz", + "num-complex", + "num-traits", + "private-gemm-x86", + "pulp", + "rand 0.9.4", + "rand_distr 0.5.1", + "rayon", + "reborrow", + "spindle", +] + +[[package]] +name = "faer-traits" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b87d23ed7ab1f26c0cba0e5b9e061a796fbb7dc170fa8bee6970055a1308bb0f" +dependencies = [ + "bytemuck", + "dyn-stack", + "generativity", + "libm", + "num-complex", + "num-traits", + "pulp", + "qd", + "reborrow", +] + +[[package]] +name = "find-msvc-tools" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "futures-core" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" + +[[package]] +name = "futures-task" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" + +[[package]] +name = "futures-util" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" +dependencies = [ + "futures-core", + "futures-task", + "pin-project-lite", + "slab", +] + +[[package]] +name = "gemm" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa0673db364b12263d103b68337a68fbecc541d6f6b61ba72fe438654709eacb" +dependencies = [ + "dyn-stack", + "gemm-c32", + "gemm-c64", + "gemm-common", + "gemm-f16", + "gemm-f32", + "gemm-f64", + "num-complex", + "num-traits", + "paste", + "raw-cpuid", + "seq-macro", +] + +[[package]] +name = "gemm-c32" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "086936dbdcb99e37aad81d320f98f670e53c1e55a98bee70573e83f95beb128c" +dependencies = [ + "dyn-stack", + "gemm-common", + "num-complex", + "num-traits", + "paste", + "raw-cpuid", + "seq-macro", +] + +[[package]] +name = "gemm-c64" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20c8aeeeec425959bda4d9827664029ba1501a90a0d1e6228e48bef741db3a3f" +dependencies = [ + "dyn-stack", + "gemm-common", + "num-complex", + "num-traits", + "paste", + "raw-cpuid", + "seq-macro", +] + +[[package]] +name = "gemm-common" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88027625910cc9b1085aaaa1c4bc46bb3a36aad323452b33c25b5e4e7c8e2a3e" +dependencies = [ + "bytemuck", + "dyn-stack", + "half", + "libm", + "num-complex", + "num-traits", + "once_cell", + "paste", + "pulp", + "raw-cpuid", + "rayon", + "seq-macro", + "sysctl", +] + +[[package]] +name = "gemm-f16" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3df7a55202e6cd6739d82ae3399c8e0c7e1402859b30e4cb780e61525d9486e" +dependencies = [ + "dyn-stack", + "gemm-common", + "gemm-f32", + "half", + "num-complex", + "num-traits", + "paste", + "raw-cpuid", + "rayon", + "seq-macro", +] + +[[package]] +name = "gemm-f32" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02e0b8c9da1fbec6e3e3ab2ce6bc259ef18eb5f6f0d3e4edf54b75f9fd41a81c" +dependencies = [ + "dyn-stack", + "gemm-common", + "num-complex", + "num-traits", + "paste", + "raw-cpuid", + "seq-macro", +] + +[[package]] +name = "gemm-f64" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "056131e8f2a521bfab322f804ccd652520c79700d81209e9d9275bbdecaadc6a" +dependencies = [ + "dyn-stack", + "gemm-common", + "num-complex", + "num-traits", + "paste", + "raw-cpuid", + "seq-macro", +] + +[[package]] +name = "generativity" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2c81fb5260e37854d09d5c87183309fd8c555b75289427884b25660bc87a85e" + +[[package]] +name = "generator" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52f04ae4152da20c76fe800fa48659201d5cf627c5149ca0b707b69d7eef6cf9" +dependencies = [ + "cc", + "cfg-if", + "libc", + "log", + "rustversion", + "windows-link", + "windows-result", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasip2", ] [[package]] @@ -139,18 +890,104 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" +[[package]] +name = "half" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" +dependencies = [ + "bytemuck", + "cfg-if", + "crunchy", + "num-traits", + "zerocopy", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + [[package]] name = "heck" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" +[[package]] +name = "hermit-abi" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" + [[package]] name = "hex" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "humansize" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6cb51c9a029ddc91b07a787f1d86b53ccfa49b0e86688c946ebe8d3555685dd7" +dependencies = [ + "libm", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown", + "serde", +] + +[[package]] +name = "interpol" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb58032ba748f4010d15912a1855a8a0b1ba9eaad3395b0c171c09b3b356ae50" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "is_terminal_polyfill" version = "1.70.2" @@ -163,24 +1000,408 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" +[[package]] +name = "js-sys" +version = "0.3.98" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67df7112613f8bfd9150013a0314e196f4800d3201ae742489d999db2f979f08" +dependencies = [ + "cfg-if", + "futures-util", + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "libc" +version = "0.2.186" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" + +[[package]] +name = "libm" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" + +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + +[[package]] +name = "litrs" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" + +[[package]] +name = "loom" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "419e0dc8046cb947daa77eb95ae174acfbddb7673b4151f56d1eed8e93fbfaca" +dependencies = [ + "cfg-if", + "generator", + "scoped-tls", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "matchers" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" +dependencies = [ + "regex-automata", +] + +[[package]] +name = "matrixmultiply" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06de3016e9fae57a36fd14dba131fccf49f74b40b7fbdb472f96e361ec71a08" +dependencies = [ + "autocfg", + "rawpointer", +] + [[package]] name = "memchr" version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "nalgebra" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d506eb7e08d6329505faa8a3a00a5dcc6de9f76e0c77e4b75763ae3c770831ff" +dependencies = [ + "approx", + "matrixmultiply", + "nalgebra-macros", + "num-complex", + "num-rational", + "num-traits", + "rand 0.8.6", + "rand_distr 0.4.3", + "simba", + "typenum", +] + +[[package]] +name = "nalgebra-macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01fcc0b8149b4632adc89ac3b7b31a12fb6099a0317a4eb2ebff574ef7de7218" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "nano-gemm" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e04345dc84b498ff89fe0d38543d1f170da9e43a2c2bcee73a0f9069f72d081" +dependencies = [ + "equator 0.2.2", + "nano-gemm-c32", + "nano-gemm-c64", + "nano-gemm-codegen", + "nano-gemm-core", + "nano-gemm-f32", + "nano-gemm-f64", + "num-complex", +] + +[[package]] +name = "nano-gemm-c32" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0775b1e2520e64deee8fc78b7732e3091fb7585017c0b0f9f4b451757bbbc562" +dependencies = [ + "nano-gemm-codegen", + "nano-gemm-core", + "num-complex", +] + +[[package]] +name = "nano-gemm-c64" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9af49a20d58816e6b5ee65f64142e50edb5eba152678d4bb7377fcbf63f8437a" +dependencies = [ + "nano-gemm-codegen", + "nano-gemm-core", + "num-complex", +] + +[[package]] +name = "nano-gemm-codegen" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6cc8d495c791627779477a2cf5df60049f5b165342610eb0d76bee5ff5c5d74c" + +[[package]] +name = "nano-gemm-core" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d998dfa644de87a0f8660e5ea511d7cb5c33b5a2d9847b7af57a2565105089f0" + +[[package]] +name = "nano-gemm-f32" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879d962e79bc8952e4ad21ca4845a21132540ed3f5e01184b2ff7f720e666523" +dependencies = [ + "nano-gemm-codegen", + "nano-gemm-core", +] + +[[package]] +name = "nano-gemm-f64" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9a513473dce7dc00c7e7c318481ca4494034e76997218d8dad51bd9f007a815" +dependencies = [ + "nano-gemm-codegen", + "nano-gemm-core", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "npyz" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f0e759e014e630f90af745101b614f761306ddc541681e546649068e25ec1b9" +dependencies = [ + "byteorder", + "num-bigint", + "py_literal", +] + +[[package]] +name = "nu-ansi-term" +version = "0.50.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +dependencies = [ + "bytemuck", + "num-traits", + "rand 0.8.6", +] + +[[package]] +name = "num-conv" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6673768db2d862beb9b39a78fdcb1a69439615d5794a1be50caa9bc92c81967" + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "num_cpus" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + [[package]] name = "once_cell_polyfill" version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-link", +] + [[package]] name = "paste" version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "pest" +version = "2.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0848c601009d37dfa3430c4666e147e49cdcf1b92ecd3e63657d8a5f19da662" +dependencies = [ + "memchr", + "ucd-trie", +] + +[[package]] +name = "pest_derive" +version = "2.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11f486f1ea21e6c10ed15d5a7c77165d0ee443402f0780849d1768e7d9d6fe77" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8040c4647b13b210a963c1ed407c1ff4fdfa01c31d6d2a098218702e6664f94f" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn 2.0.115", +] + +[[package]] +name = "pest_meta" +version = "2.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89815c69d36021a140146f26659a81d6c2afa33d216d736dd4be5381a7362220" +dependencies = [ + "pest", + "sha2", +] + [[package]] name = "pim-simulator" version = "0.1.0" @@ -188,11 +1409,84 @@ dependencies = [ "aligned-vec", "anyhow", "clap", + "comfy-table", + "faer", + "faer-traits", "glob", "hex", "paste", + "plotly", + "rayon", "serde", "serde_json", + "statrs", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "plotly" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7174c07682d8c13cded3fcdf54d9c1d09249b4e821f26e4ab7a60eb39e9783d" +dependencies = [ + "askama", + "dyn-clone", + "erased-serde", + "once_cell", + "plotly_derive", + "rand 0.8.6", + "serde", + "serde_json", + "serde_repr", + "serde_with", +] + +[[package]] +name = "plotly_derive" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2fcc11cdbc83c1a49ed868156cc485037e01c612b03128ce98519e5662ede63" +dependencies = [ + "darling 0.14.4", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "private-gemm-x86" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0af8c3e5087969c323f667ccb4b789fa0954f5aa650550e38e81cf9108be21b5" +dependencies = [ + "crossbeam", + "defer", + "interpol", + "num_cpus", + "raw-cpuid", + "rayon", + "spindle", + "sysctl", ] [[package]] @@ -204,6 +1498,54 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "pulp" +version = "0.22.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e205bb30d5b916c55e584c22201771bcf2bad9aabd5d4127f38387140c38632" +dependencies = [ + "bytemuck", + "cfg-if", + "libm", + "num-complex", + "paste", + "pulp-wasm-simd-flag", + "raw-cpuid", + "reborrow", + "version_check", +] + +[[package]] +name = "pulp-wasm-simd-flag" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40e24eee682d89fb193496edf918a7f407d30175b2e785fe057e4392dfd182e0" + +[[package]] +name = "py_literal" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "102df7a3d46db9d3891f178dcc826dc270a6746277a9ae6436f8d29fd490a8e1" +dependencies = [ + "num-bigint", + "num-complex", + "num-traits", + "pest", + "pest_derive", +] + +[[package]] +name = "qd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15f1304a5aecdcfe9ee72fbba90aa37b3aa067a69d14cb7f3d9deada0be7c07c" +dependencies = [ + "bytemuck", + "libm", + "num-traits", + "pulp", +] + [[package]] name = "quote" version = "1.0.44" @@ -213,6 +1555,213 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "rand" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.5", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.5", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.17", +] + +[[package]] +name = "rand_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" +dependencies = [ + "getrandom 0.3.4", +] + +[[package]] +name = "rand_distr" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" +dependencies = [ + "num-traits", + "rand 0.8.6", +] + +[[package]] +name = "rand_distr" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8615d50dcf34fa31f7ab52692afec947c4dd0ab803cc87cb3b0b4570ff7463" +dependencies = [ + "num-traits", + "rand 0.9.4", +] + +[[package]] +name = "raw-cpuid" +version = "11.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "498cd0dc59d73224351ee52a95fee0f1a617a2eae0e7d9d720cc622c73a54186" +dependencies = [ + "bitflags", +] + +[[package]] +name = "rawpointer" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" + +[[package]] +name = "rayon" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "reborrow" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03251193000f4bd3b042892be858ee50e8b3719f2b08e5833ac4353724632430" + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags", +] + +[[package]] +name = "regex-automata" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" + +[[package]] +name = "rustix" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustversion" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + +[[package]] +name = "safe_arch" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96b02de82ddbe1b636e6170c21be622223aea188ef2e139be0a5b219ec215323" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "seq-macro" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc711410fbe7399f390ca1c3b60ad0f53f80e95c5eb935e52268a0e2cd49acc" + [[package]] name = "serde" version = "1.0.228" @@ -240,7 +1789,7 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.115", ] [[package]] @@ -256,12 +1805,145 @@ dependencies = [ "zmij", ] +[[package]] +name = "serde_repr" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.115", +] + +[[package]] +name = "serde_with" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe" +dependencies = [ + "base64", + "chrono", + "hex", + "indexmap", + "serde", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" +dependencies = [ + "darling 0.20.11", + "proc-macro2", + "quote", + "syn 2.0.115", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "simba" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0b7840f121a46d63066ee7a99fc81dcabbc6105e437cae43528cea199b5a05f" +dependencies = [ + "approx", + "num-complex", + "num-traits", + "paste", + "wide", +] + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "spindle" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "673aaca3d8aa5387a6eba861fbf984af5348d9df5d940c25c6366b19556fdf64" +dependencies = [ + "atomic-wait", + "crossbeam", + "equator 0.4.2", + "loom", + "rayon", +] + +[[package]] +name = "statrs" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b35a062dbadac17a42e0fc64c27f419b25d6fae98572eb43c8814c9e873d7721" +dependencies = [ + "approx", + "lazy_static", + "nalgebra", + "num-traits", + "rand 0.8.6", +] + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + [[package]] name = "strsim" version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "syn" version = "2.0.115" @@ -273,24 +1955,368 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "sysctl" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01198a2debb237c62b6826ec7081082d951f46dbb64b0e8c7649a452230d1dfc" +dependencies = [ + "bitflags", + "byteorder", + "enum-as-inner", + "libc", + "thiserror", + "walkdir", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.115", +] + +[[package]] +name = "thread_local" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "time" +version = "0.3.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde_core", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" + +[[package]] +name = "time-macros" +version = "0.2.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex-automata", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "typenum" +version = "1.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de" + +[[package]] +name = "ucd-trie" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" + +[[package]] +name = "unicase" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" + [[package]] name = "unicode-ident" version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "537dd038a89878be9b64dd4bd1b260315c1bb94f4d784956b81e27a088d9a09e" +[[package]] +name = "unicode-segmentation" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9629274872b2bfaf8d66f5f15725007f635594914870f65218920345aa11aa8c" + +[[package]] +name = "unicode-width" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" + [[package]] name = "utf8parse" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +[[package]] +name = "valuable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.3+wasi-0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20064672db26d7cdc89c7798c48a0fdfac8213434a1186e5ef29fd560ae223d6" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.121" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49ace1d07c165b0864824eee619580c4689389afa9dc9ed3a4c75040d82e6790" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.121" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e68e6f4afd367a562002c05637acb8578ff2dea1943df76afb9e83d177c8578" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.121" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d95a9ec35c64b2a7cb35d3fead40c4238d0940c86d107136999567a4703259f2" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn 2.0.115", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.121" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4e0100b01e9f0d03189a92b96772a1fb998639d981193d7dbab487302513441" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wide" +version = "0.7.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce5da8ecb62bcd8ec8b7ea19f69a51275e91299be594ea5cc6ef7819e16cd03" +dependencies = [ + "bytemuck", + "safe_arch", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.115", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.115", +] + [[package]] name = "windows-link" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + [[package]] name = "windows-sys" version = "0.61.2" @@ -300,6 +2326,74 @@ dependencies = [ "windows-link", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + +[[package]] +name = "zerocopy" +version = "0.8.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.115", +] + [[package]] name = "zmij" version = "1.0.21" diff --git a/backend-simulators/pim/pim-simulator/Cargo.toml b/backend-simulators/pim/pim-simulator/Cargo.toml index 037a55f..425bb31 100644 --- a/backend-simulators/pim/pim-simulator/Cargo.toml +++ b/backend-simulators/pim/pim-simulator/Cargo.toml @@ -13,8 +13,9 @@ name = "pimcore" path = "src/lib/pimcore.rs" [features] -default = ["tracing"] +default = [] tracing = [] +profile_time = ["dep:plotly", "dep:comfy-table", "dep:statrs"] @@ -27,3 +28,9 @@ hex = "0" paste = "1" serde = { version = "1", features = ["derive"] } serde_json = "1" +statrs = {version="0.16", optional=true} +comfy-table = {version="7.1", optional=true} +plotly = {version="0.8", optional=true} +rayon = "1.12.0" +faer = "0.24.0" +faer-traits = "0.24.0" diff --git a/backend-simulators/pim/pim-simulator/src/lib/instruction_set/isa.rs b/backend-simulators/pim/pim-simulator/src/lib/instruction_set/isa.rs index e52224a..28f1269 100644 --- a/backend-simulators/pim/pim-simulator/src/lib/instruction_set/isa.rs +++ b/backend-simulators/pim/pim-simulator/src/lib/instruction_set/isa.rs @@ -1,14 +1,19 @@ use crate::{ - cpu::{CPU, crossbar}, instruction_set::{ + cpu::{CPU, crossbar}, + instruction_set::{ Instruction, InstructionData, InstructionStatus, InstructionType, VectorBitWith, helper::add_all, - }, memory_manager::{ + }, + memory_manager::{ MemoryStorable, type_traits::{FromFloat, UpcastDestTraits, UpcastSlice}, - }, tracing::TRACER, utility::{add_offset_r1, add_offset_r2, add_offset_rd} + }, + tracing::TRACER, + utility::{add_offset_r1, add_offset_r2, add_offset_rd}, }; use aligned_vec::{AVec, ConstAlign}; use anyhow::{Context, Result, ensure}; +use rayon::prelude::*; use paste::paste; use std::{borrow::Cow, cell::OnceCell, collections::HashMap}; @@ -76,8 +81,7 @@ pub fn functor_to_name(functor: usize) -> &'static str { /////////////////////////////////////////////////////////////// /////////////////Scalar/register Instructions////////////////// /////////////////////////////////////////////////////////////// -pub fn sldi(cores: &mut CPU, data: InstructionData) -> Result -{ +pub fn sldi(cores: &mut CPU, data: InstructionData) -> Result { TRACER.lock().unwrap().pre_sldi(cores, data); let (core_indx, rd, imm) = data.get_core_rd_imm(); let core = cores.core(core_indx); @@ -229,25 +233,30 @@ where [F]: UpcastSlice + UpcastSlice, [M]: UpcastSlice, T: UpcastDestTraits + MemoryStorable, - M: UpcastDestTraits + MemoryStorable + FromFloat, + // Add faer::ComplexField HERE, directly bounding M for this function only + M: UpcastDestTraits + MemoryStorable + FromFloat + faer_traits::ComplexField, F: UpcastDestTraits + MemoryStorable, { - TRACER.lock().unwrap().pre_mvm::(cores, data); + TRACER.lock().unwrap().pre_mvm::(cores, data); + let (core_indx, rd, r1, mbiw, relu, group) = data.get_core_rd_r1_mbiw_immrelu_immgroup(); let group: usize = group.try_into().context("group can not be negative")?; + let core = cores.core(core_indx); let r1_val = core.register(r1); let rd_val = core.register(rd); + let (memory, crossbars) = core.get_memory_crossbar(); let crossbar = crossbars.get_mut(group).unwrap(); let crossbar_stored_bytes = crossbar.stored_bytes(); let crossbar_byte_width = crossbar.width(); - //Fix this + let crossbar_elem_width = crossbar_byte_width / size_of::(); ensure!( - crossbar_byte_width & size_of::() == 0, + crossbar_byte_width % size_of::() == 0, "M not divisor of the crosbbar size" ); + let crossbar_height = crossbar.height(); let crossbar_byte_size = crossbar_byte_width * crossbar_height; @@ -257,19 +266,29 @@ where let load = loads[0]; let vec: Cow<[M]> = load.up(); let matrix = crossbar.load::(crossbar_byte_size)?[0]; - let mut res = Vec::with_capacity(crossbar_elem_width); - let mut partial :AVec = AVec::>::with_capacity(64, vec.len()); - partial.resize(vec.len(), M::from_f32(0.0)); - for x in 0..crossbar_elem_width { - partial[0] = vec[0] * matrix[x]; - for y in 1..crossbar_height { - partial[y] = vec[y] * matrix[y * crossbar_elem_width + x]; - } + // --- FAER IMPLEMENTATION --- + + // 1. Explicitly create a Matrix Reference (MatRef) + let matrix_view = faer::mat::MatRef::from_row_major_slice( + matrix.as_ref(), + crossbar_height, + crossbar_elem_width, + ); + + // 2. Explicitly create a Column Vector Reference (ColRef) + // Using `ColRef` here guarantees we don't accidentally get a RowRef (Fixes E0277) + let vec_view = faer::col::ColRef::from_slice(vec.as_ref()); + + let res_col: faer::col::Col = matrix_view.transpose() * vec_view; + + // 4. Convert back to standard Rust Vec + // try_as_slice() returns an Option<&[M]>. + // We can safely unwrap() because a freshly allocated, owned Col is ALWAYS contiguous! + let mut res: Vec = (0..crossbar_elem_width).map(|i| res_col[i]).collect(); + + // --- END FAER --- - let mut acc = add_all(partial.as_slice()); - res.push(acc); - } if relu != 0 { res.iter_mut().for_each(|x| { if *x < M::from_f32(0.0) { @@ -277,13 +296,16 @@ where } }); } + ensure!( res.len() == crossbar_elem_width, - "mvm generate a vector bigger thant it's requested elements" + "mvm generate a vector bigger thant it's requested elements" ); + let res_up: Cow<[T]> = res.as_slice().up(); core.execute_store(rd_val, res_up.as_ref()); - TRACER.lock().unwrap().post_mvm::(cores, data); + + TRACER.lock().unwrap().post_mvm::(cores, data); Ok(InstructionStatus::Completed) } @@ -317,7 +339,7 @@ where T: UpcastDestTraits + MemoryStorable, F: UpcastDestTraits + MemoryStorable, { - TRACER.lock().unwrap().pre_vvadd::(cores, data); + TRACER.lock().unwrap().pre_vvadd::(cores, data); let (core_indx, rd, r1, r2, imm_len, offset_select, offset_value) = data.get_core_rd_r1_r2_immlen_offset(); let core = cores.core(core_indx); @@ -345,7 +367,7 @@ where ); let res_up: Cow<[T]> = res.as_slice().up(); core.execute_store(rd_val, res_up.as_ref()); - TRACER.lock().unwrap().post_vvadd::(cores, data); + TRACER.lock().unwrap().post_vvadd::(cores, data); Ok(InstructionStatus::Completed) } @@ -359,7 +381,7 @@ where T: UpcastDestTraits + MemoryStorable, F: UpcastDestTraits + MemoryStorable, { - TRACER.lock().unwrap().pre_vvsub::(cores, data); + TRACER.lock().unwrap().pre_vvsub::(cores, data); let (core_indx, rd, r1, r2, imm_len, offset_select, offset_value) = data.get_core_rd_r1_r2_immlen_offset(); let core = cores.core(core_indx); @@ -400,7 +422,7 @@ where T: UpcastDestTraits + MemoryStorable, F: UpcastDestTraits + MemoryStorable, { - TRACER.lock().unwrap().pre_vvmul::(cores, data); + TRACER.lock().unwrap().pre_vvmul::(cores, data); let (core_indx, rd, r1, r2, imm_len, offset_select, offset_value) = data.get_core_rd_r1_r2_immlen_offset(); let core = cores.core(core_indx); @@ -440,7 +462,7 @@ where T: UpcastDestTraits + MemoryStorable, F: UpcastDestTraits + MemoryStorable, { - TRACER.lock().unwrap().pre_vvdmul::(cores, data); + TRACER.lock().unwrap().pre_vvdmul::(cores, data); let (core_indx, rd, r1, r2, imm_len, offset_select, offset_value) = data.get_core_rd_r1_r2_immlen_offset(); let core = cores.core(core_indx); @@ -476,7 +498,7 @@ where T: UpcastDestTraits + MemoryStorable, F: UpcastDestTraits + MemoryStorable, { - TRACER.lock().unwrap().pre_vvmax::(cores, data); + TRACER.lock().unwrap().pre_vvmax::(cores, data); let (core_indx, rd, r1, r2, imm_len, offset_select, offset_value) = data.get_core_rd_r1_r2_immlen_offset(); let core = cores.core(core_indx); @@ -525,7 +547,7 @@ where T: UpcastDestTraits + MemoryStorable, F: UpcastDestTraits + MemoryStorable, { - TRACER.lock().unwrap().pre_vavg::(cores, data); + TRACER.lock().unwrap().pre_vavg::(cores, data); let (core_indx, rd, r1, r2, imm_len, offset_select, offset_value) = data.get_core_rd_r1_r2_immlen_offset(); let core = cores.core(core_indx); @@ -533,7 +555,10 @@ where let r2_val = r2; ensure!(r2_val == 1, "Stride different than 1 not supported"); let rd_val = core.register(rd); - ensure!(offset_select == 1, "Offset select cannot be different from 1"); + ensure!( + offset_select == 1, + "Offset select cannot be different from 1" + ); let r1_val = add_offset_r1(r1_val, offset_select, offset_value); let loads = core.reserve_load(r1_val, imm_len)?.execute_load::()?; let load1 = loads[0]; @@ -555,7 +580,7 @@ where T: UpcastDestTraits + MemoryStorable, F: UpcastDestTraits + MemoryStorable + From, { - TRACER.lock().unwrap().pre_vrelu::(cores, data); + TRACER.lock().unwrap().pre_vrelu::(cores, data); let (core_indx, rd, r1, r2, imm_len, offset_select, offset_value) = data.get_core_rd_r1_r2_immlen_offset(); let core = cores.core(core_indx); @@ -585,7 +610,7 @@ where T: UpcastDestTraits + MemoryStorable, F: UpcastDestTraits + MemoryStorable + From, { - TRACER.lock().unwrap().pre_vtanh::(cores, data); + TRACER.lock().unwrap().pre_vtanh::(cores, data); let (core_indx, rd, r1, r2, imm_len, offset_select, offset_value) = data.get_core_rd_r1_r2_immlen_offset(); let core = cores.core(core_indx); @@ -613,7 +638,7 @@ where T: UpcastDestTraits + MemoryStorable, F: UpcastDestTraits + MemoryStorable + From, { - TRACER.lock().unwrap().pre_vsigm::(cores, data); + TRACER.lock().unwrap().pre_vsigm::(cores, data); let (core_indx, rd, r1, r2, imm_len, offset_select, offset_value) = data.get_core_rd_r1_r2_immlen_offset(); let core = cores.core(core_indx); @@ -633,13 +658,16 @@ pub fn vsoftmax(cores: &mut CPU, data: InstructionData) -> Result(cores: &mut CPU, data: InstructionData) -> Result +pub(super) fn vsoftmax_impl( + cores: &mut CPU, + data: InstructionData, +) -> Result where [F]: UpcastSlice, T: UpcastDestTraits + MemoryStorable, F: UpcastDestTraits + MemoryStorable + From, { - TRACER.lock().unwrap().pre_vsoftmax::(cores, data); + TRACER.lock().unwrap().pre_vsoftmax::(cores, data); let (core_indx, rd, r1, r2, imm_len, offset_select, offset_value) = data.get_core_rd_r1_r2_immlen_offset(); let core = cores.core(core_indx); @@ -656,16 +684,15 @@ where .reduce(|a, b| if a > b { a } else { b }) .unwrap(); let exp_values: Vec = load1.iter().map(|&a| (a - max_val).exp()).collect(); - let sum = exp_values - .iter() - .copied() - .reduce(|a, b| a + b) - .unwrap(); - ensure!(sum > 0.0.into(), "vsoftmax normalization sum must be positive"); + let sum = exp_values.iter().copied().reduce(|a, b| a + b).unwrap(); + ensure!( + sum > 0.0.into(), + "vsoftmax normalization sum must be positive" + ); let res: Vec = exp_values.iter().map(|&a| a / sum).collect(); let res_up: Cow<[T]> = res.as_slice().up(); core.execute_store(rd_val, res_up.as_ref()); - TRACER.lock().unwrap().post_vsoftmax::(cores, data); + TRACER.lock().unwrap().post_vsoftmax::(cores, data); Ok(InstructionStatus::Completed) } @@ -749,12 +776,10 @@ pub fn lmv(cores: &mut CPU, data: InstructionData) -> Result } pub fn send(cores: &mut CPU, data: InstructionData) -> Result { - TRACER.lock().unwrap().pre_send(cores, data); Ok(InstructionStatus::Sending(data)) } pub fn recv(cores: &mut CPU, data: InstructionData) -> Result { - TRACER.lock().unwrap().pre_recv(cores, data); Ok(InstructionStatus::Reciving(data)) } diff --git a/backend-simulators/pim/pim-simulator/src/lib/pimcore.rs b/backend-simulators/pim/pim-simulator/src/lib/pimcore.rs index 2553756..129c8c2 100644 --- a/backend-simulators/pim/pim-simulator/src/lib/pimcore.rs +++ b/backend-simulators/pim/pim-simulator/src/lib/pimcore.rs @@ -169,6 +169,9 @@ impl<'a> Executable<'a> { } } print_status(cores_instructions); + + #[cfg(feature = "profile_time")] + TRACER.lock().unwrap().report(); } pub fn cpu(&self) -> &CPU<'a> { diff --git a/backend-simulators/pim/pim-simulator/src/lib/send_recv.rs b/backend-simulators/pim/pim-simulator/src/lib/send_recv.rs index d33a0e8..f3a9848 100644 --- a/backend-simulators/pim/pim-simulator/src/lib/send_recv.rs +++ b/backend-simulators/pim/pim-simulator/src/lib/send_recv.rs @@ -58,6 +58,20 @@ where 'a : 'b && sender.internal_core == receiver.external_core && receiver.internal_core == sender.external_core { + { + let sender = &mut core_instructions[sender.internal_core]; + let pc = sender.program_counter; + let inst = sender.instructions.get(pc).unwrap(); + let data = inst.data; + TRACER.lock().unwrap().pre_send(cpu, data); + } + { + let recv = &mut core_instructions[receiver.internal_core]; + let pc = recv.program_counter; + let inst = recv.instructions.get(pc).unwrap(); + let data = inst.data; + TRACER.lock().unwrap().pre_recv(cpu, data); + } let [sender_core, reciver_core] = cpu.get_multiple_cores([sender.internal_core, receiver.internal_core]); let memory = sender_core diff --git a/backend-simulators/pim/pim-simulator/src/lib/tracing/disable.rs b/backend-simulators/pim/pim-simulator/src/lib/tracing/disable.rs index f31bf38..ff6215b 100644 --- a/backend-simulators/pim/pim-simulator/src/lib/tracing/disable.rs +++ b/backend-simulators/pim/pim-simulator/src/lib/tracing/disable.rs @@ -13,7 +13,7 @@ use crate::{ }; use std::io::Write; -#[cfg(not(feature = "tracing"))] +#[cfg(not(any(feature = "tracing", feature = "profile_time")))] impl Trace { /////////////////////////////////////////////////////////////// /////////////////Scalar/register Instructions////////////////// diff --git a/backend-simulators/pim/pim-simulator/src/lib/tracing/mod.rs b/backend-simulators/pim/pim-simulator/src/lib/tracing/mod.rs index 0821e7a..bef60a9 100644 --- a/backend-simulators/pim/pim-simulator/src/lib/tracing/mod.rs +++ b/backend-simulators/pim/pim-simulator/src/lib/tracing/mod.rs @@ -1,52 +1,32 @@ -mod tracing_isa; mod disable; -mod pretty_print; -use std::{fs::File, path::{ PathBuf}}; +#[cfg(feature = "profile_time")] +mod profile; + +#[cfg(feature = "profile_time")] +use profile::Trace; + +#[cfg(feature = "tracing")] +mod trace; +#[cfg(feature = "tracing")] +use trace::Trace; + +use crate::Executable; +#[cfg(not(any(feature = "tracing", feature = "profile_time")))] +use std::path::PathBuf; use std::sync::{LazyLock, Mutex}; -use crate::Executable; +#[cfg(not(any(feature = "tracing", feature = "profile_time")))] +pub struct Trace {} -#[cfg(feature = "tracing")] -pub struct Trace { - out_files : Vec -} - - -#[cfg(feature = "tracing")] +#[cfg(not(any(feature = "tracing", feature = "profile_time")))] impl Trace { fn new() -> Self { - Self { out_files : Vec::new()} + Self {} } - - pub fn init(&mut self, num_core : usize , mut path : PathBuf) { - path.pop(); - for i in 0..num_core { - path.push(format!("TraceCore{}", i)); - let file = File::create(&path).expect("Can not create file"); - self.out_files.push(file); - path.pop(); - } - } -} - -#[cfg(not(feature = "tracing"))] -pub struct Trace { + pub fn init(&mut self, num_core: usize, path: PathBuf) {} } -#[cfg(not(feature = "tracing"))] -impl Trace { - fn new() -> Self { - Self { } - } - - - pub fn init(&mut self, num_core : usize, path : PathBuf ) { - } -} - - -pub static TRACER: LazyLock> = LazyLock::new(|| { Trace::new().into()}); - +pub static TRACER: LazyLock> = LazyLock::new(|| Trace::new().into()); diff --git a/backend-simulators/pim/pim-simulator/src/lib/tracing/profile/mod.rs b/backend-simulators/pim/pim-simulator/src/lib/tracing/profile/mod.rs new file mode 100644 index 0000000..2583a49 --- /dev/null +++ b/backend-simulators/pim/pim-simulator/src/lib/tracing/profile/mod.rs @@ -0,0 +1,73 @@ +use std::{collections::HashMap, path::PathBuf, time::Instant}; + +use crate::tracing::profile::profile_analysis::{ + analyze_timings, generate_interactive_report, print_textual_report, +}; + +pub mod profile_analysis; +pub mod profile_isa; + +pub struct Trace { + instruction_times: HashMap>, + core_start_time: HashMap>, + start_time: Instant, +} + +impl Trace { + pub fn new() -> Self { + let mut instruction_times = HashMap::new(); + instruction_times.insert("sldi".to_string(), Vec::with_capacity(20000)); + instruction_times.insert("sld".to_string(), Vec::with_capacity(20000)); + instruction_times.insert("sadd".to_string(), Vec::with_capacity(20000)); + instruction_times.insert("ssub".to_string(), Vec::with_capacity(20000)); + instruction_times.insert("smul".to_string(), Vec::with_capacity(20000)); + instruction_times.insert("saddi".to_string(), Vec::with_capacity(20000)); + instruction_times.insert("smuli".to_string(), Vec::with_capacity(20000)); + instruction_times.insert("setbw".to_string(), Vec::with_capacity(20000)); + instruction_times.insert("mvmul".to_string(), Vec::with_capacity(20000)); + instruction_times.insert("vvadd".to_string(), Vec::with_capacity(20000)); + instruction_times.insert("vvsub".to_string(), Vec::with_capacity(20000)); + instruction_times.insert("vvmul".to_string(), Vec::with_capacity(20000)); + instruction_times.insert("vvdmul".to_string(), Vec::with_capacity(20000)); + instruction_times.insert("vvmax".to_string(), Vec::with_capacity(20000)); + instruction_times.insert("vvsll".to_string(), Vec::with_capacity(20000)); + instruction_times.insert("vvsra".to_string(), Vec::with_capacity(20000)); + instruction_times.insert("vavg".to_string(), Vec::with_capacity(20000)); + instruction_times.insert("vrelu".to_string(), Vec::with_capacity(20000)); + instruction_times.insert("vtanh".to_string(), Vec::with_capacity(20000)); + instruction_times.insert("vsigm".to_string(), Vec::with_capacity(20000)); + instruction_times.insert("vsoftmax".to_string(), Vec::with_capacity(20000)); + instruction_times.insert("vmv".to_string(), Vec::with_capacity(20000)); + instruction_times.insert("vrsu".to_string(), Vec::with_capacity(20000)); + instruction_times.insert("vrsl".to_string(), Vec::with_capacity(20000)); + instruction_times.insert("ld".to_string(), Vec::with_capacity(20000)); + instruction_times.insert("st".to_string(), Vec::with_capacity(20000)); + instruction_times.insert("lldi".to_string(), Vec::with_capacity(20000)); + instruction_times.insert("lmv".to_string(), Vec::with_capacity(20000)); + instruction_times.insert("send".to_string(), Vec::with_capacity(20000)); + instruction_times.insert("recv".to_string(), Vec::with_capacity(20000)); + instruction_times.insert("wait".to_string(), Vec::with_capacity(20000)); + instruction_times.insert("sync".to_string(), Vec::with_capacity(20000)); + Self { + instruction_times, + core_start_time: HashMap::new(), + start_time: Instant::now() + } + } + + pub fn init(&mut self, num_core: usize, path: PathBuf) { + for i in 0..num_core { + self.core_start_time.insert(i, None); + } + } + + pub fn report(&self) { + let res = analyze_timings(&self.instruction_times); + print_textual_report(&res); + generate_interactive_report( + &self.instruction_times, + &["mvmul", "recv"], + "/tmp/report.html", + ); + } +} diff --git a/backend-simulators/pim/pim-simulator/src/lib/tracing/profile/profile_analysis.rs b/backend-simulators/pim/pim-simulator/src/lib/tracing/profile/profile_analysis.rs new file mode 100644 index 0000000..4ae5a2c --- /dev/null +++ b/backend-simulators/pim/pim-simulator/src/lib/tracing/profile/profile_analysis.rs @@ -0,0 +1,192 @@ +use comfy_table::{Cell, Table, modifiers::UTF8_ROUND_CORNERS, presets::UTF8_FULL}; +use statrs::statistics::{Data, Distribution, Max, Min, OrderStatistics}; +use std::collections::HashMap; + +#[derive(Debug)] +pub struct InstructionStats { + pub name: String, + pub count: usize, + pub total_time: u128, + pub min: f64, + pub max: f64, + pub mean: f64, + pub median: f64, + pub std_dev: f64, + pub cv: f64, + pub p95: f64, + pub p99: f64, + pub skewness: f64, + pub kurtosis: f64, +} + +fn format_time(ns: f64) -> String { + if ns.is_nan() { + return "NaN".to_string(); + } + + if ns >= 1_000_000_000.0 { + format!("{:.2} s", ns / 1_000_000_000.0) + } else if ns >= 1_000_000.0 { + format!("{:.2} ms", ns / 1_000_000.0) + } else if ns >= 1_000.0 { + format!("{:.2} µs", ns / 1_000.0) + } else { + format!("{:.2} ns", ns) + } +} + +fn calculate_skewness_kurtosis(times: &[f64], mean: f64, std_dev: f64) -> (f64, f64) { + let n = times.len() as f64; + + if n < 4.0 || std_dev == 0.0 { + return (f64::NAN, f64::NAN); + } + + let mut sum_m3 = 0.0; + let mut sum_m4 = 0.0; + + for &x in times { + let deviation = x - mean; + sum_m3 += deviation.powi(3); + sum_m4 += deviation.powi(4); + } + + let m3 = sum_m3 / n; + let m4 = sum_m4 / n; + + let skewness = m3 / std_dev.powi(3); + let kurtosis = (m4 / std_dev.powi(4)) - 3.0; + + (skewness, kurtosis) +} + +pub fn analyze_timings(timings: &HashMap>) -> Vec { + let mut results = Vec::new(); + + for (instruction, times) in timings { + let count = times.len(); + if count == 0 { + continue; + } + + // Extract ONLY the duration (the second element of the tuple) for stats + let durations: Vec = times.iter().map(|&(_, duration)| duration).collect(); + let total_time: u128 = durations.iter().sum(); + + let f64_times: Vec = durations.iter().map(|&t| t as f64).collect(); + let mut data = Data::new(f64_times.clone()); + + let mean = data.mean().unwrap_or(0.0); + let std_dev = data.std_dev().unwrap_or(0.0); + let cv = if mean > 0.0 { std_dev / mean } else { 0.0 }; + + let (skewness, kurtosis) = calculate_skewness_kurtosis(&f64_times, mean, std_dev); + + results.push(InstructionStats { + name: instruction.clone(), + count, + total_time, + min: data.min(), + max: data.max(), + mean, + median: data.median(), + std_dev, + cv, + p95: data.percentile(95), + p99: data.percentile(99), + skewness, + kurtosis, + }); + } + + results.sort_by(|a, b| b.mean.partial_cmp(&a.mean).unwrap()); + results +} + +pub fn print_textual_report(stats: &[InstructionStats]) { + let mut table = Table::new(); + table + .load_preset(UTF8_FULL) + .apply_modifier(UTF8_ROUND_CORNERS) + .set_header(vec![ + "Instruction", + "Count", + "Total Time", + "Mean", + "Median", + "Min", + "Max", + "P95", + "P99", + "StdDev", + "CV", + "Skewness", + "Kurtosis", + ]); + + for stat in stats { + table.add_row(vec![ + Cell::new(&stat.name), + Cell::new(stat.count.to_string()), + Cell::new(format_time(stat.total_time as f64)), // Cast u128 to f64 for formatting + Cell::new(format_time(stat.mean)), + Cell::new(format_time(stat.median)), + Cell::new(format_time(stat.min)), + Cell::new(format_time(stat.max)), + Cell::new(format_time(stat.p95)), + Cell::new(format_time(stat.p99)), + Cell::new(format_time(stat.std_dev)), + Cell::new(format!("{:.3}", stat.cv)), + Cell::new(format!("{:.2}", stat.skewness)), + Cell::new(format!("{:.2}", stat.kurtosis)), + ]); + } + + println!("{table}"); +} + + +pub fn generate_interactive_report( + timings: &HashMap>, + instructions_to_plot: &[&str], // <-- NEW: Only plot these + file_path: &str, +) { + +use plotly::common::{Mode, Marker, Line}; +use plotly::layout::{Axis, Layout}; +use plotly::{Plot, Scatter}; +use std::collections::HashMap; + let mut plot = Plot::new(); + + for &instruction_name in instructions_to_plot { + // Only proceed if the instruction exists in our timings map + if let Some(times) = timings.get(instruction_name) { + let x_axis: Vec = times.iter().map(|&(ts, _)| ts as f64).collect(); + let y_axis: Vec = times.iter().map(|&(_, dur)| dur as f64).collect(); + + let text_array: Vec = times.iter() + .map(|&(_, dur)| format_time(dur as f64)) + .collect(); + + let trace = Scatter::new(x_axis, y_axis) + .name(instruction_name) + .mode(Mode::LinesMarkers) + .marker(Marker::new().size(4).opacity(0.6)) + .line(Line::new().width(1.0)) + .text_array(text_array) + .hover_info(plotly::common::HoverInfo::All); + + plot.add_trace(trace); + } + } + + let layout = Layout::new() + .title(plotly::common::Title::new("Simulator Timeline: Top Offenders")) + .x_axis(Axis::new().title(plotly::common::Title::new("Absolute Time (ns)"))) + .y_axis(Axis::new().title(plotly::common::Title::new("Execution Duration"))); + + plot.set_layout(layout); + plot.write_html(file_path); + println!("🌐 Interactive timeline saved to {}", file_path); +} + diff --git a/backend-simulators/pim/pim-simulator/src/lib/tracing/profile/profile_isa.rs b/backend-simulators/pim/pim-simulator/src/lib/tracing/profile/profile_isa.rs new file mode 100644 index 0000000..88aeefa --- /dev/null +++ b/backend-simulators/pim/pim-simulator/src/lib/tracing/profile/profile_isa.rs @@ -0,0 +1,364 @@ +use crate::{ + cpu::CPU, + instruction_set::instruction_data::InstructionData, + memory_manager::{ + MemoryStorable, + type_traits::{FromFloat, UpcastDestTraits, UpcastSlice}, + }, + tracing::Trace, + utility::{add_offset_r1, add_offset_rd}, +}; +use std::io::Write; +use std::time::Instant; + +#[cfg(feature = "profile_time")] +impl Trace { + /////////////////////////////////////////////////////////////// + /////////////////Scalar/register Instructions////////////////// + /////////////////////////////////////////////////////////////// + + fn pre_impl(&mut self, cores: &mut CPU, data: InstructionData) { + let (core_indx, rd, imm) = data.get_core_rd_imm(); + let core_indx = core_indx as usize; + if self.core_start_time.get(&core_indx).unwrap().is_none() { + self.core_start_time.insert(core_indx, Some(Instant::now())); + } + } + + fn post_impl(&mut self, cores: &mut CPU, data: InstructionData, name: &'static str) { + let (core_indx, rd, imm) = data.get_core_rd_imm(); + let core_indx = core_indx as usize; + let Self { + instruction_times, + core_start_time, + start_time, + } = self; + let now = Instant::now(); + instruction_times + .get_mut(name) + .unwrap() + .push((now.duration_since(*start_time).as_nanos(), now.duration_since(core_start_time[&core_indx].unwrap()).as_nanos())); + self.core_start_time.insert(core_indx, None); + } + + pub fn pre_sldi(&mut self, cores: &mut CPU, data: InstructionData) { + self.pre_impl(cores, data); + } + + pub fn post_sldi(&mut self, cores: &mut CPU, data: InstructionData) { + self.post_impl(cores, data, "sldi"); + } + + pub fn pre_sld(&mut self, cores: &mut CPU, data: InstructionData) { + self.pre_impl(cores, data); + } + + pub fn post_sld(&mut self, cores: &mut CPU, data: InstructionData) { + self.post_impl(cores, data, "sld"); + } + + pub fn pre_sadd(&mut self, cores: &mut CPU, data: InstructionData) { + self.pre_impl(cores, data); + } + + pub fn post_sadd(&mut self, cores: &mut CPU, data: InstructionData) { + self.post_impl(cores, data, "sadd"); + } + + pub fn pre_ssub(&mut self, cores: &mut CPU, data: InstructionData) { + self.pre_impl(cores, data); + } + + pub fn post_ssub(&mut self, cores: &mut CPU, data: InstructionData) { + self.post_impl(cores, data, "ssub"); + } + + pub fn pre_smul(&mut self, cores: &mut CPU, data: InstructionData) { + self.pre_impl(cores, data); + } + + pub fn post_smul(&mut self, cores: &mut CPU, data: InstructionData) { + self.post_impl(cores, data, "smul"); + } + + pub fn pre_saddi(&mut self, cores: &mut CPU, data: InstructionData) { + self.pre_impl(cores, data); + } + + pub fn post_saddi(&mut self, cores: &mut CPU, data: InstructionData) { + self.post_impl(cores, data, "saddi"); + } + + pub fn pre_smuli(&mut self, cores: &mut CPU, data: InstructionData) { + self.pre_impl(cores, data); + } + + pub fn post_smuli(&mut self, cores: &mut CPU, data: InstructionData) { + self.post_impl(cores, data, "smuli"); + } + + ///////////////////////////////////////////////////////////////// + ///////////////////Matrix/vector Instructions//////////////////// + ///////////////////////////////////////////////////////////////// + + pub fn pre_setbw(&mut self, cores: &mut CPU, data: InstructionData) { + self.pre_impl(cores, data); + } + + pub fn post_setbw(&mut self, cores: &mut CPU, data: InstructionData) { + self.post_impl(cores, data, "setbw"); + } + + pub fn pre_mvm(&mut self, cores: &mut CPU, data: InstructionData) + where + [F]: UpcastSlice + UpcastSlice, + [M]: UpcastSlice, + T: UpcastDestTraits + MemoryStorable, + M: UpcastDestTraits + MemoryStorable + FromFloat, + F: UpcastDestTraits + MemoryStorable, + { + self.pre_impl(cores, data); + } + + pub fn post_mvm(&mut self, cores: &mut CPU, data: InstructionData) + where + [F]: UpcastSlice + UpcastSlice, + [M]: UpcastSlice, + T: UpcastDestTraits + MemoryStorable, + M: UpcastDestTraits + MemoryStorable + FromFloat, + F: UpcastDestTraits + MemoryStorable, + { + self.post_impl(cores, data, "mvmul"); + } + + pub fn pre_vvadd(&mut self, cores: &mut CPU, data: InstructionData) + where + [F]: UpcastSlice, + T: UpcastDestTraits + MemoryStorable, + F: UpcastDestTraits + MemoryStorable, + { + self.pre_impl(cores, data); + } + + pub fn post_vvadd(&mut self, cores: &mut CPU, data: InstructionData) + where + [F]: UpcastSlice, + T: UpcastDestTraits + MemoryStorable, + F: UpcastDestTraits + MemoryStorable, + { + self.post_impl(cores, data, "vvadd"); + } + + pub fn pre_vvsub(&mut self, cores: &mut CPU, data: InstructionData) + where + [F]: UpcastSlice, + T: UpcastDestTraits + MemoryStorable, + F: UpcastDestTraits + MemoryStorable, + { + self.pre_impl(cores, data); + } + + pub fn post_vvsub(&mut self, cores: &mut CPU, data: InstructionData) + where + [F]: UpcastSlice, + T: UpcastDestTraits + MemoryStorable, + F: UpcastDestTraits + MemoryStorable, + { + self.post_impl(cores, data, "vvsub"); + } + + pub fn pre_vvmul(&mut self, cores: &mut CPU, data: InstructionData) + where + [F]: UpcastSlice, + T: UpcastDestTraits + MemoryStorable, + F: UpcastDestTraits + MemoryStorable, + { + self.pre_impl(cores, data); + } + + pub fn post_vvmul(&mut self, cores: &mut CPU, data: InstructionData) + where + [F]: UpcastSlice, + T: UpcastDestTraits + MemoryStorable, + F: UpcastDestTraits + MemoryStorable, + { + self.post_impl(cores, data, "vvmul"); + } + + pub fn pre_vvdmul(&mut self, cores: &mut CPU, data: InstructionData) + where + [F]: UpcastSlice, + T: UpcastDestTraits + MemoryStorable, + F: UpcastDestTraits + MemoryStorable, + { + self.pre_impl(cores, data); + } + + pub fn post_vvdmul(&mut self, cores: &mut CPU, data: InstructionData) + where + [F]: UpcastSlice, + T: UpcastDestTraits + MemoryStorable, + F: UpcastDestTraits + MemoryStorable, + { + self.post_impl(cores, data, "vvdmul"); + } + + pub fn pre_vvmax(&mut self, cores: &mut CPU, data: InstructionData) + where + [F]: UpcastSlice, + T: UpcastDestTraits + MemoryStorable, + F: UpcastDestTraits + MemoryStorable, + { + self.pre_impl(cores, data); + } + + pub fn post_vvmax(&mut self, cores: &mut CPU, data: InstructionData) + where + [F]: UpcastSlice, + T: UpcastDestTraits + MemoryStorable, + F: UpcastDestTraits + MemoryStorable, + { + self.post_impl(cores, data, "vvmax"); + } + + pub fn pre_vavg(&mut self, cores: &mut CPU, data: InstructionData) + where + [F]: UpcastSlice, + T: UpcastDestTraits + MemoryStorable, + F: UpcastDestTraits + MemoryStorable, + { + self.pre_impl(cores, data); + } + + pub fn post_vavg(&mut self, cores: &mut CPU, data: InstructionData) + where + [F]: UpcastSlice, + T: UpcastDestTraits + MemoryStorable, + F: UpcastDestTraits + MemoryStorable, + { + self.post_impl(cores, data, "vavg"); + } + + pub fn pre_vrelu(&mut self, cores: &mut CPU, data: InstructionData) + where + [F]: UpcastSlice, + T: UpcastDestTraits + MemoryStorable, + F: UpcastDestTraits + MemoryStorable + From, + { + self.pre_impl(cores, data); + } + + pub fn post_vrelu(&mut self, cores: &mut CPU, data: InstructionData) + where + [F]: UpcastSlice, + T: UpcastDestTraits + MemoryStorable, + F: UpcastDestTraits + MemoryStorable + From, + { + self.post_impl(cores, data, "vrelu"); + } + + pub fn pre_vtanh(&mut self, cores: &mut CPU, data: InstructionData) + where + [F]: UpcastSlice, + T: UpcastDestTraits + MemoryStorable, + F: UpcastDestTraits + MemoryStorable + From, + { + self.pre_impl(cores, data); + } + + pub fn post_vtanh(&mut self, cores: &mut CPU, data: InstructionData) + where + [F]: UpcastSlice, + T: UpcastDestTraits + MemoryStorable, + F: UpcastDestTraits + MemoryStorable + From, + { + self.post_impl(cores, data, "vtanh"); + } + + pub fn pre_vsigm(&mut self, cores: &mut CPU, data: InstructionData) + where + [F]: UpcastSlice, + T: UpcastDestTraits + MemoryStorable, + F: UpcastDestTraits + MemoryStorable + From, + { + self.pre_impl(cores, data); + } + + pub fn post_vsigm(&mut self, cores: &mut CPU, data: InstructionData) + where + [F]: UpcastSlice, + T: UpcastDestTraits + MemoryStorable, + F: UpcastDestTraits + MemoryStorable + From, + { + self.post_impl(cores, data, "vsigm"); + } + + pub fn pre_vsoftmax(&mut self, cores: &mut CPU, data: InstructionData) + where + [F]: UpcastSlice, + T: UpcastDestTraits + MemoryStorable, + F: UpcastDestTraits + MemoryStorable + From, + { + self.pre_impl(cores, data); + } + + pub fn post_vsoftmax(&mut self, cores: &mut CPU, data: InstructionData) + where + [F]: UpcastSlice, + T: UpcastDestTraits + MemoryStorable, + F: UpcastDestTraits + MemoryStorable + From, + { + self.post_impl(cores, data, "vsoftmax"); + } + + ///////////////////////////////////////////////////////////////// + /////Communication/synchronization Instructions///////////////// + ///////////////////////////////////////////////////////////////// + + pub fn pre_ld(&mut self, cores: &mut CPU, data: InstructionData) { + self.pre_impl(cores, data); + } + pub fn post_ld(&mut self, cores: &mut CPU, data: InstructionData) { + self.post_impl(cores, data, "ld"); + } + + pub fn pre_st(&mut self, cores: &mut CPU, data: InstructionData) { + self.pre_impl(cores, data); + } + + pub fn post_st(&mut self, cores: &mut CPU, data: InstructionData) { + self.post_impl(cores, data, "st"); + } + + pub fn pre_lldi(&mut self, cores: &mut CPU, data: InstructionData) { + self.pre_impl(cores, data); + } + + pub fn post_lldi(&mut self, cores: &mut CPU, data: InstructionData) { + self.post_impl(cores, data, "lldi"); + } + + pub fn pre_lmv(&mut self, cores: &mut CPU, data: InstructionData) { + self.pre_impl(cores, data); + } + + pub fn post_lmv(&mut self, cores: &mut CPU, data: InstructionData) { + self.post_impl(cores, data, "lmv"); + } + + pub fn pre_send(&mut self, cores: &mut CPU, data: InstructionData) { + self.pre_impl(cores, data); + } + + pub fn post_send(&mut self, cores: &mut CPU, data: InstructionData) { + self.post_impl(cores, data, "send"); + } + + pub fn pre_recv(&mut self, cores: &mut CPU, data: InstructionData) { + self.pre_impl(cores, data); + } + + pub fn post_recv(&mut self, cores: &mut CPU, data: InstructionData) { + self.post_impl(cores, data, "recv"); + } +} diff --git a/backend-simulators/pim/pim-simulator/src/lib/tracing/trace/mod.rs b/backend-simulators/pim/pim-simulator/src/lib/tracing/trace/mod.rs new file mode 100644 index 0000000..a38b184 --- /dev/null +++ b/backend-simulators/pim/pim-simulator/src/lib/tracing/trace/mod.rs @@ -0,0 +1,28 @@ +use std::{fs::File, path::PathBuf}; + +pub mod pretty_print; +pub mod tracing_isa; + +pub struct Trace { + out_files: Vec, +} + + +impl Trace { + pub fn new() -> Self { + Self { + out_files: Vec::new(), + } + } + + pub fn init(&mut self, num_core: usize, mut path: PathBuf) { + path.pop(); + for i in 0..num_core { + path.push(format!("TraceCore{}", i)); + let file = File::create(&path).expect("Can not create file"); + self.out_files.push(file); + path.pop(); + } + } +} + diff --git a/backend-simulators/pim/pim-simulator/src/lib/tracing/pretty_print.rs b/backend-simulators/pim/pim-simulator/src/lib/tracing/trace/pretty_print.rs similarity index 100% rename from backend-simulators/pim/pim-simulator/src/lib/tracing/pretty_print.rs rename to backend-simulators/pim/pim-simulator/src/lib/tracing/trace/pretty_print.rs diff --git a/backend-simulators/pim/pim-simulator/src/lib/tracing/tracing_isa.rs b/backend-simulators/pim/pim-simulator/src/lib/tracing/trace/tracing_isa.rs similarity index 99% rename from backend-simulators/pim/pim-simulator/src/lib/tracing/tracing_isa.rs rename to backend-simulators/pim/pim-simulator/src/lib/tracing/trace/tracing_isa.rs index 6d0177b..b11f3e0 100644 --- a/backend-simulators/pim/pim-simulator/src/lib/tracing/tracing_isa.rs +++ b/backend-simulators/pim/pim-simulator/src/lib/tracing/trace/tracing_isa.rs @@ -1,4 +1,4 @@ -use crate::tracing::pretty_print; +use crate::{tracing::trace::pretty_print, utility::add_offset_r2}; use std::fs::File; use crate::{ @@ -13,7 +13,6 @@ use crate::{ }; use std::io::Write; -#[cfg(feature = "tracing")] impl Trace { /////////////////////////////////////////////////////////////// /////////////////Scalar/register Instructions////////////////// @@ -284,7 +283,6 @@ impl Trace { M: UpcastDestTraits + MemoryStorable + FromFloat, F: UpcastDestTraits + MemoryStorable, { - use crate::tracing::pretty_print; let (core_indx, rd, r1, mbiw, relu, group) = data.get_core_rd_r1_mbiw_immrelu_immgroup(); let file: &mut File = self @@ -358,8 +356,6 @@ impl Trace { T: UpcastDestTraits + MemoryStorable, F: UpcastDestTraits + MemoryStorable, { - use crate::{tracing::pretty_print, utility::add_offset_r2}; - let (core_indx, rd, r1, r2, imm_len, offset_select, offset_value) = data.get_core_rd_r1_r2_immlen_offset(); let file: &mut File = self @@ -990,8 +986,6 @@ impl Trace { ///////////////////////////////////////////////////////////////// pub fn ld_impl(&mut self, cores: &mut CPU, data: InstructionData, prefix: &'static str) { - use crate::tracing::pretty_print; - let (core, rd, r1, _, imm_len, offset_select, offset_value) = data.get_core_rd_r1_r2_immlen_offset(); let file: &mut File = self @@ -1044,8 +1038,6 @@ impl Trace { } pub fn st_impl(&mut self, cores: &mut CPU, data: InstructionData, prefix: &'static str) { - use crate::tracing::pretty_print; - let (core, rd, r1, _, imm_len, offset_select, offset_value) = data.get_core_rd_r1_r2_immlen_offset(); let file: &mut File = self @@ -1138,7 +1130,6 @@ impl Trace { } fn lmv_impl (&mut self, cores: &mut CPU, data: InstructionData, prefix: &'static str) { - use crate::tracing::pretty_print; let (core, rd, r1, _, imm_len, offset_select, offset_value) = data.get_core_rd_r1_r2_immlen_offset();