hkaiser changed the topic of #ste||ar to: STE||AR: Systems Technology, Emergent Parallelism, and Algorithm Research | stellar-group.org | HPX: A cure for performance impaired parallel applications | github.com/STEllAR-GROUP/hpx | This channel is logged: irclog.cct.lsu.edu
Yorlik_ has joined #ste||ar
Yorlik has quit [Ping timeout: 265 seconds]
Arnav-Negi has joined #ste||ar
hkaiser has quit [Quit: Bye!]
Arnav-Negi has quit [Ping timeout: 265 seconds]
Arnav-Negi has joined #ste||ar
Arnav has joined #ste||ar
Arnav-Negi has quit [Ping timeout: 265 seconds]
K-ballo1 has joined #ste||ar
Arnav has quit [Client Quit]
Arnav has joined #ste||ar
Arnav is now known as Arnav-Negi
K-ballo has quit [Ping timeout: 276 seconds]
K-ballo1 is now known as K-ballo
arnav has joined #ste||ar
Arnav-Negi has quit [Ping timeout: 260 seconds]
Arnav-Negi has joined #ste||ar
arnav has quit [Ping timeout: 268 seconds]
arnav has joined #ste||ar
Arnav-Negi has quit [Ping timeout: 268 seconds]
arnav has quit [Ping timeout: 255 seconds]
arnav has joined #ste||ar
arnav is now known as Arnav-Negi
Yorlik_ is now known as Yorlik
<Arnav-Negi> In the asynchronous IO project, what exactly does a use case refer to? Is the goal to make a module for async IO?
<satacker[m]> <Arnav-Negi> "In the asynchronous IO project..." <- I did not think of having it as a module, do we need such a module hkaiser: ?
<satacker[m]> As far as the use case is concerned, there is a reference paper attached that describes a use case very nicely, did you go through it?
Arnav-Negi has quit [Ping timeout: 268 seconds]
matrixb01x has joined #ste||ar
<matrixb01x> is there any sample of previous year proposals for STELLAR
<matrixb01x> satacker
<satacker[m]> This one is mine
<matrixb01x> thanks
<matrixb01x> can anyone tell me what could be pitfalls/issues in a python wrapper for cpp lib ? gonidelis[m]
<gonidelis[m]> matrixb01x: templates ;)
<gonidelis[m]> rtohid: can tell you more on that
<gonidelis[m]> there is room for exploration space though
<gonidelis[m]> there is space for exploration I meant
<satacker[m]> IMHO - Designing an interface that leverages the benefits of python and provides the efficient backend of HPX is the core of this project. Although stating the obvious part, it's important to clarify that it's not easy to simply wrap things around with pybind11/boost python/tolc automatic binding generation, the interface that the python wrapper will provide matters the most.
Arnav-Negi has joined #ste||ar
<Arnav-Negi> Hi sorry for the late reply satacker, my I had to charge my laptop. I was reading up on the tools but will be reading the paper today. So will the project be an implementation of such a paper in hpx?
<satacker[m]> Not a paper, haven't thought that far. For now you should focus on what the non-trivial example should be.
<satacker[m]> Also that paper is already implemented and it's link is in the references.
arnav has joined #ste||ar
Arnav-Negi has quit [Ping timeout: 260 seconds]
<gonidelis[m]> K-ballo: https://godbolt.org/z/E1beo9ExT where does `suffix` dangle?
<matrixb01x> what problems JIT can have in the wrapping hpx . I dont get it  rtohid[m]
<gonidelis[m]> jit might be needed when using python to execute generic code
arnav is now known as Arnav-Negi
<K-ballo> gonidelis[m]: the by-ref capture in the lambda
<K-ballo> it says so in the comments already
matrixb01x has quit [Quit: Client closed]
<gonidelis[m]> Ah, suffix is captured by ref
<gonidelis[m]> And then what?
<gonidelis[m]> Suffix is Destroyed ?
<K-ballo> the temporary it points to is
architisham has joined #ste||ar
K-ballo1 has joined #ste||ar
K-ballo has quit [Ping timeout: 260 seconds]
K-ballo1 is now known as K-ballo
architisham has quit [Quit: Client closed]
hkaiser has joined #ste||ar
architisham has joined #ste||ar
Arnav-Negi has quit [Ping timeout: 276 seconds]
Arnav-Negi has joined #ste||ar
Arnav-Negi has quit [Ping timeout: 248 seconds]
architisham has quit [Quit: Client closed]
K-ballo1 has joined #ste||ar
K-ballo has quit [Ping timeout: 260 seconds]
K-ballo1 is now known as K-ballo
<gonidelis[m]> K-ballo: the temporary being {3,4}
<gonidelis[m]> why is it destroyed?
<gonidelis[m]> what does the lambda by-ref capture have to do with an external temporary being destroyed
<gonidelis[m]> hkaiser: too
<hkaiser> have some code?
<gonidelis[m]> K-ballo: https://godbolt.org/z/E1beo9ExT where does `suffix` dangle?
<hkaiser> well {3, 4} goes out of scope at the semicolon in line 31
<gonidelis[m]> so the by-ref capture is not even a problem
<gonidelis[m]> how is it being used afterwards then? should be kept as internal state smh in order to be used in line 35 (obvisouly it isn't)
<hkaiser> the lambda captures a reference to the argument and refers to it after the argument went out of scope
<gonidelis[m]> wow
<gonidelis[m]> so again, the problem is passing a temporary as a function argument as a `const&`
<hkaiser> no
<hkaiser> the problem is capturing a reference to a reference in this case
<gonidelis[m]> i regretted it as soon as i type it
<gonidelis[m]> ok
<hkaiser> capturing by value would do the trick
<hkaiser> capturing a reference like here is not wrong, it is just dangerous as the user has to ensure the object the reference is referring to is kept alive long enough
<gonidelis[m]> cause suffix would refer to it in the beginning, and then it would be copied over in the lambda. whereas now, suffix refers to it (the temporary) and then lambda refers to it. but then line 31 ends and after the semicolon, the temp does not exist no more, so it's UB
<gonidelis[m]> lambda refers to its reference ^^
<gonidelis[m]> final takeaway, when capturing by ref make sure your thingy remains alive long enough
<gonidelis[m]> ¯_(ツ)_/¯
Arnav-Negi has joined #ste||ar
<Arnav-Negi> Hi I wanted to check if I am understanding the 'use case' required for the async IO project correctly
<Arnav-Negi> So for example in a video game when multiple models are loaded (eg. .glb files) this requires I/O which can be dealt with asynchronously
<Arnav-Negi> Is this a plausible use case for it
<Arnav-Negi> S/R can be used to schedule the read request for all the files on a thread pool and then they can be read and parsed in coroutines
<hkaiser> gonidelis[m]: btw, a better API design would have made this a bit more robust
<hkaiser> gonidelis[m]: https://godbolt.org/z/nsxhedd64
<hkaiser> Arnav-Negi: yes, that sounds plausib;e
<Arnav-Negi> Great, I will be moving forward with this use case then
<Arnav-Negi> Can I suggest more use cases if they strike me later?
<hkaiser> Arnav-Negi: the whole point of utilizing asynchrony (in IO and other places) is to enable the different pieces of hardware we have to work independently and concurrently
<hkaiser> but doing so is difficult in sequential programming models, so we have to find ways to do it in new ways, preferrably without making the programmers brain explode by requiring to write code in ways that are difficult to understand
<hkaiser> Arnav-Negi: yes, please do that
<Arnav-Negi> I see so the goal is to use S/R and coroutines to make asynchronous programming more readable?
<Arnav-Negi> Also how will the code written for the use cases be included in the hpx library? Maybe as an example?
<hkaiser> Arnav-Negi: yes, or as some applications demonstrating (and comparing) things
<hkaiser> readability, performance, functionality, etc.
<Arnav-Negi> I see thanks a lot!
<Arnav-Negi> One last question - Is it fine if I spend the first 2-3 weeks learning about S/R, coroutines and io_uring before I start implementing the use case?
<hkaiser> absolutely
<Arnav-Negi> Alright thanks!
<satacker[m]> It was my intention to demonstrate the usage of S/R facilities, coroutines and algorithms in HPX that are more efficient than std:: and other equivalents, all in one single example. An example that highlights such a case needs to be implemented. There are many (ig) coroutine examples that use io_uring and a few that use with S/R (of which we don't expect much performance benefit when used along with coroutines), but we don't have one that
<satacker[m]> uses HPX with the efficient algorithms it provides. Arnav-Negi
<satacker[m]> To find such an example would mean that you collect information about all of those and think of an example. I see that you need time for P2300. That's not an issue at all. However HPX should be understood beforehand because that's the whole point IMHO.
<Arnav-Negi> Thats alright I can see that the gsoc timeline has May 4 - 28 as time when we can read documentation and get up to speed
<Arnav-Negi> So I definitely will be able to read up on the algorithms hpx provides which might be useful for this
<satacker[m]> Without the plan for a concrete example there is no well defined scope, it would be best if we can decide it before deadline.
<Arnav-Negi> I see then for the example would using hpx in the couring blog by pablo arias be fine?
<Arnav-Negi> The one that I linked above
<Arnav-Negi> Or does the example have to be something different
<satacker[m]> It would be better if it's different.
<satacker[m]> To make this even more interesting hkaiser has implemented hpx::generator
<satacker[m]> You don't need to rush into anything, think it over, if you want you might as well discuss other projects until you get a good example.
<Arnav-Negi> Alright sure I'll look into it more
<Arnav-Negi> So I was thinking that games need to be responsive, so with coroutines we can suspend and process frames during I/O so that it doesn't feel like the game is lagging while it loads them.
<Arnav-Negi> We can use hpx algorithms in tandem with this
<satacker[m]> I don't think we can process frames, it is not an I/O operation that you can rely on using coroutines and requires much speed and low latency.
<Arnav-Negi> Is there an example on parallelized FFT?
<Arnav-Negi> I was looking into implementing it for the project "implement your favourite algorithm in hpx"
Arnav-Negi has quit [Quit: Konversation terminated!]