Skip to content

Commit

Permalink
Remove unused texture iterator from cub::DeviceSpmv.
Browse files Browse the repository at this point in the history
This was only used for SMs < 3.5, which are no longer supported.
  • Loading branch information
alliepiper committed Aug 2, 2021
1 parent 85a6798 commit 117fea3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 29 deletions.
18 changes: 5 additions & 13 deletions cub/agent/agent_spmv_orig.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
#include "../thread/thread_operators.cuh"
#include "../iterator/cache_modified_input_iterator.cuh"
#include "../iterator/counting_input_iterator.cuh"
#include "../iterator/tex_obj_input_iterator.cuh"

CUB_NAMESPACE_BEGIN

Expand Down Expand Up @@ -104,8 +103,6 @@ struct SpmvParams
int num_nonzeros; ///< Number of nonzero elements of matrix <b>A</b>.
ValueT alpha; ///< Alpha multiplicand
ValueT beta; ///< Beta addend-multiplicand

TexObjInputIterator<ValueT, OffsetT> t_vector_x;
};


Expand Down Expand Up @@ -328,10 +325,8 @@ struct AgentSpmv
OffsetT column_idx = wd_column_indices[nonzero_idx];
ValueT value = wd_values[nonzero_idx];

ValueT vector_value = spmv_params.t_vector_x[column_idx];
#if (CUB_PTX_ARCH >= 350)
vector_value = wd_vector_x[column_idx];
#endif
ValueT vector_value = wd_vector_x[column_idx];

ValueT nonzero = value * vector_value;

OffsetT row_end_offset = s_tile_row_end_offsets[thread_current_coord.x];
Expand Down Expand Up @@ -437,8 +432,7 @@ struct AgentSpmv
OffsetT column_idx = *ci;
ValueT value = *a;

ValueT vector_value = spmv_params.t_vector_x[column_idx];
vector_value = wd_vector_x[column_idx];
ValueT vector_value = wd_vector_x[column_idx];

ValueT nonzero = value * vector_value;

Expand All @@ -464,10 +458,8 @@ struct AgentSpmv
OffsetT column_idx = wd_column_indices[tile_start_coord.y + nonzero_idx];
ValueT value = wd_values[tile_start_coord.y + nonzero_idx];

ValueT vector_value = spmv_params.t_vector_x[column_idx];
#if (CUB_PTX_ARCH >= 350)
vector_value = wd_vector_x[column_idx];
#endif
ValueT vector_value = wd_vector_x[column_idx];

ValueT nonzero = value * vector_value;

s_tile_nonzeros[nonzero_idx] = nonzero;
Expand Down
16 changes: 0 additions & 16 deletions cub/device/dispatch/dispatch_spmv_orig.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -618,14 +618,6 @@ struct DispatchSpmv
int search_block_size = INIT_KERNEL_THREADS;
int search_grid_size = cub::DivideAndRoundUp(num_merge_tiles + 1, search_block_size);

#if CUB_INCLUDE_HOST_CODE
if (CUB_IS_HOST_CODE)
{
// Init textures
if (CubDebug(error = spmv_params.t_vector_x.BindTexture(spmv_params.d_vector_x, spmv_params.num_cols * sizeof(ValueT)))) break;
}
#endif

if (search_grid_size < sm_count)
// if (num_merge_tiles < spmv_sm_occupancy * sm_count)
{
Expand Down Expand Up @@ -700,14 +692,6 @@ struct DispatchSpmv
// Sync the stream if specified to flush runtime errors
if (debug_synchronous && (CubDebug(error = SyncStream(stream)))) break;
}

#if CUB_INCLUDE_HOST_CODE
if (CUB_IS_HOST_CODE)
{
// Free textures
if (CubDebug(error = spmv_params.t_vector_x.UnbindTexture())) break;
}
#endif
}
while (0);

Expand Down

0 comments on commit 117fea3

Please sign in to comment.