question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allocate temp buffer for tensorize

See original GitHub issue

As the example below:

produce B {
  for (i, 0, 12) {
    B[i] = 0.000000f
    for (k.outer, 0, 16) {
      for (k.inner, 0, 4) {
        B[i] = (B[i] + A[((((i*16) + k.outer)*4) + k.inner)])
      }
    }
  }
}

The number of elements in vector instruction is fixed, like 4. If we want to tensorize the k.inner, we need to allocate a extra buffer to store the intermediate result, or else it would be overwritten. Here may be what we expect:

produce B {
  for (i, 0, 12) {
    B[i] = 0.000000f
    for (k.outer, 0, 16) {
      tmp = intrinsic("summation", A)
      B[i] = B[i] + tmp
    }
  }
}

So is there any way to allocate buffer for intermediate result?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
tqchencommented, Feb 2, 2018

I think we need an factor axis argument which indicate which axis we want to insert the factor dimension

0reactions
tqchencommented, Feb 3, 2018
Read more comments on GitHub >

github_iconTop Results From Across the Web

Allocate temp buffer for tensorize #851 - apache/tvm - GitHub
I tried to tensorize the k.inner and the k.outer.v, it failed. The reason is that rfactor move the rfactor_axis to first dimension, and...
Read more >
Use Tensorize to Leverage Hardware Intrinsics - Apache TVM
This is an introduction material on how to perform tensorization in TVM. ... "tir.noalias": True} buffers = {A: Buffer(A_2: Pointer(float32), float32, ...
Read more >
Allocate the memory buffer - IBM
Allocate the memory buffer. When your program selects simple-large-object data into memory, IBM® Informix® ESQL/C uses a memory buffer.
Read more >
Composable and Modular Code Generation in MLIR - arXiv
Temporary buffers may be allocated to ensure contiguous access patterns. “Computational payload” dialects such as.
Read more >
BoTorch · Bayesian Optimization in PyTorch
eta (float) – The temperature parameter of the softmax function. ... Both parameters and persistent buffers (e.g. running averages) are included.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found