Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1 #include <Python.h>
- 2 #include <iostream>
- 3 #include "cuda_ndarray.cuh"
- 4 #include <math.h>
- 5 #include <numpy/arrayobject.h>
- 6 #include <numpy/arrayscalars.h>
- 7 //////////////////////
- 8 //// Support Code
- 9 //////////////////////
- 10
- 11
- 12 __global__ void
- 13 //thread block size = out_dur
- 14 //grid block size =(out_len*out_wid, nb kern *nb batch)
- 15 //
- 16 conv_rows_stack( float* img, float* kern, float* bias, float* out,
- 17 int img_len, int img_wid, int img_dur,
- 18 int kern_height, int kern_wid, int kern_dur,
- 19 int nkern, int input_channels,
- 20 int dr, int dc, int dt,
- 21 int img_stride_frame, int img_stride_col, int img_stride_row,
- 22 int img_stride_ochannel, int img_stride_batch,
- 23 int kern_stride_frame, int kern_stride_col, int kern_stride_row,
- 24 int kern_stride_stack, int kern_stride_okern)
- 25 {
- 26 int __shared__ out_len, out_wid, out_dur, batch_id, kern_id;
- 27 float __shared__ *d_img, *d_kern;
- 28 out_len = int( (img_len - kern_height) / dr )+1;
- 29 out_wid = int( (img_wid - kern_wid) / dc )+1;
- 30 out_dur = int( (img_dur - kern_dur) / dt )+1;
- 31
- 32 batch_id= blockIdx.y/nkern;
- 33 kern_id = blockIdx.y - batch_id*nkern;
- 34
- 35 const int out_row = blockIdx.x%out_len;
- 36 const int out_col = blockIdx.x/out_len;
- 37 const int out_frame=threadIdx.x;
- 38
- 39 img += batch_id*img_stride_batch + out_row*dr*img_stride_row + out_col*dc*img_stride_col+out_frame*dt*img_stride_frame;
- 40 kern += kern_id*kern_stride_okern;
- 41 float sum = 0.0f;
- 42 for (int z = 0; z < input_channels; z++) {//1 for first layer
- 43 for (int k =0; k < kern_height; k++) {
- 44 for (int l = 0; l < kern_wid; l++) {
- 45 for (int m = 0; m < kern_dur; m++) {
- 46 sum += img[img_stride_ochannel*z+img_stride_row*k+img_stride_col*l+img_stride_frame*m] *
- 47 kern[kern_stride_stack*z+kern_stride_row*k+kern_stride_col*l+kern_stride_frame*m];
- 48 }
- 49 }
- 50 }
- 51
- 52 out[batch_id*nkern*out_len*out_wid*out_dur+//the good batch
- 53 out_frame*nkern+//the output frame
- 54 out_row*out_wid*out_dur*nkern+//the output row
- 55 out_col*out_dur*nkern + //the output_col
- 56 kern_id //the output image (channel)
- 57 ] = sum + bias[kern_id];
- 58 }
- 59 }
- 60
- 61
- 62
- 63
- 64 namespace {
- 65 struct __struct_compiled_op_582fb0484ff243626e2710b17d099d1d {
- 66 PyObject* __ERROR;
- 67
- 68 PyObject* storage_V3;
- 69 PyObject* storage_V5;
- 70 PyObject* storage_V7;
- 71 PyObject* storage_V9;
- 72 PyObject* storage_V1;
- 73
- 74
- 75 __struct_compiled_op_582fb0484ff243626e2710b17d099d1d() {}
- 76 ~__struct_compiled_op_582fb0484ff243626e2710b17d099d1d(void) {
- 77 cleanup();
- 78 }
- 79
- 80 int init(PyObject* __ERROR, PyObject* storage_V3, PyObject* storage_V5, PyObject* storage_V7, PyObject* storage_V9, PyObject* storage_V1) {
- 81 Py_XINCREF(storage_V3);
- 82 Py_XINCREF(storage_V5);
- 83 Py_XINCREF(storage_V7);
- 84 Py_XINCREF(storage_V9);
- 85 Py_XINCREF(storage_V1);
- 86 this->storage_V3 = storage_V3;
- 87 this->storage_V5 = storage_V5;
- 88 this->storage_V7 = storage_V7;
- 89 this->storage_V9 = storage_V9;
- 90 this->storage_V1 = storage_V1;
- 91 int __failure = 0;
- 92
- 93 {
- 94
- 95 {
- 96
- 97 {
- 98
- 99 {
- 100
- 101 {
- 102
- 103 this->__ERROR = __ERROR;
- 104 return 0;
- 105 __label_9:
- 106
- 107 double __DUMMY_9;
- 108
- 109 }
- 110 __label_7:
- 111
- 112 double __DUMMY_7;
- 113
- 114 }
- 115 __label_5:
- 116
- 117 double __DUMMY_5;
- 118
- 119 }
- 120 __label_3:
- 121
- 122 double __DUMMY_3;
- 123
- 124 }
- 125 __label_1:
- 126
- 127 double __DUMMY_1;
- 128
- 129 }
- 130
- 131 Py_XDECREF(this->storage_V3);
- 132 Py_XDECREF(this->storage_V5);
- 133 Py_XDECREF(this->storage_V7);
- 134 Py_XDECREF(this->storage_V9);
- 135 Py_XDECREF(this->storage_V1);
- 136
- 137 if (__failure) {
- 138 // When there is a failure, this code puts the exception
- 139 // in __ERROR.
- 140 PyObject* err_type = NULL;
- 141 PyObject* err_msg = NULL;
- 142 PyObject* err_traceback = NULL;
- 143 PyErr_Fetch(&err_type, &err_msg, &err_traceback);
- 144 if (!err_type) {err_type = Py_None;Py_INCREF(Py_None);}
- 145 if (!err_msg) {err_msg = Py_None; Py_INCREF(Py_None);}
- 146 if (!err_traceback) {err_traceback = Py_None; Py_INCREF(Py_None);}
- 147 PyObject* old_err_type = PyList_GET_ITEM(__ERROR, 0);
- 148 PyObject* old_err_msg = PyList_GET_ITEM(__ERROR, 1);
- 149 PyObject* old_err_traceback = PyList_GET_ITEM(__ERROR, 2);
- 150 PyList_SET_ITEM(__ERROR, 0, err_type);
- 151 PyList_SET_ITEM(__ERROR, 1, err_msg);
- 152 PyList_SET_ITEM(__ERROR, 2, err_traceback);
- 153 {Py_XDECREF(old_err_type);}
- 154 {Py_XDECREF(old_err_msg);}
- 155 {Py_XDECREF(old_err_traceback);}
- 156 }
- 157 // The failure code is returned to index what code block failed.
- 158 return __failure;
- 159
- 160 }
- 161 void cleanup(void) {
- 162 __label_1:
- 163
- 164 double __DUMMY_1;
- 165 __label_3:
- 166
- 167 double __DUMMY_3;
- 168 __label_5:
- 169
- 170 double __DUMMY_5;
- 171 __label_7:
- 172
- 173 double __DUMMY_7;
- 174 __label_9:
- 175
- 176 double __DUMMY_9;
- 177
- 178 Py_XDECREF(this->storage_V3);
- 179 Py_XDECREF(this->storage_V5);
- 180 Py_XDECREF(this->storage_V7);
- 181 Py_XDECREF(this->storage_V9);
- 182 Py_XDECREF(this->storage_V1);
- 183 }
- 184 int run(void) {
- 185 int __failure = 0;
- 186
- 187 PyObject* py_V1;
- 188 CudaNdarray * V1;
- 189 PyObject* py_V3;
- 190 CudaNdarray * V3;
- 191 PyObject* py_V5;
- 192 CudaNdarray * V5;
- 193 PyObject* py_V7;
- 194 CudaNdarray * V7;
- 195 PyObject* py_V9;
- 196
- 197 PyArrayObject* V9;
- 198
- 199 typedef npy_int64 dtype_V9;
- 200
- 201 {
- 202
- 203 py_V1 = PyList_GET_ITEM(storage_V1, 0);
- 204 {Py_XINCREF(py_V1);}
- 205
- 206 if (py_V1 == Py_None)
- 207 {
- 208 V1 = NULL;
- 209 }
- 210 else
- 211 {
- 212
- 213 assert(py_V1->ob_refcnt >= 2); // There should be at least one ref from the container object,
- 214 // and one ref from the local scope.
- 215
- 216 if (CudaNdarray_Check(py_V1))
- 217 {
- 218 //fprintf(stderr, "c_extract CNDA object w refcnt %p %i\n", py_V1, (py_V1->ob_refcnt));
- 219 V1 = (CudaNdarray*)py_V1;
- 220 //std::cerr << "c_extract " << V1 << '\n';
- 221
- 222
- 223 if (V1->nd != 5)
- 224 {
- 225 PyErr_Format(PyExc_RuntimeError,
- 226 "c_extract: Some CudaNdarray has rank %i, it was supposed to have rank 5",
- 227 V1->nd);
- 228 V1 = NULL;
- 229 {
- 230 __failure = 2;
- 231 if (!PyErr_Occurred()) {
- 232 PyErr_SetString(PyExc_RuntimeError,
- 233 "Unexpected error in an Op's C code. "
- 234 "No Python exception was set.");
- 235 }
- 236 goto __label_2;};
- 237 }
- 238 //std::cerr << "c_extract " << V1 << " nd check passed\n";
- 239
- 240
- 241 assert(V1);
- 242 Py_INCREF(py_V1);
- 243 }
- 244 else if (py_V1 == Py_None)
- 245 {
- 246 PyErr_SetString(PyExc_TypeError,
- 247 "expected a CudaNdarray, not None");
- 248 V1 = NULL;
- 249 {
- 250 __failure = 2;
- 251 if (!PyErr_Occurred()) {
- 252 PyErr_SetString(PyExc_RuntimeError,
- 253 "Unexpected error in an Op's C code. "
- 254 "No Python exception was set.");
- 255 }
- 256 goto __label_2;};
- 257 }
- 258 else
- 259 {
- 260 //fprintf(stderr, "FAILING c_extract CNDA object w refcnt %p %i\n", py_V1, (py_V1->ob_refcnt));
- 261 PyErr_SetString(PyExc_TypeError, "Argument not a CudaNdarray");
- 262 V1 = NULL;
- 263 {
- 264 __failure = 2;
- 265 if (!PyErr_Occurred()) {
- 266 PyErr_SetString(PyExc_RuntimeError,
- 267 "Unexpected error in an Op's C code. "
- 268 "No Python exception was set.");
- 269 }
- 270 goto __label_2;};
- 271 }
- 272 //std::cerr << "c_extract done " << V1 << '\n';
- 273
- 274
- 275 }
- 276
- 277 {
- 278
- 279 py_V3 = PyList_GET_ITEM(storage_V3, 0);
- 280 {Py_XINCREF(py_V3);}
- 281
- 282 assert(py_V3->ob_refcnt >= 2); // There should be at least one ref from the container object,
- 283 // and one ref from the local scope.
- 284
- 285 if (CudaNdarray_Check(py_V3))
- 286 {
- 287 //fprintf(stderr, "c_extract CNDA object w refcnt %p %i\n", py_V3, (py_V3->ob_refcnt));
- 288 V3 = (CudaNdarray*)py_V3;
- 289 //std::cerr << "c_extract " << V3 << '\n';
- 290
- 291
- 292 if (V3->nd != 5)
- 293 {
- 294 PyErr_Format(PyExc_RuntimeError,
- 295 "c_extract: Some CudaNdarray has rank %i, it was supposed to have rank 5",
- 296 V3->nd);
- 297 V3 = NULL;
- 298 {
- 299 __failure = 4;
- 300 if (!PyErr_Occurred()) {
- 301 PyErr_SetString(PyExc_RuntimeError,
- 302 "Unexpected error in an Op's C code. "
- 303 "No Python exception was set.");
- 304 }
- 305 goto __label_4;};
- 306 }
- 307 //std::cerr << "c_extract " << V3 << " nd check passed\n";
- 308
- 309
- 310 if (CudaNdarray_HOST_DIMS(V3)[4] != 1)
- 311 {
- 312 PyErr_Format(PyExc_RuntimeError,
- 313 "c_extract: Some CudaNdarray has dim %i on broadcastable dimension %i",
- 314 CudaNdarray_HOST_DIMS(V3)[4], 4);
- 315 V3 = NULL;
- 316 {
- 317 __failure = 4;
- 318 if (!PyErr_Occurred()) {
- 319 PyErr_SetString(PyExc_RuntimeError,
- 320 "Unexpected error in an Op's C code. "
- 321 "No Python exception was set.");
- 322 }
- 323 goto __label_4;};
- 324 }
- 325 //std::cerr << "c_extract " << V3 << "dim check 4 passed\n";
- 326 //std::cerr << "c_extract " << V3 << "checking bcast 4 <" << V3->str<< ">\n";
- 327 //std::cerr << "c_extract " << V3->str[4] << "\n";
- 328 if (CudaNdarray_HOST_STRIDES(V3)[4])
- 329 {
- 330 //std::cerr << "c_extract bad stride detected...\n";
- 331 PyErr_Format(PyExc_RuntimeError,
- 332 "c_extract: Some CudaNdarray has a nonzero stride %i on a broadcastable dimension %i",
- 333 CudaNdarray_HOST_STRIDES(V3)[4], 4);
- 334 V3 = NULL;
- 335 {
- 336 __failure = 4;
- 337 if (!PyErr_Occurred()) {
- 338 PyErr_SetString(PyExc_RuntimeError,
- 339 "Unexpected error in an Op's C code. "
- 340 "No Python exception was set.");
- 341 }
- 342 goto __label_4;};
- 343 }
- 344 //std::cerr << "c_extract " << V3 << "bcast check 4 passed\n";
- 345
- 346
- 347 assert(V3);
- 348 Py_INCREF(py_V3);
- 349 }
- 350 else if (py_V3 == Py_None)
- 351 {
- 352 PyErr_SetString(PyExc_TypeError,
- 353 "expected a CudaNdarray, not None");
- 354 V3 = NULL;
- 355 {
- 356 __failure = 4;
- 357 if (!PyErr_Occurred()) {
- 358 PyErr_SetString(PyExc_RuntimeError,
- 359 "Unexpected error in an Op's C code. "
- 360 "No Python exception was set.");
- 361 }
- 362 goto __label_4;};
- 363 }
- 364 else
- 365 {
- 366 //fprintf(stderr, "FAILING c_extract CNDA object w refcnt %p %i\n", py_V3, (py_V3->ob_refcnt));
- 367 PyErr_SetString(PyExc_TypeError, "Argument not a CudaNdarray");
- 368 V3 = NULL;
- 369 {
- 370 __failure = 4;
- 371 if (!PyErr_Occurred()) {
- 372 PyErr_SetString(PyExc_RuntimeError,
- 373 "Unexpected error in an Op's C code. "
- 374 "No Python exception was set.");
- 375 }
- 376 goto __label_4;};
- 377 }
- 378 //std::cerr << "c_extract done " << V3 << '\n';
- 379
- 380
- 381 {
- 382
- 383 py_V5 = PyList_GET_ITEM(storage_V5, 0);
- 384 {Py_XINCREF(py_V5);}
- 385
- 386 assert(py_V5->ob_refcnt >= 2); // There should be at least one ref from the container object,
- 387 // and one ref from the local scope.
- 388
- 389 if (CudaNdarray_Check(py_V5))
- 390 {
- 391 //fprintf(stderr, "c_extract CNDA object w refcnt %p %i\n", py_V5, (py_V5->ob_refcnt));
- 392 V5 = (CudaNdarray*)py_V5;
- 393 //std::cerr << "c_extract " << V5 << '\n';
- 394
- 395
- 396 if (V5->nd != 5)
- 397 {
- 398 PyErr_Format(PyExc_RuntimeError,
- 399 "c_extract: Some CudaNdarray has rank %i, it was supposed to have rank 5",
- 400 V5->nd);
- 401 V5 = NULL;
- 402 {
- 403 __failure = 6;
- 404 if (!PyErr_Occurred()) {
- 405 PyErr_SetString(PyExc_RuntimeError,
- 406 "Unexpected error in an Op's C code. "
- 407 "No Python exception was set.");
- 408 }
- 409 goto __label_6;};
- 410 }
- 411 //std::cerr << "c_extract " << V5 << " nd check passed\n";
- 412
- 413
- 414 assert(V5);
- 415 Py_INCREF(py_V5);
- 416 }
- 417 else if (py_V5 == Py_None)
- 418 {
- 419 PyErr_SetString(PyExc_TypeError,
- 420 "expected a CudaNdarray, not None");
- 421 V5 = NULL;
- 422 {
- 423 __failure = 6;
- 424 if (!PyErr_Occurred()) {
- 425 PyErr_SetString(PyExc_RuntimeError,
- 426 "Unexpected error in an Op's C code. "
- 427 "No Python exception was set.");
- 428 }
- 429 goto __label_6;};
- 430 }
- 431 else
- 432 {
- 433 //fprintf(stderr, "FAILING c_extract CNDA object w refcnt %p %i\n", py_V5, (py_V5->ob_refcnt));
- 434 PyErr_SetString(PyExc_TypeError, "Argument not a CudaNdarray");
- 435 V5 = NULL;
- 436 {
- 437 __failure = 6;
- 438 if (!PyErr_Occurred()) {
- 439 PyErr_SetString(PyExc_RuntimeError,
- 440 "Unexpected error in an Op's C code. "
- 441 "No Python exception was set.");
- 442 }
- 443 goto __label_6;};
- 444 }
- 445 //std::cerr << "c_extract done " << V5 << '\n';
- 446
- 447
- 448 {
- 449
- 450 py_V7 = PyList_GET_ITEM(storage_V7, 0);
- 451 {Py_XINCREF(py_V7);}
- 452
- 453 assert(py_V7->ob_refcnt >= 2); // There should be at least one ref from the container object,
- 454 // and one ref from the local scope.
- 455
- 456 if (CudaNdarray_Check(py_V7))
- 457 {
- 458 //fprintf(stderr, "c_extract CNDA object w refcnt %p %i\n", py_V7, (py_V7->ob_refcnt));
- 459 V7 = (CudaNdarray*)py_V7;
- 460 //std::cerr << "c_extract " << V7 << '\n';
- 461
- 462
- 463 if (V7->nd != 1)
- 464 {
- 465 PyErr_Format(PyExc_RuntimeError,
- 466 "c_extract: Some CudaNdarray has rank %i, it was supposed to have rank 1",
- 467 V7->nd);
- 468 V7 = NULL;
- 469 {
- 470 __failure = 8;
- 471 if (!PyErr_Occurred()) {
- 472 PyErr_SetString(PyExc_RuntimeError,
- 473 "Unexpected error in an Op's C code. "
- 474 "No Python exception was set.");
- 475 }
- 476 goto __label_8;};
- 477 }
- 478 //std::cerr << "c_extract " << V7 << " nd check passed\n";
- 479
- 480
- 481 assert(V7);
- 482 Py_INCREF(py_V7);
- 483 }
- 484 else if (py_V7 == Py_None)
- 485 {
- 486 PyErr_SetString(PyExc_TypeError,
- 487 "expected a CudaNdarray, not None");
- 488 V7 = NULL;
- 489 {
- 490 __failure = 8;
- 491 if (!PyErr_Occurred()) {
- 492 PyErr_SetString(PyExc_RuntimeError,
- 493 "Unexpected error in an Op's C code. "
- 494 "No Python exception was set.");
- 495 }
- 496 goto __label_8;};
- 497 }
- 498 else
- 499 {
- 500 //fprintf(stderr, "FAILING c_extract CNDA object w refcnt %p %i\n", py_V7, (py_V7->ob_refcnt));
- 501 PyErr_SetString(PyExc_TypeError, "Argument not a CudaNdarray");
- 502 V7 = NULL;
- 503 {
- 504 __failure = 8;
- 505 if (!PyErr_Occurred()) {
- 506 PyErr_SetString(PyExc_RuntimeError,
- 507 "Unexpected error in an Op's C code. "
- 508 "No Python exception was set.");
- 509 }
- 510 goto __label_8;};
- 511 }
- 512 //std::cerr << "c_extract done " << V7 << '\n';
- 513
- 514
- 515 {
- 516
- 517 py_V9 = PyList_GET_ITEM(storage_V9, 0);
- 518 {Py_XINCREF(py_V9);}
- 519
- 520 V9 = NULL;
- 521 if (py_V9 == Py_None) {
- 522 // We can either fail here or set V9 to NULL and rely on Ops
- 523 // using tensors to handle the NULL case, but if they fail to do so
- 524 // they'll end up with nasty segfaults, so this is public service.
- 525 PyErr_SetString(PyExc_ValueError, "expected an ndarray, not None");
- 526 {
- 527 __failure = 10;
- 528 if (!PyErr_Occurred()) {
- 529 PyErr_SetString(PyExc_RuntimeError,
- 530 "Unexpected error in an Op's C code. "
- 531 "No Python exception was set.");
- 532 }
- 533 goto __label_10;}
- 534 }
- 535 if (!PyArray_Check(py_V9)) {
- 536 PyErr_SetString(PyExc_ValueError, "expected an ndarray");
- 537 {
- 538 __failure = 10;
- 539 if (!PyErr_Occurred()) {
- 540 PyErr_SetString(PyExc_RuntimeError,
- 541 "Unexpected error in an Op's C code. "
- 542 "No Python exception was set.");
- 543 }
- 544 goto __label_10;}
- 545 }
- 546 // We expect NPY_INT64
- 547 if (!PyArray_ISALIGNED((PyArrayObject*) py_V9)) {
- 548 PyArrayObject * tmp = (PyArrayObject*) py_V9;
- 549 PyErr_Format(PyExc_NotImplementedError,
- 550 "expected an aligned array of type %ld "
- 551 "(NPY_INT64), got non-aligned array of type %ld"
- 552 " with %ld dimensions, with 3 last dims "
- 553 "%ld, %ld, %ld"
- 554 " and 3 last strides %ld %ld, %ld.",
- 555 (long int) NPY_INT64,
- 556 (long int) PyArray_TYPE((PyArrayObject*) py_V9),
- 557 (long int) PyArray_NDIM(tmp),
- 558 (long int) PyArray_NDIM(tmp) >= 3 ?
- 559 PyArray_DIMS(tmp)[PyArray_NDIM(tmp)-3] : -1,
- 560 (long int) PyArray_NDIM(tmp) >= 2 ?
- 561 PyArray_DIMS(tmp)[PyArray_NDIM(tmp)-2] : -1,
- 562 (long int) PyArray_NDIM(tmp) >= 1 ?
- 563 PyArray_DIMS(tmp)[PyArray_NDIM(tmp)-1] : -1,
- 564 (long int) PyArray_NDIM(tmp) >= 3 ?
- 565 PyArray_STRIDES(tmp)[PyArray_NDIM(tmp)-3] : -1,
- 566 (long int) PyArray_NDIM(tmp) >= 2 ?
- 567 PyArray_STRIDES(tmp)[PyArray_NDIM(tmp)-2] : -1,
- 568 (long int) PyArray_NDIM(tmp) >= 1 ?
- 569 PyArray_STRIDES(tmp)[PyArray_NDIM(tmp)-1] : -1
- 570 );
- 571 {
- 572 __failure = 10;
- 573 if (!PyErr_Occurred()) {
- 574 PyErr_SetString(PyExc_RuntimeError,
- 575 "Unexpected error in an Op's C code. "
- 576 "No Python exception was set.");
- 577 }
- 578 goto __label_10;}
- 579 }
- 580 // This is a TypeError to be consistent with DEBUG_MODE
- 581 // Note: DEBUG_MODE also tells the name of the container
- 582 if (PyArray_TYPE((PyArrayObject*) py_V9) != NPY_INT64) {
- 583 PyErr_Format(PyExc_TypeError,
- 584 "expected type_num %d (NPY_INT64) got %d",
- 585 NPY_INT64, PyArray_TYPE((PyArrayObject*) py_V9));
- 586 {
- 587 __failure = 10;
- 588 if (!PyErr_Occurred()) {
- 589 PyErr_SetString(PyExc_RuntimeError,
- 590 "Unexpected error in an Op's C code. "
- 591 "No Python exception was set.");
- 592 }
- 593 goto __label_10;}
- 594 }
- 595
- 596 V9 = (PyArrayObject*)(py_V9);
- 597 Py_XINCREF(V9);
- 598
- 599 {
- 600 // Op class GpuConv3D
- 601
- 602 ///////////// < code generated by GpuConv3D >
- 603
- 604 //printf(" Conv3DGPU c code\n");
- 605
- 606 //Check dimensionality of inputs
- 607 if (CudaNdarray_NDIM(V5) != 5)
- 608 {
- 609 PyErr_Format(PyExc_ValueError, "GpuConv3D: W must be a 5 dimensional CudaNdarray");
- 610 {
- 611 __failure = 11;
- 612 if (!PyErr_Occurred()) {
- 613 PyErr_SetString(PyExc_RuntimeError,
- 614 "Unexpected error in an Op's C code. "
- 615 "No Python exception was set.");
- 616 }
- 617 goto __label_11;}
- 618 }
- 619
- 620 if (CudaNdarray_NDIM(V3) != 5)
- 621 {
- 622 PyErr_Format(PyExc_ValueError, "GpuConv3D: V must be a 5 dimensional CudaNdarray");
- 623 {
- 624 __failure = 11;
- 625 if (!PyErr_Occurred()) {
- 626 PyErr_SetString(PyExc_RuntimeError,
- 627 "Unexpected error in an Op's C code. "
- 628 "No Python exception was set.");
- 629 }
- 630 goto __label_11;}
- 631 }
- 632
- 633 if (CudaNdarray_NDIM(V7) != 1)
- 634 {
- 635 PyErr_Format(PyExc_ValueError, "GpuConv3D: b must be a vector CudaNdarray");
- 636 {
- 637 __failure = 11;
- 638 if (!PyErr_Occurred()) {
- 639 PyErr_SetString(PyExc_RuntimeError,
- 640 "Unexpected error in an Op's C code. "
- 641 "No Python exception was set.");
- 642 }
- 643 goto __label_11;}
- 644 }
- 645
- 646 if (CudaNdarray_NDIM(V9) != 1)
- 647 {
- 648 PyErr_Format(PyExc_ValueError, "GpuConv3D: d must be a vector CudaNdarray");
- 649 {
- 650 __failure = 11;
- 651 if (!PyErr_Occurred()) {
- 652 PyErr_SetString(PyExc_RuntimeError,
- 653 "Unexpected error in an Op's C code. "
- 654 "No Python exception was set.");
- 655 }
- 656 goto __label_11;}
- 657
- 658 }
- 659 if (PyArray_DIMS(V9)[0] != 3)
- 660 {
- 661 PyErr_Format(PyExc_ValueError, "GpuConv3D: 3 stride length arguments expected (row, col, time) but %li were given", PyArray_DIMS(V9)[0]);
- 662 {
- 663 __failure = 11;
- 664 if (!PyErr_Occurred()) {
- 665 PyErr_SetString(PyExc_RuntimeError,
- 666 "Unexpected error in an Op's C code. "
- 667 "No Python exception was set.");
- 668 }
- 669 goto __label_11;}
- 670
- 671 }
- 672
- 673 { //extra scope so fail doesn't jump over declarations
- 674 //Read and check sizes of inputs
- 675 const int batchSize = CudaNdarray_HOST_DIMS(V3)[0];
- 676 const int outputChannels = CudaNdarray_HOST_DIMS(V5)[0];
- 677 const int inputChannels = CudaNdarray_HOST_DIMS(V3)[4];
- 678 if (CudaNdarray_HOST_DIMS(V5)[4] != inputChannels)
- 679 {
- 680 PyErr_Format(PyExc_ValueError, "GpuConv3D: W operates on a %i channel image but the image has %i channels",CudaNdarray_HOST_DIMS(V5)[4],inputChannels);
- 681 {
- 682 __failure = 11;
- 683 if (!PyErr_Occurred()) {
- 684 PyErr_SetString(PyExc_RuntimeError,
- 685 "Unexpected error in an Op's C code. "
- 686 "No Python exception was set.");
- 687 }
- 688 goto __label_11;}
- 689 }
- 690 { //extra scope so error handler jumps don't cause errors
- 691 const int filterHeight = CudaNdarray_HOST_DIMS(V5)[1];
- 692 const int filterWidth = CudaNdarray_HOST_DIMS(V5)[2];
- 693 const int filterDur = CudaNdarray_HOST_DIMS(V5)[3];
- 694 const int vidHeight = CudaNdarray_HOST_DIMS(V3)[1];
- 695 const int vidWidth = CudaNdarray_HOST_DIMS(V3)[2];
- 696 const int vidDur = CudaNdarray_HOST_DIMS(V3)[3];
- 697 if (vidHeight < filterHeight)
- 698 {
- 699 PyErr_Format(PyExc_ValueError, "GpuConv3D: W has a height of %i but V is only %i pixels tall",filterHeight,vidHeight);
- 700 {
- 701 __failure = 11;
- 702 if (!PyErr_Occurred()) {
- 703 PyErr_SetString(PyExc_RuntimeError,
- 704 "Unexpected error in an Op's C code. "
- 705 "No Python exception was set.");
- 706 }
- 707 goto __label_11;}
- 708 }
- 709 { // extra scope so fail works
- 710 if (vidWidth < filterWidth)
- 711 {
- 712 PyErr_Format(PyExc_ValueError, "GpuConv3D: W has a width of %i but V is only %i pixels wide",filterWidth,vidWidth);
- 713 {
- 714 __failure = 11;
- 715 if (!PyErr_Occurred()) {
- 716 PyErr_SetString(PyExc_RuntimeError,
- 717 "Unexpected error in an Op's C code. "
- 718 "No Python exception was set.");
- 719 }
- 720 goto __label_11;}
- 721 }
- 722 { // extra scope so fail works
- 723 if (vidDur < filterDur)
- 724 {
- 725 PyErr_Format(PyExc_ValueError, "GpuConv3D: W has a duration of %i but V is only %i pixels long",filterDur,vidDur);
- 726 {
- 727 __failure = 11;
- 728 if (!PyErr_Occurred()) {
- 729 PyErr_SetString(PyExc_RuntimeError,
- 730 "Unexpected error in an Op's C code. "
- 731 "No Python exception was set.");
- 732 }
- 733 goto __label_11;}
- 734 }
- 735 { // extra scope so fail works
- 736
- 737 //Read and check stride arguments
- 738 const int dr = *(dtype_V9*)PyArray_GETPTR1(V9,0);
- 739 const int dc = *(dtype_V9*)PyArray_GETPTR1(V9,1);
- 740 const int dt = *(dtype_V9*)PyArray_GETPTR1(V9,2);
- 741 if (dr <= 0 || dc <= 0 || dt <= 0)
- 742 {
- 743 PyErr_Format(PyExc_ValueError, "GpuConv3D: Strides must all be positive but are %i, %i, %i", dr, dc, dt);
- 744 {
- 745 __failure = 11;
- 746 if (!PyErr_Occurred()) {
- 747 PyErr_SetString(PyExc_RuntimeError,
- 748 "Unexpected error in an Op's C code. "
- 749 "No Python exception was set.");
- 750 }
- 751 goto __label_11;}
- 752 }
- 753 { // extra scope so fail works
- 754
- 755 //Make correctly sized output
- 756 const int outputHeight = int( (vidHeight - filterHeight) / dr )+1;
- 757 const int outputWidth = int( (vidWidth - filterWidth) / dc )+1;
- 758 const int outputDur = int( (vidDur - filterDur) / dt ) +1;
- 759
- 760 npy_intp dims[5];
- 761 dims[0] = batchSize;
- 762 dims[4] = outputChannels;
- 763 dims[1] = outputHeight;
- 764 dims[2] = outputWidth;
- 765 dims[3] = outputDur;
- 766
- 767 if(!(V1) || CudaNdarray_HOST_DIMS(V1)[0]!=dims[0] ||
- 768 CudaNdarray_HOST_DIMS(V1)[1]!=dims[1] ||
- 769 CudaNdarray_HOST_DIMS(V1)[2]!=dims[2] ||
- 770 CudaNdarray_HOST_DIMS(V1)[3]!=dims[3] ||
- 771 CudaNdarray_HOST_DIMS(V1)[4]!=dims[4]){
- 772 Py_XDECREF(V1);
- 773 V1 = (CudaNdarray*)CudaNdarray_NewDims(5,dims);
- 774 if (!(V1)) {
- 775
- 776 PyErr_Format(PyExc_MemoryError, "GpuConv3D: could not allocate output");
- 777 {
- 778 __failure = 11;
- 779 if (!PyErr_Occurred()) {
- 780 PyErr_SetString(PyExc_RuntimeError,
- 781 "Unexpected error in an Op's C code. "
- 782 "No Python exception was set.");
- 783 }
- 784 goto __label_11;}
- 785 }
- 786 }
- 787 { // extra scope so fail will not cross declarations
- 788 //#define ELEM_AT(x, i) * ( dtype_ ## x *) ( x->data + (i) )####################
- 789
- 790 const int ws4 = CudaNdarray_HOST_STRIDES(V5)[4];
- 791 const int vs4 = CudaNdarray_HOST_STRIDES(V3)[4];
- 792 const int ws3 = CudaNdarray_HOST_STRIDES(V5)[3];
- 793 const int vs3 = CudaNdarray_HOST_STRIDES(V3)[3];
- 794 const int ws2 = CudaNdarray_HOST_STRIDES(V5)[2];
- 795 const int vs2 = CudaNdarray_HOST_STRIDES(V3)[2];
- 796 const int ws1 = CudaNdarray_HOST_STRIDES(V5)[1];
- 797 const int vs1 = CudaNdarray_HOST_STRIDES(V3)[1];
- 798 const int ws0 = CudaNdarray_HOST_STRIDES(V5)[0];
- 799 const int vs0 = CudaNdarray_HOST_STRIDES(V3)[0];
- 800
- 801 // Compute H
- 802 //H[i,x,y,t,j] = b_j + sum_k sum_l sum_m sum_z W[j,k,l,m,z] V[i, dr*r+k,dc*c+l,dt*t+m,z]
- 803
- 804 bool out_contiguous = CudaNdarray_is_c_contiguous(V1);
- 805 int version = -1;
- 806 int verbose = 0;
- 807 bool subsample =(dr>1)||(dc>1)||(dt>1);
- 808 bool b_strided = (CudaNdarray_HOST_STRIDES(V7)[0]!=1) && !(CudaNdarray_HOST_STRIDES(V7)[0]==0 && outputChannels==1);
- 809 bool work_complete = false;
- 810
- 811 if(out_contiguous && !b_strided && (version==0||version==-1) && outputDur<=512 && !work_complete){
- 812 //conv_rows_stack
- 813 dim3 grid(outputHeight*outputWidth,batchSize*outputChannels);
- 814 dim3 threads(outputDur);
- 815
- 816 int shared_size=0;
- 817 conv_rows_stack<<<grid, threads, shared_size>>>(
- 818 CudaNdarray_DEV_DATA(V3), CudaNdarray_DEV_DATA(V5), CudaNdarray_DEV_DATA(V7), CudaNdarray_DEV_DATA(V1),
- 819 vidHeight, vidWidth, vidDur,
- 820 filterHeight, filterWidth, filterDur,
- 821 outputChannels, inputChannels,
- 822 dr,dc,dt,
- 823 vs3,vs2,vs1,vs4,vs0,
- 824 ws3,ws2,ws1,ws4,ws0);
- 825
- 826 CNDA_THREAD_SYNC;
- 827 cudaError_t sts = cudaGetLastError();
- 828 if (cudaSuccess == sts)
- 829 {
- 830 work_complete = true;
- 831 if (verbose>1) printf("threads.x=%i, threads.y=%i, grid.x=%i, grid.y=%i, shared_size=%i, nb_threads=%i\n", threads.x, threads.y, grid.x, grid.y, shared_size, threads.x * threads.y);
- 832 if (verbose) printf("INFO: used 'conv_rows_stack' version\n");
- 833 }
- 834 else
- 835 {
- 836 if (verbose) printf("threads.x=%i, threads.y=%i, grid.x=%i, grid.y=%i, shared_size=%i, nb_threads=%i\n", threads.x, threads.y, grid.x, grid.y, shared_size, threads.x * threads.y);
- 837 if (verbose) printf("ERROR: all implementations failed for GpuConv3D! (%s)",cudaGetErrorString(sts));
- 838 PyErr_Format(PyExc_RuntimeError, "ERROR: all implementations failed for GpuConv3D! (%s)",
- 839 cudaGetErrorString(sts));
- 840 {
- 841 __failure = 11;
- 842 if (!PyErr_Occurred()) {
- 843 PyErr_SetString(PyExc_RuntimeError,
- 844 "Unexpected error in an Op's C code. "
- 845 "No Python exception was set.");
- 846 }
- 847 goto __label_11;}
- 848 }
- 849
- 850
- 851 }
- 852
- 853 if(!work_complete){
- 854 PyErr_Format(PyExc_RuntimeError, "ERROR: no implementations executed for this GpuConv3D!");
- 855 {
- 856 __failure = 11;
- 857 if (!PyErr_Occurred()) {
- 858 PyErr_SetString(PyExc_RuntimeError,
- 859 "Unexpected error in an Op's C code. "
- 860 "No Python exception was set.");
- 861 }
- 862 goto __label_11;}
- 863 }
- 864
- 865 }}}}}}} //extra scope so error handler jumps don't cross declarations
- 866 ///////////// < /code generated by GpuConv3D >
- 867 __label_11:
- 868
- 869 double __DUMMY_11;
- 870
- 871 }
- 872 __label_10:
- 873
- 874 if (V9) {
- 875 Py_XDECREF(V9);
- 876 }
- 877
- 878 {Py_XDECREF(py_V9);}
- 879
- 880 double __DUMMY_10;
- 881
- 882 }
- 883 __label_8:
- 884
- 885 //std::cerr << "cleanup " << py_V7 << " " << V7 << "\n";
- 886 //fprintf(stderr, "c_cleanup CNDA py_object w refcnt %p %i\n", py_V7, (py_V7->ob_refcnt));
- 887 if (V7)
- 888 {
- 889 //fprintf(stderr, "c_cleanup CNDA cn_object w refcnt %p %i\n", V7, (V7->ob_refcnt));
- 890 Py_XDECREF(V7);
- 891 }
- 892 //std::cerr << "cleanup done" << py_V7 << "\n";
- 893
- 894 {Py_XDECREF(py_V7);}
- 895
- 896 double __DUMMY_8;
- 897
- 898 }
- 899 __label_6:
- 900
- 901 //std::cerr << "cleanup " << py_V5 << " " << V5 << "\n";
- 902 //fprintf(stderr, "c_cleanup CNDA py_object w refcnt %p %i\n", py_V5, (py_V5->ob_refcnt));
- 903 if (V5)
- 904 {
- 905 //fprintf(stderr, "c_cleanup CNDA cn_object w refcnt %p %i\n", V5, (V5->ob_refcnt));
- 906 Py_XDECREF(V5);
- 907 }
- 908 //std::cerr << "cleanup done" << py_V5 << "\n";
- 909
- 910 {Py_XDECREF(py_V5);}
- 911
- 912 double __DUMMY_6;
- 913
- 914 }
- 915 __label_4:
- 916
- 917 //std::cerr << "cleanup " << py_V3 << " " << V3 << "\n";
- 918 //fprintf(stderr, "c_cleanup CNDA py_object w refcnt %p %i\n", py_V3, (py_V3->ob_refcnt));
- 919 if (V3)
- 920 {
- 921 //fprintf(stderr, "c_cleanup CNDA cn_object w refcnt %p %i\n", V3, (V3->ob_refcnt));
- 922 Py_XDECREF(V3);
- 923 }
- 924 //std::cerr << "cleanup done" << py_V3 << "\n";
- 925
- 926 {Py_XDECREF(py_V3);}
- 927
- 928 double __DUMMY_4;
- 929
- 930 }
- 931 __label_2:
- 932
- 933 if (!__failure) {
- 934
- 935 //std::cerr << "sync\n";
- 936 if (NULL == V1) {
- 937 // failure: sync None to storage
- 938 Py_XDECREF(py_V1);
- 939 py_V1 = Py_None;
- 940 Py_INCREF(py_V1);
- 941 }
- 942 else
- 943 {
- 944 if (py_V1 != (PyObject*)V1)
- 945 {
- 946 Py_XDECREF(py_V1);
- 947 py_V1 = (PyObject*)V1;
- 948 Py_INCREF(py_V1);
- 949 }
- 950 assert(py_V1->ob_refcnt);
- 951 }
- 952
- 953 PyObject* old = PyList_GET_ITEM(storage_V1, 0);
- 954 {Py_XINCREF(py_V1);}
- 955 PyList_SET_ITEM(storage_V1, 0, py_V1);
- 956 {Py_XDECREF(old);}
- 957 }
- 958
- 959 //std::cerr << "cleanup " << py_V1 << " " << V1 << "\n";
- 960 //fprintf(stderr, "c_cleanup CNDA py_object w refcnt %p %i\n", py_V1, (py_V1->ob_refcnt));
- 961 if (V1)
- 962 {
- 963 //fprintf(stderr, "c_cleanup CNDA cn_object w refcnt %p %i\n", V1, (V1->ob_refcnt));
- 964 Py_XDECREF(V1);
- 965 }
- 966 //std::cerr << "cleanup done" << py_V1 << "\n";
- 967
- 968 {Py_XDECREF(py_V1);}
- 969
- 970 double __DUMMY_2;
- 971
- 972 }
- 973
- 974
- 975 if (__failure) {
- 976 // When there is a failure, this code puts the exception
- 977 // in __ERROR.
- 978 PyObject* err_type = NULL;
- 979 PyObject* err_msg = NULL;
- 980 PyObject* err_traceback = NULL;
- 981 PyErr_Fetch(&err_type, &err_msg, &err_traceback);
- 982 if (!err_type) {err_type = Py_None;Py_INCREF(Py_None);}
- 983 if (!err_msg) {err_msg = Py_None; Py_INCREF(Py_None);}
- 984 if (!err_traceback) {err_traceback = Py_None; Py_INCREF(Py_None);}
- 985 PyObject* old_err_type = PyList_GET_ITEM(__ERROR, 0);
- 986 PyObject* old_err_msg = PyList_GET_ITEM(__ERROR, 1);
- 987 PyObject* old_err_traceback = PyList_GET_ITEM(__ERROR, 2);
- 988 PyList_SET_ITEM(__ERROR, 0, err_type);
- 989 PyList_SET_ITEM(__ERROR, 1, err_msg);
- 990 PyList_SET_ITEM(__ERROR, 2, err_traceback);
- 991 {Py_XDECREF(old_err_type);}
- 992 {Py_XDECREF(old_err_msg);}
- 993 {Py_XDECREF(old_err_traceback);}
- 994 }
- 995 // The failure code is returned to index what code block failed.
- 996 return __failure;
- 997
- 998 }
- 999 };
- 1000 }
- 1001
- 1002
- 1003 static int __struct_compiled_op_582fb0484ff243626e2710b17d099d1d_executor(__struct_compiled_op_582fb0484ff243626e2710b17d099d1d* self) {
- 1004 return self->run();
- 1005 }
- 1006
- 1007 static void __struct_compiled_op_582fb0484ff243626e2710b17d099d1d_destructor(void* executor, void* self) {
- 1008 delete ((__struct_compiled_op_582fb0484ff243626e2710b17d099d1d*)self);
- 1009 }
- 1010
- 1011 //////////////////////
- 1012 //// Functions
- 1013 //////////////////////
- 1014 static PyObject * instantiate(PyObject * self, PyObject *argtuple) {
- 1015 assert(PyTuple_Check(argtuple));
- 1016 if (6 != PyTuple_Size(argtuple)){
- 1017 PyErr_Format(PyExc_TypeError, "Wrong number of arguments, expected 6, got %i", (int)PyTuple_Size(argtuple));
- 1018 return NULL;
- 1019 }
- 1020 __struct_compiled_op_582fb0484ff243626e2710b17d099d1d* struct_ptr = new __struct_compiled_op_582fb0484ff243626e2710b17d099d1d();
- 1021 struct_ptr->init( PyTuple_GET_ITEM(argtuple, 0),PyTuple_GET_ITEM(argtuple, 1),PyTuple_GET_ITEM(argtuple, 2),PyTuple_GET_ITEM(argtuple, 3),PyTuple_GET_ITEM(argtuple, 4),PyTuple_GET_ITEM(argtuple, 5) );
- 1022 PyObject* thunk = PyCObject_FromVoidPtrAndDesc((void*)(&__struct_compiled_op_582fb0484ff243626e2710b17d099d1d_executor), struct_ptr, __struct_compiled_op_582fb0484ff243626e2710b17d099d1d_destructor);
- 1023 return thunk; }
- 1024
- 1025 //////////////////////
- 1026 //// Module init
- 1027 //////////////////////
- 1028 static PyMethodDef MyMethods[] = {
- 1029 {"instantiate", instantiate, METH_VARARGS, "undocumented"} ,
- 1030 {NULL, NULL, 0, NULL}
- 1031 };
- 1032 PyMODINIT_FUNC init582fb0484ff243626e2710b17d099d1d(void){
- 1033 import_array();
- 1034 (void) Py_InitModule("582fb0484ff243626e2710b17d099d1d", MyMethods);
- 1035 }
- 1036
- ===============================
- In file included from /opt/apps/intel14/mvapich2_2_0/python/2.7.6/include/python2.7/Python.h:8,
- from mod.cu:1:
- /opt/apps/intel14/mvapich2_2_0/python/2.7.6/include/python2.7/pyconfig.h:1179:1: warning: "_POSIX_C_SOURCE" redefined
- In file included from /opt/apps/cuda/5.5/bin/..//include/host_config.h:119,
- from /opt/apps/cuda/5.5/bin/..//include/cuda_runtime.h:59,
- from <command-line>:0:
- /usr/include/features.h:162:1: warning: this is the location of the previous definition
- In file included from /opt/apps/intel14/mvapich2_2_0/python/2.7.6/include/python2.7/Python.h:8,
- from mod.cu:1:
- /opt/apps/intel14/mvapich2_2_0/python/2.7.6/include/python2.7/pyconfig.h:1201:1: warning: "_XOPEN_SOURCE" redefined
- In file included from /opt/apps/cuda/5.5/bin/..//include/host_config.h:119,
- from /opt/apps/cuda/5.5/bin/..//include/cuda_runtime.h:59,
- from <command-line>:0:
- /usr/include/features.h:164:1: warning: this is the location of the previous definition
- mod.cu(646): error: class "tagPyArrayObject" has no member "nd"
- ['nvcc', '-share1 error detected in the compilation of "/tmp/tmpxft_0001b00a_00000000-8_mod.cpp1.ii".
- d', '-g', '-O3', '-use_fast_math', '-arch=sm_35', '-m64', '-Xcompiler', '-fno-math-errno,-Wno-unused-label,-Wno-unused-variable,-Wno-write-strings,-DCUDA_NDARRAY_CUH=aea3043c359bf8caa2336b3dc5baec95,-D NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION,-fPIC', '-Xlinker', '-rpath,/home1/02246/srm89/.theano/compiledir_Linux-2.6.32-431.17.1.el6.x86_64-x86_64-with-centos-6.5-Final-x86_64-2.7.6-64/cuda_ndarray', '-I/home1/02246/srm89/.theano/compiledir_Linux-2.6.32-431.17.1.el6.x86_64-x86_64-with-centos-6.5-Final-x86_64-2.7.6-64/cuda_ndarray', '-I=/opt/apps/cuda/5.5/bin/include', '-I/opt/apps/intel14/mvapich2_2_0/python/2.7.6/lib/python2.7/site-packages/numpy/core/include', '-I/opt/apps/intel14/mvapich2_2_0/python/2.7.6/include/python2.7', '-I/home1/02246/srm89/Theano-3dfftconv/theano/sandbox/cuda', '-o', '/home1/02246/srm89/.theano/compiledir_Linux-2.6.32-431.17.1.el6.x86_64-x86_64-with-centos-6.5-Final-x86_64-2.7.6-64/tmp2sDGM0/582fb0484ff243626e2710b17d099d1d.so', 'mod.cu', '-L/home1/02246/srm89/.theano/compiledir_Linux-2.6.32-431.17.1.el6.x86_64-x86_64-with-centos-6.5-Final-x86_64-2.7.6-64/cuda_ndarray', '-L/opt/apps/intel14/mvapich2_2_0/python/2.7.6/lib', '-lpython2.7', '-lcudart', '-lcublas', '-lcuda_ndarray']
- Traceback (most recent call last):
- File "lenet_final-3D-fin.py", line 307, in <module>
- evaluate_lenet5()
- File "lenet_final-3D-fin.py", line 227, in evaluate_lenet5
- y: test_set_y[index * batch_size: (index + 1) * batch_size]})
- File "/home1/02246/srm89/Theano-3dfftconv/theano/compile/function.py", line 261, in function
- profile=profile)
- File "/home1/02246/srm89/Theano-3dfftconv/theano/compile/pfunc.py", line 511, in pfunc
- on_unused_input=on_unused_input)
- File "/home1/02246/srm89/Theano-3dfftconv/theano/compile/function_module.py", line 1332, in orig_function
- defaults)
- File "/home1/02246/srm89/Theano-3dfftconv/theano/compile/function_module.py", line 1198, in create
- _fn, _i, _o = self.linker.make_thunk(input_storage=input_storage_lists)
- File "/home1/02246/srm89/Theano-3dfftconv/theano/gof/link.py", line 489, in make_thunk
- output_storage=output_storage)[:3]
- File "/home1/02246/srm89/Theano-3dfftconv/theano/gof/vm.py", line 888, in make_all
- no_recycling))
- File "/home1/02246/srm89/Theano-3dfftconv/theano/sandbox/cuda/__init__.py", line 236, in make_thunk
- compute_map, no_recycling)
- File "/home1/02246/srm89/Theano-3dfftconv/theano/gof/op.py", line 618, in make_thunk
- output_storage=node_output_storage)
- File "/home1/02246/srm89/Theano-3dfftconv/theano/gof/cc.py", line 992, in make_thunk
- keep_lock=keep_lock)
- File "/home1/02246/srm89/Theano-3dfftconv/theano/gof/cc.py", line 935, in __compile__
- keep_lock=keep_lock)
- File "/home1/02246/srm89/Theano-3dfftconv/theano/gof/cc.py", line 1372, in cthunk_factory
- key=key, fn=self.compile_cmodule_by_step, keep_lock=keep_lock)
- File "/home1/02246/srm89/Theano-3dfftconv/theano/gof/cmodule.py", line 1005, in module_from_key
- module = next(compile_steps)
- File "/home1/02246/srm89/Theano-3dfftconv/theano/gof/cc.py", line 1287, in compile_cmodule_by_step
- preargs=preargs)
- File "/home1/02246/srm89/Theano-3dfftconv/theano/sandbox/cuda/nvcc_compiler.py", line 414, in compile_str
- 'for cmd', ' '.join(cmd))
- Exception: ('The following error happened while compiling the node', GpuConv3D(GpuDimShuffle{0,3,4,1,2}.0, <CudaNdarrayType(float32, 5D)>, <CudaNdarrayType(float32, vector)>, <TensorType(int64, vector)>), '\n', 'nvcc return status', 2, 'for cmd', 'nvcc -shared -g -O3 -use_fast_math -arch=sm_35 -m64 -Xcompiler -fno-math-errno,-Wno-unused-label,-Wno-unused-variable,-Wno-write-strings,-DCUDA_NDARRAY_CUH=aea3043c359bf8caa2336b3dc5baec95,-D NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION,-fPIC -Xlinker -rpath,/home1/02246/srm89/.theano/compiledir_Linux-2.6.32-431.17.1.el6.x86_64-x86_64-with-centos-6.5-Final-x86_64-2.7.6-64/cuda_ndarray -I/home1/02246/srm89/.theano/compiledir_Linux-2.6.32-431.17.1.el6.x86_64-x86_64-with-centos-6.5-Final-x86_64-2.7.6-64/cuda_ndarray -I=/opt/apps/cuda/5.5/bin/include -I/opt/apps/intel14/mvapich2_2_0/python/2.7.6/lib/python2.7/site-packages/numpy/core/include -I/opt/apps/intel14/mvapich2_2_0/python/2.7.6/include/python2.7 -I/home1/02246/srm89/Theano-3dfftconv/theano/sandbox/cuda -o /home1/02246/srm89/.theano/compiledir_Linux-2.6.32-431.17.1.el6.x86_64-x86_64-with-centos-6.5-Final-x86_64-2.7.6-64/tmp2sDGM0/582fb0484ff243626e2710b17d099d1d.so mod.cu -L/home1/02246/srm89/.theano/compiledir_Linux-2.6.32-431.17.1.el6.x86_64-x86_64-with-centos-6.5-Final-x86_64-2.7.6-64/cuda_ndarray -L/opt/apps/intel14/mvapich2_2_0/python/2.7.6/lib -lpython2.7 -lcudart -lcublas -lcuda_ndarray', '[GpuConv3D(<CudaNdarrayType(float32, (False, False, False, False, True))>, <CudaNdarrayType(float32, 5D)>, <CudaNdarrayType(float32, vector)>, <TensorType(int64, vector)>)]')
- Skipping empty Profile
- [c443-003.stampede.tacc.utexas.edu:mpispawn_0][child_handler] MPI process (rank: 0, pid: 110545) exited with status 1
Advertisement
Add Comment
Please, Sign In to add comment