Cable configuration method, apparatus, device, storage medium and program product
By detecting the number of cables and the type of processing device, the system automatically assigns cables to PCIe devices, solving the problems of cumbersome and inefficient PCIe switch device configuration and achieving flexible automatic configuration and efficient data transmission.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-14
- Publication Date
- 2026-03-27
AI Technical Summary
In existing technologies, PCIe switch devices are cumbersome to configure and inefficient, and need to be reconfigured after a power outage and restart, which affects the user experience.
By detecting the number of cables in place between the converter and the uplink device, the corresponding cables are automatically allocated to the processing devices in the downlink device. The PCIe device is automatically configured by adopting a uniform allocation strategy or taking into account the type of processing device and a pre-set allocation strategy.
It simplifies the configuration process, improves the overall efficiency of the device, adapts to different scenarios, avoids the problem of manual configuration after power failure and restart, and improves the user experience.
Smart Images

Figure CN116017189B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a cable configuration method, apparatus, device, storage medium, and program product. Background Technology
[0002] With the continuous improvement of the performance of various PCIe (peripheral component interconnect express, high-speed serial computer expansion bus standard) devices, more and more PCIe devices are connected to the CPU (central processing unit). PCIe switches can interconnect various PCIe devices and connect to the CPU through one or more uplink ports.
[0003] In current technology, the firmware of a PCIe Switch provides an interface for configuring PCIe devices. Users can call this interface to dynamically configure PCIe device resources and decide which uplink port to assign each PCIe device to. The configuration takes effect immediately after it is completed. However, the user's previous configuration will be lost after the Switch is powered off and restarted, and reconfiguration is required, which is cumbersome and inefficient. Summary of the Invention
[0004] This application provides a cable configuration method, apparatus, device, storage medium, and program product to improve the efficiency of PCIeSwitch device configuration and enhance user experience.
[0005] In a first aspect, embodiments of this application provide a cable configuration method applied to a converter in a downlink device, wherein the converter and an uplink device transmit data via at least one cable; the method includes:
[0006] Detect the number of cables in place between the converter and the uplink device;
[0007] Based on the number of cables, a corresponding cable is assigned to at least one processing device in the downlink device that is connected to the converter, so that each processing device can transmit data with the uplink device through the corresponding cable.
[0008] Optionally, based on the number of cables, a corresponding cable is allocated to at least one processing device in the downlink device connected to the converter, including:
[0009] If the number of cables is at least two, then the at least one processing device is allocated to the in-situ cables according to a uniform distribution strategy; and / or,
[0010] If the number of cables is one, then all processing devices are assigned to the one cable in place.
[0011] Optionally, based on the number of cables, a corresponding cable is allocated to at least one processing device in the downlink device connected to the converter, including:
[0012] According to the number of cables and the type of the at least one processing device, a corresponding cable is assigned to the at least one processing device;
[0013] The processing device is a PCIe device, and the type includes at least one of the following: NIC (network interface controller), GPU (graphics processing unit), and SSD (Solid State Drive).
[0014] Optionally, based on the number of cables and the type of the at least one processing device, corresponding cables are allocated to the at least one processing device, including:
[0015] For each type, the processing device of that type is allocated to the in-situ cables according to the number of cables in place, following a uniform distribution strategy.
[0016] Optionally, based on the number of cables, a corresponding cable is allocated to at least one processing device in the downlink device connected to the converter, including:
[0017] Based on the pre-set correspondence between the number of cables and the allocation strategy, find the allocation strategy corresponding to the number of cables currently in place, and allocate the corresponding cables to the at least one processing device according to the allocation strategy.
[0018] The correspondence is a user-defined correspondence.
[0019] Secondly, embodiments of this application provide a cable configuration device applied to a converter in a downlink device, wherein the converter and the uplink device transmit data via at least one cable; the device includes:
[0020] The detection module is used to detect the number of cables in place between the converter and the uplink device;
[0021] The allocation module is used to allocate corresponding cables to at least one processing device connected to the converter in the downlink device according to the number of cables, so that each processing device can transmit data with the uplink device through the corresponding cable.
[0022] Thirdly, embodiments of this application provide a cable configuration device, including:
[0023] At least one processor; and a memory communicatively connected to said at least one processor;
[0024] The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, cause the cable configuration device to perform the method described in any of the above aspects.
[0025] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the method described in any of the above aspects.
[0026] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the methods described in any of the above aspects.
[0027] In a sixth aspect, embodiments of this application provide an electronic device, including a CPU and a GPU Box, wherein the GPU Box includes at least one converter, and at least one processing device connected to each converter;
[0028] The converter is used to perform the method described in any of the above aspects.
[0029] This application provides a cable configuration method, apparatus, device, storage medium, and program product. A converter in a downlink device can detect the number of cables in place between the converter and the uplink device. Based on the number of cables, it allocates corresponding cables to at least one processing device in the downlink device connected to the converter, enabling each processing device to transmit data with the uplink device through the corresponding cable. The converter can directly determine the allocation strategy for processing devices based on the number of cables, offering greater flexibility and adaptability to different scenarios, and is unaffected by power outages or restarts, effectively simplifying the configuration process and improving overall device efficiency. Attached Figure Description
[0030] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0031] Figure 1 A system architecture diagram provided for an embodiment of this application;
[0032] Figure 2 A flowchart illustrating a cable configuration method provided in an embodiment of this application;
[0033] Figure 3 This is a schematic diagram illustrating a scenario where the number of in-situ cables is 1, as provided in an embodiment of this application.
[0034] Figure 4 This is a schematic diagram of the structure of a cable configuration device provided in an embodiment of this application;
[0035] Figure 5 This is a schematic diagram of the structure of a cable configuration device provided in an embodiment of this application.
[0036] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0037] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0038] As the performance of various PCIe devices continues to improve, more and more PCIe devices are being connected to the CPU. When the number of PCIe lanes provided by the CPU is insufficient, the number of PCIe lanes in the system can be expanded through a PCIe Switch chip. The PCIe Switch can interconnect various PCIe devices and connect to the CPU of the server head unit through one or more uplink ports. The role of the PCIe Switch is to act as a router, determining which PCIe device the data coming from the CPU needs to be sent to based on the configuration information.
[0039] In some technologies, one method for allocating PCIe devices is through an interface provided by the PCIe Switch firmware (FW). The interface of the PCIe Switch firmware is called through the BMC, and the PCIe Switch device is dynamically configured manually according to the user's needs. The configuration takes effect immediately after completion. However, when there are a large number of PCIe devices, the configuration process becomes very cumbersome and inefficient. Furthermore, the default PCIe device allocation is restored when the PCIe Switch is powered off and restarted.
[0040] In view of this, embodiments of this application provide a cable configuration method that can automatically allocate corresponding cables to connected PCIe devices based on the number of cables in place between the CPU and the PCIe Switch, so that the PCIe devices can transmit data with the CPU through the corresponding cables.
[0041] Figure 1 This is a system architecture diagram provided for an embodiment of this application. For example... Figure 1 As shown, an electronic device may include at least one CPU and at least one GPU Box, and each GPU Box may be connected to at least one CPU.
[0042] The GPU Box contains at least one converter, and each converter's downstream port can connect to at least one PCIe device. The PCIe device may include, but is not limited to, at least one of an SSD, NIC, and GPU, wherein the GPU can be inserted into a GPU slot on the GPU Board.
[0043] As shown in the figure, the PCIe device specifically includes SSD0 to SSD7, NIC0 to NIC7, GPU to GPU7, and converters 0 to 3 are connected to the aforementioned PCIe device.
[0044] To enable communication with the CPU, the uplink ports of the converters can be connected to the CPU via cables for data transmission. As shown in the figure, converters 0 to 3 are equipped with uplink ports US0 to US7, which are connected to CPU0 and CPU1 via cables.
[0045] In this embodiment, the PCIe Switch can determine which cable each PCIe device is connected to the CPU via based on the cable's presence, i.e., the cable's effective conduction. Data sent by the CPU then reaches the corresponding PCIe device for processing via the corresponding cable.
[0046] In summary, the PCIe Switch in the GPU Box determines the resource allocation of PCIe devices connected to its downstream ports based on the availability of the cables that transmit data between its upstream ports and the CPU. This enables automatic configuration of PCIe devices, providing strong adaptability and flexibility. Furthermore, no manual configuration is required after the PCIe Switch is powered off, effectively simplifying the configuration process and improving the overall efficiency of the device.
[0047] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0048] Figure 2 This is a flowchart illustrating a cable configuration method provided in an embodiment of this application. The method of this embodiment can be applied to a converter in a downlink device, wherein the converter of the downlink device and the uplink device transmit data via at least one cable.
[0049] As shown in Figure 2, the method may include:
[0050] Step 201: Detect the number of cables in place between the converter and the uplink device.
[0051] Optionally, the downlink device can be a GPU Box, the uplink device can be a CPU, and the converter can be a PCIe Switch in the GPU Box. Data is transmitted between the uplink port of the PCIe Switch and the CPU via a cable.
[0052] In this step, the number of cables in place between the converter's uplink port and the uplink device can be detected in several ways, where "in place" can mean that the connection is valid. Optionally, the number of cables in place between the converter and the uplink device can be detected after the converter is powered on. In addition, the number of cables in place between the converter and the uplink device can be detected at regular intervals.
[0053] Step 202: Based on the number of cables, assign corresponding cables to at least one processing device in the downlink device that is connected to the converter, so that each processing device can transmit data with the uplink device through the corresponding cable.
[0054] The processing device can be a PCIe device, such as an SSD, NIC, or GPU. Each PCIe device is connected to the downstream port of the PCIe Switch. The PCIe Switch can allocate corresponding cables to the PCIe devices connected to the downstream port of the PCIe Switch according to the number of cables in place. In this way, the PCIe devices can transmit data with the CPU through the allocated cables.
[0055] Optionally, the execution process of the above steps can be programmed into the firmware of the PCIe Switch. After each power-on, the PCIe Switch can automatically allocate the processing device according to the number of cables. After the allocation is completed, the processing device can transmit data with the CPU through the corresponding cable.
[0056] Optionally, based on the number of cables, a corresponding cable is allocated to at least one processing device in the downlink device connected to the converter, including:
[0057] If the number of cables is at least two, then the at least one processing device is allocated to the in-situ cables according to a uniform distribution strategy; and / or,
[0058] If the number of cables is one, then all processing devices are assigned to the one cable in place.
[0059] It should be noted that the embodiments of this application may employ a uniform allocation strategy to distribute the processing devices to the in-situ cables. The uniform allocation strategy here means that the number of processing devices allocated to each cable should be as equal as possible during allocation. However, when the number of processing devices cannot be divided evenly by the number of in-situ cables, the final allocation result may not be completely average.
[0060] Optionally, the uniform allocation strategy can be implemented as follows: divide the number of processing devices by the number of cables in place, and the quotient is N. Allocate N processing devices to each cable. If there are any remaining unallocated processing devices, they can be randomly allocated among at least two cables.
[0061] For example, when there is only one cable in place, the PCIe Switch will allocate all connected PCIe devices to that cable. When there are two or more cables in place, the PCIe Switch will allocate the connected PCIe devices to the cables in place according to an even distribution strategy.
[0062] The following example illustrates the uniform allocation strategy. If there are 3 cables in place and 9 PCIe devices connected, each cable will receive 9 ÷ 3 = 3 PCIe devices. If there are 4 cables in place and 11 PCIe devices connected, the quotient of 11 divided by 4 is 2 and the remainder is 3. Therefore, each cable will first be allocated 2 PCIe devices, and then 3 cables will be randomly selected from the 4 cables. Each randomly selected cable will receive an additional PCIe device.
[0063] In this way, by following the strategy of uniform distribution, the number of PCIe devices allocated to each cable is as similar as possible, which can make the distribution of the number of PCIe devices as balanced as possible, reducing the phenomenon that too many PCIe devices are allocated to a certain cable, resulting in excessive data transmission and slow data processing speed.
[0064] In another alternative implementation, the type of processing device can be considered during allocation. Optionally, based on the number of cables, a corresponding cable is allocated to at least one processing device in the downlink devices, including:
[0065] According to the number of cables and the type of the at least one processing device, a corresponding cable is assigned to the at least one processing device;
[0066] The processing device is a PCIe device, and its type includes at least one of the following: NIC, GPU, SSD.
[0067] Specifically, when allocating cables to PCIe devices, a PCIe switch should consider not only the number of cables in place but also the type of PCIe device. This is because different types of PCIe devices transmit data to the CPU at different frequencies at different times. For example, during a period when data storage and retrieval are the primary tasks, the CPU transmits data more frequently with the NIC; during another period when graphics-related calculations are the primary tasks, the CPU transmits data more frequently with the GPU. Therefore, when the PCIe devices connected to the PCIe switch include a NIC, a GPU, and an SSD, and the in-place cables are Cable1, Cable2, and Cable3 respectively, it's advisable to avoid assigning all NIC-type PCIe devices to Cable1, all GPU-type PCIe devices to Cable2, and all SSD-type PCIe devices to Cable3. This reduces the likelihood of an unbalanced PCIe device configuration leading to excessive data transmission on a single cable, resulting in slow data processing speeds.
[0068] Optionally, based on the number of cables and the type of the at least one processing device, corresponding cables are allocated to the at least one processing device, including:
[0069] For each type, the processing device of that type is allocated to the in-situ cables according to the number of cables in place, following a uniform distribution strategy.
[0070] Specifically, each type of PCIe device can be allocated to the available cables using a uniform distribution strategy. For example, if there are 3 available cables, and the PCIe switch connects to 3 NICs, 6 GPUs, and 9 SSDs, then using a uniform distribution strategy, each cable can receive 3 ÷ 3 = 1 NIC, 6 ÷ 3 = 2 GPUs, and 9 ÷ 3 = 3 SSDs. When the number n of a certain type of PCIe device is not an integer multiple of the number m of cables, the quotient p is obtained by dividing n by m, and the remainder q is obtained. First, p PCIe devices of this type are allocated to each cable. Then, q cables are randomly selected from the m cables, and each selected cable receives one more PCIe device of this type.
[0071] In this way, the total number of PCIe devices allocated to each cable and the number of PCIe devices of each type are the same or very similar, which ensures the balanced distribution of PCIe devices to the greatest extent and improves the overall data processing speed.
[0072] refer to Figure 1 When there are two in-situ cables between the PCIe Switch and the CPU, a uniform allocation strategy can be used to distribute the devices to these two cables for each type of PCIe device. As shown in the figure, converter 0 allocates SSD 0, NIC 0, and GPU 0 to the cable connected to US0 (Upstream), and SSD 1, NIC 1, and GPU 1 to the cable connected to US1; converter 1 allocates SSD 2, NIC 2, and GPU 2 to the cable connected to US2, and SSD 3, NIC 3, and GPU 3 to the cable connected to US3; converter 2 allocates SSD 4, NIC 4, and GPU 4 to the cable connected to US4, and SSD 5, NIC 5, and GPU 5 to the cable connected to US5; converter 3 allocates SSD 6, NIC 6, and GPU 6 to the cable connected to US6, and SSD 7, NIC 7, and GPU 7 to the cable connected to US7.
[0073] Figure 1 In the diagram, the cables between the converter and the CPU, as well as the connection lines between the converter and the PCIe device, include both dashed and solid lines. These lines are used to distinguish the specific allocation. PCIe devices connected by dashed lines are assigned to the cables corresponding to the dashed lines, and PCIe devices connected by solid lines are assigned to the cables corresponding to the solid lines. Figure 3 This is a schematic diagram illustrating a scenario where the number of in-situ cables is one, as provided in an embodiment of this application. Figure 1As shown, when the number of cables in place is 1, converter 0 assigns SSD 0, NIC 0, GPU 0, SSD 1, NIC 1, and GPU 1 to the cable connected to US0; converter 1 assigns SSD 2, NIC 2, GPU 2, SSD 3, NIC 3, and GPU 3 to the cable connected to US1; converter 2 assigns SSD 4, NIC 4, GPU 4, SSD 5, NIC 5, and GPU 5 to the cable connected to US2; and converter 3 assigns SSD 6, NIC 6, GPU 6, SSD 7, NIC 7, and GPU 7 to the cable connected to US3.
[0074] Optionally, based on the number of cables, a corresponding cable is allocated to at least one processing device in the downlink equipment, including:
[0075] Based on the pre-set correspondence between the number of cables and the allocation strategy, find the allocation strategy corresponding to the number of cables currently in place, and allocate the corresponding cables to the at least one processing device according to the allocation strategy.
[0076] The correspondence is a user-defined correspondence.
[0077] Optionally, the allocation strategy may include uniform allocation, or other allocation strategies that can be customized by the user. For example, it may include a primary / backup allocation strategy, a fixed-number allocation strategy per line, etc. In a primary / backup allocation strategy, one cable can be selected from the available cables as a backup cable, and the others as primary cables. Processing devices are then allocated among the primary cables. The backup cable can be used to perform other tasks or as an alternative channel in special circumstances. In a fixed-number allocation strategy per line, a threshold can be set for each cable. Allocation to the next cable only begins after a cable has been allocated the required number of processing devices. The allocation strategy can differ depending on the number of available cables.
[0078] Optionally, the allocation strategy may also include a specific correspondence between processing devices and cables. For example, the allocation strategy may be to allocate processing devices A, B, and C to cable 1, and to allocate processing device D to cable 2, etc.
[0079] For example, users typically plan their usage scenarios in two ways: Scenario 1, with two cables, where the user can customize how multiple processing devices are allocated between the two cables; Scenario 2, with three cables, where the user can similarly customize how multiple processing devices are allocated. This allows for the customization of two allocation strategies for the user, linked to the number of cables in place. When the user's usage scenario changes, the converter can automatically adjust the allocation of processing devices based on the number of cables in place.
[0080] In practical applications, the relationship between the number of cables and the allocation strategy can be set according to the user's actual needs before the PCIe Switch leaves the factory and saved to the PCIe Switch firmware. After leaving the factory, when the PCIe Switch starts up, it first determines the number of cables connected to the uplink port, finds the corresponding allocation strategy based on the number of cables in place, and allocates the corresponding cables to the PCIe device according to this allocation strategy.
[0081] In this way, users can flexibly customize the allocation strategy of PCIe devices to best suit their needs based on specific application scenarios, without having to go through the tedious PCIe Switch configuration work through BMC settings. Moreover, there is no need to reconfigure after the Switch is powered off and restarted, thus improving the user experience.
[0082] In summary, the cable configuration method provided in this application embodiment is applied to the converter of a downlink device. The converter can detect the number of cables in place between itself and the uplink device. Based on the number of cables, it allocates corresponding cables to at least one processing device in the downlink device that is connected to the converter, so that each processing device can transmit data with the uplink device through the corresponding cable. This allows the allocation strategy of the processing device to be determined directly based on the number of cables, which is more flexible and adaptable to different scenarios, and is not affected by power failures or restarts. It effectively simplifies the configuration process and improves the overall efficiency of the device.
[0083] Corresponding to the above cable configuration method, this application embodiment also provides a cable configuration device. Figure 4 This is a schematic diagram of a cable configuration device provided in an embodiment of this application. The device is applied to a converter in a downlink device, and the converter and the uplink device transmit data via at least one cable; as shown... Figure 4 As shown, the device includes:
[0084] The detection module 401 is used to detect the number of cables in place between the converter and the uplink device;
[0085] The allocation module 402 is used to allocate corresponding cables to at least one processing device connected to the converter in the downlink device according to the number of cables, so that each processing device can transmit data with the uplink device through the corresponding cable.
[0086] In one or more embodiments of this application, optionally, the allocation module 402 is specifically used for:
[0087] If the number of cables is at least two, then the at least one processing device is allocated to the in-situ cables according to a uniform distribution strategy; and / or,
[0088] If the number of cables is one, then all processing devices are assigned to the one cable in place.
[0089] In one or more embodiments of this application, optionally, the allocation module 402 is specifically used for:
[0090] According to the number of cables and the type of the at least one processing device, a corresponding cable is assigned to the at least one processing device;
[0091] The processing device is a PCIe device, and its type includes at least one of the following: NIC, GPU, SSD.
[0092] In one or more embodiments of this application, optionally, the allocation module 402 is specifically used for:
[0093] For each type, the processing device of that type is allocated to the in-situ cables according to the number of cables in place, following a uniform distribution strategy.
[0094] In one or more embodiments of this application, optionally, the allocation module 402 is specifically used for:
[0095] Based on the pre-set correspondence between the number of cables and the allocation strategy, find the allocation strategy corresponding to the number of cables currently in place, and allocate the corresponding cables to the at least one processing device according to the allocation strategy.
[0096] The correspondence is a user-defined correspondence.
[0097] Figure 5 This is a schematic diagram of a cable configuration device provided in an embodiment of this application. Figure 5 As shown, the cable configuration device in this embodiment includes:
[0098] At least one processor 501; and a memory 502 communicatively connected to said at least one processor;
[0099] The memory 502 stores instructions that can be executed by the at least one processor 501, which, when executed by the at least one processor 501, cause the cable configuration device to perform the method described in any of the above embodiments.
[0100] Alternatively, the memory 502 can be either standalone or integrated with the processor 501.
[0101] The implementation principle and technical effects of the cable configuration device provided in this embodiment can be found in the foregoing embodiments, and will not be repeated here.
[0102] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the methods described in any of the above embodiments.
[0103] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the methods described in any of the above embodiments.
[0104] This application also provides a GPU Box, including: at least one converter, and at least one processing device connected to each converter;
[0105] The converter is used to perform the method described in any of the foregoing embodiments.
[0106] This application embodiment also provides an electronic device, including a CPU and a GPU Box, wherein the GPU Box includes at least one converter, and at least one processing device connected to each converter;
[0107] The converter is used to perform the method described in any of the foregoing embodiments.
[0108] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.
[0109] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.
[0110] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed.
[0111] The integrated modules implemented as software functional modules described above can be stored in a computer-readable storage medium. These software functional modules, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of this application.
[0112] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor. The memory may include high-speed RAM, and may also include non-volatile memory (NVM), such as at least one disk storage device, and may also be a USB flash drive, external hard drive, read-only memory, disk, or optical disc, etc.
[0113] The aforementioned storage medium can be implemented from any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium can be any available medium accessible to general-purpose or special-purpose computers.
[0114] An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Alternatively, the storage medium can be an integral part of the processor. Both the processor and the storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and storage medium can exist as discrete components in an electronic device or host device.
[0115] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0116] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0117] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0118] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method of cable configuration, characterized by, The application relates to a converter applied to a downlink device, wherein the converter and an uplink device perform data transmission through at least one cable; the method comprises the following steps: detecting the number of cables in place between the converter and the uplink device; wherein the cables in place between the converter and the uplink device are the cables that are effectively connected between the converter and the uplink device; allocating corresponding cables in place from the cables in place to at least one processing device connected with the converter in the downlink device according to the number of cables in place, so that each processing device performs data transmission with the uplink device through the allocated cable in place; the allocation is automatically performed when the converter is started; one or more processing devices in the at least one processing device perform data transmission with the uplink device through the same cable in place; the processing device is a high-speed serial computer expansion bus standard (PCIe) device; the step of allocating corresponding cables in place from the cables in place to at least one processing device connected with the converter in the downlink device according to the number of cables in place comprises the following steps: finding an allocation strategy corresponding to the number of cables in place according to a corresponding relationship between a preset number of cables and an allocation strategy, and allocating corresponding cables in place to the at least one processing device according to the allocation strategy; wherein the corresponding relationship is a user-defined corresponding relationship.
2. The method of claim 1, wherein, the step of allocating corresponding cables in place from the cables in place to at least one processing device connected with the converter in the downlink device according to the number of cables in place comprises the following steps: if the number of cables in place is at least two, the at least one processing device is allocated to the cables in place according to an even allocation strategy; and / or, if the number of cables is one, all the processing devices are allocated to the cable in place.
3. The method of claim 1, wherein, the step of allocating corresponding cables in place from the cables in place to at least one processing device connected with the converter in the downlink device according to the number of cables in place comprises the following steps: allocating corresponding cables in place to the at least one processing device according to the number of cables in place and the type of the at least one processing device; wherein the type comprises at least one of the following: a network interface controller (NIC), a graphics processing unit (GPU) and a solid state disk (SSD).
4. The method of claim 3, wherein, the step of allocating corresponding cables in place from the cables in place to at least one processing device connected with the converter in the downlink device according to the number of cables in place comprises the following steps: for each type, the processing devices of the type are allocated to the cables in place according to the number of cables in place and an even allocation strategy.
5. A cable arrangement device, characterized by The application relates to a converter applied to a downlink device, wherein the converter and an uplink device perform data transmission through at least one cable; the device comprises the following steps: a detection module is used for detecting the number of cables in place between the converter and the uplink device; wherein the cables in place between the converter and the uplink device are the cables that are effectively connected between the converter and the uplink device; The allocation module is configured to allocate a corresponding cable from the in-place cables to at least one processing device connected to the converter in the downstream device according to the number of in-place cables, so that each processing device transmits data with the upstream device through the allocated in-place cable; the allocation is automatically performed when the converter is started; one or more processing devices in the at least one processing device transmit data with the upstream device through the same in-place cable; the processing device is a Peripheral Component Interconnect Express (PCIe) device. The allocation module is specifically configured to find an allocation strategy corresponding to the number of in-place cables according to a corresponding relationship between a preset number of cables and an allocation strategy, and allocate a corresponding in-place cable to the at least one processing device according to the allocation strategy; wherein the corresponding relationship is a user-defined corresponding relationship.
6. A cable configuration apparatus characterized by comprising: The cable configuration device comprises: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the cable configuration device to perform the method of any one of claims 1-4.
7. A computer readable storage medium characterized in that, The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the method of any one of claims 1-4 is implemented.
8. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the method of any one of claims 1-4.
9. An electronic device comprising a central processing unit (CPU) and a graphics processing unit box (GPU Box), wherein, The GPU box comprises at least one converter and at least one processing device connected to each converter; wherein the converter is configured to perform the method of any one of claims 1-4.
Citation Information
Patent Citations
Configuration method and system of server and GPU
CN111078403A
Cable transmission negotiation method and device and related components
CN111984489A
Link negotiation method and device of solid state disk cluster JBOF, equipment and storage medium
CN112433973A
PCIe bandwidth allocation processing method and processing device and storage medium
CN115221090A