Re: [hpx-users] GSoC 2018, on "applying machine learning technques ..." project

2018-02-19 Thread Patricia Grubel
As far as performance counters you may wish to experiment with the overhead 
counter in addition to the idle-rate counter.

Pat
> On Feb 19, 2018, at 12:26 PM, Zahra Khatami  wrote:
> 
> Hi Ray,
> 
> If you refer to the published paper, you could get more information. 
> Generally talking, this project uses compiler and runtime system to gather 
> both static and dynamic information to set HPX algorithm parameters such as 
> chunk sizes efficiently. Static information are gathered by a compiler, which 
> we used clang and we developed a new class for clang for this purpose. 
> Dynamic information are gathered by new HPX policies that we developed for 
> this purpose. You can look at the example in HPXML in HPX GitHub.
> 
> Thanks,
> Zahra
> 
> On Mon, Feb 19, 2018 at 9:04 AM 김규래  > wrote:
> Hi Adrian,
> 
> Thanks for clarifying.
> 
> I think I pretty much get the picture.
> 
>  
> Looking forward to get in touch with Patrick in IRC within this week.
> 
>  
> Thanks everyone.
> 
>  
> msca8h at naver dot com
> 
> msca8h at sogang dot ac dot kr
> 
> Ray Kim
> 
> ___
> hpx-users mailing list
> hpx-users@stellar.cct.lsu.edu 
> https://mail.cct.lsu.edu/mailman/listinfo/hpx-users 
> 
> -- 
> Best Regards, Zahra Khatami | PhD Student Center for Computation & Technology 
> (CCT) School of Electrical Engineering & Computer Science Louisiana State 
> University 2027 Digital Media Center (DMC) Baton Rouge, LA 70803
> ___
> hpx-users mailing list
> hpx-users@stellar.cct.lsu.edu
> https://mail.cct.lsu.edu/mailman/listinfo/hpx-users

___
hpx-users mailing list
hpx-users@stellar.cct.lsu.edu
https://mail.cct.lsu.edu/mailman/listinfo/hpx-users


Re: [hpx-users] GSoC 2018, on "applying machine learning technques ..." project

2018-02-19 Thread Zahra Khatami
Hi Ray,

If you refer to the published paper, you could get more information.
Generally talking, this project uses compiler and runtime system to gather
both static and dynamic information to set HPX algorithm parameters such as
chunk sizes efficiently. Static information are gathered by a compiler,
which we used clang and we developed a new class for clang for this
purpose. Dynamic information are gathered by new HPX policies that we
developed for this purpose. You can look at the example in HPXML in HPX
GitHub.

Thanks,
Zahra

On Mon, Feb 19, 2018 at 9:04 AM 김규래  wrote:

> Hi Adrian,
>
> Thanks for clarifying.
>
> I think I pretty much get the picture.
>
>
>
> Looking forward to get in touch with Patrick in IRC within this week.
>
>
>
> Thanks everyone.
>
>
>
> msca8h at naver dot com
>
> msca8h at sogang dot ac dot kr
>
> Ray Kim
> ___
> hpx-users mailing list
> hpx-users@stellar.cct.lsu.edu
> https://mail.cct.lsu.edu/mailman/listinfo/hpx-users
>
-- 
Best Regards, Zahra Khatami | PhD Student Center for Computation &
Technology (CCT) School of Electrical Engineering & Computer Science
Louisiana State University 2027 Digital Media Center (DMC) Baton Rouge, LA
70803
___
hpx-users mailing list
hpx-users@stellar.cct.lsu.edu
https://mail.cct.lsu.edu/mailman/listinfo/hpx-users


Re: [hpx-users] GSoC 2018, on "applying machine learning technques ..." project

2018-02-19 Thread 김규래
Hi Adrian,
Thanks for clarifying.
I think I pretty much get the picture.
 
Looking forward to get in touch with Patrick in IRC within this week.
 
Thanks everyone.
 
msca8h at naver dot com
msca8h at sogang dot ac dot kr
Ray Kim
___
hpx-users mailing list
hpx-users@stellar.cct.lsu.edu
https://mail.cct.lsu.edu/mailman/listinfo/hpx-users


Re: [hpx-users] GSoC 2018, on "applying machine learning technques ..." project

2018-02-19 Thread Adrian Serio

Patrick and Ray,

Just for clarity's sake I will point out that Zahra's work did include 
information gathered at compile time. She used a custom Clang plugin to 
gather this information.


That being said, we may want to only utilize runtime information in the 
context of this project. However, I will deffer that decision to the 
mentors assigned to the project.


Adrian


On 2/18/2018 4:10 PM, Patrick Diehl wrote:

Hi Ray Kim,


But the original GSoC project description and the paper[1]  both mention
*compiler provided* *static data*.
 From my belief this cannot be acquired from HPX performance counters
(excuse me if they actually do)
If this project should be independent of compiler (or libray), than I
suppose I may not be bothered?

Yes, this was mentioned in the project description. But since we wrote
the description, I looked into the blaze library and how they decide to
use single core or omp execution, depending on the parameters, like the
input size. They measuring the threshold when a parallel execution is
faster as the single core execution. These thresholds for different
algorithms are provided in a header file as constants.

I was thinking that something similar could be done with machine
learning for the different algorithms. Instead of a threshold we would
have function learned by the machine learning algorithm.

This is just my thinking how to do this. For sure, there are many other
approaches out there. it is your task to propose any solution, you think
could solve this problem.


In case of not doing any machine learning during run time,
What form of implementation are you expecting?

I was thinking to have for different parallel algorithms one function

f_i(length of input, amount of cpus, ...) -> (chunk_size, used amount of
cpus)

So during run time, your function get input parameters, like the amount
of cpus and the length of the input, and maybe many more. And the
function returns the optimal chunk size and maybe the  used amount of
cpus. Where used amount is the amount of cpu used by hpx. For example
one wants to run hpx with 3 cpus, but the input size is very small and
it would be faster to just use one cpu. So your function would predict
this.

I was thinking that one could use performance counters to obtain, e.g.
the /threads/idle-rate for different input parameters. So one would have
an d-dimensional input space, which could be used to learn a function
approximating this points.


A separate program that does prediction and sets all the parameters?

1) A shell script, which runs the hpx applications and save all data to
a csv file.

2) A python script, which uses this data to learn the function f_i.

3) These functions should be implemented and a possible smart executor
could use the function for each parallel algorithm to predict the best
chunk size and parallel or serial execution, depending on your input
parameters.


Or a meta program that does the job in compile time?

If you think this is necessary, please provide a explanation why and how
you want to do this.


Or is this up to my proposition?

Yes, you should look into how the task could be solved and propose to
the community any solution, you think could do this. We will discuss
with you your proposed solution and improve it.

I am happy to discuss with you next week on irc. I think it will be
easier to clarify things.

Best,

Patrick

On 02/18/2018 02:15 PM, 김규래 wrote:

​Hi again Patrick,
​Thanks for keeping track of me.

But the original GSoC project description and the paper[1]  both mention
*compiler provided* *static data*.
 From my belief this cannot be acquired from HPX performance counters
(excuse me if they actually do)
If this project should be independent of compiler (or libray), than I
suppose I may not be bothered?

/> If you collect data and try to generate a model and use the > trained
model without any machine learning during run time,/

In case of not doing any machine learning during run time,
What form of implementation are you expecting?
A separate program that does prediction and sets all the parameters?
Or a meta program that does the job in compile time?
Or is this up to my proposition?

Thanks for all
Ray Kim

[1] http://stellar.cct.lsu.edu/pubs/khatami_espm2_2017.pdf, p4 fig2




___
hpx-users mailing list
hpx-users@stellar.cct.lsu.edu
https://mail.cct.lsu.edu/mailman/listinfo/hpx-users


--
Adrian Serio
Scientific Program Coordinator
2118 Digital Media Center
225.578.8506

___
hpx-users mailing list
hpx-users@stellar.cct.lsu.edu
https://mail.cct.lsu.edu/mailman/listinfo/hpx-users


Re: [hpx-users] GSoC 2018, on "applying machine learning technques ..." project

2018-02-18 Thread 김규래
​Hi again Patrick,​Thanks for keeping track of me.

But the original GSoC project description and the paper[1]  both mention 
compiler provided static data.From my belief this cannot be acquired from HPX 
performance counters (excuse me if they actually do)If this project should be 
independent of compiler (or libray), than I suppose I may not be bothered? 
If you collect data and try to generate a model and use the
 trained model without any machine learning during run time,In case of not 
doing any machine learning during run time,What form of implementation are you 
expecting?A separate program that does prediction and sets all the 
parameters?Or a meta program that does the job in compile time?Or is this up to 
my proposition?
Thanks for allRay Kim
[1] http://stellar.cct.lsu.edu/pubs/khatami_espm2_2017.pdf, p4 fig2___
hpx-users mailing list
hpx-users@stellar.cct.lsu.edu
https://mail.cct.lsu.edu/mailman/listinfo/hpx-users


Re: [hpx-users] GSoC 2018, on "applying machine learning technques ..." project

2018-02-17 Thread Patrick Diehl
Hi Ray Kim,

>> The literature mostly talks about feature acquisition through libclang.
>> 
>> Than under this project, is the HPX distribution including tooling based
>> on libclang?

No, the project's solution should be independent on any library. One
requirement would be, that it works independent on the compiler. HPX
itself provide performance counters [0]. These ones could be used for
acquisition of data. Or just data you could measure during run time.

>> And I guess part of a machine learning framework -such as xgboost,
>> tinydnn, etc...
>> 
>>  will also need to be included in the distribution.

No, I think this would be not needed. It really depends on your
approach. If you collect data and try to generate a model and use the
trained model without any machine learning during run time, I would
recommend to use scikit-learn [1]. It is easy to use and you can easily
play around with different models.

For the case when you want to use machine learning during run time, I
would recommend to use scikit-learn to find a suitable model. Once, you
found this model, you should have a look into the model and implement
these algorithms by yourself. I think that we do not need a very
sophisticated model and it would be easy to implement this model.

In addition, I recommend to read the previous mentioned paper to get
some more details.

Best,

Patrick


[0]
http://stellar.cct.lsu.edu/files/hpx_0.9.5/html/hpx/manual/performance_counters/counters.html
[1] http://scikit-learn.org/stable/

On 02/17/2018 12:14 AM, 김규래 wrote:
> Hello Patrick,
> 
> Thank you for your guidance.
> 
> I have few more questions on the subject.
> 
>  
> 
> The literature mostly talks about feature acquisition through libclang.
> 
> Than under this project, is the HPX distribution including tooling based
> on libclang?
> 
> (And custom build system stuff for the additional compile time
> computations?)
> 
>  
> 
> And I guess part of a machine learning framework -such as xgboost,
> tinydnn, etc...
> 
>  will also need to be included in the distribution.
> 
> Am I understanding this project correctly?
> 
>  
> 
> Great regards,
> 
> Ray Kim
> 
>  
> 
> -Original Message-
> *From:* "Patrick Diehl"<patrickdie...@gmail.com>
> *To:* "김규래"<msc...@naver.com>; <hpx-users@stellar.cct.lsu.edu>;
> *Cc:*
> *Sent:* 2018-02-16 (금) 07:17:52
> *Subject:* Re: [hpx-users] GSoC 2018, on "applying machine learning
> technques ..." project
>  
> 
> Hi Ray,
> 
> welcome to the community. A good starting point for this project would
> be to read this publication [0]:
> 
> Zahra Khatami, Lukas Troska, Hartmut Kaiser, J. Ramanujan and Adrian
> Serio, “HPX Smart Executors”, In Proceedings of ESPM2’17: Third
> International Workshop on Extreme Scale Programming Models and
> Middleware (ESPM2’17), 2017. doi: 10.1145/3152041.3152084,
> 
>>> Then is the goal to analyze data? or also implement the algorithms?
> 
> The goal is to provide a new execution policy [1], which utilizes
> machine learning techniques to optimize the computational time.
> 
> So the first step would be to analyze the data.
> 
> In my opinion there are two different ways, one can integrate machine
> learning.
> 
> 1) You could collect the data and train a model to obtain parameters for
> your function f(x,y,z) -> chunk size. In this case you could use any
> existing machine learning library to get these parameters for your function.
> 
> Here, you will implement this function in the execution policy to
> estimate e.g. the "best" chunk size for given x,y,z.
> 
> 2) You could train your model at run time to obtain e.g. the "best"
> chunk size. In this case you have to implement your chosen machine
> learning algorithm for the integration in hpx.
> 
> Best,
> 
> Patrick
> 
> 
> [0] http://stellar.cct.lsu.edu/pubs/khatami_espm2_2017.pdf
> [1]
> https://stellar-group.github.io/hpx/docs/html/hpx/manual/parallel/executor_parameters.html
> 
> On 15/02/18 01:53 PM, 김규래 wrote:
>> HI, my name is Ray Kim.
>>
>> I'm a junior EE student in Sogang Univ. Korea.
>>
>> I have a little experience in C++ and HPC applications and machine
> learning.
>>
>> Here is a link to my github profile for some of my personal projects.
>>
>> https://github.com/Red-Portal
>>
>>  
>>
>> I'm interested in the project "Applying Machine Learning Techniques on
>> HPX Parallel Algorithms",
>>
>> however I would like to have more details about it.
>>
>> The description talks about implementing the algorithms and analyzing
>> the per

Re: [hpx-users] GSoC 2018, on "applying machine learning technques ..." project

2018-02-17 Thread 김규래
Hello Patrick,
Thank you for your guidance.
I have few more questions on the subject.
 
The literature mostly talks about feature acquisition through libclang.
Than under this project, is the HPX distribution including tooling based on 
libclang?
(And custom build system stuff for the additional compile time computations?)
 
And I guess part of a machine learning framework -such as xgboost, tinydnn, 
etc...
 will also need to be included in the distribution.
Am I understanding this project correctly?
 
Great regards,
Ray Kim
 
-Original Message-
From: "Patrick Diehl"patrickdie...@gmail.com 
To: "김규래"msc...@naver.com; hpx-users@stellar.cct.lsu.edu; 
Cc: 
Sent: 2018-02-16 (금) 07:17:52
Subject: Re: [hpx-users] GSoC 2018, on "applying machine learning technques 
..." project
 
Hi Ray,

welcome to the community. A good starting point for this project would
be to read this publication [0]:

Zahra Khatami, Lukas Troska, Hartmut Kaiser, J. Ramanujan and Adrian
Serio, “HPX Smart Executors”, In Proceedings of ESPM2’17: Third
International Workshop on Extreme Scale Programming Models and
Middleware (ESPM2’17), 2017. doi: 10.1145/3152041.3152084,

 Then is the goal to analyze data? or also implement the algorithms?

The goal is to provide a new execution policy [1], which utilizes
machine learning techniques to optimize the computational time.

So the first step would be to analyze the data.

In my opinion there are two different ways, one can integrate machine
learning.

1) You could collect the data and train a model to obtain parameters for
your function f(x,y,z) - chunk size. In this case you could use any
existing machine learning library to get these parameters for your function.

Here, you will implement this function in the execution policy to
estimate e.g. the "best" chunk size for given x,y,z.

2) You could train your model at run time to obtain e.g. the "best"
chunk size. In this case you have to implement your chosen machine
learning algorithm for the integration in hpx.

Best,

Patrick


[0] http://stellar.cct.lsu.edu/pubs/khatami_espm2_2017.pdf
[1]
https://stellar-group.github.io/hpx/docs/html/hpx/manual/parallel/executor_parameters.html

On 15/02/18 01:53 PM, 김규래 wrote:
 HI, my name is Ray Kim.
 
 I'm a junior EE student in Sogang Univ. Korea.
 
 I have a little experience in C++ and HPC applications and machine 
learning.
 
 Here is a link to my github profile for some of my personal projects. 
 
 https://github.com/Red-Portal 
 
  
 
 I'm interested in the project "Applying Machine Learning Techniques on
 HPX Parallel Algorithms",
 
 however I would like to have more details about it.
 
 The description talks about implementing the algorithms and analyzing
 the performance of these algorithms.
 
 Then is the goal to analyze data? or also implement the algorithms?
 
  
 
 Great admirations for everyone working on HPX.
 
 It would be an honor if I could work with you all.
 
 msca8h at naver dot com
 
 msca8h at sogang dot ac dot kr
 
 Ray Kim
 
 
 
 ___
 hpx-users mailing list
 hpx-users@stellar.cct.lsu.edu
 https://mail.cct.lsu.edu/mailman/listinfo/hpx-users
 
___
hpx-users mailing list
hpx-users@stellar.cct.lsu.edu
https://mail.cct.lsu.edu/mailman/listinfo/hpx-users


Re: [hpx-users] GSoC 2018, on "applying machine learning technques ..." project

2018-02-15 Thread Patrick Diehl
Hi Ray,

welcome to the community. A good starting point for this project would
be to read this publication [0]:

Zahra Khatami, Lukas Troska, Hartmut Kaiser, J. Ramanujan and Adrian
Serio, “HPX Smart Executors”, In Proceedings of ESPM2’17: Third
International Workshop on Extreme Scale Programming Models and
Middleware (ESPM2’17), 2017. doi: 10.1145/3152041.3152084,

>> Then is the goal to analyze data? or also implement the algorithms?

The goal is to provide a new execution policy [1], which utilizes
machine learning techniques to optimize the computational time.

So the first step would be to analyze the data.

In my opinion there are two different ways, one can integrate machine
learning.

1) You could collect the data and train a model to obtain parameters for
your function f(x,y,z) -> chunk size. In this case you could use any
existing machine learning library to get these parameters for your function.

Here, you will implement this function in the execution policy to
estimate e.g. the "best" chunk size for given x,y,z.

2) You could train your model at run time to obtain e.g. the "best"
chunk size. In this case you have to implement your chosen machine
learning algorithm for the integration in hpx.

Best,

Patrick


[0] http://stellar.cct.lsu.edu/pubs/khatami_espm2_2017.pdf
[1]
https://stellar-group.github.io/hpx/docs/html/hpx/manual/parallel/executor_parameters.html

On 15/02/18 01:53 PM, 김규래 wrote:
> HI, my name is Ray Kim.
> 
> I'm a junior EE student in Sogang Univ. Korea.
> 
> I have a little experience in C++ and HPC applications and machine learning.
> 
> Here is a link to my github profile for some of my personal projects. 
> 
> https://github.com/Red-Portal 
> 
>  
> 
> I'm interested in the project "Applying Machine Learning Techniques on
> HPX Parallel Algorithms",
> 
> however I would like to have more details about it.
> 
> The description talks about implementing the algorithms and analyzing
> the performance of these algorithms.
> 
> Then is the goal to analyze data? or also implement the algorithms?
> 
>  
> 
> Great admirations for everyone working on HPX.
> 
> It would be an honor if I could work with you all.
> 
> msca8h at naver dot com
> 
> msca8h at sogang dot ac dot kr
> 
> Ray Kim
> 
> 
> 
> ___
> hpx-users mailing list
> hpx-users@stellar.cct.lsu.edu
> https://mail.cct.lsu.edu/mailman/listinfo/hpx-users
> 
___
hpx-users mailing list
hpx-users@stellar.cct.lsu.edu
https://mail.cct.lsu.edu/mailman/listinfo/hpx-users