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

bug: cannot compile due to SpanSerde #638

Open
c0np4nn4 opened this issue Aug 19, 2024 · 7 comments
Open

bug: cannot compile due to SpanSerde #638

c0np4nn4 opened this issue Aug 19, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@c0np4nn4
Copy link

c0np4nn4 commented Aug 19, 2024

Bug Report

Orion version: 0.2.5

Current behavior: not compiled

Expected behavior: compiled

Steps to reproduce:

git clone [email protected]:gizatechxyz/orion.git
cd orion
scarb cairo-test -f multiple_linear_regression_test

Related code:
The generic type T in the code below occurs the compile error

impl TensorSerde<T, impl TSerde: Serde<T>, impl TDrop: Drop<T>> of Serde<Tensor<T>> {
fn serialize(self: @Tensor<T>, ref output: Array<felt252>) {
self.shape.serialize(ref output);
self.data.serialize(ref output);
}
fn deserialize(ref serialized: Span<felt252>) -> Option<Tensor<T>> {
let shape: Span<usize> = Serde::<Span<usize>>::deserialize(ref serialized)?;
let data: Span<T> = Serde::<Span<T>>::deserialize(ref serialized)?;
Option::Some(Tensor { shape, data })
}
}

insert short code snippets here

Other information:
My scarb version

scarb 2.7.0 (e9a2b8716 2024-08-01)
cairo: 2.7.0 (https://crates.io/crates/cairo-lang-compiler/2.7.0)
sierra: 1.6.0
image
@c0np4nn4 c0np4nn4 added the bug Something isn't working label Aug 19, 2024
@raphaelDkhn
Copy link
Collaborator

Hello !
That's because Orion supports scarb 2.6.4, not 2.7.0.

We're working on a complete redesign of Orion, which will be much more efficient with a different approach instead of using ONNX. You can find this in the cleaning branch. But please have in mind that it's not ready yet, and there's still work to be done. I think I'll be releasing the new version in the next couple of weeks.

@raphaelDkhn
Copy link
Collaborator

I see that you're preparing a benchmark @c0np4nn4, happy to discuss further if you need to know more :)
https://x.com/raphael_dkhn

@ScottyDavies
Copy link

@c0np4nn4 can I please be assigned this issue?

@c0np4nn4
Copy link
Author

@ScottyDavies Sure thing!! :)

@ScottyDavies
Copy link

Thanks, but you haven't assigned me yet

@c0np4nn4
Copy link
Author

c0np4nn4 commented Sep 26, 2024

@ScottyDavies
I don't have permission to assign this issue to you. Can you please create a PR and reference this issue in it.

@ScottyDavies
Copy link

@c0np4nn4 you can check it out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants