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

2021-08-19 Thread mallappa s via Apache TVM Discuss
Sorry i didn't get time to check i will let you know once i verify it. --- [Visit Topic](https://discuss.tvm.apache.org/t/irrespective-of-input-same-output-ios-tvm-model/10765/12) to respond. You are receiving this because you enabled mailing list mode. To unsubscribe from these emails,

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

2021-08-18 Thread Andrey Malyshev via Apache TVM Discuss
@myproject24 did you have a chance to verify if passing of CPU NDArray to input and using of the other API for copy data helps to solve the problem or not? --- [Visit Topic](https://discuss.tvm.apache.org/t/irrespective-of-input-same-output-ios-tvm-model/10765/11) to respond. You are rec

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

2021-08-17 Thread Andrey Malyshev via Apache TVM Discuss
in [MetalWorkspace::CopyDataFromTo](https://github.com/apache/tvm/blob/main/src/runtime/metal/metal_device_api.mm#L228) three situation is handled: 1. Copy from Metal to Metal 2. Copy from CPU to Metal 3. Copy from Metal to CPU I.e. in your case one more extra copy will be done and it will be m

[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] [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] [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] [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] [Application] Irrespective of input same output iOS TVM model

2021-08-15 Thread Andrey Malyshev via Apache TVM Discuss
which context do you use for creation of `m_gpuInput` and how do you populate data? BTW, you are loading params and json that means that you are using packed zip format for storing model. Is it more convinient for you? Does it find artefacts during the loading of model? I prefer to use everyt

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

2021-08-15 Thread mallappa s via Apache TVM Discuss
Hi @elvin-n i have built a standalone iOS application For iOS CPU. * sdk = “iphoneos” * target = “llvm -mtriple=arm64-apple-darwin” For iOS Metal: * sdk = “iphoneos” * target = “metal” * target_host = “llvm -mtriple=arm64-apple-darwin” And i used c++ to inference the TVM model // load mo