-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Global Goal #65
Comments
This is really complex topic, so let me start at the beginning. I recognized I see your point with the second option. I feel it is much too early to start discussing the final goal or direction we're following - (e.g. to which languages we'll be binding this library to). I think its OK for now to focus on having to be able to interface with C. So, all algorithms should be Also, one important fact: please keep in mind there are few really powerful projects that we cannot even compete with (at least not at the moment). IMHO if we are going to attract users (and contributors), it will certainly not be with richness and quality of algorithms (at least not for next few years). If person seeks for a library to solve certain problem, he/she will most likely go for well known libraries like OpenCV. I think having beautiful, easy to understand (write and read) API, leveraged with performance is most important for this library. I think D is capable of that, and that is why I chose it! And that's why I ran from other options:
My idea was to try to take good from each, and try not to inherit bad. :) - Easy to write as with matlab and python, but once compiled fast as C/C++. Hope I'm making sense here...
So, if we focus on ease of use in D, how does this idea translate to other languages? I know Python and Julia have powerful replacement for ndslice, which can be used to mimic the original API, I don't have experience with Ruby, Rust and Go. How do you propose we bind this library that heavily relies on ndslice to other languages? (please don't get me wrong - I don't doubt it can be done, I just have no idea how) Sorry for the long post. This topic requires a good discussion, so fire away! :) |
Current DCV state is like python/numpy/opencv. It may be faster, but still useless for production. I don't think we need to port existing API to C. Instead, we need to allow users to be able to bind their algorithms based on DCV to other languages. It is possible with OpenCV. To be at least good as OpenCV we need to have algorithms that do not use DRuntime. It should be clear for users what algorithms require DRuntime and what algorithm do not require DRuntime. |
I think its a lot worse than than - I'm pretty sure it's not faster! :)
This sounds good, but I'm afraid you'll have to explain this bit further. How does this affect our development in future? How do we not use druntime? (sorry, I'm, obviously still new to this) |
@9il could you look at https://habrahabr.ru/post/311568/ and if you have account answer for comments, or write answer here and I will add them to article. |
@bubnenkoff Thank you for the translation. But it is far from the original text. |
so, i can not comment all questions. Will comment few ones, after the first comment moderation |
@ljubobratovicrelja I am sorry for the unrelated discussion |
Algorithms should be |
No worries ;) always glad to see word of Mir spreading!
Well, this doesn't sound so bad except the threading part. Is it possible (wise) to totally ditch traditional CPU threading (posix and windows threads) in favor of OpenCL? What are downfalls of this choice - I suppose user must have OpenCL runtime installed? How would that affect the upper-level algorithm development? Pinging @thewilsonator, suppose he's good man to answer to this kind of question. :) Also, do you know is there maybe already such threading library on dub base? - with nothrow and nogc. Or would we maybe like to start writing one from scratch? |
No, I have implemented only
Yes, we can use core.thread code and look into existing C libraries. |
Awesome, sounds good! How do we act with DCV until we have working version of such library? But anyways, I'd like to keep the focus on development of new algorithms in next period, so parallelization (and micro-optimization) will not be that important. By the time we have collection of new algorithms I suppose we'll have working version of such library to use and parallelize written algorithms in DCV. Sounds good? Or do you propose different strategy? |
Yes. current task pool can be used for now. But loops bodies should be |
OK, great! |
Another important point is that algorithm's API should feel solid. Currently each major algorithm has its own API style, which is bad for big library |
Agree! This is something I really wanted to address to with everyone involved with DCV development at some point. I was referring partially to this problem in second post in #64. Thank you for noting this! |
In order to use OpenCL in the first place I need to get my compiler changes into ldc, and the review is taking longer than I had hoped, and not help by the imminent release of 1.1.0. Then I need to get libmir/dcompute into a working shape, and then integrate it with mir. So it will take some time before it is ready, but so will a multi-threaded mir. So assuming that we can get seamless and painless, and as transparent as possible integration. I don't think there any downfalls.
Correct.
I don't think it would, at least not dramatically, because the style will be largely the same and some code will be reusable across the host and device. and the upper-level algorithms should be mostly composition of lower level ones anyway. Perhaps @John-Colvin would have more insight on this. |
Possible variants:
nothrow @nogc
layer should be presented. OOP API should be optional or removed. Advantage: number of users and contributors are limited only by langauge bindings like Python, Julia, Ruby, Rust, and Go (yes, we can build libraries for Rust and Go 😄 I think it is better way to move forward with D ). A professional project that can be live during many-many years.Library for D in 99% cases is useless as general purpose library. Library written in D is a library for D, which can be used in other languages like a common C library.
The text was updated successfully, but these errors were encountered: