Révision 194 Pi/XPU/PiXPU.py
PiXPU.py (revision 194) | ||
---|---|---|
454 | 454 |
Context=XPU.make_context() |
455 | 455 |
|
456 | 456 |
try: |
457 |
#mod = SourceModule(KernelCodeCuda(),options=['--compiler-options','-DTRNG=%i -DTYPE=%s' % (Marsaglia[RNG],Computing[ValueType])])
|
|
457 |
mod = SourceModule(KernelCodeCuda(),options=['--compiler-options','-DTRNG=%i -DTYPE=%s' % (Marsaglia[RNG],Computing[ValueType])]) |
|
458 | 458 |
#mod = SourceModule(KernelCodeCuda(),nvcc='nvcc',keep=True) |
459 | 459 |
# Needed to set the compiler via ccbin for CUDA9 implementation |
460 |
mod = SourceModule(KernelCodeCuda(),options=['-ccbin','clang-3.8','--compiler-options','-DTRNG=%i' % Marsaglia[RNG],'-DTYPE=%s' % Computing[ValueType],'-DTEST=%s' % Test[TestType]],keep=True)
|
|
460 |
#mod = SourceModule(KernelCodeCuda(),options=['-ccbin','clang-3.9','--compiler-options','-DTRNG=%i' % Marsaglia[RNG],'-DTYPE=%s' % Computing[ValueType],'-DTEST=%s' % Test[TestType]],keep=True)
|
|
461 | 461 |
except: |
462 | 462 |
print("Compilation seems to break") |
463 | 463 |
|
... | ... | |
495 | 495 |
Context.pop() |
496 | 496 |
|
497 | 497 |
Context.detach() |
498 |
|
|
498 | 499 |
return(OutputCU) |
499 | 500 |
|
500 | 501 |
def MetropolisOpenCL(InputCL): |
... | ... | |
910 | 911 |
Inside=OutputCU['Inside'] |
911 | 912 |
NewIterations=OutputCU['NewIterations'] |
912 | 913 |
Duration=OutputCU['Duration'] |
913 |
except: |
|
914 |
print("Problem with (%i,%i) // computations on Cuda" % (Blocks,Threads)) |
|
915 |
try: |
|
916 | 914 |
pycuda.context.pop() |
917 | 915 |
except: |
918 |
pass
|
|
916 |
print("Problem with (%i,%i) // computations on Cuda" % (Blocks,Threads))
|
|
919 | 917 |
elif GpuStyle=='OpenCL': |
920 | 918 |
try: |
921 | 919 |
InputCL={} |
Formats disponibles : Unified diff