mirror of
https://github.com/HigherOrderCO/Bend.git
synced 2024-09-11 11:56:54 +03:00
Merge pull request #414 from HigherOrderCO/disable-check-net-size
Disable check-net-size by default
This commit is contained in:
commit
a58d5aae89
@ -10,7 +10,7 @@
|
||||
| `-Ofloat_combinators` `-Ono-float_combinators` | Enabled | [float-combinators](#float-combinators) |
|
||||
| `-Omerge` `-Ono-merge` | Disabled | [definition-merging](#definition-merging) |
|
||||
| `-Oinline` `-Ono-inline` | Disabled | [inline](#inline) |
|
||||
| `-Ocheck-net-size` `-Ono-check-net-size` | Enabled | [check-net-size](#check-net-size) |
|
||||
| `-Ocheck-net-size` `-Ono-check-net-size` | Disabled | [check-net-size](#check-net-size) |
|
||||
| `-Oadt-scott` `-Oadt-num-scott` | adt-num-scott | [adt-encoding](#adt-encoding) | |
|
||||
|
||||
## Eta-reduction
|
||||
@ -185,7 +185,8 @@ main = (id foo)
|
||||
|
||||
## Check-net-size
|
||||
|
||||
If enabled, checks that the size of each function after compilation is within the HVM restriction of at most 64 nodes per definition.
|
||||
If enabled, checks that the size of each function after compilation has at most 64 HVM nodes.
|
||||
This is a memory restriction of the CUDA runtime, if you're not using the `*-cu` you can disable it.
|
||||
|
||||
Example:
|
||||
```py
|
||||
|
@ -316,7 +316,8 @@ impl CompileOpts {
|
||||
}
|
||||
|
||||
impl Default for CompileOpts {
|
||||
/// Enables eta, linearize_matches, float_combinators and reorder_redexes_recursive_last.
|
||||
/// Enables eta, linearize_matches, float_combinators.
|
||||
/// Uses num-scott ADT encoding.
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
eta: true,
|
||||
@ -325,7 +326,7 @@ impl Default for CompileOpts {
|
||||
float_combinators: true,
|
||||
merge: false,
|
||||
inline: false,
|
||||
check_net_size: true,
|
||||
check_net_size: false,
|
||||
adt_encoding: AdtEncoding::NumScott,
|
||||
}
|
||||
}
|
||||
|
3
tests/golden_tests/cli/net_size_too_large.args
Normal file
3
tests/golden_tests/cli/net_size_too_large.args
Normal file
@ -0,0 +1,3 @@
|
||||
gen-hvm
|
||||
tests/golden_tests/cli/net_size_too_large.bend
|
||||
-Ocheck-net-size
|
7
tests/snapshots/cli__net_size_too_large.bend.snap
Normal file
7
tests/snapshots/cli__net_size_too_large.bend.snap
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
input_file: tests/golden_tests/cli/net_size_too_large.bend
|
||||
---
|
||||
[4m[1m[31mErrors:[0m
|
||||
[1mIn definition '[4mRadix[0m[1m':[0m
|
||||
Definition is too large for hvm (size=120, max size=64). Please break it into smaller pieces.
|
Loading…
Reference in New Issue
Block a user