comments on “algorithmic aspectsof hardware/software partitioning:1d search algorithms”
TRANSCRIPT
Comments on “Algorithmic Aspectsof Hardware/Software Partitioning:
1D Search Algorithms”
Haojun Quan, Tao Zhang, Qiang Liu, Jichang Guo,Xiaochen Wang, and Ruimin Hu
Abstract—In this paper, the work in [1] is analyzed. An error in its theoretical
description part is pointed out and illustrated by a simple example. A modification
suggestion is proposed to make the theoretical description of the work [1] more
deliberate and thus being used appropriately.
Index Terms—Hardware/software partitioning, 1D search algorithm
Ç
1 INTRODUCTION
Jigang et al. [1] proposed a 1D search approach for hardware/soft-ware partitioning, which reduces the time complexity comparedwith a 2D search method developed in literature. However, whenwe tried to exploit the approach [1], we found an error in the theo-retical description of the paper. The error leads to a mismatchbetween the proposed approach and the algorithm realizations in[1]. As a result, it is desirable to point out the error and make sug-gestions to make the proposed approach [1] more deliberate andnot mislead readers.
Therefore, in this comment, the approach and theorem pro-posed in [1] are briefly described and an error is pointed out.Section 2 shows a simple example to illustrate the mentionederror. After that, Section 3 suggests a possible modification.
As described in [1], given an undirected graph G ¼ðV ;EÞ; V ¼ fv1; v2; . . . ; vng; s; h : V ! Rþ, and c : E ! Rþ. si andhi denote the software cost and the hardware cost of node vi,respectively. Let x ¼ x1; x2; . . . ; xnf g denote a partition scheme, inwhich xi ¼ 1ðxi ¼ 0Þ indicates that node vi is assigned to software(hardware). Thus, the software cost and the hardware cost of x can
be formulated as SðxÞ ¼Pn
i¼1 sixi and HðxÞ ¼Pn
i¼1 hið1� xiÞ,respectively. Meanwhile, the communication cost of x is CðxÞ¼Pn�1
i¼1
Pnj¼iþ1 cijjxi � xjj. Given a constraint constant R, the hard-
ware/software partitioning problem can be formulated as the fol-lowing minimization problem P :
P
minimizePn
i¼1
hið1� xiÞ
subject toPn
i¼1
sixi þ CðxÞ � R:
8>><
>>:
The value ofPn
i¼1 hi is fixed for a certain G, so the solution ofproblem P is identical to the solution of problem Q:
Q
maximizePn
i¼1
hixi
subject toPn
i¼1
sixi þ C xð Þ � R:
8>><
>>:
Then a new variable m 2 ð0; 1Þ for C xð Þ ¼ mR is defined and theproblem Q is transformed to the following problem:
Q0maximize
Pn
i¼1
hixi
subject toPn
i¼1
sixi � ð1� mÞR:
8>><
>>:
Let Q xð Þ ¼Pn
i¼1 hixi, and x�m denote the optimal solution of theproblem Q0 with m. Then Theorem 1 is given in [1].
Theorem 1. Qðx�m1Þ � Qðx�m2Þ for m1 � m2, where x�m1 and x�m2 are theoptimal solutions of the problem Q0 with m1 and m2, respectively.
Then [1] gives the following conclusion:Conclusion 1. Let x�m denote the optimal solution of the prob-
lem Q0 for a given m in (0, 1). The main idea derives from thefact that: if x�m fulfills
Pni¼1 sixi þ
Pn�1i¼1
Pnj¼iþ1 cijjxi � xjj � R; x�m
definitely is a feasible solution of the problem Q. Hence, x�m isqualified to be a candidate partition. Moreover, if x�m that fulfillsPn
i¼1 sixi þPn�1
i¼1
Pnj¼iþ1 cijjxi� xjj � R is found, there is no
need to further search for the optimal solution of Q0 withmþ Dm for any Dm value. This is because, according to Theo-rem 1, there does not exist a better feasible solution than x�m forlarger m values in (0, 1) for the problem Q0.
However, Conclusion 1 is incorrect, because Theorem 1 derivedfrom problem Q0 is applied to problem Q without considering theimpact of communication cost on partitioning schemes. To illus-trate this, an example will be given in the next section.
2 EXAMPLE
As shown in Fig. 1, each node representing a task contains two val-ues in a bracket, where the first value denotes the software costand the second value denotes the hardware cost.
Let R ¼ 7.5. There are eight possible partitioning schemes, asillustrated in Fig. 2. The corresponding analysis is shown inTable 1.
According to Conclusion 1 described in the previous section,searching communication cost from 0 to 3, the optimal schemeshould be scheme 2 (extreme condition) or 3. However, in fact theoptimal scheme is scheme 6 or 7, which are feasible partitioningsolutions and have the minimum hardware cost. This observationobviously disagrees with Conclusion 1.
This disagreement is actually caused by the fact that Conclu-sion 1 does not consider the communication uncertain varia-tions with different hardware/software partitioning schemes.This effect is actually considered in the algorithm realizationsin [1], but not in the theoretical part. Therefore, a possible mod-ification is given in the next section.
3 PROPOSED MODIFICATION
Considering the analysis above and the algorithms in [1], we pro-pose to add a rule to the 1D search approach. This will make theproposed approach clear and complete, but less general.
To solve problem P , order the task nodes according to hard-ware-to-software ratios:
h1
s1� h2
s2� � � � � hn
sn: (1)
Then the following rule for defining partitioning schemes isgiven:
Rule 1. As for the solutions of problem P , following the methodof Alg-greedy in [1], a search starts from the left to the right of (1).The first partitioning scheme (or simply scheme 1) is that node
� H. Quan, T. Zhang, Q. Liu, and J. Guo are with the School of Electronic andInformation Engineering, Tianjin University, Tianjin 300072, China.E-mail: {quanhaojun, zhangtao, qiangliu, jcguo}@tju.edu.cn.
� X. Wang and R. Hu are with the National Engineering Research Center forMultimedia Software, Wuhan University, Wuhan 430072, China.E-mail: [email protected], [email protected].
Manuscript received 11 Jan. 2012; revised 18 June 2012; accepted 3 July 2012;date of publication 18 July 2012; date of current version 5 Mar. 2014.Recommended for acceptance by E. Macii.For information on obtaining reprints of this article, please send e-mail to:[email protected], and reference the Digital Object Identifier below.Digital Object Identifier no. 10.1109/TC.2012.174
IEEE TRANSACTIONS ON COMPUTERS, VOL. 63, NO. 4, APRIL 2014 1055
0018-9340 � 2012 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
v1ðs1; h1Þ is assigned to software and other nodes are assigned tohardware. Scheme 2 is that nodes v1 and v2 are assigned to soft-ware and other nodes are assigned to hardware. Similarly, schemetð1 � t � n� 1Þ means nodes v1 to vt are assigned to software andother nodes are assigned to hardware. Note that only (n� 1) parti-tioning schemes are considered.
Let CðxÞ ¼ mR;m 2 ð0; 1Þ. For a certain value m, the maximumof t can be obtained according to
Pti¼1 si � ð1� mÞR. If the parti-
tioning scheme is a feasible solution of problem P , it is the optimalsolution under CðxÞ ¼ mR, because the search method of Rule 1 isused. Now, let P ðxmÞ ¼
Pni¼tþ1 hi, where P ðxmÞ denotes the total
hardware cost for CðxÞ ¼ mR.
Theorem 1. Under Rule 1, for problem P , if there are two optimal parti-tioning solutions xm1 and xm2 for m1 and m2, respectively, thenP ðxm1Þ � P ðxm2Þ for m1 � m2, where P ðxmÞ denotes the totalhardware cost of the optimal solution of problem P whenCðxÞ ¼ mR.
Proof. Based on the partitioning schemes defined in Rule 1, weuse
Ptm1i¼1 si � ð1� m1ÞR and
Ptm2i¼1 si � ð1� m2ÞR to calculate
the maximum of tm1 and tm2, respectively.
{ m1 � m2
; ð1� m1ÞR � ð1� m2ÞR; tm1 � tm2; where tm1 and tm2 are the corresponding max val-ues. This means when m ¼ m1 more nodes are assigned to soft-ware, compared to m ¼ m2
; P ðxm1Þ � P ðxm2Þ tuAccording to Theorem 1, if an optimal solution of problem P
with a certain m is found, there is no need to further search for theoptimal solution of problem P with mþ Dm for any possible Dm
value. Therefore, under Rule 1, Conclusion 1 is correct, so the algo-rithms proposed in [1] are correct.
ACKNOWLEDGMENTS
This work was supported by the Major National Science and Tech-nology Special Projects (2010ZX03004-003-03). The authors wouldlike to thank the anonymous reviewers for their valuable and con-structive comments.
REFERENCE
[1] W. Jigang, T. Srikanthan, and G. Chen, “Algorithmic Aspects of Hardware/Software Partitioning: 1D Search Algorithms,” IEEE Trans. Computers,vol. 59, no. 4, pp. 532-544, Apr. 2010.
Fig. 2. Possible hardware/software partitioning schemes for the undirected graphshown in Fig. 1.
TABLE 1Analysis of Partitioning Schemes
Fig. 1. A simple undirected graph for hardware/software partitioning.
1056 IEEE TRANSACTIONS ON COMPUTERS, VOL. 63, NO. 4, APRIL 2014