Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 18:29

    rootjalex on improve_cbounds_fixed

    clang format (compare)

  • 17:46

    steven-johnson on pyext

    (compare)

  • 17:46

    steven-johnson on main

    add_python_aot_extension should… (compare)

  • 17:46
    steven-johnson closed #6767
  • 17:29

    steven-johnson on set_estimate

    (compare)

  • 17:29

    steven-johnson on main

    Fix Param<T>::set_estimate for … (compare)

  • 17:29
    steven-johnson closed #6766
  • 17:01
    LebedevRI commented #6765
  • 16:59
    LebedevRI synchronize #6765
  • 16:53
    steven-johnson synchronize #6766
  • 16:53

    steven-johnson on set_estimate

    Add tests (compare)

  • 16:13
    steven-johnson review_requested #6765
  • May 14 00:42
    steven-johnson synchronize #6764
  • May 14 00:42

    steven-johnson on pygen-three

    Update bilateral_grid_shell.py Update bilateral_grid_generator… (compare)

  • May 14 00:34
    steven-johnson synchronize #6764
  • May 14 00:34

    steven-johnson on pygen-three

    Convert python/apps/bilateral_g… (compare)

  • May 14 00:30
    steven-johnson review_requested #6767
  • May 14 00:30
    steven-johnson opened #6767
  • May 14 00:30

    steven-johnson on pyext

    add_python_aot_extension should… (compare)

  • May 14 00:29

    steven-johnson on pyext

    add_python_aot_extension should… (compare)

Ashish Uthama
@ashishUthama
@steven-johnson:matrix.org - thanks for the response. I was initially surprised to see this support (and very happy too :)). Its been really useful on Linux for quick prototyping.
steven-johnson
@steven-johnson:matrix.org
[m]
Thank @dsharletg , he's the one who wrote it :-)
Jonathan Ragan-Kelley
@jrk
The good news is the mex support is pretty simple/lightweight, last I knew. It shouldn’t be too hard to fix as needed.
Vlad Levenfeld
@vladl-innopeaktech_gitlab
Do I need the Hexagon SDK to build and run Hexagon code or can I do it with Halide master? I've noticed that I have libhexagon_remote_skel.so and such in the src directory but not under build, and when I modify some code (like setting halide_print to segfault intentionally in the qurt and sim source) I don't see the modification either in the bindump or the side effects during the simulation run. All I really want is to get halide_print to utilize the Hexagon FARF so I can get some debug output from Halide when I run it for Hexagon simulator.
I've even tried renaming some of the halide libs in the Hexagon SDK so they are not accessible, but run_main_on_hexagon just plows ahead like it never even noticed they were gone (the output log even shows it dynamically loading some of these libs)
@aankit-ca @pranavb-ca do ya'll know what might be going on?
Vlad Levenfeld
@vladl-innopeaktech_gitlab
I also don't see any of the hexagon libs show up in the installation manifest when I cmake --install
steven-johnson
@steven-johnson:matrix.org
[m]
You should not need the Hexagon SDK. libhexagon_remote_skel.so and friends are checked-in in binary form.
Vlad Levenfeld
@vladl-innopeaktech_gitlab
@steven-johnson:matrix.org thanks, that is good to know. run_main_on_hexagon is still only in the Hexagon SDK, though, I'd imagine. Any idea why the changes I make in the Halide source aren't appearing in the simulator? It looks like libhexagon_remote_skel.so is the only library I need a copy of, but there are several others (hexagon_sim_remote, libsimqurt.a) that are built in Halide's src/runtime/hexagon_remote dir but whose absence doesn't trigger any linker errors
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