Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Heterogeneous demo notebook #576

Merged
merged 3 commits into from
Jul 21, 2023
Merged

Conversation

akroviakov
Copy link
Contributor

@akroviakov akroviakov commented Jul 6, 2023

This PR introduces an interface for HDK's heterogeneity exploration through pyHDK:
To have more control on certain aspects of query execution and data proportion per CPU/GPU, as well as cleaning GPU/CPU memory levels, the cython interface was extended.

Additionally, there is a simplistic example of how one could use it. Feel free to adapt it to your needs!

@akroviakov akroviakov requested a review from kurapov-peter July 6, 2023 18:23
return self.c_config.get().exec.heterogeneous.forced_heterogeneous_distribution

def setMultifragExec(self, on_off):
self.c_config.get().exec.heterogeneous.enable_multifrag_heterogeneous_execution=on_off
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we leave the interface unchanged and just provide these to the buildConfig?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant all the methods :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exposing the config gives up control over it, which seems undesirable. So, the idea was to hide it from the user and be able to validate it on the HDK side.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. You can pass required flags to pyhdk.init to get the desired config. If you want to change config between queries, then it's a sign we should move/add some flags to the ExecutionOptions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having these knobs in the execution options makes sense to me. Changing the config between queries, on the contrary, assumes the config object is shared which is an implementation detail, hence, undesirable. I'd suggest either moving these options from config to ExecutionOptions at all or at least mirror them in the execution options and adjust the fromConfig method appropriately. As to the notebook, it can then control the data distribution directly through execute / run API, no reinitialization required.

@akroviakov akroviakov force-pushed the akroviak/heterogeneous-demo-pyhdk branch from ff8ddc6 to 37b16ec Compare July 7, 2023 12:15
@kurapov-peter kurapov-peter merged commit 0b38686 into main Jul 21, 2023
@kurapov-peter kurapov-peter deleted the akroviak/heterogeneous-demo-pyhdk branch July 21, 2023 14:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants