[Apache TVM Discuss] [Application] Irrespective of input same output iOS TVM model

2021-08-16 Thread mallappa s via Apache TVM Discuss
* Yes, it is W*H*C*4. * And my understanding is we can't directly access GPU memory so i copied all my input data to CPU memory and then copied to GPU memory please excuse me if my understanding was wrong. --- [Visit Topic](https://discuss.tvm.apache.org/t/irrespective-of-input-same-outpu

[Apache TVM Discuss] [Questions] Can't build module after applying pass MakePackedAPI

2021-08-16 Thread Sen Yang via Apache TVM Discuss
Hello, I am studying tir and tir pass recently. And I found after I applying pass `MakePackedAPI`, the function `tvm.build` will throw an error: ``` TVMError: --- An error occurred during the execution of TVM. For more information, ple

[Apache TVM Discuss] [Questions] Finding types of TVM objects and accessing their attributes in GDB

2021-08-16 Thread Anirudh via Apache TVM Discuss
Hi all, Just a generic question about debugging in GDB. Is there a good way to find the proper type of an `"object"` in GDB? What I mean by that is, say there is an `AddNode` passed to a function as a `PrimExpr` and while debugging this function, is there way to find that it actually belongs

[Apache TVM Discuss] [Application] Irrespective of input same output iOS TVM model

2021-08-16 Thread Andrey Malyshev via Apache TVM Discuss
[quote="myproject24, post:7, topic:10765"] `w*h*c` [/quote] missing of `*4` - is it a problem of copy-past you forgot to compensate the size of the float? since TVMArrayCopyFromBytes deal with bytes, not floats. Another question why do you need m_gpuInput? you can use only NDArray been alloca

[Apache TVM Discuss] [Questions] How can i get the outputs info through mod

2021-08-16 Thread deng via Apache TVM Discuss
how can i get the outputs info from mod? we can get mode and params by calling from_onnx and from_caffe, as well as the multiple outputs information corresponding to the mod. but if we call the FoldConstant, the mod changes , how can i get the outputs info through the new mod? is there a inte

[Apache TVM Discuss] [Questions] Program suspend

2021-08-16 Thread Yiguan Liao via Apache TVM Discuss
When I build the onnx model, I performed the following optimizations: with tvm.transform.PassContext(opt_level=3): lib = relay.build_module.build(mod, target=target, params=params) But after the program is executed to a certain position, there is no output change in the termi

[Apache TVM Discuss] [Questions] How to efficiently copy an IR

2021-08-16 Thread Junru Shao via Apache TVM Discuss
IIRC we made some immutability assumptions here that the passes won't modify the original `IRModule`. We did find some bugs in the codebase previously the module is incorrectly modified though :-( --- [Visit Topic](https://discuss.tvm.apache.org/t/how-to-efficiently-copy-an-ir/10798/5) t

[Apache TVM Discuss] [Application] Irrespective of input same output iOS TVM model

2021-08-16 Thread mallappa s via Apache TVM Discuss
//data is float* TVMArrayCopyFromBytes(m_cpuInput, data, w*h*c); TVMArrayCopyFromTo(m_cpuInput, m_gpuInput, nullptr); set_input("INPUT", m_gpuInput); get_output(0, m_gpuOutput0); TVMArrayCopyFromTo(m_gpuOutput0, m_cpuOutput0, nullptr); --- [Visit Topic](https://dis

[Apache TVM Discuss] [Application] Irrespective of input same output iOS TVM model

2021-08-16 Thread Andrey Malyshev via Apache TVM Discuss
[quote="myproject24, post:5, topic:10765"] m_gpuInput is in metal context **kDLMetal** [/quote] How do you populate data to this NDArray? --- [Visit Topic](https://discuss.tvm.apache.org/t/irrespective-of-input-same-output-ios-tvm-model/10765/6) to respond. You are receiving this because

[Apache TVM Discuss] [Questions] How to efficiently copy an IR

2021-08-16 Thread Jiawei Liu via Apache TVM Discuss
This case seems to occur when we apply the basic block form pass. Other passes, e.g., `FuseOps` will not result in such results. So I am wondering if it is expected to modify the input argument (old module) by some passes. --- [Visit Topic](https://discuss.tvm.apache.org/t/how-to-efficien

[Apache TVM Discuss] [Questions] How to efficiently copy an IR

2021-08-16 Thread Jiawei Liu via Apache TVM Discuss
@junrushao1994 Thank you Junru! It did become faster! ![image|690x98](upload://47qAvirVT5ML7lD4zlOheGXxLA8.png) Another related question is: will passes alter the original module (i mean if `mod` will be modified after applying `new_mod = pass(mod)`). It seems this is the case and I have to

[Apache TVM Discuss] [Application] Irrespective of input same output iOS TVM model

2021-08-16 Thread mallappa s via Apache TVM Discuss
m_gpuInput is in metal context **kDLMetal** and I bundled JSON, Params, and dylib separately with the application I feel it is more convenient to understand if any issue. --- [Visit Topic](https://discuss.tvm.apache.org/t/irrespective-of-input-same-output-ios-tvm-model/10765/5) to respon

[Apache TVM Discuss] [Questions] Add Evaluators to Debug Executor

2021-08-16 Thread Max Sponner via Apache TVM Discuss
I did not encounter this problem What does your config.cmake file look like? especially the PAPI line? Does PAPI work, if you run the tests or the binaries like `papi_native_avail`? did you compile PAPI with `./configure --prefix="" --with-components="cuda"`? have you tried running `make cle

[Apache TVM Discuss] [Questions] Add Evaluators to Debug Executor

2021-08-16 Thread seven via Apache TVM Discuss
Hi, I came across the same problem as yours. I install the PAPI library in the home directory, and the cmake result shows `Using PAPI library pkgcfg_lib_PAPI_papi-NOTFOUND`. When I make the project, it also hints that the papi.h file cannot be found. After adding the PAPI include directory, t