mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > GMP-ECM

Reply
 
Thread Tools
Old 2012-02-16, 16:59   #1
Brian Gladman
 
Brian Gladman's Avatar
 
May 2008
Worcester, United Kingdom

72·11 Posts
Default Windows build for GPU CUDA code

I have just added a Visual Studio 2010 build for the GPU stage 1 code on Windows x64 to the SVN (it might work on win32 but I have not tested it).

As Paul L has already said, this code is only for those who are brave (or foolhardy) since it requires that the project build properties in Visual Studio are properly set up for your GPU configuration before it is built.

Please seek advice, discuss or report issues here.

Brian Gladman
Brian Gladman is offline   Reply With Quote
Old 2012-02-17, 06:43   #2
NBtarheel_33
 
NBtarheel_33's Avatar
 
"Nathan"
Jul 2008
Maryland, USA

5·223 Posts
Default

Quote:
Originally Posted by Brian Gladman View Post
I have just added a Visual Studio 2010 build for the GPU stage 1 code on Windows x64 to the SVN (it might work on win32 but I have not tested it).

As Paul L has already said, this code is only for those who are brave (or foolhardy) since it requires that the project build properties in Visual Studio are properly set up for your GPU configuration before it is built.

Please seek advice, discuss or report issues here.

Brian Gladman
"GPU Stage 1" - is this going to be GPU code for P-1?
NBtarheel_33 is offline   Reply With Quote
Old 2012-02-18, 05:55   #3
Karl M Johnson
 
Karl M Johnson's Avatar
 
Mar 2010

3·137 Posts
Default

It's for ecm from GMP-ECM package.

Last fiddled with by Karl M Johnson on 2012-02-18 at 05:56
Karl M Johnson is offline   Reply With Quote
Old 2012-02-19, 19:17   #4
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Liverpool (GMT/BST)

10111011110102 Posts
Default

Quote:
Originally Posted by NBtarheel_33 View Post
"GPU Stage 1" - is this going to be GPU code for P-1?
While it would be possible to code p-1 for gpu the way gpu-ecm gains its speed is by running multiple curves at once. P-1 is one curve so that wouldn't work.
henryzz is offline   Reply With Quote
Old 2012-02-20, 03:47   #5
Mini-Geek
Account Deleted
 
Mini-Geek's Avatar
 
"Tim Sorbera"
Aug 2006
San Antonio, TX USA

10B616 Posts
Default

Quote:
Originally Posted by henryzz View Post
While it would be possible to code p-1 for gpu the way gpu-ecm gains its speed is by running multiple curves at once. P-1 is one curve so that wouldn't work.
Would it be possible to simply run P-1 on multiple numbers?
Mini-Geek is offline   Reply With Quote
Old 2012-02-20, 15:46   #6
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Liverpool (GMT/BST)

135728 Posts
Default

Quote:
Originally Posted by Mini-Geek View Post
Would it be possible to simply run P-1 on multiple numbers?
Dunno.
henryzz is offline   Reply With Quote
Old 2012-02-20, 20:48   #7
jasonp
Tribal Bullet
 
jasonp's Avatar
 
Oct 2004

2·52·71 Posts
Default

Yes, if you have to do batch factorization of many different numbers then a GPU would work nicely, but you will need separate state for each number. In fact there's a cottage industry within the number field sieve community to work out a method where many bazillions of small numbers, maybe 80-150 bits each, can get factored with ECM and P+-1. This is the 'NFS cofactorization problem' and graphics cards look like an ideal way to solve it. They're much cheaper and possibly much faster than FPGAs, and programming them is a snap with modern toolkits so you don't need to know any hardware design.
jasonp is offline   Reply With Quote
Old 2012-02-24, 11:39   #8
Robert Holmes
 
Robert Holmes's Avatar
 
Oct 2007

2×53 Posts
Default

Some interesting developments as of yesterday:

Improved addition chains for Edward's curve ECM: http://eprint.iacr.org/2012/089

and

More ECM-friendly curve families: http://eprint.iacr.org/2012/070
Robert Holmes is offline   Reply With Quote
Old 2013-04-27, 16:05   #9
mklasson
 
Feb 2004

1000000102 Posts
Default

The build.vc11 gpu project file seems outdated and no longer works. I did some changes to it and managed to get gmp-ecm svn2518 to build and run with gpu support using VS 2012 Express and CUDA 5.0 on win7 x64.

I've put the updated files and what I hope are sufficient instructions to get things working at http://mklasson.com/gmp-ecm_70dev_gpu_vc11.zip.

If you're only looking for binaries you can try my x64 i7 executables:
http://mklasson.com/gmp-ecm_gpu_70de...7_sm20_x64.zip
http://mklasson.com/gmp-ecm_gpu_70de...7_sm30_x64.zip

My 660 Ti card seems about as fast as all four cores of my 3.6GHz i7.

Many thanks to Brian, Cyril, and the other fellows behind the scenes!
mklasson is offline   Reply With Quote
Old 2013-04-29, 06:08   #10
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
"name field"
Jun 2011
Thailand

3×5×683 Posts
Default

Quote:
Originally Posted by mklasson View Post
I've put the updated files ..
Thanks a lot for this work! Very useful. I will give it a try to see how fast a gtx580 can ECM.
LaurV is offline   Reply With Quote
Old 2013-04-29, 22:22   #11
mklasson
 
Feb 2004

2×3×43 Posts
Default

Quote:
Originally Posted by LaurV View Post
Thanks a lot for this work! Very useful. I will give it a try to see how fast a gtx580 can ECM.
Be sure to factor 300-digit numbers to maximize the gpu speedup From readme.gpu: "The modular arithmetic on GPU can only handle integers smaller that 2^1018. The execution time does not depend on the size of the interger that is factored as the same code is used for all integers."

My 660 Ti is about 12x the speed of one 3.6GHz i7 core on a c295 input.

And see http://www.mersenneforum.org/showpos...5&postcount=89 for a stage2 bug workaround.
mklasson is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
I'm trying to speedup AES MSIEVE factoring using CUDA build but... loopdemack Msieve 11 2016-01-18 13:44
32-bit CUDA build? f1pokerspeed Msieve 2 2013-12-30 01:14
Windows x64 CUDA Build Brian Gladman Msieve 12 2013-08-30 12:40
CUDA executable code nucleon GPU Computing 4 2013-02-04 22:44
need C/C++ modular arithmetic code for Windows ixfd64 Programming 15 2008-07-30 03:52

All times are UTC. The time now is 19:37.


Sun Nov 27 19:37:19 UTC 2022 up 101 days, 17:05, 0 users, load averages: 1.12, 1.38, 1.27

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔