Skip to content

Investigate Halide rule validation #167

@ajpal

Description

@ajpal

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());
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions