Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jul 02 18:26
    steven-johnson synchronize #6838
  • Jul 02 18:26

    steven-johnson on autoscheduler-api

    Update test_function_dag.cpp clang-tidy (compare)

  • Jul 02 03:20
    skystoler opened #6839
  • Jul 02 01:53
    derek-gerstmann synchronize #6829
  • Jul 02 01:53

    derek-gerstmann on vulkan-phase0-adts

    Don't use strncpy for prepend s… (compare)

  • Jul 02 00:57
    steven-johnson review_requested #6838
  • Jul 02 00:54
    steven-johnson review_requested #6838
  • Jul 02 00:54
    steven-johnson review_requested #6838
  • Jul 02 00:54
    steven-johnson opened #6838
  • Jul 02 00:40

    steven-johnson on autoscheduler-api

    Oops (compare)

  • Jul 02 00:38

    steven-johnson on autoscheduler-api

    Rework autoschduler API (#6788) (compare)

  • Jul 01 17:50

    steven-johnson on xtensa-codegen

    Remove unused function in calla… Disable testing for apps/linear… Rearrange subdirectories in pyt… and 1 more (compare)

  • Jul 01 17:39
    steven-johnson synchronize #6764
  • Jul 01 17:39

    steven-johnson on pygen-three

    Scrub Python from Makefile afte… Remove unused function in calla… Disable testing for apps/linear… and 3 more (compare)

  • Jul 01 17:10

    steven-johnson on pytests

    (compare)

  • Jul 01 17:10
    steven-johnson closed #6835
  • Jul 01 17:10

    steven-johnson on main

    Rearrange subdirectories in pyt… (compare)

  • Jul 01 17:03
    steven-johnson commented #6835
  • Jul 01 16:49
    abadams labeled #6837
  • Jul 01 16:49
    abadams edited #6837
Daniel Saier
@saierd
Hi, I'd like to do an "argmax" that returns the maximum + argument and additionally the second highest value + argument. Is there a way to do this in a single loop in Halide?
Ashish Uthama
@ashishUthama

I see these in the stmt files:
let t7162 = ((t7077 - input.min.0) + t7170)
So I figured, adding something like this:
pipeline.add_requirement(input.dim(0).min()==0, "Min should be 0");
would simplify the stmt and hopefully make things faster.

While it did simplify the stmt, the performance was significantly slower. Any thoughts on why just adding that requirement that all buffers have 0 min might impact performance negatively?

steven-johnson
@steven-johnson:matrix.org
[m]
Notice: Windows buildbots will be down for a bit as we upgrade some tooling. Back up later today.
ivangarcia44
@ivangarcia44

Does someone knows if there is a way to map the Func fields in a Halide::Generator class to their corresponding Func’s in a compiled pipeline (seen in the dumped *schedule.h file dumped by the 2019 auto-scheduler from Andrew Adams)?

Does Halide provide an automated way of pulling this mapping or any other information that could help to derive the map?

For example, the auto-scheduler pipeline has the func1_1 Func local variable, which belongs to the func1 private field in the Halide::Generator class. Another less trivial mapping is with pipeline Func local variables that start with “repeatedge*”. I understand that these are mapped to Func’s fed by a BoundaryConditions expression in the Halide::Generator class, although I am not sure about this. Thanks

ivangarcia44
@ivangarcia44

For the question above, here is a the sample code. I am looking a way to
automatically map func1 from the HalideGenerator class to func1_1 in the
scheduler pipeline below. And func2 to repeat_edge_1.

class HalideGenerator1 : public Halide::Generator <HalideGenerator1> {
public:
...
void generate() {
...
func2(x, y) = BoundaryConditions::constant_exterior(func1, 0)(x, y);
...
}
void schedule() {
...
}
private:
...
Func func1{"func1"};
Func func2{"func2"};
...
};

inline void apply_schedule_HalideGeneratorName(
::Halide::Pipeline pipeline,
::Halide::Target target
) {
using ::Halide::Func
...
Func func1_1 = pipeline.get_func(28);
Func repeat_edge_1 = pipeline.get_func(27);
...
func1_1
.split(...)
.vectorize(...)
.compute_root()
.parallel(...);
...
repeat_edge_1
.split(...)
.vectorize(...)
.compute_root()
.parallel(...);
...
}

Roman Lebedev
@LebedevRI
halide itself is pgo-ignorant, right? i'm failing to find any mention of pgo/-fprofile-generate/-fprofile-instr-generate in the repo. i'm trying to understand what goes wrong in llvm/llvm-project#52845
Alex Reinking
@alexreinking:matrix.org
[m]
That's right... the CMake build has no opinion about those flags
Roman Lebedev
@LebedevRI
thought as much
Roman Lebedev
@LebedevRI
are there any success stories of halide-enabled projects and fuzzing? i'm guessing the C_BACKEND is catch-all escape hatch for this?
Alex Reinking
@alexreinking:matrix.org
[m]
The rungen stuff has a random input generator. You have to provide the output extents though
Not sure why C_BACKEND would be relevant?
You generally don't want to go through the C backend if LLVM has a backend for your target
Roman Lebedev
@LebedevRI
no, i mean, what if i have some code that is currently being fuzzed as part of oss-fuzz project, and now i want to replace some pieces of that code with halide. how do i retain fuzzing coverage?
Alex Reinking
@alexreinking:matrix.org
[m]
I don't know, how does oss-fuzz measure coverage?
Roman Lebedev
@LebedevRI
i mostly mean coverage in general sense. for plain c code, the ir would then be instrumented by some pass as instructed by clang, but here as i can tell there's only asan option
s/option/feature/
well, and tsan
Alex Reinking
@alexreinking:matrix.org
[m]
We could look into enabling that pass via a feature flag, assuming one exists at the LLVM level
so msan seems obvious-ish
Alex Reinking
@alexreinking:matrix.org
[m]
Sure. We could look into this if it appeases fuzzing tools generally.
Roman Lebedev
@LebedevRI
the main one is ModuleSanitizerCoveragePass
let me just file a metabug first
Alex Reinking
@alexreinking:matrix.org
[m]
"Coverage" is kind of a weird metric for a language like Halide, though. Programs aren't very divergent. I would guess that for a "typical" pipeline, nearly every input would produce the same coverage profile.
Roman Lebedev
@LebedevRI
sure, but fuzzers need that to know if they are hitting the actual code or not
Alex Reinking
@alexreinking:matrix.org
[m]
Like, maybe you can do some weird things with RDom::where. External stages need to be instrumented separately, anyway.
Sure. I think that's a good enough reason
Roman Lebedev
@LebedevRI
note that i'm not saying: please implement this now; i would look into it myself if it's reasonable and maybe with some guidance if needed
Alex Reinking
@alexreinking:matrix.org
[m]
Gotcha
Roman Lebedev
@LebedevRI
so i guess i should just try and see what it would take to add msan support
Alex Reinking
@alexreinking:matrix.org
[m]
Yes, hopefully not too much.
Roman Lebedev
@LebedevRI
alexreinking: thank you
Roman Lebedev
@LebedevRI
ah, hmm, so there is already some msan support, missed that
Yeah, we have m/t/asan feature flags
Roman Lebedev
@LebedevRI
yeah, somehow i didn't see msan
Alex Reinking
@alexreinking:matrix.org
[m]
It's not next to the others for some reason 🤷‍♂️
I was surprised when you said there was no msan support... I should have checked.
Roman Lebedev
@LebedevRI
i mean, msan pass isn't being run in CodeGen_LLVM::optimize_module(), unlike asan/tsan, there's custom instrumentation that all input buffers are defined, which is actually the right way do to this
Alex Reinking
@alexreinking:matrix.org
[m]
So you just need the coverage sanitizer still?
Roman Lebedev
@LebedevRI
"just"
Alex Reinking
@alexreinking:matrix.org
[m]
🙂
Roman Lebedev
@LebedevRI
there's also the question of translating -fsanitize to halide features
Alex Reinking
@alexreinking:matrix.org
[m]
In what sense?
Halide compiled with a sanitizer doesn't need to always produce binaries with that sanitizer
And vice versa...
Roman Lebedev
@LebedevRI
sure, that's not the question
Alex Reinking
@alexreinking:matrix.org
[m]
Okay, then where is this translation taking place?
Roman Lebedev
@LebedevRI
what i mean is, when i pass CFLAGS=-fsanitize=address, clang enables ASAN. will that just magically also enable halide's asan feature
?