Return-Path: Delivered-To: apmail-hadoop-common-commits-archive@www.apache.org Received: (qmail 79667 invoked from network); 14 Mar 2011 16:17:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Mar 2011 16:17:20 -0000 Received: (qmail 18008 invoked by uid 500); 14 Mar 2011 16:17:20 -0000 Delivered-To: apmail-hadoop-common-commits-archive@hadoop.apache.org Received: (qmail 17962 invoked by uid 500); 14 Mar 2011 16:17:20 -0000 Mailing-List: contact common-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-dev@hadoop.apache.org Delivered-To: mailing list common-commits@hadoop.apache.org Received: (qmail 17955 invoked by uid 500); 14 Mar 2011 16:17:20 -0000 Delivered-To: apmail-hadoop-core-commits@hadoop.apache.org Received: (qmail 17952 invoked by uid 99); 14 Mar 2011 16:17:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Mar 2011 16:17:20 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.131] (HELO eos.apache.org) (140.211.11.131) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Mar 2011 16:17:19 +0000 Received: from eosnew.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id 809F529F; Mon, 14 Mar 2011 16:16:58 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Apache Wiki To: Apache Wiki Date: Mon, 14 Mar 2011 16:16:58 -0000 Message-ID: <20110314161658.40956.49134@eosnew.apache.org> Subject: =?utf-8?q?=5BHadoop_Wiki=5D_Update_of_=22CUDA_On_Hadoop=22_by_ChenHe?= Dear Wiki user, You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for ch= ange notification. The "CUDA On Hadoop" page has been changed by ChenHe. http://wiki.apache.org/hadoop/CUDA%20On%20Hadoop?action=3Ddiff&rev1=3D7&rev= 2=3D8 -------------------------------------------------- We employ CUDA SDK programs in our experiments. For CUDA SDK programs, we= first digested the code and partitioned the program into portions for data= generation, bootstrapping, and CUDA kernels, with the former two component= s transformed respectively into a standalone data generator and a virtual m= ethod callable from the map method in our MapRed utility class. The CUDA ke= rnel is kept as-is since we want to perform the same computation on the GPU= only in a distributed fashion. The data generator is augmented with the fe= ature for taking command-line arguments such that we can specify input size= s and output location for different experiment runs. We reuse the code for = boot-strapping a kernel execution into part of the mapper workload, thus pr= oviding a seamless integration of CUDA and Hadoop. = The architecture of the ported CUDA SDK programs onto Hadoop is shown in = Figure 1. For reusability, we have used object-oriented design by abstracti= ng the mapper and reducer functions into a base class, i.e., MapRed. For di= fferent computation, we can override the following virtual methods defined = by MapRed: - = + {{{ - ''=E2=80=A2 void processHadoopData(string& input); '' + =E2=80=A2 void processHadoopData(string& input); = =E2=80=A2 void cudaCompute(std::map& output); + }}} = The processHadoopData method provides a hook for the CUDA program to init= ialize its internal data structures by parsing the input passed from the Ha= doop DFS. Thereafter, MapRed invokes the cudaCompute method, in which the C= UDA kernel is launched. The results of the computation are stored in the ma= p object and sent over to DFS for reduction. =20