WO2019237710A1 - 一种gpu服务器的显卡的识别方法、装置、设备及介质 - Google Patents

一种gpu服务器的显卡的识别方法、装置、设备及介质 Download PDF

Info

Publication number
WO2019237710A1
WO2019237710A1 PCT/CN2018/123480 CN2018123480W WO2019237710A1 WO 2019237710 A1 WO2019237710 A1 WO 2019237710A1 CN 2018123480 W CN2018123480 W CN 2018123480W WO 2019237710 A1 WO2019237710 A1 WO 2019237710A1
Authority
WO
WIPO (PCT)
Prior art keywords
graphics card
memory address
information
identifying
pci
Prior art date
Application number
PCT/CN2018/123480
Other languages
English (en)
French (fr)
Inventor
孙秀强
Original Assignee
郑州云海信息技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 郑州云海信息技术有限公司 filed Critical 郑州云海信息技术有限公司
Priority to US16/475,115 priority Critical patent/US11422827B2/en
Publication of WO2019237710A1 publication Critical patent/WO2019237710A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • G06F13/102Program control for peripheral devices where the programme performs an interfacing function, e.g. device driver
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5022Mechanisms to release resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/40Bus coupling

Definitions

  • the present invention relates to the field of GPU server computing, and in particular, to a method, a device, a device, and a medium for identifying a graphics card of a GPU server.
  • GPU servers Compared with traditional servers, GPU servers have higher computing processing capabilities, especially in areas such as artificial intelligence that require higher computing processing capabilities.
  • the graphics card is an important component. Although some current graphics cards have better performance, they are more expensive. Therefore, for most enterprises, the most commonly used graphics cards are the ones with lower prices.
  • graphics cards when applied to a GPU server, there will be a problem that the graphics card cannot be recognized under certain circumstances (usually after the GPU server is restarted), such as the AMD MI25 graphics card.
  • An object of the present invention is to provide a method, a device, a device and a medium for identifying a graphics card of a GPU server, so as to ensure that the graphics card can be normally recognized after the GPU server is restarted.
  • the present invention provides a method for identifying a graphics card of a GPU server, including:
  • the association information specifically includes version ID information and PCI device ID information
  • the determining whether the graphics card is a preset type of graphics card according to the associated information specifically includes:
  • the graphics card is not the preset type of graphics card, perform timing operation on the graphics card and enter the operating system normally.
  • the reading the memory address of the graphics card in the PCI configuration space is: reading the memory address of the BAR5 register of the graphics card in the PCI configuration space.
  • the number of the graphics cards is 8 or 16.
  • the preset type of graphics card is specifically an AMD MI25 graphics card.
  • the present invention further provides a device for identifying a graphics card of a GPU server, which is characterized by including:
  • An obtaining unit configured to obtain the associated information of the graphics card captured by the PCI enumeration operation during the boot process of the BIOS;
  • a judging unit configured to judge whether the graphics card is a preset type of graphics card according to the associated information
  • a reading unit configured to read the memory address of the graphics card in the PCI configuration space when the result of the judging unit is yes, and according to the deviation between the memory address and the graphics card in the previous work cycle Move the variable to get the actual memory address;
  • the reset unit is configured to reset the graphics card according to the actual memory address, and send a restart instruction to enter the restart operation.
  • the association information specifically includes version ID information and PCI device ID information
  • the determining unit is specifically configured to determine whether the version ID information and the PCI device ID information correspond to ID information of the preset type of graphics card, and if yes, determine that the graphics card is the preset type of graphics card.
  • the present invention also provides a device for identifying a graphics card of a GPU server, which includes a memory for storing a computer program;
  • a processor configured to implement the steps of the method for identifying a graphics card of a GPU server when the computer program is executed.
  • the present invention also provides a computer-readable storage medium.
  • the computer-readable storage medium stores a computer program, and the computer program implements a graphics card of a GPU server as described above when executed by a processor. Steps of the identification method.
  • association information of a graphics card captured by a PCI enumeration operation is obtained; whether the graphics card is a preset type of graphics card according to the association information; if it is , Then read the memory address of the graphics card in the PCI configuration space, and obtain the actual memory address according to the memory address and the offset variable of the graphics card in the previous work cycle; reset the graphics card according to the actual memory address, and send a restart instruction to Enter the restart operation.
  • the actual memory address of the graphics card is obtained from the memory address in the PCI configuration space and the offset variable in the previous work cycle, and the graphics card is reset according to the memory address. After resetting, the graphics card will not be in working state. After restarting, the graphics card will be released, so it can be identified and put into normal use.
  • this method can use a graphics card with a lower cost, which can reduce the dependence on a graphics card with a higher cost, and reduce the procurement cost.
  • the identification device, device, and medium of the graphics card of the GPU server provided by the present invention also have the above-mentioned beneficial effects.
  • FIG. 1 is a flowchart of a method for identifying a graphics card of a GPU server according to an embodiment of the present invention
  • FIG. 2 is a structural diagram of an apparatus for allocating resources according to a type of a PCI device according to an embodiment of the present invention.
  • the core of the present invention is to provide a method, a device, a device and a medium for identifying a graphics card of a GPU server, so as to ensure that the graphics card can be recognized normally after the GPU server is restarted.
  • FIG. 1 is a flowchart of a method for identifying a graphics card of a GPU server according to an embodiment of the present invention. As shown in Figure 1, the method includes:
  • BIOS is a group of programs that are solidified on a ROM chip on the motherboard of a computer or server device. It saves the most important basic input and output programs of the computer or server, the self-test program after booting, and the system self-starting program. Therefore, its main function is to provide the lowest level of hardware settings and control channels for the computer or server.
  • the type of the graphics card mentioned in the present invention is not limited, and may be, for example, an AMD MI25 graphics card.
  • the BIOS When booting, the BIOS needs to be executed.
  • the normal operations include the PCI enumeration operation, that is, to filter out each PCI device (including the graphics card) in the system using some filtering conditions.
  • the enumeration method is different.
  • Linux systems do not directly enumerate the graphics card functions like Windows systems. They only use shell scripts or read the PCI device configuration space to obtain PCI device information. It can be understood that the PCI enumeration operation is a prior art and a content well known to those skilled in the art, and the detailed content is not repeated here.
  • S11 Determine whether the graphics card is a preset type of graphics card according to the associated information; if so, proceed to S12, otherwise proceed to S14.
  • the graphics card is a preset type of graphics card based on the associated information. It is understandable that the preset type of graphics card is not specific. Refers to a certain type of graphics card, there can be multiple types. For example, it can be an AMD MI25 graphics card.
  • the association information specifically includes version ID information and PCI device ID information.
  • S11 specifically includes:
  • S12 Read the memory address of the graphics card in the PCI configuration space, and obtain the actual memory address according to the memory address and the offset variable of the graphics card in the previous work cycle.
  • Each graphics card has a corresponding memory address in the PCI configuration space, but there may be a certain offset during use, so the actual memory address of the current graphics card is different from the memory address in the PCI configuration space.
  • the specific deviation is Offset, and the offset is generated by the graphics card in the previous work cycle. Therefore, the specific value of the offset can be determined through the previous work cycle.
  • This step is to determine the actual memory address of the graphics card through the memory address and offset of the graphics card in the PCI configuration space.
  • the actual memory address is the current correct memory address of the graphics card.
  • reading the memory address of the graphics card in the PCI configuration space is specifically: reading the memory address of the BAR5 register of the graphics card in the PCI configuration space.
  • the actual memory address of the graphics card has been determined in S12. This step is to find the corresponding graphics card according to the address, reset it, and then send a restart instruction to enter the restart operation. It can be understood that after the restart operation is performed, the graphics card can no longer be recognized as the working state because the graphics card has undergone a reset operation. After the restart, the PCI enumeration operation is still performed, the actual memory address is determined according to the memory address and offset of the graphics card, and then the sequence operation is performed according to the actual memory address. After the sequence operation is completed, the operating system can be entered normally, thereby ensuring that The graphics card can be recognized every time the computer is turned on and functions normally.
  • this method can use a graphics card with a lower cost, which can reduce the dependence on a graphics card with a higher cost, and reduce the procurement cost.
  • the associated information of the graphics card captured by the PCI enumeration operation is obtained; whether the graphics card is a preset type of graphics card according to the associated information; if it is , Then read the memory address of the graphics card in the PCI configuration space, and obtain the actual memory address according to the memory address and the offset variable of the graphics card in the previous work cycle; reset the graphics card according to the actual memory address, and send a restart instruction Enter the restart operation.
  • the actual memory address of the graphics card is obtained from the memory address in the PCI configuration space and the offset variable in the previous work cycle, and the graphics card is reset according to the memory address.
  • this method can use a graphics card with a lower cost, which can reduce the dependence on a graphics card with a higher cost, and reduce the procurement cost.
  • the number of graphics cards is 8 or 16.
  • the number of graphics cards is not limited, but considering the number of graphics cards generally supported by the GPU server, 8 or 16 is preferred in this embodiment.
  • FIG. 2 is a structural diagram of an apparatus for allocating resources according to a type of a PCI device according to an embodiment of the present invention. As shown in Figure 2, the device includes:
  • the obtaining unit 10 is configured to obtain the associated information of the graphics card captured by the PCI enumeration operation during the boot process of the BIOS.
  • the judging unit 11 is configured to judge whether the graphics card is a preset type of graphics card according to the associated information.
  • the reading unit 12 is configured to read the memory address of the graphics card in the PCI configuration space when the result of the judgment unit is yes, and obtain the actual memory address according to the memory address and the offset variable of the graphics card in the previous work cycle.
  • the reset unit 13 is configured to reset the graphics card according to the actual memory address, and sends a restart instruction to enter the restart operation.
  • the association information specifically includes version ID information and PCI device ID information
  • the determining unit 11 is specifically configured to determine whether the version ID information and the PCI device ID information correspond to ID information of a preset type of graphics card, and if yes, determine that the graphics card is a preset type of graphics card.
  • the embodiments of the device section correspond to the embodiments of the method section, the embodiments of the device section refer to the description of the embodiments of the method section, which will not be repeated here.
  • the device for identifying the graphics card of the GPU server obtains the associated information of the graphics card captured by the PCI enumeration operation during the BIOS boot process; determines whether the graphics card is a preset type of graphics card according to the associated information; if it is , Then read the memory address of the graphics card in the PCI configuration space, and obtain the actual memory address according to the memory address and the offset variable of the graphics card in the previous work cycle; reset the graphics card according to the actual memory address, and send a restart instruction to Enter the restart operation. It can be seen that in this device, the actual memory address of the graphics card is obtained from the memory address in the PCI configuration space and the offset variable in the previous work cycle, and the graphics card is reset according to the memory address.
  • the device After resetting, the graphics card will not be in working state. After restarting, the graphics card will be released, so it can be identified and put into normal use. Compared with the prior art, the device can use a lower-cost graphics card, which can reduce the dependence on a higher-cost graphics card and reduce the procurement cost.
  • the present invention also provides a device for identifying a graphics card of a GPU server.
  • the difference from the above device is that the above device is described from the perspective of functional modularity, and this embodiment is described from the perspective of a hardware entity.
  • the above method is implemented by a corresponding computer program, and the program is stored in the memory, and the processor can implement the corresponding method when it is executed.
  • a processor configured to implement steps of a method for identifying a graphics card of a GPU server according to the foregoing embodiment when executing a computer program.
  • the device for identifying the graphics card of the GPU server includes a memory and a processor.
  • the processor can implement the following method: during the booting process of the BIOS, obtain the associated information of the graphics card captured by the PCI enumeration operation; The associated information determines whether the graphics card is a preset type of graphics card; if so, reads the memory address of the graphics card in the PCI configuration space, and obtains the actual memory address according to the memory address and the offset variable of the graphics card in the previous work cycle; according to the actual The memory address resets the graphics card and sends a restart command to enter the restart operation.
  • the actual memory address of the graphics card is obtained from the memory address in the PCI configuration space and the offset variable in the previous work cycle, and the graphics card is reset according to the memory address. After resetting, the graphics card will not be in working state. After restarting, the graphics card will be released, so it can be identified and put into normal use.
  • this method can use a graphics card with a lower cost, which can reduce the dependence on a graphics card with a higher cost, and reduce the procurement cost.
  • an embodiment of the present invention further provides a computer-readable storage medium.
  • a computer program is stored on the computer-readable storage medium.
  • the computer program is executed by a processor, the method for identifying a graphics card of a GPU server according to the foregoing embodiment is implemented. step.
  • the functional units mentioned above are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.
  • the technical solution of the present invention essentially or part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium Including instructions for causing a device to perform all or part of the steps of the method described in various embodiments of the present invention.
  • the foregoing storage media include: U disks, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks or compact discs and other media that can store program codes .
  • the computer-readable storage medium provided by the embodiment of the present invention is used to implement the following method: during the booting process of the BIOS, obtaining the associated information of the graphics card captured by the PCI enumeration operation; judging whether the graphics card is preset according to the associated information The type of graphics card; if it is, read the memory address of the graphics card in the PCI configuration space, and obtain the actual memory address based on the memory address and the offset variable of the graphics card in the previous work cycle; reset the graphics card according to the actual memory address, And send a restart command to enter the restart operation.
  • the actual memory address of the graphics card is obtained from the memory address in the PCI configuration space and the offset variable in the previous work cycle, and the graphics card is reset according to the memory address. After resetting, the graphics card will not be in working state. After restarting, the graphics card will be released, so it can be identified and put into normal use.
  • this method can use a graphics card with a lower cost, which can reduce the dependence on a graphics card with a higher cost, and reduce the procurement cost.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

一种GPU服务器的显卡的识别方法、装置、设备及介质,在执行BIOS的开机过程中,获取PCI枚举操作所抓取到的显卡的关联信息(S10);判断显卡是否为预设种类显卡(S11);如果是,则读取显卡在PCI配置空间中的内存地址,并根据内存地址与偏移变量得到实际内存地址(S12);按照实际内存地址对显卡进行复位操作,并发送重启指令以进入重启操作(S13)。由此可见,该方法中,通过PCI配置空间中的内存地址和偏移变量得到显卡的实际内存地址,从而依据内存地址对显卡进行复位。复位之后,显卡就不会处于工作状态,再重启之后,显卡就会被释放,因此,能够被识别从而投入正常使用。相对于现有技术来说,本方法可以采用成本较低的显卡,降低了采购成本。

Description

一种GPU服务器的显卡的识别方法、装置、设备及介质
本申请要求于2018年6月11日提交中国专利局、申请号为201810594754.2、发明名称为“一种GPU服务器的显卡的识别方法、装置、设备及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及GPU服务器计算领域,特别是涉及一种GPU服务器的显卡的识别方法、装置、设备及介质。
背景技术
与传统的服务器相比,GPU服务器具有更高的计算处理能力,尤其是在人工智能等对于计算处理能力要求较高的领域应用更广。在GPU服务器中,其显卡是一项重要的部件。当前有的显卡虽然性能较好,但是价格上比较昂贵,因此,对于大部分企业来说,应用最多的还是价格较低的显卡。
对于部分显卡来说,应用于GPU服务器时,会出现特定环境下(通常情况是GPU服务器重启之后)无法识别出显卡的问题,例如AMD MI25显卡。
很显然,当无法识别出显卡时,就无法正常使用显卡的功能,因此,如何确保GPU服务器重启之后能够正常识别出显卡是本领域技术人员亟待解决的问题。
发明内容
本发明的目的是提供一种GPU服务器的显卡的识别方法、装置、设备及介质,用于确保GPU服务器重启之后能够正常识别出显卡。
为解决上述技术问题,本发明提供一种GPU服务器的显卡的识别方法,包括:
在执行BIOS的开机过程中,获取PCI枚举操作所抓取到的显卡的关联信息;
根据所述关联信息判断所述显卡是否为预设种类显卡;
如果是,则读取所述显卡在PCI配置空间中的内存地址,并根据所述内存地址与所述显卡在上一工作周期中的偏移变量得到实际内存地址;
按照所述实际内存地址对所述显卡进行复位操作,并发送重启指令以进入重启操作。
优选地,所述关联信息具体包括版本ID信息和PCI设备ID信息;
所述根据所述关联信息判断所述显卡是否为预设种类显卡具体包括:
判断所述版本ID信息和所述PCI设备ID信息是否均与所述预设种类显卡的ID信息对应,如果是,则确定所述显卡为所述预设种类显卡。
优选地,若所述显卡不为所述预设种类显卡,则对所述显卡进行时序操作,并正常进入操作系统。
优选地,所述读取所述显卡在PCI配置空间中的内存地址具体为:读取所述显卡在所述PCI配置空间中的BAR5寄存器的内存地址。
优选地,所述显卡的数量为8或16。
优选地,所述预设种类显卡具体为AMD MI25显卡。
为解决上述技术问题,本发明还提供一种GPU服务器的显卡的识别装置,其特征在于,包括:
获取单元,用于在执行BIOS的开机过程中,获取PCI枚举操作所抓取到的显卡的关联信息;
判断单元,用于根据所述关联信息判断所述显卡是否为预设种类显卡;
读取单元,用于在所述判断单元的结果为是时,则读取所述显卡在PCI配置空间中的内存地址,并根据所述内存地址与所述显卡在上一工作周期中的偏移变量得到实际内存地址;
复位单元,用于按照所述实际内存地址对所述显卡进行复位操作,并发送重启指令以进入重启操作。
优选地,所述关联信息具体包括版本ID信息和PCI设备ID信息;
所述判断单元具体用于判断所述版本ID信息和所述PCI设备ID信息是否均与所述预设种类显卡的ID信息对应,如果是,则确定所述显卡为所述预设种类显卡。
为解决上述技术问题,本发明还提供一种GPU服务器的显卡的识别设备,包括存储器,用于存储计算机程序;
处理器,用于执行所述计算机程序时实现如上述所述的GPU服务器的显卡的识别方法的步骤。
为解决上述技术问题,本发明还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如上述所述的GPU服务器的显卡的识别方法的步骤。
本发明所提供的GPU服务器的显卡的识别方法,在执行BIOS的开机过程中,获取PCI枚举操作所抓取到的显卡的关联信息;根据关联信息判断显卡是否为预设种类显卡;如果是,则读取显卡在PCI配置空间中的内存地址,并根据内存地址与显卡在上一工作周期中的偏移变量得到实际内存地址;按照实际内存地址对显卡进行复位操作,并发送重启指令以进入重启操作。由此可见,该方法中,通过PCI配置空间中的内存地址和上一工作周期中的偏移变量得到显卡的实际内存地址,从而依据内存地址对显卡进行复位。复位之后,显卡就不会处于工作状态,再重启之后,显卡就会被释放,因此,能够被识别从而投入正常使用。相对于现有技术来说,本方法可以采用成本较低的显卡,能够降低对成本较高的显卡的依赖性,降低了采购成本。
此外,本发明所提供的GPU服务器的显卡的识别装置、设备及介质,同样具有上述有益效果。
附图说明
为了更清楚地说明本发明实施例,下面将对实施例中所需要使用的附图做简单的介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例提供的一种GPU服务器的显卡的识别方法的流程图;
图2为本发明实施例提供的一种根据PCI设备的类型分配资源的装置 的结构图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下,所获得的所有其他实施例,都属于本发明保护范围。
本发明的核心是提供一种GPU服务器的显卡的识别方法、装置、设备及介质,用于确保GPU服务器重启之后能够正常识别出显卡。
为了使本技术领域的人员更好地理解本发明方案,下面结合附图和具体实施方式对本发明作进一步的详细说明。
图1为本发明实施例提供的一种GPU服务器的显卡的识别方法的流程图。如图1所示,该方法包括:
S10:在执行BIOS的开机过程中,获取PCI枚举操作所抓取到的显卡的关联信息。
需要说明的是,BIOS是一组固化在计算机或服务器设备主板上一个ROM芯片上的程序,它保存着计算机或服务器最重要的基本输入输出的程序、开机后自检程序和系统自启动程序,因此其主要的功能是为计算机或服务器提供最底层的硬件设置和控制途径。本发明中提到的显卡的类型不作限定,例如可以为AMD MI25显卡。
在开机时,需要执行BIOS,在这一过程中,常规操作包含有PCI枚举操作,也就是使用一些过滤条件将系统中的各PCI设备(其中就有显卡)筛选出来。对于不同的操作系统,枚举的方法不同,例如Linux系统没有Windows系统那样直接枚举显卡的函数,只有借用shell脚本或者读取PCI设备配置空间来获取PCI设备信息。可以理解的是,PCI枚举操作是现有技术,是本领域技术人员熟知的内容,详细内容在此不再赘述。
S11:根据关联信息判断显卡是否为预设种类显卡;如果是,则进入S12,否则进入S14。
在具体实施中,并不是所有的显卡都会造成重启之后无法识别的问题,因此,本步骤中就是根据关联信息判断显卡是否为预设种类显卡,可以理解的是,预设种类显卡也并不是特指某一种固定类型的显卡,可以有多种类型。例如可以为AMD MI25显卡。
作为优选地实施方式,关联信息具体包括版本ID信息和PCI设备ID信息;对应的,S11具体包括:
判断版本ID信息和PCI设备ID信息是否均与预设种类显卡的ID信息对应,如果是,则确定显卡为预设种类显卡。
S12:读取显卡在PCI配置空间中的内存地址,并根据内存地址与显卡在上一工作周期中的偏移变量得到实际内存地址。
每个显卡都在PCI配置空间中有对应的内存地址,但是在使用过程中可能会有一定的偏移量,所以当前显卡的实际内存地址与PCI配置空间中的内存地址有不同,具体偏差就是偏移量,而偏移量是该显卡在上一个工作周期中产生的,因此,可以通过上一个工作周期确定出偏移量的具体数值。
需要说明的是,正是由于在开机时,每个显卡并没有复位,即仍然处于工作状态,因此,在重启之后,该显卡无法被识别,也就无法正常使用。本步骤就是通过显卡在PCI配置空间中的内存地址和偏移量确定出显卡的实际内存地址。该实际内存地址才是该显卡当前正确的内存地址。
作为优选地实施方式S12中,读取显卡在PCI配置空间中的内存地址具体为:读取显卡在PCI配置空间中的BAR5寄存器的内存地址。
S13:按照实际内存地址对显卡进行复位操作,并发送重启指令以进入重启操作。
在S12中已经确定了显卡的实际内存地址,本步骤就是依据该地址找到对应的显卡,将其复位,然后发送重启指令进入重启操作。可以理解的是,进入重启操作后,由于显卡经过了复位操作,因此,显卡不再是工作状态能够被识别。重启之后,依然是要进行PCI枚举操作,根据显卡的内存地址和偏移量确定出实际内存地址,然后依据实际内存地址进程时序操作,当时序操作完成后则可以正常进入操作系统,从而保证每次开机都可 以识别到显卡且功能正常。
相对于现有技术来说,本方法可以采用成本较低的显卡,能够降低对成本较高的显卡的依赖性,降低了采购成本。
S14:对显卡进行时序操作,并正常进入操作系统。
需要说明的是,本步骤进入重启操作后进行的动作均为现有技术,具体的时序操作参见现有技术,本实施例不再赘述。
本实施例提供的GPU服务器的显卡的识别方法,在执行BIOS的开机过程中,获取PCI枚举操作所抓取到的显卡的关联信息;根据关联信息判断显卡是否为预设种类显卡;如果是,则读取显卡在PCI配置空间中的内存地址,并根据内存地址与显卡在上一工作周期中的偏移变量得到实际内存地址;按照实际内存地址对显卡进行复位操作,并发送重启指令以进入重启操作。由此可见,该方法中,通过PCI配置空间中的内存地址和上一工作周期中的偏移变量得到显卡的实际内存地址,从而依据内存地址对显卡进行复位。复位之后,显卡就不会处于工作状态,再重启之后,显卡就会被释放,因此,能够被识别从而投入正常使用。相对于现有技术来说,本方法可以采用成本较低的显卡,能够降低对成本较高的显卡的依赖性,降低了采购成本。
作为优选地实施方式,显卡的数量为8或16。
可以理解的是,显卡的数量不作限定,但是考虑到GPU服务器通常支持的显卡的数量,本实施例中优选8或16。
上文对于GPU服务器的显卡的识别的方法的实施例进行了详细描述,本发明还提供一种与该方法对应的装置。图2为本发明实施例提供的一种根据PCI设备的类型分配资源的装置的结构图。如图2所示,该装置包括:
获取单元10,用于在执行BIOS的开机过程中,获取PCI枚举操作所抓取到的显卡的关联信息。
判断单元11,用于根据关联信息判断显卡是否为预设种类显卡。
读取单元12,用于在判断单元的结果为是时,则读取显卡在PCI配置 空间中的内存地址,并根据内存地址与显卡在上一工作周期中的偏移变量得到实际内存地址。
复位单元13,用于按照实际内存地址对显卡进行复位操作,并发送重启指令以进入重启操作。
作为优选地实施方式,关联信息具体包括版本ID信息和PCI设备ID信息;
判断单元11具体用于判断版本ID信息和PCI设备ID信息是否均与预设种类显卡的ID信息对应,如果是,则确定显卡为预设种类显卡。
由于装置部分的实施例与方法部分的实施例相互对应,因此装置部分的实施例请参见方法部分的实施例的描述,这里暂不赘述。
本实施例提供的GPU服务器的显卡的识别装置,在执行BIOS的开机过程中,获取PCI枚举操作所抓取到的显卡的关联信息;根据关联信息判断显卡是否为预设种类显卡;如果是,则读取显卡在PCI配置空间中的内存地址,并根据内存地址与显卡在上一工作周期中的偏移变量得到实际内存地址;按照实际内存地址对显卡进行复位操作,并发送重启指令以进入重启操作。由此可见,该装置中,通过PCI配置空间中的内存地址和上一工作周期中的偏移变量得到显卡的实际内存地址,从而依据内存地址对显卡进行复位。复位之后,显卡就不会处于工作状态,再重启之后,显卡就会被释放,因此,能够被识别从而投入正常使用。相对于现有技术来说,本装置可以采用成本较低的显卡,能够降低对成本较高的显卡的依赖性,降低了采购成本。
本发明还提供一种GPU服务器的显卡的识别设备,与上文中的装置的区别在于,上文中的装置是从功能模块化的角度进行描述,而本实施例中是从硬件实体的角度进行描述。可以理解的是,上述方法是通过相应的计算机程序实现的,而将该程序存储在存储器中,则处理器在执行时,就可以实现对应的方法。具体包括存储器,用于存储计算机程序;
处理器,用于执行计算机程序时实现如上述实施例所述的GPU服务器的显卡的识别方法的步骤。
本实施例提供的GPU服务器的显卡的识别设备,包括存储器和处理器,处理器能够实现如下方法:在执行BIOS的开机过程中,获取PCI枚举操作所抓取到的显卡的关联信息;根据关联信息判断显卡是否为预设种类显卡;如果是,则读取显卡在PCI配置空间中的内存地址,并根据内存地址与显卡在上一工作周期中的偏移变量得到实际内存地址;按照实际内存地址对显卡进行复位操作,并发送重启指令以进入重启操作。由此可见,该方法中,通过PCI配置空间中的内存地址和上一工作周期中的偏移变量得到显卡的实际内存地址,从而依据内存地址对显卡进行复位。复位之后,显卡就不会处于工作状态,再重启之后,显卡就会被释放,因此,能够被识别从而投入正常使用。相对于现有技术来说,本方法可以采用成本较低的显卡,能够降低对成本较高的显卡的依赖性,降低了采购成本。
最后,本发明实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,计算机程序被处理器执行时实现如上述实施例所述的GPU服务器的显卡的识别方法的步骤。
上文中提到的功能单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台设备执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
本发明实施例提供的计算机可读存储介质,用于实现以下方法:在执行BIOS的开机过程中,获取PCI枚举操作所抓取到的显卡的关联信息;根据关联信息判断显卡是否为预设种类显卡;如果是,则读取显卡在PCI配置空间中的内存地址,并根据内存地址与显卡在上一工作周期中的偏移变量得到实际内存地址;按照实际内存地址对显卡进行复位操作,并发送 重启指令以进入重启操作。由此可见,该方法中,通过PCI配置空间中的内存地址和上一工作周期中的偏移变量得到显卡的实际内存地址,从而依据内存地址对显卡进行复位。复位之后,显卡就不会处于工作状态,再重启之后,显卡就会被释放,因此,能够被识别从而投入正常使用。相对于现有技术来说,本方法可以采用成本较低的显卡,能够降低对成本较高的显卡的依赖性,降低了采购成本。
以上对本发明所提供的GPU服务器的显卡的识别方法、装置、设备及介质进行了详细介绍。说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以对本发明进行若干改进和修饰,这些改进和修饰也落入本发明权利要求的保护范围内。
还需要说明的是,在本说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。

Claims (10)

  1. 一种GPU服务器的显卡的识别方法,其特征在于,包括:
    在执行BIOS的开机过程中,获取PCI枚举操作所抓取到的显卡的关联信息;
    根据所述关联信息判断所述显卡是否为预设种类显卡;
    如果是,则读取所述显卡在PCI配置空间中的内存地址,并根据所述内存地址与所述显卡在上一工作周期中的偏移变量得到实际内存地址;
    按照所述实际内存地址对所述显卡进行复位操作,并发送重启指令以进入重启操作。
  2. 根据权利要求1所述的GPU服务器的显卡的识别方法,其特征在于,所述关联信息具体包括版本ID信息和PCI设备ID信息;
    所述根据所述关联信息判断所述显卡是否为预设种类显卡具体包括:
    判断所述版本ID信息和所述PCI设备ID信息是否均与所述预设种类显卡的ID信息对应,如果是,则确定所述显卡为所述预设种类显卡。
  3. 根据权利要求1或2任意一项所述的GPU服务器的显卡的识别方法,其特征在于,若所述显卡不为所述预设种类显卡,则对所述显卡进行时序操作,并正常进入操作系统。
  4. 根据权利要求1所述的GPU服务器的显卡的识别方法,其特征在于,所述读取所述显卡在PCI配置空间中的内存地址具体为:读取所述显卡在所述PCI配置空间中的BAR5寄存器的内存地址。
  5. 根据权利要求1所述的GPU服务器的显卡的识别方法,其特征在于,所述显卡的数量为8或16。
  6. 根据权利要求1所述的GPU服务器的显卡的识别方法,其特征在于,所述预设种类显卡具体为AMD MI25显卡。
  7. 一种GPU服务器的显卡的识别装置,其特征在于,包括:
    获取单元,用于在执行BIOS的开机过程中,获取PCI枚举操作所抓取到的显卡的关联信息;
    判断单元,用于根据所述关联信息判断所述显卡是否为预设种类显卡;
    读取单元,用于在所述判断单元的结果为是时,则读取所述显卡在PCI 配置空间中的内存地址,并根据所述内存地址与所述显卡在上一工作周期中的偏移变量得到实际内存地址;
    复位单元,用于按照所述实际内存地址对所述显卡进行复位操作,并发送重启指令以进入重启操作。
  8. 根据权利要求7所述的GPU服务器的显卡的识别装置,其特征在于,所述关联信息具体包括版本ID信息和PCI设备ID信息;
    所述判断单元具体用于判断所述版本ID信息和所述PCI设备ID信息是否均与所述预设种类显卡的ID信息对应,如果是,则确定所述显卡为所述预设种类显卡。
  9. 一种GPU服务器的显卡的识别设备,其特征在于,包括存储器,用于存储计算机程序;
    处理器,用于执行所述计算机程序时实现如权利要求1至6任一项所述的GPU服务器的显卡的识别方法的步骤。
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至6任一项所述的GPU服务器的显卡的识别方法的步骤。
PCT/CN2018/123480 2018-06-11 2018-12-25 一种gpu服务器的显卡的识别方法、装置、设备及介质 WO2019237710A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/475,115 US11422827B2 (en) 2018-06-11 2018-12-25 Method, device, apparatus for identifying graphics card of GPU server and medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810594754.2A CN108776595B (zh) 2018-06-11 2018-06-11 一种gpu服务器的显卡的识别方法、装置、设备及介质
CN201810594754.2 2018-06-11

Publications (1)

Publication Number Publication Date
WO2019237710A1 true WO2019237710A1 (zh) 2019-12-19

Family

ID=64025824

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/123480 WO2019237710A1 (zh) 2018-06-11 2018-12-25 一种gpu服务器的显卡的识别方法、装置、设备及介质

Country Status (3)

Country Link
US (1) US11422827B2 (zh)
CN (1) CN108776595B (zh)
WO (1) WO2019237710A1 (zh)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108776595B (zh) * 2018-06-11 2021-06-29 郑州云海信息技术有限公司 一种gpu服务器的显卡的识别方法、装置、设备及介质
CN109491871A (zh) * 2018-11-20 2019-03-19 浪潮电子信息产业股份有限公司 一种gpu的设备信息获取方法及装置
CN109857541A (zh) * 2018-12-12 2019-06-07 浪潮(北京)电子信息产业有限公司 一种服务器的资源分配方法、系统及相关组件
CN110750282B (zh) * 2019-10-14 2021-04-02 支付宝(杭州)信息技术有限公司 用于运行应用程序的方法、装置及gpu节点
CN111190848B (zh) * 2019-12-23 2023-09-15 曙光信息产业股份有限公司 服务器读取gpu的方法及装置
CN111930660B (zh) * 2020-07-30 2022-04-15 长沙景嘉微电子股份有限公司 Pcie通路配置方法、装置、终端和介质
CN114860343B (zh) * 2022-05-26 2024-03-26 苏州浪潮智能科技有限公司 加速卡速率调整方法、系统、终端及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201527597U (zh) * 2009-06-11 2010-07-14 英业达科技有限公司 笔记型计算机
US20140195697A1 (en) * 2013-01-10 2014-07-10 Hon Hai Precision Industry Co., Ltd. Apparatus and method for detecting functions of video card
CN104850203A (zh) * 2015-06-10 2015-08-19 联想(北京)有限公司 一种电子设备复位方法及电子设备
CN107025401A (zh) * 2017-04-19 2017-08-08 济南浪潮高新科技投资发展有限公司 一种在显卡驱动中实现ueky安全认证功能的方法
CN108776595A (zh) * 2018-06-11 2018-11-09 郑州云海信息技术有限公司 一种gpu服务器的显卡的识别方法、装置、设备及介质

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9058675B2 (en) * 2010-05-29 2015-06-16 Intel Corporation Non-volatile storage for graphics hardware
CN102799407A (zh) * 2012-07-11 2012-11-28 曙光信息产业(北京)有限公司 基于基板管理控制器进行显示的方法和装置
CN103150188B (zh) * 2013-03-19 2016-06-01 中国人民解放军国防科学技术大学 非x86指令集计算机的x86兼容显卡快速初始化方法
US9495723B2 (en) * 2013-08-09 2016-11-15 Nvidia Corporation Scale-up techniques for multi-GPU passthrough
CN104360860B (zh) * 2014-11-17 2018-02-16 长城信息产业股份有限公司 一种国产自主嵌入式计算机系统及其显卡驱动方法
US10339090B2 (en) * 2016-05-23 2019-07-02 Advoli Limited System for implementing MXM on a PCI card
CN106155689B (zh) * 2016-07-02 2019-04-12 广东中兴新支点技术有限公司 基于非x86平台在Linux操作系统下显示的方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201527597U (zh) * 2009-06-11 2010-07-14 英业达科技有限公司 笔记型计算机
US20140195697A1 (en) * 2013-01-10 2014-07-10 Hon Hai Precision Industry Co., Ltd. Apparatus and method for detecting functions of video card
CN104850203A (zh) * 2015-06-10 2015-08-19 联想(北京)有限公司 一种电子设备复位方法及电子设备
CN107025401A (zh) * 2017-04-19 2017-08-08 济南浪潮高新科技投资发展有限公司 一种在显卡驱动中实现ueky安全认证功能的方法
CN108776595A (zh) * 2018-06-11 2018-11-09 郑州云海信息技术有限公司 一种gpu服务器的显卡的识别方法、装置、设备及介质

Also Published As

Publication number Publication date
CN108776595A (zh) 2018-11-09
CN108776595B (zh) 2021-06-29
US20210357235A1 (en) 2021-11-18
US11422827B2 (en) 2022-08-23

Similar Documents

Publication Publication Date Title
WO2019237710A1 (zh) 一种gpu服务器的显卡的识别方法、装置、设备及介质
US7631173B2 (en) Method and system for performing pre-boot operations from an external memory including memory address and geometry
US9558016B2 (en) Platform system, method for changing support hardware configuration of universal extensible firmware interface basic input output system and computer program product
WO2019237713A1 (zh) 一种根据pci设备的类型分配资源的方法、装置及介质
KR101931007B1 (ko) 컴퓨팅 디바이스의 초기화 트레이스
WO2015149673A1 (en) Method, server, and system for sharing resource data
WO2015103917A1 (zh) 无线路由设备管理方法和装置
WO2016206514A1 (zh) 启动处理方法及装置
CN113157347A (zh) 一种探针的自动部署方法、电子设备和存储介质
US20160103688A1 (en) Method of Starting Computing System
US10491736B2 (en) Computer system and method thereof for bluetooth data sharing between UEFI firmware and OS
CN103955649A (zh) 一种安全启动终端设备的方法
EP2869189A1 (en) Boot up of a multiprocessor computer
CN104866388B (zh) 数据处理方法及装置
CN111597553A (zh) 病毒查杀中的进程处理方法、装置、设备及存储介质
US10114951B2 (en) Virus signature matching method and apparatus
CN106547583B (zh) 一种操作系统安装方法以及装置
WO2017076034A1 (zh) 一种对移动终端的存储器进行格式化的方法和装置
JP2014170271A (ja) 情報処理装置、初期化方法、前処理方法、及びプログラム
CN107741872B (zh) 一种虚拟机识别的审计方法、装置及虚拟机识别系统
CN113868128B (zh) 一种测试pxe引导功能的方法、装置、以及存储介质
CN111158863B (zh) 中断控制器的处理方法、装置及电子设备
CN114297009B (zh) 一种服务器测试的方法及装置、电子设备
CN110502378B (zh) 一种配置多算法协处理器自检的方法
CN108170463B (zh) 一种安卓设备的出厂设置方法和装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18922917

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18922917

Country of ref document: EP

Kind code of ref document: A1