www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - BLAS implementation for D

reply data pulverizer <data.pulverizer gmail.com> writes:
I have just finished the first version of a BLAS implementation 
for D mostly done by code conversion from GSL's BLAS module 
https://github.com/dataPulverizer/dblas

It is complete functionally with respect covering all the 
functions implemented in BLAS.  9il has suggested that we should 
work to merge this library with Mir GLAS which I think is a good 
idea.

As the readme says the next phase is:

* Performance optimization
* Complete unit test coverage
* Type specific BLAS aliases

Thanks

p.s. Sorry for originally positing this in the General Forum, it 
should be here instead

---
DP
Apr 13 2017
next sibling parent reply jmh530 <john.michael.hall gmail.com> writes:
On Thursday, 13 April 2017 at 09:18:06 UTC, data pulverizer wrote:
 It is complete functionally with respect covering all the 
 functions implemented in BLAS.  9il has suggested that we 
 should work to merge this library with Mir GLAS which I think 
 is a good idea.
So Mir GLAS doesn't cover all the functions? Is that the main thing that this would add?
Apr 13 2017
parent data pulverizer <data.pulverizer gmail.com> writes:
On Thursday, 13 April 2017 at 11:29:39 UTC, jmh530 wrote:
 On Thursday, 13 April 2017 at 09:18:06 UTC, data pulverizer 
 wrote:
 It is complete functionally with respect covering all the 
 functions implemented in BLAS.  9il has suggested that we 
 should work to merge this library with Mir GLAS which I think 
 is a good idea.
So Mir GLAS doesn't cover all the functions? Is that the main thing that this would add?
Yes, the dblas library implements all the BLAS functions
Apr 13 2017
prev sibling parent reply Dejan Lekic <dejan.lekic gmail.com> writes:
On Thursday, 13 April 2017 at 09:18:06 UTC, data pulverizer wrote:
 I have just finished the first version of a BLAS implementation 
 for D mostly done by code conversion from GSL's BLAS module 
 https://github.com/dataPulverizer/dblas

 It is complete functionally with respect covering all the 
 functions implemented in BLAS.  9il has suggested that we 
 should work to merge this library with Mir GLAS which I think 
 is a good idea.

 As the readme says the next phase is:

 * Performance optimization
 * Complete unit test coverage
 * Type specific BLAS aliases

 Thanks

 p.s. Sorry for originally positing this in the General Forum, 
 it should be here instead

 ---
 DP
Really good stuff! I see no reason for calling it dblas (the package) - simple `blas` would do I think... :)
Apr 13 2017
parent reply Bill Baxter via Digitalmars-d-announce writes:
I would probably call it gnublas or gplblas something to make it clear that
it's got that aspect to it.
It can't ever really be "the one true" blas lib for all D users with that
license.

Re: merging with Mir GLAS, that seems very tricky without changing Mir
GLAS's license to GPL.
--bb

On Thu, Apr 13, 2017 at 7:56 AM, Dejan Lekic via Digitalmars-d-announce <
digitalmars-d-announce puremagic.com> wrote:

 On Thursday, 13 April 2017 at 09:18:06 UTC, data pulverizer wrote:

 I have just finished the first version of a BLAS implementation for D
 mostly done by code conversion from GSL's BLAS module
 https://github.com/dataPulverizer/dblas

 It is complete functionally with respect covering all the functions
 implemented in BLAS.  9il has suggested that we should work to merge this
 library with Mir GLAS which I think is a good idea.

 As the readme says the next phase is:

 * Performance optimization
 * Complete unit test coverage
 * Type specific BLAS aliases

 Thanks

 p.s. Sorry for originally positing this in the General Forum, it should
 be here instead

 ---
 DP
Really good stuff! I see no reason for calling it dblas (the package) - simple `blas` would do I think... :)
Apr 13 2017
next sibling parent 9il <ilyayaroshenko gmail.com> writes:
On Thursday, 13 April 2017 at 17:43:14 UTC, Bill Baxter wrote:
 I would probably call it gnublas or gplblas something to make 
 it clear that
 it's got that aspect to it.
 It can't ever really be "the one true" blas lib for all D users 
 with that
 license.

 Re: merging with Mir GLAS, that seems very tricky without 
 changing Mir
 GLAS's license to GPL.
 --bb
Yep. Mir GLAS license would be always BSL. It is possible to use Netlib's source codes. They are always up to date and can be used for BSL.
Apr 13 2017
prev sibling parent reply data pulverizer <data.pulverizer gmail.com> writes:
On Thursday, 13 April 2017 at 17:43:14 UTC, Bill Baxter wrote:
 Re: merging with Mir GLAS, that seems very tricky without 
 changing Mir
 GLAS's license to GPL.
You raise a very good point. My intention is to completely re-write each function that was based on GSL's CBLAS while upgrading the performance. Once this is done the library should be regarded as a different work ... if anyone knows more about how licenses work and can shed more light on this approach please comment. I would not want people to avoid using it in the future because of the license status.
Apr 14 2017
parent reply jmh530 <john.michael.hall gmail.com> writes:
On Friday, 14 April 2017 at 15:37:20 UTC, data pulverizer wrote:
 You raise a very good point. My intention is to completely 
 re-write each function that was based on GSL's CBLAS while 
 upgrading the performance. Once this is done the library should 
 be regarded as a different work ... if anyone knows more about 
 how licenses work and can shed more light on this approach 
 please comment. I would not want people to avoid using it in 
 the future because of the license status.
Not a lawyer, but I think if you just port it to another language it is a derived work in GPL and the ported project must also be GPL. However, if you're completely re-writing each function, I don't know. Companies that do this would have one team look at every function and write some specs for it and have another group write it without reference to the original.
Apr 14 2017
next sibling parent data pulverizer <data.pulverizer gmail.com> writes:
On Friday, 14 April 2017 at 16:31:24 UTC, jmh530 wrote:
 On Friday, 14 April 2017 at 15:37:20 UTC, data pulverizer wrote:
 You raise a very good point. My intention is to completely 
 re-write each function that was based on GSL's CBLAS while 
 upgrading the performance. Once this is done the library 
 should be regarded as a different work ... if anyone knows 
 more about how licenses work and can shed more light on this 
 approach please comment. I would not want people to avoid 
 using it in the future because of the license status.
Not a lawyer, but I think if you just port it to another language it is a derived work in GPL and the ported project must also be GPL. However, if you're completely re-writing each function, I don't know. Companies that do this would have one team look at every function and write some specs for it and have another group write it without reference to the original.
Thank you for the information ... looks like I need to talk to a friendly lawyer to know for sure - if the term "friendly lawyer" is not an oxymoron :-)
Apr 14 2017
prev sibling parent reply bachmeier <no spam.net> writes:
On Friday, 14 April 2017 at 16:31:24 UTC, jmh530 wrote:

 Not a lawyer, but I think if you just port it to another 
 language it is a derived work in GPL and the ported project 
 must also be GPL.
This is correct.
 However, if you're completely re-writing each function, I don't 
 know.
I don't think that argument would apply in this case. It would be necessary to start a new project to give it an alternative license.
Apr 14 2017
parent reply Bill Baxter via Digitalmars-d-announce writes:
On Fri, Apr 14, 2017 at 12:18 PM, bachmeier via Digitalmars-d-announce <
digitalmars-d-announce puremagic.com> wrote:

 On Friday, 14 April 2017 at 16:31:24 UTC, jmh530 wrote:

 Not a lawyer, but I think if you just port it to another language it is a
 derived work in GPL and the ported project must also be GPL.
This is correct. However, if you're completely re-writing each function, I don't know.

 I don't think that argument would apply in this case. It would be
 necessary to start a new project to give it an alternative license.
And more than that, companies that are serious about avoiding litigation will make sure that everyone working on this new project has not even seen the source code for the library with the other license. If someone who has seen the source code provides help, it will only be in the form of advice, not code, to make sure there is no possible argument that the copyright of the original was violated. --bb
Apr 15 2017
parent Ola Fosheim =?UTF-8?B?R3LDuHN0YWQ=?= writes:
On Saturday, 15 April 2017 at 20:20:01 UTC, Bill Baxter wrote:
 And more than that, companies that are serious about avoiding 
 litigation will make sure that everyone working on this new 
 project has not even seen the source code for the library with 
 the other license.  If someone who has seen the source code 
 provides help, it will only be in the form of advice, not code, 
 to make sure there is no possible argument that the copyright 
 of the original was violated.
In the case of BLAS, there is a reference implementation in Fortran which is free for commercial use. They only ask the authors to be credited. Of course, one should not look at other implementations...
Apr 20 2017