@@ -338,7 +338,8 @@ public:
|
||||
static Status
|
||||
run(Params& params,
|
||||
cudaStream_t stream = nullptr,
|
||||
CudaHostAdapter *cuda_adapter = nullptr) {
|
||||
CudaHostAdapter *cuda_adapter = nullptr,
|
||||
bool launch_with_pdl = false) {
|
||||
CUTLASS_TRACE_HOST("GemmUniversal::run()");
|
||||
dim3 const block = GemmKernel::get_block_shape();
|
||||
dim3 const grid = get_grid_shape(params);
|
||||
@@ -361,6 +362,11 @@ public:
|
||||
CUTLASS_ASSERT(cuda_adapter);
|
||||
if (cuda_adapter) {
|
||||
|
||||
if (launch_with_pdl) {
|
||||
CUTLASS_TRACE_HOST(
|
||||
"GemmUniversal::run() does not support launching with PDL and a custom cuda adapter.");
|
||||
return Status::kErrorInternal;
|
||||
}
|
||||
launch_result = cuda_adapter->launch(grid,
|
||||
cluster,
|
||||
block,
|
||||
@@ -378,7 +384,7 @@ public:
|
||||
void const* kernel = (void const*) device_kernel<GemmKernel>;
|
||||
if constexpr (GemmKernel::ArchTag::kMinComputeCapability == 90) {
|
||||
launch_result = ClusterLauncher::launch(
|
||||
grid, cluster, block, smem_size, stream, kernel, kernel_params);
|
||||
grid, cluster, block, smem_size, stream, kernel, kernel_params, launch_with_pdl);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -424,12 +430,13 @@ public:
|
||||
Arguments const& args,
|
||||
void* workspace = nullptr,
|
||||
cudaStream_t stream = nullptr,
|
||||
CudaHostAdapter *cuda_adapter = nullptr
|
||||
CudaHostAdapter *cuda_adapter = nullptr,
|
||||
bool launch_with_pdl = false
|
||||
) {
|
||||
Status status = initialize(args, workspace, stream, cuda_adapter);
|
||||
|
||||
if (Status::kSuccess == status) {
|
||||
status = run(params_, stream, cuda_adapter);
|
||||
status = run(params_, stream, cuda_adapter, launch_with_pdl);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
@@ -440,20 +447,24 @@ public:
|
||||
Arguments const& args,
|
||||
void* workspace = nullptr,
|
||||
cudaStream_t stream = nullptr,
|
||||
CudaHostAdapter *cuda_adapter = nullptr) {
|
||||
return run(args, workspace, stream, cuda_adapter);
|
||||
CudaHostAdapter *cuda_adapter = nullptr,
|
||||
bool launch_with_pdl = false) {
|
||||
return run(args, workspace, stream, cuda_adapter, launch_with_pdl);
|
||||
}
|
||||
|
||||
/// Overload that allows a user to re-launch the same kernel without updating internal params struct.
|
||||
Status
|
||||
run(cudaStream_t stream = nullptr, CudaHostAdapter *cuda_adapter = nullptr) {
|
||||
return run(params_, stream, cuda_adapter);
|
||||
run(
|
||||
cudaStream_t stream = nullptr,
|
||||
CudaHostAdapter *cuda_adapter = nullptr,
|
||||
bool launch_with_pdl = false) {
|
||||
return run(params_, stream, cuda_adapter, launch_with_pdl);
|
||||
}
|
||||
|
||||
/// Overload that allows a user to re-launch the same kernel without updating internal params struct.
|
||||
Status
|
||||
operator()(cudaStream_t stream = nullptr, CudaHostAdapter *cuda_adapter = nullptr) {
|
||||
return run(params_, stream, cuda_adapter);
|
||||
operator()(cudaStream_t stream = nullptr, CudaHostAdapter *cuda_adapter = nullptr, bool launch_with_pdl = false) {
|
||||
return run(params_, stream, cuda_adapter, launch_with_pdl);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user