Skip to content

Commit

Permalink
Remove redundant <fstream> includes (NVIDIA#563)
Browse files Browse the repository at this point in the history
* Remove redundant <fstream> includes

* Fix fstream in examples/

* Fix <fstream> in test/

* Use consistent order for <fstream> (always after <iostream>)

* Remove an unneeded include in a file where std::ofstream usage is commented out

Co-authored-by: Ivan Komarov <dfyz@yandex-team.ru>
  • Loading branch information
dfyz and Ivan Komarov authored Jul 19, 2022
1 parent e7a61c7 commit 0b8cacd
Show file tree
Hide file tree
Showing 35 changed files with 29 additions and 25 deletions.
1 change: 0 additions & 1 deletion examples/04_tile_iterator/tile_iterator.cu
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
#include <iostream>
#include <sstream>
#include <vector>
#include <fstream>

// CUTLASS includes
#include "cutlass/transform/threadblock/predicated_tile_iterator.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ compare if the output from CUTLASS kernel is same as the reference implicit GEMM
*/

#include <iostream>
#include <fstream>
#include <sstream>

#include "cutlass/cutlass.h"
Expand Down
1 change: 0 additions & 1 deletion examples/10_planar_complex/planar_complex.cu
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
*/

#include <iostream>
#include <fstream>
#include <sstream>

#include "cutlass/cutlass.h"
Expand Down
1 change: 0 additions & 1 deletion examples/11_planar_complex_array/planar_complex_array.cu
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
*/

#include <iostream>
#include <fstream>
#include <sstream>

#include "cutlass/cutlass.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ compare if the output from CUTLASS kernel is same as the reference implicit GEMM
*/

#include <iostream>
#include <fstream>
#include <sstream>

#include "cutlass/cutlass.h"
Expand Down
1 change: 1 addition & 0 deletions examples/22_quaternion_conv/quaternion_conv.cu
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
**************************************************************************************************/

#include <iostream>
#include <fstream>
#include <sstream>

#include "cutlass/cutlass.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ epilogue/threadblock/epilogue_gemm_k_reduction.h
*/

#include <iostream>
#include <fstream>
#include <sstream>

#include "cutlass/cutlass.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ line is the same.
*/

#include <iostream>
#include <fstream>
#include <sstream>

#include "cutlass/cutlass.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ technical details.
*/

#include <iostream>
#include <fstream>
#include <sstream>

#include "cutlass/cutlass.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ compared with CUDA Cores. See example 27 for the trick of 3xTF32.
*/

#include <iostream>
#include <fstream>
#include <sstream>

#include "cutlass/cutlass.h"
Expand Down
1 change: 1 addition & 0 deletions examples/30_wgrad_split_k/30_wgrad_split_k.cu
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ to correctly instantiate the GEMM template.
*/

#include <iostream>
#include <fstream>
#include <sstream>

#include "cutlass/cutlass.h"
Expand Down
1 change: 1 addition & 0 deletions examples/36_gather_scatter_fusion/gather_scatter_fusion.cu
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@

#include <algorithm>
#include <iostream>
#include <fstream>
#include <random>
#include <numeric>

Expand Down
2 changes: 2 additions & 0 deletions test/unit/conv/device/conv2d_testbed.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
*/
#pragma once

#include <fstream>

#include "../../common/cutlass_unit_test.h"
#include "cutlass/cutlass.h"

Expand Down
2 changes: 2 additions & 0 deletions test/unit/conv/device/conv2d_testbed_interleaved.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
*/
#pragma once

#include <fstream>

#include "../../common/cutlass_unit_test.h"
#include "cutlass/cutlass.h"

Expand Down
2 changes: 2 additions & 0 deletions test/unit/conv/device/conv2d_with_broadcast_testbed.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
*/
#pragma once

#include <fstream>

#include "../../common/cutlass_unit_test.h"
#include "cutlass/cutlass.h"

Expand Down
2 changes: 2 additions & 0 deletions test/unit/conv/device/conv2d_with_reduction_testbed.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
*/
#pragma once

#include <fstream>

#include "../../common/cutlass_unit_test.h"
#include "cutlass/cutlass.h"

Expand Down
2 changes: 2 additions & 0 deletions test/unit/conv/device/conv3d_testbed.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
*/
#pragma once

#include <fstream>

#include "../../common/cutlass_unit_test.h"
#include "cutlass/cutlass.h"

Expand Down
2 changes: 0 additions & 2 deletions test/unit/epilogue/threadblock/epilogue_planar_complex.cu
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
\brief Unit tests for thread-level GEMM
*/

#include <fstream>

#include "../../common/cutlass_unit_test.h"

#include "cutlass/aligned_buffer.h"
Expand Down
2 changes: 0 additions & 2 deletions test/unit/epilogue/threadblock/epilogue_simt.cu
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
\brief Unit tests for thread-level GEMM
*/

#include <fstream>

#include "../../common/cutlass_unit_test.h"

#include "cutlass/aligned_buffer.h"
Expand Down
2 changes: 0 additions & 2 deletions test/unit/epilogue/threadblock/epilogue_simt_sm60.cu
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
\brief Unit tests for thread-level GEMM
*/

#include <fstream>

#include "../../common/cutlass_unit_test.h"

#include "cutlass/aligned_buffer.h"
Expand Down
2 changes: 0 additions & 2 deletions test/unit/epilogue/threadblock/epilogue_simt_sm61.cu
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
\brief Unit tests for thread-level GEMM
*/

#include <fstream>

#include "../../common/cutlass_unit_test.h"

#include "cutlass/aligned_buffer.h"
Expand Down
2 changes: 0 additions & 2 deletions test/unit/epilogue/threadblock/epilogue_tensor_op.cu
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
\brief Unit tests for thread-level GEMM
*/

#include <fstream>

#include "../../common/cutlass_unit_test.h"

#include "cutlass/aligned_buffer.h"
Expand Down
2 changes: 0 additions & 2 deletions test/unit/epilogue/threadblock/epilogue_volta_tensor_op.cu
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
\brief Unit tests for thread-level GEMM
*/

#include <fstream>

#include "../../common/cutlass_unit_test.h"

#include "cutlass/aligned_buffer.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
\brief Unit tests for thread-level GEMM
*/

#include <fstream>

#include "../../common/cutlass_unit_test.h"

#include "cutlass/aligned_buffer.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@

#ifdef CUTLASS_ARCH_WMMA_SM70_ENABLED

#include <fstream>

#include "../../common/cutlass_unit_test.h"

#include "cutlass/aligned_buffer.h"
Expand Down
2 changes: 0 additions & 2 deletions test/unit/epilogue/threadblock/output_tile_threadmap.cu
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
\brief Unit tests for thread-level GEMM
*/

#include <fstream>

#include "../../common/cutlass_unit_test.h"

#include "cutlass/aligned_buffer.h"
Expand Down
1 change: 0 additions & 1 deletion test/unit/gemm/device/testbed_complex.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#pragma once

#include <iostream>
#include <fstream>
#include <sstream>
#include <stdexcept>

Expand Down
1 change: 1 addition & 0 deletions test/unit/gemm/device/testbed_grouped.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#pragma once

#include <iostream>
#include <fstream>

#include "../../common/cutlass_unit_test.h"
#include "cutlass/cutlass.h"
Expand Down
1 change: 0 additions & 1 deletion test/unit/gemm/device/testbed_sanity.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
*/

#include <iostream>
#include <fstream>
#include <sstream>

#include "../../common/cutlass_unit_test.h"
Expand Down
1 change: 0 additions & 1 deletion test/unit/gemm/device/testbed_splitk.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#pragma once

#include <iostream>
#include <fstream>
#include <sstream>

#include "../../common/cutlass_unit_test.h"
Expand Down
2 changes: 2 additions & 0 deletions test/unit/gemm/threadblock/mma_multistage_testbed_slicedk.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@

#pragma once

#include <fstream>

#include "../../common/cutlass_unit_test.h"

#include "cutlass/aligned_buffer.h"
Expand Down
2 changes: 2 additions & 0 deletions test/unit/gemm/threadblock/mma_pipelined_testbed.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@

#pragma once

#include <fstream>

#include "../../common/cutlass_unit_test.h"

#include "cutlass/aligned_buffer.h"
Expand Down
2 changes: 2 additions & 0 deletions test/unit/gemm/threadblock/mma_pipelined_testbed_slicedk.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@

#pragma once

#include <fstream>

#include "../../common/cutlass_unit_test.h"

#include "cutlass/aligned_buffer.h"
Expand Down
2 changes: 2 additions & 0 deletions test/unit/gemm/threadblock/mma_planar_complex_testbed.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@

#pragma once

#include <fstream>

#include "../../common/cutlass_unit_test.h"

#include "cutlass/cutlass.h"
Expand Down
2 changes: 1 addition & 1 deletion tools/util/include/cutlass/util/distribution.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
\brief This header contains a class to parametrize a statistical distribution function.
*/

#include <fstream>
#include <ostream>

namespace cutlass {

Expand Down

0 comments on commit 0b8cacd

Please sign in to comment.