Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 03:38
    mym2009 opened #6776
  • 01:04
    jrprice synchronize #6492
  • 00:38
    jrprice synchronize #6492
  • 00:10
    jrprice synchronize #6492
  • May 19 23:03
    LebedevRI opened #6775
  • May 19 21:59
    steven-johnson synchronize #6760
  • May 19 21:59

    steven-johnson on init-from-context

    Minor metadata-related cleanups… Expand the x86 SIMD variants te… Fix Param<T>::set_estimate for … and 6 more (compare)

  • May 19 21:22

    steven-johnson on typo2

    (compare)

  • May 19 21:22

    steven-johnson on main

    Fix annoying typo in Func.h (#6… (compare)

  • May 19 21:22
    steven-johnson closed #6774
  • May 19 21:12
    steven-johnson opened #6774
  • May 19 21:12
    steven-johnson labeled #6774
  • May 19 21:12

    steven-johnson on typo2

    Update Func.h (compare)

  • May 19 21:11

    steven-johnson on typo2

    (compare)

  • May 19 19:40
    steven-johnson commented #6773
  • May 19 19:10
    abadams commented #6773
  • May 19 18:48
    steven-johnson commented #6773
  • May 19 18:41
    abadams commented #6773
  • May 19 18:23
    steven-johnson commented #6637
  • May 19 18:15
    steven-johnson synchronize #6637
Vlad Levenfeld
@vladl-innopeaktech_gitlab
Another weird thing - when I grep for halide_malloc in binary files, nothing that I've built in Halide matches. But the Halide_TOOLS inside the Hexagon SDK does match. It looks like this symbol isn't being included in my build. My pre-build configuration command is cmake -B ./build/ -S . -G Ninja -DCMAKE_BUILD_TYPE=Release -DTARGET_WEBASSEMBLY=OFF -DWITH_TESTS=OFF -DWITH_TUTORIALS=OFF -DWITH_UTILS=OFF -DWITH_PYTHON_BINDINGS=OFF
Nikola Smiljanić
@popizdeh
Thanks for clearing that up @zvookin and @jrk. I just think that documentation could be much better, when it says "Split a dimension by a given factor" and function parameter is called factor I read this as "my dimension is X, so width, split by factor of 4 is then width / 4", I'm not sure how to read it to get the behaviour you're explaining. If on the other hand parameter was called `num_elements_in_inner_dimension" there would be little room for confusion! I'm not proposing this name, but trying to illustrate how more explicit name (or more text in the docs) could clear up any confusion once and for all.
Alex Reinking
@alexreinking:matrix.org
[m]
I'm at the Cancun airport heading back... will have intermittent internet access on the planes, airport terminals, etc.
Greg Cotten
@gregcotten
Hi all, I cannot find an appropriate place to ask this but I'm looking for an engineer on porting a Metal-based image effect plugin to Halide. High pay, 4-6 weeks estimated hourly or part-time. It has been really hard to find a candidate for such a niche project! Async/remote work allowed and encouraged. Please email me at greg@videovillage.co if you're interested.
Svenn-Arne Dragly
@dragly
I think I might have asked this before, but I cannot remember: Is there a way to construct a Halide::Runtime::Buffer that is only allocated on device? I have a few AOT compiled functions that will run on device only and it would be nice to not allocate the input and output of these on host.
1 reply
Bill Pringlemeir
@bpringlemeir
I updated the stackoverflow Halide tag. Hopefully the information is balanced and correct.
Alex Reinking
@alexreinking:matrix.org
[m]

Halide is an open-source domain-specific language which iterates over up to four dimensions to apply computations.

There is no such restriction...

1 reply
steven-johnson
@steven-johnson:matrix.org
[m]
Early versions of Halide had a restriction of 4 dimensions for buffers passed as inputs or outputs. This restriction has been gone for several years now.
Bill Pringlemeir
@bpringlemeir
I believe you. I am pretty sure it was in a document I read. Perhaps it was a paper (which would refer to older versions). I updated the text. Thanks,
Jonathan Ragan-Kelley
@jrk
If you find the reference, let us know, in case something is out of date — but thanks!
steven-johnson
@steven-johnson:matrix.org
[m]
FYI: The Mac x86 buildbot is going down for maintenance. Back up in a bit.
LJ
@woodknight
Hi, I'm curious why Halide is called Halide? I couldn't find a description of the name's origin anywhere.
2 replies
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.