Skip to content

Commit a0cb15b

Browse files
authored
Merge branch 'calyx-float' into float
2 parents 86434a5 + c1b2037 commit a0cb15b

File tree

463 files changed

+1994474
-75159
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

463 files changed

+1994474
-75159
lines changed

.github/workflows/rust.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Check calyx build
2828
run: ./target/debug/calyx --version
2929
- name: validate playground config
30-
run: node web/validate-data.js
30+
run: node web/validate-data.js
3131

3232
# Get the hash of the Dockerfile
3333
hash:
@@ -120,10 +120,10 @@ jobs:
120120
fud c stages.interpreter.exec /home/calyx/target/debug/cider
121121
122122
- name: Runt tests
123-
working-directory: /home/calyx
123+
working-directory: /home/calyx/interp/tests
124124
run: |
125125
# Run the remaining tests
126-
runt interp -x 'relay' -d -o fail
126+
runt -x '(numeric types correctness and parsing)|(tcam testing)|(../../tests/correctness/pipelined-mac.futil)' -d -o fail
127127
128128
- name: Source code tests
129129
uses: actions-rs/cargo@v1
@@ -187,7 +187,7 @@ jobs:
187187
working-directory: /home/calyx
188188
run: |
189189
runt -i 'cocotb' -d -o fail -j 1 --max-futures 1
190-
190+
191191
- name: Runt tests
192192
working-directory: /home/calyx
193193
run: |

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,6 @@ tools/profiler/tmp/
6060
tools/profiler/logs
6161

6262
temp/
63+
64+
# for running a venv
65+
.venv

.hooks/pre-commit

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#/bin/sh
2+
3+
function check {
4+
prog=$1
5+
shift
6+
"$prog" "$@"
7+
if [ $? -ne 0 ]; then
8+
exit 1
9+
fi
10+
}
11+
12+
check cargo clippy
13+
14+
staged_py_files=$(git diff --cached --name-only --diff-filter=ACM | grep '\.py$')
15+
16+
if [ -n "$staged_py_files" ]; then
17+
flake8_executable=$(which flake8 || which flake)
18+
if [ -z "$flake8_executable" ]; then
19+
echo "flake is not installed"
20+
exit 1
21+
else
22+
check "$flake8_executable" $staged_py_files
23+
fi
24+
fi

Cargo.lock

Lines changed: 107 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,10 @@ calyx-frontend = { path = "calyx-frontend" }
129129
[[bench]]
130130
name = "component-sharing"
131131
harness = false
132+
133+
134+
[profile.test.package.proptest]
135+
opt-level = 3
136+
137+
[profile.test.package.rand_chacha]
138+
opt-level = 3

Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ RUN python3 -m venv /opt/venv
1616
ENV PATH="/opt/venv/bin:$PATH"
1717

1818
# Install python dependencies cocotb==1.6.2 seems to be for Xilinx cocotb tests
19-
RUN python3 -m pip install numpy flit prettytable wheel hypothesis pytest simplejson cocotb==1.6.2
19+
# Need to pin the numpy version since there are TVM issues with versions 2 and above
20+
RUN python3 -m pip install numpy==1.26.4 flit prettytable wheel hypothesis pytest simplejson cocotb==1.6.2
2021
# Current cocotb-bus has a bug that is fixed in more up to date repo
2122
RUN python3 -m pip install git+https://github.com/cocotb/cocotb-bus.git cocotbext-axi
2223

@@ -80,7 +81,8 @@ ENV PYTHONPATH=/root/.local/lib/python3.9/site-packages:$PYTHONPATH
8081
WORKDIR /home/calyx
8182
run mkdir -p ~/.local/bin
8283
RUN ln -s /home/calyx/target/debug/fud2 ~/.local/bin/
83-
RUN printf "[calyx]\nbase = \"/home/calyx\"" >> ~/.config/fud2.toml
84+
RUN printf "dahlia = \"/home/dahlia/fuse\"\n" >> ~/.config/fud2.toml
85+
RUN printf "[calyx]\nbase = \"/home/calyx\"\n" >> ~/.config/fud2.toml
8486

8587
# Install calyx-py
8688
WORKDIR /home/calyx/calyx-py

calyx-frontend/src/ast.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
use super::parser;
33
use crate::{Attributes, PortDef, Primitive};
44
use atty::Stream;
5-
use calyx_utils::{CalyxResult, Error, GPosIdx, Id};
5+
use calyx_utils::{CalyxResult, Error, GPosIdx, Id, PosString};
66
use std::{num::NonZeroU64, path::PathBuf};
77

88
/// Corresponds to an individual Calyx file.
99
#[derive(Debug)]
1010
pub struct NamespaceDef {
1111
/// Path to extern files.
12-
pub imports: Vec<String>,
12+
pub imports: Vec<PosString>,
1313
/// List of component definitions.
1414
pub components: Vec<ComponentDef>,
1515
/// Extern statements and any primitive declarations in them.
16-
pub externs: Vec<(Option<String>, Vec<Primitive>)>,
16+
pub externs: Vec<(Option<PosString>, Vec<Primitive>)>,
1717
/// Optional opaque metadata
1818
pub metadata: Option<String>,
1919
}

calyx-frontend/src/attribute.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ pub enum BoolAttr {
6969
#[strum(serialize = "promoted")]
7070
/// denotes a static component or control promoted from dynamic
7171
Promoted,
72+
#[strum(serialize = "fast")]
73+
/// https://github.com/calyxir/calyx/issues/1828
74+
Fast,
7275
}
76+
7377
impl From<BoolAttr> for Attribute {
7478
fn from(attr: BoolAttr) -> Self {
7579
Attribute::Bool(attr)

0 commit comments

Comments
 (0)