diff --git a/.github/workflows/basic_build.yaml b/.github/workflows/basic_build.yaml index c166c6b..b9cd860 100644 --- a/.github/workflows/basic_build.yaml +++ b/.github/workflows/basic_build.yaml @@ -47,13 +47,13 @@ jobs: - name: setup rust run: | rustup set profile minimal - rustup toolchain install nightly-2024-05-07 - rustup default nightly-2024-05-07 + rustup toolchain install nightly-2024-08-01 + rustup default nightly-2024-08-01 - name: build run: | - cargo +nightly-2024-05-07 build --release + cargo +nightly-2024-08-01 build --release - name: test run: | - cargo +nightly-2024-05-07 test --release + cargo +nightly-2024-08-01 test --release diff --git a/Cargo.lock b/Cargo.lock index 940f0e8..9c1801c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13,15 +13,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "aho-corasick" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" -dependencies = [ - "memchr", -] - [[package]] name = "anyhow" version = "1.0.86" @@ -51,9 +42,9 @@ dependencies = [ [[package]] name = "arrayref" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" [[package]] name = "arrayvec" @@ -127,29 +118,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bindgen" -version = "0.69.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" -dependencies = [ - "bitflags", - "cexpr", - "clang-sys", - "itertools 0.12.1", - "lazy_static", - "lazycell", - "log", - "prettyplease", - "proc-macro2 1.0.85", - "quote 1.0.36", - "regex", - "rustc-hash", - "shlex", - "syn 2.0.66", - "which", -] - [[package]] name = "bit-vec" version = "0.6.3" @@ -161,9 +129,9 @@ dependencies = [ [[package]] name = "bitflags" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "bitvec" @@ -257,9 +225,9 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "boojum" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f0c2cba247d620ff76123efb335401aa05ec5639551e6ef4e5f977c0809b5cb" +checksum = "df88daa33db46d683967ca09a4f04817c38950483f2501a771d497669a8a4bb1" dependencies = [ "arrayvec 0.7.4", "bincode", @@ -288,9 +256,9 @@ dependencies = [ [[package]] name = "boojum-cuda" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04e402ed72733b016d29100aa5b500d5cbcf5eaa2b6805aaba1971a355d202c9" +checksum = "407123a79308091866f0199d510ee2fb930727204dd77d6805b3437d6cb859eb" dependencies = [ "boojum", "cmake", @@ -314,24 +282,15 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "cc" -version = "1.0.99" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" - -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] +checksum = "26a5c3fd7bfa1ce3897a3a3501d362b2d87b7f2583ebcb4a949ec25911025cbc" [[package]] name = "cfg-if" @@ -347,9 +306,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "circuit_definitions" -version = "0.150.0" +version = "0.150.2-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0386d9218f77e2e8b9430e642192ef7f6bf1cbad4f999f70e3c546857d858a" +checksum = "68c5da9d10ee04601445afac76591f838b4f64f4f8fb8c3d1b3414a260d51b6c" dependencies = [ "circuit_encodings", "crossbeam 0.8.4", @@ -361,9 +320,9 @@ dependencies = [ [[package]] name = "circuit_encodings" -version = "0.150.0" +version = "0.150.2-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3632bf2ab308c811784f8a72b29133b850e8618c7d26e5d35de5c49a3e1d3b4" +checksum = "c928cad0aeeb35e86f8605376fdbb27b506cfcec14af1f532459a47e34d8b6f9" dependencies = [ "derivative", "serde", @@ -371,17 +330,6 @@ dependencies = [ "zkevm_circuits", ] -[[package]] -name = "clang-sys" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" -dependencies = [ - "glob", - "libc", - "libloading", -] - [[package]] name = "cmake" version = "0.1.50" @@ -412,7 +360,7 @@ version = "0.2.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7f6ff08fd20f4f299298a28e2dfa8a8ba1036e6cd2460ac1de7b425d76f2500" dependencies = [ - "proc-macro2 1.0.85", + "proc-macro2 1.0.86", "quote 1.0.36", "unicode-xid 0.2.4", ] @@ -609,12 +557,12 @@ dependencies = [ [[package]] name = "cs_derive" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faa0b8f9fdb5c91dcd5569cc7cbc11f514fd784a34988ead8455db0db2cfc1c7" +checksum = "24cf603ca4299c6e20e644da88897f7b81d688510f4887e818b0bfe0b792081b" dependencies = [ "proc-macro-error", - "proc-macro2 1.0.85", + "proc-macro2 1.0.86", "quote 1.0.36", "syn 1.0.109", ] @@ -636,7 +584,7 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ - "proc-macro2 1.0.85", + "proc-macro2 1.0.86", "quote 1.0.36", "syn 1.0.109", ] @@ -678,9 +626,9 @@ dependencies = [ [[package]] name = "either" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "elliptic-curve" @@ -710,9 +658,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "era_cudart" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1725b17e5e41b89f566ace3900f119fdc87f04e2daa8e253b668573ad67a454f" +checksum = "6592e1277ac1ab0f3925151784a3809f4f973b1a63a0244b6d44e3872b413199" dependencies = [ "bitflags", "era_cudart_sys", @@ -721,24 +669,13 @@ dependencies = [ [[package]] name = "era_cudart_sys" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60d46683f8a9a5364874f95b00073f6dc93d33e9a019f150b0d6ce09ffc13251" +checksum = "21767c452b418a7fb2bb9ffb07c744e4616da8d14176db4dcab76649c3206ece" dependencies = [ - "bindgen", "serde_json", ] -[[package]] -name = "errno" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" -dependencies = [ - "libc", - "windows-sys", -] - [[package]] name = "ethbloom" version = "0.13.0" @@ -795,10 +732,10 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b96fbccd88dbb1fac4ee4a07c2fcc4ca719a74ffbd9d2b9d41d8c8eb073d8b20" dependencies = [ - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-integer", "num-traits", - "proc-macro2 1.0.85", + "proc-macro2 1.0.86", "quote 1.0.36", "serde", "syn 1.0.109", @@ -824,9 +761,9 @@ dependencies = [ [[package]] name = "franklin-crypto" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77d90323407438ad4fc3385f2dc78f5e92aa4d67a03a08a8562396d68a07f96b" +checksum = "05eab544ba915269919b5f158a061b540a4e3a04150c1346481f4f7b80eb6311" dependencies = [ "arr_macro", "bellman_ce", @@ -842,7 +779,7 @@ dependencies = [ "indexmap 1.9.3", "itertools 0.10.5", "lazy_static", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-derive", "num-integer", "num-traits", @@ -967,12 +904,6 @@ dependencies = [ "wasi", ] -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - [[package]] name = "group" version = "0.13.0" @@ -1017,15 +948,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "home" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -dependencies = [ - "windows-sys", -] - [[package]] name = "impl-codec" version = "0.6.0" @@ -1059,7 +981,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" dependencies = [ - "proc-macro2 1.0.85", + "proc-macro2 1.0.86", "quote 1.0.36", "syn 1.0.109", ] @@ -1076,9 +998,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "de3fc2e30ba82dd1b3911c8de1ffc143c74a914a14e99514d7637e3099df5ea0" dependencies = [ "equivalent", "hashbrown 0.14.5", @@ -1093,15 +1015,6 @@ dependencies = [ "either", ] -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.13.0" @@ -1146,34 +1059,12 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - [[package]] name = "libc" version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" -[[package]] -name = "libloading" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" -dependencies = [ - "cfg-if 1.0.0", - "windows-targets", -] - -[[package]] -name = "linux-raw-sys" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" - [[package]] name = "lock_api" version = "0.4.12" @@ -1186,9 +1077,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "maybe-uninit" @@ -1211,35 +1102,19 @@ dependencies = [ "autocfg", ] -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - [[package]] name = "nodrop" version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" -[[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 = "num" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" dependencies = [ - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-complex", "num-integer", "num-iter", @@ -1260,9 +1135,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ "num-integer", "num-traits", @@ -1325,7 +1200,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" dependencies = [ - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-integer", "num-traits", ] @@ -1365,9 +1240,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" dependencies = [ "proc-macro-crate 1.3.1", - "proc-macro2 1.0.85", + "proc-macro2 1.0.86", "quote 1.0.36", - "syn 2.0.66", + "syn 2.0.72", ] [[package]] @@ -1437,7 +1312,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" dependencies = [ "proc-macro-crate 3.1.0", - "proc-macro2 1.0.85", + "proc-macro2 1.0.86", "quote 1.0.36", "syn 1.0.109", ] @@ -1504,18 +1379,11 @@ dependencies = [ [[package]] name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "prettyplease" version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" dependencies = [ - "proc-macro2 1.0.85", - "syn 2.0.66", + "zerocopy", ] [[package]] @@ -1566,7 +1434,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", - "proc-macro2 1.0.85", + "proc-macro2 1.0.86", "quote 1.0.36", "syn 1.0.109", "version_check", @@ -1578,7 +1446,7 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2 1.0.85", + "proc-macro2 1.0.86", "quote 1.0.36", "version_check", ] @@ -1600,9 +1468,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.85" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -1622,7 +1490,7 @@ version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ - "proc-macro2 1.0.85", + "proc-macro2 1.0.86", ] [[package]] @@ -1720,47 +1588,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ "bitflags", ] -[[package]] -name = "regex" -version = "1.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" - [[package]] name = "rescue_poseidon" -version = "0.5.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50e3a9a33bb7d2a469247e4f5fc47f7ab87807cd603739d306fa84e06ca0a160" +checksum = "f27fbc6ba44baf99a0ca8387b1fa1cf90d3d7062860c1afedbbb64454829acc5" dependencies = [ "addchain", "arrayvec 0.7.4", @@ -1801,31 +1640,12 @@ dependencies = [ "rustc-hex", ] -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - [[package]] name = "rustc-hex" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" -[[package]] -name = "rustix" -version = "0.38.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" -dependencies = [ - "bitflags", - "errno", - "libc", - "linux-raw-sys", - "windows-sys", -] - [[package]] name = "ryu" version = "1.0.18" @@ -1834,9 +1654,9 @@ checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "scc" -version = "2.1.1" +version = "2.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76ad2bbb0ae5100a07b7a6f2ed7ab5fd0045551a4c507989b7a620046ea3efdc" +checksum = "8d777f59627453628a9a5be1ee8d948745b94b1dfc2d0c3099cbd9e08ab89e7c" dependencies = [ "sdd", ] @@ -1849,9 +1669,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sdd" -version = "0.2.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b84345e4c9bd703274a082fb80caaa99b7612be48dfaa1dd9266577ec412309d" +checksum = "177258b64c0faaa9ffd3c65cd3262c2bc7e2588dbbd9c1641d0346145c1bbda8" [[package]] name = "sec1" @@ -1875,31 +1695,32 @@ checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4" [[package]] name = "serde" -version = "1.0.203" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.203" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" dependencies = [ - "proc-macro2 1.0.85", + "proc-macro2 1.0.86", "quote 1.0.36", - "syn 2.0.66", + "syn 2.0.72", ] [[package]] name = "serde_json" -version = "1.0.117" +version = "1.0.122" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +checksum = "784b6203951c57ff748476b126ccb5e8e2959a5c19e5c617ab1956be3dbc68da" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -1924,9 +1745,9 @@ version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "82fe9db325bcef1fbcde82e078a5cc4efdf787e96b3b9cf45b50b529f2083d67" dependencies = [ - "proc-macro2 1.0.85", + "proc-macro2 1.0.86", "quote 1.0.36", - "syn 2.0.66", + "syn 2.0.72", ] [[package]] @@ -1987,7 +1808,7 @@ dependencies = [ [[package]] name = "shivini" -version = "0.150.0" +version = "0.150.2-rc3" dependencies = [ "bincode", "blake2 0.10.6", @@ -2006,12 +1827,6 @@ dependencies = [ "smallvec", ] -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - [[package]] name = "signature" version = "2.2.0" @@ -2042,9 +1857,9 @@ dependencies = [ [[package]] name = "snark_wrapper" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6e57fa6c50ac36e39c58bf411aa5b9ca2f2a878c3da9769fb12736fc77ee346" +checksum = "71aa5bffe5e7daca634bf2fedf0bf566273cb7eae01711d1aa6e5223d36d987d" dependencies = [ "derivative", "rand 0.4.6", @@ -2075,9 +1890,9 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" @@ -2096,18 +1911,18 @@ version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ - "proc-macro2 1.0.85", + "proc-macro2 1.0.86", "quote 1.0.36", "unicode-ident", ] [[package]] name = "syn" -version = "2.0.66" +version = "2.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" +checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" dependencies = [ - "proc-macro2 1.0.85", + "proc-macro2 1.0.86", "quote 1.0.36", "unicode-ident", ] @@ -2138,9 +1953,9 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" [[package]] name = "toml_edit" @@ -2148,7 +1963,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.3.0", "toml_datetime", "winnow", ] @@ -2159,7 +1974,7 @@ version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.3.0", "toml_datetime", "winnow", ] @@ -2224,9 +2039,9 @@ dependencies = [ [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "wasi" @@ -2234,18 +2049,6 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix", -] - [[package]] name = "winapi" version = "0.3.9" @@ -2268,20 +2071,11 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets", -] - [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", @@ -2295,51 +2089,51 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" @@ -2359,6 +2153,27 @@ dependencies = [ "tap", ] +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2 1.0.86", + "quote 1.0.36", + "syn 2.0.72", +] + [[package]] name = "zeroize" version = "1.8.1" @@ -2395,9 +2210,9 @@ dependencies = [ [[package]] name = "zkevm_circuits" -version = "0.150.0" +version = "0.150.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4691ca0faeb666120ad48fb1a45750c5bacc90118a851f4450f3e1e903f9b2e3" +checksum = "94d97632ba26e4e6a77a680d6b2bfbcc6f7b9b722976ee31afb922d16a675d45" dependencies = [ "arrayvec 0.7.4", "boojum", diff --git a/Cargo.toml b/Cargo.toml index fcd2b3e..f7d6e77 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "shivini" -version = "0.150.2-rc.1" +version = "0.150.2-rc3" edition = "2021" authors = ["The Matter Labs Team "] homepage = "https://zksync.io/" @@ -8,15 +8,17 @@ repository = "https://github.com/matter-labs/era-shivini" license = "MIT OR Apache-2.0" keywords = ["blockchain", "zksync"] categories = ["cryptography"] -description = "ZKsync library for GPU proving" +description = "Shvini is a library implementing a GPU-accelerated zkSync prover" exclude = ["/test_data"] +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + [dependencies] -boojum = "=0.2.0" -boojum-cuda = "=0.1.0" -cudart = { version = "=0.1.0", package = "era_cudart" } -cudart-sys = { version = "=0.1.0", package = "era_cudart_sys" } -circuit_definitions = { version = "=0.150.2-rc.1", package = "circuit_definitions", optional = true } +boojum = "=0.2.2" +boojum-cuda = "=0.2.0" +era_cudart = "=0.2.0" +era_cudart_sys = "=0.2.0" +circuit_definitions = { version = "=0.150.2-rc.3", package = "circuit_definitions", optional = true } rand = "0.8" smallvec = { version = "1.13", features = [ @@ -30,7 +32,7 @@ hex = "0.4" derivative = "2.2" bincode = "1.3" serde = { version = "1.0", features = ["derive"] } -nvtx = "1.3" +nvtx = { version = "1.3", optional = true } [dev-dependencies] serial_test = "3.1" @@ -39,6 +41,7 @@ serial_test = "3.1" default = ["zksync"] zksync = ["circuit_definitions"] allocator_stats = [] +nvtx = ["dep:nvtx"] [profile.release] incremental = true diff --git a/rust-toolchain.toml b/rust-toolchain.toml index a671fa6..bc5d1d6 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "nightly-2024-05-07" +channel = "nightly-2024-08-01" diff --git a/src/context.rs b/src/context.rs index 6ed1d17..a9c2346 100644 --- a/src/context.rs +++ b/src/context.rs @@ -1,11 +1,11 @@ use super::*; use boojum_cuda::context::Context; -use cudart::device::{device_get_attribute, get_device}; -use cudart::event::{CudaEvent, CudaEventCreateFlags}; -use cudart::memory::{CudaHostAllocFlags, HostAllocation}; -use cudart::slice::DeviceSlice; -use cudart::stream::CudaStreamCreateFlags; -use cudart_sys::CudaDeviceAttr; +use era_cudart::device::{device_get_attribute, get_device}; +use era_cudart::event::{CudaEvent, CudaEventCreateFlags}; +use era_cudart::memory::{CudaHostAllocFlags, HostAllocation}; +use era_cudart::slice::DeviceSlice; +use era_cudart::stream::CudaStreamCreateFlags; +use era_cudart_sys::CudaDeviceAttr; use std::collections::HashMap; pub(crate) const NUM_AUX_STREAMS_AND_EVENTS: usize = 4; @@ -167,8 +167,8 @@ impl Drop for ProverContext { // Should some of this logic live in boojum-cuda instead? fn set_l2_persistence_carveout(num_bytes: usize) -> CudaResult<()> { - use cudart::device::device_set_limit; - use cudart_sys::CudaLimit; + use era_cudart::device::device_set_limit; + use era_cudart_sys::CudaLimit; let l2_persist_max = get_context().l2_persist_max; let carveout = std::cmp::min(num_bytes, l2_persist_max); device_set_limit(CudaLimit::PersistingL2CacheSize, carveout)?; @@ -176,9 +176,9 @@ fn set_l2_persistence_carveout(num_bytes: usize) -> CudaResult<()> { } fn set_l2_persistence(data: &DeviceSlice, stream: &CudaStream) -> CudaResult<()> { - use cudart::execution::CudaLaunchAttribute; - use cudart_sys::CudaAccessPolicyWindow; - use cudart_sys::CudaAccessProperty; + use era_cudart::execution::CudaLaunchAttribute; + use era_cudart_sys::CudaAccessPolicyWindow; + use era_cudart_sys::CudaAccessProperty; let num_bytes = 8 * data.len(); let stream_attribute = CudaLaunchAttribute::AccessPolicyWindow(CudaAccessPolicyWindow { base_ptr: data.as_ptr() as *mut std::os::raw::c_void, diff --git a/src/cs/setup.rs b/src/cs/setup.rs index 0d0deea..2716784 100644 --- a/src/cs/setup.rs +++ b/src/cs/setup.rs @@ -12,7 +12,7 @@ use boojum::{ worker::Worker, }; use boojum_cuda::ops_complex::pack_variable_indexes; -use cudart::slice::{CudaSlice, DeviceSlice}; +use era_cudart::slice::{CudaSlice, DeviceSlice}; use super::*; pub(crate) const PACKED_PLACEHOLDER_BITMASK: u32 = 1 << 31; diff --git a/src/cs/witness.rs b/src/cs/witness.rs index 98fbcd6..9e2f347 100644 --- a/src/cs/witness.rs +++ b/src/cs/witness.rs @@ -1,7 +1,7 @@ use super::*; use boojum_cuda::ops_complex::select; -use cudart::slice::DeviceSlice; +use era_cudart::slice::DeviceSlice; pub fn variable_assignment( d_variable_indexes: &DVec, diff --git a/src/data_structures/cache.rs b/src/data_structures/cache.rs index d26a33b..4b5e8d4 100644 --- a/src/data_structures/cache.rs +++ b/src/data_structures/cache.rs @@ -5,7 +5,7 @@ use boojum::cs::implementations::verifier::{VerificationKey, VerificationKeyCirc use boojum::cs::implementations::witness::WitnessVec; use boojum::cs::oracle::TreeHasher; use boojum::worker::Worker; -use cudart_sys::CudaError::ErrorMemoryAllocation; +use era_cudart_sys::CudaError::ErrorMemoryAllocation; use std::collections::BTreeMap; use std::ops::Deref; use std::rc::Rc; diff --git a/src/data_structures/trace.rs b/src/data_structures/trace.rs index 1850819..965c6aa 100644 --- a/src/data_structures/trace.rs +++ b/src/data_structures/trace.rs @@ -3,7 +3,7 @@ use boojum::{ field::U64Representable, worker::Worker, }; -use cudart::slice::CudaSlice; +use era_cudart::slice::CudaSlice; use std::ops::Range; use super::*; diff --git a/src/oracle.rs b/src/oracle.rs index b846b50..23edbec 100644 --- a/src/oracle.rs +++ b/src/oracle.rs @@ -303,7 +303,7 @@ pub fn batch_query_tree, A: GoodAllocator>( num_elems_per_leaf: usize, h_all_proofs: &mut Vec, ) -> CudaResult<()> { - use cudart::slice::DeviceSlice; + use era_cudart::slice::DeviceSlice; assert_eq!(d_indexes.len(), num_queries); assert!(domain_size.is_power_of_two()); assert!(cap_size.is_power_of_two()); @@ -346,7 +346,7 @@ pub fn batch_query_leaf_sources( h_all_leaf_elems: &mut Vec, ) -> CudaResult<()> { use boojum_cuda::device_structures::{DeviceMatrix, DeviceMatrixMut}; - use cudart::slice::DeviceSlice; + use era_cudart::slice::DeviceSlice; assert_eq!(d_indexes.len(), num_queries); assert!(domain_size.is_power_of_two()); assert_eq!(domain_size, d_leaf_sources.domain_size()); diff --git a/src/pow.rs b/src/pow.rs index 1c1cfae..94d0442 100644 --- a/src/pow.rs +++ b/src/pow.rs @@ -1,13 +1,13 @@ use super::*; use boojum::cs::implementations::pow::PoWRunner; -use cudart::slice::DeviceVariable; +use era_cudart::slice::DeviceVariable; pub struct DeviceBlake2sPOW; impl PoWRunner for DeviceBlake2sPOW { fn run_from_bytes(h_seed: Vec, pow_bits: u32, _worker: &boojum::worker::Worker) -> u64 { - use cudart::slice::DeviceSlice; + use era_cudart::slice::DeviceSlice; let _seed_len = h_seed.len(); let unit_len = std::mem::size_of::(); assert_eq!(h_seed.len() % unit_len, 0); diff --git a/src/primitives/arith.rs b/src/primitives/arith.rs index 44a4426..7e8c2ba 100644 --- a/src/primitives/arith.rs +++ b/src/primitives/arith.rs @@ -5,7 +5,7 @@ use boojum_cuda::extension_field::VectorizedExtensionField; // arithmetic operations use boojum_cuda::ops_cub::device_scan::*; use boojum_cuda::ops_simple::*; -use cudart::slice::DeviceVariable; +use era_cudart::slice::DeviceVariable; pub fn add_assign(this: &mut [F], other: &[F]) -> CudaResult<()> { assert_eq!(this.len(), other.len()); diff --git a/src/primitives/cs_helpers.rs b/src/primitives/cs_helpers.rs index 24ed693..505fee9 100644 --- a/src/primitives/cs_helpers.rs +++ b/src/primitives/cs_helpers.rs @@ -5,7 +5,7 @@ use boojum_cuda::{ device_structures::{DeviceMatrix, DeviceMatrixMut}, extension_field::VectorizedExtensionField, }; -use cudart::stream::CudaStreamWaitEventFlags; +use era_cudart::stream::CudaStreamWaitEventFlags; use std::mem::size_of; #[allow(dead_code)] diff --git a/src/primitives/dry_run.rs b/src/primitives/dry_run.rs index 0b81b55..b315174 100644 --- a/src/primitives/dry_run.rs +++ b/src/primitives/dry_run.rs @@ -1,5 +1,5 @@ -use cudart::result::CudaResult; -use cudart_sys::CudaError; +use era_cudart::result::CudaResult; +use era_cudart_sys::CudaError; #[derive(Debug, Clone, Copy, PartialEq, Eq)] enum DryRunState { diff --git a/src/primitives/helpers.rs b/src/primitives/helpers.rs index 04d858b..aea2d81 100644 --- a/src/primitives/helpers.rs +++ b/src/primitives/helpers.rs @@ -3,7 +3,7 @@ use boojum_cuda::{ ops_cub::device_scan::get_scan_temp_storage_bytes, ops_simple::{set_by_ref, set_by_val, set_to_zero, SetByRef, SetByVal}, }; -use cudart::slice::DeviceVariable; +use era_cudart::slice::DeviceVariable; use super::*; @@ -149,7 +149,7 @@ pub fn rotate_left(values: &mut [F]) -> CudaResult<()> { #[allow(dead_code)] pub fn set_zero_static(buffer: &mut [u8]) -> CudaResult<()> { - use cudart::memory::memory_set; + use era_cudart::memory::memory_set; let buffer = unsafe { DeviceSlice::from_mut_slice(buffer) }; if_not_dry_run! { memory_set(buffer, 0) diff --git a/src/primitives/mem.rs b/src/primitives/mem.rs index c92369b..cc2f762 100644 --- a/src/primitives/mem.rs +++ b/src/primitives/mem.rs @@ -1,8 +1,8 @@ use super::*; use boojum::worker::Worker; -use cudart::execution::{launch_host_fn, HostFn}; -pub use cudart::memory::memory_copy_async; -use cudart::stream::CudaStreamWaitEventFlags; +use era_cudart::execution::{launch_host_fn, HostFn}; +pub use era_cudart::memory::memory_copy_async; +use era_cudart::stream::CudaStreamWaitEventFlags; use std::intrinsics::copy_nonoverlapping; use std::mem::size_of; use std::ops::DerefMut; diff --git a/src/primitives/mod.rs b/src/primitives/mod.rs index b55eb84..5daf1d0 100644 --- a/src/primitives/mod.rs +++ b/src/primitives/mod.rs @@ -9,7 +9,7 @@ pub(crate) mod tree; use super::*; pub use ::boojum_cuda::gates::GateEvaluationParams; pub use boojum_cuda::context::Context as CudaContext; -pub use cudart::result::CudaResult; -use cudart::slice::CudaSlice; -use cudart::slice::DeviceSlice; -pub use cudart::stream::CudaStream; +pub use era_cudart::result::CudaResult; +use era_cudart::slice::CudaSlice; +use era_cudart::slice::DeviceSlice; +pub use era_cudart::stream::CudaStream; diff --git a/src/primitives/ntt.rs b/src/primitives/ntt.rs index 08d8498..1e7f634 100644 --- a/src/primitives/ntt.rs +++ b/src/primitives/ntt.rs @@ -1,6 +1,6 @@ use super::*; -use cudart::stream::CudaStreamWaitEventFlags; +use era_cudart::stream::CudaStreamWaitEventFlags; // ntt operations diff --git a/src/prover.rs b/src/prover.rs index 031bd3d..3f73479 100644 --- a/src/prover.rs +++ b/src/prover.rs @@ -1082,7 +1082,7 @@ impl GpuProof { assert_eq!( num_queries, - query_details.iter().map(|coset| coset.len()).sum() + query_details.iter().map(|coset| coset.len()).sum::() ); let typical_capacity_for_merkle_caps = merkle_tree_cap_size; // it is guaranteed that number of leaf elems is the largest in the witness tree than other trees diff --git a/src/static_allocator/device.rs b/src/static_allocator/device.rs index 24a7892..e8bd31f 100644 --- a/src/static_allocator/device.rs +++ b/src/static_allocator/device.rs @@ -1,11 +1,11 @@ -use cudart::memory::{memory_get_info, DeviceAllocation}; +use era_cudart::memory::{memory_get_info, DeviceAllocation}; use super::*; use derivative::*; use std::alloc::{Allocator, Layout}; use std::ops::Deref; -use cudart_sys::CudaError; +use era_cudart_sys::CudaError; use std::ptr::NonNull; use std::sync::{Arc, Mutex}; @@ -158,7 +158,7 @@ impl StaticDeviceAllocator { } pub fn as_ptr(&self) -> *const u8 { - cudart::slice::CudaSlice::as_ptr(self.memory.deref()) + era_cudart::slice::CudaSlice::as_ptr(self.memory.deref()) } pub fn block_size_in_bytes(&self) -> usize { diff --git a/src/static_allocator/host.rs b/src/static_allocator/host.rs index 163ebdb..330f37e 100644 --- a/src/static_allocator/host.rs +++ b/src/static_allocator/host.rs @@ -1,6 +1,6 @@ use super::*; -use cudart::memory::{CudaHostAllocFlags, HostAllocation}; use derivative::*; +use era_cudart::memory::{CudaHostAllocFlags, HostAllocation}; use std::alloc::{Allocator, Layout}; use std::ptr::NonNull; @@ -38,7 +38,7 @@ impl StaticHostAllocator { } pub fn as_ptr(&self) -> *const u8 { - use cudart::slice::CudaSlice; + use era_cudart::slice::CudaSlice; self.memory.as_ptr() } diff --git a/src/test.rs b/src/test.rs index bc29d38..099afc8 100644 --- a/src/test.rs +++ b/src/test.rs @@ -796,7 +796,7 @@ mod zksync { use crate::cs::PACKED_PLACEHOLDER_BITMASK; use boojum::cs::implementations::fast_serialization::MemcopySerializable; use circuit_definitions::circuit_definitions::base_layer::ZkSyncBaseLayerCircuit; - use cudart_sys::CudaError; + use era_cudart_sys::CudaError; pub type ZksyncProof = Proof; @@ -1318,25 +1318,33 @@ mod zksync { println!("warmup"); proof_fn(); _setup_cache_reset(); + #[cfg(feature = "nvtx")] nvtx::range_push!("test"); + #[cfg(feature = "nvtx")] nvtx::range_push!("first run"); println!("first run"); let start = std::time::Instant::now(); proof_fn(); println!("◆ total: {:?}", start.elapsed()); + #[cfg(feature = "nvtx")] nvtx::range_pop!(); + #[cfg(feature = "nvtx")] nvtx::range_push!("second run"); println!("second run"); let start = std::time::Instant::now(); proof_fn(); println!("◆ total: {:?}", start.elapsed()); + #[cfg(feature = "nvtx")] nvtx::range_pop!(); + #[cfg(feature = "nvtx")] nvtx::range_push!("third run"); println!("third run"); let start = std::time::Instant::now(); proof_fn(); println!("◆ total: {:?}", start.elapsed()); + #[cfg(feature = "nvtx")] nvtx::range_pop!(); + #[cfg(feature = "nvtx")] nvtx::range_pop!(); drop(ctx); return;