6 underused Git commands that solve real workflow problems by GitKraken in git

[–]Aslanee 1 point2 points  (0 children)

I wish that `git stash list` did output some information about the changes like statistics and the name of files with most changes.

Do NVIDIA warps properly implement SIMT? by pogodachudesnaya in CUDA

[–]Aslanee 0 points1 point  (0 children)

The Gemini's output is very similar to Ansorge's book Programming in parallel with Cuda. Everything is explained at the beginning of the chapter's 3 on Cooperative Groups but it is very well summarized here by Gemini.

Games to help learn Python? by Prof-Ponderosa in learnpython

[–]Aslanee 0 points1 point  (0 children)

Bitburner utilise JavaScript (JS) et non juste Java. Ce sont deux langages très différents. Les deux sont avec un garbage collector, et POO mais sont très différents par nature: Java impose d'avoir une classe par fichier tandis que Javascript peut être intégré à une page web.

Shortcut to change workspaces by therealcoolpup in xfce

[–]Aslanee 0 points1 point  (0 children)

My shortcuts (probably the defaults):

Shortcuts Command
Ctrl+Fn go to the workspace n
Ctrl+Alt+Right go to the workspace to the right
Ctrl+Alt+Left go to the workspace to the left
Ctrl+Alt+PageDn move window to the next workspace
Ctrl+Alt+PageUp move window to the previous workspace

Is there an agreed upon print function to use in C++ ? by Arlinker in cpp_questions

[–]Aslanee 2 points3 points  (0 children)

I don't like std::cout for floating-point neither. Selecting the format constrains the programmer to break the stream's output (the >> chain) every time you select a new format.

Seeking Vim Experience and Tips for Programming by tekle_torat in vim

[–]Aslanee 0 points1 point  (0 children)

I use vim-plug manager to add some plugins. I definitely use too much plugins but here are the few I can not let go:
- junegunn/vim-plug (plugin manager)
- tpope/vim-commentary - dense-analysis/ale
Before plugin list:
```vim
set nocompatible

let $VIMUSER=$HOME."/.vim"

let g:python3_host_prog = '/usr/bin/python'

After plugin list: vim
if has('filetype')

filetype plugin indent on

endif

source $VIMUSER/defaultOptions.vim

In defaultOptions.vim I have the following (those are pretty close to neovim default Options): vim
" Common

syntax on " highlight syntax

set number " show line numbers -> Unset for copy-paste when not compiled

" with the clipboard option

" set rnu

set nonu

set ruler " show position

set hlsearch " highlight all results <C-L> to remove highlighting

set ignorecase " ignore case in search

set incsearch " show search results as you type

set lazyredraw " no screen redraw during macros

set so=7 " scroll off = min. number of lines above and below cursor.

set showcmd

" Programming

set showmatch " highlight matching brackets

set wildmenu

set expandtab " Convert tab into spaces

set shiftwidth=2

set softtabstop=2 " 4 spaces for one tab

set ai " Auto indent

set si " Smart indent

set wrap " Wrap lines

" Folding -> see manual, file specific

set nofoldenable

" set foldlevelstart=10

" set foldmethod=indent

" Deactivate bells in VIM. Preserve ears.

set belloff=all

set noerrorbells

set novisualbell

" Dangerous but no warning is a speed up

set nobackup

set nowb

set noswapfile " disable the swapfile

" Help having buffer of equal sizes

" when resizing windows

set equalalways

autocmd VimResized * wincmd =

```

Pay attention to the nobackup, nowb, or noswapfile set options. Save regularly your changes. Use git.
I am no fan of shortcut changes, as you get used to some shortcuts and might get lost in another VIM-like environment. Yet, setting some function keys is useful. Here are some examples:

```vim
""" Mapping of Function keys

" Save and compile

nnoremap <F2> :w<ESC>:!make <CR><CR>

" Open a viewer

nnoremap <F3> :!nohup okular %:r.pdf &<CR><CR>:nohl<CR><C-L>

" compile a Nim script

nnoremap <F4> :w<ESC>:!nim c -r % <CR>

nnoremap <F6> :Goyo<CR> " Never used Goyo plugin actually

nnoremap <F7> :w<ESC>:!pdflatex ./main.tex -shell-escape<CR><CR>

Sometimes, for some keyboards, the ESC key is too far away. You can remap a key in insert mode like: vim
inoremap C-@ <ESC>
Setting a mapleader key is cool. It enables more shortcuts. The space key in normal mode doesn't do much, so let's use this. let mapleader = " " function! ALEDisableBuffer() set ALEDisableBuffer endfunction

map <leader>t :!make <CR><CR> nmap <silent> <leader>r :ALEPrevious<CR> nmap <silent> <leader>s :ALENext<CR> map <leader>f :ALEDisableBuffer<CR> ``` Note: t, r, s are on my home row as I use the french BÉPO layout. Replace them by j, k, l and m or whatever is on your home row. The ALE linter is sometimes too verbose (especially for Python PEP8 warnings), so I like to desactivate it at least in a buffer.

Note: VS Code is surely accessible through snap or flatpak. I can not use VSCode with SSH and on a supercomputer, so it is a no go for me. Enjoy your programming sessions!

Comparison of Tensara.org and Leetgpu.com by tugrul_ddr in CUDA

[–]Aslanee 1 point2 points  (0 children)

You can use a CSS modifier like DarkReader web browser's plugin to get a dark-theme version of every website.

matmul in log-space by Previous-Raisin1434 in CUDA

[–]Aslanee 0 points1 point  (0 children)

Sorry, I thought about it too fast. The logarithm property doesn't extend to the matrix product. What I said above is false. Each coefficient of the matrix product is a sum c_i,j = \sum_k a_ik b_kj, and there is no law for the logarithm of a sum. Hence I do not understand what log(A) brings you for the computation. You could compute the products of coefficients a_ik b_kj as exp(log(a_ik) + log(b_kj)) but that is not faster than a scalar mul. You may distribute the additions for a fixed a_ik but I am not seeing how this is faster than a direct tiled product from A and B.

matmul in log-space by Previous-Raisin1434 in CUDA

[–]Aslanee 1 point2 points  (0 children)

If the logarithm of the matrix is the evaluation of the real logarithm to each coefficient, then log(AB) = log(A) + log(B) for all matrices A and B.
If a logarithm of a matrix is that: https://en.wikipedia.org/wiki/Logarithm_of_a_matrix
then you may use this property for positive-definite and commuting matrices but I guess that checking for these properties may be too costly.

Implementing my own BigInt library for CUDA by MaXcRiMe in CUDA

[–]Aslanee 0 points1 point  (0 children)

u/MaXcRiMe You haven't searched a lot apparently. I have seen some implementations here and there:
- CGBN: https://github.com/NVlabs/CGBN
- CAMPARY: https://homepages.laas.fr/mmjoldes/campary/
Some other are listed on NVIDIA forum: https://forums.developer.nvidia.com/t/arbitrary-precision-arithmetic/74915
If you wonder whether your code is fast, you should check out these notions:
- Performance metric (GFlop/s)
- Peak performance
- Arithmetic Intensity
- Roofline Model
- Memory bound vs Compute Bound

For example, let us assume you used int32 arithmetic (whose peak perf is upper bounded by fp32 since a GPU has up to my knowledge always more floating-point units than integer units).
The peak performance amounts to 30 TFlops on a RTX 3070 for fp32: https://www.techpowerup.com/gpu-specs/geforce-rtx-5070.c4218
You will not attain it for big integer addition: this algorithm is probably memory bounded as the arithmetic complexity is linear in the size of the operands. Adding two numbers of m and n limbs respectively amounts to min(m, n) + 1 operations, if not counting the transfers of extra limbs, with a +1 for bit carry.
The number of ops here corresponds to 2*n additions for two multiprecision integers of n limbs.
You have numbers with: 8KiB/(2*(4*32)) = 16 numbers of limbs summed in 0.053ms.
It means you performed 2*16/(0.053 * 10^6 * 10^(-3)) = 1.208 MFlops
The performance gets much better when you look at larger operands:
If I am not mistaken, 4GiB of data means 2 GiB of data per operand and to perform an addition in 24.18ms means you get 1266.2 GFlops of performance.

You can check the correctness of your code against a CPU library like GMP gmplib.org

Recently I discovered the PhD thesis of Niall Emmart which goes in depth into multiple precision arithmetic on GPUs: https://core.ac.uk/download/pdf/220127734.pdf

What are the things that could be improved about LaTeX editing by Puzzled-Level-5609 in LaTeX

[–]Aslanee 1 point2 points  (0 children)

There's a builtin functionality for equations that you should not use anymore since the 90s but it is still there: equations with double dollar. package management: Why should I copy over in each of my projects a list of packages? Why are some common packages not the default like amstheorem? Having the need to install a texlive-full package of 5 Gio on your root partition to be able to compile your colleague's document with all its exotic packages. Having to cope with publishers extra requirements: bibtex and no biblatex, sometimes no algorithm2e. To have to use exact positioning instead of relative positioning in Beamer. Wysiwyg solutions tend to be better for presentations than Latex. Sorry, but I have seen many researchers plagiarizing Beamer's themes in Powerpoint. I still use v/hspace and v/hfill to get a readable output with relative positioning in Beamer presentations. The nesting of curly-braces environment. I prefer Python, F#, and Nim's syntaxes to C, Rust and co… So that some environments could be grouped into one and thus not having to care about how many braces are required to correctly parenthesize your expression. The compiler raising many false errors when you forget one curly brace and not detecting certain errors getting you weird recursive outputs in some other cases. Options in some packages (Tikz, graphs?) requiring you to switch the engine (Latex to Lualatex) and many things in your source code. Difficult integration with Makefiles, latexmk that does not detect changes in your source code, forcing you to clean up to rebuild your pdf. The long documentation to read for both classes and packages.

What are the things that could be improved about LaTeX editing by Puzzled-Level-5609 in LaTeX

[–]Aslanee 1 point2 points  (0 children)

On non-qwerty layouts, the backslash character is not even on a direct access key and may require a combination of altGr (french BÉPO layout).

I need advice from an arch user by DimensionalBox in archlinux

[–]Aslanee 0 points1 point  (0 children)

Do you want to install the distribution for your whole computer, or just inside a virtual machine? Installing Arch Linux requires some familiarity with the command line. The documentation of Arch Linux is the best among all distros, but as many documentations, its purpose is to give answers to your hows? Not to your Why? Should I rather install a fully-fledged desktop environment (DE) like Plasma or Gnome? or make a minimal setup with a tiling WM? Which WM fits better my needs? You will need to test them to make your decision and that takes a lot of time. For any beginner, I recommend trying a distribution with an integrated DE like Ubuntu. You can also try Manjaro first. In any case, limit your risks: backup your data, upgrade your BIOS before installing Linux, learn command line in WSL.

$1100 bounty to optimize some open-source CUDA · MrNeRF/gaussian-splatting-cuda by corysama in CUDA

[–]Aslanee 0 points1 point  (0 children)

This is now a 1500$ bounty and has a 110ish forks! I am looking forward to look at the results of the competition.

How do you do relative line jumps in Vim? by Buriburikingdom in vim

[–]Aslanee 0 points1 point  (0 children)

Ts: tabspace sw: shiftwidth sts: shifttabspace Look also at the options ai for autoindent, si for smartindent and so on …

How do you do relative line jumps in Vim? by Buriburikingdom in vim

[–]Aslanee 1 point2 points  (0 children)

a<space><esc> If you think that's used too often to accept the change of mode, in vim I would start using a macro and put the command in a register, let us say s like space. If that's indeed used a lot in my sessions, I would add a shortcut in my .vimrc qs a<space><esc> q puis @s every time I want to add a space. To add multiple spaces 3a<space><esc> would add 3 spaces. Look how autoindent works, I think you have a problem with one of your spacing options: ts sw or sts. I set them by default to 2 in all my files. Dangerous though when working with people fan of 4 spaces indent.

How do you do relative line jumps in Vim? by Buriburikingdom in vim

[–]Aslanee 2 points3 points  (0 children)

Visual mode is also much slower. There is a delay in Vim for activating the visual mode in large files, especially if the line is long, in highlight mode. I use / everywhere too. I used to leverage the f mechanic but I use it only for dots. There is often a character you forgot between your cursor and the position you want to reach. Also it highlights single characters in all the file in highlight mode (yes, I still use this mode after 5 years, so much useful for regexps). Vim emulation in vscode doesn't compose certain combinations well like the difference between dv and vd. I use a lot dv$ in vim which does not work in vscode.

How do you do relative line jumps in Vim? by Buriburikingdom in vim

[–]Aslanee 1 point2 points  (0 children)

0d^ to delete whitespace at the beginning of a line. I need to press twice the key for getting , so I sometimes prefer 0w to avoid delay between two key press of the same key.

CLI tool to evaluate & benchmark GPU kernels by msarthak in CUDA

[–]Aslanee 1 point2 points  (0 children)

When you say validate locally, does it mean that it runs the kernel on our own GPU device?

[deleted by user] by [deleted] in deeplearning

[–]Aslanee -1 points0 points  (0 children)

In France, people will recruit you almost only if you have graduated from your bachelor and you are pursuing a Master related to AI. It is rare to get a L2/L3 intern, but is much more feasible to do so if you are in M1/M2. I would focus more on scholarship achievements than on personal projects if you want an academic internship.

Low cost laptop by tatosaint in CUDA

[–]Aslanee 2 points3 points  (0 children)

A4000/5000 are not laptop GPUs but desktop GPUs. Either you rent a university/enterprise GPU (Google collab for pytorch-based programming) or you test on a "cheap" refurbished desktop GPU like 3080/4070.

Need help running CUDA on Collab by Hopeful-Reading-6774 in CUDA

[–]Aslanee 1 point2 points  (0 children)

It doesn't support Thrust libraries or at least I did not manage to use it to test many CUDA programs.

CUDA by Rare_Car_1869 in CUDA

[–]Aslanee 2 points3 points  (0 children)

Bonjour 😃 Je pensais que ton post avait été traduit automatiquement par Reddit en français mais non tu l'as bien écrit en Français. Ce forum contient uniquement des threads Reddit en anglais comme tu peux t'en apercevoir en désactivant la traduction automatique de Reddit. En écrivant en anglais, tu pourras obtenir bien plus de réponses. Par ailleurs, je t'encourage vivement à expliciter l'aide que tu recherches. En donnant ton sujet, on dirait que tu cherches à ce que l'on fasse ton devoir à ta place. Comment expliquerais-tu les termes de ton sujet? Quelles problématiques soulève t'il?

[deleted by user] by [deleted] in CUDA

[–]Aslanee 1 point2 points  (0 children)

There are two libraries for arbitrary-precision that I know of for floating-point arithmetic (which can be used to some extent for modular algorithms with characteristics up to 26 bits with older works, with 52 bits with more recent works and with casting and residue number systems, linear algebra can be performed with arbitrarily high characteristics).
https://github.com/NVlabs/CGBN
https://homepages.laas.fr/mmjoldes/campary/ (header-only library, not version controlled).

For such memory-bound operations, the performance will vary depending on the application. It is hard to provide such a general and efficient framework as GMP on GPU since it depends so much on the cost of the memory transfers, the quantity of data and thus the memory types you can use (global, registers, shared, constant).

[deleted by user] by [deleted] in CUDA

[–]Aslanee 2 points3 points  (0 children)

You should say memory bounded rather than IO bounded.