osmanip
A cross-platform library for output stream manipulation using ANSI escape sequences. (by JustWhit3)
gpgpu-loadbalancerx
Simple load-balancing library for balancing GPGPU workloads between a GPU and a CPU or any number of devices in a computer or multiple computers. (by tugrul512bit)
osmanip | gpgpu-loadbalancerx | |
---|---|---|
62 | 4 | |
212 | 1 | |
- | - | |
7.4 | 2.6 | |
8 months ago | about 2 years ago | |
C++ | C++ | |
MIT License | GNU General Public License v3.0 only |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
osmanip
Posts with mentions or reviews of osmanip.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-03-01.
-
C++ Show and Tell - March 2023
Repository: https://github.com/JustWhit3/osmanip
- osmanip v4.5.0: a library for output stream manipulation using ANSI escape sequences. Features: colors and styles manipulators, progress bars and terminal graphics
-
C++ Show and Tell - February 2023
I am working on a library for output stream manipulation using ANSI escape sequences. Some of its features are: colors and styles manipulators, progress bars and 2D terminal graphics. Repository: https://github.com/JustWhit3/osmanip
- osmanip v4.4.0: a library for output stream manipulation using ANSI escape sequences. Features: colors and styles manipulation, progress bars and terminal graphics
- osmanip v4.2.1: a library for output stream manipulation using ANSI escape sequences. Features: colors and styles manipulation, progress bars and terminal graphics
-
osmanip v4.2.1: a C++ library for output stream manipulation using ANSI escape sequences. Features: colors and styles manipulators, progress bars and terminal graphics
Github repository link: https://github.com/JustWhit3/osmanip
- osmanip v4.2.1: a library for output stream manipulation using ANSI escape sequences. Features: colors and styles manipulators, progress bars and terminal graphics
gpgpu-loadbalancerx
Posts with mentions or reviews of gpgpu-loadbalancerx.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-02-14.
-
vectorAdd.cu sample load-balanced on 3 GPUs
/** * Copyright 1993-2015 NVIDIA Corporation. All rights reserved. * * Please refer to the NVIDIA end user license agreement (EULA) associated * with this source code for terms and conditions that govern your use of * this software. Any use, reproduction, disclosure, or distribution of * this software and related documentation outside the terms of the EULA * is strictly prohibited. * */ /** * Vector addition: C = A + B. * * This sample is a very basic sample that implements element by element * vector addition. It is the same as the sample illustrating Chapter 2 * of the programming guide with some additions like error checking. */ #include // For the CUDA runtime routines (prefixed with "cuda_") #include #include // for load balancing between 3 different GPUs // https://github.com/tugrul512bit/gpgpu-loadbalancerx/blob/main/LoadBalancerX.h #include "LoadBalancerX.h" /** * CUDA Kernel Device code * * Computes the vector addition of A and B into C. The 3 vectors have the same * number of elements numElements. */ __global__ void vectorAdd(const float *A, const float *B, float *C, int numElements) { int i = blockDim.x * blockIdx.x + threadIdx.x; if (i < numElements) { C[i] = A[i] + B[i]; } } #include #include int main(void) { int numElements = 15000000; int numElementsPerGrain = 500000; size_t size = numElements * sizeof(float); float *h_A = (float *)malloc(size); float *h_B = (float *)malloc(size); float *h_C = (float *)malloc(size); for (int i = 0; i < numElements; ++i) { h_A[i] = rand()/(float)RAND_MAX; h_B[i] = rand()/(float)RAND_MAX; } /* * default tutorial vecAdd logic cudaMemcpy(d_A, h_A, size, cudaMemcpyHostToDevice); cudaMemcpy(d_B, h_B, size, cudaMemcpyHostToDevice); int threadsPerBlock = 256; int blocksPerGrid =(numElements + threadsPerBlock - 1) / threadsPerBlock; vectorAdd<<>>(d_A, d_B, d_C, numElements); cudaGetLastError(); cudaMemcpy(h_C, d_C, size, cudaMemcpyDeviceToHost); */ /* load-balanced 3-GPU version setup */ class GrainState { public: int offset; int range; std::map d_A; std::map d_B; std::map d_C; ~GrainState(){ for(auto a:d_A) cudaFree(a.second); for(auto b:d_B) cudaFree(b.second); for(auto c:d_C) cudaFree(c.second); } }; class DeviceState { public: int gpuId; int amIgpu; }; LoadBalanceLib::LoadBalancerX lb; lb.addDevice(LoadBalanceLib::ComputeDevice({0,1})); // 1st cuda gpu in computer lb.addDevice(LoadBalanceLib::ComputeDevice({1,1})); // 2nd cuda gpu in computer lb.addDevice(LoadBalanceLib::ComputeDevice({2,1})); // 3rd cuda gpu in computer // lb.addDevice(LoadBalanceLib::ComputeDevice({3,0})); // CPU single core for(int i=0;i( [&,i](DeviceState gpu, GrainState& grain){ if(gpu.amIgpu) { cudaSetDevice(gpu.gpuId); cudaMalloc((void **)&grain.d_A[gpu.gpuId], numElementsPerGrain*sizeof(float)); cudaMalloc((void **)&grain.d_B[gpu.gpuId], numElementsPerGrain*sizeof(float)); cudaMalloc((void **)&grain.d_C[gpu.gpuId], numElementsPerGrain*sizeof(float)); } }, [&,i](DeviceState gpu, GrainState& grain){ if(gpu.amIgpu) { cudaSetDevice(gpu.gpuId); cudaMemcpyAsync(grain.d_A[gpu.gpuId], h_A+i, numElementsPerGrain*sizeof(float), cudaMemcpyHostToDevice); cudaMemcpyAsync(grain.d_B[gpu.gpuId], h_B+i, numElementsPerGrain*sizeof(float), cudaMemcpyHostToDevice); } }, [&,i](DeviceState gpu, GrainState& grain){ if(gpu.amIgpu) { int threadsPerBlock = 1000; int blocksPerGrid =numElementsPerGrain/1000; vectorAdd<<>>(grain.d_A[gpu.gpuId], grain.d_B[gpu.gpuId], grain.d_C[gpu.gpuId], numElements-i); } else { for(int j=0;j de(3); for(int i=0;i<100;i++) { nanoseconds += lb.run(); } for(auto v:de) std::cout<
- I created a load-balancer for multi-gpu projects.
-
C++ Show and Tell - Experiment
Here is Nvidia's vectorAdd example modified for 3-GPU load balancing.
What are some alternatives?
When comparing osmanip and gpgpu-loadbalancerx you can also consider the following projects:
Blackjack_V1.02 - Extension of my old Blackjack game with Qt for C++
libletlib - C++ framework for the impatient.
arsenalgear-cpp - A library containing general purpose C++ utils.
SHA256-Implementation - A program that implements the SHA256 algorithm and generates the binary+hexdigest of a string input.
SAFD-algorithm - An app to compute the coefficients of a function development in a spherical harmonics convergent series.
dmpower - Interactive terminal D&D helper toolbox program for Dungeon Masters, players, and worldbuilders.
binary_io - A binary i/o library for C++, without the agonizing pain
mk_parse_int - String to int (in C89).
osmanip vs Blackjack_V1.02
gpgpu-loadbalancerx vs libletlib
osmanip vs arsenalgear-cpp
gpgpu-loadbalancerx vs SHA256-Implementation
osmanip vs libletlib
gpgpu-loadbalancerx vs Blackjack_V1.02
osmanip vs SAFD-algorithm
gpgpu-loadbalancerx vs dmpower
osmanip vs binary_io
osmanip vs SHA256-Implementation
osmanip vs mk_parse_int
osmanip vs dmpower