From 6dd2d21bff8d1a54e48ae1085528a90871a59acc Mon Sep 17 00:00:00 2001 From: Harold Brenes Date: Thu, 12 Oct 2023 22:18:19 -0400 Subject: [PATCH 01/15] Add missing `--device` to simulator Signed-off-by: Harold Brenes <152330941+haorldbchi@users.noreply.github.com> --- src/commands/CmdSimulator.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/commands/CmdSimulator.cpp b/src/commands/CmdSimulator.cpp index e1c48251..e29089bd 100644 --- a/src/commands/CmdSimulator.cpp +++ b/src/commands/CmdSimulator.cpp @@ -92,6 +92,7 @@ void CmdSimulateMain( GlobalPlotConfig& gCfg, CliParser& cli ) else if( cli.ReadSize( cfg.farmSize, "-s", "--size" ) ) continue; else if( cli.ReadHexStrAsBytes( cfg.randomSeed, sizeof( cfg.randomSeed ), "--seed" ) ) continue; else if( cli.ReadSwitch( cfg.noCuda, "--no-cuda" ) ) continue; + else if( cli.ReadI32( cfg.cudaDevice, "-d", "--device" ) ) continue; else break; } From 69cd6bde97974e172635b3fd43bc28f36d329931 Mon Sep 17 00:00:00 2001 From: Harold Brenes Date: Fri, 8 Dec 2023 16:42:40 -0500 Subject: [PATCH 02/15] Simple CUDA device listing Signed-off-by: Harold Brenes <152330941+haorldbchi@users.noreply.github.com> --- .vscode/launch.json | 6 +++- cuda/CudaPlotter.cu | 73 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+), 1 deletion(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index bb356736..0e8e671c 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -137,7 +137,11 @@ // "--memo", "80a836a74b077cabaca7a76d1c3c9f269f7f3a8f2fa196a65ee8953eb81274eb8b7328d474982617af5a0fe71b47e9b8ade0cc43610ce7540ab96a524d0ab17f5df7866ef13d1221a7203e5d10ad2a4ae37f7b73f6cdfd6ddf4122e8a1c2f8ef207d52406afa2b6d7d92ea778f407205bd9dca40816c1b1cacfca2a6612b93eb", "args": - "-w -n 1 -z 1 -f ade0cc43610ce7540ab96a524d0ab17f5df7866ef13d1221a7203e5d10ad2a4ae37f7b73f6cdfd6ddf4122e8a1c2f8ef -p 80a836a74b077cabaca7a76d1c3c9f269f7f3a8f2fa196a65ee8953eb81274eb8b7328d474982617af5a0fe71b47e9b8 -i c6b84729c23dc6d60c92f22c17083f47845c1179227c5509f07a5d2804a7b835 cudaplot --check 100 --check-threshold 2 /home/harold/plot", + + // List devices + "-w -n 1 -z 1 -f ade0cc43610ce7540ab96a524d0ab17f5df7866ef13d1221a7203e5d10ad2a4ae37f7b73f6cdfd6ddf4122e8a1c2f8ef -p 80a836a74b077cabaca7a76d1c3c9f269f7f3a8f2fa196a65ee8953eb81274eb8b7328d474982617af5a0fe71b47e9b8 cudaplot -l", + + // "-w -n 1 -z 1 -f ade0cc43610ce7540ab96a524d0ab17f5df7866ef13d1221a7203e5d10ad2a4ae37f7b73f6cdfd6ddf4122e8a1c2f8ef -p 80a836a74b077cabaca7a76d1c3c9f269f7f3a8f2fa196a65ee8953eb81274eb8b7328d474982617af5a0fe71b47e9b8 -i c6b84729c23dc6d60c92f22c17083f47845c1179227c5509f07a5d2804a7b835 cudaplot --check 100 --check-threshold 2 /home/harold/plot", // "-w -z 1 -f ade0cc43610ce7540ab96a524d0ab17f5df7866ef13d1221a7203e5d10ad2a4ae37f7b73f6cdfd6ddf4122e8a1c2f8ef -p 80a836a74b077cabaca7a76d1c3c9f269f7f3a8f2fa196a65ee8953eb81274eb8b7328d474982617af5a0fe71b47e9b8 -i c6b84729c23dc6d60c92f22c17083f47845c1179227c5509f07a5d2804a7b835 cudaplot /home/harold/plot", // "-w -z 1 -f ade0cc43610ce7540ab96a524d0ab17f5df7866ef13d1221a7203e5d10ad2a4ae37f7b73f6cdfd6ddf4122e8a1c2f8ef -p 80a836a74b077cabaca7a76d1c3c9f269f7f3a8f2fa196a65ee8953eb81274eb8b7328d474982617af5a0fe71b47e9b8 -i c6b84729c23dc6d60c92f22c17083f47845c1179227c5509f07a5d2804a7b835 cudaplot --disk-128 -t1 /home/harold/plotdisk --no-direct-buffers /home/harold/plot", diff --git a/cuda/CudaPlotter.cu b/cuda/CudaPlotter.cu index 80ba8b0e..95cd8fe4 100644 --- a/cuda/CudaPlotter.cu +++ b/cuda/CudaPlotter.cu @@ -47,6 +47,7 @@ static void UploadBucketToGpu( CudaK32PlotContext& context, TableId table, const static void LoadAndSortBucket( CudaK32PlotContext& cx, const uint32 bucket ); void CudaMatchBucketizedK32( CudaK32PlotContext& cx, const uint32* devY, cudaStream_t stream, cudaEvent_t event ); +[[noreturn]] static void ListCudaDevices( bool json ); // Defined in FxCuda.cu void GenFx( CudaK32PlotContext& cx, const uint32* devYIn, const uint32* devMetaIn, cudaStream_t stream ); @@ -59,6 +60,11 @@ GPU-based (CUDA) plotter -h, --help : Shows this help message and exits. -d, --device : Select the CUDA device index. (default=0) + -l, --list : List availabe CUDA devices, showing their indices. + + --json : Show output in json format. This is only valid for certain parameters: + --list + --disk-128 : Enable hybrid disk plotting for 128G system RAM. Requires a --temp1 and --temp2 to be set. @@ -95,6 +101,9 @@ void CudaK32Plotter::ParseCLI( const GlobalPlotConfig& gCfg, CliParser& cli ) CudaK32PlotConfig& cfg = _cfg; cfg.gCfg = &gCfg; + bool listDevices = false; + bool json = false; + while( cli.HasArgs() ) { if( cli.ReadU32( cfg.deviceIndex, "-d", "--device" ) ) @@ -127,6 +136,10 @@ void CudaK32Plotter::ParseCLI( const GlobalPlotConfig& gCfg, CliParser& cli ) continue; if( cli.ReadF64( cfg.plotCheckThreshhold, "--check-threshold" ) ) continue; + if( cli.ReadSwitch( json, "--json" ) ) + continue; + if( cli.ReadSwitch( listDevices, "-l", "--list" ) ) + continue; // if( cli.ReadSwitch( cfg.disableDirectDownloads, "--no-direct-buffers" ) ) // continue; if( cli.ArgMatch( "--help", "-h" ) ) @@ -139,6 +152,8 @@ void CudaK32Plotter::ParseCLI( const GlobalPlotConfig& gCfg, CliParser& cli ) } // The rest should be output directies, parsed by the global config parser. + if( listDevices ) + ListCudaDevices( json ); if( cfg.hybrid128Mode && gCfg.compressionLevel <= 0 ) { @@ -347,6 +362,64 @@ void CudaInit( CudaK32PlotContext& cx ) //FatalIf( supportsCoopLaunch != 1, "This CUDA device does not support cooperative kernel launches." ); } +//----------------------------------------------------------- +void ListCudaDevices( const bool json ) +{ + cudaError_t err = cudaSuccess; + int deviceCount = 0; + + #define CheckCudaSuccess( x ) if( (err = x) != cudaSuccess ) goto CUDA_ERROR_EXIT; + + { + CheckCudaSuccess( cudaGetDeviceCount( &deviceCount ) ); + + if( deviceCount < 1 ) + { + const char* e = "No CUDA devices available."; + if( json ) + Log::Line( R"({"error": "%s"})", e ); + else + Log::Line( e ); + exit(0); + } + + if( json ) + Log::Line("["); + + for( int i = 0; i < deviceCount; i++ ) + { + cudaDeviceProp cudaDevProps{}; + CheckCudaSuccess( cudaGetDeviceProperties( &cudaDevProps, i ) ); + + if( json ) + { + Log::Write( R"( {"id": %d, "name": "%s"})", i, cudaDevProps.name ); + if( i+1 < deviceCount ) + Log::Write( "," ); + + Log::NewLine(); + } + else + Log::Line( "%-2d: %s", i, cudaDevProps.name ); + } + + if( json ) + Log::Line("]"); + + exit(0); + } + + #undef CheckCudaSuccess + CUDA_ERROR_EXIT: + + if( json ) + Log::Error( R"({ "error": "Failed to list CUDA devices with error 0x%llx: '%s'"})", (llu)err, cudaGetErrorString( err ) ); + else + Log::Error( "Failed to list CUDA devices with error 0x%llx: '%s'.", (llu)err, cudaGetErrorString( err ) ); + + exit(1); +} + /// /// Plotting entry point From 13a746dc268ae50bb003a5bb2cde4ef433c19967 Mon Sep 17 00:00:00 2001 From: Chris Marslender Date: Tue, 5 Mar 2024 16:57:26 -0600 Subject: [PATCH 03/15] Add content updater settings for license variance (#456) Signed-off-by: Harold Brenes <152330941+haorldbchi@users.noreply.github.com> --- .repo-content-updater.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .repo-content-updater.yml diff --git a/.repo-content-updater.yml b/.repo-content-updater.yml new file mode 100644 index 00000000..f3033a45 --- /dev/null +++ b/.repo-content-updater.yml @@ -0,0 +1,3 @@ +# So that the LICENSE can be kept up to date while retaining both names +var_overrides: + COMPANY_NAME: "Harold Brenes, Chia Network Inc." From f7d54422112a1e8ff2bb9117d8536b9908c44f60 Mon Sep 17 00:00:00 2001 From: Chia Automation Date: Tue, 5 Mar 2024 22:59:12 +0000 Subject: [PATCH 04/15] Update license Signed-off-by: Harold Brenes <152330941+haorldbchi@users.noreply.github.com> --- LICENSE | 402 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 201 insertions(+), 201 deletions(-) diff --git a/LICENSE b/LICENSE index 4a598671..1cda2cf5 100644 --- a/LICENSE +++ b/LICENSE @@ -1,201 +1,201 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2023 Harold Brenes, Chia Network Inc - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2024 Harold Brenes, Chia Network Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. From e4e3f6f37e6e6e2818e465822668ca6fbbaccad2 Mon Sep 17 00:00:00 2001 From: ChiaAutomation <85647627+ChiaAutomation@users.noreply.github.com> Date: Fri, 17 May 2024 12:22:32 -0500 Subject: [PATCH 05/15] Update Managed Files (#460) Signed-off-by: Harold Brenes <152330941+haorldbchi@users.noreply.github.com> --- .github/dependabot.yml | 56 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..6ce1d1e9 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,56 @@ +# This file is managed by the repo-content-updater project. Manual changes here will result in a PR to bring back +# inline with the upstream template, unless you remove the dependabot managed file property from the repo + +version: 2 +updates: + - package-ecosystem: "gomod" + directory: / + schedule: + interval: "weekly" + day: "tuesday" + open-pull-requests-limit: 10 + labels: + - dependencies + - go + - "Changed" + reviewers: ["cmmarslender", "starttoaster"] + groups: + global: + patterns: + - "*" + + - package-ecosystem: "pip" + directory: / + schedule: + interval: "weekly" + day: "tuesday" + open-pull-requests-limit: 10 + labels: + - dependencies + - python + - "Changed" + reviewers: ["emlowe", "altendky"] + + - package-ecosystem: "github-actions" + directory: / + schedule: + interval: "weekly" + day: "tuesday" + open-pull-requests-limit: 10 + labels: + - dependencies + - github_actions + - "Changed" + reviewers: ["cmmarslender", "Starttoaster", "pmaslana"] + + - package-ecosystem: "npm" + directory: / + schedule: + interval: "weekly" + day: "tuesday" + open-pull-requests-limit: 10 + labels: + - dependencies + - javascript + - "Changed" + reviewers: ["cmmarslender", "emlowe"] From 069de9c9b837a2f9e1d78bcaae58ffefa23bee21 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 May 2024 14:49:13 -0500 Subject: [PATCH 06/15] Bump Jimver/cuda-toolkit from 0.2.11 to 0.2.15 (#461) Bumps [Jimver/cuda-toolkit](https://github.com/jimver/cuda-toolkit) from 0.2.11 to 0.2.15. - [Release notes](https://github.com/jimver/cuda-toolkit/releases) - [Commits](https://github.com/jimver/cuda-toolkit/compare/v0.2.11...v0.2.15) --- updated-dependencies: - dependency-name: Jimver/cuda-toolkit dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Harold Brenes <152330941+haorldbchi@users.noreply.github.com> --- .github/workflows/build-release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 0cfc70cc..c3356104 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -72,7 +72,7 @@ jobs: choco install -y sed - name: Setup CUDA - uses: Jimver/cuda-toolkit@v0.2.11 + uses: Jimver/cuda-toolkit@v0.2.15 id: cuda-toolkit with: cuda: '12.1.0' @@ -252,7 +252,7 @@ jobs: run: .github/actions/build-asset-unix.sh --artifact ${{ env.BB_ARTIFACT_NAME }} --version ${{env.BB_VERSION}} - name: Setup CUDA - uses: Jimver/cuda-toolkit@v0.2.11 + uses: Jimver/cuda-toolkit@v0.2.15 id: cuda-toolkit with: cuda: '12.1.0' @@ -498,7 +498,7 @@ jobs: choco install -y sed - name: Setup CUDA - uses: Jimver/cuda-toolkit@v0.2.11 + uses: Jimver/cuda-toolkit@v0.2.15 id: cuda-toolkit with: cuda: '12.1.0' From bf5053e05c8ea20466b1a1d5885447e9ccda16d8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 May 2024 14:49:34 -0500 Subject: [PATCH 07/15] Bump actions/cache from 3 to 4 (#462) Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Harold Brenes <152330941+haorldbchi@users.noreply.github.com> --- .github/workflows/build-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index c3356104..df695207 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -116,7 +116,7 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Cache DNF packages - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /var/cache/dnf key: ${{ runner.os }}-dnf-${{ hashFiles('**/your-build-file') }} From 7748125bad6697e6932b9463a5b3a7c62d99c6bb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 May 2024 14:49:50 -0500 Subject: [PATCH 08/15] Bump github/codeql-action from 2 to 3 (#463) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/v2...v3) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Harold Brenes <152330941+haorldbchi@users.noreply.github.com> --- .github/workflows/codeql-analysis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 19d93171..a69310ac 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -42,7 +42,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -62,4 +62,4 @@ jobs: cmake . -Bbuild - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 From 77ff57b950150a37ef810a8993b43aa4f1fc06c0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 May 2024 14:50:02 -0500 Subject: [PATCH 09/15] Bump actions/checkout from 3 to 4 (#464) Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Harold Brenes <152330941+haorldbchi@users.noreply.github.com> --- .github/workflows/attach-release-assets.yml | 2 +- .github/workflows/build-release.yml | 22 ++++++++++----------- .github/workflows/codeql-analysis.yml | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/attach-release-assets.yml b/.github/workflows/attach-release-assets.yml index d0df509d..176352e6 100644 --- a/.github/workflows/attach-release-assets.yml +++ b/.github/workflows/attach-release-assets.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Checkout Repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: master diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index df695207..c85e23f7 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -14,7 +14,7 @@ jobs: image: ghcr.io/chia-network/build-images/manylinux2014_cuda_x86_64:sha-1caf046d5ff19b7c743de2a106dd86928794032b steps: - name: Checkout Repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set Env uses: Chia-Network/actions/setjobenv@main @@ -52,7 +52,7 @@ jobs: runs-on: windows-2022 steps: - name: Checkout Repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set Env uses: Chia-Network/actions/setjobenv@main @@ -108,7 +108,7 @@ jobs: image: ghcr.io/chia-network/build-images/manylinux2014_cuda_aarch64:sha-1caf046d5ff19b7c743de2a106dd86928794032b steps: - name: Checkout Repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set Env uses: Chia-Network/actions/setjobenv@main @@ -168,7 +168,7 @@ jobs: uses: Chia-Network/actions/clean-workspace@main - name: Checkout Repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set Env uses: Chia-Network/actions/setjobenv@main @@ -201,7 +201,7 @@ jobs: uses: Chia-Network/actions/clean-workspace@main - name: Checkout Repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set Env uses: Chia-Network/actions/setjobenv@main @@ -232,7 +232,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Checkout Repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set Env uses: Chia-Network/actions/setjobenv@main @@ -282,7 +282,7 @@ jobs: image: quay.io/centos/centos:stream8 steps: - name: Checkout Repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set Env uses: Chia-Network/actions/setjobenv@main @@ -342,7 +342,7 @@ jobs: image: quay.io/centos/centos:stream8 steps: - name: Checkout Repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set Env uses: Chia-Network/actions/setjobenv@main @@ -379,7 +379,7 @@ jobs: shell: bash steps: - name: Checkout Repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set Env uses: Chia-Network/actions/setjobenv@main @@ -429,7 +429,7 @@ jobs: runs-on: windows-2019 steps: - name: Checkout Repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set Env uses: Chia-Network/actions/setjobenv@main @@ -478,7 +478,7 @@ jobs: runs-on: windows-2019 steps: - name: Checkout Repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set Env uses: Chia-Network/actions/setjobenv@main diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index a69310ac..46411834 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -38,7 +38,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL From 22cd5a675fd82f1de905c563c85df7e6f6815c8c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 May 2024 14:50:21 -0500 Subject: [PATCH 10/15] Bump actions/setup-node from 3 to 4 (#466) Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Harold Brenes <152330941+haorldbchi@users.noreply.github.com> --- .github/workflows/attach-release-assets.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/attach-release-assets.yml b/.github/workflows/attach-release-assets.yml index 176352e6..500e05b8 100644 --- a/.github/workflows/attach-release-assets.yml +++ b/.github/workflows/attach-release-assets.yml @@ -15,7 +15,7 @@ jobs: ref: master # Setup Node - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: { node-version: '16' } - run: cd .github/actions && npm install @octokit/action From 1c3f4fa1c131a20a2f3f4f4ac5360960605bcf12 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 May 2024 14:51:00 -0500 Subject: [PATCH 11/15] Bump actions/upload-artifact from 3 to 4 (#465) Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Harold Brenes <152330941+haorldbchi@users.noreply.github.com> --- .github/workflows/build-release.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index c85e23f7..156b4a8d 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -42,7 +42,7 @@ jobs: bash .github/actions/build-harvester.sh --artifact "${artifact_name}" - name: Upload Harvester Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.harvester_artifact_name }} path: ${{ env.harvester_artifact_path }} @@ -96,7 +96,7 @@ jobs: CUDA_PATH: ${{ steps.cuda-toolkit.outputs.CUDA_PATH }} - name: Upload Harvester Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.harvester_artifact_name }} path: ${{ env.harvester_artifact_path }} @@ -155,7 +155,7 @@ jobs: bash .github/actions/build-harvester.sh --artifact "${artifact_name}" - name: Upload Harvester Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.harvester_artifact_name }} path: ${{ env.harvester_artifact_path }} @@ -188,7 +188,7 @@ jobs: bash .github/actions/build-harvester.sh --artifact "${artifact_name}" - name: Upload Harvester Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.harvester_artifact_name }} path: ${{ env.harvester_artifact_path }} @@ -221,7 +221,7 @@ jobs: bash .github/actions/build-harvester.sh --artifact "${artifact_name}" - name: Upload Harvester Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.harvester_artifact_name }} path: ${{ env.harvester_artifact_path }} @@ -263,14 +263,14 @@ jobs: run: .github/actions/build-asset-unix.sh --cuda --artifact ${{ env.BB_ARTIFACT_NAME_CUDA }} --version ${{env.BB_VERSION}} - name: Upload Bladebit Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.BB_ARTIFACT_NAME }} path: ${{ github.workspace }}/bin/${{ env.BB_ARTIFACT_NAME }} if-no-files-found: error - name: Upload Bladebit CUDA Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.BB_ARTIFACT_NAME_CUDA }} path: ${{ github.workspace }}/bin/${{ env.BB_ARTIFACT_NAME_CUDA }} @@ -323,14 +323,14 @@ jobs: .github/actions/build-asset-unix.sh --cuda --artifact ${{ env.BB_ARTIFACT_NAME_CUDA }} --version ${{ env.BB_VERSION }} - name: Upload Bladebit Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.BB_ARTIFACT_NAME }} path: ${{ github.workspace }}/bin/${{ env.BB_ARTIFACT_NAME }} if-no-files-found: error - name: Upload Bladebit CUDA Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.BB_ARTIFACT_NAME_CUDA }} path: ${{ github.workspace }}/bin/${{ env.BB_ARTIFACT_NAME_CUDA }} @@ -364,7 +364,7 @@ jobs: .github/actions/build-asset-unix.sh --artifact ${{ env.BB_ARTIFACT_NAME }} --version ${{ env.BB_VERSION }} - name: Upload Artifact CentOS ARM64 - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.BB_ARTIFACT_NAME }} path: ${{ github.workspace }}/bin/${{ env.BB_ARTIFACT_NAME }} @@ -409,7 +409,7 @@ jobs: run: .github/actions/build-asset-unix.sh --artifact ${{ env.BB_ARTIFACT_NAME }} --version ${{env.BB_VERSION}} - name: Upload Artifact Ubuntu ARM64 - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.BB_ARTIFACT_NAME }} path: ${{ github.workspace }}/bin/${{ env.BB_ARTIFACT_NAME }} @@ -419,7 +419,7 @@ jobs: run: | .github/actions/build-asset-unix.sh --cuda --artifact ${{ env.BB_ARTIFACT_NAME_CUDA }} --version ${{ env.BB_VERSION }} - name: Upload Bladebit CUDA Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.BB_ARTIFACT_NAME_CUDA }} path: ${{ github.workspace }}/bin/${{ env.BB_ARTIFACT_NAME_CUDA }} @@ -468,7 +468,7 @@ jobs: ls -la ../../bin - name: Upload Bladebit Artifact Windows x86-64 - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.BB_ARTIFACT_NAME }} path: ${{ github.workspace }}/bin/${{ env.BB_ARTIFACT_NAME }} @@ -538,7 +538,7 @@ jobs: ls -la ../../bin - name: Upload Bladebit CUDA Artifact Windows x86-64 - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.BB_ARTIFACT_NAME_CUDA }} path: ${{ github.workspace }}/bin/${{ env.BB_ARTIFACT_NAME_CUDA }} From 1b056f7f9b15c4e663d1f48eb5749a7f28d67862 Mon Sep 17 00:00:00 2001 From: ChiaAutomation <85647627+ChiaAutomation@users.noreply.github.com> Date: Thu, 2 Jan 2025 14:41:34 +0000 Subject: [PATCH 12/15] Updated License (#477) Signed-off-by: Harold Brenes <152330941+haorldbchi@users.noreply.github.com> --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 1cda2cf5..6cb914c8 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2024 Harold Brenes, Chia Network Inc. + Copyright 2025 Harold Brenes, Chia Network Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. From 6bfeba15b64b61e50016bd38179c9baaec55d5e1 Mon Sep 17 00:00:00 2001 From: William Allen Date: Wed, 5 Feb 2025 13:40:00 -0600 Subject: [PATCH 13/15] ci fixes (#480) * Fix CI build failures Signed-off-by: Harold Brenes <152330941+haorldbchi@users.noreply.github.com> --- .github/workflows/attach-release-assets.yml | 10 +-- .github/workflows/build-release.yml | 93 +++++++++------------ 2 files changed, 44 insertions(+), 59 deletions(-) diff --git a/.github/workflows/attach-release-assets.yml b/.github/workflows/attach-release-assets.yml index 500e05b8..5643dba5 100644 --- a/.github/workflows/attach-release-assets.yml +++ b/.github/workflows/attach-release-assets.yml @@ -7,7 +7,7 @@ on: jobs: upload-release-assets: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: Checkout Repo uses: actions/checkout@v4 @@ -16,7 +16,7 @@ jobs: # Setup Node - uses: actions/setup-node@v4 - with: { node-version: '16' } + with: { node-version: '20' } - run: cd .github/actions && npm install @octokit/action # Upload Artifacts as Release Assets @@ -31,12 +31,12 @@ jobs: artifacts=( bladebit-v${BB_VERSION}-ubuntu-x86-64.tar.gz - bladebit-v${BB_VERSION}-centos-x86-64.tar.gz + bladebit-v${BB_VERSION}-almalinux-x86-64.tar.gz bladebit-v${BB_VERSION}-ubuntu-arm64.tar.gz - bladebit-v${BB_VERSION}-centos-arm64.tar.gz + bladebit-v${BB_VERSION}-almalinux-arm64.tar.gz bladebit-v${BB_VERSION}-windows-x86-64.zip bladebit-cuda-v${BB_VERSION}-ubuntu-x86-64.tar.gz - bladebit-cuda-v${BB_VERSION}-centos-x86-64.tar.gz + bladebit-cuda-v${BB_VERSION}-almalinux-x86-64.tar.gz bladebit-cuda-v${BB_VERSION}-ubuntu-arm64.tar.gz bladebit-cuda-v${BB_VERSION}-windows-x86-64.zip green_reaper-v${BB_VERSION}-linux-x86-64.tar.gz diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 156b4a8d..c807dc53 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -9,9 +9,9 @@ env: jobs: build-harvester-linux-x86-64: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest container: - image: ghcr.io/chia-network/build-images/manylinux2014_cuda_x86_64:sha-1caf046d5ff19b7c743de2a106dd86928794032b + image: ghcr.io/chia-network/build-images/manylinux_cuda_x86_64:latest steps: - name: Checkout Repo uses: actions/checkout@v4 @@ -72,10 +72,10 @@ jobs: choco install -y sed - name: Setup CUDA - uses: Jimver/cuda-toolkit@v0.2.15 + uses: Jimver/cuda-toolkit@v0.2.19 id: cuda-toolkit with: - cuda: '12.1.0' + cuda: '12.6.2' method: network - name: Verify CUDA @@ -103,9 +103,9 @@ jobs: if-no-files-found: error build-harvester-linux-arm64: - runs-on: [ARM64, Linux] + runs-on: ubuntu-24.04-arm container: - image: ghcr.io/chia-network/build-images/manylinux2014_cuda_aarch64:sha-1caf046d5ff19b7c743de2a106dd86928794032b + image: ghcr.io/chia-network/build-images/manylinux_cuda_aarch64:latest steps: - name: Checkout Repo uses: actions/checkout@v4 @@ -126,19 +126,19 @@ jobs: - name: Get Version Number id: version_number shell: bash - run: ./.github/actions/get-version.sh centos arm64 + run: ./.github/actions/get-version.sh almalinux arm64 - name: Install Prerequisites shell: bash run: | set -eo pipefail - export module_platform_id=platform:el9 - export MODULE_PLATFORM_ID=platform:el9 - export PLATFORM_ID=platform:el9 + export module_platform_id=platform:el10 + export MODULE_PLATFORM_ID=platform:el10 + export PLATFORM_ID=platform:el10 uname -a cat /etc/os-release yum install -y dnf - dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm + dnf install -y epel-release dnf install -y dnf-plugins-core dnf makecache dnf install -y kernel-headers.aarch64 kernel-devel.aarch64 tar bzip2 make automake gcc gcc-c++ pciutils elfutils-libelf-devel libglvnd-opengl libglvnd-glx libglvnd-devel acpid pkgconfig dkms @@ -162,7 +162,7 @@ jobs: if-no-files-found: error build-harvester-macos-arm64: - runs-on: [macos, arm64] + runs-on: macos-latest steps: - name: Cleanup Environment uses: Chia-Network/actions/clean-workspace@main @@ -195,7 +195,7 @@ jobs: if-no-files-found: error build-harvester-macos-x86-64: - runs-on: macOS-11 + runs-on: macOS-13 steps: - name: Cleanup Environment uses: Chia-Network/actions/clean-workspace@main @@ -229,7 +229,7 @@ jobs: build-bladebit-ubuntu-x86-64: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: Checkout Repo uses: actions/checkout@v4 @@ -245,17 +245,16 @@ jobs: - name: Install Prerequisites run: | - sudo apt install -y libgmp-dev libnuma-dev - sudo bash .github/actions/install-cmake-linux.sh + sudo apt install -y libgmp-dev libnuma-dev cmake - name: Build Bladebit run: .github/actions/build-asset-unix.sh --artifact ${{ env.BB_ARTIFACT_NAME }} --version ${{env.BB_VERSION}} - name: Setup CUDA - uses: Jimver/cuda-toolkit@v0.2.15 + uses: Jimver/cuda-toolkit@v0.2.19 id: cuda-toolkit with: - cuda: '12.1.0' + cuda: '12.6.2' method: network linux-local-args: '["--toolkit"]' @@ -276,10 +275,10 @@ jobs: path: ${{ github.workspace }}/bin/${{ env.BB_ARTIFACT_NAME_CUDA }} if-no-files-found: error - build-bladebit-centos-x86-64: - runs-on: ubuntu-20.04 + build-bladebit-almalinux-x86-64: + runs-on: ubuntu-latest container: - image: quay.io/centos/centos:stream8 + image: ghcr.io/chia-network/build-images/manylinux_cuda_x86_64:latest steps: - name: Checkout Repo uses: actions/checkout@v4 @@ -291,35 +290,23 @@ jobs: - name: Get Version Number id: version_number - run: .github/actions/get-version.sh centos x86-64 + run: .github/actions/get-version.sh almalinux x86-64 - name: Install Prerequisites run: | set -eo pipefail - dnf install -y gcc-toolset-9-gcc gcc-toolset-9-gcc-c++ \ - gmp-devel numactl-devel make git wget subscription-manager - bash .github/actions/install-cmake-linux.sh + dnf install -y gcc-toolset-14-gcc gcc-toolset-14-gcc-c++ \ + gmp-devel numactl-devel make cmake git wget subscription-manager + - name: Build Bladebit run: | - source /opt/rh/gcc-toolset-9/enable + source /opt/rh/gcc-toolset-14/enable .github/actions/build-asset-unix.sh --artifact ${{ env.BB_ARTIFACT_NAME }} --version ${{ env.BB_VERSION }} - - name: Install CUDA Prerequisites - run: | - distro=rhel8 - arch=x86_64 - dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm - dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/$distro/$arch/cuda-$distro.repo - dnf clean expire-cache - dnf module install -y nvidia-driver:latest-dkms - dnf install -y cuda - ls -la /usr/local/ - ls -la /usr/local/cuda/ - - name: Build Bladebit CUDA run: | - source /opt/rh/gcc-toolset-9/enable + source /opt/rh/gcc-toolset-14/enable .github/actions/build-asset-unix.sh --cuda --artifact ${{ env.BB_ARTIFACT_NAME_CUDA }} --version ${{ env.BB_VERSION }} - name: Upload Bladebit Artifact @@ -336,10 +323,10 @@ jobs: path: ${{ github.workspace }}/bin/${{ env.BB_ARTIFACT_NAME_CUDA }} if-no-files-found: error - build-bladebit-centos-arm64: - runs-on: [ARM64, Linux] + build-bladebit-almalinux-arm64: + runs-on: ubuntu-24.04-arm container: - image: quay.io/centos/centos:stream8 + image: ghcr.io/chia-network/build-images/manylinux_cuda_aarch64:latest steps: - name: Checkout Repo uses: actions/checkout@v4 @@ -351,19 +338,19 @@ jobs: - name: Get Version Number id: version_number - run: .github/actions/get-version.sh centos arm64 + run: .github/actions/get-version.sh almalinux arm64 - name: Install Prerequisites run: | - dnf install -y gcc-toolset-9-gcc gcc-toolset-9-gcc-c++ \ + dnf install -y gcc-toolset-14-gcc gcc-toolset-14-gcc-c++ \ cmake gmp-devel numactl-devel make git - name: Build run: | - source /opt/rh/gcc-toolset-9/enable + source /opt/rh/gcc-toolset-14/enable .github/actions/build-asset-unix.sh --artifact ${{ env.BB_ARTIFACT_NAME }} --version ${{ env.BB_VERSION }} - - name: Upload Artifact CentOS ARM64 + - name: Upload Artifact AlmaLinux ARM64 uses: actions/upload-artifact@v4 with: name: ${{ env.BB_ARTIFACT_NAME }} @@ -371,7 +358,7 @@ jobs: if-no-files-found: error build-bladebit-cuda-linux-arm64: - runs-on: [ARM64, Linux] + runs-on: ubuntu-24.04-arm container: image: chianetwork/ubuntu-20.04-builder:latest defaults: @@ -399,9 +386,9 @@ jobs: run: | wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/sbsa/cuda-ubuntu2004.pin mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600 - wget https://developer.download.nvidia.com/compute/cuda/12.1.1/local_installers/cuda-repo-ubuntu2004-12-1-local_12.1.1-530.30.02-1_arm64.deb - dpkg -i cuda-repo-ubuntu2004-12-1-local_12.1.1-530.30.02-1_arm64.deb - cp /var/cuda-repo-ubuntu2004-12-1-local/cuda-*-keyring.gpg /usr/share/keyrings/ + wget https://developer.download.nvidia.com/compute/cuda/12.8.0/local_installers/cuda-repo-ubuntu2004-12-8-local_12.8.0-570.86.10-1_arm64.deb + dpkg -i cuda-repo-ubuntu2004-12-8-local_12.8.0-570.86.10-1_arm64.deb + cp /var/cuda-repo-ubuntu2004-12-8-local/cuda-*-keyring.gpg /usr/share/keyrings/ apt-get update DEBIAN_FRONTEND=noninteractive apt-get -y install cuda @@ -449,7 +436,6 @@ jobs: run: | mkdir build && cd build cmake .. - bash -eo pipefail ../embed-version.sh cat ../src/Version.h cmake --build . --target bladebit --config Release @@ -498,10 +484,10 @@ jobs: choco install -y sed - name: Setup CUDA - uses: Jimver/cuda-toolkit@v0.2.15 + uses: Jimver/cuda-toolkit@v0.2.19 id: cuda-toolkit with: - cuda: '12.1.0' + cuda: '12.6.2' method: network - name: Verify CUDA @@ -519,7 +505,6 @@ jobs: run: | mkdir build_cuda && cd build_cuda cmake .. - bash -eo pipefail ../embed-version.sh cat ../src/Version.h cmake --build . --target bladebit_cuda --config Release From ffb55f497fc4a83fc75fb7bcbb5487caee2879a1 Mon Sep 17 00:00:00 2001 From: Harold B <152330941+haorldbchi@users.noreply.github.com> Date: Wed, 5 Feb 2025 17:40:50 -0500 Subject: [PATCH 14/15] Fix shared object on x86-64 Linux having executable stack ELF flag enabled (#481) Fix shared object on x86-64 Linux having executable stack ELF flag enabled (#481) Signed-off-by: Harold Brenes <152330941+haorldbchi@users.noreply.github.com> --- .github/actions/build-harvester.sh | 16 +- .github/actions/check-elf-gnu-stack-flags.sh | 12 + .github/workflows/attach-release-assets.yml | 26 +- .github/workflows/build-harvester.yml | 228 +++++++++++++++++ ...release.yml => build-release.yml.disabled} | 234 +----------------- build-harvester.sh | 11 + src/b3/blake3_avx2_x86-64_unix.S | 4 + src/b3/blake3_avx512_x86-64_unix.S | 4 + src/b3/blake3_sse41_x86-64_unix.S | 4 + 9 files changed, 291 insertions(+), 248 deletions(-) create mode 100755 .github/actions/check-elf-gnu-stack-flags.sh create mode 100644 .github/workflows/build-harvester.yml rename .github/workflows/{build-release.yml => build-release.yml.disabled} (56%) create mode 100755 build-harvester.sh diff --git a/.github/actions/build-harvester.sh b/.github/actions/build-harvester.sh index 2460a279..08bdb992 100644 --- a/.github/actions/build-harvester.sh +++ b/.github/actions/build-harvester.sh @@ -42,19 +42,20 @@ echo "Harvester artifact: ${artifact_name}" echo 'cmake --version' cmake --version -mkdir -p build-harvester -pushd build-harvester -cmake .. -DCMAKE_BUILD_TYPE=Release -DBB_HARVESTER_ONLY=ON - -cmake --build . --config Release --target bladebit_harvester +./build-harvester.sh if [[ "$host_os" == "windows" ]]; then OBJDUMP=$("${CUDA_PATH}"\\bin\\cuobjdump Release\\bladebit_harvester.dll) elif [[ "$host_os" == "linux" ]]; then - OBJDUMP=$(/usr/local/cuda/bin/cuobjdump libbladebit_harvester.so) + OBJDUMP=$(/usr/local/cuda/bin/cuobjdump "build-harvester/libbladebit_harvester.so") + + # Check for the right GNU_STACK flags + script_path=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd) + # echo $script_path + ${script_path}/check-elf-gnu-stack-flags.sh "build-harvester/libbladebit_harvester.so" fi -cmake --install . --prefix harvester_dist +cmake --install "build-harvester" --prefix harvester_dist pushd harvester_dist/green_reaper if [[ "$host_os" == "windows" ]]; then @@ -109,5 +110,4 @@ if [[ "$CI" == "true" ]]; then echo "harvester_artifact_path=$harvester_artifact_path" >> "$GITHUB_ENV" fi -popd ls -la diff --git a/.github/actions/check-elf-gnu-stack-flags.sh b/.github/actions/check-elf-gnu-stack-flags.sh new file mode 100755 index 00000000..42e1172f --- /dev/null +++ b/.github/actions/check-elf-gnu-stack-flags.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +set -eo pipefail + +file_path=$1 +flag=$(readelf -e $file_path | grep GNU_STACK -A 1 | tail -n 1 | tr -s ' ' | cut -f4 -d' ') + +echo "Flag: GNU_STACK flag: $flag" + +if [[ $flag != "RW" ]]; then + >&2 echo "GNU_STACK flag is expected to be set to 'RW', but got '$flag'" + exit 1 +fi diff --git a/.github/workflows/attach-release-assets.yml b/.github/workflows/attach-release-assets.yml index 5643dba5..dbd7ea0d 100644 --- a/.github/workflows/attach-release-assets.yml +++ b/.github/workflows/attach-release-assets.yml @@ -30,20 +30,20 @@ jobs: echo "Release Version: $BB_VERSION" artifacts=( - bladebit-v${BB_VERSION}-ubuntu-x86-64.tar.gz - bladebit-v${BB_VERSION}-almalinux-x86-64.tar.gz - bladebit-v${BB_VERSION}-ubuntu-arm64.tar.gz - bladebit-v${BB_VERSION}-almalinux-arm64.tar.gz - bladebit-v${BB_VERSION}-windows-x86-64.zip - bladebit-cuda-v${BB_VERSION}-ubuntu-x86-64.tar.gz - bladebit-cuda-v${BB_VERSION}-almalinux-x86-64.tar.gz - bladebit-cuda-v${BB_VERSION}-ubuntu-arm64.tar.gz - bladebit-cuda-v${BB_VERSION}-windows-x86-64.zip + # bladebit-v${BB_VERSION}-ubuntu-x86-64.tar.gz + # bladebit-v${BB_VERSION}-rhl-x86-64.tar.gz + # bladebit-v${BB_VERSION}-ubuntu-arm64.tar.gz + # bladebit-v${BB_VERSION}-rhl-arm64.tar.gz + # bladebit-v${BB_VERSION}-windows-x86-64.zip + # bladebit-cuda-v${BB_VERSION}-ubuntu-x86-64.tar.gz + # bladebit-cuda-v${BB_VERSION}-rhl-x86-64.tar.gz + # bladebit-cuda-v${BB_VERSION}-ubuntu-arm64.tar.gz + # bladebit-cuda-v${BB_VERSION}-windows-x86-64.zip green_reaper-v${BB_VERSION}-linux-x86-64.tar.gz - green_reaper-v${BB_VERSION}-linux-ARM64.tar.gz - green_reaper-v${BB_VERSION}-macos-x86-64.tar.gz - green_reaper-v${BB_VERSION}-macos-arm64.tar.gz - green_reaper-v${BB_VERSION}-windows-x86-64.zip + # green_reaper-v${BB_VERSION}-linux-ARM64.tar.gz + # green_reaper-v${BB_VERSION}-macos-x86-64.tar.gz + # green_reaper-v${BB_VERSION}-macos-arm64.tar.gz + # green_reaper-v${BB_VERSION}-windows-x86-64.zip ) mkdir -p bin diff --git a/.github/workflows/build-harvester.yml b/.github/workflows/build-harvester.yml new file mode 100644 index 00000000..963c4af8 --- /dev/null +++ b/.github/workflows/build-harvester.yml @@ -0,0 +1,228 @@ +name: Build Harvester Release Assets +on: + push: + branches: ['*'] + workflow_dispatch: + +env: + CI_BLADEBIT: 1 # Our own CI, that is, not being built as a dependency + +jobs: + build-harvester-linux-x86-64: + runs-on: ubuntu-latest + container: + image: ghcr.io/chia-network/build-images/manylinux_cuda_x86_64:latest + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + + - name: Set Env + uses: Chia-Network/actions/setjobenv@main + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Get Version Number + id: version_number + shell: bash + run: ./.github/actions/get-version.sh ubuntu x86-64 + + - name: Install Prerequisites + shell: bash + run: | + set -eo pipefail + yum group install -y "Development Tools" + yum install -y sudo make git wget subscription-manager + + - name: Build Harvester + shell: bash + run: | + export artifact_name="green_reaper-v${{ env.BB_VERSION }}-linux-x86-64.tar.gz" + echo "harvester_artifact_name=${artifact_name}" >> "$GITHUB_ENV" + # emits env.harvester_artifact_path + bash .github/actions/build-harvester.sh --artifact "${artifact_name}" + + - name: Upload Harvester Artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ env.harvester_artifact_name }} + path: ${{ env.harvester_artifact_path }} + if-no-files-found: error + + # build-harvester-linux-arm64: + # runs-on: ubuntu-24.04-arm + # container: + # image: ghcr.io/chia-network/build-images/manylinux_cuda_aarch64:latest + # steps: + # - name: Checkout Repo + # uses: actions/checkout@v4 + + # - name: Set Env + # uses: Chia-Network/actions/setjobenv@main + # env: + # GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # - name: Cache DNF packages + # uses: actions/cache@v4 + # with: + # path: /var/cache/dnf + # key: ${{ runner.os }}-dnf-${{ hashFiles('**/your-build-file') }} + # restore-keys: | + # ${{ runner.os }}-dnf- + + # - name: Get Version Number + # id: version_number + # shell: bash + # run: ./.github/actions/get-version.sh rhl arm64 + + # - name: Install Prerequisites + # shell: bash + # run: | + # set -eo pipefail + # export module_platform_id=platform:el10 + # export MODULE_PLATFORM_ID=platform:el10 + # export PLATFORM_ID=platform:el10 + # uname -a + # cat /etc/os-release + # yum install -y dnf + # dnf install -y epel-release + # dnf install -y dnf-plugins-core + # dnf makecache + # dnf install -y kernel-headers.aarch64 kernel-devel.aarch64 tar bzip2 make automake gcc gcc-c++ pciutils elfutils-libelf-devel libglvnd-opengl libglvnd-glx libglvnd-devel acpid pkgconfig dkms + # dnf install -y cmake + # dnf group install -y "Development Tools" + # dnf install -y gmp-devel numactl-devel make git wget sed + + # - name: Build Harvester + # shell: bash + # run: | + # export artifact_name="green_reaper-v${{ env.BB_VERSION }}-linux-ARM64.tar.gz" + # echo "harvester_artifact_name=${artifact_name}" >> "$GITHUB_ENV" + # # emits env.harvester_artifact_path + # bash .github/actions/build-harvester.sh --artifact "${artifact_name}" + + # - name: Upload Harvester Artifact + # uses: actions/upload-artifact@v4 + # with: + # name: ${{ env.harvester_artifact_name }} + # path: ${{ env.harvester_artifact_path }} + # if-no-files-found: error + + # build-harvester-macos-arm64: + # runs-on: macos-latest + # steps: + # - name: Cleanup Environment + # uses: Chia-Network/actions/clean-workspace@main + + # - name: Checkout Repo + # uses: actions/checkout@v4 + + # - name: Set Env + # uses: Chia-Network/actions/setjobenv@main + # env: + # GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # - name: Get Version Number + # id: version_number + # run: bash -e .github/actions/get-version.sh macos arm64 + + # - name: Build Harvester + # shell: bash + # run: | + # export artifact_name="green_reaper-v${{ env.BB_VERSION }}-macos-arm64.tar.gz" + # echo "harvester_artifact_name=${artifact_name}" >> "$GITHUB_ENV" + # # emits env.harvester_artifact_path + # bash .github/actions/build-harvester.sh --artifact "${artifact_name}" + + # - name: Upload Harvester Artifact + # uses: actions/upload-artifact@v4 + # with: + # name: ${{ env.harvester_artifact_name }} + # path: ${{ env.harvester_artifact_path }} + # if-no-files-found: error + + # build-harvester-macos-x86-64: + # runs-on: macOS-13 + # steps: + # - name: Cleanup Environment + # uses: Chia-Network/actions/clean-workspace@main + + # - name: Checkout Repo + # uses: actions/checkout@v4 + + # - name: Set Env + # uses: Chia-Network/actions/setjobenv@main + # env: + # GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # - name: Get Version Number + # id: version_number + # run: bash -e .github/actions/get-version.sh macos x86-64 + + # - name: Build Harvester + # shell: bash + # run: | + # export artifact_name="green_reaper-v${{ env.BB_VERSION }}-macos-x86-64.tar.gz" + # echo "harvester_artifact_name=${artifact_name}" >> "$GITHUB_ENV" + # # emits env.harvester_artifact_path + # bash .github/actions/build-harvester.sh --artifact "${artifact_name}" + + # - name: Upload Harvester Artifact + # uses: actions/upload-artifact@v4 + # with: + # name: ${{ env.harvester_artifact_name }} + # path: ${{ env.harvester_artifact_path }} + # if-no-files-found: error + + # build-harvester-windows-x86-64: + # runs-on: windows-2022 + # steps: + # - name: Checkout Repo + # uses: actions/checkout@v4 + + # - name: Set Env + # uses: Chia-Network/actions/setjobenv@main + # env: + # GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # - name: Get Version Number + # id: version_number + # shell: bash + # run: ./.github/actions/get-version.sh windows x86-64 + + # - name: Install Prerequisites + # shell: powershell + # run: | + # choco install -y make + # choco install -y wget + # choco install -y sed + + # - name: Setup CUDA + # uses: Jimver/cuda-toolkit@v0.2.19 + # id: cuda-toolkit + # with: + # cuda: '12.6.2' + # method: network + + # - name: Verify CUDA + # shell: bash + # run: | + # echo "Installed cuda version is: ${{ steps.cuda-toolkit.outputs.cuda }}" + # echo "Cuda install location: ${{ steps.cuda-toolkit.outputs.CUDA_PATH }}" + # nvcc -V + + # - name: Build Harvester + # shell: bash + # run: | + # export artifact_name="green_reaper-v${{ env.BB_VERSION }}-windows-x86-64.zip" + # echo "harvester_artifact_name=${artifact_name}" >> "$GITHUB_ENV" + # # emits env.harvester_artifact_path + # bash .github/actions/build-harvester.sh --artifact "${artifact_name}" + # env: + # CUDA_PATH: ${{ steps.cuda-toolkit.outputs.CUDA_PATH }} + + # - name: Upload Harvester Artifact + # uses: actions/upload-artifact@v4 + # with: + # name: ${{ env.harvester_artifact_name }} + # path: ${{ env.harvester_artifact_path }} + # if-no-files-found: error diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml.disabled similarity index 56% rename from .github/workflows/build-release.yml rename to .github/workflows/build-release.yml.disabled index c807dc53..e1b408e0 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml.disabled @@ -1,4 +1,4 @@ -name: Build Release Assets +name: Build Bladebit Release Assets on: push: branches: ['*'] @@ -8,226 +8,6 @@ env: CI_BLADEBIT: 1 # Our own CI, that is, not being built as a dependency jobs: - build-harvester-linux-x86-64: - runs-on: ubuntu-latest - container: - image: ghcr.io/chia-network/build-images/manylinux_cuda_x86_64:latest - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - - - name: Set Env - uses: Chia-Network/actions/setjobenv@main - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Get Version Number - id: version_number - shell: bash - run: ./.github/actions/get-version.sh ubuntu x86-64 - - - name: Install Prerequisites - shell: bash - run: | - set -eo pipefail - yum group install -y "Development Tools" - yum install -y sudo make git wget subscription-manager - - - name: Build Harvester - shell: bash - run: | - export artifact_name="green_reaper-v${{ env.BB_VERSION }}-linux-x86-64.tar.gz" - echo "harvester_artifact_name=${artifact_name}" >> "$GITHUB_ENV" - # emits env.harvester_artifact_path - bash .github/actions/build-harvester.sh --artifact "${artifact_name}" - - - name: Upload Harvester Artifact - uses: actions/upload-artifact@v4 - with: - name: ${{ env.harvester_artifact_name }} - path: ${{ env.harvester_artifact_path }} - if-no-files-found: error - - build-harvester-windows-x86-64: - runs-on: windows-2022 - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - - - name: Set Env - uses: Chia-Network/actions/setjobenv@main - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Get Version Number - id: version_number - shell: bash - run: ./.github/actions/get-version.sh windows x86-64 - - - name: Install Prerequisites - shell: powershell - run: | - choco install -y make - choco install -y wget - choco install -y sed - - - name: Setup CUDA - uses: Jimver/cuda-toolkit@v0.2.19 - id: cuda-toolkit - with: - cuda: '12.6.2' - method: network - - - name: Verify CUDA - shell: bash - run: | - echo "Installed cuda version is: ${{ steps.cuda-toolkit.outputs.cuda }}" - echo "Cuda install location: ${{ steps.cuda-toolkit.outputs.CUDA_PATH }}" - nvcc -V - - - name: Build Harvester - shell: bash - run: | - export artifact_name="green_reaper-v${{ env.BB_VERSION }}-windows-x86-64.zip" - echo "harvester_artifact_name=${artifact_name}" >> "$GITHUB_ENV" - # emits env.harvester_artifact_path - bash .github/actions/build-harvester.sh --artifact "${artifact_name}" - env: - CUDA_PATH: ${{ steps.cuda-toolkit.outputs.CUDA_PATH }} - - - name: Upload Harvester Artifact - uses: actions/upload-artifact@v4 - with: - name: ${{ env.harvester_artifact_name }} - path: ${{ env.harvester_artifact_path }} - if-no-files-found: error - - build-harvester-linux-arm64: - runs-on: ubuntu-24.04-arm - container: - image: ghcr.io/chia-network/build-images/manylinux_cuda_aarch64:latest - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - - - name: Set Env - uses: Chia-Network/actions/setjobenv@main - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Cache DNF packages - uses: actions/cache@v4 - with: - path: /var/cache/dnf - key: ${{ runner.os }}-dnf-${{ hashFiles('**/your-build-file') }} - restore-keys: | - ${{ runner.os }}-dnf- - - - name: Get Version Number - id: version_number - shell: bash - run: ./.github/actions/get-version.sh almalinux arm64 - - - name: Install Prerequisites - shell: bash - run: | - set -eo pipefail - export module_platform_id=platform:el10 - export MODULE_PLATFORM_ID=platform:el10 - export PLATFORM_ID=platform:el10 - uname -a - cat /etc/os-release - yum install -y dnf - dnf install -y epel-release - dnf install -y dnf-plugins-core - dnf makecache - dnf install -y kernel-headers.aarch64 kernel-devel.aarch64 tar bzip2 make automake gcc gcc-c++ pciutils elfutils-libelf-devel libglvnd-opengl libglvnd-glx libglvnd-devel acpid pkgconfig dkms - dnf install -y cmake - dnf group install -y "Development Tools" - dnf install -y gmp-devel numactl-devel make git wget sed - - - name: Build Harvester - shell: bash - run: | - export artifact_name="green_reaper-v${{ env.BB_VERSION }}-linux-ARM64.tar.gz" - echo "harvester_artifact_name=${artifact_name}" >> "$GITHUB_ENV" - # emits env.harvester_artifact_path - bash .github/actions/build-harvester.sh --artifact "${artifact_name}" - - - name: Upload Harvester Artifact - uses: actions/upload-artifact@v4 - with: - name: ${{ env.harvester_artifact_name }} - path: ${{ env.harvester_artifact_path }} - if-no-files-found: error - - build-harvester-macos-arm64: - runs-on: macos-latest - steps: - - name: Cleanup Environment - uses: Chia-Network/actions/clean-workspace@main - - - name: Checkout Repo - uses: actions/checkout@v4 - - - name: Set Env - uses: Chia-Network/actions/setjobenv@main - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Get Version Number - id: version_number - run: bash -e .github/actions/get-version.sh macos arm64 - - - name: Build Harvester - shell: bash - run: | - export artifact_name="green_reaper-v${{ env.BB_VERSION }}-macos-arm64.tar.gz" - echo "harvester_artifact_name=${artifact_name}" >> "$GITHUB_ENV" - # emits env.harvester_artifact_path - bash .github/actions/build-harvester.sh --artifact "${artifact_name}" - - - name: Upload Harvester Artifact - uses: actions/upload-artifact@v4 - with: - name: ${{ env.harvester_artifact_name }} - path: ${{ env.harvester_artifact_path }} - if-no-files-found: error - - build-harvester-macos-x86-64: - runs-on: macOS-13 - steps: - - name: Cleanup Environment - uses: Chia-Network/actions/clean-workspace@main - - - name: Checkout Repo - uses: actions/checkout@v4 - - - name: Set Env - uses: Chia-Network/actions/setjobenv@main - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Get Version Number - id: version_number - run: bash -e .github/actions/get-version.sh macos x86-64 - - - name: Build Harvester - shell: bash - run: | - export artifact_name="green_reaper-v${{ env.BB_VERSION }}-macos-x86-64.tar.gz" - echo "harvester_artifact_name=${artifact_name}" >> "$GITHUB_ENV" - # emits env.harvester_artifact_path - bash .github/actions/build-harvester.sh --artifact "${artifact_name}" - - - name: Upload Harvester Artifact - uses: actions/upload-artifact@v4 - with: - name: ${{ env.harvester_artifact_name }} - path: ${{ env.harvester_artifact_path }} - if-no-files-found: error - - build-bladebit-ubuntu-x86-64: runs-on: ubuntu-latest steps: @@ -275,7 +55,7 @@ jobs: path: ${{ github.workspace }}/bin/${{ env.BB_ARTIFACT_NAME_CUDA }} if-no-files-found: error - build-bladebit-almalinux-x86-64: + build-bladebit-rhl-x86-64: runs-on: ubuntu-latest container: image: ghcr.io/chia-network/build-images/manylinux_cuda_x86_64:latest @@ -290,7 +70,7 @@ jobs: - name: Get Version Number id: version_number - run: .github/actions/get-version.sh almalinux x86-64 + run: .github/actions/get-version.sh rhl x86-64 - name: Install Prerequisites run: | @@ -323,7 +103,7 @@ jobs: path: ${{ github.workspace }}/bin/${{ env.BB_ARTIFACT_NAME_CUDA }} if-no-files-found: error - build-bladebit-almalinux-arm64: + build-bladebit-rhl-arm64: runs-on: ubuntu-24.04-arm container: image: ghcr.io/chia-network/build-images/manylinux_cuda_aarch64:latest @@ -338,7 +118,7 @@ jobs: - name: Get Version Number id: version_number - run: .github/actions/get-version.sh almalinux arm64 + run: .github/actions/get-version.sh rhl arm64 - name: Install Prerequisites run: | @@ -443,7 +223,7 @@ jobs: bb_version="$(./Release/bladebit.exe --version | xargs)" if [[ "$bb_version" != "$BB_VERSION" ]]; then - >&2 echo "Incorrect bladebit version. Got but '$bb_version' expected '$BB_VERSION'." + >&2 echo "Incorrect bladebit version. Got'$bb_version' but expected '$BB_VERSION'." exit 1 fi @@ -512,7 +292,7 @@ jobs: bb_version="$(./Release/bladebit_cuda.exe --version | xargs)" if [[ "$bb_version" != "$BB_VERSION" ]]; then - >&2 echo "Incorrect bladebit version. Got but '$bb_version' expected '$BB_VERSION'." + >&2 echo "Incorrect bladebit version. Got bb_version' but expected '$BB_VERSION'." exit 1 fi diff --git a/build-harvester.sh b/build-harvester.sh new file mode 100755 index 00000000..057b62cc --- /dev/null +++ b/build-harvester.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +set -e +_dir=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd) +cd $_dir + +build_dir=build-harvester +mkdir -p ${build_dir} + +cmake -B ${build_dir} -DCMAKE_BUILD_TYPE=Release -DBB_HARVESTER_ONLY=ON +cmake --build ${build_dir} --target clean --config Release +cmake --build ${build_dir} --target bladebit_harvester --config Release -j32 diff --git a/src/b3/blake3_avx2_x86-64_unix.S b/src/b3/blake3_avx2_x86-64_unix.S index a9ea84e7..5fb418a9 100644 --- a/src/b3/blake3_avx2_x86-64_unix.S +++ b/src/b3/blake3_avx2_x86-64_unix.S @@ -1,3 +1,7 @@ +#if defined(__ELF__) && defined(__linux__) +.section .note.GNU-stack,"",%progbits +#endif + #ifdef __x86_64__ .intel_syntax noprefix .global _blake3_hash_many_avx2 diff --git a/src/b3/blake3_avx512_x86-64_unix.S b/src/b3/blake3_avx512_x86-64_unix.S index 1fd5bae5..060f1256 100644 --- a/src/b3/blake3_avx512_x86-64_unix.S +++ b/src/b3/blake3_avx512_x86-64_unix.S @@ -1,3 +1,7 @@ +#if defined(__ELF__) && defined(__linux__) +.section .note.GNU-stack,"",%progbits +#endif + #ifdef __x86_64__ .intel_syntax noprefix diff --git a/src/b3/blake3_sse41_x86-64_unix.S b/src/b3/blake3_sse41_x86-64_unix.S index 320a89fa..388a8826 100644 --- a/src/b3/blake3_sse41_x86-64_unix.S +++ b/src/b3/blake3_sse41_x86-64_unix.S @@ -1,3 +1,7 @@ +#if defined(__ELF__) && defined(__linux__) +.section .note.GNU-stack,"",%progbits +#endif + #ifdef __x86_64__ .intel_syntax noprefix .global blake3_hash_many_sse41 From 62084d02c7627cb1de23790dcb31217ffcef612b Mon Sep 17 00:00:00 2001 From: Harold Brenes <152330941+haorldbchi@users.noreply.github.com> Date: Wed, 5 Feb 2025 17:44:10 -0500 Subject: [PATCH 15/15] Bump to 3.1.1 Signed-off-by: Harold Brenes <152330941+haorldbchi@users.noreply.github.com> --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 0c6173b5..1795fa29 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -3.1.0 +3.1.1