marin-ma commented on code in PR #11090:
URL: 
https://github.com/apache/incubator-gluten/pull/11090#discussion_r2545928532


##########
backends-velox/src/main/scala/org/apache/spark/shuffle/ColumnarShuffleWriter.scala:
##########
@@ -171,6 +171,17 @@ class ColumnarShuffleWriter[K, V](
               conf.get(SHUFFLE_SORT_USE_RADIXSORT),
               partitionWriterHandle
             )
+          } else if (dep.shuffleWriterType == GpuHashShuffleWriterType) {

Review Comment:
   nit: use `if(dep.shuffleWriterType == SortShuffleWriterType)` in the 
condition branch above



##########
cpp/velox/shuffle/GpuShuffleWriter.h:
##########
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include "VeloxHashShuffleWriter.h"

Review Comment:
   ditto



##########
cpp/velox/utils/GpuBufferBatchResizer.h:
##########
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "memory/ColumnarBatchIterator.h"
+#include "memory/VeloxColumnarBatch.h"
+#include "utils/Exception.h"
+#include "velox/common/memory/MemoryPool.h"
+
+namespace gluten {
+
+class GpuBufferBatchResizer : public ColumnarBatchIterator {

Review Comment:
   It would be nice to have some cpp unit test for the functionality of this 
class.



##########
cpp/velox/shuffle/GpuShuffleWriter.cc:
##########
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "GpuShuffleWriter.h"

Review Comment:
   ditto



##########
cpp/velox/shuffle/VeloxShuffleWriter.cc:
##########
@@ -20,6 +20,10 @@
 #include "shuffle/VeloxRssSortShuffleWriter.h"
 #include "shuffle/VeloxSortShuffleWriter.h"
 
+#ifdef GLUTEN_ENABLE_GPU
+#include "GpuShuffleWriter.h"

Review Comment:
   nit: `#include "shuffle/GpuShuffleWriter.h"`
   
   Should we name it as VeloxGpuShuffleWriter to align the naming with the 
existing shuffle writer types?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to