Révision 144

Ising/GPU/Ising2D-GPU-Global.py (revision 144)
217 217
        for platform in cl.get_platforms():
218 218
            for device in platform.get_devices():
219 219
                OCL_vendor[Id]=platform.vendor.lstrip().rstrip()
220
                OCL_type[Id]=cl.device_type.to_string(device.type)
220
                #OCL_type[Id]=cl.device_type.to_string(device.type)
221
                OCL_type[Id]="xPU"
221 222
                OCL_description[Id]=device.name.lstrip().rstrip()
222 223
                print "* Device #%i from %s of type %s : %s" % (Id,OCL_vendor[Id],OCL_type[Id],OCL_description[Id])
223 224
                Id=Id+1
Ising/GPU/Ising2D-GPU-One.py (revision 144)
184 184
    # Primary Device selection based on Device Id
185 185
    for platform in cl.get_platforms():
186 186
        for device in platform.get_devices():
187
            deviceType=cl.device_type.to_string(device.type)
187
            #deviceType=cl.device_type.to_string(device.type)
188
            deviceType="xPU"
188 189
            if Id==Device and not HasGPU:
189 190
                GPU=device
190 191
                print "CPU/GPU selected: ",device.name
191 192
                HasGPU=True
192 193
            Id=Id+1
193
    # Default Device selection based on ALU Type
194
    for platform in cl.get_platforms():
195
        for device in platform.get_devices():
196
            deviceType=cl.device_type.to_string(device.type)
197
            if deviceType=="GPU" and Alu=="GPU" and not HasGPU:
198
                GPU=device
199
                print "GPU selected: ",device.name
200
                HasGPU=True
201
            if deviceType=="CPU" and Alu=="CPU" and not HasGPU:        
202
                GPU=device
203
                print "CPU selected: ",device.name
204
                HasGPU=True
205 194
            
206 195
    # Je cree le contexte et la queue pour son execution
207 196
    # ctx = cl.create_some_context()
......
383 372
        Id=1
384 373
        for platform in cl.get_platforms():
385 374
            for device in platform.get_devices():
386
                deviceType=cl.device_type.to_string(device.type)
375
                #deviceType=cl.device_type.to_string(device.type)
376
                deviceType="xPU"
387 377
                print "Device #%i of type %s : %s" % (Id,deviceType,device.name)
388 378
                Id=Id+1
389 379

  
Ising/GPU/Ising2D-GPU.py (revision 144)
361 361
    # Primary Device selection based on Device Id
362 362
    for platform in cl.get_platforms():
363 363
        for device in platform.get_devices():
364
            deviceType=cl.device_type.to_string(device.type)
364
            #deviceType=cl.device_type.to_string(device.type)
365
            deviceType="xPU"
365 366
            if Id==Device and not HasGPU:
366 367
                GPU=device
367 368
                print "CPU/GPU selected: ",device.name
368 369
                HasGPU=True
369 370
            Id=Id+1
370
    # Default Device selection based on ALU Type
371
    for platform in cl.get_platforms():
372
        for device in platform.get_devices():
373
            deviceType=cl.device_type.to_string(device.type)
374
            if deviceType=="GPU" and Alu=="GPU" and not HasGPU:
375
                GPU=device
376
                print "GPU selected: ",device.name
377
                HasGPU=True
378
            if deviceType=="CPU" and Alu=="CPU" and not HasGPU:        
379
                GPU=device
380
                print "CPU selected: ",device.name
381
                HasGPU=True
382 371
                                
383 372
    # Je cree le contexte et la queue pour son execution
384 373
    # ctx = cl.create_some_context()
......
682 671
        Id=1
683 672
        for platform in cl.get_platforms():
684 673
            for device in platform.get_devices():
685
                deviceType=cl.device_type.to_string(device.type)
674
                #deviceType=cl.device_type.to_string(device.type)
675
                deviceType="xPU"
686 676
                print "Device #%i of type %s : %s" % (Id,deviceType,device.name)
687 677
                Id=Id+1
688 678

  
Ising/GPU/Ising2D-GPU-Local.py (revision 144)
246 246
        for platform in cl.get_platforms():
247 247
            for device in platform.get_devices():
248 248
                OCL_vendor[Id]=platform.vendor.lstrip().rstrip()
249
                OCL_type[Id]=cl.device_type.to_string(device.type)
249
                #OCL_type[Id]=cl.device_type.to_string(device.type)
250
                OCL_type[Id]="xPU"
250 251
                OCL_description[Id]=device.name.lstrip().rstrip()
251 252
                print "* Device #%i from %s of type %s : %s" % (Id,OCL_vendor[Id],OCL_type[Id],OCL_description[Id])
252 253
                Id=Id+1

Formats disponibles : Unified diff