conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Update cuda snippet illustrating Cuda function pointers\n" }, { "from": "human", "value": "#include \"tst_fptrs.h\"\n#include \"user_f.h\"\n\n#include <stdio.h>\n\nvoid assign_cuda_ptr(fc2d_cuda_t* h_f, fc2d_cuda_t f)\n{\n cudaError_t ce = cudaMemcpyFromSymbol(h_...
cuda
chosen
[ { "from": "system", "value": "Change indentation to 2 spaces\n" }, { "from": "human", "value": "#include <iostream>\n#include <string>\n#include <gunrock/cuda/device_properties.hxx>\n\nint main(int argc, char** argv) {\n using namespace std;\n using namespace gunrock::cuda;\n using name...
cuda
chosen
[ { "from": "system", "value": "Test host_system_tag rather than cpp::tag\n" }, { "from": "human", "value": "#include <unittest/unittest.h>\n#include <thrust/system/cuda/memory.h>\n\ntemplate<typename T1, typename T2>\nbool is_same(const T1 &, const T2 &)\n{\n return false;\n}\n\ntemplate<typenam...
cuda
chosen
[ { "from": "system", "value": "Implement 2-dimensional grids, but leave commented out\n" }, { "from": "human", "value": "#include <agency/cuda/execution_policy.hpp>\n#include <cstdio>\n\nstruct kernel\n{\n __device__\n void operator()(agency::parallel_group<agency::cuda::concurrent_agent>& self...
cuda
chosen
[ { "from": "system", "value": "Prepare NVidia gridder's Halide veneer to be used as drop-in replacement for the true Halide kernels.\n" }, { "from": "human", "value": "#include \"grid_gpu.cuh\"\n#include \"halide_buf.h\"\n\nextern \"C\"\nint nvGridder(const double _scale, const int32_t _grid_size...
cuda
chosen
[ { "from": "system", "value": "BASIC_PATH_TRACER: Add comments to further explain the file arraignment of the kernel code\n" }, { "from": "human", "value": "/* rapt - RichieSam's Adventures in Path Tracing\n *\n * rapt is the legal property of Adrian Astley\n * Copyright Adrian Astley 2015\n */\n...
cuda
chosen
[ { "from": "system", "value": "Remove dependence on the CUDA SDK\n\nIt turns out that this example does not really depend on the cuda SDK. Thus\nwe remove the inclusion of the header file. This is also nice because\nCUDA 2.3 does not seem to have this header file.\n" }, { "from": "human", "valu...
cuda
chosen
[ { "from": "system", "value": "Revert datatype for scalar d_params\n" }, { "from": "human", "value": "// Copyright (c) 2009-2019 The Regents of the University of Michigan\n// This file is part of the HOOMD-blue project, released under the BSD 3-Clause License.\n\n\n// Maintainer: dnlebard\n\n#inc...
cuda
chosen
[ { "from": "system", "value": "Add forgotten sort to Halide API.\n" }, { "from": "human", "value": "#include \"grid_gpu.cuh\"\n#include \"halide_buf.h\"\n\nextern \"C\"\nint nvGridder(const double _scale, const int32_t _grid_size, buffer_t *_vis_buffer, buffer_t *_gcf_buffer, buffer_t *_uvg_buffe...
cuda
chosen
[ { "from": "system", "value": "Update Doxygen documentation with conventions\n" }, { "from": "human", "value": "/***************************************************************************//**\n* \\mainpage cuIBM\n*\n*\t\tA GPU-based Immersed Boundary Method\n*\n* \\author Krishnan, A. (anush@bu....
cuda
chosen
[ { "from": "system", "value": "[CUDA] Fix faulty test from rL288448\n\nSummary:\nThe test introduced by rL288448 is currently failing because\nunimportant but unexpected errors appear as output from a test compile\nline. This patch looks for a more specific error message, in order to\navoid false positives.\...
cuda
chosen
[ { "from": "system", "value": "Add a test for future_traits::cast()\n" }, { "from": "human", "value": "#include <agency/cuda/future.hpp>\n#include <agency/future.hpp>\n#include <iostream>\n#include <cassert>\n\nstruct empty {};\n\nint main()\n{\n {\n // construction of future<void> from empty...
cuda
chosen
[ { "from": "system", "value": "Fix typo in GPU TWF force compute function\n" }, { "from": "human", "value": "/*! \\file TWFDriverPotentialPairGPU.cu\n \\brief Defines the driver functions for computing all types of pair forces\n on the GPU\n*/\n\n#include \"EvaluatorPairTWF.h\"\n#include \"...
cuda
chosen
[ { "from": "system", "value": "Disable neon when enable gpu.\n" }, { "from": "human", "value": "/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nY...
cuda
chosen
[ { "from": "human", "value": "Add a unit test for the convenient caching allocator in detail.\n\nReviewed-by: Bryce Adelstein Lelbach aka wash <2f0f95f95a80179c2180af4c82f6ea311b6bd2c8@gmail.com>\n" }, { "from": "gpt", "value": "#include <unittest/unittest.h>\n\n#include <thrust/detail/config.h>\...
cuda
chosen
[ { "from": "human", "value": "Add unit tests for select_system, with one KNOWN_FAILURE\n\nFixes #169\n" }, { "from": "gpt", "value": "#include <unittest/unittest.h>\n#include <thrust/memory.h>\n\nstruct my_tag : thrust::device_system_tag {};\n\ntemplate<typename T1, typename T2>\nbool is_same(con...
cuda
chosen
[ { "from": "human", "value": "Add test case for r206302\n\n\ngit-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@206303 91177308-0d34-0410-b5e6-96231b3b80d8\n" }, { "from": "gpt", "value": "// RUN: %clang_cc1 %s -triple nvptx-unknown-unknown -fcuda-is-device -emit-llvm -o - | FileCheck %s\n\n#in...
cuda
chosen
[ { "from": "human", "value": "[CUDA] Add a test for r266496 (raise an error if a CUDA installation isn't found)\n\ngit-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@266796 91177308-0d34-0410-b5e6-96231b3b80d8\n" }, { "from": "gpt", "value": "// REQUIRES: clang-driver\n\n// Check that we raise ...
cuda
chosen
[ { "from": "human", "value": "Test multi-agent then_execute without shared parameters with nvcc\n" }, { "from": "gpt", "value": "#include <agency/cuda/grid_executor.hpp>\n#include <algorithm>\n#include <iostream>\n\n\n__managed__ int increment_me;\n\nstruct increment_and_return_void\n{\n templat...
cuda
chosen
[ { "from": "human", "value": "Add an example of Monte Carlo using disjoint subsequences of random numbers from a common stream.\n" }, { "from": "gpt", "value": "#include <thrust/random.h>\n#include <thrust/iterator/counting_iterator.h>\n#include <thrust/functional.h>\n#include <thrust/transform_r...
cuda
chosen
[ { "from": "human", "value": "[CUDA] Add test for compiling CUDA code with -S.\n\nReviewers: tra\n\nSubscribers: cfe-commits, jhen\n\nDifferential Revision: http://reviews.llvm.org/D16081\n\ngit-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@257810 91177308-0d34-0410-b5e6-96231b3b80d8\n" }, { "from...
cuda
chosen
[ { "from": "human", "value": "Add CUDA test for shared variables\n" }, { "from": "gpt", "value": "#include <agency/cuda/execution_policy.hpp>\n#include <agency/cuda/grid_executor.hpp>\n#include <thrust/device_vector.h>\n#include <cstdio>\n#include <cassert>\n\n\ntemplate<class T>\n__device__\nT f...
cuda
chosen
[ { "from": "human", "value": "Add abs maximum search (the code sits in the wrong directory ATM).\n" }, { "from": "gpt", "value": "#include \"threadFenceReduction_kernel.cuh\"\n\nstruct doubleMax {\n TASKCFG double init() {return 0.0;}\n TASKCFG double reduce(double x, double acc){return x > acc...
cuda
chosen
[ { "from": "human", "value": "Add kernel for mean pool\n" }, { "from": "gpt", "value": "#include <stdio.h>\n\n\nvoid __device__\nsaxpy(float* X, const float* Y, float scale, int n)\n{\n for (int i=0; i < n; ++i) // Iterate over cols\n X[i] += Y[i] * scale;\n}\n\n\nvoid __global__ kernel...
cuda
chosen
[ { "from": "human", "value": "[CUDA] Add tests for compiling CUDA files with -E.\n\nReviewers: tra\n\nSubscribers: cfe-commits, jhen\n\nDifferential Revision: http://reviews.llvm.org/D16080\n\ngit-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@257807 91177308-0d34-0410-b5e6-96231b3b80d8\n" }, { "fr...
cuda
chosen