Skip to content
This repository was archived by the owner on Mar 3, 2025. It is now read-only.
This repository was archived by the owner on Mar 3, 2025. It is now read-only.

bug: cannot compile due to SpanSerde  #638

Description

@c0np4nn4

Bug Report

Orion version: 0.2.5

Current behavior: not compiled

Expected behavior: compiled

Steps to reproduce:

git clone git@github.com: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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions