0

Xeon Phi を検出する小さなプログラムを作成しました。これがコード スニペットです。

        std::vector<cl::Platform> platformList(5);
    std::vector<cl::Device> deviceList;
    cl::Platform::get(&platformList);
    if(platformList.size() == 0){
            std::cout << "No Platforms found. Check OpenCL installation!" << std::endl;
            exit(1);
    }

    for(i=0; i<platformList.size(); i++){
    // for(i=0; i<1; i++){
            std::cout << platformList[i].getInfo<CL_PLATFORM_NAME>()<< std::endl;
            platformList[i].getDevices(CL_DEVICE_TYPE_ALL, &deviceList);
            if(deviceList.size() == 0){
                    std::cout << "No Devices found. Check OpenCL installation!" << std::endl;
                    exit(1);
            }

            for(j=0; j<deviceList.size(); j++){
                    // dims = deviceList[j].getInfo<CL_DEVICE_MAX_WORK_ITEM_SIZES>();
                    // for(k=0; k<dims.size(); k++)
                    // std::cout << dims[k] << std::endl;
                    std::cout << deviceList[j].getInfo<CL_DEVICE_NAME>()<< std::endl;
            }
    }

    cl::Device device = deviceList[j-1];

    std::cout << "Using device: " << device.getInfo<CL_DEVICE_NAME>() << std::endl;

ただし、ファイは検出されません。この出力のみが得られます。

    Intel(R) OpenCL
      Intel(R) Xeon(R) CPU E5-2609 v2 @ 2.50GHz
Using device:       Intel(R) Xeon(R) CPU E5-2609 v2 @ 2.50GHz
Hello World

私たちが間違っていることを知っていますか?

PS以下はmicinfo出力を見つけることができます

    MicInfo Utility Log
Copyright 2011-2013 Intel Corporation All Rights Reserved.

Created Thu Oct  2 15:04:08 2014


    System Info
        HOST OS         : Linux
        OS Version      : 2.6.32-431.el6.x86_64
        Driver Version      : 3.2-1
        MPSS Version        : 3.2
        Host Physical Memory    : 16274 MB

Device No: 0, Device Name: mic0

    Version
        Flash Version        : 2.1.02.0390
        SMC Firmware Version     : 1.16.5078
        SMC Boot Loader Version  : 1.8.4326
        uOS Version          : 2.6.38.8+mpss3.2
        Device Serial Number     : ADKC32800437

    Board
        Vendor ID        : 0x8086
        Device ID        : 0x225d
        Subsystem ID         : 0x3608
        Coprocessor Stepping ID  : 2
        PCIe Width       : Insufficient Privileges
        PCIe Speed       : Insufficient Privileges
        PCIe Max payload size    : Insufficient Privileges
        PCIe Max read req size   : Insufficient Privileges
        Coprocessor Model    : 0x01
        Coprocessor Model Ext    : 0x00
        Coprocessor Type     : 0x00
        Coprocessor Family   : 0x0b
        Coprocessor Family Ext   : 0x00
        Coprocessor Stepping     : C0
        Board SKU        : C0PRQ-3120/3140 P/A
        ECC Mode         : Enabled
        SMC HW Revision      : Product 300W Active CS

    Cores
        Total No of Active Cores : 57
        Voltage          : 0 uV
        Frequency        : 1100000 kHz

    Thermal
        Fan Speed Control    : On
        Fan RPM          : 1200
        Fan PWM          : 20
        Die Temp         : 45 C

    GDDR
        GDDR Vendor      : Elpida
        GDDR Version         : 0x1
        GDDR Density         : 2048 Mb
        GDDR Size        : 5952 MB
        GDDR Technology      : GDDR5 
        GDDR Speed       : 5.000000 GT/s 
        GDDR Frequency       : 2500000 kHz
        GDDR Voltage         : 1501000 uV
4

1 に答える 1