Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate Halide rule validation #167

Open
ajpal opened this issue Apr 6, 2023 · 0 comments
Open

Investigate Halide rule validation #167

ajpal opened this issue Apr 6, 2023 · 0 comments

Comments

@ajpal
Copy link
Collaborator

ajpal commented Apr 6, 2023

See #160 for context.
With just -1, 0, and 1 in the cvecs, this will crash:
With additional constants added, it works.
My guess is there is a bug in the rule validation that is avoided by putting more stuff in the cvec, but we should spend some more time getting to the bottom of this.

#[test]
    fn div_rules() {
        let lang = Workload::new(&["const", "var", "(uop expr)", "(bop expr expr)"]);
        let rules4 = Pred::run_workload(
            lang.clone()
                .iter_metric("expr", ruler::enumo::Metric::Atoms, 4)
                .plug_lang(
                    &Workload::new(&["-1", "0", "1"]),
                    &Workload::new(&["a", "b", "c"]),
                    &Workload::new(&["-"]),
                    &Workload::new(&["+", "-", "*", "/", "min", "max"]),
                ),
            Ruleset::default(),
            Limits::default(),
        );
        rules4.pretty_print();
        let wkld = lang
            .iter_metric("expr", ruler::enumo::Metric::Atoms, 5)
            .plug_lang(
                &Workload::new(&["-1", "0", "1"]),
                &Workload::new(&["a"]),
                &Workload::new(&["-"]),
                &Workload::new(&["+", "-", "*", "/", "min", "max"]),
            );
        Pred::run_workload(wkld, rules4, Limits::default());
    }
@ajpal ajpal mentioned this issue Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant