Re: [apache/tvm-rfcs] [RFC] Scalable vectors in TIR (PR #104)

2023-10-10 Thread Krzysztof Parzyszek
> Is there any technical reason blocking us from extending DLDataType to have a > `is_scalable` vector field, allowing us to maintain the meaning of the lanes > field to represent the number of lanes? DLDataType comes from dlpack not TVM. Changing it may affect the ABI of any function acceptin

Re: [apache/tvm-rfcs] [RFC] Scalable vectors in TIR (PR #104)

2023-10-10 Thread Krzysztof Parzyszek
I guess we could pass an argument to the vectorizer whether to generate SVE-friendly code. If this is limited to emitting additional TIR builtins, then I'm ok with that. I just want to be able to reuse as much of the vectorization code as possible between SVE and non-SVE targets. As far as pr

Re: [apache/tvm-rfcs] [RFC] Scalable vectors in TIR (PR #104)

2023-10-06 Thread Krzysztof Parzyszek
> Could it instead be in a target-dependent lowering pass? Sure. My idea is to have a single SVE-aware vectorization pass in TVM, and then be able to utilize it for all targets. I'm particularly interested in predication. How the codegen is done doesn't matter much. -- Reply to this email d

Re: [apache/tvm-rfcs] [RFC] Scalable vectors in TIR (PR #104)

2023-10-06 Thread Krzysztof Parzyszek
Sorry for the delay... What I'm aiming at is to be able to lower the TIR to a generic CPU, that is to an architecture that does not support SVE. The TIR will need to have some default lowering in CodeGenLLVM/CodeGenCPU, so being able to do that is important. For that, we should be able to ass

Re: [apache/tvm-rfcs] [RFC] Scalable vectors in TIR (PR #104)

2023-09-04 Thread Krzysztof Parzyszek
Thanks for bringing this up again. A few suggestions to make it more general: 1. Add a parameter to `tir.vscale` to state the minimal assumed vector length. For AArch64 SVE it will be 128 (bits), but some other non-SVE architecture can provide a different value (via a target hook, or something

[Apache TVM Discuss] [Development] Is `T.axis.remap` mandatory?

2023-06-27 Thread Krzysztof Parzyszek via Apache TVM Discuss
Say we have ``` for y, x in T.grid(10, 10): with T.block("block"): B[y, x] = A[y, x] + 1 ``` Is there any advantage to adding axis remap if we have 1-1 correspondence with existing variables? ``` for y, x in T.grid(10, 10): with T.block("block"): v_y, v_x = T.axis.remap(

Re: [apache/tvm] [Hexagon]Call Acquire/Release resources API in Hexagon Launcher durin… (PR #13495)

2022-11-28 Thread Krzysztof Parzyszek
Merged #13495 into main. -- Reply to this email directly or view it on GitHub: https://github.com/apache/tvm/pull/13495#event-7903034464 You are receiving this because you are subscribed to this thread. Message ID:

Re: [apache/tvm] [VOTE] Commit Messages RFC (Issue #12583)

2022-08-30 Thread Krzysztof Parzyszek
0 -- Reply to this email directly or view it on GitHub: https://github.com/apache/tvm/issues/12583#issuecomment-1231775741 You are receiving this because you are subscribed to this thread. Message ID:

Re: [apache/tvm-rfcs] [RFC] Create LLVM scope class for use with LLVM libraries (PR #83)

2022-07-15 Thread Krzysztof Parzyszek
Should we still wait for review from Junru? -- Reply to this email directly or view it on GitHub: https://github.com/apache/tvm-rfcs/pull/83#issuecomment-1185759039 You are receiving this because you are subscribed to this thread. Message ID:

Re: [apache/tvm-rfcs] Add Target Pre-processing RFC (PR #71)

2022-07-15 Thread Krzysztof Parzyszek
> @kparzysz-quic, sorry, I'm still not understanding here - the name of the > kind is enough to look it up in the kind registry and gather any > kind-specific information. What further details are missing? I thought the attrs were stored in the kind, but they are in the target itself. Nevermin

Re: [apache/tvm-rfcs] Add Target Pre-processing RFC (PR #71)

2022-07-15 Thread Krzysztof Parzyszek
```C++ Map TargetNode::Export() const { Map result = { {"kind", this->kind->name},< {"tag", this->tag}, {"keys", this->keys}, }; if (this->host.defined()) { result.Set("host", this->GetHost().value_or(Target())->Export()); } for (c

Re: [apache/tvm-rfcs] Add Target Features RFC (PR #78)

2022-07-15 Thread Krzysztof Parzyszek
If we add another member to `Target`, how will this interact with the [target parser proposal](https://github.com/apache/tvm-rfcs/pull/71)? -- Reply to this email directly or view it on GitHub: https://github.com/apache/tvm-rfcs/pull/78#issuecomment-1185653525 You are receiving this because you

Re: [apache/tvm-rfcs] Add Target Pre-processing RFC (PR #71)

2022-07-15 Thread Krzysztof Parzyszek
Actually, the target JSON only shows the name of the kind, so the target parser (if it operates on the JSON) won't see the details of the kind, unless they are included in the JSON. I think that expanding the contents of the target JSON to contain the kind specifics as well is critical for this

Re: [apache/tvm-rfcs] [RFC] Create LLVM scope class for use with LLVM libraries (PR #83)

2022-07-13 Thread Krzysztof Parzyszek
I updated the text of the RFC, the rendered link above, and the [prototype draft PR](https://github.com/apache/tvm/pull/11933). -- Reply to this email directly or view it on GitHub: https://github.com/apache/tvm-rfcs/pull/83#issuecomment-1183772746 You are receiving this because you are subscrib

Re: [apache/tvm-rfcs] [RFC] Create LLVM scope class for use with LLVM libraries (PR #83)

2022-07-11 Thread Krzysztof Parzyszek
It does, yes: https://github.com/llvm/llvm-project/blob/main/llvm/lib/Bitcode/Reader/BitcodeReader.cpp#L91-L99 The flags above come from the latest development branch, so in order to handle all LLVM versions we'd need to check all of them since 4.0 (which I'm ok doing), and we will need to keep

Re: [apache/tvm-rfcs] [RFC] Create LLVM scope class for use with LLVM libraries (PR #83)

2022-07-11 Thread Krzysztof Parzyszek
> > The reason is that ParseIR needs to make calls to LLVM functions to create > > the llvm::Module. > > I get this part, my main question is whether we can initializeLLVM in the > Target constructor but do option resetting in enter/exit, i could miss > something here. I see what you mean. My

Re: [apache/tvm-rfcs] [RFC] Create LLVM scope class for use with LLVM libraries (PR #83)

2022-07-08 Thread Krzysztof Parzyszek
> Just to followup, why does ParseIR require activation of a scope, or is it > possible that ParseIR returns a tuple of Target and Module, where activation > is done separately. The reason is that `ParseIR` needs to make calls to LLVM functions to create the `llvm::Module`. -- Reply to this

Re: [apache/tvm-rfcs] [RFC] Create LLVM scope class for use with LLVM libraries (PR #83)

2022-07-08 Thread Krzysztof Parzyszek
To address the second question: we shouldn't allow nesting of LLVM scopes. The reason is that if the target doesn't specify any command line flags, the assumption is that it will rely on LLVM's defaults. If we were to nest scopes, and the outer scope did modify flags, then the inner scope (wit

Re: [apache/tvm-rfcs] [RFC] Create LLVM scope class for use with LLVM libraries (PR #83)

2022-07-08 Thread Krzysztof Parzyszek
Both `LoadIR` or `ParseIR` take an optional pre-existing `LLVMContext`, and return a pair `{llvm::Module, LLVMScope}`, where the scope object in the pair is newly constructed, and contains the given `LLVMContext` (or create a new one if none was given). In the first call to `ParseIR`, the calle

Re: [apache/tvm-rfcs] [RFC] Encapsulate LLVM target for use with LLVM libraries (PR #83)

2022-07-06 Thread Krzysztof Parzyszek
@tqchen @junrushao1994 Do you have any additional comments? -- Reply to this email directly or view it on GitHub: https://github.com/apache/tvm-rfcs/pull/83#issuecomment-1176373905 You are receiving this because you are subscribed to this thread. Message ID:

Re: [apache/tvm-rfcs] [RFC] Encapsulate LLVM target for use with LLVM libraries (PR #83)

2022-07-05 Thread Krzysztof Parzyszek
> my one question, which i think is mainly open-ended now, is how we handle > LLVM arch that have unique flags that, right now, would show up in TVM as > target-specific llvm flags. I'd have to see a practical example of that to get an idea of what's expected. For Hexagon we'd want to automati

Re: [apache/tvm-rfcs] [RFC] Adding initial SVE implementation (#18)

2022-07-05 Thread Krzysztof Parzyszek
> Hi~ here are my two questions :) cc @kparzysz-quic > What is the different between > > * `sch[C].vectorize(v, vector_length=32)` and > * `vo, vi = sch[C].split(v, 32)` then `sch[C].vectorize(vi)` > > It seems that we could also choose to properly lower the sp

Re: [apache/tvm-rfcs] [RFC] Adding initial SVE implementation (#18)

2022-07-01 Thread Krzysztof Parzyszek
To reiterate---my original concern was that the first RFC was proposing changes to target-independent part of TVM to add support for a very target-specific feature. However, I do think that we can move this forward in way that would be overall useful. Here is the outline of my thoughts on this

Re: [apache/tvm-rfcs] [RFC] Name mangling in IRModules (PR #84)

2022-07-01 Thread Krzysztof Parzyszek
`IRModule` already has functions to create new globals. With the name-generating `NameSupply` added to the module, these functions could use that implicitly. -- Reply to this email directly or view it on GitHub: https://github.com/apache/tvm-rfcs/pull/84#issuecomment-1172379948 You are receivi

Re: [apache/tvm-rfcs] [RFC] Name mangling in IRModules (PR #84)

2022-06-30 Thread Krzysztof Parzyszek
A couple of thoughts... - We should have a common facility that represents a scope in which names need to be unique. Conceptually it could be a set of "known" strings (that are presumed used), and something (like a private counter) to generate a unique suffix. The use would be `new_name = Gen

Re: [apache/tvm-rfcs] [RFC] Encapsulate LLVM target for use with LLVM libraries (PR #83)

2022-06-27 Thread Krzysztof Parzyszek
[Rendered](https://github.com/apache/tvm-rfcs/blob/aba8fa123cd0de1e3a8d752f0b55741aa674a1b0/rfcs/0080-llvm-target.md) -- Reply to this email directly or view it on GitHub: https://github.com/apache/tvm-rfcs/pull/83#issuecomment-1167976257 You are receiving this because you are subscribed to this

[apache/tvm-rfcs] [RFC] Encapsulate LLVM target for use with LLVM libraries (PR #83)

2022-06-27 Thread Krzysztof Parzyszek
You can view, comment on, or merge this pull request online at: https://github.com/apache/tvm-rfcs/pull/83 -- Commit Summary -- * [RFC] Encapsulate LLVM target for use with LLVM libraries -- File Changes -- A rfcs/0080-llvm-target.md (174) -- Patch Links -- https://github.com/apache

[Apache TVM Discuss] [Development/pre-RFC] Introducing Hexagon backend

2022-06-20 Thread Krzysztof Parzyszek via Apache TVM Discuss
It is supported in the sense that you should be able to compile and execute any model. There is still a lot of work we need to do to make it perform well. Right now we're working on many infrastructural changes in TVM, and the actual code generated for Hexagon is still far from optimal.

[Apache TVM Discuss] [Development/pre-RFC] Modularizing LLVM codegen/JIT

2022-06-07 Thread Krzysztof Parzyszek via Apache TVM Discuss
I'm working on a prototype now. I want to iron out any additional issues before we go on to discuss more details. --- [Visit Topic](https://discuss.tvm.apache.org/t/modularizing-llvm-codegen-jit/12764/38) to respond. You are receiving this because you enabled mailing list mode. To unsu

Re: [apache/tvm-rfcs] Add Target Pre-processing RFC (PR #71)

2022-05-12 Thread Krzysztof Parzyszek
I think it's a good idea overall. I'm in favor of adding more internal flexibility to targets. -- Reply to this email directly or view it on GitHub: https://github.com/apache/tvm-rfcs/pull/71#issuecomment-1125416129 You are receiving this because you are subscribed to this thread. Message ID:

[Apache TVM Discuss] [Development] AttributeError: 'Module' object has no attribute 'GetFunction'

2022-03-18 Thread Krzysztof Parzyszek via Apache TVM Discuss
Try `mods.get_function(...)` instead. --- [Visit Topic](https://discuss.tvm.apache.org/t/attributeerror-module-object-has-no-attribute-getfunction/12337/2) to respond. You are receiving this because you enabled mailing list mode. To unsubscribe from these emails, [click here](https://di

[Apache TVM Discuss] [Development] Should we delete NNVM?

2022-03-16 Thread Krzysztof Parzyszek via Apache TVM Discuss
It's been deprecated a long time ago. Is it still maintained? If not, I suggest that we delete it. --- [Visit Topic](https://discuss.tvm.apache.org/t/should-we-delete-nnvm/12330/1) to respond. You are receiving this because you enabled mailing list mode. To unsubscribe from these email

Re: [apache/tvm] [VOTE] Replace codeowners with more relevant automation (Issue #10471)

2022-03-03 Thread Krzysztof Parzyszek
I'm not particularly unhappy with the current situation, but it could be improved. +1 -- Reply to this email directly or view it on GitHub: https://github.com/apache/tvm/issues/10471#issuecomment-1058659652 You are receiving this because you are subscribed to this thread. Message ID:

[Apache TVM Discuss] [Development/pre-RFC] [RFC] Allow merging via PR comments

2022-03-03 Thread Krzysztof Parzyszek via Apache TVM Discuss
I think this is a good idea. In my opinion it would be authors' responsibility not to abuse the new ability: the merge directive should be added only once the PR has reached an agreement. That is a subjective judgment, but it would be hard to codify it. One question---what should happen if

[Apache TVM Discuss] [Development] Problem with FuseOps (and embedded constants in TIR)

2022-02-25 Thread Krzysztof Parzyszek via Apache TVM Discuss
Sure, I replied in the [PR](https://github.com/apache/tvm/pull/8509). --- [Visit Topic](https://discuss.tvm.apache.org/t/problem-with-fuseops-and-embedded-constants-in-tir/12165/8) to respond. You are receiving this because you enabled mailing list mode. To unsubscribe from these emails,

[Apache TVM Discuss] [Development] Problem with FuseOps (and embedded constants in TIR)

2022-02-25 Thread Krzysztof Parzyszek via Apache TVM Discuss
We were hitting this assertion: https://github.com/apache/tvm/blob/main/src/relay/backend/te_compiler_cache.cc#L242 We do have a unit testcase that checks the LLVM IR to see if the _linked_param function was generated, but I'm not sure if it runs in CI right now, since it requires Hexagon targ

[Apache TVM Discuss] [Development] Problem with FuseOps (and embedded constants in TIR)

2022-02-24 Thread Krzysztof Parzyszek via Apache TVM Discuss
Long story short, after https://github.com/apache/tvm/pull/8509 we see a lot of floating point models crash during compilation for Hexagon. On Hexagon (downstream) we use the mixed-precision pass to convert float32 data to float16. Float16 constants are not supported by constants in TIR and

[Apache TVM Discuss] [Development] Pillow < 9.0.0 security vulnerabilities

2022-02-11 Thread Krzysztof Parzyszek via Apache TVM Discuss
There are 3 security vulnerabilities in Pillow < 9.0.0. They are all considered critical. 1. [CVE-2022-22815](https://nvd.nist.gov/vuln/detail/CVE-2022-22815) 2. [CVE-2022-22816](https://nvd.nist.gov/vuln/detail/CVE-2022-22816) 3. [CVE-2022-22817](https://nvd.nist.gov/vuln/detail/CVE-2022-2281

Re: [apache/tvm-rfcs] [RFC] Adding initial SVE implementation (#18)

2021-10-11 Thread Krzysztof Parzyszek
Right, but users of DLPack will not see `DataType`, only `DLDataType`, unless they use TVM as well. Changing `DataType` will only affect those that use `include/tvm/runtime/data_type.h` (i.e. the ABI breakage will be limited to users of TVM). -- You are receiving this because you are subscrib

Re: [apache/tvm-rfcs] [RFC] Adding initial SVE implementation (#18)

2021-10-11 Thread Krzysztof Parzyszek
> DataType and DLDataType are part of DLPack standard, The `DataType` type is defined in TVM, it's not present in DLPack. Or am I missing something? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/apache

Re: [apache/tvm-rfcs] [RFC][TIR] Separate physical and logical layout of buffers (#39)

2021-10-06 Thread Krzysztof Parzyszek
How will vectorization work? If there is a `vectorize` directive spanning a logical extent, will the vectorization pass create multidimensional `ramp`s? How will vector loads and stores be represented? -- You are receiving this because you are subscribed to this thread. Reply to this email di

Re: [apache/tvm] [Release] v0.8 Release Planning (#8976)

2021-09-14 Thread Krzysztof Parzyszek
Hexagon support still needs more work. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/apache/tvm/issues/8976#issuecomment-919449057

Re: [apache/tvm] [VOTE] Adopt New Code Review Guideline (#8928)

2021-09-09 Thread Krzysztof Parzyszek
+1 -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/apache/tvm/issues/8928#issuecomment-916143196

[Apache TVM Discuss] [Development] Handling of `prefetch` (legalization/lowering)

2021-08-05 Thread Krzysztof Parzyszek via Apache TVM Discuss
Currently a `PrefetchNode` is replaced with a loop nest doing single cache line prefetches, and that's done in the storage flattener. This is bad for Hexagon, because Hexagon has a prefetch engine which can prefetch a 2D buffer in the background, but it requires a different setup. Once the l

[Apache TVM Discuss] [Development] Is there a difference between "lower" and "legalize" in TIR?

2021-08-05 Thread Krzysztof Parzyszek via Apache TVM Discuss
The goal is to rewrite the TIR into a way that the target's codegen can handle. Rewriting `exp` into `llvm.exp` can be seen as legalization too. There can be targets that can generate code directly for `exp`. In fact, the translation from `exp` to `llvm.exp` is only there for convenience (au

[Apache TVM Discuss] [Development] Is there a difference between "lower" and "legalize" in TIR?

2021-08-05 Thread Krzysztof Parzyszek via Apache TVM Discuss
Why would an op have both? This is still the question that hasn't been answered. What was the intent behind having "lowering" and "legalization" as different things? --- [Visit Topic](https://discuss.tvm.apache.org/t/is-there-a-difference-between-lower-and-legalize-in-tir/10714/8) to r

[Apache TVM Discuss] [Development/pre-RFC] New Target Intrinsic Lowering and Legalization Mechanism

2021-08-05 Thread Krzysztof Parzyszek via Apache TVM Discuss
We should have a way of legalizing builtins/intrinsics that can involve creating new statements. Not every builtin may be replaceable with an expression. Has anybody thought about doing that? --- [Visit Topic](https://discuss.tvm.apache.org/t/new-target-intrinsic-lowering-and-legalizati

[Apache TVM Discuss] [Development] Is there a difference between "lower" and "legalize" in TIR?

2021-08-05 Thread Krzysztof Parzyszek via Apache TVM Discuss
>From what I've seen so far there is no difference at all, conceptual or not. >We should stick to one and get rid of the other. Both operate on the same TIR >representation. In one case the TIR expression is replaced by another >function call, in the other the resulting expression is more c

[Apache TVM Discuss] [Development] Is there a difference between "lower" and "legalize" in TIR?

2021-08-05 Thread Krzysztof Parzyszek via Apache TVM Discuss
Intrinsics and ops are represented in the same way in TIR though. What is the intended behavior of "legalization" that is different from "lowering"? --- [Visit Topic](https://discuss.tvm.apache.org/t/is-there-a-difference-between-lower-and-legalize-in-tir/10714/3) to respond. You are re

[Apache TVM Discuss] [Development/pre-RFC] New Target Intrinsic Lowering and Legalization Mechanism

2021-08-05 Thread Krzysztof Parzyszek via Apache TVM Discuss
Just found this thread. [What's the intended difference between lowering and legalization?](https://discuss.tvm.apache.org/t/is-there-a-difference-between-lower-and-legalize-in-tir/10714/2) --- [Visit Topic](https://discuss.tvm.apache.org/t/new-target-intrinsic-lowering-and-legalization-m

[Apache TVM Discuss] [Development] Is there a difference between "lower" and "legalize" in TIR?

2021-08-05 Thread Krzysztof Parzyszek via Apache TVM Discuss
Both, `FLowerIntrinsic` and `FLegalize` are the same type, and they are handled in a pretty much the same way. Is one of them being phased out? --- [Visit Topic](https://discuss.tvm.apache.org/t/is-there-a-difference-between-lower-and-legalize-in-tir/10714/1) to respond. You are receivi

[Apache TVM Discuss] [Development] Why is PrimFunc.buffer_map cleared in MakePackedAPI

2021-07-29 Thread Krzysztof Parzyszek via Apache TVM Discuss
There is a benefit of having the association between a `Var` and the corresponding `Buffer` throughout the optimizations, including codegen. `Buffer` is not a `PrimExpr`, so it cannot be passed around directly, but it contains a lot of useful information (such as shape etc.). If we had the

[Apache TVM Discuss] [Development/RFC] Implementing AOT in TVM

2021-04-15 Thread Krzysztof Parzyszek via Apache TVM Discuss
[quote="giuseros, post:29, topic:9206"] >From what I understand @kparzysz you are saying that the internal functions >don’t matter (they will be static private functions) but that the runner >function should have this signature. Can I ask you why? [/quote] The reason is that this is the signat

[Apache TVM Discuss] [Development] CI is still failing in "docs"

2020-10-23 Thread Krzysztof Parzyszek via Apache TVM Discuss
Freshly rebased PR, that has nothing to do with docs: https://ci.tlcpack.ai/blue/organizations/jenkins/tvm/detail/PR-6738/2/pipeline/321 Please fix this. --- [Visit Topic](https://discuss.tvm.apache.org/t/ci-is-still-failing-in-docs/8266/1) to respond. You are receiving this because you

[Apache TVM Discuss] [Development] Pointer type checking on buffer var breaks buffer type casting

2020-10-22 Thread Krzysztof Parzyszek via Apache TVM Discuss
We are catching up on upstream development in our local repo, and we ran into an issue: pointer annotation on buffer variables blocks buffer type casting. See https://discuss.tvm.apache.org/t/type-casting-a-buffer/4035 for more details. In short, given a buffer of one data type, we want to

[TVM Discuss] [Development/RFC] [RFC] Using arm intrinsics to implement fixed point multiplication in TVM

2020-07-01 Thread Krzysztof Parzyszek via TVM Discuss
If it's only available as a topi operator then you couldn't use it in a `compute`. This is a scalar function, an arithmetic operation of a certain kind. We have plenty of math intrinsics in TIR already, so this isn't a precedent. You can have a topi operator for it, but it should be usable

[TVM Discuss] [Development/RFC] [RFC] Using arm intrinsics to implement fixed point multiplication in TVM

2020-07-01 Thread Krzysztof Parzyszek via TVM Discuss
I'm in favor of the intrinsic. Pattern matching of code (idiom recognition) is generally a pain. If we go that route, we should define it in such a way that the two values to multiply are interchangeable, i.e. `fpm(x, y, s)` is same as `fpm(y, x, s)`, i.e. the `x` and `y` are values to multi

[TVM Discuss] [Development] Tensor arrays in TIR

2020-06-30 Thread Krzysztof Parzyszek via TVM Discuss
What relay expands to is memory copy. I want to avoid that. I want to have a copy-less representation in TIR. This should really be a no-op, but ends up copying everything. ``` import tensorflow as tf import tvm import tvm.relay g = tf.Graph() with g.as_default(): u = tf.unstack(tf.placeh

[TVM Discuss] [Development] Tensor arrays in TIR

2020-06-30 Thread Krzysztof Parzyszek via TVM Discuss
Is there any effort to support tensor arrays in TIR? That would be something to represent operations like `stack` or `unstack` from TF. Let's say we want to write an op that does a concatenation of a variable number of tensors, but without actually copying any data. Instead, it would create

[TVM Discuss] [Development/RFC] [RFC] TVM Target Specification

2020-06-04 Thread Krzysztof Parzyszek via TVM Discuss
I guess that's ok. Let's see how it works and we can refine it later if needed. --- [Visit Topic](https://discuss.tvm.ai/t/rfc-tvm-target-specification/6844/33) to respond. You are receiving this because you enabled mailing list mode. To unsubscribe from these emails, [click here](https

[TVM Discuss] [Development/RFC] [RFC] TVM Target Specification

2020-06-04 Thread Krzysztof Parzyszek via TVM Discuss
Going back to the `target_host` question. Another argument against is that a specific device can be present in different systems with different host processors. This would necessitate having different targets for the same device, if `target_host` is a part of the target description. I don't

[TVM Discuss] [Development/RFC] [RFC] TVM Target Specification

2020-06-04 Thread Krzysztof Parzyszek via TVM Discuss
[quote="tqchen, post:28, topic:6844"] Another way to think about it is that llvm itself is a target, and we happened to have a JIT engine locally for that target. [/quote] This is precisely the point of view that I strongly disagree with. The code that runs is not LLVM IR, it must be compiled

[TVM Discuss] [Development/RFC] [RFC] TVM Target Specification

2020-06-04 Thread Krzysztof Parzyszek via TVM Discuss
The question is "what do we want the target to guarantee?". If we want "llvm" to include both CPU and JIT, then it should always mean that both features are present. Whether the target is local or not is a feature of the runtime environment and not the compiler. On that note, I think we sho

[TVM Discuss] [Development/RFC] [RFC] TVM Target Specification

2020-06-04 Thread Krzysztof Parzyszek via TVM Discuss
Another thought is that we should **remove "llvm" as a target**. Right now target = "llvm" means "cpu", but it also means "jit". We should replace it with something that has a clear meaning, and should be independent of whether the LLVM framework is used to generate code for it or not.

[TVM Discuss] [Development/RFC] [RFC] TVM Target Specification

2020-06-03 Thread Krzysztof Parzyszek via TVM Discuss
In such case we can have ``` GPU_target = [ id: "cuda" ]// non-composite, no target_host System_target = [ id: "cuda", id: "cpu" ] // composite optimize(E1, GPU_target) // func, target set> S = legalize(E1, System_target) for s in S: low_level_optimize(s.first

[TVM Discuss] [Development/RFC] [RFC] TVM Target Specification

2020-06-03 Thread Krzysztof Parzyszek via TVM Discuss
If it's possible that the entire E1 can be compiled for a single device then it makes sense to treat it as device code. In such case, moving `alloc` to the host could be treated as an "optimization" that is specific to this target. However, if E1 has a non-composite target, how would that op

[TVM Discuss] [Development/RFC] [RFC] TVM Target Specification

2020-06-03 Thread Krzysztof Parzyszek via TVM Discuss
I'm not opposed to composite targets, I'm arguing that the way we handle composite targets should not depend on what targets are members of the composite target. Whether it's "CPU+GPU" or "CPU+GPU+DSP", the logic of the analysis should be the same. The decisions it makes can be different, o

[TVM Discuss] [Development/RFC] [RFC] TVM Target Specification

2020-06-03 Thread Krzysztof Parzyszek via TVM Discuss
V0 is not really well defined. Consider some hardware that has both a GPU, and a DSP (as well as some host CPU). If you write a program for this system, is it a GPU program, or a DSP program? What target will TOPI assume for the operators in this program? When you consider an example for

[TVM Discuss] [Development/RFC] [RFC] TVM Target Specification

2020-06-02 Thread Krzysztof Parzyszek via TVM Discuss
**Scope of a Target**: Why do linker options belong to runtime configuration? Linking is a step in the module creation process, and it does affect the contents of the module. Are there any implicit assumption made about modules? **Composite Target**: From the point of view of modularity, hav

[TVM Discuss] [Development/RFC] [CI][LINT] Enabling clang-format based lint checks

2020-04-30 Thread Krzysztof Parzyszek via TVM Discuss
Would clang-format replace cpplint, or would we have both? --- [Visit Topic](https://discuss.tvm.ai/t/ci-lint-enabling-clang-format-based-lint-checks/6170/9) to respond. You are receiving this because you enabled mailing list mode. To unsubscribe from these emails, [click here](https://

[TVM Discuss] [Development/RFC] Target and Attributes

2020-04-24 Thread Krzysztof Parzyszek via TVM Discuss
I'm a bit late to this, but here are my thoughts: The hardware string shouldn't be the only way to define target, it should be a convenient shortcut of a more complex definition. I think that's what **S0** does---we can maintain a mapping from a set of predefined hardware "keywords" into an

[TVM Discuss] [Development/RFC] Allow non-nullable Object and Introduce Optional

2020-04-13 Thread Krzysztof Parzyszek via TVM Discuss
Is it going to be compatible with `std::optional` from C++17? It would be nice to just switch to the `std` version, once we start using C++17. --- [Visit Topic](https://discuss.tvm.ai/t/allow-non-nullable-object-and-introduce-optional-t/6337/7) to respond. You are receiving this because

[TVM Discuss] [Development] Spurious CI failures

2020-04-09 Thread Krzysztof Parzyszek via TVM Discuss
A number of PRs fail in the same place (Unit Tests, python:i386), seemingly unrelated to the PR itself. This is blocking these PRs. Is someone investigating this? The end of the failing log: ``` In file included from runtime.c:65:0: ../../src/runtime/crt/ndarray.c: In function 'TVMNDArray_Lo

[TVM Discuss] [Development/RFC] Introducing Hexagon backend

2020-04-06 Thread Krzysztof Parzyszek via TVM Discuss
We're back. https://github.com/apache/incubator-tvm/pull/5252 --- [Visit Topic](https://discuss.tvm.ai/t/introducing-hexagon-backend/2421/31) to respond. You are receiving this because you enabled mailing list mode. To unsubscribe from these emails, [click here](https://discuss.tvm.ai/e

Re: [apache/incubator-tvm] [VOTE] VTA HW/SW refactor (#5102)

2020-03-19 Thread Krzysztof Parzyszek
+1 -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/apache/incubator-tvm/issues/5102#issuecomment-601388834

Re: [dmlc/tvm] [DEV] TVM v0.6 Roadmap (#2623)

2019-07-17 Thread Krzysztof Parzyszek
What is the planned release date for 0.6? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/dmlc/tvm/issues/2623#issuecomment-512574087

[TVM Discuss] [RFC] Introducing Hexagon backend

2019-07-02 Thread Krzysztof Parzyszek via TVM Discuss
The special runtimes are mostly for offloading to extra devices from host. ARM and X86 are usually the hosts, so the runtime for them is fairly simple. It's still there, look at cpu_device_api.cc for example. --- [Visit Topic](https://discuss.tvm.ai/t/introducing-hexagon-backend/2421/18)