-
Notifications
You must be signed in to change notification settings - Fork 123
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
[FEAT] ReleaseDomain API #465
Conversation
where | ||
<F as FieldImpl>::Config: NTT<F>, | ||
{ | ||
// let ctx = DeviceContext::default_for_device(device_id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commented code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
@@ -201,6 +201,11 @@ func TestNttBatch(t *testing.T) { | |||
} | |||
} | |||
|
|||
func TestReleaseDomain(t *testing.T) { | |||
cfg := GetDefaultNttConfig() | |||
ReleaseDomain(cfg.Ctx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that ideally the test should release an allocated domain, call NTT and assert the error. Having said that I am not sure this can be achieved in go since the exception cannot be caught here I guess.
My issue with this test is that it passes even if ReleaseDomain() is doing nothing or behaves wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that ideally the test should release an allocated domain, call NTT and assert the error.
It should be possible to assert.Panics(Ntt())
after releasing the domain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just had a comment about how ReleaseDomain is tested. I guess you already know that so I think it's up to you to decide what to do.
@@ -27,6 +30,13 @@ where | |||
} | |||
} | |||
|
|||
pub fn rel_domain<F: FieldImpl>(ctx: &DeviceContext) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this is the exposed API I would rename to release_domain
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its a test function so I think the naming is fine but it doesn't need to be public since it is only being used in https://github.com/ingonyama-zk/icicle/pull/465/files#diff-96ad6a0ca42317faaf6524296cdaa92fcc3c634d36e2882c2b322d9b7287fd84R378
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests for golang are not deterministic in run order. The ReleaseDomain test should be made into a teardown test to ensure it runs after all other tests that require it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
## Describe the changes This PR adds a NTT ReleaseDomain API in Golang and Rust ## Linked Issues Resolves # --------- Co-authored-by: Yuval Shekel <[email protected]>
## Describe the changes This PR adds a NTT ReleaseDomain API in Golang and Rust ## Linked Issues Resolves # --------- Co-authored-by: Yuval Shekel <[email protected]>
Describe the changes
This PR adds a NTT ReleaseDomain API in Golang and Rust
Linked Issues
Resolves #