Skip to content
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

WIP: scheduler integration #1460

Closed
wants to merge 10 commits into from
Closed

Conversation

neithanmo
Copy link

This PR is a work-in-progress and must not be used in production

Integrates the scheduler into the current code trying to keep untouched as much code as possible:
some test fails, meaning something is wrong, so this PR is just for getting an insight about the problem source, do not use in production yet.

Copy link
Collaborator

@porcuquine porcuquine left a comment

Choose a reason for hiding this comment

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

I noticed what appear to be changes in results introduced by not fully replicating the behavior of add_final_columns() and add_final_leaves() when replacing them with new API methods. It's plausible that this is the cause of some test failures.

@neithanmo
Copy link
Author

i updated this with the integration rust-fil-proofs -> bellperson. seems there are some errors when starting the scheduler in CI. . i just updated the scheduler to show a more verbose error message.
in regards to the error during the tests, I will explain a bit more in the channel.

pub_params: &PublicParams<'a, S>,
pub_in: &S::PublicInputs,
priv_in: &S::PrivateInputs,
groth_params: &'b groth16::MappedParameters<Bls12>,
post_type: Option<BellTaskType>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

CompoundProof is an abstraction that doesn't (and shouldn't) know anything whatsoever about specific proof types. So mention of post_type here, MerkleTree later, etc. is by definition inappropriate. It might be that post_type is just misnamed (will look more closely) — but the point stands: if we are referencing specific proof types of any kind here then something is wrong.

Copy link
Contributor

Choose a reason for hiding this comment

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

(unrelated to @porcuquine's comment) It looks like you always pass in a type, so I don't think it needs to be wrapped in a Option.

Copy link
Author

Choose a reason for hiding this comment

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

CompoundProof is an abstraction that doesn't (and shouldn't) know anything whatsoever about specific proof types. So mention of post_type here, MerkleTree later, etc. is by definition inappropriate. It might be that post_type is just misnamed (will look more closely) — but the point stands: if we are referencing specific proof types of any kind here then something is wrong.

@porcuquine I did not like the idea of refactoring that trait neither, as it seems to be a super Trait from which other traits inherit. but, at the moment it looked like the cleaning way to modify and pass the information as a task_type(which at the moment encodes deadlines and possible exclusive resources) to the scheduler, without having to refactor many other places.

@vmx Initially, it was defined as an optional param, I set it to MerkeProof, but I am not sure if that type should encompass all the processes that use the GPU but that are not Winning/Window post. It is important because all those processes will end up using the GPU assigned to MerkeTree operations.

preemptible: self.num_iter > 1,
};
let task_req = TaskReqBuilder::new()
.with_task_type(TaskType::MerkleProof)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Assuming this type is meant to describe Merkle tree building, it is misnamed. Merkle proofs are later generated over these trees, but the act of building them shouldn't reference 'proof', since that is confusing.

Copy link
Author

Choose a reason for hiding this comment

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

I am open to set a more appropriate name here. also not sure if it should include the word Merkle as what I have seen is that there are operations that not only use neptune but bellperson.

use None as a type for seal

- use latest scheduler and bellperson
- Make the scheduler an optional dependency available under the gpu feature
- include the proof_ext module only if the gpu flag is enable
- remove scheduler dependency using bellperson task_type
- import the scheduler if gpu flag is set

comment out logger to fix clippy warning

Remove BatcherType aligning to latest changes in neptune

switch back to neptune base repository

reduce timeout to 20 min

feat: Use the context tool to improve logging messages

feat: use the optional task name to improve logging

fix: remove sync iterator as it was a typo during testing
@vmx
Copy link
Contributor

vmx commented Aug 2, 2023

This effort has been stopped, hence closing this PR.

@vmx vmx closed this Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants