HigherOrderCO / HVM

A massively parallel, optimal functional runtime in Rust
https://higherorderco.com
Apache License 2.0
10.53k stars 401 forks source link

hvm-cu hangs when going OoM #308

Open developedby opened 6 months ago

developedby commented 6 months ago

Quoting the report by user janiczek on discord:

This program didn't finish when ran with bend run-cu program.bend 158 (it worked with 100 as the argument).

def count(n):
  switch n:
    case 0:
      return 0
    case 1:
      return 1
    case _:
      h1 = n / 2
      h2 = n - h1
      q1 = h1 / 2
      q2 = h1 - q1
      q3 = h2 / 2
      q4 = h2 - q3
      return (count(q1) + count(q2)) + (count(q3) + count(q4))    

def main(n):
  return count(n)

CPU: AMD Ryzen 7 5800X3D (8 cores, 16 logical processors, 3.40 GHz) GPU: NVIDIA GeForce RTX 3070 Ti

In Task Manager, the GPU was doing almost nothing, but the "Dedicated GPU memory usage" was almost 100%.

enricozb commented 5 months ago

This error is still occurring...