{"action":"created","issue":{"url":"https://api.github.com/repos/dmlc/tvm/issues/603","repository_url":"https://api.github.com/repos/dmlc/tvm","labels_url":"https://api.github.com/repos/dmlc/tvm/issues/603/labels{/name}","comments_url":"https://api.github.com/repos/dmlc/tvm/issues/603/comments","events_url":"https://api.github.com/repos/dmlc/tvm/issues/603/events","html_url":"https://github.com/dmlc/tvm/issues/603","id":269888150,"number":603,"title":"Argument Positions of Generated Function","user":{"login":"Arthur-Shi","id":25749209,"avatar_url":"https://avatars3.githubusercontent.com/u/25749209?v=4","gravatar_id":"","url":"https://api.github.com/users/Arthur-Shi","html_url":"https://github.com/Arthur-Shi","followers_url":"https://api.github.com/users/Arthur-Shi/followers","following_url":"https://api.github.com/users/Arthur-Shi/following{/other_user}","gists_url":"https://api.github.com/users/Arthur-Shi/gists{/gist_id}","starred_url":"https://api.github.com/users/Arthur-Shi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arthur-Shi/subscriptions","organizations_url":"https://api.github.com/users/Arthur-Shi/orgs","repos_url":"https://api.github.com/users/Arthur-Shi/repos","events_url":"https://api.github.com/users/Arthur-Shi/events{/privacy}","received_events_url":"https://api.github.com/users/Arthur-Shi/received_events","type":"User","site_admin":false},"labels":[{"id":694348290,"url":"https://api.github.com/repos/dmlc/tvm/labels/question","name":"question","color":"fef2c0","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-10-31T09:22:40Z","updated_at":"2017-11-02T06:53:17Z","closed_at":null,"author_association":"NONE","body":"I have saved the module f3 in the tvm/topi/tests/python/test_topi_depthwise_conv2d.py \r\n\r\n        f3 = tvm.build(s3, [Input, Filter, Scale, Shift, Relu], device)\r\n\r\nand get 4 files: .ptx, .o, .so and .json.\r\n\r\nI am trying to run these files. But I have to define and assign the inputs in the /home/aries/tvm/apps/howto_deploy/cpp_deploy.cc\r\n\r\nthats what I add:\r\n\r\n  DLTensor* x;\r\n  DLTensor* y;\r\n  DLTensor* a;\r\n  DLTensor* b;\r\n  DLTensor* c;\r\n\r\n\r\n  int dtype_code = kFloat;\r\n  int dtype_bits = 32;\r\n  int dtype_lanes = 1;\r\n  int device_type = kCPU;\r\n  int device_id = 0;\r\n  TVMArrayAlloc(shape, 4, dtype_code, dtype_bits, dtype_lanes,\r\n                device_type, device_id, &x);\r\n  TVMArrayAlloc(shape, 4, dtype_code, dtype_bits, dtype_lanes,\r\n                device_type, device_id, &y);\r\n  TVMArrayAlloc(shape, 1, dtype_code, dtype_bits, dtype_lanes,\r\n                device_type, device_id, &a);\r\n  TVMArrayAlloc(shape, 1, dtype_code, dtype_bits, dtype_lanes,\r\n                device_type, device_id, &b);\r\n  TVMArrayAlloc(shape, ndim, dtype_code, dtype_bits, dtype_lanes,\r\n                device_type, device_id, &c);\r\n\r\nBut How to assign multimensional array to Input, Filter, Scale, Shift ?\r\n\r\n  native int tvmArrayAlloc(long[] shape, int dtypeCode, int dtypeBits, int dtypeLanes,\r\nint deviceType, int deviceId, Base.RefLong refHandle); \r\nIt cannot help.\r\n\r\nAnd I tried \r\n\r\n    int i[]={{{{1}}}};\r\n    static_cast<float*>(x->data)[i] = i;\r\n\r\nBut It also cannot work.\r\n\r\nFor example, If I want to assign  {{{{1}}}}  to a ,\r\nwhat should I do?\r\n\r\nand also , how to print relu? DLpack is not able to be printed in C++\r\n"},"comment":{"url":"https://api.github.com/repos/dmlc/tvm/issues/comments/341333058","html_url":"https://github.com/dmlc/tvm/issues/603#issuecomment-341333058","issue_url":"https://api.github.com/repos/dmlc/tvm/issues/603","id":341333058,"user":{"login":"Arthur-Shi","id":25749209,"avatar_url":"https://avatars3.githubusercontent.com/u/25749209?v=4","gravatar_id":"","url":"https://api.github.com/users/Arthur-Shi","html_url":"https://github.com/Arthur-Shi","followers_url":"https://api.github.com/users/Arthur-Shi/followers","following_url":"https://api.github.com/users/Arthur-Shi/following{/other_user}","gists_url":"https://api.github.com/users/Arthur-Shi/gists{/gist_id}","starred_url":"https://api.github.com/users/Arthur-Shi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arthur-Shi/subscriptions","organizations_url":"https://api.github.com/users/Arthur-Shi/orgs","repos_url":"https://api.github.com/users/Arthur-Shi/repos","events_url":"https://api.github.com/users/Arthur-Shi/events{/privacy}","received_events_url":"https://api.github.com/users/Arthur-Shi/received_events","type":"User","site_admin":false},"created_at":"2017-11-02T06:53:17Z","updated_at":"2017-11-02T06:53:17Z","author_association":"NONE","body":"When I build runtime with gpu, I should uncomment \r\n#include \"../../src/runtime/metal/metal_device_api.mm\"\r\n#include \"../../src/runtime/metal/metal_module.mm\"\r\n\r\nBut, \r\n\r\nIn file included from ../../src/runtime/metal/metal_device_api.mm:5:0,\r\n                 from tvm_runtime_pack.cc:48:\r\n../../src/runtime/metal/./metal_common.h:9:2: warning: #import is a deprecated GCC extension [-Wdeprecated]\r\n #import <Metal/MTLBuffer.h>\r\n  ^\r\n../../src/runtime/metal/./metal_common.h:9:28: fatal error: Metal/MTLBuffer.h: No such file or directory\r\n #import <Metal/MTLBuffer.h>\r\n                            ^\r\ncompilation terminated.\r\nMakefile:19: recipe for target 'lib/libtvm_runtime_pack.o' failed\r\n\r\nWhere can find this file?"}}
{"actor":{"display_login":"Arthur-Shi"}}