profile
viewpoint

benoitsteiner/tensorflow-opencl 431

OpenCL support for TensorFlow

lukeiwanski/tensorflow 64

OpenCL support for TensorFlow via SYCL

benoitsteiner/tensorflow-xsmm 12

Improved performance for TensorFlow on Intel hardware.

benoitsteiner/libxsmm 2

Library targeting Intel Architecture for small, dense or sparse matrix multiplications, and small convolutions.

benoitsteiner/tensorflow 1

Computation using data flow graphs for scalable machine learning

benoitsteiner/Halide 0

a language for fast, portable data-parallel computation

benoitsteiner/onnx 0

Open Neural Network Exchange

benoitsteiner/pytorch 0

Tensors and Dynamic neural networks in Python with strong GPU acceleration

benoitsteiner/triSYCL 0

Some experiments around OpenCL SYCL

PR opened halide/Halide

Use internal_assert instead of assert

internal_assert and user_assert are used in most of the code, and we depend on them to be able to recover from bugs (we compile halide with exception support, catch exceptions and try something else when they occur.)

+2 -2

0 comment

1 changed file

pr created time in 6 hours

push eventbenoitsteiner/Halide

Benoit Steiner

commit sha 780407877bf57e47da540a1b4611315b086e0f49

Use internal_assert instead of assert

view details

push time in 6 hours

push eventhalide/Halide

Benoit Steiner

commit sha 3651e3669404ddb9117c0069303155bcd19b5438

Prevent a memory corruption when featurizing a schedule. When featurizing a schedule for a computation like f(x, y, x) = g(x) + h(x, y, z) the scheduler might try to attempt to vectorize on the 2nd or 3rd dimension of f. However there is no such dimension for g.

view details

Benoit Steiner

commit sha 69f29aee5140603ce9ce0bbe85336509466446d5

Merge pull request #4633 from benoitsteiner/node_map Prevent a memory corruption when featurizing a schedule.

view details

push time in a day

PR merged halide/Halide

Reviewers
Prevent a memory corruption when featurizing a schedule.

When featurizing a schedule for a computation like f(x, y, x) = g(x) + h(x, y, z) the scheduler might try to attempt to vectorize on the 2nd or 3rd dimension of f. However there is no such dimension for g.

+1 -1

3 comments

1 changed file

benoitsteiner

pr closed time in a day

pull request commenthalide/Halide

Prevent a memory corruption when featurizing a schedule.

I tried to add a test over the week-end, but it turns out to be fairly challenging. There are 2 ways to push to autoscheduler to reproduce the bug: giving it a pipeline that would be best scheduled along the outermost dimension, and tweaking the cost model to encourage vectorization of outer dimensions. We can't really do the second at the moment, and I failed to come up with a reasonably sized pipeline that would trigger the bug.

benoitsteiner

comment created time in a day

push eventhalide/Halide

Benoit Steiner

commit sha 1f04cab1ccdd0680348c1f6b256f8e1496963a0c

Updated the CostModel API to take a map of schedule features. This enabled custom imlpementations of the cost model to model schedule features in their own way.

view details

Benoit Steiner

commit sha edbc2449738a0d0c5b36bee9afe7cc9729daddca

Addressed feedback from the pull request review.

view details

Benoit Steiner

commit sha 712e1b37ba43edc8241532b362ab7e2e7f33c0fb

Fixed typo in error message

view details

Benoit Steiner

commit sha 2f9fc2f674752edf264543c3a8b53fd4a33e13e8

Merge pull request #4595 from benoitsteiner/master Updated the CostModel API to take a map of schedule features.

view details

push time in a day

PR merged halide/Halide

Reviewers
Updated the CostModel API to take a map of schedule features.

This change enables implementations of the cost model to customize the way schedule features are handled.

+63 -41

3 comments

4 changed files

benoitsteiner

pr closed time in a day

PR opened halide/Halide

Reviewers
Prevent a memory corruption when featurizing a schedule.

When featurizing a schedule for a computation like f(x, y, x) = g(x) + h(x, y, z) the scheduler might try to attempt to vectorize on the 2nd or 3rd dimension of f. However there is no such dimension for g.

+1 -1

0 comment

1 changed file

pr created time in 5 days

push eventbenoitsteiner/Halide

Benoit Steiner

commit sha 3651e3669404ddb9117c0069303155bcd19b5438

Prevent a memory corruption when featurizing a schedule. When featurizing a schedule for a computation like f(x, y, x) = g(x) + h(x, y, z) the scheduler might try to attempt to vectorize on the 2nd or 3rd dimension of f. However there is no such dimension for g.

view details

push time in 5 days

push eventhalide/Halide

Benoit Steiner

commit sha 43c7a09eed56b374074e0e277a2127df6b624624

Remove the FunctionDAG::Stage::output_vector_size data member since it isn't used anywhere.

view details

Benoit Steiner

commit sha ea80a271b9d95879e373f0d3aade625fb5d7eef7

Merge pull request #4627 from benoitsteiner/node_map Remove the FunctionDAG::Stage::output_vector_size data member

view details

push time in 6 days

PR merged halide/Halide

Remove the FunctionDAG::Stage::output_vector_size data member

It isn't used anywhere.

+0 -5

0 comment

2 changed files

benoitsteiner

pr closed time in 6 days

PR opened halide/Halide

Reviewers
Remove the FunctionDAG::Stage::output_vector_size data member

It isn't used anywhere.

+0 -5

0 comment

2 changed files

pr created time in 6 days

push eventbenoitsteiner/Halide

Benoit Steiner

commit sha 43c7a09eed56b374074e0e277a2127df6b624624

Remove the FunctionDAG::Stage::output_vector_size data member since it isn't used anywhere.

view details

push time in 6 days

push eventhalide/Halide

Benoit Steiner

commit sha d63eb9e625721934e274ae5a970e301ca9bb4988

The node map is only used in the constructor of FunctionDAG: make it a local datastructure instead of keeping it as a class member.

view details

Benoit Steiner

commit sha 7814eae69a60ba2ab1ea05dc237d027239ba1ece

Merge pull request #4626 from benoitsteiner/node_map Don't keep unnecessary data around.

view details

push time in 6 days

PR merged halide/Halide

Don't keep unnecessary data around.

The node map is only used in the constructor of FunctionDAG: make it a local datastructure instead of keeping it as a class member.

+1 -5

2 comments

2 changed files

benoitsteiner

pr closed time in 6 days

PR opened halide/Halide

Reviewers
Don't keep unnecessary data around.

The node map is only used in the constructor of FunctionDAG: make it a local datastructure instead of keeping it as a class member.

+1 -5

0 comment

2 changed files

pr created time in 6 days

create barnchbenoitsteiner/Halide

branch : node_map

created branch time in 6 days

Pull request review commenthalide/Halide

Updated the CostModel API to take a map of schedule features.

 class CostModel {     virtual void set_pipeline_features(const Internal::Autoscheduler::FunctionDAG &dag,                                        const MachineParams &params) = 0; -    // Enqueue a schedule to be evaluated. Returns a buffer of-    // schedule_features that should be filled in by the caller.-    virtual void enqueue(int ns, Halide::Runtime::Buffer<float> *schedule_feats, double *cost_ptr) = 0;+    // Enqueue a schedule to be evaluated. Will annotate the value located at cost_ptr when the evaluation takes place.+    // Note that the dag argument should correspond to the dag specified previously when callig set_pipeline_features.

done

benoitsteiner

comment created time in 11 days

Pull request review commenthalide/Halide

Updated the CostModel API to take a map of schedule features.

 void DefaultCostModel::enqueue(const Internal::Autoscheduler::FunctionDAG &dag,          // Load up the schedule features for all stages of this Func.         for (auto it = n.stages.rbegin(); it != n.stages.rend(); it++) {-            internal_assert(features.contains(&*it)) << n.func.name() << "\\-n";-            const auto &feat = features.get(&*it);+            internal_assert(schedule_feats.contains(&*it)) << n.func.name() << "\\n";

done

benoitsteiner

comment created time in 13 days

push eventbenoitsteiner/Halide

Benoit Steiner

commit sha 712e1b37ba43edc8241532b362ab7e2e7f33c0fb

Fixed typo in error message

view details

push time in 13 days

pull request commenthalide/Halide

Updated the CostModel API to take a map of schedule features.

This PR only moves code from autoscheduler.cpp to DefaultCostModel.cpp. For better or for worse, there shouldn't be any impact on performance.

benoitsteiner

comment created time in 15 days

Pull request review commenthalide/Halide

Updated the CostModel API to take a map of schedule features.

  #include "FunctionDAG.h" #include "HalideBuffer.h"+#include "PerfectHashMap.h"  // An abstract base class for a cost model. namespace Halide { +namespace Internal {+namespace Autoscheduler {+typedef PerfectHashMap<FunctionDAG::Node::Stage, ScheduleFeatures> StageMapOfScheduleFeatures;+}

Done

benoitsteiner

comment created time in 15 days

Pull request review commenthalide/Halide

Updated the CostModel API to take a map of schedule features.

 void DefaultCostModel::set_pipeline_features(const Runtime::Buffer<float> &pipel     num_cores = n; } +void DefaultCostModel::enqueue(const Internal::Autoscheduler::FunctionDAG &dag, const Halide::Internal::Autoscheduler::StageMapOfScheduleFeatures &features, double *cost_ptr) {+    num_stages = (int)features.size();++    Runtime::Buffer<float> schedule_features;++    // Tell the cost model about this state. It won't actually+    // evaluate it until we call evaluate_costs (or if it runs out+    // of internal buffer space), so that the evaluations can be+    // batched.+    enqueue(num_stages, &schedule_features, cost_ptr);++    // index of current stage whose features we are reading+    int stage = 0;+    // load schedule features into input buffer+    for (const auto &n : dag.nodes) {++        // Inputs are computed outside of the pipeline and don't count.+        if (n.is_input) continue;++        // The remaining stage are not yet+        // scheduled. Optimistically assume their internal costs+        // will not depend on the decisions made already, so+        // there's no point adding it on to the total because it's+        // the same across all states.  An underestimate of the+        // cost for loading from these unscheduled stages is+        // already baked into the scheduled stages that consume+        // them.+        if (stage >= num_stages) break;++        // Load up the schedule features for all stages of this Func.+        for (auto it = n.stages.rbegin(); it != n.stages.rend(); it++) {+            internal_assert(features.contains(&*it)) << n.func.name() << "\\

It looks like a mistake. My editor probably added one backslash to indicate that the line was wrapping around, so I ended up with two backslashes when copying the code.

benoitsteiner

comment created time in 15 days

push eventbenoitsteiner/Halide

Benoit Steiner

commit sha edbc2449738a0d0c5b36bee9afe7cc9729daddca

Addressed feedback from the pull request review.

view details

push time in 15 days

Pull request review commenthalide/Halide

Updated the CostModel API to take a map of schedule features.

 class CostModel {     virtual void set_pipeline_features(const Internal::Autoscheduler::FunctionDAG &dag,                                        const MachineParams &params) = 0; -    // Enqueue a schedule to be evaluated. Returns a buffer of-    // schedule_features that should be filled in by the caller.-    virtual void enqueue(int ns, Halide::Runtime::Buffer<float> *schedule_feats, double *cost_ptr) = 0;+    // Enqueue a schedule to be evaluated. Will annotate the value located at cost_ptr when the evaluation takes place.+    // Note that the dag argument should correspond to the dag specified previously when callig set_pipeline_features.+    virtual void enqueue(const Internal::Autoscheduler::FunctionDAG &dag, const Halide::Internal::Autoscheduler::StageMapOfScheduleFeatures &schedule_feats, double *cost_ptr) = 0;

I've split the line. The feats abbreviation is used in several places in the autoscheduler code, so I've kept it.

benoitsteiner

comment created time in 15 days

Pull request review commenthalide/Halide

Updated the CostModel API to take a map of schedule features.

 void DefaultCostModel::set_pipeline_features(const Runtime::Buffer<float> &pipel     num_cores = n; } +void DefaultCostModel::enqueue(const Internal::Autoscheduler::FunctionDAG &dag, const Halide::Internal::Autoscheduler::StageMapOfScheduleFeatures &features, double *cost_ptr) {

I've updated the code to name these schedule features consistently.

benoitsteiner

comment created time in 15 days

PR opened halide/Halide

Reviewers
Updated the CostModel API to take a map of schedule features.

This change enables implementations of the cost model to customize the way schedule features are handled.

+58 -41

0 comment

4 changed files

pr created time in 18 days

push eventbenoitsteiner/Halide

Steven Johnson

commit sha cc046f0495f6fe50feb139c2628edd64ca2e406b

Skip flaky test for auto_schedule/histogram (https://github.com/halide/Halide/issues/4589)

view details

Steven Johnson

commit sha 4a0f82c658da82b9756c948d7e0a14892e7a9848

Merge pull request #4592 from halide/srj-histo Skip flaky test for auto_schedule/histogram (Issue #4589)

view details

Benoit Steiner

commit sha 044bfdd590c58f2da87baf433642282532109de0

Merge pull request #4591 from benoitsteiner/master Small code cleanup and simplification

view details

Benoit Steiner

commit sha 1f04cab1ccdd0680348c1f6b256f8e1496963a0c

Updated the CostModel API to take a map of schedule features. This enabled custom imlpementations of the cost model to model schedule features in their own way.

view details

push time in 18 days

push eventhalide/Halide

Benoit Steiner

commit sha 74945ac29317e355f8a9386b0964ec9a016c75c8

Small code cleanup and simplification

view details

Benoit Steiner

commit sha 6bcdf8bf3851a02574acf3804a195cc9fa856233

SymbolicRange -> SymbolicInterval

view details

Benoit Steiner

commit sha 13c77e6d9962898021ebd5f22a3570e6eda99c84

Use emplace_back instead of push_back to avoid unecessary temporary object creation

view details

Benoit Steiner

commit sha 044bfdd590c58f2da87baf433642282532109de0

Merge pull request #4591 from benoitsteiner/master Small code cleanup and simplification

view details

push time in 19 days

PR merged halide/Halide

Small code cleanup and simplification
+14 -10

0 comment

2 changed files

benoitsteiner

pr closed time in 19 days

push eventbenoitsteiner/Halide

Benoit Steiner

commit sha 13c77e6d9962898021ebd5f22a3570e6eda99c84

Use emplace_back instead of push_back to avoid unecessary temporary object creation

view details

push time in 19 days

Pull request review commenthalide/Halide

Small code cleanup and simplification

 FunctionDAG::FunctionDAG(const vector<Function> &outputs, const MachineParams &p          // Create a symbolic region for this Func.         for (int j = 0; j < consumer.dimensions(); j++) {-            Expr min_var = Variable::make(Int(32), consumer.name() + "." + consumer.args()[j] + ".min");-            Expr max_var = Variable::make(Int(32), consumer.name() + "." + consumer.args()[j] + ".max");-            Expr extent = max_var - min_var + 1;+            Halide::Var min_var(consumer.name() + "." + consumer.args()[j] + ".min");+            Halide::Var max_var(consumer.name() + "." + consumer.args()[j] + ".max");             Interval interval(min_var, max_var);             scope.push(consumer.args()[j], interval);-            node.region_required.push_back(interval);+            node.region_required.push_back(SymbolicRange{min_var, max_var});

Indeed, fixed

benoitsteiner

comment created time in 19 days

Pull request review commenthalide/Halide

Small code cleanup and simplification

 struct FunctionDAG {     // An edge is a producer-consumer relationship     struct Edge; +    struct SymbolicRange {

Good idea, done

benoitsteiner

comment created time in 19 days

push eventbenoitsteiner/Halide

Benoit Steiner

commit sha 6bcdf8bf3851a02574acf3804a195cc9fa856233

SymbolicRange -> SymbolicInterval

view details

push time in 19 days

PR opened halide/Halide

Reviewers
Small code cleanup and simplification
+14 -10

0 comment

2 changed files

pr created time in 19 days

push eventbenoitsteiner/Halide

Katrina Passarella

commit sha ccbd3eefab69e3f5cee0ff44e70d7f0ba2475968

Add backend support for negative bit shifts on Hexagon. The existing intrinsics already supported this, so now the signed shifts are being passed through them, too.

view details

Katrina Passarella

commit sha 0f0b1edb38771d046ef66b4765635966ac7cf8e7

Add changes to hvx_64.ll and hvx_128.ll for negative bit shifts.

view details

Katrina Passarella

commit sha 4639687516c03bcd6f6f717018149d26dbe81261

Merge branch 'master' of github.com:halide/Halide into kp_bit_shift_hvx

view details

Steven Johnson

commit sha b1f659f62253e96294958b5041befc35f72a5337

Merge branch 'master' into kp_bit_shift_hvx

view details

Katrina Passarella

commit sha f8bad9734183347a84dbf95e5a555b799f6d2bb9

Fix zext->sext in hvx runtime and add vector RHS signed shift tests.

view details

Katrina Passarella

commit sha 9ae376ffa889863c1a9ff3bc9ec447e9a07562a2

Merge branch 'kp_bit_shift_hvx' of github.com:halide/Halide into kp_bit_shift_hvx

view details

Steven Johnson

commit sha baac139999221b635784bb7eb70f48758f278f41

Merge branch 'master' into kp_bit_shift_hvx

view details

Andrew Adams

commit sha 2992e8f8c6f5cc11b4a6ac67cfcfebb505dac7dd

Don't nest allocate nodes with the same name when fusing GPU thread loops Also only wrap let stmts around the allocation sizes that need it, in case there are sibling lets with the same name.

view details

Andrew Adams

commit sha a135a43972dbc8530cfe3a91eb70c186f26c6a07

ExtractRegisterAllocations must mutate all sub-exprs

view details

Andrew Adams

commit sha 579756189380af47d101fb2adaf6dd529ac90708

Add missing check before returning unmutated let

view details

Andrew Adams

commit sha e660eec7caf660da6527528d5c2efe5ffa8a45c5

Remove feature leakage from gpu autoscheduler branch

view details

Andrew Adams

commit sha 0cfc03a38835fa317bfc47fab9f0f4989acd8a1b

Fix for llvm trunk

view details

Steven Johnson

commit sha 7e0828f785f60f1a3ac09dfdc818e474a1d0c3f5

Merge pull request #4541 from halide/fix_alignment_arg Fix for llvm trunk

view details

Steven Johnson

commit sha aae2543c7220d2347e8fa283510f879d5ae63f25

Fix for trunk LLVM

view details

Pranav Bhandarkar

commit sha a18fe59a3b6cc3053dbb8648ba89b703c909a2bd

Deprecate Hexagon v60 in the Makefile too

view details

Steven Johnson

commit sha 36ee88abe0941088ed5143b967befd7fadb39a41

Merge pull request #4544 from halide/srj-align Fix for trunk LLVM

view details

Steven Johnson

commit sha 12e7d44e2f1487ea75ba7ec71490e9ace071b21b

Fix arm32 compilation issue On at least one compiler (gcc 7.4 on arm32, see https://buildbot.halide-lang.org/master/#/builders/24/builds/47), overload resolution fails for std::function for std::isinf and some others. Convert to a plain function pointer (which is all we need here) to resolve.

view details

Steven Johnson

commit sha 302e368a72809950241d8fb0e32484e165903307

Merge pull request #4545 from halide/srj-lookups Fix arm32 compilation issue

view details

Dillon Sharlet

commit sha b4e2bdfc4e66718dc8f4d277f2e9ba2d20724964

Merge pull request #4546 from halide/pdb_fix_install_qc Deprecate Hexagon v60 in the Makefile too

view details

Andrew Adams

commit sha 5df55457c3a8e085289f47df86e454a3a2e30710

Delete defunct native client flag

view details

push time in 19 days

push eventhalide/Halide

Benoit Steiner

commit sha 6aafa671db1a7884e4a996f5fb26a84d9c0f2ffa

Deleted dead code

view details

Benoit Steiner

commit sha 47ffcc365e0f754bc110e8e739825843a4947c0f

Merge pull request #4543 from benoitsteiner/master Deleted dead code

view details

push time in a month

PR merged halide/Halide

Deleted dead code
+0 -7

0 comment

1 changed file

benoitsteiner

pr closed time in a month

PR opened halide/Halide

Reviewers
Deleted dead code
+0 -7

0 comment

1 changed file

pr created time in a month

push eventbenoitsteiner/Halide

Pranav Bhandarkar

commit sha 4794d93b6d850f0809648bd389c1d79c94dc9c4a

Merge branch 'master' of https://github.com/halide/Halide

view details

Pranav Bhandarkar

commit sha 2a39fd097fc3c7a1b91d2ae6076d24e7f7735984

Revert "Add default constexpr constructor to ImplicitVar because Clang complaints about it" This reverts commit 9ff00ffe4ed0f2d476ba974ce1bad15bd70d9390.

view details

Shubham Pawar

commit sha 7e87e474fb0f9580c6800d5c78cabe32e1068917

Calculate Expr bounds using function_value_bounds This fixes #4397 where FunctionDAG.cpp computes an unbounded region for the update definitions of a Func when the region for the consumer Func is defined by another Func (call f2), because the bounds for f2 are not taken into account while calculating the bounds of expr which defines a dimension of the consumer. This change -- 1. hoists the computation of func_value_bounds out of loop. 2. uses the computed func_value_bounds while calculating bounds_of_expr_in_scope()

view details

Shubham Pawar

commit sha 4706b0120392a43766b9709fc80578135409fa15

Added JIT-test and removed apply_param_estimates. Addresses comments by @abadams on early application of param estimates to func_value_bounds. Added a simple JIT-test to identify the issue #4397.

view details

Pranav Bhandarkar

commit sha b46414cf8a6a6a09c5c79528beeb0c5ad2da6f06

Merge branch 'master' of https://github.com/halide/Halide

view details

Shubham Pawar

commit sha eb60123d39ec2c14e8b5439c470c874386174ab0

Merge branch 'master' of https://github.com/halide/Halide into bounds_expr_check

view details

Andrew Adams

commit sha aac70bc5af7f1b9dd3b9a6a312a46fab3c5704c3

Define div/mod by zero to return zero Also define things like -128/-1 to just wrap, for types that wrap. This makes div/mod side-effect-free, which removes the need for quiet_div/quiet_mod, and avoids runtime faults due to scheduling (see Not yet ready to merge, as the simplifier rules need to be reverified under this new constraint (there may now be division by zero on the LHS, where previously we occasionally assumed that there was not, because it was UB).

view details

Andrew Adams

commit sha 78b5dc04b34d04decd5b617c3c08d75d592d0929

Fix inverted check for mod

view details

Andrew Adams

commit sha 0591e3e40411dfc500b58a3755c436e4b1eeed6a

-128 % -1 apparently traps too

view details

Andrew Adams

commit sha fef1c9d4509da3332c1b78aef449aed03c6ad04d

Add unsharp app, with fresh manual scheduling

view details

Andrew Adams

commit sha ef8e375b54d0a26338403854caa6da6ae1bb9ec9

Delete defunct unsharp test

view details

Andrew Adams

commit sha 31289fc01cacf0dd4a4f2f8c3ef7a3f3aceb57c0

Add and reschedule harris corner detector

view details

Andrew Adams

commit sha ba067d5ee7fc2d725e7befc98450ddd96839a436

Add notes on runtimes on the platforms I optimized this on

view details

Andrew Adams

commit sha 282b88a27f7859964f57419624dfaa58061985ce

Rework interpolate. Add IIR blur.

view details

Andrew Adams

commit sha d504e18fc4079dfc711259b410568c6277f81ef6

Uniform ldflags for generators across all app makefiles

view details

Andrew Adams

commit sha aafd8b8645ec1884154378ba58dd27e54a70adae

Add new apps to cmake build

view details

Andrew Adams

commit sha c2b6da28843a36e53b1c2cf9fd6fa390afeb5896

clang-format

view details

Andrew Adams

commit sha 83221455ac181d2e2674d9f35acabc9e116db2f3

Merge remote-tracking branch 'origin/master' into apps_from_autoscheduler

view details

Andrew Adams

commit sha f8be786a8153ab3e9bb5948c96a49fdcb1610c81

Delete more rotted code

view details

Andrew Adams

commit sha 01746eda9bc2554ba232faec06f8bde7957e086f

Add interpolate cmakefile

view details

push time in a month

PR merged halide/Halide

Clone of #4462 for buildbot testing
+320 -298

1 comment

8 changed files

abadams

pr closed time in a month

push eventhalide/Halide

Benoit Steiner

commit sha 5a28eb42fb158b1102f7abaff28cd245bbd79b1a

Moved the bulk of the implementation of configure_pipeline_features() to the DefaultCostModel class. This allows custom cost models more flexibility in modeling pipeline features.

view details

Benoit Steiner

commit sha 155395a0e760ba2c05bac4381e32d56ae40e5004

Fixed compilation error in retrain_cost_model.cpp

view details

Benoit Steiner

commit sha 30893e9ea401757cdde1f21616974f8bc43f6c65

Added missing dependency

view details

Benoit Steiner

commit sha f5b5ee72d47d0f4a9ab9967528b66e5ce9c1cc2c

Added a missing dependency to hte Makefile based builds

view details

Benoit Steiner

commit sha f68ddd3c0bd4173bade0b78d2abeecec33798b56

Misc code cleanups

view details

Benoit Steiner

commit sha 6aa84235b48ec6acd0f246a7f589ac86830994da

Improved code formatting

view details

Benoit Steiner

commit sha 646779e2bc48e6446746b84dc83654495f574a9e

Merge pull request #4462 from benoitsteiner/featurization Moved the bulk of the implementation of configure_pipeline_features() to

view details

push time in a month

PR merged halide/Halide

Moved the bulk of the implementation of configure_pipeline_features() to

the DefaultCostModel class. This allows custom cost models more flexibility in modeling pipeline features.

+320 -298

20 comments

8 changed files

benoitsteiner

pr closed time in a month

MemberEvent

push eventbenoitsteiner/Halide

Pranav Bhandarkar

commit sha 4794d93b6d850f0809648bd389c1d79c94dc9c4a

Merge branch 'master' of https://github.com/halide/Halide

view details

Pranav Bhandarkar

commit sha 2a39fd097fc3c7a1b91d2ae6076d24e7f7735984

Revert "Add default constexpr constructor to ImplicitVar because Clang complaints about it" This reverts commit 9ff00ffe4ed0f2d476ba974ce1bad15bd70d9390.

view details

Shubham Pawar

commit sha 7e87e474fb0f9580c6800d5c78cabe32e1068917

Calculate Expr bounds using function_value_bounds This fixes #4397 where FunctionDAG.cpp computes an unbounded region for the update definitions of a Func when the region for the consumer Func is defined by another Func (call f2), because the bounds for f2 are not taken into account while calculating the bounds of expr which defines a dimension of the consumer. This change -- 1. hoists the computation of func_value_bounds out of loop. 2. uses the computed func_value_bounds while calculating bounds_of_expr_in_scope()

view details

Shubham Pawar

commit sha 4706b0120392a43766b9709fc80578135409fa15

Added JIT-test and removed apply_param_estimates. Addresses comments by @abadams on early application of param estimates to func_value_bounds. Added a simple JIT-test to identify the issue #4397.

view details

Pranav Bhandarkar

commit sha b46414cf8a6a6a09c5c79528beeb0c5ad2da6f06

Merge branch 'master' of https://github.com/halide/Halide

view details

Shubham Pawar

commit sha eb60123d39ec2c14e8b5439c470c874386174ab0

Merge branch 'master' of https://github.com/halide/Halide into bounds_expr_check

view details

Andrew Adams

commit sha aac70bc5af7f1b9dd3b9a6a312a46fab3c5704c3

Define div/mod by zero to return zero Also define things like -128/-1 to just wrap, for types that wrap. This makes div/mod side-effect-free, which removes the need for quiet_div/quiet_mod, and avoids runtime faults due to scheduling (see Not yet ready to merge, as the simplifier rules need to be reverified under this new constraint (there may now be division by zero on the LHS, where previously we occasionally assumed that there was not, because it was UB).

view details

Andrew Adams

commit sha 78b5dc04b34d04decd5b617c3c08d75d592d0929

Fix inverted check for mod

view details

Andrew Adams

commit sha 0591e3e40411dfc500b58a3755c436e4b1eeed6a

-128 % -1 apparently traps too

view details

Andrew Adams

commit sha fef1c9d4509da3332c1b78aef449aed03c6ad04d

Add unsharp app, with fresh manual scheduling

view details

Andrew Adams

commit sha ef8e375b54d0a26338403854caa6da6ae1bb9ec9

Delete defunct unsharp test

view details

Andrew Adams

commit sha 31289fc01cacf0dd4a4f2f8c3ef7a3f3aceb57c0

Add and reschedule harris corner detector

view details

Andrew Adams

commit sha ba067d5ee7fc2d725e7befc98450ddd96839a436

Add notes on runtimes on the platforms I optimized this on

view details

Andrew Adams

commit sha 282b88a27f7859964f57419624dfaa58061985ce

Rework interpolate. Add IIR blur.

view details

Andrew Adams

commit sha d504e18fc4079dfc711259b410568c6277f81ef6

Uniform ldflags for generators across all app makefiles

view details

Andrew Adams

commit sha aafd8b8645ec1884154378ba58dd27e54a70adae

Add new apps to cmake build

view details

Andrew Adams

commit sha c2b6da28843a36e53b1c2cf9fd6fa390afeb5896

clang-format

view details

Andrew Adams

commit sha 83221455ac181d2e2674d9f35acabc9e116db2f3

Merge remote-tracking branch 'origin/master' into apps_from_autoscheduler

view details

Andrew Adams

commit sha f8be786a8153ab3e9bb5948c96a49fdcb1610c81

Delete more rotted code

view details

Andrew Adams

commit sha 01746eda9bc2554ba232faec06f8bde7957e086f

Add interpolate cmakefile

view details

push time in a month

push eventbenoitsteiner/x86_kernels

Benoit Steiner

commit sha bd8d1386fc2bfdde647eb92d8894564a544d682a

Only saves checkpoints when the performance of NMT is improved

view details

push time in a month

push eventbenoitsteiner/x86_kernels

Benoit Steiner

commit sha 603049f6039d0b55180d6b70253e9e5976d00ebe

Preserve pruned weights

view details

push time in a month

push eventhalide/Halide

Benoit Steiner

commit sha da7ba2ab9b258e07ce9c7deacdddbf53b0e373a4

Take strides into account when figuring out which dimensions to vectorize

view details

Benoit Steiner

commit sha ff5f18ba7836b269dd79f704f2277dd893b8e9d9

Merge pull request #4532 from benoitsteiner/strides Take strides into account when figuring out which dimensions to

view details

push time in a month

Pull request review commenthalide/Halide

Refactor of configure_pipeline_features() to avoid libHalide dependency

 class StateQueue {     } }; +namespace {++// Custom version of PipelineInfo to extract the info we need from+// FunctionDAG + MachineParams for the CostModel interface.+class FunctionDAGPipelineInfo : public PipelineInfo {+    const FunctionDAG &dag;+    const MachineParams &params;++public:+    FunctionDAGPipelineInfo(const FunctionDAG &d,+                            const MachineParams &p)+        : dag(d), params(p) {+    }++    std::vector<PipelineFeatures> pipeline_features() const override {

My main concern with this is that the communication between the AutoScheduler and the CostModel still happens through a vector of PipelineFeatures, which isn't sufficient for our needs. By Having the cost model take the FunctionDAG as argument, the cost model had the ability to represent the FunctionDAG as it sees fit.

A secondary concern is that the implementation of FunctionDAGPipelineInfo resides in AutoScheduler.cpp, so we can't change anything there without having to fork the AutoScheduler code. For example, if I wanted to multiply all the feature values I pass to my cost model by 2, I wouldn't be able to push that to Halide without making incompatible changes (this is obviously not a good example since I could multiply everything by 2 in a custom cost model itself)

One way to avoid this would be to extract from FunctionDAG the subsets that don't depend on the runtime, encode them as the FunctionDAGPipelineInfo, and pass the FunctionDAGPipelineInfo to the cost model. However, since the exact representation needed for accurate cost modeling is still the subject of active research, it would be hard to figure out at this point what the FunctionDAGPipelineInfo class would need to look like.

steven-johnson

comment created time in a month

push eventbenoitsteiner/x86_kernels

Benoit Steiner

commit sha eba12bba2e95934cf9d020f6de24d6599e811d0a

Added support for running NMT on GPU

view details

push time in a month

push eventbenoitsteiner/x86_kernels

Benoit Steiner

commit sha 47aaaf7231470c59f1d6432931780fdf46a130b8

Made nmt run on devfair servers

view details

push time in a month

push eventbenoitsteiner/x86_kernels

Benoit Steiner

commit sha 2d095a007c151feb8d5506159f4cb1717943d7dd

Hack to sparsify NMT

view details

push time in a month

MemberEvent

PR opened halide/Halide

Take strides into account when figuring out which dimensions to

vectorize

+30 -3

0 comment

1 changed file

pr created time in a month

push eventbenoitsteiner/Halide

Benoit Steiner

commit sha da7ba2ab9b258e07ce9c7deacdddbf53b0e373a4

Take strides into account when figuring out which dimensions to vectorize

view details

push time in a month

push eventbenoitsteiner/Halide

Benoit Steiner

commit sha f6dc4122c6239e60257fff9d252bb6499a2887df

Take strides into account when figuring out which dimensions to vectorize

view details

push time in a month

create barnchbenoitsteiner/Halide

branch : strides

created branch time in a month

push eventbenoitsteiner/x86_kernels

Benoit Steiner

commit sha 827a71b22bab45f6353e71227ff45f5bf6022f6d

Final touches to the NCF model

view details

push time in a month

push eventbenoitsteiner/x86_kernels

Benoit Steiner

commit sha 7399b0c2135954733cafbdb2dfad99193ae14f45

Preliminary support for NCF models

view details

Benoit Steiner

commit sha 84593ee3466da321983fa3ac182bd9a0c1fbab75

NCF model and related utilities

view details

push time in a month

push eventbenoitsteiner/x86_kernels

Benoit Steiner

commit sha 7e7a0c6f2b10636926b967a94a5d7e2e2550ec57

Updated readme

view details

push time in a month

push eventbenoitsteiner/x86_kernels

Benoit Steiner

commit sha c60ec697758c687bc9b3fa7493974326f7722221

Use our own metrics package

view details

push time in a month

push eventbenoitsteiner/x86_kernels

Benoit Steiner

commit sha 47f4ee7ee02cc0f92d1a289ff5fc4df62afdd680

Initial support for NMT

view details

Benoit Steiner

commit sha ac80b00868043fe29d2634381c56f7d37dfc64f3

Merge branch 'master' of https://github.com/benoitsteiner/x86_kernels

view details

push time in a month

push eventbenoitsteiner/x86_kernels

Benoit Steiner

commit sha d7de3946113819653b7787642ba27f0fa41283eb

Updated readme

view details

push time in a month

push eventbenoitsteiner/x86_kernels

Benoit Steiner

commit sha 4a09cedf99ecc54686d6c6f01719efcea98b4e81

Formatting

view details

push time in a month

push eventbenoitsteiner/x86_kernels

Benoit Steiner

commit sha cfb3ccbbb3ffcfb2afb8c8f42831090f73f7d124

Initial version

view details

push time in a month

create barnchbenoitsteiner/x86_kernels

branch : master

created branch time in a month

created repositorybenoitsteiner/x86_kernels

created time in a month

issue commenthalide/Halide

Missed bounds simplifications

Indeed, once I add requirements to enforce output_size == input_size the loop extents are inferred as I expected. The only thing that still missing is to decouple the simplifiers from the lowering process in order to ensure that we can call them before starting the autoscheduler.

benoitsteiner

comment created time in a month

pull request commenthalide/Halide

Moved the bulk of the implementation of configure_pipeline_features() to

The CostModel class allows us to experiment with different ways to predict costs given a set of pipeline features. However, with the current code we have to modify AutoScheduler.cc every time we want to experiment with different pipeline features. This makes the whole process much more difficult than it needs to be, and has forced us to fork the autoscheduler code. With the PR, we gain the flexibility we need to experiment with different pipeline features.

benoitsteiner

comment created time in a month

issue openedhalide/Halide

Missed bounds simplifications

I tried the following code:

  Halide::ImageParam input_a(Halide::type_of<float>(), 3, "input_a");
  input_a.dim(0).set_bounds(0, 1);
  Halide::ImageParam input_b(Halide::type_of<float>(), 3, "input_b");

  Halide::Func f("out_a"), g("out_b");
  Halide::Var i, j, k;
  f(i, j, k) = input_a(i, j, k) * 2;
  g(i, j, k) = input_b(i, j, k) / 2;

  std::vector<Halide::Func> fs;
  fs.push_back(f);
  fs.push_back(g);

  Halide::Pipeline p(fs);
  p.add_requirement(input_a.dim(0).extent() == input_b.dim(0).extent());
  p.add_requirement(input_a.dim(1).extent() == input_b.dim(1).extent());
  p.add_requirement(input_a.dim(2).extent() == 5);
  p.add_requirement(input_b.dim(2).extent() == 6);
  f.output_buffer().dim(1).set_bounds(0, 3);

  Halide::Target target("x86-64-linux-sse41-avx-avx2");

  std::vector<Halide::Argument> inputs;
  inputs.push_back(input_a);
  inputs.push_back(input_b);

 p.compile_to_lowered_stmt(std::string("/tmp/example.stmt"), inputs, Halide::Text, target);

I expected that all the extents of f and g be fully known. For f, the first extent would come from the bounds specification on input_a, the second from the explicit specification of the bounds of the output buffer, and the third from the pipeline requirement. For g, I was hoping that the pipeline requirements would also be leveraged to derive the bounds. However, in practice, the only known extent in example.stmt is the one specified through f.output_buffer().dim(1).set_bounds(0, 3). All the other extents remain symbolic.

Of course in this trivial example I could directly set the bounds on f and g, but there are cases where this is difficult. Is there any way to improve the simplifier to start taking pipeline requirements and input extents into account ?

created time in a month

pull request commenthalide/Halide

Moved the bulk of the implementation of configure_pipeline_features() to

I updated CostModel::set_pipeline_features to take a FunctionDAG in order to enable us extract different pipeline features from a function dag without having to fork and update the code in several places. As a result the default cost model and ultimately retrain_cost_model also depend on FunctionDAG,

benoitsteiner

comment created time in 2 months

pull request commenthalide/Halide

Moved the bulk of the implementation of configure_pipeline_features() to

I just managed to trace the root cause of the problem: FunctionDAG.h includes Halide.h, which contains the following code:

#ifndef COMPILING_HALIDE
namespace Halide {
namespace Internal {
static bool check_introspection(const void *var, const std::string &type,
                                const std::string &correct_name,
                                const std::string &correct_file, int line) {
    std::string correct_loc = correct_file + ":" + std::to_string(line);
    std::string loc = Introspection::get_source_location();
    std::string name = Introspection::get_variable_name(var, type);
    return name == correct_name && loc == correct_loc;
}
}  // namespace Internal
}  // namespace Halide
#endif 

Both Introspection::get_source_location() and Introspection::get_variable_name() are declared in Halide.h but not defined, which is why we end up with these 2 missing symbols unless we link Halide. I'm not sure that the proper way to fix this is. Adding #define COMPILING_HALIDE in FunctionDAG.h before including Halide.h would solve this problem, but it looks like an ugly hack.

benoitsteiner

comment created time in 2 months

issue commenthalide/Halide

Adams2019 autoscheduler generates incorrect code

I get the following errors: Warning: This pipeline is guaranteed to fail an assertion at runtime:

halide_error_constraint_violated("b0.min.1", b0.min.1, "0", 0) Warning: This pipeline is guaranteed to fail an assertion at runtime: halide_error_constraint_violated("f0.min.0", f0.min.0, "0", 0) ...

Followed by Error: Input buffer b0 is accessed at -10, which is before the min (0) in dimension 1

benoitsteiner

comment created time in 2 months

issue openedhalide/Halide

Adams2019 autoscheduler generates incorrect code

The autoscheduler seems to assume that the bound estimates can always be relied upon, and generate out of bounds memory access in the example below, which simply tries to compute f(x, y, z, t) = in(0, z, 0), where in is a [1, 3, 1] buffer, and the estimate for the size of f is [100, 100, 100, 100].

  std::uniform_real_distribution<float> dis(-1.0, 1.0);
  std::mt19937 rnd;

  Halide::Buffer<float> in(1, 3, 1);
  in.for_each_value([&](float& f) { f = dis(rnd); });

  Halide::Func f;
  std::vector<Halide::Var> vars(4);
  std::vector<Halide::Expr> indices(3);
  indices[0] = 0;
  indices[1] = vars[2];
  indices[2] = 0;

  f(vars) = in(indices);

  std::vector<Halide::Func> fs;
  fs.push_back(f);
  Halide::Pipeline p(fs);

  Halide::MachineParams params(32, 16000000, 40);
  Halide::Target target("x86-64-linux-sse41-avx-avx2");

// When autoscheduling is disabled, the code works correctly.
#if 1
  std::cout << "RUNNING WITH ADAMS2019 SCHEDULE" << std::endl;
  f.set_estimates({{0, 100}, {0, 100}, {0, 100}, {0, 100}});

  std::vector<Halide::Internal::Function> funcs;
  funcs.push_back(f.function());
  Halide::Internal::Autoscheduler::FunctionDAG dag(funcs, params, target);
  Halide::DefaultCostModel cost_model("", "", false);
  Halide::Internal::Autoscheduler::StageMapOfScheduleFeatures schedule_features;
  Halide::Internal::Autoscheduler::find_and_apply_schedule(
      dag,
      funcs,
      params,
      &cost_model,
      32,
      &schedule_features);
#else
  std::cout << "RUNNING WITH DEFAULT SCHEDULE" << std::endl;
#endif

  {
    Halide::Expr stride = 1;
    for (int i = 3; i >= 0; --i) {
      f.output_buffer().dim(i).set_bounds(0, 3);
      stride = stride * 3;
    }
  }

  Halide::Buffer<float> output_values({3,3,3,3});
  Halide::Realization r(output_values);
  p.realize(r, target);

  for (int i = 0; i < 3; ++i) {
    for (int j = 0; j < 3; ++j) {
      for (int k = 0; k < 3; ++k) {
        for (int l = 0; l < 3; ++l) {
          float expected = in(0, k, 0);
          EXPECT_EQ(output_values(i, j, k, l), expected);
        }
      }
    }
  }

created time in 2 months

pull request commenthalide/Halide

Moved the bulk of the implementation of configure_pipeline_features() to

Removing all the #include "Errors.h" still result in missing symbols erros related to Halide::Internal::Introspection::get_source_locationabi:cxx11. It looks like this gets included from HalideBuffer.h. Most of the autoscheduler code depends one way or another on Halide internals, so even if I manage to remove the dependency of retrain_cost_model on libHalide.so the problem will reappear sooner or later.

benoitsteiner

comment created time in 2 months

pull request commenthalide/Halide

Moved the bulk of the implementation of configure_pipeline_features() to

It looks like this requires a fair amount of work to create a standalone library with basic utilities such as logging and error handling that can then be linked into various apps without having to pull in libHalide. The only other solution I can think of is to forego the Halide error handling code in the autoscheduler code and rewrite the code to either assert or throw exceptions whenever something bad happens.

benoitsteiner

comment created time in 2 months

Pull request review commenthalide/Halide

Moved the bulk of the implementation of configure_pipeline_features() to

 set_target_properties(retrain_cost_model_process target_include_directories(retrain_cost_model_process                            PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../support) target_link_libraries(retrain_cost_model_process-                      PRIVATE cost_model train_cost_model)+                      PRIVATE cost_model train_cost_model Halide)

Without the libHalide dependency, symbols corresponding to multiple methods of the Halide::Internal::Introspection and Halide::Internal::ErrorReport::ErrorReport classes are missing. I picked up the dependency through the #include "Error.h" in FunctionDAG.h. I'm guessing that the introspection dependency came through the added dependency on the Error class.

benoitsteiner

comment created time in 2 months

push eventbenoitsteiner/Halide

Benoit Steiner

commit sha 6db03b9a3029790f6e1852b0b5e7ffec18c4b945

Added a missing dependency to hte Makefile based builds

view details

push time in 2 months

push eventbenoitsteiner/Halide

Benoit Steiner

commit sha b2f938999b4a9de2827ea3391a0f5df99431bdfb

Added missing dependency

view details

push time in 2 months

push eventbenoitsteiner/Halide

Benoit Steiner

commit sha e916de51f0b17d717d9cc056d9fb8e87f77b6d10

Fixed compilation error in retrain_cost_model.cpp

view details

push time in 2 months

pull request commenthalide/Halide

Moved the bulk of the implementation of configure_pipeline_features() to

It looks like the command I used to validate the PR (make test) didn't trigger a full build. I'm at a conference this week, so I'm not sure I'll be able to make much progress towards fixing the errors, but I'll have time to get back to this PR next week.

benoitsteiner

comment created time in 2 months

push eventbenoitsteiner/Halide

push time in 2 months

PR closed halide/Halide

Reviewers
Improve the accuracy of the pipeline features for math functions

Instead of modeling tanh as an extern function call, count the number of primitive floating point operations required for an actual implementation of the function. This PR only applies this approach to tanh, but if it seems reasonable to the Halide maintainers I will apply it more broadly to other math functions in follow up PRs.

+33 -2

2 comments

2 changed files

benoitsteiner

pr closed time in 2 months

pull request commenthalide/Halide

Improve the accuracy of the pipeline features for math functions

Another issue is that my modeling of the tanh function is very different from the implementation of tanh provided by llvm, so it's not very accurate. I'll close this PR and try to come up with a better solution.

benoitsteiner

comment created time in 2 months

PR opened halide/Halide

Moved the bulk of the implementation of configure_pipeline_features() to

the DefaultCostModel class. This allows custom cost models more flexibility in modeling pipeline features.

+37 -33

0 comment

3 changed files

pr created time in 2 months

create barnchbenoitsteiner/Halide

branch : featurization

created branch time in 2 months

PR opened halide/Halide

Reviewers
Improve the accuracy of the pipeline features for math functions

Instead of modeling tanh as an extern function call, count the number of primitive floating point operations required for an actual implementation of the function. This PR only applies this approach to tanh, but if it seems reasonable to the Halide maintainers I will apply it more broadly to other math functions in follow up PRs.

+33 -2

0 comment

2 changed files

pr created time in 3 months

push eventbenoitsteiner/Halide

Benoit Steiner

commit sha e5f87a61748259fa83732a08d80e228efc3cf6ad

Improve the acuracy of the pipeline features for tanh: instead of modeling tanh as an extern function call, count the number of primitive floating point operations required for a reasonable implementation.

view details

push time in 3 months

push eventbenoitsteiner/Halide

Benoit Steiner

commit sha 8531e7ac167391aeee9abcb0a1f8e0e46361f379

Made sure the arguments of extern functions are of type Var instead of string immediates.

view details

Benoit Steiner

commit sha ffb4c71208dad4ac54ef9d68b632e521364ad011

Changed the api of Function::define_extern to take a vector of vars instead of a vector of strings

view details

Benoit Steiner

commit sha 7e148570e37e428ce6ad90ad13a69ed17d1e676d

Fixed indentation

view details

Steven Johnson

commit sha 2d274de0a6f84e244dc04e3fedb2110950ab5afd

Add HALIDE_MUST_USE_RESULT macro to HalideRuntime.h and AOT .h This is designed to make it easier to enforce examination of the result code of calls into Halide AOT code; by providing the HALIDE_MUST_USE_RESULT as part of the generated .h files, you can enable this by simply adding `-DHALIDE_FUNCTION_ATTRS=HALIDE_MUST_USE_RESULT` to your build options (rather than having to ensure that other dependencies ahead of other includes). This mimics the definition used by Abseil, in which the C++17 [[nodiscard]] attribute is preferred when available. (It's quite possible that HALIDE_MUST_USE_RESULT could be profitably applied to Halide APIs as well, both internal and external; I haven't attempted to look for candidates at this time.)

view details

Benoit Steiner

commit sha dba12cc6e356017f7d03802fbfef7f32f121e24e

Merge pull request #4447 from benoitsteiner/extern_funcs Fixed the types of the args of extern functions

view details

Steven Johnson

commit sha f667032916929f5d1b28908906e019116f0b609f

Merge pull request #4454 from halide/srj-mustuse Add HALIDE_MUST_USE_RESULT macro to HalideRuntime.h and AOT .h

view details

Steven Johnson

commit sha e54e45583fad6de997014ac5ee739b38806d39a7

Merge pull request #4452 from benoitsteiner/master Added a test to cover the featurization of reductions

view details

push time in 3 months

PR merged halide/Halide

Fixed the types of the args of extern functions

Made sure the arguments of extern functions are of type Var instead ofmstring immediates.

+15 -16

3 comments

3 changed files

benoitsteiner

pr closed time in 3 months

push eventhalide/Halide

Benoit Steiner

commit sha 8531e7ac167391aeee9abcb0a1f8e0e46361f379

Made sure the arguments of extern functions are of type Var instead of string immediates.

view details

Benoit Steiner

commit sha ffb4c71208dad4ac54ef9d68b632e521364ad011

Changed the api of Function::define_extern to take a vector of vars instead of a vector of strings

view details

Benoit Steiner

commit sha 7e148570e37e428ce6ad90ad13a69ed17d1e676d

Fixed indentation

view details

Benoit Steiner

commit sha dba12cc6e356017f7d03802fbfef7f32f121e24e

Merge pull request #4447 from benoitsteiner/extern_funcs Fixed the types of the args of extern functions

view details

push time in 3 months

Pull request review commenthalide/Halide

Added a test to cover the featurization of reductions

 int main(int argc, char **argv) {      // Disabled for now: there is still work to do to populate the jacobian     //assert(with_extern.str() == without_extern.str());+}++extern "C" int matmul(+    halide_buffer_t *input1,+    halide_buffer_t *input2,+    halide_buffer_t *output) {+

done

benoitsteiner

comment created time in 3 months

Pull request review commenthalide/Halide

Added a test to cover the featurization of reductions

 int main(int argc, char **argv) {      // Disabled for now: there is still work to do to populate the jacobian     //assert(with_extern.str() == without_extern.str());+}++extern "C" int matmul(+    halide_buffer_t *input1,+    halide_buffer_t *input2,+    halide_buffer_t *output) {++    if (input1->is_bounds_query() || input2->is_bounds_query()) {+        // Bounds query: infer the input dimensions from the output dimensions.+        // We leave the k dimension alone since we can't infer it from the output dimensions.+        input1->dim[0].min = output->dim[0].min;+        input1->dim[0].extent = output->dim[0].extent;+        input2->dim[1].min = output->dim[1].min;+        input2->dim[1].extent = output->dim[1].extent;+        return 0;+    }++    // Actual computation: return input1 * input2.+    const int max_i = output->dim[0].min + output->dim[0].extent;+    const int max_j = output->dim[1].min + output->dim[1].extent;+    for (int i = output->dim[0].min; i < max_i; ++i) {+        for (int j = output->dim[1].min; j < max_j; ++j) {+            int pos[2] = {i, j};+            float *out = (float *)output->address_of(pos);+            *out = 0.0f;+            for (int k = 0; k < input1->dim[1].extent; ++k) {+                int pos1[2] = {i, k};+                float *in1 = (float *)input1->address_of(pos1);+                int pos2[2] = {k, j};+                float *in2 = (float *)input2->address_of(pos2);+                //std::cout << "Adding " << *in1 << " * " << *in2 << std::endl;++                (*out) += (*in1) * (*in2);+            }+        }+    }+    return 0;+}++void test_matmul(const MachineParams &params, const Target &target) {+

done

benoitsteiner

comment created time in 3 months

Pull request review commenthalide/Halide

Added a test to cover the featurization of reductions

 int main(int argc, char **argv) {         std::vector<Var> vars = {x, y};         Halide::Type input_type = Halide::Float(32);         g.define_extern(-            "generate_output_vals",+            "mul_by_two",             {arg},             input_type,             vars,-            Halide::NameMangling::C);+            Halide::NameMangling::C /*PlusPlus*/);

It's a mistake, fixed :)

benoitsteiner

comment created time in 3 months

push eventbenoitsteiner/Halide

Benoit Steiner

commit sha eb83cc9d9da43cca7dc8fe880a765bc2fa607345

Code cleanup

view details

push time in 3 months

PR opened halide/Halide

Added a test to cover the featurization of reductions
+100 -7

0 comment

1 changed file

pr created time in 3 months

push eventbenoitsteiner/Halide

Benoit Steiner

commit sha cc2efdeed3c2cfeadf061760390bc9339aaac022

Added a test to cover the featurization of reductions

view details

push time in 3 months

push eventbenoitsteiner/Halide

Steven Johnson

commit sha e5fb9751f5a70573ac1cfd278ecd16d442b55b75

Fix lld::wasm::link() call for trunk LLVM

view details

Steven Johnson

commit sha 78dd6272a88b699c5cb4e05771bc030dd2853c71

Merge branch 'master' into srj-wasmlld

view details

Steven Johnson

commit sha acbdc372339cfe5124a61ac593f57ba229e8fbfd

Merge pull request #4426 from halide/srj-wasmlld Fix lld::wasm::link() call for trunk LLVM

view details

Steven Johnson

commit sha 6b6f76fe0bcf58018f003d11bc960be95901e038

Range -> int32 coercion

view details

Benoit Steiner

commit sha 2e902ee508ff618e4c5fd3f2488dda040187654f

Merge pull request #4428 from benoitsteiner/master Improved generation of Pipeline features for extern functions

view details

Steven Johnson

commit sha 7549e41b090dd63b73b972e2e5716b3f5d15d033

Merge pull request #4448 from halide/srj-range-i32 Range() requires Exprs to be losslessly convertible to int32

view details

push time in 3 months

push eventhalide/Halide

Benoit Steiner

commit sha 98f1e06b3d6709b6a8d2135ec744a6d0f7871cae

Added a test for FunctionDAG

view details

Benoit Steiner

commit sha 45df0ce1c332f58158336d5502c3ffef3f80043a

Use the proxy (if specified) to generate pipeline features for extern function calls

view details

Benoit Steiner

commit sha 9785f206f00d37645605a3979992665a3e7a7d2a

Improved code formatting

view details

Benoit Steiner

commit sha 7bde6ebc122ef5cc1b85b204f3a2480df8ba6c27

Added test_function_dag to the CMake file

view details

Benoit Steiner

commit sha 0825c7f417b9a64b42e87e8ff4414046e709202f

Fixed missing symbol issue

view details

Benoit Steiner

commit sha 21219e2c68b9f9f1cd8094daf1be79e9e039d08d

Deleted unecessary depedency

view details

Benoit Steiner

commit sha c69a9cd7a58b92e3f2264ec862033eb648ab4f4e

Added a test for FunctionDAG

view details

Benoit Steiner

commit sha e211d0fa47321cbc9e8364c7f75f4b09696b2d52

Use the proxy (if specified) to generate pipeline features for extern function calls

view details

Benoit Steiner

commit sha eb7bf82a3fd1d2f31ec45cde9fc33c2357de5ab1

Added test_function_dag to the CMake file

view details

Benoit Steiner

commit sha ceb03a22c52c040631174232fd0688cdab0aacf0

Added a test for FunctionDAG

view details

Benoit Steiner

commit sha 060650e22f105045432166cc5a933d04fc888313

Use the proxy (if specified) to generate pipeline features for extern function calls

view details

Benoit Steiner

commit sha 269acc72b7d63c6d30e117b54d0c1bcad4e5cbea

Added a test for FunctionDAG

view details

Benoit Steiner

commit sha 031afb4d2c7f9bd49b0539e1e92bb3c9b477ab69

Use the proxy (if specified) to generate pipeline features for extern function calls

view details

Benoit Steiner

commit sha feaef8666e1d48a7284a036738298b12aae59ea5

Fixed bad merge

view details

Benoit Steiner

commit sha 42482384d6c380e4a1de0fa3f214b1f9d2185d0b

Don't try to build the header files

view details

Benoit Steiner

commit sha fd69bd00984832af3f99c3ee98a1d32c6c369b83

Merge branch 'master' into master

view details

Benoit Steiner

commit sha 2e902ee508ff618e4c5fd3f2488dda040187654f

Merge pull request #4428 from benoitsteiner/master Improved generation of Pipeline features for extern functions

view details

push time in 3 months

more