Got an error when using Flt[_24, _8]

22 views
Skip to first unread message

Thom Popovici

unread,
Jan 31, 2020, 2:12:43 PM1/31/20
to Spatial Users
Hi

I have just started using Spatial and I have played around with the Flt types. However, something went wrong and I got the following error:

[bug] An exception was encountered while compiling InnerProduct:
[bug]   Flt[_24,_8] (of class argon.lang.Flt)
[bug]   scala.MatchError: Flt[_24,_8] (of class argon.lang.Flt)
[bug] This is due to a compiler bug. A log file has been created at:
[bug]   /home/dtpopovici/spatial/spatial/logs/InnerProduct//InnerProduct_exception.log
[failed] Total time: 2.5010 seconds

Exception: sbt.TrapExitSecurityException thrown from the UncaughtExceptionHandler in thread "run-main-0"
[error] java.lang.RuntimeException: Nonzero exit code: 1
[error] at sbt.Run$.executeTrapExit(Run.scala:124)
[error] at sbt.Run.run(Run.scala:77)
[error] at sbt.Defaults$.$anonfun$bgRunMainTask$6(Defaults.scala:1147)
[error] at sbt.Defaults$.$anonfun$bgRunMainTask$6$adapted(Defaults.scala:1142)
[error] at sbt.internal.BackgroundThreadPool.$anonfun$run$1(DefaultBackgroundJobService.scala:366)
[error] at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
[error] at scala.util.Try$.apply(Try.scala:209)
[error] at sbt.internal.BackgroundThreadPool$BackgroundRunnable.run(DefaultBackgroundJobService.scala:289)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
[error] (apps / Compile / runMain) Nonzero exit code: 1
[error] Total time: 8 s, completed Jan 31, 2020 11:09:44 AM
[error] Spatial compilation failed

Any suggestions are welcomed :)

Best,
Thom

Matt F

unread,
Jan 31, 2020, 7:33:06 PM1/31/20
to spatial-l...@googlegroups.com
Hi Thom,

Sadly, FltPt is not super well supported right now in Spatial.  We just haven't had the time yet to go through and wire in the correct IPs for various fpga targets / VCS simulation, so I usually just use high-precision FixPt numbers for now.  That said, if you do want to continue using the shaky support for FltPt numbers, you can get through compilation if you use the --noOptimizeReduce flag when compiling the Spatial app (i.e. bin/spatial <appname> --noOptimizeReduce).  I'll fix this in a bit, but the problem is that there are now specialized accumulators that let you have an initiation interval of 1 regardless of the latency of the reduction operation and there is no implementation for these specialized nodes yet for FltPt numbers.  If you just turn off this optimization, it should compile.

Thom Popovici

unread,
Jan 31, 2020, 8:01:09 PM1/31/20
to Spatial Users
Hi

No worries. I think I can wing it with FixPt. I was curious about the error cause my first thought was that I did not install spatial correctly.

Thanks.
Reply all
Reply to author
Forward
0 new messages