Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Sameroom
    @sameroom-bot
    [Emilio, chainer] Regarding 2. We usually write kernels for highly specialized functions that can not be implemented with the currently supported ndarray operations
    Sameroom
    @sameroom-bot
    [Emilio, chainer] > How are number of threads and number of blocks defined by cupy in each function?
    Right now almost all cupy functions launch kernels with the same number of threads per block. the number of blocks is defined by the size of the arrays.
    We are working on some kind of auto-tuning for these parameters .
    Sameroom
    @sameroom-bot
    [nishino, chainer] To complement the above comment, this is the still-WIP PR for the auto-tuning feature: cupy/cupy#2731
    Even lower-level class cupy.cuda.Function has the interface to specify threads/blocks but its mostly used internally.
    [nishino, chainer] > How does cupy's architecture support functions calling on single and multiple gpus?
    You can swith the current device by using cupy.cuda.Device:
    with cupy.cuda.Device(1): a = cupy.exp(cupy.ones((2, 3), 'f')) print(a.device) # Prints <CUDA Device 1>
    wongalvis14
    @wongalvis14
    Hi, I found a function with a type of syntax I've never seen before https://github.com/cupy/cupy/blob/9f9ef7d15d632619f650471e9407722ce6a73438/cupy/_sorting/count.py#L27
    Sameroom
    @sameroom-bot
    <Sameroom> Whoops! You've exceeded your daily message limit on this Sameroom account (it will reset in 5 hours and 10 minutes). If you have too many Tubes for your budget, pause or delete some Tubes on the Manage page. If you dont have a subscription, visit pricing to upgrade to unlimited messaging.
    wongalvis14
    @wongalvis14
    What is it doing there?
    Sameroom
    @sameroom-bot
    <Sameroom> Whoops! You've exceeded your daily message limit on this Sameroom account (it will reset in 5 hours and 10 minutes). If you have too many Tubes for your budget, pause or delete some Tubes on the Manage page. If you dont have a subscription, visit pricing to upgrade to unlimited messaging.
    wongalvis14
    @wongalvis14
    Hi, I've written a draft for Cupy sparse mean #2674 https://gist.github.com/wongalvis14/e4c1af431c20cb18d5457a372a32c3ec
    It's not optimized yet in comparison to numpy, and cupy implementations that I have yet to observe
    Please give me some feedback on how to keep it up to production quality, thanks
    Sameroom
    @sameroom-bot
    [Emilio, chainer] Looks nice :)
    Some of the concerns here is that depending on the datatype, by adding first and then dividing there is the risk of precision errors and over/underflow depending on the datatypes.
    wongalvis14
    @wongalvis14

    That's one thing I notice from scipy's implementation. I'm wondering if there's code I can refer to within cupy for cupy-oriented optimizations.

    Also I don't know if it is correct to handle the row sum case (axis=0) by returning a flattened array, I just did what was most simple and intuitive to match the output formats with scipy and cupy dense mean.

    wongalvis14
    @wongalvis14
    It seems that dividing first then sum them up would require elementwise division, which isn't implemeneted. I also see that simpler elementwise operations such as addition isn't implemented?https://github.com/cupy/cupy/blob/ebe2cae7b2a6efb2b601d7da1a6471eeb0434a6e/cupyx/scipy/sparse/compressed.py#L426
    Sameroom
    @sameroom-bot
    [Emilio, chainer] yeah, for sparse matrices doing such a thing is tricky
    wongalvis14
    @wongalvis14
    That was part of my project in chapel, but adg a scalar or a
    Adding or dividing with a scalar shouldn't have many tricky cases, is there already a sparse elementwise kernel in cupy?
    wongalvis14
    @wongalvis14
    I have improved it to reduce the risk of precision error https://gist.github.com/wongalvis14/91400ced33778fd24e315ed85f5c6655
    Sameroom
    @sameroom-bot
    [Emilio, chainer] can you submit a PR?
    wongalvis14
    @wongalvis14
    I haven't wrote tests, or handle the edge cases (if present) for production quality, should I still go ahead?
    Sameroom
    @sameroom-bot
    [Emilio, chainer] it is fine, you can keep adding commits and its better to discuss the actual implementation in github
    wongalvis14
    @wongalvis14
    Ok
    Sameroom
    @sameroom-bot
    [Emilio, chainer] thanks
    wongalvis14
    @wongalvis14
    Should I put it under base or compressed
    Sameroom
    @sameroom-bot
    [Emilio, chainer] ?
    wongalvis14
    @wongalvis14
    cupyx/scipy/sparse/base.py or cupyx/scipy/sparse/compressed.py
    Oh actually I should put it under cupyx/scipy/sparse/data.py alongside other elementwise functions like power right?
    Sameroom
    @sameroom-bot
    <Sameroom> Whoops! You've exceeded your daily message limit on this Sameroom account (it will reset in 24 hours and 0 minutes). If you have too many Tubes for your budget, pause or delete some Tubes on the Manage page. If you dont have a subscription, visit pricing to upgrade to unlimited messaging.
    [Emilio, chainer] base is fine as sum is defined there
    wongalvis14
    @wongalvis14
    Sameroom
    @sameroom-bot
    <Sameroom> Whoops! You've exceeded your daily message limit on this Sameroom account (it will reset in 23 hours and 51 minutes). If you have too many Tubes for your budget, pause or delete some Tubes on the Manage page. If you dont have a subscription, visit pricing to upgrade to unlimited messaging.
    wongalvis14
    @wongalvis14
    I saw that one of the projects is to support rng https://github.com/cupy/cupy/wiki/GSoC-2020-Project-Ideas
    cuRand is imported into cupy and cupy.random already exists, right? What is left to be done for that project?
    Rushabh Vasani
    @rushabh-v
    Hey everybody! I am Rushabh Vasani, A 2nd-year I.T undergrad from India. I am highly interested in working with cupy this summer under GSoC. I am interested in working on "CuPy coverage of NumPy functions". And I even have contributed to cupy previously. And I really looking forward to contributing more. Right now I am listing up the numpy functions which are not there in cupy for my reference. And trying to raise some more PRs in the project. Can you guys guide me further to get started with this project and the community? Thanks in advance!
    Sameroom
    @sameroom-bot
    [Ishan Rai, chainer] @ Hi. I have submitted a draft proposal on CuPy coverage of Numpy functions. Please take a look and let me know what you think?
    Sameroom
    @sameroom-bot
    [Leo Fang, chainer] perhaps a stupid question: Is the linking to cuda libraries done at runtime for pypi wheels?
    Sameroom
    @sameroom-bot
    [Leo Fang, chainer] Quick question for the merged PR 2584: I thought the preference for memoization is to use cupy.util.memoize, but now both ufuncs/element-wise kernels (never use it before) and reduction kernels (changed after 2584) move away from it? Is there a performance reason, or just to avoid decorators in Cython codes?
    Sameroom
    @sameroom-bot
    [Emilio, chainer] I have no idea
    [Emilio, chainer] you should ask imanishi
    Sameroom
    @sameroom-bot
    [Kenichi Maehashi, chainer] I’ve updated development policies page to covers topics often pointed out during the pull-request review. https://github.com/cupy/cupy/wiki/Development-policies
    Sameroom
    @sameroom-bot
    [Leo Fang, chainer] Quick question: does Chainer implement its own autograd, and any chance it could be directly used on CuPy arrays?
    [Leo Fang, chainer] I saw a folk from Autograd made a fork to support CuPy, but it was never merged into Autograd:
    https://github.com/ericmjl/autograd-cupy
    I am curious its performance and extensibility compared to Chainer’s (if there’s one). Also, it might be worth adding to the cupyx name space given that the Autograd project is inactive now?
    Sameroom
    @sameroom-bot
    [Emilio, chainer] Chainer autograd is on top of cupy

    [Emilio, chainer] autograd & cupy are orthogonal to each other,
    Mostly you can think of chainer as an autograd library that has components for nns already included.

    As we decided to relegate chainer to maintenance mode, we won't be adding or maintaining any kind of autograd support for cupy.

    Sameroom
    @sameroom-bot
    [Leo Fang, chainer] Thanks! Any chance you could point me to relevant section in Chainer’s doc? I’d like to try building a small (non-ML) example and benchmark.
    Sameroom
    @sameroom-bot
    [Corey J Nolet, chainer] @, I've got CUDA 11 installed and I built a conda environment with Python 3.5, but it looks like the highest version of Scipy I am able to install is 1.1. The tests in test_index.py should all be skipped w/ anything less than 1.4, right?
    [Corey J Nolet, chainer] Can you provide the versions of python & scipy/numpy that you are using to test locally? I'm trying to replicate the CI environment w/ conda so that I can reproduce the test failure. The tests all pass for me on the GV100 w/ Scipy >= 1.4.x. .
    Sameroom
    @sameroom-bot
    [Leo Fang, chainer] @kmaehashi @Emilio Looks like hipcc from ROCm 3.5.0 is at least 5x slower on average than nvcc from CUDA 10.0. Couldn’t finish running the full test suite in an hour…
    [Leo Fang, chainer] (and nvcc compared to nvrtc is another factor of 5x slower)
    Sameroom
    @sameroom-bot
    [Leo Fang, chainer] Well, looks like we got some improvement hahaha: hiprtc is “only” about 5x slower than nvrtc (whereas previously on hipcc it was about 25x as mentioned above). Hooray?
    Christopher Mayes
    @ChristopherMayes
    We had a request a while back for some elliptic integral (special) functions: cupy/cupy#4266
    It turns out that scipy just calls a C function, so I’m wondering how hard it is to port to cupy.
    Sameroom
    @sameroom-bot
    <Sameroom> Whoops! You've exceeded your daily message limit on this Sameroom account (it will reset in 24 hours and 0 minutes). If you have too many Tubes for your budget, pause or delete some Tubes on the Manage page. If you dont have a subscription, visit pricing to upgrade to unlimited messaging.