This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cuda.h> | |
#include <cuda_runtime.h> | |
#include <cudaTypedefs.h> | |
template <typename T> | |
T get_cuda_driver_symbol(const char* name) { | |
void* fn = nullptr; | |
#if CUDA_VERSION >= 12000 | |
enum cudaDriverEntryPointQueryResult query_result; | |
C10_CUDA_CHECK( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Demo asynchronous server using only generators. | |
Test with: | |
$ netcat -N 127.0.0.1 1234 | |
""" | |
import enum | |
import select | |
import socket |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#0 0x00007fffe310eb30 in clock_gettime () | |
#1 0x00007f610869f936 in __GI___clock_gettime (clock_id=4, tp=0x7fffe30224d0) at ../sysdeps/unix/clock_gettime.c:115 | |
#2 0x00007f609491081e in ?? () from /usr/lib/x86_64-linux-gnu/libcuda.so.1 | |
#3 0x00007f60949f4d14 in ?? () from /usr/lib/x86_64-linux-gnu/libcuda.so.1 | |
#4 0x00007f60948adef9 in ?? () from /usr/lib/x86_64-linux-gnu/libcuda.so.1 | |
#5 0x00007f60948ae0b0 in ?? () from /usr/lib/x86_64-linux-gnu/libcuda.so.1 | |
#6 0x00007f60948dd623 in ?? () from /usr/lib/x86_64-linux-gnu/libcuda.so.1 | |
#7 0x00007f6094a76790 in ?? () from /usr/lib/x86_64-linux-gnu/libcuda.so.1 | |
#8 0x00007f60947e03e7 in ?? () from /usr/lib/x86_64-linux-gnu/libcuda.so.1 | |
#9 0x00007f60947e0850 in ?? () from /usr/lib/x86_64-linux-gnu/libcuda.so.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
struct CpuBuffer {}; | |
struct CudaBuffer {}; | |
template<typename TBuffer> | |
int getValue(); | |
int cpuValue = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
struct CpuBuffer {}; | |
struct CudaBuffer {}; | |
template<typename TBuffer> | |
int getValue(); | |
int cpuValue = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <array> | |
#include <memory> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <unistd.h> | |
struct FdHandle { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WARNING: ThreadSanitizer: data race (pid=4955) | |
Write of size 8 at 0x7b0400001280 by thread T8: | |
#0 open64 <null> (libtsan.so.0+0x2e2b1) | |
#1 uv__open_cloexec <null> (tensorpipe_test+0x2b865c) | |
#2 uv__stream_init <null> (tensorpipe_test+0x2c5ac8) | |
#3 uv_tcp_init_ex <null> (tensorpipe_test+0x2cb455) | |
#4 uv_tcp_init <null> (tensorpipe_test+0x2cb540) | |
#5 tensorpipe::transport::uv::TCPHandle::initFromLoop() <null> (tensorpipe_test+0x2020f8) | |
#6 tensorpipe::transport::uv::Listener::Impl::initFromLoop() <null> (tensorpipe_test+0x1eafd0) | |
#7 tensorpipe::transport::uv::Listener::Impl::init()::{lambda()#1}::operator()() const <null> (tensorpipe_test+0x1ed709) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ nm build/lib/libtorch_global_deps.so | |
0000000000202028 B __bss_start | |
0000000000202028 b completed.7697 | |
w __cxa_finalize@@GLIBC_2.2.5 | |
0000000000001220 t deregister_tm_clones | |
00000000000012b0 t __do_global_dtors_aux | |
0000000000201c48 t __do_global_dtors_aux_fini_array_entry | |
0000000000202020 d __dso_handle | |
0000000000201c50 d _DYNAMIC | |
0000000000202028 D _edata |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ nm venv/lib/python3.7/site-packages/torch/lib/libtorch_global_deps.so | |
0000000000201018 B __bss_start | |
0000000000201018 b completed.6945 | |
w __cxa_finalize@@GLIBC_2.2.5 | |
0000000000000520 t deregister_tm_clones | |
00000000000005b0 t __do_global_dtors_aux | |
0000000000200dc0 t __do_global_dtors_aux_fini_array_entry | |
0000000000200dc8 d __dso_handle | |
0000000000200dd0 d _DYNAMIC | |
0000000000201018 D _edata |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ nm build/lib/libtorch_global_deps.so | |
0000000000201020 B __bss_start | |
0000000000201020 b completed.7697 | |
w __cxa_finalize@@GLIBC_2.2.5 | |
0000000000000580 t deregister_tm_clones | |
0000000000000610 t __do_global_dtors_aux | |
0000000000200d98 t __do_global_dtors_aux_fini_array_entry | |
0000000000201018 d __dso_handle | |
0000000000200da0 d _DYNAMIC | |
0000000000201020 D _edata |
NewerOlder