Giter Site home page Giter Site logo

Comments (7)

edusporto avatar edusporto commented on July 29, 2024

Hi! I couldn't reproduce the behavior from your bug report, could you give us some more information about which versions of hvm and bend you're using?

bend --version
hvm --version

Your GPU might not support running on CUDA since the current implementation has a few limitations (e.g. the GPU must have an L1 cache >= 128kb), but the C implementation should still run fine. Could you also tell us your CPU and GPU models?

Thanks!

from bend.

toadharvard avatar toadharvard commented on July 29, 2024

@edusporto

Versions:
bend-lang 0.2.22
hvm 2.0.17

Laptop with WSL2:
CPU: AMD Ryzen 7 5800U with Radeon Graphics
GPU: RTX 3050ti mobile

Backtrace from gen-c (maybe helpful):

RUST_BACKTRACE=full bend gen-c --warn=all main.bend
thread 'main' panicked at /home/ya/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hvm-2.0.17/src/main.rs:107:62:
ParseIntError { kind: InvalidDigit }
stack backtrace:
   0:     0x5647c91ac095 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hed2c5e0a0ce6836c
   1:     0x5647c91d050b - core::fmt::write::h846d656f7222a8c0
   2:     0x5647c91a9a5f - std::io::Write::write_fmt::h67d939b7212f6891
   3:     0x5647c91abe6e - std::sys_common::backtrace::print::h7a02369029f2cb19
   4:     0x5647c91ad209 - std::panicking::default_hook::{{closure}}::he817c31d2eff8a0b
   5:     0x5647c91acfaa - std::panicking::default_hook::h9dce7ab19378e0f9
   6:     0x5647c91ad6c3 - std::panicking::rust_panic_with_hook::h114664f4a33b113f
   7:     0x5647c91ad5a4 - std::panicking::begin_panic_handler::{{closure}}::hf849b4d9cc6b4bf3
   8:     0x5647c91ac559 - std::sys_common::backtrace::__rust_end_short_backtrace::h69200ad086ea1fb0
   9:     0x5647c91ad2d7 - rust_begin_unwind
  10:     0x5647c91ce5d3 - core::panicking::panic_fmt::h8c3b34a341b30494
  11:     0x5647c9115071 - core::panicking::panic_display::h2f3d74cff2d58c6e
  12:     0x5647c9119b1d - hvm::main::{{closure}}::panic_cold_display::h91526b5a26f24d07
  13:     0x5647c911901b - hvm::main::hd27cfc9a0437a56d
  14:     0x5647c911ca63 - std::sys_common::backtrace::__rust_begin_short_backtrace::h37afc4cb0bea5705
  15:     0x5647c911ca79 - std::rt::lang_start::{{closure}}::hcaa99320bb0fad10
  16:     0x5647c91a542d - std::rt::lang_start_internal::h387be56a316c2f99
  17:     0x5647c9119b55 - main
  18:     0x7efe7e349fce - __libc_start_call_main
  19:     0x7efe7e34a089 - __libc_start_main_impl
  20:     0x5647c91139f5 - _start
  21:                0x0 - <unknown>

exit status: 101

from bend.

toadharvard avatar toadharvard commented on July 29, 2024

Oh, I found a reproducible example, sorry for misinformation in the original question:

This code stuck:

def main():
  y = [1, 2, 3, 4, 5]
  bend idx = 0:
    when idx < 10:
      sum = idx + fork(idx + 1)
    else:
      sum = 0
  return sum

This not:

def main():
  bend idx = 0:
    when idx < 10:
      sum = idx + fork(idx + 1)
    else:
      sum = 0
  return sum

from bend.

developedby avatar developedby commented on July 29, 2024

Looks like the thread that reads the HVM output is never ending with this program for some reason.

from bend.

imaqtkatt avatar imaqtkatt commented on July 29, 2024

This code is looping in the expand_generated transformation

from bend.

developedby avatar developedby commented on July 29, 2024

expand_generated expected generated functions to be never be recursive on other generated functions, which is no longer the case since we introduced bend and fold

from bend.

developedby avatar developedby commented on July 29, 2024

Fixed by #539

from bend.

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.