Skip to content

Commit

Permalink
minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
gedoensmax committed Aug 18, 2023
1 parent 2716d73 commit 4e889f9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
1 change: 0 additions & 1 deletion libvmaf/src/feature/cuda/integer_adm_cuda.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ void adm_dwt2_s123_combined_device(AdmStateCuda *s,const int32_t *d_i4_scale, in
const int BLOCK_Y = (h + 1) / 2;

void * args_vert[] = {&d_i4_scale, &tmp_buf, &w, &h, &img_stride, &*p};
const int num_threads = 128;
switch (scale) {
case 1:
CHECK_CUDA(cuLaunchKernel(s->func_dwt_s123_combined_vert_kernel_0_0_int32_t,
Expand Down
10 changes: 2 additions & 8 deletions libvmaf/src/feature/cuda/integer_psnr_cuda.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@
#include <stddef.h>
#include <string.h>

#include "common.h"
#include "cuda_helper.cuh"
#include "libvmaf/vmaf_cuda_state.h"
#include "picture_cuda.h"

#include "feature_collector.h"
#include "feature_extractor.h"
Expand Down Expand Up @@ -231,13 +230,8 @@ static int extract_fex_cuda(VmafFeatureExtractor *fex,
CHECK_CUDA(cuEventRecord(s->event, vmaf_cuda_picture_get_stream(ref_pic)));
// This event ensures the input buffer is consumed
CHECK_CUDA(cuStreamWaitEvent(s->str, s->event, CU_EVENT_WAIT_DEFAULT));
// CHECK_CUDA(cuCtxPushCurrent(fex->cu_state->ctx));
// CHECK_CUDA(cuEventDestroy(s->event));
// CHECK_CUDA(cuEventCreate(&s->event, CU_EVENT_DEFAULT));
// CHECK_CUDA(cuCtxPopCurrent(NULL));

// Download sad
// CHECK_CUDA(cuStreamSynchronize(s->host_stream));
// Download SSE
CHECK_CUDA(cuMemcpyDtoHAsync(s->sse_host, (CUdeviceptr)s->sse_device->data,
sizeof(uint64_t) * 3, s->str));
CHECK_CUDA(cuEventRecord(s->finished, s->str));
Expand Down
2 changes: 1 addition & 1 deletion libvmaf/src/libvmaf.c
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ static int translate_picture_device(VmafContext *vmaf, VmafPicture *pic,
return err;
}

err = vmaf_cuda_picture_download_async(pic, pic_host, 0x3);
err = vmaf_cuda_picture_download_async(pic, pic_host, 0xF);
if (err) {
vmaf_log(VMAF_LOG_LEVEL_ERROR,
"problem moving cuda pic into host buffer\n");
Expand Down

0 comments on commit 4e889f9

Please sign in to comment.