{"action":"created","issue":{"url":"https://api.github.com/repos/jrprice/Oclgrind/issues/100","repository_url":"https://api.github.com/repos/jrprice/Oclgrind","labels_url":"https://api.github.com/repos/jrprice/Oclgrind/issues/100/labels{/name}","comments_url":"https://api.github.com/repos/jrprice/Oclgrind/issues/100/comments","events_url":"https://api.github.com/repos/jrprice/Oclgrind/issues/100/events","html_url":"https://github.com/jrprice/Oclgrind/issues/100","id":158549620,"number":100,"title":"`inline` seems not recognized?","user":{"login":"hughperkins","id":123560,"avatar_url":"https://avatars.githubusercontent.com/u/123560?v=3","gravatar_id":"","url":"https://api.github.com/users/hughperkins","html_url":"https://github.com/hughperkins","followers_url":"https://api.github.com/users/hughperkins/followers","following_url":"https://api.github.com/users/hughperkins/following{/other_user}","gists_url":"https://api.github.com/users/hughperkins/gists{/gist_id}","starred_url":"https://api.github.com/users/hughperkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hughperkins/subscriptions","organizations_url":"https://api.github.com/users/hughperkins/orgs","repos_url":"https://api.github.com/users/hughperkins/repos","events_url":"https://api.github.com/users/hughperkins/events{/privacy}","received_events_url":"https://api.github.com/users/hughperkins/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-05T11:16:00Z","updated_at":"2016-06-05T11:20:29Z","closed_at":null,"body":"Got as far as attempting to run cltorch unit tests :-)\r\n\r\nHow I run them:\r\n- clone my `chameleon` branch, https://github.com/hughperkins/Oclgrind/tree/chameleon\r\n  - build, install etc\r\n- install torch-cl https://github.com/hughperkins/distro-cl , activate torch etc, ie `source ~/torch-cl/install/torch-activate`\r\n- run:\r\n```\r\noclgrind luajit -l cltorch -e 'cltorch.test()'\r\n```\r\n\r\nExample output:\r\n```\r\n|___________________________________________________________________________________________________________________  ==> inplace_abs\r\n\r\nOCLGRIND FATAL ERROR (/home/ubuntu/git/Oclgrind/src/core/WorkItem.cpp:1595)\r\nUndefined external function: op\r\nWhen creating kernel 'THClTensor_pointwiseApplyD'\r\nkernel build error:\r\n\r\nkernel source:\r\n1: // OpenCL kernels....\r\n2: \r\n3: // expected templated values:\r\n4: // dims (vector of unique dimension values)\r\n5: // operation\r\n6: // dim1\r\n7: // dim2\r\n8: // dim3\r\n9: // ... dimD\r\n10: // num_input_tensors\r\n11: // include_scalar_input\r\n12: //\r\n13: // maybe should add:\r\n14: // IndexType (hardcoded to int for now)\r\n15: // MAX_CUTORCH_DIMS (hardcoded to 25 for now)\r\n16: \r\n17: // (Ported from cutorch's THCApply.cuh)\r\n18: \r\n19: // Maximum number of dimensions allowed for cutorch\r\n20: // #define MAX_CUTORCH_DIMS 25\r\n21: \r\n22: // Enum that indicates whether tensor arguments are read/write or\r\n23: // read-only\r\n24: //enum TensorArgType { ReadWrite, ReadOnly };\r\n25: \r\n26: \r\n27: \r\n28: inline void op( global float *out\r\n29:   \r\n30:   \r\n31:    \r\n32: ) {\r\n33:     *out =fabs( *out );\r\n34: }\r\n35: \r\n36: kernel void\r\n37: THClTensor_pointwiseApplyD(\r\n38:    \r\n39:     int offset_1,\r\n40:     \r\n41:     \r\n42:     global float*data_1,\r\n43:    \r\n44:    \r\n45:    \r\n46:    int totalElements) {\r\n47:    int linearIndex = get_global_id(0);\r\n48:    if(linearIndex < totalElements ) {\r\n49:     \r\n50:     \r\n51:       \r\n52:       \r\n53:          int derived_offset_1 = linearIndex + offset_1;\r\n54:       \r\n55:     \r\n56: \r\n57:     op(\r\n58:       \r\n59:          \r\n60:          &(data_1[derived_offset_1])\r\n61:       \r\n62: \r\n63:       \r\n64: \r\n65:        \r\n66:     );\r\n67:   }\r\n68: }\r\n69: \r\n70: \r\n\r\n\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/jrprice/Oclgrind/issues/comments/223807626","html_url":"https://github.com/jrprice/Oclgrind/issues/100#issuecomment-223807626","issue_url":"https://api.github.com/repos/jrprice/Oclgrind/issues/100","id":223807626,"user":{"login":"hughperkins","id":123560,"avatar_url":"https://avatars.githubusercontent.com/u/123560?v=3","gravatar_id":"","url":"https://api.github.com/users/hughperkins","html_url":"https://github.com/hughperkins","followers_url":"https://api.github.com/users/hughperkins/followers","following_url":"https://api.github.com/users/hughperkins/following{/other_user}","gists_url":"https://api.github.com/users/hughperkins/gists{/gist_id}","starred_url":"https://api.github.com/users/hughperkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hughperkins/subscriptions","organizations_url":"https://api.github.com/users/hughperkins/orgs","repos_url":"https://api.github.com/users/hughperkins/repos","events_url":"https://api.github.com/users/hughperkins/events{/privacy}","received_events_url":"https://api.github.com/users/hughperkins/received_events","type":"User","site_admin":false},"created_at":"2016-06-05T11:20:29Z","updated_at":"2016-06-05T11:20:29Z","body":"probably you could just ignore the `inline` keyword?  Seems like the goal of oclgrind is not performance, and performance is the only advantage of `inline` really, mostly?"}}
{"actor":{"display_login":"hughperkins"}}