-
Notifications
You must be signed in to change notification settings - Fork 107
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
golang v3 wrappers #564
golang v3 wrappers #564
Conversation
Co-authored-by: Jeremy Felder <[email protected]>
Co-authored-by: Jeremy Felder <[email protected]>
…-zk/icicle into feat/vlad/refactor-from-affine
Fix typos
## Describe the changes This PR refactors the different affine to projective conversion functions using the C function also small bug fix for ProjectiveToAffine() function in Go ## Linked Issues Resolves #
Fix typos
Co-authored-by: Jeremy Felder <[email protected]>
Co-authored-by: Jeremy Felder <[email protected]>
## Describe the changes This PR... ## Linked Issues Resolves #
0e2d8e2
to
73dd80b
Compare
|
||
# TODO: bw6 on windows requires more memory than the standard runner has | ||
# Add a large runner and then enable this job | ||
# build-windows: |
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.
What about the Windows build? Should'nt we just remove this at this point?
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.
➕ for removing
export DEFAULT_BACKEND_INSTALL_DIR=$PWD/../../../build/ | ||
go test ./$FIELD/tests -count=1 -failfast -p 2 -timeout 60m -v | ||
|
||
# build-hashes-linux: |
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.
are hashes not supported in v3 rn? This specific check only runs keccak
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.
we don't have hashes in v3 for now
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.
Lets remove this for now then
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.
Great job 💪🏻. Most comments are small
type EIcicleError int | ||
|
||
const ( | ||
Success EIcicleError = iota // Operation completed successfully | ||
InvalidDevice // The specified device is invalid | ||
OutOfMemory // Memory allocation failed due to insufficient memory | ||
InvalidPointer // The specified pointer is invalid | ||
AllocationFailed // Memory allocation failed | ||
DeallocationFailed // Memory deallocation failed | ||
CopyFailed // Data copy operation failed | ||
SynchronizationFailed // Device synchronization failed | ||
StreamCreationFailed // Stream creation failed | ||
StreamDestructionFailed // Stream destruction failed | ||
ApiNotImplemented // The API is not implemented for a device | ||
InvalidArgument // Invalid argument passed | ||
UnknownError // An unknown error occurred | ||
) |
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.
It would be better to use the C.enum_eIcicleError values directly from cpp errors.h to prevent reordering issues.
See https://pkg.go.dev/cmd/cgo#hdr-Go_references_to_C for accessing C types from Go
@@ -26,7 +26,7 @@ jobs: | |||
uses: actions/checkout@v4 | |||
- name: Check rustfmt | |||
if: needs.check-changed-files.outputs.rust == 'true' || needs.check-changed-files.outputs.cpp_cuda == 'true' | |||
working-directory: ./wrappers/rust | |||
working-directory: ./wrappers/rust_v3 |
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.
remove
@@ -0,0 +1,205 @@ | |||
name: GoLang |
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.
rename to golang without v3_golang
@@ -18,7 +18,9 @@ cpu_msm(const Device& device, const S* scalars, const A* bases, int msm_size, co | |||
const S* batch_scalars = scalars + msm_size * batch_idx; | |||
const A* batch_bases = config.are_bases_shared ? bases : bases + msm_size * batch_idx; | |||
for (auto i = 0; i < msm_size; ++i) { | |||
res = res + P::from_affine(batch_bases[i]) * batch_scalars[i]; | |||
res = |
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.
can remove this now assuming fixed in new msm. Also note the icicle_v3 dir
Opened a new PR #594 with the same changes and review fixes |
No description provided.