by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Sameroom
    @sameroom-bot
    [Leo Fang, chainer] @ @Emilio @ @ @beam2d I’ve seen this message appearing after every PR merged to conda-forge/cupy-feedstock. I think it’s because we added you as maintainers but you did not accept the invitation. If you would like to be listed as a maintainer, could you please accept the invitation? If you prefer not to be listed, could you let me know so that I can take your ID out and suppress the bot
    Sameroom
    @sameroom-bot
    [Leo Fang, chainer] btw, congratulations and thank you for the v7 releases! :tada:
    Nitish Kumar
    @thisisnitish
    Hi! This is Nitish Kumar from India. Currently I'm perusing my graduation. I'm new to open source community and I'm interested to contribute. I want to participate in GSOC 2020. I would be highly grateful if you will guide me to take part in it.
    Sameroom
    @sameroom-bot
    [Emilio, chainer] Hello, sorry we still have not decided if we will participate this year.
    If we do so, we will make an announce with the steps to submit your application.
    Thanks!
    Sameroom
    @sameroom-bot
    wongalvis14
    @wongalvis14

    Hi, I'm looking to work on ILU cupy/cupy#2749 - I wrote iterative solver kernels in CUDA before, including ILU.

    Before I start, I have some questions:

    • How does cupy's architecture support functions calling on single and multiple gpus? How are number of threads and number of blocks defined by cupy in each function?
    • Sometimes there are NVIDIA functions (like cublas, cusparse) but sometimes they need to be written by developers. In what kind of situations do the cupy library developers write custom kernels to support new functions?
    Nonetheless as long as there are cublas and cusparse functions in place, the ILU kernel can be written using those high level APIs. So my questions are mostly for the general case. Thank you.
    Sameroom
    @sameroom-bot
    [Akifumi Imanishi, chainer] @wongalvis14
    1. Most of CuPy's function has a highly compatible interface with NumPy, so it does not have the interface to specify the block size and the grid size.
    2. The feature of the custom kernels is documented here: https://docs-cupy.chainer.org/en/stable/tutorial/kernel.html. It can specify the block size.
    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.