Giter Site home page Giter Site logo

Comments (7)

NeuralCoder3 avatar NeuralCoder3 commented on August 27, 2024 1

#180 : I've just fixed a problem in the matrix/product.thorin.disabled. Is this a different test case? Now, I get:

../build/bin/thorin matrix/product.thorin.disabled
thorin: /home/roland/neural/dialects/matrix/passes/lower_matrix_mediumlevel.cpp:275: thorin::matrix::LowerMatrixMediumLevel::rewrite_(const thorin::Def*)::<lambda(thorin::u64)>: Assertion `idx == i && "output indices must be consecutive 0..n-1"' failed.

The index issue was temporarily from switching the map to the absl one.
At one point I assumed an order which coincidentally was created by the std::map (and by absl in verbose mode).
This should be fixed by e147add.

from thorin2.

leissa avatar leissa commented on August 27, 2024

Looks to me that sth in alpha-equiv is broken. I hope to finally have #153 ready this week. As this contains a major overhaul of this code, I don't want to touch it in master. Let's first merge #153, then I will investigate if the problem still persists.

from thorin2.

NeuralCoder3 avatar NeuralCoder3 commented on August 27, 2024

Possibly related:

Nested calls like

.con print_m2d [mem:%mem.M] = {
    print_double_matrix_wrap (mem, l, n, m2d, return_cont)
};
.con print_m1d [mem:%mem.M] = {
    print_double_matrix_wrap (mem, k, l, m1d, print_m2d)
};
print_double_matrix_wrap (mem, k, n, m, print_m1d)

(or the inlined version

print_double_matrix_wrap (mem, k, n, m  , .cn [mem: %mem.M] = {
print_double_matrix_wrap (mem, k, l, m1d, .cn [mem: %mem.M] = {
print_double_matrix_wrap (mem, l, n, m2d, return_cont)
})

)
lead to application errors involving proxies:

lit/autodiff/matrix/prod.thorin:33:15-33:94: error: cannot pass argument 
  '.proxy#8#0 print_double_matrix_wrap_6406994, 3' of type 
  '%matrix.Mat (2, (k_6407046, l_6407048), %math.F (52, 11))' to 
  '%core.bitcast (%matrix.Mat (2,2;:.Nat, %math.F (52, 11)), %matrix.Mat (2, (.proxy#8#0 print_double_matrix_wrap_6406994, 1, .proxy#8#0 print_double_matrix_wrap_6406994, 2), %math.F (52, 11)))' of domain 
  '%matrix.Mat (2, (.proxy#8#0 print_double_matrix_wrap_6406994, 1, .proxy#8#0 print_double_matrix_wrap_6406994, 2), %math.F (52, 11))

The error does not occur with a single print call.

Fork: NeuralCoder3
Branch: ad_ptr_merge
Commit: 04c5f38
Command: ./build/bin/thorin -d autodiff lit/autodiff/matrix/prod.thorin -d affine -d matrix -d direct -d clos -d math -o - -VVVV --output-ll T.ll

Note: This branch temporarily jumps the other alpha equiv problem using string comparisons (on the printed expressions).

from thorin2.

leissa avatar leissa commented on August 27, 2024

Good thing: In my recent PR, I changed the alpha-equiv magic to always work optimistically. I.e. if you invoke checker().alpha_equiv(a, b), a and b must be alpha-equiv or there is a type error. This makes the logic a bit simpler and I can revert it how it used to work a few months ago.

from thorin2.

leissa avatar leissa commented on August 27, 2024

#180 :
I've just fixed a problem in the matrix/product.thorin.disabled. Is this a different test case?
Now, I get:

../build/bin/thorin matrix/product.thorin.disabled
thorin: /home/roland/neural/dialects/matrix/passes/lower_matrix_mediumlevel.cpp:275: thorin::matrix::LowerMatrixMediumLevel::rewrite_(const thorin::Def*)::<lambda(thorin::u64)>: Assertion `idx == i && "output indices must be consecutive 0..n-1"' failed.

from thorin2.

leissa avatar leissa commented on August 27, 2024

Can you check with #219?

from thorin2.

NeuralCoder3 avatar NeuralCoder3 commented on August 27, 2024

Can you check with #219?

I will test it. But it will take time to resolve all the merge conflicts.

from thorin2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.