MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / launch_param_update_half

Function launch_param_update_half

csrc/xpu/common/custom_cuda_kernel.dp.cpp:79–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79void launch_param_update_half(const float* input, sycl::half* output, int size, sycl::queue* stream)
80{
81 int threads = 1024;
82 size /= 2;
83 sycl::range<3> grid_dim(1, 1, (size - 1) / threads + 1);
84 sycl::range<3> block_dim(1, 1, threads);
85
86 {
87 has_capability_or_fail(stream->get_device(), {sycl::aspect::fp16});
88 stream->parallel_for(
89 sycl::nd_range<3>(grid_dim * block_dim, block_dim),
90 [=](sycl::nd_item<3> item_ct1) { param_update_kernel_half(input, output, size); });
91 }
92}

Callers

nothing calls this directly

Calls 3

has_capability_or_failFunction · 0.85
param_update_kernel_halfFunction · 0.85
parallel_forMethod · 0.80

Tested by

no test coverage detected